zhangyuewww 1 gadu atpakaļ
vecāks
revīzija
d264358dca

+ 13 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehousingOrderServiceImpl.java

@@ -1520,6 +1520,16 @@ public class WarehousingOrderServiceImpl extends ServiceImpl<WarehousingOrderMap
     public String payMoney(WarehousingOrder warehousingOrder) {
         List<WarehousingOrder> warehousingOrderList = warehousingOrder.getWarehousingOrderList();
         if (!CollectionUtils.isEmpty(warehousingOrderList)) {
+            String createUserId="";
+            CommonStaff commonStaff = staffService.selectOne(new EntityWrapper<CommonStaff>()
+                    .eq("staff_name", warehousingOrderList.get(0).getRequestPerson())
+                    .eq("comp_id", warehousingOrderList.get(0).getCompId()));
+            if (commonStaff!=null){
+                createUserId=commonStaff.getStaffId();
+            }
+            else{
+                createUserId=AuthSecurityUtils.getCurrentUserId();
+            }
             //付款多条
             if ("0".equals(warehousingOrder.getFlag())) {
                 for (WarehousingOrder warehousingOrder1 : warehousingOrderList) {
@@ -1559,6 +1569,8 @@ public class WarehousingOrderServiceImpl extends ServiceImpl<WarehousingOrderMap
                     expenseInfo.setExpensesPurpose("1");
                     expenseInfo.setContractNo(warehousingOrder2.getContractNo());
                     expenseInfo.setAgent(AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getStaffName());
+                    expenseInfo.setCreateUserId(createUserId);
+                    expenseInfo.setAddressUrl(warehousingOrder1.getAddressUrl());
                     expenseInfoService.insert(expenseInfo);
                     //全部付款
                     warehousingOrder1.setAmountNotPayable(warehousingOrder1.getAmountNotPayable() - warehousingOrder1.getRequestFunds());
@@ -1668,6 +1680,7 @@ public class WarehousingOrderServiceImpl extends ServiceImpl<WarehousingOrderMap
                 expenseInfo.setContractNo(warehousingOrder1.getContractNo());
                 expenseInfo.setAgent(AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getStaffName());
                 expenseInfo.setUnallocatedAmount(0d);
+                expenseInfo.setCreateUserId(createUserId);
                 expenseInfoService.insert(expenseInfo);
                 // 先删除任务
                 noticeService.removeNotice(BaseNotice.NoticeStatus.TASK, "WAREHOUSING-ORDER-APPROVE",