Prechádzať zdrojové kódy

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun

ccjgmwz 3 rokov pred
rodič
commit
de3cce2634

+ 2 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ContractManagementInfoServiceImpl.java

@@ -2280,8 +2280,8 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
         pageView.put("pageSize", contractManagementInfo.getPageSize());
         pageView.put("currentPage", contractManagementInfo.getCurrentPage());
         // 查询服务商总数
-        Integer dataCount = baseMapper.getCountByCondition(pageView);
-        List<ContractManagementInfo> dataList = baseMapper.getListByCondition(pageView);
+        Integer dataCount = baseMapper.getContractCountByCondition(pageView);
+        List<ContractManagementInfo> dataList = baseMapper.getContractListByCondition(pageView);
 
         Page<ContractManagementInfo> page = new Page<>();
         page.setRecords(dataList == null ? Lists.newArrayList() : dataList);

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/workflow/ExepenseInfoListener.java

@@ -8,7 +8,7 @@ import com.yh.saas.plugin.yiliangyiyun.service.IExpenseInfoService;
 import com.yh.saas.plugin.yiliangyiyun.service.IPurchasePriceService;
 import org.springframework.beans.factory.annotation.Autowired;
 
-@WorkflowTaskListener(name = "利润核算", group = "费用管理")
+@WorkflowTaskListener(name = "利润核算(新)", group = "费用管理(新)")
 public class ExepenseInfoListener extends AbstractWorkflowTaskListener {
 
     private static final long serialVersionUID = 4103656734835351132L;

+ 48 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/workflow/ExepenseListener.java

@@ -0,0 +1,48 @@
+package com.yh.saas.plugin.yiliangyiyun.workflow;
+
+import com.yh.saas.common.support.workflow.AbstractWorkflowTaskListener;
+import com.yh.saas.common.support.workflow.annotation.WorkflowTaskListener;
+import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
+import com.yh.saas.plugin.yiliangyiyun.entity.ExpenseInfo;
+import com.yh.saas.plugin.yiliangyiyun.service.IExpenseInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+@WorkflowTaskListener(name = "利润核算", group = "费用管理")
+public class ExepenseListener extends AbstractWorkflowTaskListener {
+
+    private static final long serialVersionUID = 4103656734835351132L;
+
+    @Autowired
+    private IExpenseInfoService expenseInfoService;
+
+    @Override
+    public void handleStatusChanged(String businessKey, String status, String statusEn, boolean processIsEnd) {
+        ExpenseInfo expenseInfo = expenseInfoService.selectById(businessKey);
+        if (expenseInfo == null) {
+            return;
+        }
+        if (processIsEnd) {
+            expenseInfo.setStatusFlag(StatusEnum.NOT_COLLECTION_PAY.getFlag());
+            expenseInfo.setStatus(StatusEnum.NOT_COLLECTION_PAY.getName());
+            expenseInfo.setWorkflowId(null);
+            expenseInfo.setApproveStatus(null);
+        } else {
+            expenseInfo.setApproveStatus(status);
+        }
+        expenseInfoService.updateAllColumnById(expenseInfo);
+    }
+
+    @Override
+    public void handleRejectApplicationRepulsed(String workflowId, String businessKey, boolean needReapply) {
+        ExpenseInfo expenseInfo = expenseInfoService.selectById(businessKey);
+        if (expenseInfo == null) {
+            return;
+        }
+        expenseInfo.setStatusFlag(StatusEnum.PURCHASE_FAILED.getFlag());
+        expenseInfo.setStatus(StatusEnum.PURCHASE_FAILED.getName());
+        expenseInfo.setApproveStatus(null);
+        expenseInfoService.updateAllColumnById(expenseInfo);
+
+    }
+
+}