|
|
@@ -40,6 +40,7 @@ import org.springblade.core.mp.support.Query;
|
|
|
import org.springblade.core.secure.BladeUser;
|
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
+import org.springblade.core.tool.utils.BeanUtil;
|
|
|
import org.springblade.core.tool.utils.DateUtil;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.core.tool.utils.StringUtil;
|
|
|
@@ -153,6 +154,13 @@ public class KeyPwdController extends BladeController {
|
|
|
HashSet<Map> set = new HashSet<>();
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
KeyPwd item = list.get(i);
|
|
|
+ String[] split = item.getCategory().split(",");
|
|
|
+ //去掉多选的,因为在确认的时候,多选的已经分解了
|
|
|
+ if (split.length > 1){
|
|
|
+ list.remove(i);
|
|
|
+ i--;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
map.put("bankNo", item.getBankNo());
|
|
|
map.put("orgNo", item.getOrgNo());
|
|
|
@@ -178,6 +186,20 @@ public class KeyPwdController extends BladeController {
|
|
|
keyPwd.setProcess(3);
|
|
|
keyPwd.setSureTime(DateUtil.now());
|
|
|
if (keyPwdService.updateById(keyPwd)){
|
|
|
+
|
|
|
+ String[] split = keyPwd.getCategory().split(",");
|
|
|
+ //分解保存,status=2做标识,pid为分解记录的原id
|
|
|
+ if (split.length > 1){
|
|
|
+ for (int i = 0; i < split.length; i++) {
|
|
|
+ @Valid KeyPwd clone = BeanUtil.clone(keyPwd);
|
|
|
+ clone.setId(null);
|
|
|
+ clone.setPid(keyPwd.getId());
|
|
|
+ clone.setCategory(split[i]);
|
|
|
+ clone.setStatus(2);
|
|
|
+ keyPwdService.save(clone);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
User user = userService.getById(AuthUtil.getUserId());
|
|
|
Dept dept = deptService.getById(user.getDeptId());
|
|
|
|
|
|
@@ -236,6 +258,12 @@ public class KeyPwdController extends BladeController {
|
|
|
}
|
|
|
|
|
|
if (keyPwdService.saveOrUpdate(keyPwd)){
|
|
|
+ User receiver = userService.getById(keyPwd.getReceiverId());
|
|
|
+ if (!keyPwd.getCreateDept().equals(Long.valueOf(receiver.getDeptId()))){
|
|
|
+ keyPwd.setCreateDept(Long.valueOf(receiver.getDeptId()));
|
|
|
+ keyPwdService.updateById(keyPwd);
|
|
|
+ }
|
|
|
+
|
|
|
userLog.setTableName("keypwd");
|
|
|
userLog.setBankNo(dept.getBankNo());
|
|
|
userLog.setOrgNo(dept.getOrgNo());
|