|
|
@@ -268,15 +268,28 @@ public class ResumptionServiceImpl implements ResumptionService {
|
|
|
List<ResumptionPlanVo> supplementItems = new ArrayList<>();
|
|
|
|
|
|
for (ResumptionPlanVo resumptionPlanVo : resumptionPlanVos) {
|
|
|
+
|
|
|
if (ObjectUtil.isNotNull(resumptionPlanVo.getCheckId()) && ObjectUtil.isNull(resumptionPlanVo.getAreaId())) {
|
|
|
- Map<Long, List<ResumptionNFCVo>> areaGroup = orgNFCs.stream()
|
|
|
+
|
|
|
+ /*Map<Long, List<ResumptionNFCVo>> areaGroup = orgNFCs.stream()
|
|
|
.filter(n -> ObjectUtil.equal(n.getCheckId(), resumptionPlanVo.getCheckId()))
|
|
|
.collect(Collectors.groupingBy(n -> n.getAreaId()));
|
|
|
+ */
|
|
|
+ Map<Long,List<ResumptionNFCVo>> areaGroup = new HashMap<>();
|
|
|
+ List<ResumptionNFCVo> vos = new ArrayList<>();
|
|
|
+ for (ResumptionNFCVo nfcVo : orgNFCs) {
|
|
|
+ if(nfcVo.getCheckId().equals(resumptionPlanVo.getCheckId())){
|
|
|
+ nfcVo.setPointScan(resumptionPlanVo.getPointScan());
|
|
|
+ vos.add(nfcVo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ areaGroup= vos.stream().collect(Collectors.groupingBy(n -> n.getAreaId()));
|
|
|
+
|
|
|
+
|
|
|
if (CollectionUtils.isEmpty(areaGroup)) {
|
|
|
ResumptionPlanVo newVo = new ResumptionPlanVo();
|
|
|
BeanUtils.copyProperties(resumptionPlanVo, newVo);
|
|
|
newVo.setAreaId(-1L);
|
|
|
-
|
|
|
supplementItems.add(newVo);
|
|
|
} else {
|
|
|
areaGroup.forEach((area, nfcs) -> {
|
|
|
@@ -288,12 +301,24 @@ public class ResumptionServiceImpl implements ResumptionService {
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
+ for (ResumptionNFCVo nfcVo : orgNFCs) {
|
|
|
+ if(nfcVo.getAreaId().equals(resumptionPlanVo.getAreaId())){
|
|
|
+ nfcVo.setPointScan(resumptionPlanVo.getPointScan());
|
|
|
+ }
|
|
|
+ }
|
|
|
//如果是绑定到区域的,直接使用
|
|
|
supplementItems.add(resumptionPlanVo);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
resumptionPlanVos = supplementItems;
|
|
|
+ }else{
|
|
|
+ //反馈给前端,只需要保存后的数据
|
|
|
+ if(resumption.getStatus() == 3){
|
|
|
+ //如果已经提交
|
|
|
+ orgNFCs = orgNFCs.stream().filter(n -> n.getStatus() == 1).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
Integer yesPointNum = 0;
|
|
|
@@ -302,6 +327,8 @@ public class ResumptionServiceImpl implements ResumptionService {
|
|
|
Map<Long, Map<String, Integer>> itComMap = new HashMap<>();
|
|
|
Map<Long, AreaResumptionVo> map = new HashMap<>();
|
|
|
for (ResumptionPlanVo vo : resumptionPlanVos) {
|
|
|
+ //是否必捡,1必须检查,0非必须检查
|
|
|
+ Integer required = vo.getRequired();
|
|
|
if (vo.getDataStatus() == 1) {
|
|
|
noPointNum++;
|
|
|
} else {
|
|
|
@@ -340,6 +367,7 @@ public class ResumptionServiceImpl implements ResumptionService {
|
|
|
pointVo.setCheckId(vo.getCheckId());
|
|
|
pointVo.setPointId(vo.getPointId());
|
|
|
pointVo.setResRemark(vo.getResRemark());
|
|
|
+ pointVo.setRequired(vo.getRequired());
|
|
|
if (vo.getResValue() == null) {
|
|
|
pointVo.setResValue(0);
|
|
|
} else {
|
|
|
@@ -352,7 +380,7 @@ public class ResumptionServiceImpl implements ResumptionService {
|
|
|
if (itCom == null) {
|
|
|
itCom = new HashMap<>();
|
|
|
itCom.put("total", 1);
|
|
|
- if (pointVo.getDataStatus() == 1) {
|
|
|
+ if (pointVo.getDataStatus() == 1 ) {
|
|
|
itCom.put("yes", 0);
|
|
|
} else {
|
|
|
itCom.put("yes", 1);
|
|
|
@@ -394,7 +422,7 @@ public class ResumptionServiceImpl implements ResumptionService {
|
|
|
Long areaId = entry.getKey();
|
|
|
//获取每个区域下的nfc
|
|
|
List<ResumptionNFCVo> resumptionNFCVos = orgNFCs.stream().filter(n -> ObjectUtil.equal(n.getAreaId(), areaId)).collect(Collectors.toList());
|
|
|
- //resumptionMapper.selectResumptionNFC(resumption.getId(), areaId, resumption.getOrgId());
|
|
|
+ /*resumptionMapper.selectResumptionNFC(resumption.getId(), areaId, resumption.getOrgId());*/
|
|
|
|
|
|
for (ResumptionNFCVo resumptionNFCVo : resumptionNFCVos) {
|
|
|
Integer status = resumptionNFCVo.getStatus();
|