|
@@ -8,11 +8,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.ims.common.utils.StringUtils;
|
|
|
import com.ims.eval.config.CustomException;
|
|
|
-import com.ims.eval.entity.DeptAssessmentDeclaration;
|
|
|
import com.ims.eval.entity.EvaluationDept;
|
|
|
import com.ims.eval.entity.dto.request.UserDTO;
|
|
|
import com.ims.eval.entity.dto.result.R;
|
|
|
-import com.ims.eval.service.IDeptAssessmentDeclarationService;
|
|
|
import com.ims.eval.service.IEvaluationDeptService;
|
|
|
import com.ims.eval.service.IUserService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -20,7 +18,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -45,9 +42,6 @@ public class DepartmentAllocationController {
|
|
|
@Autowired
|
|
|
private IUserService userService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private IDeptAssessmentDeclarationService deptAssessmentDeclarationService;
|
|
|
-
|
|
|
/**
|
|
|
* 考评部门配置列表信息(分页)
|
|
|
*
|
|
@@ -112,22 +106,6 @@ public class DepartmentAllocationController {
|
|
|
return R.error("部门重复,请重新添加!");
|
|
|
}
|
|
|
}
|
|
|
- if (StringUtils.isNotEmpty(evaluationDept.getId())) {
|
|
|
- QueryWrapper<DeptAssessmentDeclaration> qw = new QueryWrapper<>();
|
|
|
- if (StringUtils.isNotEmpty(evaluationDept.getDeptId())) {
|
|
|
- qw.lambda().eq(DeptAssessmentDeclaration::getDeptId, evaluationDept.getDeptId());
|
|
|
- }
|
|
|
- List<DeptAssessmentDeclaration> list = new ArrayList<>();
|
|
|
- List<DeptAssessmentDeclaration> deptAssessmentDeclarationList = deptAssessmentDeclarationService.list(qw);
|
|
|
- for (DeptAssessmentDeclaration deptAssessmentDeclaration : deptAssessmentDeclarationList) {
|
|
|
- if (!"流程已结束".equals(deptAssessmentDeclaration.getStage())) {
|
|
|
- deptAssessmentDeclaration.setDeptLeaderId(evaluationDept.getChargePersonId());
|
|
|
- deptAssessmentDeclaration.setDeptLeaderName(evaluationDept.getChargePersonName());
|
|
|
- list.add(deptAssessmentDeclaration);
|
|
|
- }
|
|
|
- }
|
|
|
- deptAssessmentDeclarationService.updateBatchById(list);
|
|
|
- }
|
|
|
boolean b = evaluationDeptService.saveOrUpdate(evaluationDept);
|
|
|
if (b) {
|
|
|
return R.ok().data(b);
|