|
|
@@ -115,7 +115,7 @@ public class KeyPwdController extends BladeController {
|
|
|
// deptChildIds.add(deptId);
|
|
|
Dept dept = deptService.getById(deptId);
|
|
|
Dept parentDept = deptService.getById(dept.getParentId());
|
|
|
- if (parentDept.getOrgNo().startsWith("999")){
|
|
|
+ if (parentDept != null && parentDept.getOrgNo().startsWith("999")){
|
|
|
deptChildIds.add(parentDept.getId());
|
|
|
}
|
|
|
keyPwd.setDeptIdList(deptChildIds);
|
|
|
@@ -146,7 +146,7 @@ public class KeyPwdController extends BladeController {
|
|
|
// deptChildIds.add(deptId);
|
|
|
Dept dept = deptService.getById(deptId);
|
|
|
Dept parentDept = deptService.getById(dept.getParentId());
|
|
|
- if (parentDept.getOrgNo().startsWith("999")){
|
|
|
+ if (parentDept != null && parentDept.getOrgNo().startsWith("999")){
|
|
|
deptChildIds.add(parentDept.getId());
|
|
|
}
|
|
|
keyPwd.setDeptIdList(deptChildIds);
|
|
|
@@ -283,6 +283,10 @@ public class KeyPwdController extends BladeController {
|
|
|
UserLog userLog = new UserLog();
|
|
|
Assert.isTrue(!keyPwd.getHandoverPersonNo().equals(keyPwd.getReceiverNo()), "交出人不可為接收人!請重新選擇!");
|
|
|
|
|
|
+ KeyPwd one = keyPwdService.getOne(new QueryWrapper<>(new KeyPwd()).lambda().eq(KeyPwd::getBankNo, keyPwd.getBankNo()).eq(KeyPwd::getOrgNo, keyPwd.getOrgNo())
|
|
|
+ .eq(KeyPwd::getCategory, keyPwd.getCategory()).eq(KeyPwd::getStatus, 1).eq(KeyPwd::getProcess, 2));
|
|
|
+ Assert.isNull(one, "該分類種類已在待確認中,請勿重新發起!");
|
|
|
+
|
|
|
KeyPwd old = null;
|
|
|
if (isAdd){
|
|
|
keyPwd.setFillingPerson(user.getName());
|
|
|
@@ -400,7 +404,7 @@ public class KeyPwdController extends BladeController {
|
|
|
// deptChildIds.add(deptId);
|
|
|
Dept dept = deptService.getById(deptId);
|
|
|
Dept parentDept = deptService.getById(dept.getParentId());
|
|
|
- if (parentDept.getOrgNo().startsWith("999")){
|
|
|
+ if (parentDept != null && parentDept.getOrgNo().startsWith("999")){
|
|
|
deptChildIds.add(parentDept.getId());
|
|
|
}
|
|
|
keyPwd.setDeptIdList(deptChildIds);
|