Commit 5ef38f66 by zhiwj

受审项

parent 06bfb93b
...@@ -35,6 +35,7 @@ public class AuditorAuditedGroupRelServiceImpl implements AuditorAuditedGroupRel ...@@ -35,6 +35,7 @@ public class AuditorAuditedGroupRelServiceImpl implements AuditorAuditedGroupRel
@Override @Override
public void addOrUpdateRel(Integer enterpriseId, Integer auditorId, List<Integer> auditedGroupIdList) { public void addOrUpdateRel(Integer enterpriseId, Integer auditorId, List<Integer> auditedGroupIdList) {
if (CollectionUtils.isNotEmpty(auditedGroupIdList)) {
// 把所有auditorId的关联status设置为0 // 把所有auditorId的关联status设置为0
tabAuditorAuditedGroupRelMapper.delByAuditorId(auditorId); tabAuditorAuditedGroupRelMapper.delByAuditorId(auditorId);
// 插入不存在的关联 // 插入不存在的关联
...@@ -50,6 +51,7 @@ public class AuditorAuditedGroupRelServiceImpl implements AuditorAuditedGroupRel ...@@ -50,6 +51,7 @@ public class AuditorAuditedGroupRelServiceImpl implements AuditorAuditedGroupRel
// 把所有auditedGroup关联status都设置为1 // 把所有auditedGroup关联status都设置为1
tabAuditorAuditedGroupRelMapper.updateStatusByAuditedGroupIds(enterpriseId, auditorId, auditedGroupIdList); tabAuditorAuditedGroupRelMapper.updateStatusByAuditedGroupIds(enterpriseId, auditorId, auditedGroupIdList);
} }
}
@Override @Override
public void delRelByAuditorId(Integer auditorId) { public void delRelByAuditorId(Integer auditorId) {
......
...@@ -14,6 +14,7 @@ import com.gic.enterprise.dto.ProjectDTO; ...@@ -14,6 +14,7 @@ import com.gic.enterprise.dto.ProjectDTO;
import com.gic.enterprise.service.ProjectApiService; import com.gic.enterprise.service.ProjectApiService;
import com.gic.enterprise.utils.ResultControllerUtils; import com.gic.enterprise.utils.ResultControllerUtils;
import com.gic.enterprise.utils.UserDetailUtils; import com.gic.enterprise.utils.UserDetailUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -47,8 +48,10 @@ public class AuditorController { ...@@ -47,8 +48,10 @@ public class AuditorController {
auditorDTO.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId()); auditorDTO.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
List<Integer> projectItemList = Stream.of(auditorQO.getProjectItems().split(GlobalInfo.FLAG_COMMA)).map(Integer::valueOf).collect(Collectors.toList()); List<Integer> projectItemList = Stream.of(auditorQO.getProjectItems().split(GlobalInfo.FLAG_COMMA)).map(Integer::valueOf).collect(Collectors.toList());
auditorDTO.setProjectItemList(projectItemList); auditorDTO.setProjectItemList(projectItemList);
if (StringUtils.isNotBlank(auditorQO.getAuditedGroupIds())) {
List<Integer> auditedGroupIdList = Stream.of(auditorQO.getAuditedGroupIds().split(GlobalInfo.FLAG_COMMA)).map(Integer::valueOf).collect(Collectors.toList()); List<Integer> auditedGroupIdList = Stream.of(auditorQO.getAuditedGroupIds().split(GlobalInfo.FLAG_COMMA)).map(Integer::valueOf).collect(Collectors.toList());
auditorDTO.setAuditedGroupIdList(auditedGroupIdList); auditorDTO.setAuditedGroupIdList(auditedGroupIdList);
}
ServiceResponse<String> response = auditorApiService.saveOrUpdateAuditor(auditorDTO); ServiceResponse<String> response = auditorApiService.saveOrUpdateAuditor(auditorDTO);
if (response.isSuccess()) { if (response.isSuccess()) {
LogUtils.createLog((auditorQO.getAuditorId() == null ? "新增" : "修改") + "审核员", auditorQO.getAuditorName()); LogUtils.createLog((auditorQO.getAuditorId() == null ? "新增" : "修改") + "审核员", auditorQO.getAuditorName());
......
...@@ -49,7 +49,7 @@ public class AuditorQO { ...@@ -49,7 +49,7 @@ public class AuditorQO {
/** /**
* 受审组id * 受审组id
*/ */
@NotBlank(message = "受审组不能为空", groups = SaveValid.class) // @NotBlank(message = "受审组不能为空", groups = SaveValid.class)
private String auditedGroupIds; private String auditedGroupIds;
public Integer getAuditorId() { public Integer getAuditorId() {
......
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