Commit c9f55fa3 authored by fangxinjiang's avatar fangxinjiang

权限批量导入

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