Browse Source

重要医保日志入库。

lighter 3 năm trước cách đây
mục cha
commit
7f5bae4a91

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>10.9.3</version>
+    <version>10.9.4</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

+ 9 - 0
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiLogDao.java

@@ -0,0 +1,9 @@
+package thyyxxk.webserver.dao.his.medicalinsurance;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import thyyxxk.webserver.entity.medicalinsurance.SiLog;
+
+@Mapper
+public interface SiLogDao extends BaseMapper<SiLog> {
+}

+ 82 - 0
src/main/java/thyyxxk/webserver/entity/medicalinsurance/SiLog.java

@@ -0,0 +1,82 @@
+package thyyxxk.webserver.entity.medicalinsurance;
+
+import java.io.Serializable;
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+@Data
+@TableName("t_si_log")
+public class SiLog implements Serializable {
+
+	private static final long serialVersionUID =  3109706338397960444L;
+
+	/**
+	 * 报文ID
+	 */
+	@TableId(type=IdType.ASSIGN_UUID)
+	private String msgid;
+
+	/**
+	 * 功能号
+	 */
+	private String infno;
+
+	/**
+	 * 参保地医保区划
+	 */
+	private String insuplcAdmdvs;
+
+	/**
+	 * 经办人
+	 */
+	private String opter;
+
+	/**
+	 * 交易输入
+	 */
+	private String body;
+
+	/**
+	 * 交易输出
+	 */
+	private String result;
+
+	/**
+	 * 住院号/门诊号
+	 */
+	private String patNo;
+
+	/**
+	 * 住院/门诊次数
+	 */
+	private Integer times;
+
+	/**
+	 * 账页号
+	 */
+	private Integer ledgerSn;
+
+	/**
+	 * 日志类别:1-住院;2-门诊
+	 * */
+	private Integer logType;
+
+	public SiLog(JSONObject input, JSONObject result, String patNo, Integer times, Integer ledgerSn) {
+		if (null != result) {
+			setResult(result.toJSONString());
+		}
+		setBody(input.toJSONString());
+		setInfno(input.getString("infno"));
+		setInsuplcAdmdvs(input.getString("insuplc_admdvs"));
+		setMsgid(input.getString("msgid"));
+		setOpter(input.getString("opter"));
+		setPatNo(patNo);
+		setTimes(times);
+		setLedgerSn(ledgerSn);
+		setLogType(1);
+	}
+}

+ 2 - 1
src/main/java/thyyxxk/webserver/entity/medicalinsurance/download/SiDlDssDns.java

@@ -3,6 +3,7 @@ package thyyxxk.webserver.entity.medicalinsurance.download;
 import java.io.Serializable;
 
 import lombok.Data;
+import thyyxxk.webserver.utils.PingYinUtils;
 import thyyxxk.webserver.utils.SiUtil;
 
 @Data
@@ -164,6 +165,6 @@ public class SiDlDssDns implements Serializable {
 		dataUpdateTime = arr[21].trim();
 		versionNumber = arr[22].trim();
 		versionName = arr[23].trim();
-		pyCode = SiUtil.toJP(diagnosisName);
+		pyCode = PingYinUtils.getAllPinYinHeadChar(diagnosisName);
 	}
 }

+ 1 - 0
src/main/java/thyyxxk/webserver/service/externalhttp/SiMzSrvc.java

@@ -10,6 +10,7 @@ import thyyxxk.webserver.entity.medicalinsurance.query.SiPatInfo;
 import thyyxxk.webserver.entity.medicalinsurance.setlinfo.FundDetail;
 
 @BaseRequest(baseURL = "http://172.16.32.166:1100/mzFee")
+//@BaseRequest(baseURL = "http://localhost:1100/mzFee")
 public interface SiMzSrvc {
 
     @Post("/outpatientRegistration")

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

@@ -12,6 +12,7 @@ import org.springframework.transaction.annotation.Transactional;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.constants.GetDateFormat;
 import thyyxxk.webserver.constants.sidicts.*;
+import thyyxxk.webserver.dao.his.medicalinsurance.SiLogDao;
 import thyyxxk.webserver.dao.his.medicalinsurance.SiQueryDao;
 import thyyxxk.webserver.dao.his.medicalinsurance.UpIdCollectionDao;
 import thyyxxk.webserver.dao.his.yibao.DismissDao;
@@ -19,6 +20,7 @@ import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.datamodify.TYbSetModifyTime;
 import thyyxxk.webserver.entity.datamodify.TYbSetlModifyReq;
+import thyyxxk.webserver.entity.medicalinsurance.SiLog;
 import thyyxxk.webserver.entity.medicalinsurance.inpatient.BatjBa4;
 import thyyxxk.webserver.entity.medicalinsurance.inpatient.YbZyDisDiag;
 import thyyxxk.webserver.entity.medicalinsurance.inpatient.ZyDisDiagYb;
@@ -51,21 +53,20 @@ public class SetlListUpldService {
     private static final String OUTPUT = "output";
     private final ExecService exec;
     private final SiQueryDao queryDao;
-
     private final UpIdCollectionDao dao;
-
     private final DismissDao dismissDao;
-
     private final PublicServer publicServer;
     private final SendWxInfoService sendWxInfoService;
+    private final SiLogDao logDao;
 
-    public SetlListUpldService(ExecService exec, SiQueryDao queryDao, UpIdCollectionDao upIdCollectionDao, DismissDao dismissDao, PublicServer publicServer, SendWxInfoService sendWxInfoService) {
+    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;
         this.dismissDao = dismissDao;
         this.publicServer = publicServer;
         this.sendWxInfoService = sendWxInfoService;
+        this.logDao = logDao;
     }
 
     /**
@@ -95,6 +96,7 @@ public class SetlListUpldService {
         // 这里是上传
         JSONObject result = exec.executeTrade(jsonObject, SiFunction.UPLOAD_SI_SETTLE_INFO);
         log.info("医保结算信息上传 \n操作人:{}\n参数:{} \n结果:{}", TokenUtil.getTokenUserId(), jsonObject, result);
+        logDao.insert(new SiLog(input, result, patNo, times, ledgerSn));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -312,7 +314,6 @@ public class SetlListUpldService {
      * @throws Exception 克隆可能会报错
      */
     public ResultVo<UpldCollectionTemp> daYingShangChuanJieSuanDan(String patNo, Integer times, Integer ledgerSn) throws Exception {
-        log.info("住院号:{},住院次数:{},账页号:{}", patNo, times, ledgerSn);
         Integer flag = dao.setlModifyReqAuditFlag(patNo, times);
         flag = null == flag ? 0 : flag;
         // 查询出来的信息
@@ -516,7 +517,6 @@ public class SetlListUpldService {
      * @return 返回数据
      */
     public ResultVo<IPage<SiSetlinfoTemp>> huoQuJieSuanRenYuan(JieSuanDanChaXun param) {
-//        log.info("查询结算单信息:{}", JSON.toJSONStringWithDateFormat(param, DateUtil.DEFAULT_PATTERN));
         IPage<SiSetlinfoTemp> page = new Page<>();
         page.setRecords(dao.huoQuJieSuanRenYuan(param.getStartTime(), param.getEndTime(), param.getClrType(), param.getPatNo(),
                 param.getInsutype(), param.getOutDept(), param.getMedType(), param.getPsnType(), param.getClrOptins(), param.getDecTypes(),
@@ -668,7 +668,6 @@ public class SetlListUpldService {
             obj.put("size", list.size());
             WebSocketServer.sendMessageByUserCode(TokenUtil.getTokenUserId(), obj.toString());
         }
-        log.info("医保结算单: {}", JSON.toJSONStringWithDateFormat(param, GetDateFormat.DATE));
         String[] title = {"姓名", "审核状态", "申报类型", "出院科室", "住院号/门诊号", "性别", "住院天数", "诊断编码", "诊断名称", "治疗方式", "总费用",
                 "报销金额", "险种类型", "人员类别", "结算时间", "医疗类别", "清算机构", "管床医生", "转科室", "转科次数"};
         String[][] content = new String[list.size()][];

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

@@ -10,10 +10,12 @@ import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.constants.Capacity;
 import thyyxxk.webserver.constants.YesOrNo;
 import thyyxxk.webserver.constants.sidicts.*;
+import thyyxxk.webserver.dao.his.medicalinsurance.SiLogDao;
 import thyyxxk.webserver.dao.his.medicalinsurance.SiManageDao;
 import thyyxxk.webserver.dao.his.medicalinsurance.SiSetlinfoDao;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.dictionary.PureCodeName;
+import thyyxxk.webserver.entity.medicalinsurance.SiLog;
 import thyyxxk.webserver.entity.medicalinsurance.manage.*;
 import thyyxxk.webserver.entity.medicalinsurance.setlinfo.SiSetlinfo;
 import thyyxxk.webserver.entity.medicalinsurance.setlinfo.SlctSetlPrm;
@@ -41,15 +43,17 @@ public class SiManageService {
     private final SiDownloadService dldService;
     private final SiManageDao dao;
     private final SiSetlinfoDao setlinfoDao;
+    private final SiLogDao logDao;
 
     @Autowired
     public SiManageService(ExecService exec, SiUploadService upldServcie,
-                           SiDownloadService dldService, SiManageDao dao, SiSetlinfoDao setlinfoDao) {
+                           SiDownloadService dldService, SiManageDao dao, SiSetlinfoDao setlinfoDao, SiLogDao logDao) {
         this.exec = exec;
         this.upldServcie = upldServcie;
         this.dldService = dldService;
         this.dao = dao;
         this.setlinfoDao = setlinfoDao;
+        this.logDao = logDao;
     }
 
     public ResultVo<String> uploadCatalogueContrast(CatalogueContrast prm) {
@@ -71,6 +75,7 @@ public class SiManageService {
         input.getJSONObject("input").put("data", data);
         JSONObject result = exec.executeTrade(input, SiFunction.UPLOAD_CATALOGUE_CONTRAST);
         log.info("【操作员:{}】,上传目录对照:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
+        logDao.insert(new SiLog(input, result, null, null, null));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -95,6 +100,7 @@ public class SiManageService {
         input.getJSONObject("input").put("data", data);
         JSONObject result = exec.executeTrade(input, SiFunction.REVOKE_CATALOGUE_CONTRAST);
         log.info("【操作员:{}】,撤销目录:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
+        logDao.insert(new SiLog(input, result, null, null, null));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -134,6 +140,7 @@ public class SiManageService {
         String ref = JSONObject.toJSONString(atoRcvTrd);
         input.getJSONObject("input").put("data", JSONObject.parseObject(ref));
         JSONObject result = exec.executeTrade(input, SiFunction.AUTO_RECOVERY_TRADE);
+        logDao.insert(new SiLog(input, result, null, null, null));
         log.info("【操作员:{}】,冲正交易:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
         return SiUtil.makeReturnWithoutOutput(result, "冲正成功。");
     }

+ 11 - 1
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiPsnRcdService.java

@@ -8,9 +8,11 @@ import org.springframework.stereotype.Service;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.constants.sidicts.SiFunction;
 import thyyxxk.webserver.dao.his.medicalinsurance.PsnAsgnmtRcdDao;
+import thyyxxk.webserver.dao.his.medicalinsurance.SiLogDao;
 import thyyxxk.webserver.dao.his.medicalinsurance.SlwSpcChrRcdDao;
 import thyyxxk.webserver.dao.his.medicalinsurance.TransHospRcdDao;
 import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.medicalinsurance.SiLog;
 import thyyxxk.webserver.entity.medicalinsurance.psnrcd.PsnAsgnmtRcd;
 import thyyxxk.webserver.entity.medicalinsurance.psnrcd.SlwSpcDiseRcd;
 import thyyxxk.webserver.entity.medicalinsurance.psnrcd.RvkPsnRcd;
@@ -36,13 +38,15 @@ public class SiPsnRcdService {
     private final SlwSpcChrRcdDao slwSpcChrRcdDao;
     private final TransHospRcdDao trsHspRcdDao;
     private final PsnAsgnmtRcdDao psnAsgRcdDao;
+    private final SiLogDao logDao;
 
     @Autowired
-    public SiPsnRcdService(ExecService exec, SlwSpcChrRcdDao dao, TransHospRcdDao trsHspRcdDao, PsnAsgnmtRcdDao psnAsgRcdDao) {
+    public SiPsnRcdService(ExecService exec, SlwSpcChrRcdDao dao, TransHospRcdDao trsHspRcdDao, PsnAsgnmtRcdDao psnAsgRcdDao, SiLogDao logDao) {
         this.exec = exec;
         this.slwSpcChrRcdDao = dao;
         this.trsHspRcdDao = trsHspRcdDao;
         this.psnAsgRcdDao = psnAsgRcdDao;
+        this.logDao = logDao;
     }
 
     public ResultVo<String> transferHospitalRecord(TransHospRcd trsHspRcd) {
@@ -51,6 +55,7 @@ public class SiPsnRcdService {
         input.getJSONObject("input").put("refmedin", JSONObject.parseObject(ref));
         JSONObject result = exec.executeTrade(input, SiFunction.TRANSFER_HOSPITAL_RECORD);
         log.info("【操作员:{}】,转院备案:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
+        logDao.insert(new SiLog(input, result, null, null, null));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -83,6 +88,7 @@ public class SiPsnRcdService {
         input.getJSONObject("input").put("data", JSONObject.parseObject(ref));
         JSONObject result = exec.executeTrade(input, SiFunction.REVOKE_TRANSFER_HOSPITAL_RECORD);
         log.info("【操作员:{}】,转院备案撤销:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
+        logDao.insert(new SiLog(input, result, null, null, null));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -104,6 +110,7 @@ public class SiPsnRcdService {
         input.getJSONObject("input").put("data", JSONObject.parseObject(ref));
         JSONObject result = exec.executeTrade(input, SiFunction.SPECIAL_CHRONIC_DISEASES_RECORD);
         log.info("【操作员:{}】,人员慢特病备案:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
+        logDao.insert(new SiLog(input, result, null, null, null));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -136,6 +143,7 @@ public class SiPsnRcdService {
         input.getJSONObject("input").put("data", JSONObject.parseObject(ref));
         JSONObject result = exec.executeTrade(input, SiFunction.REVOKE_SPECIAL_CHRONIC_DISEASES_RECORD);
         log.info("【操作员:{}】,人员慢特病备案撤销:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
+        logDao.insert(new SiLog(input, result, null, null, null));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -157,6 +165,7 @@ public class SiPsnRcdService {
         input.getJSONObject("input").put("data", JSONObject.parseObject(ref));
         JSONObject result = exec.executeTrade(input, SiFunction.PERSONNEL_ASSIGNMENT_RECORD);
         log.info("【操作员:{}】,人员定点备案:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
+        logDao.insert(new SiLog(input, result, null, null, null));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -189,6 +198,7 @@ public class SiPsnRcdService {
         input.getJSONObject("input").put("data", JSONObject.parseObject(ref));
         JSONObject result = exec.executeTrade(input, SiFunction.REVOKE_PERSONNEL_ASSIGNMENT_RECORD);
         log.info("【操作员:{}】,人员定点备案撤销:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
+        logDao.insert(new SiLog(input, result, null, null, null));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }

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

@@ -11,6 +11,7 @@ import thyyxxk.webserver.constants.sidicts.*;
 import thyyxxk.webserver.constants.YesOrNo;
 import thyyxxk.webserver.dao.his.medicalinsurance.*;
 import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.medicalinsurance.SiLog;
 import thyyxxk.webserver.entity.medicalinsurance.inpatient.*;
 import thyyxxk.webserver.entity.medicalinsurance.query.SiPatInfo;
 import thyyxxk.webserver.entity.medicalinsurance.setlinfo.SiSetldetail;
@@ -50,21 +51,25 @@ public class SiZyService {
     private final SiSetlinfoDao setlinfodao;
     private final SiSetldetailDao setldetldao;
     private final SiChargeTempDao chrgtmpdao;
+    private final SiLogDao logDao;
     private final ExecService exec;
     private final DismissService dismissService;
+    private final SetlListUpldService setlListUpldService;
     private final SiZySrvc zySrvc;
 
     @Autowired
     public SiZyService(SiZyDao dao, SiQueryDao qrydao, SiSetlinfoDao setlinfoDao,
-                       SiSetldetailDao setldetldao, SiChargeTempDao chrgtmpdao, ExecService exec,
-                       DismissService dismissService, SiZySrvc zySrvc) {
+                       SiSetldetailDao setldetldao, SiChargeTempDao chrgtmpdao, SiLogDao logDao, ExecService exec,
+                       DismissService dismissService, SetlListUpldService setlListUpldService, SiZySrvc zySrvc) {
         this.dao = dao;
         this.qrydao = qrydao;
         this.setlinfodao = setlinfoDao;
         this.setldetldao = setldetldao;
         this.chrgtmpdao = chrgtmpdao;
+        this.logDao = logDao;
         this.exec = exec;
         this.dismissService = dismissService;
+        this.setlListUpldService = setlListUpldService;
         this.zySrvc = zySrvc;
     }
 
@@ -99,6 +104,7 @@ public class SiZyService {
         input.getJSONObject("input").put("diseinfo", JSONArray.parse(diseRef));
         JSONObject result = exec.executeTrade(input, SiFunction.ADMISSION_REGISTRATION);
         log.info("【操作员:{}】,医保入院登记:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -149,6 +155,7 @@ public class SiZyService {
         input.getJSONObject("input").put("diseinfo", JSONArray.parse(diseRef));
         JSONObject result = exec.executeTrade(input, SiFunction.MODIFY_ADMISSION_INFO);
         log.info("【操作员:{}】,入院信息变更:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
         return SiUtil.makeReturnWithoutOutput(result, "变更住院信息成功。");
     }
 
@@ -165,6 +172,7 @@ public class SiZyService {
         input.getJSONObject("input").put("data", data);
         JSONObject result = exec.executeTrade(input, SiFunction.REVOKE_ADMISSION);
         log.info("【操作员:{}】,取消入院登记:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -199,6 +207,7 @@ public class SiZyService {
         input.getJSONObject("input").put("data", JSONObject.parseObject(ref));
         JSONObject result = exec.executeTrade(input, SiFunction.HOSPITALIZATION_PRE_SETTLEMENT);
         log.info("预结算:\n参数:{},\n结果:{}", input, result);
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -243,6 +252,7 @@ public class SiZyService {
         input.getJSONObject("input").put("data", data);
         JSONObject result = exec.executeTrade(input, SiFunction.REVOKE_HOSPITALIZATION_FEE_DETAILS);
         log.info("【操作员:{}】撤销已上传的费用:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -299,6 +309,7 @@ public class SiZyService {
         input.getJSONObject("input").put("diseinfo", JSONArray.parse(diseRef));
         JSONObject result = exec.executeTrade(input, SiFunction.DISCHARGE_PROCESSING);
         log.info("【操作员:{}】,医保出院办理:\n参数:{},\n结果:{}", p.getStaffId(), input, result);
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -325,6 +336,7 @@ public class SiZyService {
         input.getJSONObject("input").put("data", data);
         JSONObject result = exec.executeTrade(input, SiFunction.REVOKE_DISCHARGE);
         log.info("【操作员:{}】取消医保出院办理:\n参数:{},\n结果:{}", TokenUtil.getTokenUserId(), input, result);
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
@@ -363,6 +375,7 @@ public class SiZyService {
         input.getJSONObject("input").put("data", JSONObject.parseObject(ref));
         JSONObject result = exec.executeTrade(input, SiFunction.HOSPITALIZATION_SETTLEMENT);
         log.info("【操作员:{}】,医保出院结算:\n参数:{},\n结果:{}", p.getStaffId(), input, result);
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
         if (null == result) {
             revokeDischarge(p);
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
@@ -372,6 +385,7 @@ public class SiZyService {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "医保中心报错:" + result.getString("message"));
         }
         if (result.getIntValue(RESULT_CODE) == 0) {
+            setlListUpldService.YiBaoZhiFuFangShi(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
             JSONObject setlinfo = result.getJSONObject(OUTPUT).getJSONObject("setlinfo");
             SiSetlinfo setlEntity = JSONObject.parseObject(setlinfo.toJSONString(), SiSetlinfo.class);
             setlEntity.setPatNo(p.getInpatientNo());
@@ -436,6 +450,7 @@ public class SiZyService {
         input.getJSONObject("input").put("data", data);
         JSONObject result = exec.executeTrade(input, SiFunction.REVOKE_HOSPITALIZATION_SETTLEMENT);
         log.info("【操作员:{}】取消医保结算:\n参数:{},\n结果:{}", p.getStaffId(), input, result);
+        logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn()));
         if (null == result) {
             return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }

+ 3 - 0
src/main/java/thyyxxk/webserver/utils/PingYinUtils.java

@@ -177,6 +177,9 @@ public class PingYinUtils {
      */
     public static String getAllPinYinHeadChar(String str) {
         StringBuilder convert = new StringBuilder();
+        if (StringUtil.isBlank(str)) {
+            return convert.toString();
+        }
         for (int j = 0; j < str.length(); j++) {
             char word = str.charAt(j);
             String[] pinyinArray = PinyinHelper.toHanyuPinyinStringArray(word);

+ 0 - 17
src/main/java/thyyxxk/webserver/utils/SiUtil.java

@@ -135,21 +135,4 @@ public class SiUtil {
         return result;
     }
 
-    public static String toJP(String c) {
-        StringBuilder convert = new StringBuilder();
-        if (StringUtil.isBlank(c)) {
-            return convert.toString();
-        }
-        for (int i = 0; i < c.length(); i++) {
-            char word = c.charAt(i);
-            String[] pyArr = PinyinHelper.toHanyuPinyinStringArray(word);
-            if (null != pyArr && pyArr.length > 0) {
-                convert.append(pyArr[0].charAt(0));
-            } else {
-                convert.append(word);
-            }
-        }
-        return convert.toString().toUpperCase();
-    }
-
 }