Quellcode durchsuchen

修改认领逻辑

cgp vor 2 Tagen
Ursprung
Commit
ad077b275c

+ 17 - 3
fs-service/src/main/java/com/fs/qw/service/impl/FsCompanyCustomerServiceImpl.java

@@ -285,7 +285,7 @@ public class FsCompanyCustomerServiceImpl implements IFsCompanyCustomerService {
         }
 
         // 执行认领逻辑
-        performClaim(oldCustomer, companyUser, fsCompanyCustomer.getKdzlAddWechatStatus());
+        performClaim(oldCustomer, companyUser, fsCompanyCustomer.getKdzlAddWechatStatus(),fsCompanyCustomer);
         return 1; // 成功返回1
     }
 
@@ -557,7 +557,7 @@ public class FsCompanyCustomerServiceImpl implements IFsCompanyCustomerService {
         setCompleteStatus(oldCustomer);
 
         // 5. 执行认领核心逻辑(加微状态默认=1)
-        performClaim(oldCustomer, user, 1);
+        performClaim(oldCustomer, user, 1,null);
 
         return 1;
     }
@@ -568,7 +568,7 @@ public class FsCompanyCustomerServiceImpl implements IFsCompanyCustomerService {
      * @param companyUser     当前操作销售
      * @param addWechatStatus 加微状态(1-已加,0-未加)
      */
-    private void performClaim(FsCompanyCustomer customer, CompanyUser companyUser, Integer addWechatStatus) {
+    private void performClaim(FsCompanyCustomer customer, CompanyUser companyUser, Integer addWechatStatus,FsCompanyCustomer newCustomer) {
         if (companyUser == null) {
             throw new CustomException("登录信息已过期,请重新登录");
         }
@@ -623,6 +623,20 @@ public class FsCompanyCustomerServiceImpl implements IFsCompanyCustomerService {
             //若提交的号码是脱敏的号码,则不需要更新号码
             customer.setPhone(null);
         }
+        if (newCustomer!=null){
+            if (StringUtils.isNotBlank(newCustomer.getPatientMainComplaint())){
+                customer.setPatientMainComplaint(newCustomer.getPatientMainComplaint());
+            }
+            if (StringUtils.isNotBlank(newCustomer.getPresentIllness())){
+                customer.setPresentIllness(newCustomer.getPresentIllness());
+            }
+            if (StringUtils.isNotBlank(newCustomer.getCurrentMedication())){
+                customer.setCurrentMedication(newCustomer.getCurrentMedication());
+            }
+            if (StringUtils.isNotBlank(newCustomer.getAllergyHistory())){
+                customer.setAllergyHistory(newCustomer.getAllergyHistory());
+            }
+        }
         setCompleteStatus(customer);
         fsCompanyCustomerMapper.updateFsCompanyCustomer(customer);
     }