|
@@ -12,6 +12,8 @@ import com.ims.eval.service.IOrganizationStructureService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
|
+import java.net.URLDecoder;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
@@ -31,7 +33,7 @@ public class EvaluationDeptBusinessContentServiceImpl extends ServiceImpl<Evalua
|
|
if ("23031009".equals(deptId)) {//组织人事部
|
|
if ("23031009".equals(deptId)) {//组织人事部
|
|
deptId = "";
|
|
deptId = "";
|
|
}
|
|
}
|
|
- if ("null".equals(deptName)){
|
|
|
|
|
|
+ if ("null".equals(deptName)) {
|
|
deptName = "";
|
|
deptName = "";
|
|
}
|
|
}
|
|
return baseMapper.detailsList(businessPlanId, deptId, deptName);
|
|
return baseMapper.detailsList(businessPlanId, deptId, deptName);
|
|
@@ -43,54 +45,28 @@ public class EvaluationDeptBusinessContentServiceImpl extends ServiceImpl<Evalua
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public boolean saveOrUpdateBatch(List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList) {
|
|
|
|
|
|
+ public boolean saveOrUpdateBatch(List<EvaluationDeptBusinessContent> evaluationDeptBusinessContentList) throws UnsupportedEncodingException {
|
|
List<EvaluationDeptBusinessContent> list = new ArrayList<>();
|
|
List<EvaluationDeptBusinessContent> list = new ArrayList<>();
|
|
for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
|
|
for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
|
|
|
|
+ if (!"".equals(evaluationDeptBusinessContent.getTargetValue()) && null != evaluationDeptBusinessContent.getTargetValue()) {
|
|
|
|
+ String targetValue = URLDecoder.decode(evaluationDeptBusinessContent.getTargetValue(), "UTF-8");
|
|
|
|
+ evaluationDeptBusinessContent.setTargetValue(targetValue);
|
|
|
|
+ }
|
|
|
|
+ if (!"".equals(evaluationDeptBusinessContent.getCompletionStatus()) && null != evaluationDeptBusinessContent.getCompletionStatus()) {
|
|
|
|
+ String completionStatus = URLDecoder.decode(evaluationDeptBusinessContent.getCompletionStatus(), "UTF-8");
|
|
|
|
+ evaluationDeptBusinessContent.setCompletionStatus(completionStatus);
|
|
|
|
+ }
|
|
if (evaluationDeptBusinessContent.getId() == null || "".equals(evaluationDeptBusinessContent.getId())) {//新增
|
|
if (evaluationDeptBusinessContent.getId() == null || "".equals(evaluationDeptBusinessContent.getId())) {//新增
|
|
- QueryWrapper<EvaluationDeptBusinessContent> qw = new QueryWrapper<>();
|
|
|
|
- if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getBusinessPlanId())) {
|
|
|
|
- qw.lambda().like(EvaluationDeptBusinessContent::getBusinessPlanId, evaluationDeptBusinessContent.getBusinessPlanId());
|
|
|
|
- }
|
|
|
|
- if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getDeptId())) {
|
|
|
|
- qw.lambda().like(EvaluationDeptBusinessContent::getDeptId, evaluationDeptBusinessContent.getDeptId());
|
|
|
|
- }
|
|
|
|
- if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getTargetName())) {
|
|
|
|
- qw.lambda().like(EvaluationDeptBusinessContent::getTargetName, evaluationDeptBusinessContent.getTargetName());
|
|
|
|
- }
|
|
|
|
- List<EvaluationDeptBusinessContent> objList1 = super.list(qw);
|
|
|
|
- if (objList1.size() == 0) {
|
|
|
|
- List<OrganizationStructure> organizationStructureList = organizationStructureService.getTree("23031001", 1, "140");
|
|
|
|
- OrganizationStructure organizationStructure = organizationStructureList.get(0).getChildren().stream().filter(item -> item.getId().equals(evaluationDeptBusinessContent.getDeptId())).findFirst().orElse(null);
|
|
|
|
- if (null != organizationStructure) {
|
|
|
|
- evaluationDeptBusinessContent.setDeptName(organizationStructure.getName());
|
|
|
|
- evaluationDeptBusinessContent.setAuditStatusKp("-1");
|
|
|
|
- evaluationDeptBusinessContent.setCreateTime(DateUtil.date());
|
|
|
|
- list.add(evaluationDeptBusinessContent);
|
|
|
|
- }
|
|
|
|
|
|
+ List<OrganizationStructure> organizationStructureList = organizationStructureService.getTree("23031001", 1, "140");
|
|
|
|
+ OrganizationStructure organizationStructure = organizationStructureList.get(0).getChildren().stream().filter(item -> item.getId().equals(evaluationDeptBusinessContent.getDeptId())).findFirst().orElse(null);
|
|
|
|
+ if (null != organizationStructure) {
|
|
|
|
+ evaluationDeptBusinessContent.setDeptName(organizationStructure.getName());
|
|
|
|
+ evaluationDeptBusinessContent.setAuditStatusKp("-1");
|
|
|
|
+ evaluationDeptBusinessContent.setCreateTime(DateUtil.date());
|
|
|
|
+ list.add(evaluationDeptBusinessContent);
|
|
}
|
|
}
|
|
} else {//修改
|
|
} else {//修改
|
|
- evaluationDeptBusinessContent.setCreateDept(null);
|
|
|
|
- EvaluationDeptBusinessContent obj = super.getById(evaluationDeptBusinessContent.getId());
|
|
|
|
- if (null != obj) {
|
|
|
|
- if (obj.getTargetName().equals(evaluationDeptBusinessContent.getTargetName())) {
|
|
|
|
- list.add(evaluationDeptBusinessContent);
|
|
|
|
- } else {
|
|
|
|
- QueryWrapper<EvaluationDeptBusinessContent> qw = new QueryWrapper<>();
|
|
|
|
- if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getBusinessPlanId())) {
|
|
|
|
- qw.lambda().like(EvaluationDeptBusinessContent::getBusinessPlanId, evaluationDeptBusinessContent.getBusinessPlanId());
|
|
|
|
- }
|
|
|
|
- if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getDeptId())) {
|
|
|
|
- qw.lambda().like(EvaluationDeptBusinessContent::getDeptId, evaluationDeptBusinessContent.getDeptId());
|
|
|
|
- }
|
|
|
|
- if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getTargetName())) {
|
|
|
|
- qw.lambda().like(EvaluationDeptBusinessContent::getTargetName, evaluationDeptBusinessContent.getTargetName());
|
|
|
|
- }
|
|
|
|
- List<EvaluationDeptBusinessContent> objList3 = super.list(qw);
|
|
|
|
- if (objList3.size() == 0) {
|
|
|
|
- list.add(evaluationDeptBusinessContent);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ list.add(evaluationDeptBusinessContent);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return super.saveOrUpdateBatch(list);
|
|
return super.saveOrUpdateBatch(list);
|
|
@@ -107,10 +83,10 @@ public class EvaluationDeptBusinessContentServiceImpl extends ServiceImpl<Evalua
|
|
for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
|
|
for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
|
|
QueryWrapper<EvaluationDeptBusinessContent> qw = new QueryWrapper<>();
|
|
QueryWrapper<EvaluationDeptBusinessContent> qw = new QueryWrapper<>();
|
|
if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getBusinessPlanId())) {
|
|
if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getBusinessPlanId())) {
|
|
- qw.lambda().like(EvaluationDeptBusinessContent::getBusinessPlanId, evaluationDeptBusinessContent.getBusinessPlanId());
|
|
|
|
|
|
+ qw.lambda().eq(EvaluationDeptBusinessContent::getBusinessPlanId, evaluationDeptBusinessContent.getBusinessPlanId());
|
|
}
|
|
}
|
|
if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getTargetName())) {
|
|
if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getTargetName())) {
|
|
- qw.lambda().like(EvaluationDeptBusinessContent::getTargetName, evaluationDeptBusinessContent.getTargetName());
|
|
|
|
|
|
+ qw.lambda().eq(EvaluationDeptBusinessContent::getTargetName, evaluationDeptBusinessContent.getTargetName());
|
|
}
|
|
}
|
|
List<EvaluationDeptBusinessContent> objList = super.list(qw);
|
|
List<EvaluationDeptBusinessContent> objList = super.list(qw);
|
|
if (objList.size() == 1) {//修改
|
|
if (objList.size() == 1) {//修改
|
|
@@ -138,10 +114,10 @@ public class EvaluationDeptBusinessContentServiceImpl extends ServiceImpl<Evalua
|
|
for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
|
|
for (EvaluationDeptBusinessContent evaluationDeptBusinessContent : evaluationDeptBusinessContentList) {
|
|
QueryWrapper<EvaluationDeptBusinessContent> qw = new QueryWrapper<>();
|
|
QueryWrapper<EvaluationDeptBusinessContent> qw = new QueryWrapper<>();
|
|
if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getBusinessPlanId())) {
|
|
if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getBusinessPlanId())) {
|
|
- qw.lambda().like(EvaluationDeptBusinessContent::getBusinessPlanId, evaluationDeptBusinessContent.getBusinessPlanId());
|
|
|
|
|
|
+ qw.lambda().eq(EvaluationDeptBusinessContent::getBusinessPlanId, evaluationDeptBusinessContent.getBusinessPlanId());
|
|
}
|
|
}
|
|
if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getTargetName())) {
|
|
if (StringUtils.isNotEmpty(evaluationDeptBusinessContent.getTargetName())) {
|
|
- qw.lambda().like(EvaluationDeptBusinessContent::getTargetName, evaluationDeptBusinessContent.getTargetName());
|
|
|
|
|
|
+ qw.lambda().eq(EvaluationDeptBusinessContent::getTargetName, evaluationDeptBusinessContent.getTargetName());
|
|
}
|
|
}
|
|
List<EvaluationDeptBusinessContent> objList = super.list(qw);
|
|
List<EvaluationDeptBusinessContent> objList = super.list(qw);
|
|
if (objList.size() == 1) {//修改
|
|
if (objList.size() == 1) {//修改
|