Explorar el Código

优化字典管理的执行科室功能

hurugang hace 2 años
padre
commit
99d4cc0c5e

+ 3 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/ZdChargeItemController.java

@@ -302,6 +302,9 @@ public class ZdChargeItemController {
             zdChargeItem.setWbCode(PyWbUtil.getWBCode(zdChargeItem.getName()));
             User tokenUser = TokenUtil.getUser(httpServletRequest);
             zdChargeItem.setOperId(tokenUser.getUserIdCode());
+            if("-1".equals(zdChargeItem.getExecUnit())){
+                zdChargeItem.setExecUnit("");
+            }
             if(StringUtils.isBlank(zdChargeItem.getCode())){
                 //新增
                 zdChargeItem.setCode(zyConfigService.getChargeCode(zdChargeItem.getClassCode()));

+ 3 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/zd/JcZdItemServiceImpl.java

@@ -54,6 +54,9 @@ public class JcZdItemServiceImpl implements JcZdItemService {
     @Override
     @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
     public int saveJcZdItem(JcZdItem jcZdItem) {
+        if("-1".equals(jcZdItem.getExecUnit())){
+            jcZdItem.setExecUnit("");
+        }
         int num=0;
         if(StringUtils.isNotBlank(jcZdItem.getName())){
             jcZdItem.setPyCode(PyWbUtil.toBigFirstChar(jcZdItem.getName()));

+ 3 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/zd/JyZdItemServiceImpl.java

@@ -59,6 +59,9 @@ public class JyZdItemServiceImpl implements JyZdItemService {
     @Override
     @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
     public int saveJyZdItem(JyZdItem jyZdItem) {
+        if("-1".equals(jyZdItem.getExecUnit())){
+            jyZdItem.setExecUnit("");
+        }
         int num=0;
         if(StringUtils.isNotBlank(jyZdItem.getName())){
             jyZdItem.setPyCode(PyWbUtil.toBigFirstChar(jyZdItem.getName()));

+ 1 - 1
src/main/resources/static/js/mz/charge_detail.js

@@ -896,7 +896,7 @@ function initDeptSelect() {
                 window.location.href = '/thmz/login/view'
                 return;
             }
-            var html = '';
+            var html = '<option value="-1"></option>';
             $.each(data.data, function (commentIndex, comment) {
                 html += '<option value="' + comment.code + '">' + comment.name + '(' + comment.pyCode + ')</option>';
             });

+ 1 - 1
src/main/resources/static/js/mz/jc_jy_zd_item.js

@@ -1267,7 +1267,7 @@ function initExecUnit() {
                 return;
             }
             $('#execUnit').empty();   //清空resText里面的所有内容
-            var html = '';
+            var html = '<option value="-1"></option>';
             $.each(data.data, function (commentIndex, comment) {
                 html += '<option value="' + comment.code + '">' + comment.name + '(' + comment.pyCode + '-' + comment.code + ')</option>';
             });