Merge branch 'develop' of http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization into feature/dxf
This commit is contained in:
commit
560c1e0336
|
|
@ -320,8 +320,18 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
public Integer updateCustomTemplate(Map<String, Object> params) {
|
||||
int rowNum = Util.getIntValue((String) params.get("rownum"));
|
||||
int count = 0;
|
||||
List<Long> allIds = MapperProxyFactory.getProxy(JclOrgCustomTemplateMapper.class).listAllId();
|
||||
List<Long> allIds = getJclOrgCustomTemplateMapper().listAllId();
|
||||
String currentDate = OrganizationDateUtil.getFormatLocalDate(new java.util.Date());
|
||||
List<String> nameList = new ArrayList<>();
|
||||
for (int i = 0; i < rowNum; i++) {
|
||||
String recordIndex = "_" + i;
|
||||
String name = Util.null2String(params.get("name" + recordIndex));
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
nameList.add(name);
|
||||
}
|
||||
}
|
||||
|
||||
OrganizationAssert.isFalse(new HashSet<>(nameList).size() < nameList.size(), "模板名称不能重复");
|
||||
for (int i = 0; i < rowNum; i++) {
|
||||
String recordIndex = "_" + i;
|
||||
String id = Util.null2String(params.get("id" + recordIndex));
|
||||
|
|
@ -337,6 +347,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
allIds.remove(jclId);
|
||||
} else {
|
||||
//插入
|
||||
OrganizationAssert.isFalse("".equals(name), "模板名称不能为空");
|
||||
jclOrgCustomTemplatePO.setName(name);
|
||||
jclOrgCustomTemplatePO.setCreator(user.getUID());
|
||||
jclOrgCustomTemplatePO.setCreateTime(new java.sql.Date(OrganizationDateUtil.stringToDate(currentDate).getTime()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue