Browse Source

结算单上传

xiaochan 3 years ago
parent
commit
161a1ee4c7

+ 0 - 13
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/UpIdCollectionDao.java

@@ -222,19 +222,6 @@ public interface UpIdCollectionDao {
             "where zyh = #{patNo} and zycs = #{times} " + "order by ssxh")
     List<OprninfoUpld> oprninfoUplds(@Param("patNo") String patNo, @Param("times") Integer times, @Param("tableName") String tableName);
 
-    @Select("select dise_code, dise_name " +
-            "from t_si_pat_info " +
-            "where pat_no = #{patNo} " +
-            "and times = #{times}")
-    List<OpspdiseinfoUpld> outpatientChronicDisease(@Param("patNo") String patNo,
-                                                    @Param("times") Integer times);
-
-    @Select("select insuplc_admdvs,insutype,med_type from t_si_pat_info " + "where pat_no = #{patNo} and times = #{times} and ledger_sn = #{ledgerSn}")
-    SiPatInfo huoQuZhiFuFangShi(@Param("patNo") String patNo, @Param("times") Integer times, @Param("ledgerSn") Integer ledgerSn);
-
-    @Update("update t_si_setlinfo set hi_paymtd = #{hiPaymtd} where pat_no = #{patNo} and times = #{times} and ledger_sn = #{ledgerSn}")
-    void genXingYiBaoZhiFuFangShi(@Param("patNo") String patNo, @Param("times") Integer times, @Param("ledgerSn") Integer ledgerSn, @Param("hiPaymtd") Integer hiPaymtd);
-
     @Select("select receipt_no from zy_receipt where inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn=#{ledgerSn} and receipt_no<>'0000000'" + "and receipt_sn = 1")
     String billNo(@Param("patNo") String patNo, @Param("times") Integer times, @Param("ledgerSn") Integer ledgerSn);
 

+ 1 - 3
src/main/java/thyyxxk/webserver/entity/medicalinsurance/setllistupld/SetlinfoUpld.java

@@ -3,9 +3,7 @@ package thyyxxk.webserver.entity.medicalinsurance.setllistupld;
 import com.alibaba.fastjson.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
-import lombok.experimental.Accessors;
 import org.springframework.format.annotation.DateTimeFormat;
-import thyyxxk.webserver.utils.StringUtil;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -16,7 +14,6 @@ import java.util.Date;
  * @author Administrator
  */
 @Data
-//@Accessors(chain = true)
 public class SetlinfoUpld implements Serializable {
     private static final long serialVersionUID = 2704605758808060437L;
     /**
@@ -184,6 +181,7 @@ public class SetlinfoUpld implements Serializable {
      */
     @JSONField(name = "hi_type")
     private String hiType;
+
     /**
      * 参保地
      */

+ 15 - 4
src/main/java/thyyxxk/webserver/service/medicalinsurance/SetlListUpldService.java

@@ -35,6 +35,7 @@ import thyyxxk.webserver.entity.querydata.JieSuanDanChaXun;
 import thyyxxk.webserver.entity.querydata.SiSetlinfoTemp;
 import thyyxxk.webserver.service.PublicServer;
 import thyyxxk.webserver.service.casefrontsheet.CaseFrontSheetService;
+import thyyxxk.webserver.service.redislike.RedisLikeService;
 import thyyxxk.webserver.service.wxapi.SendWxInfoService;
 import thyyxxk.webserver.utils.*;
 import thyyxxk.webserver.websocket.WebSocketServer;
@@ -70,8 +71,9 @@ public class SetlListUpldService {
     private final SendWxInfoService sendWxInfoService;
     private final SiLogDao logDao;
     private final CaseFrontSheetService caseFrontSheetService;
+    private final RedisLikeService redisLikeService;
 
-    public SetlListUpldService(ExecService exec, SiQueryDao queryDao, UpIdCollectionDao upIdCollectionDao, DismissDao dismissDao, PublicServer publicServer, SendWxInfoService sendWxInfoService, SiLogDao logDao, CaseFrontSheetService caseFrontSheetService) {
+    public SetlListUpldService(ExecService exec, SiQueryDao queryDao, UpIdCollectionDao upIdCollectionDao, DismissDao dismissDao, PublicServer publicServer, SendWxInfoService sendWxInfoService, SiLogDao logDao, CaseFrontSheetService caseFrontSheetService, RedisLikeService redisLikeService) {
         this.exec = exec;
         this.queryDao = queryDao;
         this.dao = upIdCollectionDao;
@@ -80,6 +82,7 @@ public class SetlListUpldService {
         this.sendWxInfoService = sendWxInfoService;
         this.logDao = logDao;
         this.caseFrontSheetService = caseFrontSheetService;
+        this.redisLikeService = redisLikeService;
     }
 
 
@@ -102,7 +105,8 @@ public class SetlListUpldService {
                 throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, "患者联系人姓名不能为空。");
             }
         }
-        if (StringUtil.notBlank(upldCollection.getData().getSetlinfo().getHiType()) && upldCollection.getData().getSetlinfo().getHiType().trim().equals("310")) {
+        if (StringUtil.notBlank(upldCollection.getData().getSetlinfo().getHiType())
+                && upldCollection.getData().getSetlinfo().getHiType().trim().equals("310")) {
             if (StringUtil.isBlank(upldCollection.getData().getSetlinfo().getEmpAddr()) || StringUtil.isBlank(upldCollection.getData().getSetlinfo().getEmpName())) {
                 throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, "结算清单中职工参保人的单位及地址不能为空。");
             }
@@ -283,7 +287,6 @@ public class SetlListUpldService {
         for (int i = 0; i < diseinfos.size(); i++) {
             diseinfos.get(i).setMaindiagFlag(i == 0 ? "1" : "0");
         }
-        // TODO 在这里判断患者的工作单位和地址 没有就用现住址
         // 新生儿入院类型写死为1
         if (StringUtil.notBlank(setlinfoUpld.getNwbBirWt())) {
             setlinfoUpld.setNwbAdmType("1");
@@ -292,6 +295,14 @@ public class SetlListUpldService {
         if (isFertilitySign) {
             setlinfoUpld.setHiPaymtd("1");
         }
+        if ("310".equals(setlinfoUpld.getHiType())) {
+            if (StringUtil.isBlank(setlinfoUpld.getEmpAddr())) {
+                setlinfoUpld.setEmpAddr(setlinfoUpld.getCurrAddr());
+            }
+            if (StringUtil.isBlank(setlinfoUpld.getEmpName())) {
+                setlinfoUpld.setEmpName("普通职工");
+            }
+        }
 
         UpldCollection upldCollection = new UpldCollection();
         // 患者的基本信息
@@ -432,7 +443,7 @@ public class SetlListUpldService {
         // 特殊人员类型
         temp.getSetlinfo().setSpPsnTypeName(PsnIdetType.getName(temp.getSetlinfo().getSpPsnType()));
         // 参保地
-        temp.getSetlinfo().setInsuplcName(dao.getInsuplcName(temp.getSetlinfo().getInsuplc()));
+        temp.getSetlinfo().setInsuplcName(redisLikeService.getRegionName(temp.getSetlinfo().getInsuplc()));
         //入院科别
         temp.getSetlinfo().setAdmCatyName(dao.getYbDeptName(temp.getSetlinfo().getAdmCaty()));
         // 转科科别

+ 3 - 10
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiZyService.java

@@ -22,10 +22,7 @@ import thyyxxk.webserver.service.externalhttp.SiZySrvc;
 import thyyxxk.webserver.service.yibao.DismissService;
 import thyyxxk.webserver.utils.*;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * @description: 住院医保交易
@@ -493,12 +490,8 @@ public class SiZyService {
 
     private int calculateHiPaymtd(String insuplcAdmdvs, String insutype, String medType) {
         int hiPaymtd = 3;
-        List<String> insuplcAdmdvses = new ArrayList<>();
-        insuplcAdmdvses.add("430121");
-        insuplcAdmdvses.add("430181");
-        List<String> insutypes = new ArrayList<>();
-        insutypes.add("340");
-        insutypes.add("350");
+        List<String> insuplcAdmdvses = new ArrayList<>(Collections.singletonList("430121,430181"));
+        List<String> insutypes = new ArrayList<>(Collections.singletonList("340,350"));
         if (medType.equals("2101") || medType.equals("22")) {
             if (!insuplcAdmdvs.startsWith("4301") || insuplcAdmdvses.contains(insuplcAdmdvs) || insutypes.contains(insutype)) {
                 hiPaymtd = 1;