Commit c9f55fa3 authored by fangxinjiang's avatar fangxinjiang

权限批量导入

parent 99b04c33
...@@ -95,7 +95,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap ...@@ -95,7 +95,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
str.append(oldEntity.getTaxMonth()); str.append(oldEntity.getTaxMonth());
str.append("->"); str.append("->");
str.append(newEntity.getTaxMonth()); str.append(newEntity.getTaxMonth());
str.append(" /n "); str.append(" ");
} }
//开户行省 //开户行省
if (Common.isNotNull(newEntity.getBankProvince()) if (Common.isNotNull(newEntity.getBankProvince())
...@@ -104,7 +104,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap ...@@ -104,7 +104,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
str.append(Common.isEmpty(oldEntity.getBankProvince())?"":util.getAreaLabelPublic(oldEntity.getBankProvince())); str.append(Common.isEmpty(oldEntity.getBankProvince())?"":util.getAreaLabelPublic(oldEntity.getBankProvince()));
str.append("->"); str.append("->");
str.append(Common.isEmpty(newEntity.getBankProvince())?"":util.getAreaLabelPublic(newEntity.getBankProvince())); str.append(Common.isEmpty(newEntity.getBankProvince())?"":util.getAreaLabelPublic(newEntity.getBankProvince()));
str.append(" /n "); str.append(" ");
} }
//开户行市 //开户行市
if (Common.isNotNull(newEntity.getBankCity()) && !oldEntity.getBankCity().equals(newEntity.getBankCity())){ if (Common.isNotNull(newEntity.getBankCity()) && !oldEntity.getBankCity().equals(newEntity.getBankCity())){
...@@ -112,7 +112,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap ...@@ -112,7 +112,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
str.append(Common.isEmpty(oldEntity.getBankCity())?"":util.getAreaLabelPublic(oldEntity.getBankCity())); str.append(Common.isEmpty(oldEntity.getBankCity())?"":util.getAreaLabelPublic(oldEntity.getBankCity()));
str.append("->"); str.append("->");
str.append(Common.isEmpty(newEntity.getBankCity())?"":util.getAreaLabelPublic(newEntity.getBankCity())); str.append(Common.isEmpty(newEntity.getBankCity())?"":util.getAreaLabelPublic(newEntity.getBankCity()));
str.append(" /n "); str.append(" ");
} }
log.setContent(str.toString()); log.setContent(str.toString());
Log.error("薪资人员变更记录表:"+str.toString()); Log.error("薪资人员变更记录表:"+str.toString());
...@@ -130,7 +130,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap ...@@ -130,7 +130,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
str.append(oldEntity.getEmpName()); str.append(oldEntity.getEmpName());
str.append("->"); str.append("->");
str.append(newEntity.getEmpName()); str.append(newEntity.getEmpName());
str.append(" /n "); str.append(" ");
} }
//开户行 //开户行
if (Common.isNotNull(newEntity.getBankName()) if (Common.isNotNull(newEntity.getBankName())
...@@ -139,7 +139,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap ...@@ -139,7 +139,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
str.append(oldEntity.getBankName()); str.append(oldEntity.getBankName());
str.append("->"); str.append("->");
str.append(newEntity.getBankName()); str.append(newEntity.getBankName());
str.append(" /n "); str.append(" ");
} }
//银行卡号 //银行卡号
if (Common.isNotNull(newEntity.getBankNo()) if (Common.isNotNull(newEntity.getBankNo())
...@@ -148,7 +148,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap ...@@ -148,7 +148,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
str.append(oldEntity.getBankNo()); str.append(oldEntity.getBankNo());
str.append("->"); str.append("->");
str.append(newEntity.getBankNo()); str.append(newEntity.getBankNo());
str.append(" /n "); str.append(" ");
} }
//开户行支行 //开户行支行
if ((Common.isEmpty(oldEntity.getBankSubName()) if ((Common.isEmpty(oldEntity.getBankSubName())
...@@ -159,7 +159,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap ...@@ -159,7 +159,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
str.append(oldEntity.getBankSubName()); str.append(oldEntity.getBankSubName());
str.append("->"); str.append("->");
str.append(newEntity.getBankSubName()); str.append(newEntity.getBankSubName());
str.append(" /n "); str.append(" ");
} }
//在职状态 //在职状态
if (Common.isNotNull(newEntity.getFileStatus()) if (Common.isNotNull(newEntity.getFileStatus())
...@@ -168,7 +168,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap ...@@ -168,7 +168,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
str.append(CommonConstants.ZERO_STRING.equals(oldEntity.getFileStatus())?"在职":"离职"); str.append(CommonConstants.ZERO_STRING.equals(oldEntity.getFileStatus())?"在职":"离职");
str.append("->"); str.append("->");
str.append(CommonConstants.ZERO_STRING.equals(newEntity.getFileStatus())?"在职":"离职"); str.append(CommonConstants.ZERO_STRING.equals(newEntity.getFileStatus())?"在职":"离职");
str.append(" /n "); str.append(" ");
} }
//手机号码 //手机号码
if (Common.isNotNull(newEntity.getEmpPhone()) if (Common.isNotNull(newEntity.getEmpPhone())
...@@ -177,7 +177,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap ...@@ -177,7 +177,7 @@ public class TSalaryEmpModLogServiceImpl extends ServiceImpl<TSalaryEmpModLogMap
str.append(oldEntity.getEmpPhone()); str.append(oldEntity.getEmpPhone());
str.append("->"); str.append("->");
str.append(newEntity.getEmpPhone()); str.append(newEntity.getEmpPhone());
str.append(" /n "); str.append(" ");
} }
} }
......
...@@ -303,10 +303,20 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse ...@@ -303,10 +303,20 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse
// 重复校验 // 重复校验
temp = existMap.get(excel.getUserLoginName() temp = existMap.get(excel.getUserLoginName()
+CommonConstants.DOWN_LINE_STRING +CommonConstants.DOWN_LINE_STRING
+excel.getHouseHold()); +excel.getHouseHold()
+CommonConstants.DOWN_LINE_STRING
+ excel.getType());
if (Common.isNotNull(temp)){ if (Common.isNotNull(temp)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),"对应账号的权限已存在,请勿重复导入",excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),"对应账号的权限已存在,请勿重复导入",excel));
continue; continue;
}else {
if (CommonConstants.ZERO_STRING.equals(excel.getType())){
exist = baseMapper.selectOne(Wrappers.<TSocialfundHouseRes>query().lambda()
.eq(TSocialfundHouseRes::getSocialHousehold,excel.getHouseHold())
.eq(TSocialfundHouseRes::getHouseNameType,excel.getType())
.eq(TSocialfundHouseRes::getUserId,user.getUserId())
.eq(TSocialfundHouseRes::getAuthType,CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
}else { }else {
exist = baseMapper.selectOne(Wrappers.<TSocialfundHouseRes>query().lambda() exist = baseMapper.selectOne(Wrappers.<TSocialfundHouseRes>query().lambda()
.eq(TSocialfundHouseRes::getFundHousehold,excel.getHouseHold()) .eq(TSocialfundHouseRes::getFundHousehold,excel.getHouseHold())
...@@ -314,6 +324,8 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse ...@@ -314,6 +324,8 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse
.eq(TSocialfundHouseRes::getUserId,user.getUserId()) .eq(TSocialfundHouseRes::getUserId,user.getUserId())
.eq(TSocialfundHouseRes::getAuthType,CommonConstants.ZERO_STRING) .eq(TSocialfundHouseRes::getAuthType,CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isNotNull(exist)){ if (Common.isNotNull(exist)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),"对应账号的权限已存在,请勿重复导入",excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),"对应账号的权限已存在,请勿重复导入",excel));
continue; continue;
...@@ -328,13 +340,15 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse ...@@ -328,13 +340,15 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse
save.setUserId(user.getUserId()); save.setUserId(user.getUserId());
save.setHouseNameType(baseSet.getBaseType()); save.setHouseNameType(baseSet.getBaseType());
save.setCreateTime(LocalDateTime.now()); save.setCreateTime(LocalDateTime.now());
save.setUserName(user.getUsername()); save.setUserName(user.getNickname());
save.setUserDeptName(user.getDeptName()); save.setUserDeptName(user.getDeptName());
insertExcel(save); insertExcel(save);
// 加入map 验证当前表单数据是否重复 // 加入map 验证当前表单数据是否重复
existMap.put(excel.getUserLoginName() existMap.put(excel.getUserLoginName()
+CommonConstants.DOWN_LINE_STRING +CommonConstants.DOWN_LINE_STRING
+excel.getHouseHold(),excel.getHouseHold()); +excel.getHouseHold()
+CommonConstants.DOWN_LINE_STRING
+ excel.getType(),excel.getHouseHold());
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS,CommonConstants.GREEN,excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS,CommonConstants.GREEN,excel));
} }
} }
...@@ -525,7 +539,7 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse ...@@ -525,7 +539,7 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse
save.setUserId(user.getUserId()); save.setUserId(user.getUserId());
save.setHouseNameType(type); save.setHouseNameType(type);
save.setCreateTime(LocalDateTime.now()); save.setCreateTime(LocalDateTime.now());
save.setUserName(user.getUsername()); save.setUserName(user.getNickname());
save.setUserDeptName(user.getDeptName()); save.setUserDeptName(user.getDeptName());
insertExcel(save); insertExcel(save);
// 加入map 验证当前表单数据是否重复 // 加入map 验证当前表单数据是否重复
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment