Browse Source

匹配项目时同步项目内涵等内容。

lighter 3 years ago
parent
commit
19f79fccb2

+ 8 - 6
src/main/java/thyyxxk/webserver/dao/his/dictionary/NationalMatchDao.java

@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.apache.ibatis.annotations.Update;
+import thyyxxk.webserver.entity.dictionary.ChargeItemMatch;
 import thyyxxk.webserver.entity.nationalmatch.*;
 
 import java.util.List;
@@ -117,13 +118,14 @@ public interface NationalMatchDao {
                                 @Param("nationalCode") String nationalCode,
                                 @Param("nationalName") String nationalName);
 
+    @Select("select code as nationalCode,descriptions,exclude_content,connotation from t_si_dl_mdcn_srvc where code=#{code}")
+    ChargeItemMatch selectServiceAbout(@Param("code") String code);
+
     @Update("update zd_charge_item set national_status=1,national_code=#{nationalCode}," +
-            "national_name=#{nationalName},match_oper=#{staffId},match_date=getdate() " +
-            "where code=#{code}")
-    void matchServcieAndSupply(@Param("code") String code,
-                               @Param("staffId") String staffId,
-                               @Param("nationalCode") String nationalCode,
-                               @Param("nationalName") String nationalName);
+            "national_name=#{nationalName},match_oper=#{staffId},match_date=getdate(), " +
+            "descriptions=#{descriptions},exclude_content=#{excludeContent},connotation=#{connotation} " +
+            "where code=#{hisCode}")
+    void matchServcieAndSupply(ChargeItemMatch chargeItemMatch);
 
     @Update("update yp_zd_dict set national_status=0,national_code='',national_name='',cancel_match_oper=#{staffId}," +
             "cancel_match_date=getdate() where code=#{code} and serial=#{serial}")

+ 14 - 0
src/main/java/thyyxxk/webserver/entity/dictionary/ChargeItemMatch.java

@@ -0,0 +1,14 @@
+package thyyxxk.webserver.entity.dictionary;
+
+import lombok.Data;
+
+@Data
+public class ChargeItemMatch {
+    private String descriptions;
+    private String excludeContent;
+    private String connotation;
+    private String nationalCode;
+    private String nationalName;
+    private String staffId;
+    private String hisCode;
+}

+ 6 - 1
src/main/java/thyyxxk/webserver/service/dictionary/NationalMatchService.java

@@ -10,6 +10,7 @@ import thyyxxk.webserver.constants.Capacity;
 import thyyxxk.webserver.constants.NationalMatchType;
 import thyyxxk.webserver.dao.his.dictionary.NationalMatchDao;
 import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.dictionary.ChargeItemMatch;
 import thyyxxk.webserver.entity.nationalmatch.*;
 import thyyxxk.webserver.utils.ResultVoUtil;
 import thyyxxk.webserver.utils.StringUtil;
@@ -120,7 +121,11 @@ public class NationalMatchService {
         if (param.getType() < NationalMatchType.SERVICE) {
             dao.matchMedicineAndHerbal(param.getCode(), staffId, param.getNationalCode(), param.getNationalName());
         } else {
-            dao.matchServcieAndSupply(param.getCode(), staffId, param.getNationalCode(), param.getNationalName());
+            ChargeItemMatch chargeItemMatch = dao.selectServiceAbout(param.getNationalCode());
+            chargeItemMatch.setHisCode(param.getCode());
+            chargeItemMatch.setStaffId(staffId);
+            chargeItemMatch.setNationalName(param.getNationalName());
+            dao.matchServcieAndSupply(chargeItemMatch);
         }
         log.info("【操作员:{}】匹配国家目录:{}", staffId, param);
         return ResultVoUtil.success("匹配成功。");