Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+13
-11
@@ -65,12 +65,12 @@ public class AuthDummyInventoryInfoEOEn implements Serializable {
|
||||
private String category;
|
||||
|
||||
/**检验项目*/
|
||||
@Excel(name = "Inspection Items", width = 15)
|
||||
@Excel(name = "Inspection Items", width = 30)
|
||||
@ApiModelProperty(value = "检验项目")
|
||||
private String inspectionItem;
|
||||
|
||||
/**配置项*/
|
||||
@Excel(name = "Configuration Item", width = 15)
|
||||
@Excel(name = "Configuration Item", width = 30)
|
||||
@ApiModelProperty(value = "配置项")
|
||||
private String configItem;
|
||||
|
||||
@@ -88,7 +88,7 @@ public class AuthDummyInventoryInfoEOEn implements Serializable {
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
private String dutyTerritory;
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "Responsible Field", width = 15)
|
||||
@Excel(name = "Responsible Field", width = 30)
|
||||
// 责任领域名称
|
||||
private String dutyTerritoryName;
|
||||
/**责任领域名称-英文**/
|
||||
@@ -100,25 +100,27 @@ public class AuthDummyInventoryInfoEOEn implements Serializable {
|
||||
@ApiModelProperty(value = "交付物")
|
||||
private String deliverable;
|
||||
|
||||
/**交付物模板*/
|
||||
@ApiModelProperty(value = "交付物模板")
|
||||
private java.lang.String deliverableTemplate;
|
||||
/**交付物模板名称**/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "Deliverable Template", width = 40)
|
||||
private String deliverableTemplateName;
|
||||
|
||||
|
||||
/**交付物类型*/
|
||||
@ApiModelProperty(value = "交付物类型")
|
||||
private String deliverableType;
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "Deliverable Type", width = 15)
|
||||
@Excel(name = "Deliverable Type", width = 30)
|
||||
// 交付物类型名称
|
||||
private String deliverableTypeName;
|
||||
// 交付物类型名称-英文
|
||||
@TableField(exist = false)
|
||||
private String deliverableTypeNameEn;
|
||||
|
||||
/**交付物模板*/
|
||||
@ApiModelProperty(value = "交付物模板")
|
||||
private java.lang.String deliverableTemplate;
|
||||
/**交付物模板名称**/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "Deliverable Template", width = 30)
|
||||
private String deliverableTemplateName;
|
||||
|
||||
/**文档库id*/
|
||||
// @Excel(name = "文档库id", width = 15)
|
||||
@ApiModelProperty(value = "文档库id")
|
||||
|
||||
+120
-21
@@ -164,6 +164,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
private IOSSFileService iOSSFileService;
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
@Autowired
|
||||
private IProjectLibraryRoleRelEOService projectLibraryRoleRelEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -266,10 +268,22 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
saveOrUpdate(projectCertificationInventoryEO);
|
||||
|
||||
|
||||
// //获取责任人的所有用户
|
||||
// List<SysUser> listUserName = new ArrayList<>();
|
||||
// listUserName = sysUserMapper.getListUserName();
|
||||
// listUserName = listUserName.stream().distinct().collect(Collectors.toList());
|
||||
//获取当前的projectId
|
||||
String projectId = projectCertificationInventoryEO.getProjectLibraryId();
|
||||
String cut = projectCertificationInventoryEO.getCut();
|
||||
//获取当前用户
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("projectLibraryId",projectId);
|
||||
params.put("userId",currentUser.getId());
|
||||
params.put("modelType",RoleRelModelTypeEnum.CERTIFICATION_INVENTORY.getValue());
|
||||
ProjectLibraryRoleRelEO projectLibraryRoleRelEO = projectLibraryRoleRelEOService.queryByProjectLibraryIdAndUserId(params);
|
||||
String roleCode = projectLibraryRoleRelEO.getRoleCode();
|
||||
|
||||
// //判断当前用户与studio工程师是否一致,一致的话具有studio角色的切换
|
||||
// if(studionList.contains(currentUser)){
|
||||
// //用户有studio工程师的操作
|
||||
// }
|
||||
|
||||
//获取当前的责任人
|
||||
String dutyPerson = projectCertificationInventoryEO.getDutyPerson();
|
||||
@@ -277,30 +291,115 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
List<String> dutyTerritoryList = new ArrayList<>();
|
||||
dutyTerritoryList = Arrays.asList(projectCertificationInventoryEO.getDutyTerritory().split(","));
|
||||
dutyTerritoryList = dutyTerritoryList.stream().distinct().collect(Collectors.toList());
|
||||
//获取当前的projectId
|
||||
String projectId = projectCertificationInventoryEO.getProjectLibraryId();
|
||||
|
||||
//根据责任领域个projectId去查相关人员名单
|
||||
List<ProjectRelatedPersonnel> projectRelatedPersonnelList = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritoy(projectId, dutyTerritoryList);
|
||||
|
||||
//根据相关人员名单获取的工程接口人
|
||||
List<String> allList = new ArrayList<>();
|
||||
List<String> enginnerList = new ArrayList<>();
|
||||
List<String> lawEnginnerList = new ArrayList<>();
|
||||
List<String> enginnerLawSetList = new ArrayList<>();
|
||||
List<String> enginnerAttSetList = new ArrayList<>();
|
||||
//根据相关人员名单获取的工程接口人
|
||||
for(ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList){
|
||||
enginnerList.add(relatedPersonnel.getEngineeringInterfacePerson());
|
||||
}
|
||||
for(ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList){
|
||||
//如果工程接口人不为空的话
|
||||
if(enginnerList.size()>0){
|
||||
//判断哪个不存在 再去去存入
|
||||
if(!enginnerList.contains(dutyPerson)){
|
||||
relatedPersonnel.setEngineerAttSet(dutyPerson);
|
||||
// projectRelatedPersonnelService.editById(relatedPersonnel);
|
||||
}
|
||||
}else {
|
||||
//工程接口人为空的话,直接将责任设置到认证工程师下
|
||||
relatedPersonnel.setEngineerAttSet(dutyPerson);
|
||||
// projectRelatedPersonnelService.editById(relatedPersonnel);
|
||||
String enginneringInterfacePerson = relatedPersonnel.getEngineeringInterfacePerson();
|
||||
if(!StringUtils.isEmpty(enginneringInterfacePerson)){
|
||||
enginnerList = Arrays.stream(enginneringInterfacePerson.split(",")).collect(Collectors.toList());
|
||||
allList.addAll(enginnerList);
|
||||
}
|
||||
}
|
||||
//获取相关人员名单中的法规工程师
|
||||
for(ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList){
|
||||
String lawEngineer = relatedPersonnel.getLawEngineer();
|
||||
if(!StringUtils.isEmpty(lawEngineer)){
|
||||
lawEnginnerList = Arrays.stream(lawEngineer.split(",")).collect(Collectors.toList());
|
||||
allList.addAll(lawEnginnerList);
|
||||
}
|
||||
}
|
||||
//获取相关人员名单中的工程接口-法规工程师设置
|
||||
for(ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList){
|
||||
String engineerLawSet = relatedPersonnel.getEngineerLawSet();
|
||||
if(!StringUtils.isEmpty(engineerLawSet)){
|
||||
enginnerLawSetList = Arrays.stream(engineerLawSet.split(",")).collect(Collectors.toList());
|
||||
allList.addAll(enginnerLawSetList);
|
||||
}
|
||||
}
|
||||
//获取相关人员名单中的工程接口-认证工程师设置
|
||||
for(ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList){
|
||||
String engineerAttSet = relatedPersonnel.getEngineerAttSet();
|
||||
if(!StringUtils.isEmpty(engineerAttSet)){
|
||||
enginnerAttSetList = Arrays.stream(engineerAttSet.split(",")).collect(Collectors.toList());
|
||||
allList.addAll(enginnerAttSetList);
|
||||
}
|
||||
}
|
||||
//获取当前项目库id的studio工程师和认证工程师
|
||||
List<String> studionList = new ArrayList<>();
|
||||
List<String> certificationEngineerList = new ArrayList<>();
|
||||
List<ProjectLibraryBase> projectLibraryBases = projectLibraryBaseService.queryById(projectId, cut);
|
||||
for(ProjectLibraryBase projectLibraryBase : projectLibraryBases){
|
||||
studionList.add(projectLibraryBase.getStudioEngineer());
|
||||
|
||||
String certificationEngineer = projectLibraryBase.getCertificationEngineer();
|
||||
if(!StringUtils.isEmpty(certificationEngineer)){
|
||||
certificationEngineerList = Arrays.stream(certificationEngineer.split(",")).collect(Collectors.toList());
|
||||
allList.addAll(certificationEngineerList);
|
||||
}
|
||||
}
|
||||
// studionList = studionList.stream().distinct().collect(Collectors.toList());
|
||||
// certificationEngineerList = certificationEngineerList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
allList = allList.stream().distinct().collect(Collectors.toList());
|
||||
for(String all : allList){
|
||||
if(all.equals("")){
|
||||
allList.remove(all);
|
||||
}
|
||||
}
|
||||
|
||||
//遍历所有人alllist中是否包含责任人,如果包含,不用操作。
|
||||
//-------如果不包含,再去判断当前用户的角色是studio、法规还是认证
|
||||
for(ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList){
|
||||
if(allList.size()>0){
|
||||
if(!allList.contains(dutyPerson)){
|
||||
|
||||
if(roleCode.equals(com.jero.modules.project.enums.ProjectRoleEnum.STUDIO_ENGINEER.getValue())){
|
||||
if(relatedPersonnel.getEngineeringInterfacePerson() != null){
|
||||
String engineeringInterfacePerson = dutyPerson+","+relatedPersonnel.getEngineeringInterfacePerson();
|
||||
relatedPersonnel.setEngineeringInterfacePerson(engineeringInterfacePerson);
|
||||
}else {
|
||||
relatedPersonnel.setEngineeringInterfacePerson(dutyPerson);
|
||||
}
|
||||
}else if(roleCode.equals(com.jero.modules.project.enums.ProjectRoleEnum.REGULATI_ENGINEER.getValue())){
|
||||
if(relatedPersonnel.getEngineerLawSet() != null){
|
||||
String engineerLawSet = dutyPerson+","+relatedPersonnel.getEngineerLawSet();
|
||||
relatedPersonnel.setEngineerLawSet(engineerLawSet);
|
||||
}else {
|
||||
relatedPersonnel.setEngineerLawSet(dutyPerson);
|
||||
}
|
||||
}else if(roleCode.equals(com.jero.modules.project.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue())){
|
||||
if(relatedPersonnel.getEngineerAttSet() !=null){
|
||||
String engineerAttSet = dutyPerson+","+relatedPersonnel.getEngineerAttSet();
|
||||
relatedPersonnel.setEngineerAttSet(engineerAttSet);
|
||||
}else {
|
||||
relatedPersonnel.setEngineerAttSet(dutyPerson);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// for(ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList){
|
||||
// //如果工程接口人不为空的话
|
||||
// if(enginnerList.size()>0){
|
||||
// //判断哪个不存在 再去去存入
|
||||
// if(!enginnerList.contains(dutyPerson)){
|
||||
// relatedPersonnel.setEngineerAttSet(dutyPerson);
|
||||
//// projectRelatedPersonnelService.editById(relatedPersonnel);
|
||||
// }
|
||||
// }else {
|
||||
// //工程接口人为空的话,直接将责任设置到认证工程师下
|
||||
// relatedPersonnel.setEngineerAttSet(dutyPerson);
|
||||
//// projectRelatedPersonnelService.editById(relatedPersonnel);
|
||||
// }
|
||||
// }
|
||||
|
||||
this.projectRelatedPersonnelService.updateBatchById(projectRelatedPersonnelList);
|
||||
|
||||
|
||||
+144
-50
@@ -258,6 +258,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
|
||||
@Autowired
|
||||
private ISysDictItemService sysDictItemService;
|
||||
@Autowired
|
||||
private IProjectLibraryRoleRelEOService projectLibraryRoleRelEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -517,72 +519,164 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
this.update(projectLawsInventoryEO,updateWrapper);
|
||||
// saveOrUpdate(projectLawsInventoryEO);
|
||||
|
||||
//获取编辑中的责任领域
|
||||
List<String> dutyTerritoryList = new ArrayList<>();
|
||||
dutyTerritoryList = Arrays.asList(projectLawsInventoryEO.getDutyTerritory().split(","));
|
||||
dutyTerritoryList = dutyTerritoryList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
//获取当前的projectLibrartId
|
||||
String projectLibrartId = projectLawsInventoryEO.getProjectLibraryId();
|
||||
String cut = projectLawsInventoryEO.getCut();
|
||||
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
params.put("projectLibraryId",projectLibrartId);
|
||||
params.put("userId",currentUser.getId());
|
||||
params.put("modelType",RoleRelModelTypeEnum.LAWS_INVENTORY.getValue());
|
||||
ProjectLibraryRoleRelEO projectLibraryRoleRelEO = projectLibraryRoleRelEOService.queryByProjectLibraryIdAndUserId(params);
|
||||
String roleCode1 = projectLibraryRoleRelEO.getRoleCode();
|
||||
//分别获取当前编辑中的设计符合性和认证符合性责任人
|
||||
List<String> designDutyIdList = new ArrayList<>();
|
||||
designDutyIdList = Arrays.asList(projectLawsInventoryEO.getDesignDutyId().split(","));
|
||||
designDutyIdList = designDutyIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<String> verifyDutyIdList = new ArrayList<>();
|
||||
verifyDutyIdList = Arrays.asList(projectLawsInventoryEO.getVerifyDutyId().split(","));
|
||||
verifyDutyIdList = verifyDutyIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
//allList 为法规工程师中验证符合性和确认符合中的责任人
|
||||
List<String> allList = new ArrayList<>();
|
||||
// allList = Arrays.asList(designDutyIdList.toString()+","+verifyDutyIdList.toString());
|
||||
allList.addAll(designDutyIdList);
|
||||
allList.addAll(verifyDutyIdList);
|
||||
allList = allList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
//allDutyList 为法规工程师中验证符合性和确认符合中的责任人
|
||||
List<String> allDutyList = new ArrayList<>();
|
||||
allDutyList.addAll(designDutyIdList);
|
||||
allDutyList.addAll(verifyDutyIdList);
|
||||
allDutyList = allDutyList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
//获取相关责任领域下的和projectLibrartId的相关人员名单的信息
|
||||
List<ProjectRelatedPersonnel> projectRelatedPersonnelList = projectRelatedPersonnelService.queryByProjectIdAndDutyTerritoy(projectLibrartId, dutyTerritoryList);
|
||||
|
||||
//enginnerList为每一条的工程接口人的集合
|
||||
List<String> allList = new ArrayList<>();
|
||||
List<String> enginnerList = new ArrayList<>();
|
||||
for(ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnelList){
|
||||
enginnerList.add(projectRelatedPersonnel.getEngineeringInterfacePerson());
|
||||
}
|
||||
if(projectRelatedPersonnelList.size()>0){
|
||||
for(ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnelList){
|
||||
if(enginnerList.size()<0){
|
||||
//直接将allList存入到
|
||||
String all = String.join(",",allList);
|
||||
projectRelatedPersonnel.setEngineerLawSet(all);
|
||||
// projectRelatedPersonnelService.editById(projectRelatedPersonnel);
|
||||
|
||||
}else {
|
||||
enginnerList = enginnerList.stream().distinct().collect(Collectors.toList());
|
||||
//比较allList中有而enginnerList中没有的工程接口人
|
||||
allList.removeAll(enginnerList);
|
||||
// if(allList.size()>0){
|
||||
// flag = CollectionUtils.isEqualCollection(allList,enginnerList);
|
||||
// if(!flag){
|
||||
// //进行遍历两个list,将allList中有的而enginnerList没有的存入到相关人员名单中的法规那里
|
||||
//
|
||||
// for(String all : allList){
|
||||
// boolean flag1 = true;
|
||||
// for(String enginner : enginnerList){
|
||||
// if(all.equals(enginner)){
|
||||
// flag1 = false;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if(flag1){
|
||||
// resultList.add(all);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//将相关人员名单中没有的resultList添加到相关人员记录表中
|
||||
String result = String.join(",",allList);
|
||||
projectRelatedPersonnel.setEngineerLawSet(result);
|
||||
// projectRelatedPersonnelService.editById(projectRelatedPersonnel);
|
||||
}
|
||||
List<String> lawEnginnerList = new ArrayList<>();
|
||||
List<String> enginnerLawSetList = new ArrayList<>();
|
||||
List<String> enginnerAttSetList = new ArrayList<>();
|
||||
//根据相关人员名单获取的工程接口人
|
||||
for(ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList){
|
||||
String enginneringInterfacePerson = relatedPersonnel.getEngineeringInterfacePerson();
|
||||
if(!StringUtils.isEmpty(enginneringInterfacePerson)){
|
||||
enginnerList = Arrays.stream(enginneringInterfacePerson.split(",")).collect(Collectors.toList());
|
||||
allList.addAll(enginnerList);
|
||||
}
|
||||
}
|
||||
//获取相关人员名单中的法规工程师
|
||||
for(ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList){
|
||||
String lawEngineer = relatedPersonnel.getLawEngineer();
|
||||
if(!StringUtils.isEmpty(lawEngineer)){
|
||||
lawEnginnerList = Arrays.stream(lawEngineer.split(",")).collect(Collectors.toList());
|
||||
allList.addAll(lawEnginnerList);
|
||||
}
|
||||
}
|
||||
//获取相关人员名单中的工程接口-法规工程师设置
|
||||
for(ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList){
|
||||
String engineerLawSet = relatedPersonnel.getEngineerLawSet();
|
||||
if(!StringUtils.isEmpty(engineerLawSet)){
|
||||
enginnerLawSetList = Arrays.stream(engineerLawSet.split(",")).collect(Collectors.toList());
|
||||
allList.addAll(enginnerLawSetList);
|
||||
}
|
||||
}
|
||||
//获取相关人员名单中的工程接口-认证工程师设置
|
||||
for(ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList){
|
||||
String engineerAttSet = relatedPersonnel.getEngineerAttSet();
|
||||
if(!StringUtils.isEmpty(engineerAttSet)){
|
||||
enginnerAttSetList = Arrays.stream(engineerAttSet.split(",")).collect(Collectors.toList());
|
||||
allList.addAll(enginnerAttSetList);
|
||||
}
|
||||
}
|
||||
//获取当前项目库id的studio工程师和认证工程师
|
||||
List<String> studionList = new ArrayList<>();
|
||||
List<String> certificationEngineerList = new ArrayList<>();
|
||||
List<ProjectLibraryBase> projectLibraryBases = projectLibraryBaseService.queryById(projectLibrartId, cut);
|
||||
for(ProjectLibraryBase projectLibraryBase : projectLibraryBases){
|
||||
studionList.add(projectLibraryBase.getStudioEngineer());
|
||||
|
||||
String certificationEngineer = projectLibraryBase.getCertificationEngineer();
|
||||
if(!StringUtils.isEmpty(certificationEngineer)){
|
||||
certificationEngineerList = Arrays.stream(certificationEngineer.split(",")).collect(Collectors.toList());
|
||||
allList.addAll(certificationEngineerList);
|
||||
}
|
||||
}
|
||||
allList = allList.stream().distinct().collect(Collectors.toList());
|
||||
for(String all : allList){
|
||||
if(all.equals("")){
|
||||
allList.remove(all);
|
||||
}
|
||||
}
|
||||
//遍历所有人alllist中是否包含责任人,如果包含,不用操作。
|
||||
//-------如果不包含,再去判断当前用户的角色是studio、法规还是认证
|
||||
for(ProjectRelatedPersonnel relatedPersonnel : projectRelatedPersonnelList){
|
||||
if(allList.size()>0){
|
||||
for(String allDuty : allDutyList){
|
||||
String dutyPerson = allDuty;
|
||||
if(!allList.contains(dutyPerson)){
|
||||
if(roleCode1.equals(com.jero.modules.project.enums.ProjectRoleEnum.STUDIO_ENGINEER.getValue())){
|
||||
if(relatedPersonnel.getEngineeringInterfacePerson() != null){
|
||||
String engineeringInterfacePerson = dutyPerson+","+relatedPersonnel.getEngineeringInterfacePerson();
|
||||
relatedPersonnel.setEngineeringInterfacePerson(engineeringInterfacePerson);
|
||||
}else {
|
||||
relatedPersonnel.setEngineeringInterfacePerson(dutyPerson);
|
||||
}
|
||||
}else if(roleCode1.equals(com.jero.modules.project.enums.ProjectRoleEnum.REGULATI_ENGINEER.getValue())){
|
||||
if(relatedPersonnel.getEngineerLawSet() != null){
|
||||
String engineerLawSet = dutyPerson+","+relatedPersonnel.getEngineerLawSet();
|
||||
relatedPersonnel.setEngineerLawSet(engineerLawSet);
|
||||
}else {
|
||||
relatedPersonnel.setEngineerLawSet(dutyPerson);
|
||||
}
|
||||
}else if(roleCode1.equals(com.jero.modules.project.enums.ProjectRoleEnum.HOMOLOGATION_ENGINEER.getValue())){
|
||||
if(relatedPersonnel.getEngineerAttSet() !=null){
|
||||
String engineerAttSet = dutyPerson+","+relatedPersonnel.getEngineerAttSet();
|
||||
relatedPersonnel.setEngineerAttSet(engineerAttSet);
|
||||
}else {
|
||||
relatedPersonnel.setEngineerAttSet(dutyPerson);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// if(projectRelatedPersonnelList.size()>0){
|
||||
// for(ProjectRelatedPersonnel projectRelatedPersonnel : projectRelatedPersonnelList){
|
||||
// if(enginnerList.size()<0){
|
||||
// //直接将allList存入到
|
||||
// String all = String.join(",",allDutyList);
|
||||
// projectRelatedPersonnel.setEngineerLawSet(all);
|
||||
//// projectRelatedPersonnelService.editById(projectRelatedPersonnel);
|
||||
//
|
||||
// }else {
|
||||
// enginnerList = enginnerList.stream().distinct().collect(Collectors.toList());
|
||||
// //比较allList中有而enginnerList中没有的工程接口人
|
||||
// allDutyList.removeAll(enginnerList);
|
||||
//// if(allDutyList.size()>0){
|
||||
//// flag = CollectionUtils.isEqualCollection(allDutyList,enginnerList);
|
||||
//// if(!flag){
|
||||
//// //进行遍历两个list,将allList中有的而enginnerList没有的存入到相关人员名单中的法规那里
|
||||
////
|
||||
//// for(String all : allDutyList){
|
||||
//// boolean flag1 = true;
|
||||
//// for(String enginner : enginnerList){
|
||||
//// if(all.equals(enginner)){
|
||||
//// flag1 = false;
|
||||
//// break;
|
||||
//// }
|
||||
//// }
|
||||
//// if(flag1){
|
||||
//// resultList.add(all);
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
//// }
|
||||
// //将相关人员名单中没有的resultList添加到相关人员记录表中
|
||||
// String result = String.join(",",allDutyList);
|
||||
// projectRelatedPersonnel.setEngineerLawSet(result);
|
||||
//// projectRelatedPersonnelService.editById(projectRelatedPersonnel);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
this.projectRelatedPersonnelService.updateBatchById(projectRelatedPersonnelList);
|
||||
|
||||
|
||||
|
||||
+7
-7
@@ -422,11 +422,11 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
engineerLawSetUsers = sysUserMapper.selectList(userqueryWrapper);
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(engineerLawSetUsers)) {
|
||||
String engineerAttSetId = projectRelatedPersonnel.getEngineerAttSet();
|
||||
String engineerLawSetId = projectRelatedPersonnel.getEngineerLawSet();
|
||||
String engineerLawSetName = null;
|
||||
StringBuilder lawSetName = new StringBuilder();
|
||||
for (String data : engineerLawSetIdList) {
|
||||
if (StringUtils.isNotEmpty(engineerAttSetId)) {
|
||||
if (StringUtils.isNotEmpty(engineerLawSetId)) {
|
||||
engineerLawSetName = engineerLawSetUsers.stream().filter(e -> data.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(","));
|
||||
}
|
||||
@@ -837,10 +837,10 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
try {
|
||||
String titleOne = "";
|
||||
if (CutEnum.CN.getValue().equals(projectRelatedPersonnel.getCut())) {
|
||||
titleOne = "责任领域,法规工程师,工程接口人,工程接口人-法规工程师设置,工程接口人-认证工程师设置,备注";
|
||||
titleOne = "责任领域,法规工程师,工程接口人,备注";
|
||||
fileOriName = "相关人员导入模板.xls";
|
||||
} else {
|
||||
titleOne = "Responsible Field,Regulation Engineer,Engineering Interface,Project Interface Person - Regulation Engineer Setting,Project Interface Person - Certification Engineer Setting,Comments";
|
||||
titleOne = "Responsible Field,Regulation Engineer,Engineering Interface,Comments";
|
||||
fileOriName = "Import template of related personnel.xls";
|
||||
}
|
||||
|
||||
@@ -867,7 +867,7 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
cellStyleTemp.setWrapText(true);//自动换行
|
||||
|
||||
int startLine = 0;
|
||||
int endLine = 5;
|
||||
int endLine = 3;
|
||||
//合并单元格
|
||||
CellRangeAddress region1 =
|
||||
new CellRangeAddress(1, 1, startLine, endLine); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
|
||||
@@ -881,14 +881,14 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
+ "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是正式数据;\n"
|
||||
+ "2.填写人员时,必须使用人员账号进行填写;\n"
|
||||
+ "3.填写的人员账号必须与系统中账号保持一致;\n"
|
||||
+ "4.填写任意一责任领域内工程师人员时,必须填写法规工程师、工程接口人、工程接口人-法规工程师设置、工程接口人-认证工程师设置四个字段信息。";
|
||||
+ "4.填写任意一责任领域内工程师人员时,必须填写法规工程师、工程接口人两个字段信息。";
|
||||
} else {
|
||||
explainInfo =
|
||||
"filling explanation\n"
|
||||
+ "1. Import data from the third line, the first line is header, the second line is description, and the third line is official data;\n"
|
||||
+ "2. When filling in personnel, personnel account must be used to fill in;\n"
|
||||
+ "3. The personnel account number filled in must be consistent with the account number in the system;\n"
|
||||
+ "4. When filling in the engineers in any responsibility field, you must fill in the information of three fields: legal engineer, engineering interface person ,Project Interface Person - Regulation Engineer Setting and Project Interface Person - Certification Engineer Setting.";
|
||||
+ "4. When filling in the engineers in any responsibility field, you must fill in the information of three fields: legal engineer, engineering interface person .";
|
||||
}
|
||||
HSSFRichTextString explain = new HSSFRichTextString(explainInfo);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user