|
|
@@ -15,9 +15,7 @@ import com.xunmei.core.resumption.dto.TaskDetailsDto;
|
|
|
import com.xunmei.core.resumption.service.ResumptionBusiness;
|
|
|
import com.xunmei.core.resumption.service.ResumptionService;
|
|
|
import com.xunmei.core.resumption.vo.*;
|
|
|
-import com.xunmei.core.resumption.vo.resumptionRegister.ResumptionNfcVo;
|
|
|
-import com.xunmei.core.resumption.vo.resumptionRegister.ResumptionRegisterAreaVo;
|
|
|
-import com.xunmei.core.resumption.vo.resumptionRegister.ResumptionRegisterVo;
|
|
|
+import com.xunmei.core.resumption.vo.resumptionRegister.*;
|
|
|
import com.xunmei.system.api.RemoteConfigService;
|
|
|
import com.xunmei.system.api.domain.SysConfig;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
@@ -92,18 +90,18 @@ public class ResumptionController {
|
|
|
resumptionApp) {
|
|
|
|
|
|
if (r.getPlanCycle() == 2) {
|
|
|
- if(r.getStatus() == 3) {
|
|
|
+ if (r.getStatus() == 3) {
|
|
|
all.getDay().get("2").add(r);
|
|
|
//已过期视为未完成
|
|
|
} else if (r.getStatus() == 4) {
|
|
|
all.getDay().get("3").add(r);
|
|
|
- }else {
|
|
|
- if (DateUtil.beginOfDay(request.getDateTime()) .compareTo(DateUtil.beginOfDay( r.getPlanStartTime())) == 0) {
|
|
|
+ } else {
|
|
|
+ if (DateUtil.beginOfDay(request.getDateTime()).compareTo(DateUtil.beginOfDay(r.getPlanStartTime())) == 0) {
|
|
|
//未开始和进行中视为待完成
|
|
|
// if (r.getStatus() == 1 || r.getStatus() == 2) {
|
|
|
- all.getDay().get("1").add(r);
|
|
|
+ all.getDay().get("1").add(r);
|
|
|
// }
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
all.getDay().get("3").add(r);
|
|
|
}
|
|
|
}
|
|
|
@@ -149,24 +147,39 @@ public class ResumptionController {
|
|
|
List<ResumptionRegisterAreaVo> tasktotal = resumptionBusiness.toTaskDetails(request);
|
|
|
|
|
|
//nfc总区域数量统计
|
|
|
- Integer nfcScanTotal = 0;
|
|
|
- Long nfcScaned = 0L;
|
|
|
- for (ResumptionRegisterAreaVo m :
|
|
|
- tasktotal) {
|
|
|
- List<ResumptionNfcVo> nfc = m.getNfclist();
|
|
|
- if (CollectionUtils.isNotEmpty(nfc)) {
|
|
|
- nfcScanTotal += nfc.size();
|
|
|
- nfcScaned += nfc.stream().filter(n -> ObjectUtil.equal(n.getStatus(), 1)).count();
|
|
|
+ Integer noSan = 0;
|
|
|
+ Integer yesSan = 0;
|
|
|
+ Integer areaScanN = 0;
|
|
|
+ Integer areaScanY = 0;
|
|
|
+ for (ResumptionRegisterAreaVo area : tasktotal) {
|
|
|
+ List<ResumptionNfcVo> nfclist = area.getNfclist();
|
|
|
+ for (ResumptionNfcVo nfcVo : nfclist) {
|
|
|
+ Integer status = nfcVo.getStatus();
|
|
|
+ if(status == 0){
|
|
|
+ noSan++;
|
|
|
+ }else{
|
|
|
+ yesSan++;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ List<ResumptionRegisterItemVo> checklist = area.getChecklist();
|
|
|
+ for (ResumptionRegisterItemVo resumptionRegisterItemVo : checklist) {
|
|
|
+ ResumptionPointVo pointVo = resumptionRegisterItemVo.getCheckitemlist().get(0);
|
|
|
+ if(pointVo.getSubmitTime() != null){
|
|
|
+ areaScanY++;
|
|
|
+ }else{
|
|
|
+ areaScanN++;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
- detailvo.setNfcScanN(nfcScanTotal);
|
|
|
- detailvo.setNfcScanY(Integer.parseInt(nfcScaned.toString()));
|
|
|
+ detailvo.setNfcScanN(noSan);
|
|
|
+ detailvo.setNfcScanY(yesSan);
|
|
|
|
|
|
//区域数量统计
|
|
|
- Integer areaScanN = 0;
|
|
|
- areaScanN = tasktotal.size();
|
|
|
+
|
|
|
detailvo.setAreaScanN(areaScanN);
|
|
|
- detailvo.setAreaScanY(0);
|
|
|
+ detailvo.setAreaScanY(areaScanY);
|
|
|
|
|
|
ResumptionTaskListVo taskObj = resumptionBusiness.getTaskObjByTaskid(request);
|
|
|
// SysConfig systemParame = remoteConfigService.findFirstByCode(SystemParameterConstant.NFC_SCANNING, SecurityConstants.INNER).getData();
|