|
|
@ -204,9 +204,13 @@ public class OpenServiceImpl implements OpenService {
|
|
|
|
"1".equals(work.getEndReport())//最终报工标识
|
|
|
|
"1".equals(work.getEndReport())//最终报工标识
|
|
|
|
){
|
|
|
|
){
|
|
|
|
logger.info("工单请求关闭:调用remoteSapService.sapCloseOrder,参数:"+work.getWorkorderCodeSap());
|
|
|
|
logger.info("工单请求关闭:调用remoteSapService.sapCloseOrder,参数:"+work.getWorkorderCodeSap());
|
|
|
|
|
|
|
|
|
|
|
|
//工单完成,关闭工单
|
|
|
|
//工单完成,关闭工单
|
|
|
|
R rclose = remoteSapService.sapCloseOrder(work.getWorkorderCodeSap());
|
|
|
|
List<String> sapWorkOrders = openMapper.getSapWorkOrder(work.getWorkorderCode());//根据belong_work_order找到所有要关闭的虚拟工单
|
|
|
|
logger.info("工单"+work.getWorkorderCodeSap()+"sap关闭"+r.getCode()+",返回信息:"+r.getMsg());
|
|
|
|
for(String sapWorkOrder:sapWorkOrders){
|
|
|
|
|
|
|
|
R rclose = remoteSapService.sapCloseOrder(sapWorkOrder);
|
|
|
|
|
|
|
|
logger.info("工单"+work.getWorkorderCode()+",sapworkorder:"+sapWorkOrder+",sap关闭"+r.getCode()+",返回信息:"+r.getMsg());
|
|
|
|
|
|
|
|
}
|
|
|
|
work.setStatus("w3");
|
|
|
|
work.setStatus("w3");
|
|
|
|
work.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
work.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
//pro_work_order status->w3报工--belong_work_order
|
|
|
|
//pro_work_order status->w3报工--belong_work_order
|
|
|
@ -222,19 +226,6 @@ public class OpenServiceImpl implements OpenService {
|
|
|
|
return openMapper.getLGInfo(wcsDTO);
|
|
|
|
return openMapper.getLGInfo(wcsDTO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// //根据工单子单编码获取最顶级订单的母单
|
|
|
|
|
|
|
|
// private ProOrderWorkorderDTO getTopOrder(String workorderCode) {
|
|
|
|
|
|
|
|
// //pro_order_workorder
|
|
|
|
|
|
|
|
// ProOrderWorkorderDTO topOrder = openMapper.getOrderByCode(workorderCode);
|
|
|
|
|
|
|
|
// while (!"0".equals(topOrder.getParentOrder()) && StringUtils.isNotEmpty(topOrder.getParentOrder())) {
|
|
|
|
|
|
|
|
// //pro_order_workorder
|
|
|
|
|
|
|
|
// topOrder = openMapper.getOrderByCode(topOrder.getParentOrder());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// return topOrder;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String args[]){
|
|
|
|
public static void main(String args[]){
|
|
|
|
DateTimeFormatter ymdhms = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
DateTimeFormatter ymdhms = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
LocalDate today = LocalDate.now();
|
|
|
|
LocalDate today = LocalDate.now();
|
|
|
|