From d146a6f21888ed7dc3510709d4850d553e519752 Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Tue, 8 Jul 2025 17:48:58 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluate/service/PersonServiceImpl.java | 4 +- .../evaluate/person/EvaluatePersonAdd.html | 3 +- .../pages/evaluate/person/editPerson.html | 38 +++++++++---------- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/PersonServiceImpl.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/PersonServiceImpl.java index 643f3f2..7ab0c0a 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/PersonServiceImpl.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/PersonServiceImpl.java @@ -8,6 +8,7 @@ import com.bonus.gs.sub.evaluate.manager.utils.AesCbcUtils; import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes; import com.bonus.gs.sub.evaluate.manager.utils.GlobalConst; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; @@ -46,8 +47,8 @@ public class PersonServiceImpl implements PersonService { list.forEach(personBean -> { personBean.setSex("男".equals(personBean.getSex()) ? "1" : "0"); personBean.setPassword(passwordEncoder.encode(password)); - // personBean.setEvaluatePassWord(AesCbcUtils.encrypt(password)); personBean.setEvaluatePassWord(password); + personBean.setDeptId(StringUtils.isBlank(personBean.getDeptId()) ? "0" : personBean.getDeptId()); }); for (PersonBean personBean : list) { dao.addPersonInfo(personBean); @@ -68,6 +69,7 @@ public class PersonServiceImpl implements PersonService { public AjaxRes updatePerson(PersonBean o) { AjaxRes ar = new AjaxRes(); try { + o.setDeptId(StringUtils.isBlank(o.getDeptId()) ? "0" : o.getDeptId()); dao.deletePersonRole(o.getId()); dao.updatePerson(o); dao.addPersonRoleById(o); diff --git a/src/main/resources/static/pages/evaluate/person/EvaluatePersonAdd.html b/src/main/resources/static/pages/evaluate/person/EvaluatePersonAdd.html index d79fdf9..d313a38 100644 --- a/src/main/resources/static/pages/evaluate/person/EvaluatePersonAdd.html +++ b/src/main/resources/static/pages/evaluate/person/EvaluatePersonAdd.html @@ -180,8 +180,9 @@ if (obj.value == 5) { $('#deptId').val(7); // 设置为发展运营中心 $('#deptId').attr('disabled', 'disabled'); + $('#dept').show(); } else if (obj.value == 7) { - $('#deptId').val(""); + $('#deptId').val(''); $('#deptId').removeAttr('lay-verify'); $('#dept').hide(); } else { diff --git a/src/main/resources/static/pages/evaluate/person/editPerson.html b/src/main/resources/static/pages/evaluate/person/editPerson.html index c38e6ea..7326a6a 100644 --- a/src/main/resources/static/pages/evaluate/person/editPerson.html +++ b/src/main/resources/static/pages/evaluate/person/editPerson.html @@ -19,15 +19,15 @@ class="layui-input"> - +