|
|
|
@ -51,7 +51,7 @@ public class MesFunctionProductionPartSheetService extends BaseSwsService implem
|
|
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
//验证参数
|
|
|
|
|
Map<String, String> paramMap = null;
|
|
|
|
|
Map<String, Object> paramMap = null;
|
|
|
|
|
try {
|
|
|
|
|
paramMap = StringUtils.isEmpty(buttonDynamicModel.getFunctionValue()) ? null : JSONObject.parseObject(buttonDynamicModel.getFunctionValue(), Map.class);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
@ -63,8 +63,8 @@ public class MesFunctionProductionPartSheetService extends BaseSwsService implem
|
|
|
|
|
reportStatusMap.put(REPORT_STATUS.UN_REPORT.getValue(), REPORT_STATUS.UN_REPORT.getDescription());
|
|
|
|
|
resultMap.put(MesPcnExtConstWords.REPORT_STATUS, reportStatusMap);
|
|
|
|
|
|
|
|
|
|
String startTime = !CollectionUtils.isEmpty(paramMap) && !StringUtils.isEmpty(paramMap.get(MesPcnExtConstWords.START_TIME)) ? paramMap.get(MesPcnExtConstWords.START_TIME) : null;
|
|
|
|
|
String endTime = !CollectionUtils.isEmpty(paramMap) && !StringUtils.isEmpty(paramMap.get(MesPcnExtConstWords.END_TIME)) ? paramMap.get(MesPcnExtConstWords.END_TIME) : null;
|
|
|
|
|
String startTime = !CollectionUtils.isEmpty(paramMap) && !StringUtils.isEmpty(paramMap.get(MesPcnExtConstWords.START_TIME)) ? (String) paramMap.get(MesPcnExtConstWords.START_TIME) : null;
|
|
|
|
|
String endTime = !CollectionUtils.isEmpty(paramMap) && !StringUtils.isEmpty(paramMap.get(MesPcnExtConstWords.END_TIME)) ? (String) paramMap.get(MesPcnExtConstWords.END_TIME) : null;
|
|
|
|
|
if (StringUtils.isEmpty(startTime) || StringUtils.isEmpty(endTime)) {
|
|
|
|
|
//根据当前时间计算当前班次的时间
|
|
|
|
|
Map<String, String> shiftTimeMap = shiftService.calcCurShiftTimeMapByCurTime(reqBean.getOrganizeCode(), reqBean.getWorkCenterCode());
|
|
|
|
@ -93,7 +93,7 @@ public class MesFunctionProductionPartSheetService extends BaseSwsService implem
|
|
|
|
|
|
|
|
|
|
if (!checkTime) return packResultMap(resultMap, "时间查询条件限制一天!");
|
|
|
|
|
|
|
|
|
|
String partNo = !CollectionUtils.isEmpty(paramMap) && !StringUtils.isEmpty(paramMap.get(MesPcnExtConstWords.PART_NO)) ? paramMap.get(MesPcnExtConstWords.PART_NO) : null;
|
|
|
|
|
String partNo = !CollectionUtils.isEmpty(paramMap) && !StringUtils.isEmpty(paramMap.get(MesPcnExtConstWords.PART_NO)) ? (String) paramMap.get(MesPcnExtConstWords.PART_NO) : null;
|
|
|
|
|
|
|
|
|
|
//查询加工记录数据
|
|
|
|
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean(reqBean.getOrganizeCode());
|
|
|
|
@ -104,7 +104,7 @@ public class MesFunctionProductionPartSheetService extends BaseSwsService implem
|
|
|
|
|
List<MesProductionRecord> productionRecordList = productionRecordRepository.findByHqlWhere(packBean);
|
|
|
|
|
if (CollectionUtils.isEmpty(productionRecordList)) return resultMap;
|
|
|
|
|
|
|
|
|
|
Integer reportStatus = !CollectionUtils.isEmpty(paramMap) && !StringUtils.isEmpty(paramMap.get(MesPcnExtConstWords.REPORT_STATUS)) ? Integer.valueOf(paramMap.get(MesPcnExtConstWords.REPORT_STATUS)) : null;
|
|
|
|
|
Integer reportStatus = !CollectionUtils.isEmpty(paramMap) && !StringUtils.isEmpty(paramMap.get(MesPcnExtConstWords.REPORT_STATUS)) ? (Integer) paramMap.get(MesPcnExtConstWords.REPORT_STATUS) : null;
|
|
|
|
|
|
|
|
|
|
//搜集需要汇报的加工记录
|
|
|
|
|
List<MesProductionRecord> productionRecordList2Report = (StringUtils.isEmpty(reportStatus) || reportStatus.compareTo(REPORT_STATUS.REPORT.getValue()) == 0)
|
|
|
|
|