Exemple #1
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;
 }
Exemple #2
0
 /**
  * Description:是否修改了发票标记<br>
  *
  * @author royxhl
  * @version 0.1 2013-11-27
  * @param map
  * @return boolean 修改了 false 未修复true
  */
 public boolean isModifyInvoiceType(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 (null != info.getInvoiceType()
         && null != info.getNewInvoiceType()
         && !info.getNewInvoiceType().equals(info.getInvoiceType())) {
       return true;
     }
   }
   return false;
 }