예제 #1
0
 /**
  *
  * <pre>
  * 方法体说明:判断是否快递大区
  * 作者:andy
  * 日期: 2013-11-25 上午14:18:21
  * @param map
  * @return:是则返回true,否则false
  * </pre>
  */
 public boolean isExpressArea(Map<?, ?> map) {
   ContractWorkflowInfo info = new ContractWorkflowInfo();
   String bizCode = (String) map.get(BPMSConstant.BIZCODE); // 流程实例ID
   String processDefName = map.get(BPMSConstant.PROCESS_DEF_NAME).toString();
   WebApplicationContext wac = WebApplicationContextHolder.getWebApplicationContext();
   IContractWorkflowManager contractWorkflowManager =
       (IContractWorkflowManager) wac.getBean("contractWorkflowManager");
   IDepartmentService departmentService = (IDepartmentService) wac.getBean("departmentService");
   info = contractWorkflowManager.findContractWorkflowInfoByWorkNo(bizCode, processDefName);
   if (null != info & StringUtil.isNotEmpty(info.getContractNumber())) {
     // 点部标杆编码
     String expressPointDeptCode = info.getExpressPointDeptCode();
     // 如果编码不为空
     if (StringUtil.isNotEmpty(expressPointDeptCode)) {
       // 查询出对应的快递点部
       Department exDept = departmentService.getDeptByStandardCode(expressPointDeptCode);
       Department bigArea = null;
       if (null != exDept) {
         bigArea = departmentService.getBigAreaByDeptId(exDept.getId());
       }
       if (bigArea != null && !StringUtil.isEmpty(bigArea.getId())) {
         List<Department> deptList = departmentService.queryAllChildDeptByDeptId(bigArea.getId());
         for (int i = 0; i < deptList.size(); i++) {
           Department deptment = deptList.get(i);
           // 如果子部门有快递部分 则改部门不是快递大区
           if (deptment != null && deptment.getDeptName().endsWith("快递分部")) { // 有快递分部,则无快递事业部
             return false;
           }
         }
         return true;
       }
     }
   }
   return false;
 }
예제 #2
0
 /**
  *
  * <pre>
  * 方法体说明:合同申请---判断发票标记类型
  * 作者:andy
  * 日期: 2013-11-25 上午14:18:21
  * @param map
  * @return:1-true,否则false
  * </pre>
  */
 public boolean isType(Map<?, ?> map) {
   // 根据业务编码获取合同信息
   ContractWorkflowInfo info = new ContractWorkflowInfo();
   // 获得业务编码
   String bizCode = (String) map.get(BPMSConstant.BIZCODE); // 流程实例ID
   // 获得流程定义名称
   String processDefName = map.get(BPMSConstant.PROCESS_DEF_NAME).toString();
   // 获得WebApplicationContext
   WebApplicationContext wac = WebApplicationContextHolder.getWebApplicationContext();
   // 得到合同工作流manager
   IContractWorkflowManager contractWorkflowManager =
       (IContractWorkflowManager) wac.getBean("contractWorkflowManager");
   // 根据工作流业务编码及流程定义名称查询出合同详细信息
   info = contractWorkflowManager.findContractWorkflowInfoByWorkNo(bizCode, processDefName);
   // 如果对应的合同信息不为空
   if (null != info & StringUtil.isNotEmpty(info.getContractNumber())) {
     // 发票标记为01 返回true
     if (Constant.INVOICE_TYPE_01.equals(info.getInvoiceType())) {
       return true;
     } else {
       return false;
     }
   }
   return false;
 }
예제 #3
0
  /**
   * 结算额度检验
   *
   * @param map
   * @return
   */
  public boolean isOverRange(Map<?, ?> map) {
    ContractWorkflowInfo info = new ContractWorkflowInfo();
    String bizCode = (String) map.get(BPMSConstant.BIZCODE); // 流程实例ID
    String processDefName = map.get(BPMSConstant.PROCESS_DEF_NAME).toString();
    WebApplicationContext wac = WebApplicationContextHolder.getWebApplicationContext();
    IContractWorkflowManager contractWorkflowManager =
        (IContractWorkflowManager) wac.getBean("contractWorkflowManager");
    info = contractWorkflowManager.findContractWorkflowInfoByWorkNo(bizCode, processDefName);
    if (null != info & StringUtil.isNotEmpty(info.getContractNumber())
        && StringUtil.isNotEmpty(info.getOverRange())) {

      return info.getOverRange().equals("true");
    }

    return false;
  }
예제 #4
0
 /**
  *
  * <pre>
  * 方法体说明:合同申请---判断是否有零担折扣
  * 作者:royxhl
  * 日期: 2013-11-25 上午14:18:21
  * @param map
  * @return:true,否则false
  * </pre>
  */
 public boolean isLTTDiscount(Map<?, ?> map) {
   ContractWorkflowInfo info = new ContractWorkflowInfo();
   // 获得业务编码
   String bizCode = (String) map.get(BPMSConstant.BIZCODE);
   // 获得流程定义名称
   String processDefName = map.get(BPMSConstant.PROCESS_DEF_NAME).toString();
   // 获得WebApplicationContext
   WebApplicationContext wac = WebApplicationContextHolder.getWebApplicationContext();
   // 得到合同工作流manager
   IContractWorkflowManager contractWorkflowManager =
       (IContractWorkflowManager) wac.getBean("contractWorkflowManager");
   // 根据工作流业务编码及流程定义名称查询出合同详细信息
   info = contractWorkflowManager.findContractWorkflowInfoByWorkNo(bizCode, processDefName);
   if (null != info & StringUtil.isNotEmpty(info.getContractNumber())) {
     // 返回是否有零担折扣
     return info.isHasLTTDiscount();
   }
   return false;
 }
예제 #5
0
 /**
  * Description: Description:类型1:零担、快递近三月发货金额均不为0,或仅快递近三月发货金额为0的月发越折合同, 或仅零担近三月发货金额为0的非零担月结
  * ,合同审批流程如下A;<br>
  *
  * @author royxhl
  * @version 0.1 2013-11-27
  * @param map
  * @return boolean 类型1 返回true 类型2 返回fasle
  */
 public boolean isTypeOne(Map<?, ?> map) {
   ContractWorkflowInfo info = new ContractWorkflowInfo();
   String bizCode = (String) map.get(BPMSConstant.BIZCODE); // 流程实例ID
   String processDefName = map.get(BPMSConstant.PROCESS_DEF_NAME).toString();
   WebApplicationContext wac = WebApplicationContextHolder.getWebApplicationContext();
   IContractWorkflowManager contractWorkflowManager =
       (IContractWorkflowManager) wac.getBean("contractWorkflowManager");
   info = contractWorkflowManager.findContractWorkflowInfoByWorkNo(bizCode, processDefName);
   if (null != info & StringUtil.isNotEmpty(info.getContractNumber())) {
     if ((!info.getExpAmountOfConsignMent().equals("0\\0\\0")
             && !info.getAmountOfConsignment().equals("0\\0\\0"))
         || (info.getExpAmountOfConsignMent().equals("0\\0\\0")
             && !info.getAmountOfConsignment().equals("0\\0\\0")
             && "月发越折".equals(info.getExpressPreferentialType()))
         || (!info.getExpAmountOfConsignMent().equals("0\\0\\0")
                 && info.getAmountOfConsignment().equals("0\\0\\0")
                 && "月结".equals(info.getExpNodesectionType()))
             && !"月结".equals(info.getNodeSectionType())) {
       return true;
     }
   }
   return false;
 }