Browse Source

优化核酸检测地点

hurugang 4 years ago
parent
commit
d92512652b

+ 10 - 4
src/main/java/cn/hnthyy/thmz/controller/zy/ZyActpatientController.java

@@ -273,10 +273,16 @@ public class ZyActpatientController {
                 if(StringUtils.isNotBlank(z.getZkDept())){
                     z.setZkDeptName(zdUnitCodeService.queryDeptNameByIdInCache(z.getZkDept()));
                 }
-                Integer ledgerSn=zyLedgerFileService.queryCurrentLedgerSn(z.getInpatientNo(),z.getAdmissTimes());
-                if(ledgerSn!=null && ledgerSn>0){
-                    //未结算
-                    z.setSettleType(0);
+                ZyLedgerFile zyLedgerFile=zyLedgerFileService.queryLastLedgerSn(z.getInpatientNo(),z.getAdmissTimes());
+                if(zyLedgerFile!=null){
+                    if(StringUtils.isBlank(zyLedgerFile.getSettleType())){
+                        //未结算
+                        z.setSettleType("0");
+                    }else {
+                        //未结算
+                        z.setSettleType(zyLedgerFile.getSettleType());
+                    }
+
                 }
                 ResponceTypeEnum responceTypeEnum=ResponceTypeEnum.getReportTypeByCode(z.getResponceType());
                 z.setResponceType(responceTypeEnum==null?"":responceTypeEnum.name);

+ 2 - 2
src/main/java/cn/hnthyy/thmz/entity/his/ZyActpatient.java

@@ -217,9 +217,9 @@ public class ZyActpatient extends PageBean implements Comparable<ZyActpatient> {
     //医保身份
     private String responceTypeName;
     /**
-     * 0 未结算 1 结算;2:出纳;3:出纳,4 取消结算 非数据库字段
+     * 0未结算 1是出院结算  3是中间结算  4是已出纳  非数据库字段
      */
-    private Integer settleType;
+    private String settleType;
 
     @Override
     public int compareTo(ZyActpatient o) {

+ 1 - 1
src/main/java/cn/hnthyy/thmz/entity/his/ZyLedgerFile.java

@@ -213,7 +213,7 @@ public class ZyLedgerFile {
     private BigDecimal settle;
 
     /**
-    * 1 结算;2:出纳;3:出纳,4 取消结算
+    *  0未结算  1是出院结算  3是中间结算  4是已出纳
     */
     private String settleType;
 

+ 9 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/ZyLedgerFileMapper.java

@@ -66,6 +66,15 @@ public interface ZyLedgerFileMapper {
     @Select("select max(ledger_sn) from  zy_ledger_file where inpatient_no =#{inpatientNo} and admiss_times =#{admissTimes} ")
     Integer selectMaxLedgerSn(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes);
 
+    /**
+     * 获取最后一个账页信息
+     * @param inpatientNo
+     * @param admissTimes
+     * @return
+     */
+    @Select("select top 1* from zy_ledger_file where inpatient_no =#{inpatientNo} and admiss_times =#{admissTimes} order by ledger_sn desc ")
+    ZyLedgerFile selectLastLedgerSn(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes);
+
 
     /**
      * 更新金额

+ 2 - 0
src/main/java/cn/hnthyy/thmz/service/his/ZyActpatientService.java

@@ -58,4 +58,6 @@ public interface ZyActpatientService {
      * @return
      */
     Integer queryCountByInpatientNoOrMzNO(ZyActpatient zyActpatient);
+
+
 }

+ 9 - 0
src/main/java/cn/hnthyy/thmz/service/his/zyLedgerFileService.java

@@ -21,4 +21,13 @@ public interface zyLedgerFileService {
      * @return
      */
     Integer queryCurrentLedgerSn(String inpatientNo,Integer admissTimes);
+
+
+    /**
+     * 获取最后一个账页信息
+     * @param inpatientNo
+     * @param admissTimes
+     * @return
+     */
+    ZyLedgerFile queryLastLedgerSn(String inpatientNo, Integer admissTimes);
 }

+ 6 - 1
src/main/java/cn/hnthyy/thmz/service/impl/his/zyLedgerFileServiceImpl.java

@@ -19,6 +19,11 @@ public class zyLedgerFileServiceImpl implements zyLedgerFileService {
 
     @Override
     public Integer queryCurrentLedgerSn(String inpatientNo, Integer admissTimes) {
-        return zyLedgerFileMapper.selectMaxLedgerSn(inpatientNo,admissTimes);
+        return zyLedgerFileMapper.selectCurrentLedgerSn(inpatientNo,admissTimes);
+    }
+
+    @Override
+    public ZyLedgerFile queryLastLedgerSn(String inpatientNo, Integer admissTimes) {
+        return zyLedgerFileMapper.selectLastLedgerSn(inpatientNo,admissTimes);
     }
 }

+ 1 - 1
src/main/java/cn/hnthyy/thmz/service/impl/thmz/OrderStatusChangeServiceImpl.java

@@ -137,7 +137,7 @@ public class OrderStatusChangeServiceImpl implements OrderStatusChangeService {
                             }
                             if ("2010000".equals(str)) {
                                 //检验
-                                haiCiAdapterService.commonMessageNotice(mzPatientMi.getIcCardNo(), "{\"data\":{\"first\":{\"color\":\"#FF0000\",\"value\":\"您好,您已完成缴费,请到指定地点进行检验检查。\"},\"keyword1\":{\"color\":\"#173177\",\"value\":\"" + zdUnitCode.getName() + "\"},\"keyword2\":{\"color\":\"#173177\",\"value\":\"" + zdUnitCode.getOfficePos() + "\"},\"remark\":{\"color\":\"#FF0000\",\"value\":\" 抽血室在一楼急诊科,大小便标本在门诊大楼三楼医学检验科。\"}},\"miniprogram\":{\"appid\":\"\",\"pagepath\":\"\"},\"template_id\":\"amY5BinXb2IpwdXqcOyXxtZZ26XyQOIQ3j1ablSWxy0\",\"touser\":\"\",\"url\":\"\"}", new Date());
+                                haiCiAdapterService.commonMessageNotice(mzPatientMi.getIcCardNo(), "{\"data\":{\"first\":{\"color\":\"#FF0000\",\"value\":\"您好,您已完成缴费,请到指定地点进行检验检查。\"},\"keyword1\":{\"color\":\"#173177\",\"value\":\"" + zdUnitCode.getName() + "\"},\"keyword2\":{\"color\":\"#173177\",\"value\":\"" + zdUnitCode.getOfficePos() + "\"},\"remark\":{\"color\":\"#FF0000\",\"value\":\" 抽血室在一楼急诊科,大小便标本在门诊大楼三楼医学检验科,核酸检测采样室在二楼1号诊室。\"}},\"miniprogram\":{\"appid\":\"\",\"pagepath\":\"\"},\"template_id\":\"amY5BinXb2IpwdXqcOyXxtZZ26XyQOIQ3j1ablSWxy0\",\"touser\":\"\",\"url\":\"\"}", new Date());
                             } else {
                                 //检查
                                 haiCiAdapterService.commonMessageNotice(mzPatientMi.getIcCardNo(), "{\"data\":{\"first\":{\"color\":\"#FF0000\",\"value\":\"您好,您已完成缴费,请到指定地点进行检验检查。\"},\"keyword1\":{\"color\":\"#173177\",\"value\":\"" + zdUnitCode.getName() + "\"},\"keyword2\":{\"color\":\"#173177\",\"value\":\"" + zdUnitCode.getOfficePos() + "\"},\"remark\":{\"color\":\"#FF0000\",\"value\":\" 感谢您的使用。\"}},\"miniprogram\":{\"appid\":\"\",\"pagepath\":\"\"},\"template_id\":\"amY5BinXb2IpwdXqcOyXxtZZ26XyQOIQ3j1ablSWxy0\",\"touser\":\"\",\"url\":\"\"}", new Date());

+ 1 - 1
src/main/resources/application-dev.yml

@@ -42,7 +42,7 @@ spring:
       connection-test-query:  SELECT 1
       validation-timeout: 10000
     his:
-      jdbc-url: "jdbc:sqlserver://172.16.32.160:1433;databaseName=thxyhisdb"
+      jdbc-url: "jdbc:sqlserver://172.16.32.179:1433;databaseName=thxyhisdb"
       username: "sa"
       password:
       driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"

+ 8 - 8
src/main/resources/static/js/actpatient.js

@@ -278,20 +278,20 @@ function initFeeTable() {
                 align: "center",
                 valign: 'middle',
                 formatter: function (value, row, index) {
-                    if(value==0){
+                    if(value=="0"){
                         return "未结算";
                     }
-                    if(value==1){
-                        return "结算";
+                    if(value=="1"){
+                        return "出院结算";
                     }
-                    if(value==2){
-                        return "出纳";
+                    if(value=="3"){
+                        return "中间结算";
                     }
-                    // if(value==3){
+                    // if(value=="3"){
                     //     return "出纳";
                     // }
-                    if(value==4){
-                        return "取消结算";
+                    if(value=="4"){
+                        return "已出纳";
                     }
                 }
             }, {