平行工位

uat-temp-wj-chongqingdaqu-prod-temp-pingxinggongwei
王杰 4 months ago
parent 6dfcc536ef
commit 946d82a776

@ -192,40 +192,38 @@ public class MesAssemblySaveSortStepService extends BaseStepService {
Map<String, Object> parallelInfoMap = JSONObject.parseObject(prodRuleContext.getParallelInfo(), Map.class);
int count;
if (parallelInfoMap.containsKey(MesPcnExtConstWords.WORK_CENTER_CODE)) {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(reqBean.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(prodRuleContext.getWorkOrderNo(), MesPcnExtConstWords.WORK_ORDER_NO, packBean);
DdlPreparedPack.getStringEqualPack(prodRuleContext.getProductSn(), MesPcnExtConstWords.PRODUCT_SN, packBean);
DdlPreparedPack.getStringEqualPack(reqBean.getWorkCenterCode(), MesPcnExtConstWords.WORK_CENTER_CODE, packBean);
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue(), MesPcnExtConstWords.ASSEMBLY_STATUS, packBean);
if (parallelInfoMap.containsKey(MesPcnExtConstWords.WORK_CELL_CODE)) {
List<String> workCellCodeList = JSONObject.parseObject((String) parallelInfoMap.get(MesPcnExtConstWords.WORK_CELL_CODE), List.class);
DdlPackBean packBean = DdlPackBean.getDdlPackBean(reqBean.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(prodRuleContext.getWorkOrderNo(), MesPcnExtConstWords.WORK_ORDER_NO, packBean);
DdlPreparedPack.getStringEqualPack(prodRuleContext.getProductSn(), MesPcnExtConstWords.PRODUCT_SN, packBean);
DdlPreparedPack.getStringEqualPack(reqBean.getWorkCenterCode(), MesPcnExtConstWords.WORK_CENTER_CODE, packBean);
if (workCellCodeList.size() == 1) DdlPreparedPack.getStringEqualPack(workCellCodeList.get(0), MesPcnExtConstWords.WORK_CELL_CODE, packBean);
else DdlPreparedPack.getInPackList(workCellCodeList, MesPcnExtConstWords.WORK_CELL_CODE, packBean);
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue(), MesPcnExtConstWords.ASSEMBLY_STATUS, packBean);
count = workOrderAssemblyRepository.updateByPropertiesNoSync(
new String[]{MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME, MesPcnExtConstWords.SYSTEM_SYNC_STATUS,
MesPcnExtConstWords.SYSTEM_SYNC_DATE_TIME, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.REMARK},
new Object[]{reqBean.getUserInfo(), TimeTool.getNowTime(true), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(),
MesPcnExtConstWords.EMPTY, CommonEnumUtil.IS_VAILD.INVAILD.getValue(), String.format("平行工位[%s]标记无效!", reqBean.getWorkCellCode())},
packBean);
} else {
Integer processSeq = (Integer) parallelInfoMap.get(MesPcnExtConstWords.PROCESS_SEQ);
count = workOrderAssemblyRepository.updateByPropertiesNoSync(
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID,
MesPcnExtConstWords.WORK_ORDER_NO, MesPcnExtConstWords.PRODUCT_SN, MesPcnExtConstWords.WORK_CENTER_CODE,
MesPcnExtConstWords.CRAFT_CODE, MesPcnExtConstWords.PROCESS_SEQ, MesPcnExtConstWords.ASSEMBLY_STATUS},
new Object[]{reqBean.getOrganizeCode(), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(),
prodRuleContext.getWorkOrderNo(), prodRuleContext.getProductSn(), reqBean.getWorkCenterCode(),
prodRuleContext.getCraftCode(), processSeq, MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue()},
new String[]{MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME, MesPcnExtConstWords.SYSTEM_SYNC_STATUS,
MesPcnExtConstWords.SYSTEM_SYNC_DATE_TIME, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.REMARK},
new Object[]{reqBean.getUserInfo(), TimeTool.getNowTime(true), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(),
MesPcnExtConstWords.EMPTY, CommonEnumUtil.IS_VAILD.INVAILD.getValue(), String.format("平行工位[%s]标记无效!", reqBean.getWorkCellCode())});
DdlPreparedPack.getStringEqualPack(prodRuleContext.getCraftCode(), MesPcnExtConstWords.CRAFT_CODE, packBean);
DdlPreparedPack.getNumEqualPack(processSeq, MesPcnExtConstWords.PROCESS_SEQ, packBean);
DdlPreparedPack.getNumNOEqualPack(prodRuleContext.getWorkCellCode(), MesPcnExtConstWords.WORK_CELL_CODE, packBean);
}
int count = workOrderAssemblyRepository.updateByPropertiesNoSync(
new String[]{MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME, MesPcnExtConstWords.SYSTEM_SYNC_STATUS,
MesPcnExtConstWords.SYSTEM_SYNC_DATE_TIME, MesPcnExtConstWords.IS_VALID, MesPcnExtConstWords.REMARK},
new Object[]{reqBean.getUserInfo(), TimeTool.getNowTime(true), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(),
MesPcnExtConstWords.EMPTY, CommonEnumUtil.IS_VAILD.INVAILD.getValue(), String.format("平行工位[%s]标记无效!", reqBean.getWorkCellCode())},
packBean);
this.sendMessage(reqBean, new StationResultBean().writeDbLog(), String.format("加工单[%s]在工位[%s]标记平行工位的装配件条数[%s]",
prodRuleContext.getWorkOrderNo(), reqBean.getWorkCellCode(), count), MesPcnEnumUtil.STATION_BUSI_TYPE.RUNNING_INFO, MesPcnEnumUtil.STATION_DATA_TYPE.TEXT);
}
}

Loading…
Cancel
Save