ソースを参照

主手术修改为 第一个

xiaochan 3 年 前
コミット
aa06efb0de

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

@@ -151,7 +151,7 @@ public interface UpIdCollectionDao {
                                 @Param("tableName") String tableName);
 
     // 这里是手术操作信息
-    @Select("select isnull(rtrim(ssjb),1)  as oprn_oprt_type, " +
+    @Select("select case ssxh when 1 then 1 else  2 end oprn_oprt_type,, " +
             "       rtrim(ssmc) as oprn_oprt_name, " +
             "       rtrim(ssbm) as oprn_oprt_code, " +
             "       ssrq as oprn_oprt_date, " +

+ 1 - 31
src/main/java/thyyxxk/webserver/service/medicalinsurance/SetlListUpldService.java

@@ -128,22 +128,8 @@ public class SetlListUpldService {
         // 医保机构经办人
         setlinfoUpld.setHsorgOpter("未知");
         setlinfoUpld.setBillNo(dao.billNo(patNo, times, ledgerSn));
-        // 手术
+        // 手术 ssxh 为1 的是主手术
         List<OprninfoUpld> oprninfoUpld = dao.oprninfoUplds(patNo, times, flag == 1 ? "batj_ba4_modify" : "batj_ba4");
-
-        if (ListUtil.notBlank(oprninfoUpld)) {
-            // 用来存放最大的手术级别
-            int[] zhuYaoShouShu = new int[oprninfoUpld.size()];
-            for (OprninfoUpld upld : oprninfoUpld) {
-                String ssjb = upld.getOprnOprtType();
-                if (ssjb.equals("")) { // 判断手术级别是否为空
-                    ssjb = "1"; // 为空就设置为 1
-                }
-                upld.setOprnOprtType("2"); //全部设置为 2
-            }
-            // 最大的设置为一
-            oprninfoUpld.get(getMaxIndex(zhuYaoShouShu)).setOprnOprtType("1");
-        }
         // 手术计数
         setlinfoUpld.setOprnOprtCodeCnt(String.valueOf(oprninfoUpld.size()));
 
@@ -410,22 +396,6 @@ public class SetlListUpldService {
         return (int) (per * 100);
     }
 
-    /**
-     * 获取最大值的下标
-     *
-     * @param arr int 数组
-     * @return 返回下标
-     */
-    public int getMaxIndex(int[] arr) {
-        int maxIndex = 0;    //获取到的最大值的角标
-        for (int i = 0; i < arr.length; i++) {
-            if (arr[i] > arr[maxIndex]) {
-                maxIndex = i;
-            }
-        }
-        return maxIndex;
-    }
-
     private ResultVo<String> getChrgitems(String patNo, String setlId, String mdtrtId, String admdvs) {
         JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.QUERY_FEE_DETAILS, admdvs);
         JSONObject data = new JSONObject();