Bladeren bron

用款类型修改

yewc 1 jaar geleden
bovenliggende
commit
f54eb5d597

+ 10 - 5
zjugis-business/src/main/java/com/zjugis/business/flow/usemoney/service/UseMoneyServiceImpl.java

@@ -420,12 +420,17 @@ public class UseMoneyServiceImpl implements UseMoneyService {
     private Map<String, Object> createModelMap() {
         Map<String, Object> map = new HashMap<>();
         map.put("formEntity", new HashMap<>());
-        List<zTree> zTrees = getCostTypezTrees();
+        List<zTree> zTrees = getCostTypezTrees(null);
         map.put("costTypeJSON", JSON.toJSONString(zTrees));
         return map;
     }
-    private List<zTree> getCostTypezTrees() {
-        List<DictDataRespDTO> dictDataRespDTOS = dictDataApi.getDictDataList(DictConstants.COMMON_COST_TYPE).getCheckedData();
+    private List<zTree> getCostTypezTrees(String contractId) {
+        List<DictDataRespDTO> dictDataRespDTOS =new ArrayList<>();
+        if (StringUtils.isNotBlank(contractId)) {
+            dictDataRespDTOS = dictDataApi.getDictDataList(DictConstants.COMMON_COST_TYPE).getCheckedData();
+        }else{
+            dictDataRespDTOS = dictDataApi.getDictDataList(DictConstants.COMMON_COST_TYPE_NOSUB).getCheckedData();
+        }
         List<zTree> zTrees = new ArrayList<>();
         for (DictDataRespDTO dictDataRespDTO : dictDataRespDTOS) {
             zTree node = new zTree();
@@ -494,7 +499,7 @@ public class UseMoneyServiceImpl implements UseMoneyService {
         if (result.isSuccess()) {
             map.put("paymentCompanyName", result.getData().getName());
         }
-        List<zTree> zTrees = getCostTypezTrees();
+        List<zTree> zTrees = getCostTypezTrees(entity.getContractId());
         map.put("costTypeJSON", JSON.toJSONString(zTrees));
         if(flowContractSub==null){
             map.put("contractId", "notContract");
@@ -656,7 +661,7 @@ public class UseMoneyServiceImpl implements UseMoneyService {
             entity.setApplyTime(LocalDateTime.now());
             entity.setCreateTime(LocalDateTime.now());
             entity.setFlowStatus(FlowStatusConstants.FLOW_NOT_START);
-            entity.setIsAgent(1);
+            entity.setIsAgent(0);
             entity.setPaymentCompanyId("4e99393c-c0ea-4146-a7fb-56fb8019c477");
             entity.setPaymentMethod(1);
             entity.setContractId(contractId);