|
@@ -136,6 +136,16 @@ public class WlnStatementOfAccountImpl implements WlnStatementOfAccount {
|
|
|
orderService.updateBatchById(editOrderList);
|
|
|
|
|
|
Date date = new Date();
|
|
|
+
|
|
|
+ Long userId;
|
|
|
+ try {
|
|
|
+ userId = SecurityUtils.getUserId();
|
|
|
+ } catch (Exception e) {
|
|
|
+ userId = -1L;
|
|
|
+ }
|
|
|
+
|
|
|
+ final Long finalUserId = userId;
|
|
|
+
|
|
|
// 订单生产完成时,一键完成生产任务
|
|
|
productionWorkOrderService.update(q -> q
|
|
|
.in(ProductionWorkOrder::getOrderId, orderIdList)
|
|
@@ -143,7 +153,7 @@ public class WlnStatementOfAccountImpl implements WlnStatementOfAccount {
|
|
|
.set(ProductionWorkOrder::getStatus, WorkOrderStatusEnum.PRODUCTION_COMPLETION.getKey())
|
|
|
.set(ProductionWorkOrder::getCompleteTime, date)
|
|
|
.set(BasePo::getUpdateTime, date)
|
|
|
- .set(BasePo::getUpdateUser, SecurityUtils.getUserId()));
|
|
|
+ .set(BasePo::getUpdateUser, finalUserId));
|
|
|
|
|
|
// 保存对账单
|
|
|
if (!saveStatementOfAccountList.isEmpty()) {
|