Преглед изворни кода

新增重点监控药品标志维护

hsh пре 1 година
родитељ
комит
17c7a5feea

+ 5 - 0
src/main/java/thyyxxk/webserver/controller/yp/YpDictController.java

@@ -241,4 +241,9 @@ public class YpDictController {
         return service.updateYpWinningBidder(code, serial, flag);
     }
 
+    @GetMapping("/updateYpFocusMonitor")
+    public ResultVo<Map<String, Object>> updateYpFocusMonitor(@RequestParam("code") String code, @RequestParam("serial") String serial, @RequestParam("flag") String flag){
+        return service.updateYpFocusMonitor(code, serial, flag);
+    }
+
 }

+ 4 - 0
src/main/java/thyyxxk/webserver/dao/his/yp/YpDictDao.java

@@ -52,6 +52,7 @@ public interface YpDictDao extends BaseMapper<YpZdDict> {
             " isnull(zd.temp_purchase_flag, '0') as tempPurchaseFlag,  " +
             " isnull(zd.high_warning_flag, '0') as highWarningFlag,  " +
             " isnull(zd.winning_bidder_flag, '0') as winningBidderFlag,  " +
+            " isnull(zd.focus_monitor_flag, '0') as focusMonitorFlag,  " +
             " rtrim(isnull(zd.jb_flag, '0')) as jbFlag,  " +
             " isnull(zd.del_flag, '0') as delFlag,  " +
             " isnull(yc.name, '') as manuFactory, " +
@@ -585,4 +586,7 @@ public interface YpDictDao extends BaseMapper<YpZdDict> {
     @Update(" update yp_zd_dict set winning_bidder_flag = #{flag} where code = #{code} ")
     int updateYpWinningBidderByCode(@Param("code") String code, @Param("flag") String flag);
 
+    @Update(" update yp_zd_dict set focus_monitor_flag = #{flag} where code = #{code} ")
+    int updateYpFocusMonitorByCode(@Param("code") String code, @Param("flag") String flag);
+
 }

+ 6 - 0
src/main/java/thyyxxk/webserver/entity/inpatient/YpZdDict.java

@@ -889,4 +889,10 @@ public class YpZdDict implements Serializable {
     @TableField(value = "winning_bidder_flag")
     private String winningBidderFlag;
 
+    /**
+     * 重点监控药品标志(1:重点监控药品)
+     */
+    @TableField(value = "focus_monitor_flag")
+    private String focusMonitorFlag;
+
 }

+ 31 - 0
src/main/java/thyyxxk/webserver/service/yp/YpDictService.java

@@ -1182,4 +1182,35 @@ public class YpDictService {
 
     }
 
+    /**
+     * @Description 更新重点监控药品标志(1:是)
+     * @Author hsh
+     * @param code 药品编码 serial 序号 flag 重点监控药品标志
+     * @return map
+     * @Date 2024/9/10 10:45
+     */
+    public ResultVo<Map<String, Object>> updateYpFocusMonitor(String code, String serial, String flag){
+        if(StringUtil.isBlank(code)) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有找到药品编码,请检查!");
+        }
+
+        YpZdDict yp = dao.selectYpDictByCode(code, serial);
+        if(null == yp){
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "药品编码(" + code + ")的药品账页字典信息不存在,请检查!");
+        }
+
+        Map<String, Object> resultMap = new HashMap<>();
+        try{
+            int num = dao.updateYpFocusMonitorByCode(code, flag);
+            if(num == 0){
+                return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "更新重点监控药品标志失败!");
+            }
+            resultMap.put("cg", "更新重点监控药品标志成功!");
+            return ResultVoUtil.success(resultMap);
+        } catch(Exception e){
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "更新重点监控药品标志失败!");
+        }
+
+    }
+
 }