Browse Source

Merge branch 'master' into 'master'

优化追溯码增加医保结算标识

See merge request lighter/web-server!167
huangshuhua 4 days ago
parent
commit
25b61bab70

+ 0 - 6
src/main/java/thyyxxk/webserver/dao/his/medicine/YpTracCodgDao.java

@@ -137,9 +137,6 @@ public interface YpTracCodgDao {
             " <if test=\"dto.setlId != null and dto.setlId != ''\"> " +
             " and si.setl_id = #{dto.setlId} " +
             " </if> " +
-            " <if test=\"dto.setlType != null and dto.setlType != ''\"> " +
-            " and si.setl_id is not null " +
-            " </if> " +
             " order by fy.charge_date " +
             "</script>")
     List<YpSelinfoSold> selectYpSelinfoSoldDetailByXyf(@Param("dto") YpCodgUpload dto);
@@ -168,9 +165,6 @@ public interface YpTracCodgDao {
             " <if test=\"dto.setlId != null and dto.setlId != ''\"> " +
             " and so.setl_id = #{dto.setlId} " +
             " </if> " +
-            " <if test=\"dto.setlType != null and dto.setlType != ''\"> " +
-            " and so.setl_id is not null " +
-            " </if> " +
             " order by fy.confirm_time " +
             "</script>")
     List<YpSelinfoSold> selectYpSelinfoSoldThDetailByXyf(@Param("dto") YpCodgUpload dto);

+ 7 - 4
src/main/java/thyyxxk/webserver/service/medicine/YpTracCodgService.java

@@ -414,9 +414,6 @@ public class YpTracCodgService {
         if(StringUtils.isBlank(dto.getGroupNo())){
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "查询商品销售/销售退货信息, 请选择药房!");
         }
-        if("N".equals(dto.getSetlType())){
-            dto.setSetlType(null);
-        }
         List<YpSelinfoSold> selinfoList = new ArrayList<>();
         if(YpDictConstant.MZ_XYF_NO.equals(dto.getGroupNo())){
             if("3".equals(dto.getType())){
@@ -439,11 +436,17 @@ public class YpTracCodgService {
                         JSONObject s = j.getJSONObject("setlinfo");
                         sd.setSetlId(s.getString("setlId"));
                         sd.setMdtrtSn(s.getString("mdtrtId"));
+                        sd.setMdtrtSetlType("1");
                     }
                 }
             }
         }
-
+        // 查询医保结算病人
+        if("Y".equals(dto.getSetlType())){
+            List<YpSelinfoSold> resultList = selinfoList.stream().filter(
+                    item -> "1".equals(item.getMdtrtSetlType())).collect(Collectors.toList());
+            return ResultVoUtil.success(resultList);
+        }
         return ResultVoUtil.success(selinfoList);
     }