|
|
@ -93,20 +93,20 @@ public class MesWorkOrderSaveSortStepService extends BaseStepService {
|
|
|
|
|
|
|
|
|
|
|
|
if (null == productionPartContext || StringUtils.isEmpty(productionPartContext.getForeignKey())) continue;
|
|
|
|
if (null == productionPartContext || StringUtils.isEmpty(productionPartContext.getForeignKey())) continue;
|
|
|
|
|
|
|
|
|
|
|
|
Boolean isEndWorkCell = (StringUtils.isEmpty(workCell.getIsEndWorkCell()) || workCell.getIsEndWorkCell().compareTo(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue()) == 0) ? false : true;
|
|
|
|
Boolean isEndWorkCell = (!StringUtils.isEmpty(workCell.getIsEndWorkCell()) && workCell.getIsEndWorkCell().compareTo(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()) == 0) ? true : false;
|
|
|
|
|
|
|
|
|
|
|
|
if (!isEndWorkCell && productionPartContext.getWorkOrderStatus().compareTo(MesExtEnumUtil.ORDER_STATUS.PROCESS.getValue()) == 0) continue;
|
|
|
|
if (!isEndWorkCell && productionPartContext.getWorkOrderStatus().compareTo(MesExtEnumUtil.ORDER_STATUS.PROCESS.getValue()) == 0) continue;
|
|
|
|
|
|
|
|
|
|
|
|
if (!isEndWorkCell) {
|
|
|
|
if (!isEndWorkCell) {
|
|
|
|
workOrderRepository.updateByProperties(
|
|
|
|
workOrderRepository.updateByProperties(
|
|
|
|
new String[]{MesPcnExtConstWords.ID},
|
|
|
|
new String[]{MesPcnExtConstWords.ID, MesPcnExtConstWords.ORGANIZE_CODE},
|
|
|
|
new Object[]{productionPartContext.getId()},
|
|
|
|
new Object[]{productionPartContext.getId(), reqBean.getOrganizeCode()},
|
|
|
|
new String[]{MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME, MesPcnExtConstWords.SYSTEM_SYNC_STATUS, MesPcnExtConstWords.WORK_ORDER_STATUS, MesPcnExtConstWords.ONLINE_TIME},
|
|
|
|
new String[]{MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME, MesPcnExtConstWords.SYSTEM_SYNC_STATUS, MesPcnExtConstWords.WORK_ORDER_STATUS, MesPcnExtConstWords.ONLINE_TIME},
|
|
|
|
new Object[]{reqBean.getUserInfo(), (new SimpleDateFormat(MesPcnExtConstWords.DATE_FORMAT_SSS)).format(new Date()), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesExtEnumUtil.ORDER_STATUS.PROCESS.getValue(), TimeTool.getNowTime(true)});
|
|
|
|
new Object[]{reqBean.getUserInfo(), (new SimpleDateFormat(MesPcnExtConstWords.DATE_FORMAT_SSS)).format(new Date()), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesExtEnumUtil.ORDER_STATUS.PROCESS.getValue(), TimeTool.getNowTime(true)});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
workOrderRepository.updateByProperties(
|
|
|
|
workOrderRepository.updateByProperties(
|
|
|
|
new String[]{MesPcnExtConstWords.ID},
|
|
|
|
new String[]{MesPcnExtConstWords.ID, MesPcnExtConstWords.ORGANIZE_CODE},
|
|
|
|
new Object[]{productionPartContext.getId()},
|
|
|
|
new Object[]{productionPartContext.getId(), reqBean.getOrganizeCode()},
|
|
|
|
new String[]{MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME, MesPcnExtConstWords.SYSTEM_SYNC_STATUS, MesPcnExtConstWords.WORK_ORDER_STATUS, MesPcnExtConstWords.COMPLETE_QTY, MesPcnExtConstWords.UN_COMPLETE_QTY, MesPcnExtConstWords.OFFLINE_TIME},
|
|
|
|
new String[]{MesPcnExtConstWords.MODIFY_USER, MesPcnExtConstWords.MODIFY_DATE_TIME, MesPcnExtConstWords.SYSTEM_SYNC_STATUS, MesPcnExtConstWords.WORK_ORDER_STATUS, MesPcnExtConstWords.COMPLETE_QTY, MesPcnExtConstWords.UN_COMPLETE_QTY, MesPcnExtConstWords.OFFLINE_TIME},
|
|
|
|
new Object[]{reqBean.getUserInfo(), (new SimpleDateFormat(MesPcnExtConstWords.DATE_FORMAT_SSS)).format(new Date()), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesExtEnumUtil.ORDER_STATUS.COMPLETE.getValue(), new Double(1), new Double(0), TimeTool.getNowTime(true)});
|
|
|
|
new Object[]{reqBean.getUserInfo(), (new SimpleDateFormat(MesPcnExtConstWords.DATE_FORMAT_SSS)).format(new Date()), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), MesExtEnumUtil.ORDER_STATUS.COMPLETE.getValue(), new Double(1), new Double(0), TimeTool.getNowTime(true)});
|
|
|
|
}
|
|
|
|
}
|
|
|
|