parent
7065419b52
commit
b2df047dbc
|
|
@ -124,10 +124,10 @@ public class InProduceOrderController extends BaseController {
|
|||
@Transactional
|
||||
@PostMapping("save")
|
||||
public ApiResult<Long> save(@Valid @RequestBody InProduceOrderGenerateMaterialsQO request) {
|
||||
// if (request.isNeedInspection()) {
|
||||
// VUtil.trueThrowBusinessError(StrUtil.isBlank(request.getModelNo()) || StrUtil.isBlank(request.getWorkbenchNo()))
|
||||
// .throwMessage("机型编号和机台编号不能为空");
|
||||
// }
|
||||
if (request.isNeedInspection()) {
|
||||
VUtil.trueThrowBusinessError(StrUtil.isBlank(request.getModelNo()) || StrUtil.isBlank(request.getWorkbenchNo()))
|
||||
.throwMessage("机型编号和机台编号不能为空");
|
||||
}
|
||||
WmsInProduceOrder order = new WmsInProduceOrder()
|
||||
.setId(IdUtil.getSnowflakeNextId())
|
||||
.setDataType(request.getDataType())
|
||||
|
|
@ -154,8 +154,8 @@ public class InProduceOrderController extends BaseController {
|
|||
.setBatchNo(date + index)
|
||||
.setSernr(request.getSernr())
|
||||
.setWorkbenchNo(request.getWorkbenchNo())
|
||||
.setModelNo(request.getModelNo());
|
||||
// .setInspectionStatus(request.isNeedInspection() ? 0 : null);
|
||||
.setModelNo(request.getModelNo())
|
||||
.setInspectionStatus(request.isNeedInspection() ? 0 : null);
|
||||
produceOrderItemService.save(parent);
|
||||
if (request.getList()) {
|
||||
List<WmsBom> children = bomService.getChildren(request.getMatnr());
|
||||
|
|
@ -213,9 +213,9 @@ public class InProduceOrderController extends BaseController {
|
|||
.setCreateTime(LocalDateTime.now())
|
||||
);
|
||||
}
|
||||
// if (request.isNeedInspection()) {
|
||||
// qmsService.pushPdiInspection(order.getOrderNo(), parent);
|
||||
// }
|
||||
if (request.isNeedInspection()) {
|
||||
qmsService.pushPdiInspection(order.getOrderNo(), parent);
|
||||
}
|
||||
return ApiResult.success(order.getId());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue