style(controller): 统一代码格式化和逻辑判断优化
- 修复了方法调用中的空格格式问题 - 将 finish 字段判断改为 state 状态值判断 - 优化了参数传递中的空格格式 - 统一了 short 类型转换的格式化样式
This commit is contained in:
parent
40f8914bd5
commit
80c6818d20
|
|
@ -507,7 +507,7 @@ public class TransferCompanyController extends BaseController {
|
||||||
.eq(WmsTransferCompanyItem::getOrderId, order.getId())
|
.eq(WmsTransferCompanyItem::getOrderId, order.getId())
|
||||||
.list();
|
.list();
|
||||||
items.removeIf(item -> item.getLeft().compareTo(BigDecimal.ZERO) <= 0
|
items.removeIf(item -> item.getLeft().compareTo(BigDecimal.ZERO) <= 0
|
||||||
|| noScanningBaseControllerService.cannotOutNoScanning(item.getMatnr(),order.getReswk(),item.getLgpro()));
|
|| noScanningBaseControllerService.cannotOutNoScanning(item.getMatnr(), order.getReswk(), item.getLgpro()));
|
||||||
return ApiResult.success(
|
return ApiResult.success(
|
||||||
items.stream()
|
items.stream()
|
||||||
.map(item -> new NoScanItemVO()
|
.map(item -> new NoScanItemVO()
|
||||||
|
|
@ -641,7 +641,7 @@ public class TransferCompanyController extends BaseController {
|
||||||
).toList()
|
).toList()
|
||||||
);
|
);
|
||||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||||
optRecordDTO.setOperationType((short)1)
|
optRecordDTO.setOperationType((short) 1)
|
||||||
.setOrderId(order.getNo());
|
.setOrderId(order.getNo());
|
||||||
optRecordService.add(optRecordDTO);
|
optRecordService.add(optRecordDTO);
|
||||||
ZWM00_MB116VO vo = sapService.zwm00_mb116(new ZWM00_MB116QO()
|
ZWM00_MB116VO vo = sapService.zwm00_mb116(new ZWM00_MB116QO()
|
||||||
|
|
@ -914,7 +914,7 @@ public class TransferCompanyController extends BaseController {
|
||||||
);
|
);
|
||||||
inMaterialScanRecordRespository.saveAll(records);
|
inMaterialScanRecordRespository.saveAll(records);
|
||||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||||
optRecordDTO.setOperationType((short)1)
|
optRecordDTO.setOperationType((short) 1)
|
||||||
.setOrderId(ticket.getTicketNo());
|
.setOrderId(ticket.getTicketNo());
|
||||||
optRecordService.add(optRecordDTO);
|
optRecordService.add(optRecordDTO);
|
||||||
Pair<Pair<String, String>, Pair<String, String>> vos = sapService.zwm3a17(new ZWM3A17DTO()
|
Pair<Pair<String, String>, Pair<String, String>> vos = sapService.zwm3a17(new ZWM3A17DTO()
|
||||||
|
|
@ -967,7 +967,7 @@ public class TransferCompanyController extends BaseController {
|
||||||
, @RequestParam(required = false) String no) {
|
, @RequestParam(required = false) String no) {
|
||||||
TransferCompanyTicketVO ticket = transferCompanyTicketService.getInfo(orderId, no);
|
TransferCompanyTicketVO ticket = transferCompanyTicketService.getInfo(orderId, no);
|
||||||
VUtil.trueThrowBusinessError(Objects.isNull(ticket)).throwMessage("订单不存在");
|
VUtil.trueThrowBusinessError(Objects.isNull(ticket)).throwMessage("订单不存在");
|
||||||
if (ticket.getFinish()){
|
if (ticket.getState() == 1) {
|
||||||
return ApiResult.success(Collections.emptyList());
|
return ApiResult.success(Collections.emptyList());
|
||||||
}
|
}
|
||||||
List<TransferCompanyItemVO> items = transferCompanyTicketItemService.getList(ticket.getId());
|
List<TransferCompanyItemVO> items = transferCompanyTicketItemService.getList(ticket.getId());
|
||||||
|
|
@ -993,7 +993,7 @@ public class TransferCompanyController extends BaseController {
|
||||||
@Transactional
|
@Transactional
|
||||||
@PostMapping("pda/submitForInNoScanning")
|
@PostMapping("pda/submitForInNoScanning")
|
||||||
public ApiResult<Void> submitForInNoScanning(@Valid @RequestBody NoScanningRequest request) {
|
public ApiResult<Void> submitForInNoScanning(@Valid @RequestBody NoScanningRequest request) {
|
||||||
TransferCompanyTicketVO ticket = transferCompanyTicketService.getInfo(request.getId(),request.getNo());
|
TransferCompanyTicketVO ticket = transferCompanyTicketService.getInfo(request.getId(), request.getNo());
|
||||||
VUtil.trueThrowBusinessError(Objects.isNull(ticket)).throwMessage("出库单不存在");
|
VUtil.trueThrowBusinessError(Objects.isNull(ticket)).throwMessage("出库单不存在");
|
||||||
VUtil.trueThrowBusinessError(!Objects.equals(ticket.getState(), 0)).throwMessage("出库单无效");
|
VUtil.trueThrowBusinessError(!Objects.equals(ticket.getState(), 0)).throwMessage("出库单无效");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -533,7 +533,7 @@ public class TransferFactoryController extends BaseController {
|
||||||
.eq(WmsTransferFactoryItem::getOrderId, order.getId())
|
.eq(WmsTransferFactoryItem::getOrderId, order.getId())
|
||||||
.list();
|
.list();
|
||||||
items.removeIf(item -> item.getLeft().compareTo(BigDecimal.ZERO) <= 0
|
items.removeIf(item -> item.getLeft().compareTo(BigDecimal.ZERO) <= 0
|
||||||
|| noScanningBaseControllerService.cannotOutNoScanning(item.getMatnr(),order.getWerks(),order.getLgort()));
|
|| noScanningBaseControllerService.cannotOutNoScanning(item.getMatnr(), order.getWerks(), order.getLgort()));
|
||||||
return ApiResult.success(
|
return ApiResult.success(
|
||||||
items.stream()
|
items.stream()
|
||||||
.map(item -> new NoScanItemVO()
|
.map(item -> new NoScanItemVO()
|
||||||
|
|
@ -940,7 +940,7 @@ public class TransferFactoryController extends BaseController {
|
||||||
, @RequestParam(required = false) String no) {
|
, @RequestParam(required = false) String no) {
|
||||||
TransferFactoryTicketInfoVO order = transferFactoryTicketService.getInfo(orderId, no);
|
TransferFactoryTicketInfoVO order = transferFactoryTicketService.getInfo(orderId, no);
|
||||||
VUtil.trueThrowBusinessError(Objects.isNull(order)).throwMessage("订单不存在");
|
VUtil.trueThrowBusinessError(Objects.isNull(order)).throwMessage("订单不存在");
|
||||||
if (order.getFinish()){
|
if (order.getState() == 1) {
|
||||||
return ApiResult.success(Collections.emptyList());
|
return ApiResult.success(Collections.emptyList());
|
||||||
}
|
}
|
||||||
List<TransferFactoryItemVO> items = transferFactoryTicketItemService.getList(order.getId());
|
List<TransferFactoryItemVO> items = transferFactoryTicketItemService.getList(order.getId());
|
||||||
|
|
@ -966,7 +966,7 @@ public class TransferFactoryController extends BaseController {
|
||||||
@Transactional
|
@Transactional
|
||||||
@PostMapping("pda/submitForInNoScanning")
|
@PostMapping("pda/submitForInNoScanning")
|
||||||
public ApiResult<Void> submitForInNoScanning(@Valid @RequestBody @NotNull NoScanningRequest request) {
|
public ApiResult<Void> submitForInNoScanning(@Valid @RequestBody @NotNull NoScanningRequest request) {
|
||||||
TransferFactoryTicketInfoVO ticket = transferFactoryTicketService.getInfo(request.getId(),request.getNo());
|
TransferFactoryTicketInfoVO ticket = transferFactoryTicketService.getInfo(request.getId(), request.getNo());
|
||||||
VUtil.trueThrowBusinessError(Objects.isNull(ticket)).throwMessage("出库单不存在");
|
VUtil.trueThrowBusinessError(Objects.isNull(ticket)).throwMessage("出库单不存在");
|
||||||
VUtil.trueThrowBusinessError(!Objects.equals(ticket.getState(), 0)).throwMessage("出库单无效");
|
VUtil.trueThrowBusinessError(!Objects.equals(ticket.getState(), 0)).throwMessage("出库单无效");
|
||||||
List<TransferFactoryItemVO> ticketItems = transferFactoryTicketItemService.getList(ticket.getId());
|
List<TransferFactoryItemVO> ticketItems = transferFactoryTicketItemService.getList(ticket.getId());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue