pda带配/拣货单据修改

dev2.0
anthonywj 2 years ago
parent f3fa41f087
commit d8a88547fe

@ -537,8 +537,8 @@ public class IoOrderController extends BaseController {
IoOrderPdaResponse orderPdaResponse = new IoOrderPdaResponse(); IoOrderPdaResponse orderPdaResponse = new IoOrderPdaResponse();
orderPdaResponse.setOrderResponse(list.get(0)); orderPdaResponse.setOrderResponse(list.get(0));
orderPdaResponse.setOrderDetailBizResponses(orderDetailBizResponses); orderPdaResponse.setOrderDetailBizResponses(orderDetailBizResponses);
PageInfo<IoOrderResponse> pageInfo = new PageInfo<>(list); // PageInfo<IoOrderResponse> pageInfo = new PageInfo<>(list);
return ResultVOUtils.page(pageInfo); return ResultVOUtils.success(orderPdaResponse);
} }

@ -2,6 +2,7 @@ package com.glxp.api.entity.inout;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import lombok.Data; import lombok.Data;
import org.apache.poi.ss.formula.functions.Count;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -198,6 +199,12 @@ public class IoOrderDetailBizEntity {
@TableField(exist = false) @TableField(exist = false)
private boolean checkSuccess; private boolean checkSuccess;
@TableField(exist = false)
private int codeCount;
/**
*
*/
@TableField(exist = false) @TableField(exist = false)
private int scanCount; private int scanCount;

@ -420,18 +420,23 @@ public class IoAddInoutService {
if (tempEntity != null) { if (tempEntity != null) {
return ResultVOUtils.error(500, "单据已存在,请勿重复提交"); return ResultVOUtils.error(500, "单据已存在,请勿重复提交");
} }
tempEntity = orderService.findByCorpOrderId(orderEntity.getBillNo()); tempEntity = orderService.findByCorpOrderId(orderEntity.getCorpOrderId());
if (tempEntity != null) { if (tempEntity != null) {
return ResultVOUtils.error(500, "单据已存在,请勿重复提交"); return ResultVOUtils.error(500, "单据已存在,请勿重复提交");
} }
if (CollUtil.isNotEmpty(pdaPostOrderRequest.getCodeTempEntities())) {
codeTempService.insertBatch(pdaPostOrderRequest.getCodeTempEntities());
}
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction()); BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
String orderNo = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER + StrUtil.trimToEmpty(bussinessTypeEntity.getPrefix()), "yyyyMMdd")); String orderNo = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER + StrUtil.trimToEmpty(bussinessTypeEntity.getPrefix()), "yyyyMMdd"));
orderEntity.setBillNo(orderNo); orderEntity.setBillNo(orderNo);
orderService.insertOrder(orderEntity); orderService.insertOrder(orderEntity);
if (CollUtil.isNotEmpty(pdaPostOrderRequest.getCodeTempEntities())) {
for (IoCodeTempEntity codeTempEntity : pdaPostOrderRequest.getCodeTempEntities()) {
codeTempEntity.setOrderId(orderNo);
}
codeTempService.insertBatch(pdaPostOrderRequest.getCodeTempEntities());
}
dealProcess(orderEntity); dealProcess(orderEntity);
if (!ioCheckInoutService.checkManual(orderEntity.getBillNo())) { if (!ioCheckInoutService.checkManual(orderEntity.getBillNo())) {
ioCheckInoutService.check(orderEntity.getBillNo()); ioCheckInoutService.check(orderEntity.getBillNo());
@ -447,12 +452,12 @@ public class IoAddInoutService {
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public BaseResponse waitOrderByPda(PdaPostOrderRequest pdaPostOrderRequest) { public BaseResponse waitOrderByPda(PdaPostOrderRequest pdaPostOrderRequest) {
if (CollUtil.isEmpty(pdaPostOrderRequest.getOrderDetailCodeEntities())) { // if (CollUtil.isEmpty(pdaPostOrderRequest.getOrderDetailCodeEntities())) {
return ResultVOUtils.error(500, "提交失败,单据还未扫码或和扫码校验存在异常!"); // return ResultVOUtils.error(500, "提交失败,单据还未扫码或和扫码校验存在异常!");
} // }
IoOrderEntity orderEntity = pdaPostOrderRequest.getOrderEntity(); IoOrderEntity orderEntity = pdaPostOrderRequest.getOrderEntity();
List<IoOrderDetailBizEntity> orderDetailBizEntities = pdaPostOrderRequest.getOrderDetailBizEntities(); List<IoOrderDetailBizEntity> orderDetailBizEntities = pdaPostOrderRequest.getOrderDetailBizEntities();
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = pdaPostOrderRequest.getOrderDetailCodeEntities();
List<IoCodeTempEntity> codeTempEntities = pdaPostOrderRequest.getCodeTempEntities(); List<IoCodeTempEntity> codeTempEntities = pdaPostOrderRequest.getCodeTempEntities();
orderDetailBizService.deleteByOrderId(orderEntity.getBillNo()); orderDetailBizService.deleteByOrderId(orderEntity.getBillNo());
@ -461,10 +466,10 @@ public class IoAddInoutService {
if (CollUtil.isNotEmpty(orderDetailBizEntities)) { if (CollUtil.isNotEmpty(orderDetailBizEntities)) {
orderDetailBizEntities.forEach(orderDetailBizEntity -> { orderDetailBizEntities.forEach(orderDetailBizEntity -> {
orderDetailBizService.insert(orderDetailBizEntity); orderDetailBizService.insert(orderDetailBizEntity);
}); IoOrderDetailCodeEntity orderDetailCodeEntity = new IoOrderDetailCodeEntity();
} BeanUtil.copyProperties(orderDetailBizEntity, orderDetailCodeEntity);
if (CollUtil.isNotEmpty(orderDetailCodeEntities)) { orderDetailCodeEntity.setReCount(orderDetailBizEntity.getScanCount());
orderDetailCodeEntities.forEach(orderDetailCodeEntity -> { orderDetailCodeEntity.setCount(orderDetailBizEntity.getCodeCount());
orderDetailCodeService.insert(orderDetailCodeEntity); orderDetailCodeService.insert(orderDetailCodeEntity);
}); });
} }
@ -473,9 +478,9 @@ public class IoAddInoutService {
codeTempService.insert(codeTempEntity); codeTempService.insert(codeTempEntity);
}); });
} }
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction()); BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
if (ioCheckInoutService.checkManual(orderEntity.getBillNo())) { if (ioCheckInoutService.checkManual(orderEntity.getBillNo())) {
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(orderEntity.getBillNo());
if (CollUtil.isNotEmpty(orderDetailBizEntities)) { if (CollUtil.isNotEmpty(orderDetailBizEntities)) {
if (bussinessTypeEntity.getCheckWebNew() == 1) { if (bussinessTypeEntity.getCheckWebNew() == 1) {
String errMsg = ioCheckInoutService.bizOrderCheck(orderDetailBizEntities, orderDetailCodeEntities); String errMsg = ioCheckInoutService.bizOrderCheck(orderDetailBizEntities, orderDetailCodeEntities);

@ -20,8 +20,8 @@ import javax.annotation.Resource;
import java.util.Arrays; import java.util.Arrays;
@Slf4j @Slf4j
@Component //@Component
@EnableScheduling //@EnableScheduling
public class SyncHeartTask implements SchedulingConfigurer { public class SyncHeartTask implements SchedulingConfigurer {
@Resource @Resource

Loading…
Cancel
Save