Browse Source

优化药品账页维护

hsh 3 tháng trước cách đây
mục cha
commit
82da67f297

+ 4 - 1
src/main/java/thyyxxk/webserver/service/medicine/YpDictService.java

@@ -795,6 +795,9 @@ public class YpDictService {
             // 更新药房药品价格
             // dao.updateYpBaseYfSync(ypZdDictVo.getCode(), ypZdDictVo.getSerial());
         } else {
+            if(StringUtil.isBlank(ypZdDictVo.getGroupNo())){
+                return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "新增药品账页字典信息请选择药库!");
+            }
             YpZdDrugKind ypKind = drugKindDao.selectDrugKindByCode(ypZdDictVo.getDrugKind());
             String ypType = ypKind.getYpType();
             YpTypeNumberEnum ypTypeNumber = YpTypeNumberEnum.getYpTypeNumberByCode(Integer.parseInt(ypType));
@@ -844,7 +847,7 @@ public class YpDictService {
             // 保存药品通用名
             dao.insertYpPrintName(ypPrintName);
             // 保存药品库房记录
-            num = dao.insertYpBaseSync(ypZdDictVo.getCode(), serial, "11");
+            num = dao.insertYpBaseSync(ypZdDictVo.getCode(), serial, ypZdDictVo.getGroupNo());
             if(num == 0){
                 return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "保存药品账页字典初始化药库信息失败!");
             }