|
|
|
@ -28,8 +28,10 @@ import org.springblade.desk.basic.constant.BaseValue; |
|
|
|
import org.springblade.desk.basic.mapper.OemMapper; |
|
|
|
import org.springblade.desk.basic.mapper.OemMapper; |
|
|
|
import org.springblade.desk.basic.pojo.entity.CenterTeam; |
|
|
|
import org.springblade.desk.basic.pojo.entity.CenterTeam; |
|
|
|
import org.springblade.desk.basic.pojo.entity.Oem; |
|
|
|
import org.springblade.desk.basic.pojo.entity.Oem; |
|
|
|
|
|
|
|
import org.springblade.desk.basic.pojo.entity.TeamSet; |
|
|
|
import org.springblade.desk.basic.service.ICenterTeamService; |
|
|
|
import org.springblade.desk.basic.service.ICenterTeamService; |
|
|
|
import org.springblade.desk.basic.service.IPlatingService; |
|
|
|
import org.springblade.desk.basic.service.IPlatingService; |
|
|
|
|
|
|
|
import org.springblade.desk.basic.service.ITeamSetService; |
|
|
|
import org.springblade.desk.basic.util.IdUtil; |
|
|
|
import org.springblade.desk.basic.util.IdUtil; |
|
|
|
import org.springblade.desk.basic.util.StatusCountMap; |
|
|
|
import org.springblade.desk.basic.util.StatusCountMap; |
|
|
|
import org.springblade.desk.dashboard.pojo.entity.*; |
|
|
|
import org.springblade.desk.dashboard.pojo.entity.*; |
|
|
|
@ -57,6 +59,7 @@ import org.springblade.desk.quality.constant.InspectionItemConst; |
|
|
|
import org.springblade.desk.quality.constant.InspectionTaskConst; |
|
|
|
import org.springblade.desk.quality.constant.InspectionTaskConst; |
|
|
|
import org.springblade.desk.quality.constant.ReviewSheetConst; |
|
|
|
import org.springblade.desk.quality.constant.ReviewSheetConst; |
|
|
|
import org.springblade.desk.quality.excel.InspectionTaskExcel; |
|
|
|
import org.springblade.desk.quality.excel.InspectionTaskExcel; |
|
|
|
|
|
|
|
import org.springblade.desk.quality.mapper.AuditFileMapper; |
|
|
|
import org.springblade.desk.quality.mapper.InspectionTaskMapper; |
|
|
|
import org.springblade.desk.quality.mapper.InspectionTaskMapper; |
|
|
|
import org.springblade.desk.quality.pojo.entity.*; |
|
|
|
import org.springblade.desk.quality.pojo.entity.*; |
|
|
|
import org.springblade.desk.quality.pojo.request.InspectionTaskSearch; |
|
|
|
import org.springblade.desk.quality.pojo.request.InspectionTaskSearch; |
|
|
|
@ -147,6 +150,10 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
private IWorkPlanItemService workPlanItemService; |
|
|
|
private IWorkPlanItemService workPlanItemService; |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private IMakeRecService makeRecService; |
|
|
|
private IMakeRecService makeRecService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private AuditFileMapper auditFileMapper; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private ITeamSetService teamSetService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@ -659,14 +666,14 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 检验记录
|
|
|
|
// 检验记录
|
|
|
|
if (moduleList.get(1)) { |
|
|
|
// if (moduleList.get(1)) {
|
|
|
|
JSONObject modelJson1 = new JSONObject(); |
|
|
|
JSONObject modelJson1 = new JSONObject(); |
|
|
|
List<JSONObject> checkList = this.getCheckListNotNG(woId, wpList, true); |
|
|
|
List<JSONObject> checkList = this.getCheckListNotNG(woId, wpList, true); |
|
|
|
modelJson1.put("checkList", checkList); |
|
|
|
modelJson1.put("checkList", checkList); |
|
|
|
jsonObj.put("modelThree", modelJson1); |
|
|
|
jsonObj.put("modelThree", modelJson1); |
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
List<JSONObject> modelTwoList = this.buildModelTwo(wpList, planList); |
|
|
|
List<JSONObject> modelTwoList = this.buildModelTwo(wo, yo, dsPart, wpList, planList); |
|
|
|
jsonObj.put("modelTwo", modelTwoList); |
|
|
|
jsonObj.put("modelTwo", modelTwoList); |
|
|
|
|
|
|
|
|
|
|
|
if (moduleList.get(2)) { |
|
|
|
if (moduleList.get(2)) { |
|
|
|
@ -682,6 +689,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 构建modelOne |
|
|
|
* 构建modelOne |
|
|
|
|
|
|
|
* |
|
|
|
* @param wo |
|
|
|
* @param wo |
|
|
|
* @param yo |
|
|
|
* @param yo |
|
|
|
* @param dsPart |
|
|
|
* @param dsPart |
|
|
|
@ -719,11 +727,12 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 构建modelTwo |
|
|
|
* 构建modelTwo |
|
|
|
|
|
|
|
* |
|
|
|
* @param wpList |
|
|
|
* @param wpList |
|
|
|
* @param modelFlag |
|
|
|
* @param modelFlag |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private List<JSONObject> buildModelTwo(List<WorkPlanExpandVO> wpList, List<Boolean> modelFlag) { |
|
|
|
private List<JSONObject> buildModelTwo(WorkOrder wo, YieldOrder yo, DsPartEntity dsPart, List<WorkPlanExpandVO> wpList, List<Boolean> modelFlag) { |
|
|
|
if (wpList == null || wpList.size() == 0) { |
|
|
|
if (wpList == null || wpList.size() == 0) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -740,9 +749,9 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
tankInfo.put("pdjArea", null); |
|
|
|
tankInfo.put("pdjArea", null); |
|
|
|
tankInfo.put("gjArea", null); |
|
|
|
tankInfo.put("gjArea", null); |
|
|
|
modelTwo.put("orders", prWorkPlan.getOrders()); |
|
|
|
modelTwo.put("orders", prWorkPlan.getOrders()); |
|
|
|
modelTwo.put("papers", prWorkPlan.getPapers()); |
|
|
|
|
|
|
|
modelTwo.put("createMan", prWorkPlan.getCreateMan()); |
|
|
|
modelTwo.put("createMan", prWorkPlan.getCreateMan()); |
|
|
|
modelTwo.put("factEndTime", prWorkPlan.getFactEndTime()); |
|
|
|
modelTwo.put("factEndTime", prWorkPlan.getFactEndTime()); |
|
|
|
|
|
|
|
modelTwo.put("papers", prWorkPlan.getPapers()); |
|
|
|
modelTwo.put("referenceFile", prWorkPlan.getReferenceFile()); |
|
|
|
modelTwo.put("referenceFile", prWorkPlan.getReferenceFile()); |
|
|
|
modelTwo.put("procedureSet", procedureSet); |
|
|
|
modelTwo.put("procedureSet", procedureSet); |
|
|
|
modelTwo.put("slotList", slotList); |
|
|
|
modelTwo.put("slotList", slotList); |
|
|
|
@ -763,13 +772,13 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
if (CollectionUtils.isNotEmpty(slotVOList)) { |
|
|
|
if (CollectionUtils.isNotEmpty(slotVOList)) { |
|
|
|
for (ProduceMonitorSlotListVO slot : slotVOList) { |
|
|
|
for (ProduceMonitorSlotListVO slot : slotVOList) { |
|
|
|
JSONObject slotJson = new JSONObject(); |
|
|
|
JSONObject slotJson = new JSONObject(); |
|
|
|
slotJson.put("mtuCode", slot.getMtuCode()); |
|
|
|
slotJson.put("mtuCode", slot.getMtnCode()); |
|
|
|
slotJson.put("partCode", slot.getPartCode()); |
|
|
|
slotJson.put("partCode", slot.getPartCode()); |
|
|
|
slotJson.put("batchNo", slot.getBatchNo()); |
|
|
|
slotJson.put("batchNo", slot.getBatchNo()); |
|
|
|
slotJson.put("workQty", slot.getWorkQty()); |
|
|
|
slotJson.put("workQty", slot.getWorkQty()); |
|
|
|
slotJson.put("prodIdent", slot.getProdIdent()); |
|
|
|
slotJson.put("prodIdent", slot.getProdIdent()); |
|
|
|
slotJson.put("area", slot.getArea()); |
|
|
|
slotJson.put("area", slot.getArea()); |
|
|
|
slotJson.put("totalArea", slot.getTotalArea()); |
|
|
|
slotJson.put("totalArea", slot.getSumArea()); |
|
|
|
slotList.add(slotJson); |
|
|
|
slotList.add(slotJson); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -827,6 +836,33 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
modelTwo.put("workerImgUrl", checkManByNewErpMes); |
|
|
|
modelTwo.put("workerImgUrl", checkManByNewErpMes); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtils.isEmpty(prWorkPlan.getPapers()) || StringUtils.isEmpty(prWorkPlan.getReferenceFile())) { |
|
|
|
|
|
|
|
AuditFile auditFile = null; |
|
|
|
|
|
|
|
if ("涂色标".equals(prWorkPlan.getPpsName()) || "喷砂".equals(prWorkPlan.getPpsName())) { |
|
|
|
|
|
|
|
auditFile = auditFileMapper.getByPpsId(prWorkPlan.getPpsId()); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (wo.getTsId() != null) { |
|
|
|
|
|
|
|
TeamSet teamSet = teamSetService.getById(wo.getTsId()); |
|
|
|
|
|
|
|
String productApplicationArea = null; |
|
|
|
|
|
|
|
if (teamSet != null) { |
|
|
|
|
|
|
|
if (dsPart != null) { |
|
|
|
|
|
|
|
productApplicationArea = dsPart.getProductApplicationArea(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
String productIdent = yo.getProductIdent(); |
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(productApplicationArea) && StringUtils.isNotEmpty(productIdent)) { |
|
|
|
|
|
|
|
auditFile = auditFileMapper.getDataByPpsIdAndApplyArea(prWorkPlan.getPpsId(), teamSet.getWcId(), productApplicationArea, productIdent, prWorkPlan.getCaId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(productIdent) && auditFile == null) { |
|
|
|
|
|
|
|
auditFile = auditFileMapper.getDataByPpsIdAndPqName(prWorkPlan.getPpsId(), teamSet.getWcId(), productIdent, prWorkPlan.getCaId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (auditFile != null) { |
|
|
|
|
|
|
|
modelTwo.put("papers", auditFile.getPapers()); |
|
|
|
|
|
|
|
modelTwo.put("referenceFile", auditFile.getReferenceFile()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
modelTwoList.add(modelTwo); |
|
|
|
modelTwoList.add(modelTwo); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -835,6 +871,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 构建dsRbFilePreserveSlotList |
|
|
|
* 构建dsRbFilePreserveSlotList |
|
|
|
|
|
|
|
* |
|
|
|
* @param workPlan |
|
|
|
* @param workPlan |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|