pda带配/拣货单据修改

dev2.0
anthonywj 2 years ago
parent f3fa41f087
commit d8a88547fe

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

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

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

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

Loading…
Cancel
Save