|
@@ -35,6 +35,7 @@ import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -71,7 +72,7 @@ public class DeptAssessmentDeclarationServiceImpl extends ServiceImpl<DeptAssess
|
|
|
private RemoteServiceBuilder remoteServiceBuilder;
|
|
|
|
|
|
@Override
|
|
|
- public IPage<DeptAssessmentDeclaration> listPage(Integer pageNum, Integer pageSize, String deptId, String orderNumber, String deptName, Integer annual, Integer declarationMonth,HttpServletRequest request) {
|
|
|
+ public IPage<DeptAssessmentDeclaration> listPage(Integer pageNum, Integer pageSize, String deptId, String orderNumber, String deptName, Integer annual, Integer declarationMonth, HttpServletRequest request) {
|
|
|
|
|
|
|
|
|
String code = request.getHeader("code");
|
|
@@ -80,7 +81,7 @@ public class DeptAssessmentDeclarationServiceImpl extends ServiceImpl<DeptAssess
|
|
|
|
|
|
user.getDeptOrg().getType();
|
|
|
|
|
|
- if("150".equals(user.getDeptOrg().getType())){
|
|
|
+ if ("150".equals(user.getDeptOrg().getType())) {
|
|
|
deptId = user.getDeptOrg().getParentId();
|
|
|
}
|
|
|
if ("23031009".equals(deptId)) {//组织人事部
|
|
@@ -228,10 +229,33 @@ public class DeptAssessmentDeclarationServiceImpl extends ServiceImpl<DeptAssess
|
|
|
}
|
|
|
EvaluationDeptRating evaluationDeptRating = evaluationDeptRatingService.getOne(qw);
|
|
|
if (null != evaluationDeptRating) {
|
|
|
+ if ("A".equals(deptAssessmentDeclaration.getRatingGrade())) {
|
|
|
+ int acount = Integer.parseInt(evaluationDeptRating.getAcount()) + 1;
|
|
|
+ evaluationDeptRating.setAcount(String.valueOf(acount));
|
|
|
+ }
|
|
|
+ if ("C".equals(deptAssessmentDeclaration.getRatingGrade())) {
|
|
|
+ int ccount = Integer.parseInt(evaluationDeptRating.getCcount()) + 1;
|
|
|
+ evaluationDeptRating.setCcount(String.valueOf(ccount));
|
|
|
+ }
|
|
|
+ evaluationDeptRating.setCreateTime(new Date());
|
|
|
insertContent(deptAssessmentDeclaration, evaluationDeptRating);
|
|
|
evaluationDeptRatingService.updateById(evaluationDeptRating);
|
|
|
} else {
|
|
|
EvaluationDeptRating obj = new EvaluationDeptRating();
|
|
|
+ obj.setDeptId(deptAssessmentDeclaration.getDeptId());
|
|
|
+ obj.setDeptName(deptAssessmentDeclaration.getDeptName());
|
|
|
+ obj.setAnnual(String.valueOf(deptAssessmentDeclaration.getAnnual()));
|
|
|
+ if ("A".equals(deptAssessmentDeclaration.getRatingGrade())) {
|
|
|
+ obj.setAcount("1");
|
|
|
+ } else {
|
|
|
+ obj.setAcount("0");
|
|
|
+ }
|
|
|
+ if ("C".equals(deptAssessmentDeclaration.getRatingGrade())) {
|
|
|
+ obj.setCcount("1");
|
|
|
+ } else {
|
|
|
+ obj.setCcount("0");
|
|
|
+ }
|
|
|
+ obj.setCreateTime(new Date());
|
|
|
insertContent(deptAssessmentDeclaration, obj);
|
|
|
evaluationDeptRatingService.save(obj);
|
|
|
}
|