Commit 9a3dfd00 authored by 廖旭伟's avatar 廖旭伟

修改测试bug

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