Commit 27d6a162 authored by 姬鋆屾's avatar 姬鋆屾
parents a16eae87 de524c60
......@@ -155,6 +155,7 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
if (CollectionUtils.isNotEmpty(summaryVoList)) {
for (StaffCheckSummaryVo vo : summaryVoList) {
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.initAttrValue();
BeanUtils.copyProperties(vo, staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setAttendScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
......@@ -163,20 +164,20 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if (temp != null) {
if (temp.getReviewScore() == null) {
staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
if (temp.getReviewScore() != null) {
staffPerformSummaryEntity.setReviewScore(temp.getReviewScore());
}
if (temp.getOtherScore() == null) {
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
if (temp.getOtherScore() != null) {
staffPerformSummaryEntity.setOtherScore(temp.getOtherScore());
}
if (temp.getGoworkScore() == null) {
staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
if (temp.getGoworkScore() != null) {
staffPerformSummaryEntity.setGoworkScore(temp.getGoworkScore());
}
if (temp.getEffectScore() == null) {
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
if (temp.getEffectScore() != null) {
staffPerformSummaryEntity.setEffectScore(temp.getEffectScore());
}
if (temp.getComplainScore() == null) {
staffPerformSummaryEntity.setComplainScore(new BigDecimal(0));
if (temp.getComplainScore() != null) {
staffPerformSummaryEntity.setComplainScore(temp.getComplainScore());
}
BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore());
......
......@@ -157,6 +157,7 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
if(CollectionUtils.isNotEmpty(summaryVoList)){
for(StaffCheckSummaryVo vo:summaryVoList){
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.initAttrValue();
BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setComplainScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
......@@ -165,20 +166,20 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if(temp!=null){
if(temp.getAttendScore()==null){
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
if(temp.getAttendScore()!=null){
staffPerformSummaryEntity.setAttendScore(temp.getAttendScore());
}
if(temp.getOtherScore()==null){
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
if(temp.getOtherScore()!=null){
staffPerformSummaryEntity.setOtherScore(temp.getOtherScore());
}
if(temp.getGoworkScore()==null){
staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
if(temp.getGoworkScore()!=null){
staffPerformSummaryEntity.setGoworkScore(temp.getGoworkScore());
}
if(temp.getEffectScore()==null){
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
if(temp.getEffectScore()!=null){
staffPerformSummaryEntity.setEffectScore(temp.getEffectScore());
}
if(temp.getReviewScore()==null){
staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
if(temp.getReviewScore()!=null){
staffPerformSummaryEntity.setReviewScore(temp.getReviewScore());
}
BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore());
......
......@@ -157,6 +157,7 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
if(CollectionUtils.isNotEmpty(summaryVoList)){
for(StaffCheckSummaryVo vo:summaryVoList){
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.initAttrValue();
BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setEffectScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
......@@ -165,20 +166,20 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if(temp!=null){
if(temp.getReviewScore()==null){
staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
if(temp.getReviewScore()!=null){
staffPerformSummaryEntity.setReviewScore(temp.getReviewScore());
}
if(temp.getOtherScore()==null){
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
if(temp.getOtherScore()!=null){
staffPerformSummaryEntity.setOtherScore(temp.getOtherScore());
}
if(temp.getGoworkScore()==null){
staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
if(temp.getGoworkScore()!=null){
staffPerformSummaryEntity.setGoworkScore(temp.getGoworkScore());
}
if(temp.getAttendScore()==null){
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
if(temp.getAttendScore()!=null){
staffPerformSummaryEntity.setAttendScore(temp.getAttendScore());
}
if (temp.getComplainScore() == null) {
staffPerformSummaryEntity.setComplainScore(new BigDecimal(0));
if (temp.getComplainScore() != null) {
staffPerformSummaryEntity.setComplainScore(temp.getComplainScore());
}
BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore());
......
......@@ -156,6 +156,7 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
if(CollectionUtils.isNotEmpty(summaryVoList)){
for(StaffCheckSummaryVo vo:summaryVoList){
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.initAttrValue();
BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setGoworkScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
......@@ -164,20 +165,20 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if(temp!=null){
if(temp.getReviewScore()==null){
staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
if(temp.getReviewScore()!=null){
staffPerformSummaryEntity.setReviewScore(temp.getReviewScore());
}
if(temp.getOtherScore()==null){
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
if(temp.getOtherScore()!=null){
staffPerformSummaryEntity.setOtherScore(temp.getOtherScore());
}
if(temp.getAttendScore()==null){
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
if(temp.getAttendScore()!=null){
staffPerformSummaryEntity.setAttendScore(temp.getAttendScore());
}
if(temp.getEffectScore()==null){
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
if(temp.getEffectScore()!=null){
staffPerformSummaryEntity.setEffectScore(temp.getEffectScore());
}
if (temp.getComplainScore() == null) {
staffPerformSummaryEntity.setComplainScore(new BigDecimal(0));
if (temp.getComplainScore() != null) {
staffPerformSummaryEntity.setComplainScore(temp.getComplainScore());
}
BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore());
......
......@@ -162,6 +162,7 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
if (CollectionUtils.isNotEmpty(summaryVoList)) {
for (StaffCheckSummaryVo vo : summaryVoList) {
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.initAttrValue();
BeanUtils.copyProperties(vo, staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setOtherScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
......@@ -170,20 +171,20 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if (temp != null) {
if (temp.getReviewScore() == null) {
staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
if (temp.getReviewScore() != null) {
staffPerformSummaryEntity.setReviewScore(temp.getReviewScore());
}
if (temp.getAttendScore() == null) {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
if (temp.getAttendScore() != null) {
staffPerformSummaryEntity.setAttendScore(temp.getAttendScore());
}
if (temp.getGoworkScore() == null) {
staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
if (temp.getGoworkScore() != null) {
staffPerformSummaryEntity.setGoworkScore(temp.getGoworkScore());
}
if (temp.getEffectScore() == null) {
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
if (temp.getEffectScore() != null) {
staffPerformSummaryEntity.setEffectScore(temp.getEffectScore());
}
if (temp.getComplainScore() == null) {
staffPerformSummaryEntity.setComplainScore(new BigDecimal(0));
if (temp.getComplainScore() != null) {
staffPerformSummaryEntity.setComplainScore(temp.getComplainScore());
}
BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore());
......
......@@ -162,6 +162,7 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
if (CollectionUtils.isNotEmpty(summaryVoList)) {
for (StaffCheckSummaryVo vo : summaryVoList) {
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.initAttrValue();
BeanUtils.copyProperties(vo, staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setReviewScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
......@@ -170,20 +171,20 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if (temp != null) {
if (temp.getAttendScore() == null) {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
if (temp.getAttendScore() != null) {
staffPerformSummaryEntity.setAttendScore(temp.getAttendScore());
}
if (temp.getOtherScore() == null) {
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
if (temp.getOtherScore() != null) {
staffPerformSummaryEntity.setOtherScore(temp.getOtherScore());
}
if (temp.getGoworkScore() == null) {
staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
if (temp.getGoworkScore() != null) {
staffPerformSummaryEntity.setGoworkScore(temp.getGoworkScore());
}
if (temp.getEffectScore() == null) {
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
if (temp.getEffectScore() != null) {
staffPerformSummaryEntity.setEffectScore(temp.getEffectScore());
}
if (temp.getComplainScore() == null) {
staffPerformSummaryEntity.setComplainScore(new BigDecimal(0));
if (temp.getComplainScore() != null) {
staffPerformSummaryEntity.setComplainScore(temp.getComplainScore());
}
BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore());
......
......@@ -110,15 +110,30 @@ public class FeedbackController extends BaseCRUDJsonBodyMappingController<Feedba
PageInfo pageInfo = this.buildPageInfo(query);
Result<FeedbackStaffInfoVo> result = this.getService().getFeedbackStaffList(query, pageInfo);
if (CollectionUtils.isNotEmpty(result.getList())) {
Map<Integer, List<FeedbackStaffInfoVo>> groupMap = result.getList().stream().collect(Collectors.groupingBy(FeedbackStaffInfoVo::getBackStatus));
if (groupMap.containsKey(1)) {
model.put("feedBack", groupMap.get(1).size());
} else {
// Map<Integer, List<FeedbackStaffInfoVo>> groupMap = result.getList().stream().collect(Collectors.groupingBy(FeedbackStaffInfoVo::getBackStatus));
// if (groupMap.containsKey(1)) {
// model.put("feedBack", groupMap.get(1).size());
// } else {
// model.put("feedBack", 0);
// }
// if (groupMap.containsKey(0)) {
// model.put("notBack", groupMap.get(0).size());
// } else {
// model.put("notBack", 0);
// }
query.setBackStatus(1);
PageInfo noPageInfo = new PageInfo(-1);
Result<FeedbackStaffInfoVo> feedBack = this.getService().getFeedbackStaffList(query, noPageInfo);
query.setBackStatus(0);
Result<FeedbackStaffInfoVo> notBack = this.getService().getFeedbackStaffList(query, noPageInfo);
if(CollectionUtils.isNotEmpty(feedBack.getList())){
model.put("feedBack", feedBack.getList().size());
}else {
model.put("feedBack", 0);
}
if (groupMap.containsKey(0)) {
model.put("notBack", groupMap.get(0).size());
} else {
if(CollectionUtils.isNotEmpty(notBack.getList())){
model.put("notBack", notBack.getList().size());
}else {
model.put("notBack", 0);
}
} else {
......
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