浏览代码

医保日志添加psnNo字段

lighter 3 年之前
父节点
当前提交
a813763c62

+ 1 - 4
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiLogDao.java

@@ -12,7 +12,7 @@ import thyyxxk.webserver.entity.medicalinsurance.log.SiLog;
 public interface SiLogDao extends BaseMapper<SiLog> {
 
     @Select("<script>" +
-            "select msgid,infno,insuplc_admdvs,opter, " +
+            "select msgid,infno,insuplc_admdvs,opter,psn_no, " +
             "create_datetime,pat_no,times,infcode from t_si_log " +
             "where log_type=#{ftclg.logType} " +
             "<if test=\"ftclg.infno!=null and ftclg.infno!=''\">" +
@@ -28,9 +28,6 @@ public interface SiLogDao extends BaseMapper<SiLog> {
     IPage<SiLog> selectSiLogs(IPage<SiLog> iPage,
                               @Param("ftclg") FetchLog ftclg);
 
-    @Select("select rtrim(name) from a_employee_mi where code=#{code}")
-    String selectUserName(@Param("code") String code);
-
     @Select("<script>" +
             "select count(1) from t_si_log " +
             "where log_type=#{ftclg.logType} and infcode=0 " +

+ 7 - 1
src/main/java/thyyxxk/webserver/entity/medicalinsurance/log/SiLog.java

@@ -89,10 +89,15 @@ public class SiLog implements Serializable {
 	 * */
 	private Integer infcode;
 
+	/**
+	 * 人员编号
+	 * */
+	private String psnNo;
+
 	public SiLog() {
 	}
 
-	public SiLog(JSONObject input, JSONObject result, String patNo, Integer times, Integer ledgerSn, Integer infcode) {
+	public SiLog(JSONObject input, JSONObject result, String patNo, Integer times, Integer ledgerSn, Integer infcode, String psnNo) {
 		if (null != result) {
 			setResult(result.toJSONString());
 		}
@@ -106,5 +111,6 @@ public class SiLog implements Serializable {
 		setLedgerSn(ledgerSn);
 		setLogType(1);
 		setInfcode(infcode);
+		setPsnNo(psnNo);
 	}
 }

+ 3 - 2
src/main/java/thyyxxk/webserver/service/medicalinsurance/SetlListUpldService.java

@@ -61,7 +61,8 @@ public class SetlListUpldService {
     private final SendWxInfoService sendWxInfoService;
     private final SiLogDao logDao;
 
-    public SetlListUpldService(ExecService exec, SiQueryDao queryDao, UpIdCollectionDao upIdCollectionDao, DismissDao dismissDao, PublicServer publicServer, SendWxInfoService sendWxInfoService, SiLogDao logDao) {
+    public SetlListUpldService(ExecService exec, SiQueryDao queryDao, UpIdCollectionDao upIdCollectionDao,
+                               DismissDao dismissDao, PublicServer publicServer, SendWxInfoService sendWxInfoService, SiLogDao logDao) {
         this.exec = exec;
         this.queryDao = queryDao;
         this.dao = upIdCollectionDao;
@@ -126,7 +127,7 @@ public class SetlListUpldService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(jsonObject, result, patNo, times, ledgerSn, infcode));
+        logDao.insert(new SiLog(jsonObject, result, patNo, times, ledgerSn, infcode, null));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, String.format("医保中心报错:【%s】 ", result.getString("message")));
         }

+ 5 - 11
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiLogService.java

@@ -10,6 +10,7 @@ import thyyxxk.webserver.dao.his.medicalinsurance.SiLogDao;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.medicalinsurance.log.FetchLog;
 import thyyxxk.webserver.entity.medicalinsurance.log.SiLog;
+import thyyxxk.webserver.service.redislike.RedisLikeService;
 import thyyxxk.webserver.utils.ResultVoUtil;
 
 import java.text.NumberFormat;
@@ -20,12 +21,12 @@ import java.util.Map;
 @Service
 public class SiLogService {
     private final SiLogDao dao;
-    private final Map<String, String> userMap;
+    private final RedisLikeService redis;
 
     @Autowired
-    public SiLogService(SiLogDao dao) {
+    public SiLogService(SiLogDao dao, RedisLikeService redis) {
         this.dao = dao;
-        userMap = new HashMap<>();
+        this.redis = redis;
     }
 
     public ResultVo<Map<String, Object>> selectSiLogs(FetchLog ftchlg) {
@@ -39,14 +40,7 @@ public class SiLogService {
         List<SiLog> list = iPage.getRecords();
         for (SiLog siLog : list) {
             siLog.setInfname(SiFunction.getName(siLog.getInfno()));
-            String userid = siLog.getOpter();
-            if (userMap.containsKey(userid)) {
-                siLog.setOpterName(userMap.get(userid));
-            } else {
-                String username = dao.selectUserName(userid);
-                siLog.setOpterName(username);
-                userMap.put(userid, username);
-            }
+            siLog.setOpterName(redis.getEmployeeName(siLog.getOpter()));
         }
         map.put("list", list);
         if (null != ftchlg.getNeedCalTips() && ftchlg.getNeedCalTips()) {

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

@@ -79,7 +79,7 @@ public class SiManageService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, null, null, null, infcode));
+        logDao.insert(new SiLog(input, result, null, null, null, infcode, null));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
@@ -105,7 +105,7 @@ public class SiManageService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, null, null, null, infcode));
+        logDao.insert(new SiLog(input, result, null, null, null, infcode, null));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
@@ -148,7 +148,7 @@ public class SiManageService {
         JSONObject result = exec.executeTrade(input, SiFunction.AUTO_RECOVERY_TRADE);
         log.info("【操作员:{}】,冲正交易:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, null, null, null, infcode));
+        logDao.insert(new SiLog(input, result, null, null, null, infcode, atoRcvTrd.getPsnNo()));
         return SiUtil.makeReturnWithoutOutput(result, "冲正成功。");
     }
 

+ 6 - 7
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiPsnRcdService.java

@@ -1,7 +1,6 @@
 package thyyxxk.webserver.service.medicalinsurance;
 
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -60,7 +59,7 @@ public class SiPsnRcdService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, null, null, null, infcode));
+        logDao.insert(new SiLog(input, result, null, null, null, infcode, trsHspRcd.getPsnNo()));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
@@ -94,7 +93,7 @@ public class SiPsnRcdService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, null, null, null, infcode));
+        logDao.insert(new SiLog(input, result, null, null, null, infcode, rvkPsnRcd.getPsnNo()));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
@@ -117,7 +116,7 @@ public class SiPsnRcdService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, null, null, null, infcode));
+        logDao.insert(new SiLog(input, result, null, null, null, infcode, slwSpcDiseRcd.getPsnNo()));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
@@ -151,7 +150,7 @@ public class SiPsnRcdService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, null, null, null, infcode));
+        logDao.insert(new SiLog(input, result, null, null, null, infcode, rvkPsnRcd.getPsnNo()));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
@@ -174,7 +173,7 @@ public class SiPsnRcdService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, null, null, null, infcode));
+        logDao.insert(new SiLog(input, result, null, null, null, infcode, psnAgnRcd.getPsnNo()));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
@@ -208,7 +207,7 @@ public class SiPsnRcdService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, null, null, null, infcode));
+        logDao.insert(new SiLog(input, result, null, null, null, infcode, rvkPsnRcd.getPsnNo()));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }

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

@@ -136,7 +136,7 @@ public class SiZyService {
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
-        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode, admMdtrtinfo.getPsnNo()));
         if (result.getIntValue(RESULT_CODE) == 0) {
             JSONObject output = result.getJSONObject(OUTPUT);
             String mdtrtId = output.getJSONObject("result").getString("mdtrt_id");
@@ -182,7 +182,7 @@ public class SiZyService {
         JSONObject result = exec.executeTrade(input, SiFunction.MODIFY_ADMISSION_INFO);
         log.info("【操作员:{}】,入院信息变更:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode, siPatInfo.getPsnNo()));
         return SiUtil.makeReturnWithoutOutput(result, "变更住院信息成功。");
     }
 
@@ -203,7 +203,7 @@ public class SiZyService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode, siPatInfo.getPsnNo()));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
@@ -239,7 +239,7 @@ public class SiZyService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode, preSetlmt.getPsnNo()));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
@@ -282,7 +282,7 @@ public class SiZyService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode, siPatInfo.getPsnNo()));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
@@ -340,7 +340,7 @@ public class SiZyService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode, dscginfo.getPsnNo()));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
@@ -369,7 +369,7 @@ public class SiZyService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode, siPatInfo.getPsnNo()));
         if (null == infcode) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
@@ -435,7 +435,7 @@ public class SiZyService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode, preSetlmt.getPsnNo()));
         if (null == infcode) {
             revokeDischarge(p);
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
@@ -513,7 +513,7 @@ public class SiZyService {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
         Integer infcode = result.getInteger(RESULT_CODE);
-        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode));
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode, siPatInfo.getPsnNo()));
         if (null == infcode) {
             return revokeDischarge(p);
         }