Jelajahi Sumber

修改
1、修改推送收款单逻辑
2、修改轮候模块

liangwenxuan 3 bulan lalu
induk
melakukan
06c743c597

+ 1 - 3
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java

@@ -669,9 +669,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
         String key = taskDefinitionKey.toLowerCase();
         String key = taskDefinitionKey.toLowerCase();
         if ("first_approve".equals(key)) {
         if ("first_approve".equals(key)) {
             reqVO.setIsPsychosis("否");
             reqVO.setIsPsychosis("否");
-            if (reqVO.getNurseLevelId() != null || StrUtil.isNotBlank(reqVO.getRemark())) {
-                checkInWaitApi.updateThirdReviewInfo(reqVO);
-            }
+            checkInWaitApi.updateFirstReviewInfo(reqVO);
             checkInWaitApi.updateCheckInWaitStatusByBusinessId(businessForm.getBusinessId(),
             checkInWaitApi.updateCheckInWaitStatusByBusinessId(businessForm.getBusinessId(),
                     BpmCheckInWaitStatusEnum.FIRST_APPROVAL_PASSED_WAIT_SECOND_APPROVAL.getStatus());
                     BpmCheckInWaitStatusEnum.FIRST_APPROVAL_PASSED_WAIT_SECOND_APPROVAL.getStatus());
             return;
             return;

+ 17 - 0
yudao-module-bpm/yudao-module-bpm-biz/src/main/resources/mapper/BpmBusinessFormMapper.xml

@@ -293,6 +293,23 @@
         <foreach collection="processInstanceIds" item="processInstanceId" open="(" separator="," close=")">
         <foreach collection="processInstanceIds" item="processInstanceId" open="(" separator="," close=")">
             #{processInstanceId}
             #{processInstanceId}
         </foreach>
         </foreach>
+
+        UNION ALL
+
+        SELECT
+        CONCAT(st.id, '') AS tenantId,
+        st.name AS tenantName,
+        ciw.elder_name,
+        bbf.process_instance_id
+        FROM
+        bpm_business_form bbf
+        INNER JOIN elderly_check_in_wait ciw ON bbf.business_id2 = ciw.id
+        INNER JOIN system_tenant st ON ciw.tenant_id = st.id
+        WHERE
+        bbf.process_instance_id IN
+        <foreach collection="processInstanceIds" item="processInstanceId" open="(" separator="," close=")">
+            #{processInstanceId}
+        </foreach>
     </select>
     </select>
 
 
     <select id="getReadList" resultType="cn.iocoder.yudao.module.bpm.controller.admin.task.vo.elderly.BpmElderlyInfoVO">
     <select id="getReadList" resultType="cn.iocoder.yudao.module.bpm.controller.admin.task.vo.elderly.BpmElderlyInfoVO">

+ 4 - 0
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/kingdee/dto/ReceiveBillSaveEntryDTO.java

@@ -109,6 +109,10 @@ public class ReceiveBillSaveEntryDTO {
      * 费用编码
      * 费用编码
      */
      */
     private KingdeeNumberDTO FCOSTID;
     private KingdeeNumberDTO FCOSTID;
+    /**
+     * 费用编码
+     */
+    private KingdeeNumberDTO F_PAEZ_Base;
 
 
     /**
     /**
      * 备注
      * 备注

+ 1 - 0
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/kingdee/dto/ReceiveBillSaveModelDTO.java

@@ -53,6 +53,7 @@ public class ReceiveBillSaveModelDTO {
 
 
 
 
     private String FCancelStatus;
     private String FCancelStatus;
+    private String FREMARK;
 
 
     private KingdeeNumberDTO FSETTLEMAINBOOKID;
     private KingdeeNumberDTO FSETTLEMAINBOOKID;
 
 

+ 13 - 16
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/bpm/BpmCheckInWaitApiImpl.java

@@ -7,11 +7,7 @@ import cn.iocoder.yudao.module.system.api.bpm.vo.CheckInWaitApiPageReqVO;
 import cn.iocoder.yudao.module.system.api.bpm.vo.CheckInWaitCreateReqVO;
 import cn.iocoder.yudao.module.system.api.bpm.vo.CheckInWaitCreateReqVO;
 import cn.iocoder.yudao.module.system.api.bpm.vo.CheckInWaitRecordRespVO;
 import cn.iocoder.yudao.module.system.api.bpm.vo.CheckInWaitRecordRespVO;
 import cn.iocoder.yudao.module.system.api.bpm.vo.CheckInWaitSupplementReqVO;
 import cn.iocoder.yudao.module.system.api.bpm.vo.CheckInWaitSupplementReqVO;
-import cn.iocoder.yudao.module.system.dal.dataobject.biz.BuildBedDO;
-import cn.iocoder.yudao.module.system.dal.dataobject.biz.BuildDO;
-import cn.iocoder.yudao.module.system.dal.dataobject.biz.BuildFloorDO;
-import cn.iocoder.yudao.module.system.dal.dataobject.biz.BuildRoomDO;
-import cn.iocoder.yudao.module.system.dal.dataobject.biz.ElderlyCheckInWaitDO;
+import cn.iocoder.yudao.module.system.dal.dataobject.biz.*;
 import cn.iocoder.yudao.module.system.dal.mysql.biz.BuildBedMapper;
 import cn.iocoder.yudao.module.system.dal.mysql.biz.BuildBedMapper;
 import cn.iocoder.yudao.module.system.dal.mysql.biz.BuildFloorMapper;
 import cn.iocoder.yudao.module.system.dal.mysql.biz.BuildFloorMapper;
 import cn.iocoder.yudao.module.system.dal.mysql.biz.BuildMapper;
 import cn.iocoder.yudao.module.system.dal.mysql.biz.BuildMapper;
@@ -19,9 +15,11 @@ import cn.iocoder.yudao.module.system.dal.mysql.biz.BuildRoomMapper;
 import cn.iocoder.yudao.module.system.dal.mysql.biz.ElderlyCheckInWaitMapper;
 import cn.iocoder.yudao.module.system.dal.mysql.biz.ElderlyCheckInWaitMapper;
 import cn.iocoder.yudao.module.system.dal.mysql.biz.NurseLevelMapper;
 import cn.iocoder.yudao.module.system.dal.mysql.biz.NurseLevelMapper;
 import cn.iocoder.yudao.module.system.enums.change.BusinessTypeEnum;
 import cn.iocoder.yudao.module.system.enums.change.BusinessTypeEnum;
+import cn.iocoder.yudao.module.system.service.biz.BuildService;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.validation.annotation.Validated;
 
 
@@ -42,17 +40,9 @@ public class BpmCheckInWaitApiImpl implements BpmCheckInWaitApi {
     @Resource
     @Resource
     private NurseLevelMapper nurseLevelMapper;
     private NurseLevelMapper nurseLevelMapper;
 
 
-    @Resource
-    private BuildMapper buildMapper;
-
-    @Resource
-    private BuildFloorMapper buildFloorMapper;
+    @Autowired
+    private BuildService buildService;
 
 
-    @Resource
-    private BuildRoomMapper buildRoomMapper;
-
-    @Resource
-    private BuildBedMapper buildBedMapper;
 
 
     @Override
     @Override
     public Long createCheckInWait(CheckInWaitCreateReqVO reqVO) {
     public Long createCheckInWait(CheckInWaitCreateReqVO reqVO) {
@@ -102,6 +92,9 @@ public class BpmCheckInWaitApiImpl implements BpmCheckInWaitApi {
         ElderlyCheckInWaitDO updateDO = new ElderlyCheckInWaitDO();
         ElderlyCheckInWaitDO updateDO = new ElderlyCheckInWaitDO();
         updateDO.setId(businessId);
         updateDO.setId(businessId);
         updateDO.setStatus(status);
         updateDO.setStatus(status);
+        if(status == 11){
+            updateDO.setIsPsychosis("是");
+        }
         return checkInWaitMapper.updateById(updateDO);
         return checkInWaitMapper.updateById(updateDO);
     }
     }
 
 
@@ -133,7 +126,11 @@ public class BpmCheckInWaitApiImpl implements BpmCheckInWaitApi {
     @Override
     @Override
     public JSONObject selectById(Long id) {
     public JSONObject selectById(Long id) {
         ElderlyCheckInWaitDO elderlyCheckInWaitDO = checkInWaitMapper.selectById(id);
         ElderlyCheckInWaitDO elderlyCheckInWaitDO = checkInWaitMapper.selectById(id);
-        return (JSONObject) JSONObject.toJSON(elderlyCheckInWaitDO);
+        JSONObject result = (JSONObject) JSONObject.toJSON(elderlyCheckInWaitDO);
+        result.put("bedName",buildService.getFullBedNameByBedId(elderlyCheckInWaitDO.getBedId()));
+        NurseLevelDO nurseLevelDO = nurseLevelMapper.selectById(elderlyCheckInWaitDO.getNurseLevelId());
+        result.put("nurseLevelName", nurseLevelDO == null ? "" : nurseLevelDO.getNurseLevelName());
+        return result;
     }
     }
 
 
     @Override
     @Override

+ 14 - 8
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/kingdee/KingdeeApiImpl.java

@@ -355,37 +355,41 @@ public class KingdeeApiImpl implements KingdeeApi {
                 msg.append(elderlyInfoDO.getElderName()).append(",").append(expenseOrderDO.getBillingMonth()).append("账单无可推送收款明细<br/>");
                 msg.append(elderlyInfoDO.getElderName()).append(",").append(expenseOrderDO.getBillingMonth()).append("账单无可推送收款明细<br/>");
                 continue;
                 continue;
             }
             }
-
+            String remark = "";
             boolean allSuccess = true;
             boolean allSuccess = true;
             try {
             try {
                 if (needPushNormal) {
                 if (needPushNormal) {
+                    YearMonth billingMonth = YearMonth.parse(expenseOrderDO.getBillingMonth());
+                    remark = "生活费" + billingMonth.getMonthValue() + "月";
                     List<ReceiveBillSaveEntryDTO> normalEntryList = Collections.singletonList(
                     List<ReceiveBillSaveEntryDTO> normalEntryList = Collections.singletonList(
-                            buildReceiveBillEntry(FACCOUNTID, payTimeStr, normalAmount, "CI001", "SFKYT01_SYS", "长者生活费")
+                            buildReceiveBillEntry(FACCOUNTID, payTimeStr, normalAmount, "CI001", "SFKYT01_SYS", remark)
                     );
                     );
                     String billId = pushReceiveBill(tenantId, elderId, expenseOrderDO.getBillOrderNumber(), baseBillNo,
                     String billId = pushReceiveBill(tenantId, elderId, expenseOrderDO.getBillOrderNumber(), baseBillNo,
-                            "SKDLX02_SYS", kingedeeTenantId, kingedeeCustomerId, payTimeStr, currency, normalEntryList);
+                            "SKDLX01_SYS", kingedeeTenantId, kingedeeCustomerId, payTimeStr, currency, normalEntryList,remark);
                     if (StringUtils.isBlank(billId)) {
                     if (StringUtils.isBlank(billId)) {
                         allSuccess = false;
                         allSuccess = false;
                     }
                     }
                 }
                 }
 
 
                 if (needPushFacility) {
                 if (needPushFacility) {
+                    remark = "一次性设施购置费";
                     List<ReceiveBillSaveEntryDTO> facilityEntryList = Collections.singletonList(
                     List<ReceiveBillSaveEntryDTO> facilityEntryList = Collections.singletonList(
-                            buildReceiveBillEntry(FACCOUNTID, payTimeStr, facilityAmount, "CI005", "SFKYT02_SYS", "设施费")
+                            buildReceiveBillEntry(FACCOUNTID, payTimeStr, facilityAmount, "CI005", "SFKYT02_SYS", remark)
                     );
                     );
                     String billId = pushReceiveBill(tenantId, elderId, expenseOrderDO.getBillOrderNumber() + "-SSF", baseBillNo + "-SSF",
                     String billId = pushReceiveBill(tenantId, elderId, expenseOrderDO.getBillOrderNumber() + "-SSF", baseBillNo + "-SSF",
-                            "SKDLX01_SYS", kingedeeTenantId, kingedeeCustomerId, payTimeStr, currency, facilityEntryList);
+                            "SKDLX01_SYS", kingedeeTenantId, kingedeeCustomerId, payTimeStr, currency, facilityEntryList,remark);
                     if (StringUtils.isBlank(billId)) {
                     if (StringUtils.isBlank(billId)) {
                         allSuccess = false;
                         allSuccess = false;
                     }
                     }
                 }
                 }
 
 
                 if (needPushDeposit) {
                 if (needPushDeposit) {
+                    remark = "医疗押金";
                     List<ReceiveBillSaveEntryDTO> depositEntryList = Collections.singletonList(
                     List<ReceiveBillSaveEntryDTO> depositEntryList = Collections.singletonList(
-                            buildReceiveBillEntry(FACCOUNTID, payTimeStr, depositAmount, "CI002", "SFKYT41_SYS", "押金")
+                            buildReceiveBillEntry(FACCOUNTID, payTimeStr, depositAmount, "CI002", "SFKYT41_SYS", remark)
                     );
                     );
                     String billId = pushReceiveBill(tenantId, elderId, expenseOrderDO.getBillOrderNumber() + "-YJ", baseBillNo + "-YJ",
                     String billId = pushReceiveBill(tenantId, elderId, expenseOrderDO.getBillOrderNumber() + "-YJ", baseBillNo + "-YJ",
-                            "SKDLX02_SYS", kingedeeTenantId, kingedeeCustomerId, payTimeStr, currency, depositEntryList);
+                            "SKDLX02_SYS", kingedeeTenantId, kingedeeCustomerId, payTimeStr, currency, depositEntryList,remark);
                     if (StringUtils.isBlank(billId)) {
                     if (StringUtils.isBlank(billId)) {
                         allSuccess = false;
                         allSuccess = false;
                     }
                     }
@@ -433,13 +437,14 @@ public class KingdeeApiImpl implements KingdeeApi {
                 .FWRITTENOFFTAXAMOUNTFOR(amount)
                 .FWRITTENOFFTAXAMOUNTFOR(amount)
                 .FWRITTENOFFTAXAMOUNT(amount)
                 .FWRITTENOFFTAXAMOUNT(amount)
                 .FCOSTID(KingdeeNumberDTO.builder().FNUMBER(costId).build())
                 .FCOSTID(KingdeeNumberDTO.builder().FNUMBER(costId).build())
+                .F_PAEZ_Base(KingdeeNumberDTO.builder().FNUMBER(costId).build())
                 .FCOMMENT(comment)
                 .FCOMMENT(comment)
                 .build();
                 .build();
     }
     }
 
 
     private String pushReceiveBill(Long tenantId, Long elderId, String recordBillNo, String kdBillNo,
     private String pushReceiveBill(Long tenantId, Long elderId, String recordBillNo, String kdBillNo,
                                    String billTypeId, String kingedeeTenantId, String kingedeeCustomerId, String payTimeStr,
                                    String billTypeId, String kingedeeTenantId, String kingedeeCustomerId, String payTimeStr,
-                                   String currency, List<ReceiveBillSaveEntryDTO> entryList) throws Exception {
+                                   String currency, List<ReceiveBillSaveEntryDTO> entryList,String remark) throws Exception {
         ReceiveBillSaveModelDTO saveModelDTO = ReceiveBillSaveModelDTO.builder()
         ReceiveBillSaveModelDTO saveModelDTO = ReceiveBillSaveModelDTO.builder()
                 .FID("")
                 .FID("")
                 .FBillNo(kdBillNo)
                 .FBillNo(kdBillNo)
@@ -459,6 +464,7 @@ public class KingdeeApiImpl implements KingdeeApi {
                 .FDOCUMENTSTATUS("Z")
                 .FDOCUMENTSTATUS("Z")
                 .FBUSINESSTYPE("FY")
                 .FBUSINESSTYPE("FY")
                 .FCancelStatus("A")
                 .FCancelStatus("A")
+                .FREMARK(remark)
                 .FSETTLEMAINBOOKID(KingdeeNumberDTO.builder().FNUMBER(currency).build())
                 .FSETTLEMAINBOOKID(KingdeeNumberDTO.builder().FNUMBER(currency).build())
                 .FRECEIVEBILLENTRY(entryList)
                 .FRECEIVEBILLENTRY(entryList)
                 .build();
                 .build();