Explorar o código

钉钉增加供应商流程,借款问题修改,增加行政区显示

yewc hai 1 ano
pai
achega
a164269421

+ 33 - 0
client_h5/src/pages/assetMy/index.scss

@@ -0,0 +1,33 @@
+.van-cell-group {
+  margin: 0px;
+}
+.van-overlay {
+  background: rgba(0,0,0,0.3);
+}
+.add_btn {
+  background-color: #1989fa;
+  padding: 5px 10px;
+  border: 0px;
+  outline: none;
+  font-size: 13px;
+  color: #fff;
+  border-radius: 2px;
+}
+.detail-popup {
+  >.title {
+    font-size: 15px;
+    padding-left: 10px;
+  }
+  >.fixed-btn {
+    padding: 15px;
+  }
+}
+  :deep(.van-swipe-cell__right) {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    >button {
+      height: 50%;
+    }
+  }

+ 2 - 2
client_h5/src/pages/asset/index.vue → client_h5/src/pages/assetMy/index.vue

@@ -22,8 +22,8 @@
 
 <script setup lang="ts">
 import reqest from "@/utils/request";
-import Card from '@/components/card.vue';
-import CardCell from '@/components/cardCell.vue';
+import Card from "@/components/card.vue";
+import CardCell from "@/components/cardCell.vue";
 const list = ref([]); // 列表的数
 /** 初始化表单数据 */
 const initFormData = async () => {

+ 1 - 1
client_h5/src/pages/home/index.vue

@@ -77,7 +77,7 @@ const personMenus: MenuItem[] = [
   },
   {
     title: "我的资产",
-    path: "asset",
+    path: "assetMy",
     icon: "../assets/images/wdzc_icon.png",
   },
   {

+ 3 - 3
client_h5/src/router/routes.ts

@@ -94,12 +94,12 @@ const routes: RouteRecordRaw[] = [
         component: () => import("@/pages/interview/index.vue"),
       },
       {
-        path: "asset",
-        name: "asset",
+        path: "assetMy",
+        name: "assetMy",
         meta: {
           title: "我的资产",
         },
-        component: () => import("@/pages/asset/index.vue"),
+        component: () => import("@/pages/assetMy/index.vue"),
       },
       {
         path: "staff",

+ 4 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/contractSub/service/FlowContractSubService.java

@@ -170,4 +170,8 @@ public class FlowContractSubService {
         }
         return vo;
     }
+
+    public ContractSub selectByApplyId(String contractId) {
+        return contractSubMapper.selectByApplyId(contractId);
+    }
 }

+ 1 - 5
zjugis-business/src/main/java/com/zjugis/business/flow/supplier/service/FlowFlowSupplierServiceImpl.java

@@ -122,16 +122,12 @@ public class FlowFlowSupplierServiceImpl implements FlowSupplierService {
     }
     @Override
     public SupplierRespVO flowAdd(String flowInstanceId, String userId) {
-        if (StringUtils.isNotBlank(SecurityFrameworkUtils.getLoginUserId())) {
-            userId = SecurityFrameworkUtils.getLoginUserId();
-        }
         SupplierDO entity = findByInstanceId(flowInstanceId);
         CommonResult<IFlowInstance> flowResult = workflowClient.flowInstance(flowInstanceId);
         if (flowResult.isSuccess()) {
-            CommonResult<AdminUserRespDTO> result = adminUserApi.getUser(userId);
             if (!Objects.isNull(entity)) {
                 CommonResult<AdminUserRespDTO> result1 = adminUserApi.getUser(entity.getUserId());
-                if (result.isSuccess()) {
+                if (result1.isSuccess()) {
                     entity.setUserNickname(result1.getData().getNickname());
                 }
             }

+ 10 - 8
zjugis-business/src/main/java/com/zjugis/business/flow/usemoney/event/UseMoneyEvent.java

@@ -2,6 +2,7 @@ package com.zjugis.business.flow.usemoney.event;
 
 import cn.hutool.core.collection.CollectionUtil;
 import com.google.common.base.Strings;
+import com.zjugis.business.bean.entity.ContractApply;
 import com.zjugis.business.bean.entity.ContractSub;
 import com.zjugis.business.bean.entity.Project;
 import com.zjugis.business.converter.usemoney.UseMoneyConvert;
@@ -16,6 +17,7 @@ import com.zjugis.business.flow.usemoney.entity.UseMoneyDO;
 import com.zjugis.business.flow.usemoney.entity.UseMoneyDetailDO;
 import com.zjugis.business.flow.usemoney.service.UseMoneyDetailService;
 import com.zjugis.business.flow.usemoney.service.UseMoneyService;
+import com.zjugis.business.mapper.ContractApplyMapper;
 import com.zjugis.business.service.ProjectCostService;
 import com.zjugis.business.service.ProjectService;
 import com.zjugis.framework.common.pojo.CommonResult;
@@ -90,12 +92,12 @@ public class UseMoneyEvent extends BaseController {
     @Resource
     private OutsourcePurchaseDao outsourcePurchaseDao;
 
-    @Resource
-    private FlowContractSubService flowContractSubService;
-
     @Resource
     private ProjectCostService projectCostService;
 
+    @Autowired
+    ContractApplyMapper subcontractApplyMapper;
+
     /**
      * 设置流程描述
      *
@@ -178,13 +180,13 @@ public class UseMoneyEvent extends BaseController {
                 }
                 //如果是外/分包合同,更新已付款金额
                 if(entity.getContractId()!=null){
-                    ContractSub flowContractSub=flowContractSubService.selectById(entity.getContractId());
-                    if(flowContractSub!=null){
-                        ContractSub contractSub=new ContractSub();
+                    ContractApply apply=subcontractApplyMapper.selectById(entity.getContractId());
+                    if(apply!=null){
+                        ContractApply contractSub=new ContractApply();
                         contractSub.setId(entity.getContractId());
-                        contractSub.setPayAmount(flowContractSub.getPayAmount().add(entity.getTotalAmount()));
+                        contractSub.setPayAmount(apply.getPayAmount().add(entity.getTotalAmount()));
                         System.out.println(contractSub);
-                        flowContractSubService.updateById(contractSub);
+                        subcontractApplyMapper.updateById(contractSub);
                     }
                 }
                 return ok("true");

+ 33 - 34
zjugis-business/src/main/java/com/zjugis/business/flow/usemoney/service/UseMoneyServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson2.JSON;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.zjugis.business.bean.entity.ContractApply;
 import com.zjugis.business.bean.entity.ContractSub;
 import com.zjugis.business.bean.entity.Project;
 import com.zjugis.business.bean.entity.Supplier;
@@ -22,6 +23,7 @@ import com.zjugis.business.flow.Asset.entity.AssetProcureDetailDO;
 import com.zjugis.business.flow.Asset.service.AssetProcureDetailService;
 import com.zjugis.business.flow.Asset.service.AssetProcureService;
 import com.zjugis.business.flow.commoncost.entity.CommonCostDO;
+import com.zjugis.business.flow.contractApply.service.FlowContractApplyService;
 import com.zjugis.business.flow.contractSub.service.FlowContractSubService;
 import com.zjugis.business.flow.loan.controller.vo.LoanRespVO;
 import com.zjugis.business.flow.outsourcePurchase.controller.vo.OutsourcePurchaseDetRespVO;
@@ -35,6 +37,7 @@ import com.zjugis.business.flow.usemoney.dao.UseMoneyDao;
 import com.zjugis.business.flow.usemoney.dao.UseMoneyDetailDao;
 import com.zjugis.business.flow.usemoney.entity.UseMoneyDO;
 import com.zjugis.business.flow.usemoney.entity.UseMoneyDetailDO;
+import com.zjugis.business.mapper.ContractApplyMapper;
 import com.zjugis.business.mapper.SupplierMapper;
 import com.zjugis.business.service.CommonService;
 import com.zjugis.business.service.ProjectService;
@@ -58,6 +61,7 @@ import com.zjugis.module.system.api.dict.dto.DictDataRespDTO;
 import com.zjugis.module.system.api.user.AdminUserApi;
 import com.zjugis.module.system.api.user.dto.AdminUserRespDTO;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -129,6 +133,9 @@ public class UseMoneyServiceImpl implements UseMoneyService {
 
     @Resource
     private FlowContractSubService flowContractSubService;
+
+    @Autowired
+    ContractApplyMapper subcontractApplyMapper;
     @Resource
     private CommonService commonService;
 
@@ -386,13 +393,17 @@ public class UseMoneyServiceImpl implements UseMoneyService {
             map.put("projectZrbm", project.getZrbm());
             map.put("hth", project.getContractNumber());
         }
+        ContractSub flowContractSub=null;
         if (StringUtils.isNotBlank(entity.getContractId())) {
-            ContractSub flowContractSub = flowContractSubService.selectById(entity.getContractId());
-            map.put("contractType", flowContractSub.getContractType());
-            map.put("name", flowContractSub.getName());
-            map.put("contractAmount", flowContractSub.getContractAmount());
-            map.put("payAmount", flowContractSub.getPayAmount());
-            map.put("paymentTerms", flowContractSub.getPaymentTerms());
+            flowContractSub = flowContractSubService.selectByApplyId(entity.getContractId());
+            if(flowContractSub!=null){
+                ContractApply apply=subcontractApplyMapper.selectById(entity.getContractId());
+                map.put("contractType", flowContractSub.getContractType());
+                map.put("name", flowContractSub.getName());
+                map.put("contractAmount", flowContractSub.getContractAmount());
+                map.put("payAmount", apply.getPayAmount());
+                map.put("paymentTerms", flowContractSub.getPaymentTerms());
+            }
         }
         map.put("formEntity", entity);
         map.put("sqd", sqd);
@@ -421,7 +432,7 @@ public class UseMoneyServiceImpl implements UseMoneyService {
         }
         List<zTree> zTrees = getCostTypezTrees();
         map.put("costTypeJSON", JSON.toJSONString(zTrees));
-        if(entity.getContractId()==null){
+        if(flowContractSub==null){
             map.put("contractId", "notContract");
         }else{
             map.put("contractId", "contract");
@@ -569,9 +580,11 @@ public class UseMoneyServiceImpl implements UseMoneyService {
             UseMoneyDO entity = new UseMoneyDO();
             if(supplierId!=null){
                 Supplier supplier=supplierService.queryById(supplierId);
-                entity.setCollectionCompany(supplier.getCustomerName());
-                entity.setCollectionCompanyAccount(supplier.getBankaccount());
-                entity.setCollectionCompanyBank(supplier.getBank());
+                if(supplier!=null){
+                    entity.setCollectionCompany(supplier.getCustomerName());
+                    entity.setCollectionCompanyAccount(supplier.getBankaccount());
+                    entity.setCollectionCompanyBank(supplier.getBank());
+                }
             }
             entity.setInstanceId(UrlUtils.getParam(returnUrl, "flowInstanceId"));
             entity.setUserId(userId);
@@ -679,24 +692,6 @@ public class UseMoneyServiceImpl implements UseMoneyService {
         if (flowResult.isSuccess()) {
             IFlowInstance flowInstance = flowResult.getData();
             UseMoneyDO entity = findByInstanceId(flowInstanceId);
-            if (Objects.isNull(entity)) {
-                entity = new UseMoneyDO();
-                entity.setInstanceId(flowInstanceId);
-                entity.setUserId(userId);
-                entity.setUseMoneyNo(flowInstance.getCode());
-                entity.setApplyTime(LocalDateTime.now());
-                entity.setCreateTime(LocalDateTime.now());
-                entity.setFlowStatus(FlowStatusConstants.FLOW_NOT_START);
-                entity.setPaymentCompanyId("4e99393c-c0ea-4146-a7fb-56fb8019c477");
-                entity.setPaymentMethod(1);
-                CommonResult<AdminUserRespDTO> result = adminUserApi.getUser(userId);
-                if (result.isSuccess()) {
-                    entity.setUserNickname(result.getData().getNickname());
-                    entity.setDeptId(result.getData().getDeptId());
-                    entity.setDeptName(result.getData().getDeptName());
-                }
-                useMoneyDao.insert(entity);
-            }
 
             UseMoneyRespVO respVO = UseMoneyConvert.INSTANCE.convert01(entity);
             if (StringUtils.isNotBlank(entity.getProjectId())) {
@@ -706,13 +701,17 @@ public class UseMoneyServiceImpl implements UseMoneyService {
                 respVO.setProjectZrbm(project.getZrbm());
                 respVO.setHth(project.getContractNumber());
             }
+            ContractSub flowContractSub=null;
             if (StringUtils.isNotBlank(entity.getContractId())) {
-                ContractSub flowContractSub = flowContractSubService.selectById(entity.getContractId());
-                respVO.setContractType(flowContractSub.getContractType());
-                respVO.setName(flowContractSub.getName());
-                respVO.setContractAmount(flowContractSub.getContractAmount());
-                respVO.setPayAmount(flowContractSub.getPayAmount());
-                respVO.setPaymentTerms(flowContractSub.getPaymentTerms());
+                flowContractSub = flowContractSubService.selectByApplyId(entity.getContractId());
+                if(flowContractSub!=null){
+                    ContractApply apply=subcontractApplyMapper.selectById(entity.getContractId());
+                    respVO.setContractType(flowContractSub.getContractType());
+                    respVO.setName(flowContractSub.getName());
+                    respVO.setContractAmount(flowContractSub.getContractAmount());
+                    respVO.setPayAmount(apply.getPayAmount());
+                    respVO.setPaymentTerms(flowContractSub.getPaymentTerms());
+                }
             }
             List<UseMoneyDetailDO> detailList= useMoneyDetailService.getListByUseMoeneyId(entity.getId());
             List<UseMoneyDetailRespVO> detailRespVOS = UseMoneyDetailConvert.INSTANCE.convertList01(detailList);

+ 2 - 0
zjugis-business/src/main/java/com/zjugis/business/mapper/ContractSubMapper.java

@@ -27,5 +27,7 @@ public interface ContractSubMapper extends BaseMapper<ContractSub> {
     List<ContractSubCostDto> selectSubCostByProjectIds(@Param("ids") List<String> projectIds);
 
     ContractSubStatisticResp statistic(@Param("params") ContractSubDto contractSubDto);
+
+    ContractSub selectByApplyId(String contractId);
 }
 

+ 9 - 0
zjugis-business/src/main/resources/mapper/oracle/ContractSubMapper.xml

@@ -70,5 +70,14 @@
         </where>
         ORDER BY t.CREATE_TIME DESC NULLS LAST
     </select>
+    <select id="selectByApplyId" resultType="com.zjugis.business.bean.entity.ContractSub">
+        SELECT
+        *
+        FROM CONTRACT_SUB T
+        <where>
+            ISVALID = 1
+            AND CONTRACT_APPLY_ID=#{contractId}
+        </where>
+    </select>
 </mapper>