Browse Source

优化代码

DESKTOP-0GD05B0\Administrator 2 years ago
parent
commit
6ccbbe1308

+ 3 - 1
src/main/java/thyyxxk/webserver/dao/his/PublicDao.java

@@ -115,7 +115,9 @@ public interface PublicDao {
     List<GetDropdownBox> getDept();
 
 
-    @Select("select rtrim(code) code,rtrim(name) name from zd_unit_code with(nolock)" + "where isnull(del_flag,0) = 0 and code not like '8%' and " + "(py_code like #{pyCode} or name like #{pyCode} or code like #{pyCode})")
+    @Select("select rtrim(code) code,rtrim(name) name from zd_unit_code with(nolock)" +
+            "where isnull(del_flag,0) = 0 and code not like '8%' and " +
+            "(py_code like #{pyCode} or name like #{pyCode} or code like #{pyCode})")
     List<GetDropdownBox> queryDept(String pyCode);
 
 

+ 31 - 2
src/main/java/thyyxxk/webserver/entity/datamodify/GetDropdownBox.java

@@ -2,6 +2,7 @@ package thyyxxk.webserver.entity.datamodify;
 
 import com.fasterxml.jackson.annotation.JsonInclude;
 import lombok.Data;
+import thyyxxk.webserver.utils.StringUtil;
 
 @Data
 public class GetDropdownBox {
@@ -26,11 +27,39 @@ public class GetDropdownBox {
     @JsonInclude(JsonInclude.Include.NON_NULL)
     private String parentCode;
 
+    public String getCode() {
+        if (StringUtil.isBlank(code)) {
+            return code;
+        }
+        return code.trim();
+    }
+
+    public String getName() {
+        if (StringUtil.isBlank(name)) {
+            return name;
+        }
+        return name.trim();
+    }
+
+    public String getPyCode() {
+        if (StringUtil.isBlank(pyCode)) {
+            return pyCode;
+        }
+        return pyCode.trim();
+    }
+
+    public String getWCode() {
+        if (StringUtil.isBlank(wCode)) {
+            return wCode;
+        }
+        return wCode.trim();
+    }
+
     public String getValue() {
-        return code;
+        return getCode();
     }
 
     public String getLabel() {
-        return name;
+        return getName();
     }
 }

+ 0 - 23
src/main/java/thyyxxk/webserver/service/PublicServer.java

@@ -464,29 +464,6 @@ public class PublicServer {
         return zyActpatient;
     }
 
-    /**
-     * 这里是重置流水
-     *
-     * @param patNo 住院号
-     * @param times 住院次数
-     */
-    @Transactional(rollbackFor = Exception.class)
-    public void chongZhiLiuShui(String patNo, Integer times) {
-        List<ZyDetailCharge> paiXu = dao.huoQuZhongYeFeiYong(patNo, times);
-        log.info("获取数据:{}", JSON.toJSONString(paiXu));
-        int maxDetailSn = dao.maxDetailSn(patNo, times);
-
-        List<List<ZyDetailCharge>> fenDuan = ListUtils.partition(paiXu, 100);
-        for (List<ZyDetailCharge> zyDetailCharges : fenDuan) {
-            dao.chongZhiLiuShui(patNo, times, zyDetailCharges, maxDetailSn);
-        }
-
-        for (List<ZyDetailCharge> zyDetailCharges : fenDuan) {
-            dao.chongZhiLiuShui(patNo, times, zyDetailCharges, 0);
-        }
-
-    }
-
     /**
      * 获取麻醉方式
      *