单据业务详情丢失,单据未补单,使用出库多补退货单等问题

dev
anthonywj 2 years ago
parent 1d2f030f67
commit b78a5a35c3

@ -645,18 +645,21 @@ public class SpsSyncDownloadController {
orderEntity.setFromType(ConstantStatus.FROM_UDISP);
orderEntity.setProcessStatus(ConstantStatus.ORDER_DEAL_POST);
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
if (syncDataBustypeEntity != null) {
if (IntUtil.value(syncDataBustypeEntity.getSyncStatus()) == 1) {
orderEntity.setProcessStatus(ConstantStatus.ORDER_DEAL_DRAFT);
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE);
}
if (syncDataBustypeEntity.isSyncChange()) {
orderEntity.setOutChangeEnable(syncDataBustypeEntity.isSyncChange());
}
}
IoOrderEntity temp = orderService.findByBillNo(orderEntity.getBillNo());
if (temp == null) {
if (syncDataBustypeEntity != null) {
if (IntUtil.value(syncDataBustypeEntity.getSyncStatus()) == 1) {
orderEntity.setProcessStatus(ConstantStatus.ORDER_DEAL_DRAFT);
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE);
}
// 同步单据设置需要自动补单
if (syncDataBustypeEntity.isSyncChange()) {
orderEntity.setOutChangeEnable(syncDataBustypeEntity.isSyncChange());
// 平衡补单(只有补单单号为空才会补单)
orderEntity.setSupplementNo(null);
}
}
//过滤使用出库单,转换成一级库出库单(条件:往来类型为客户信息,出入库类型为出库,仓库类型为入账库,是否更改库存为是
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
if (basicBussinessTypeEntity.getCorpType() == ConstantStatus.CORP_TYPE_INPUT
@ -746,6 +749,29 @@ public class SpsSyncDownloadController {
ioCheckInoutService.check(orderEntity.getBillNo());
}
}
} else {
// 更新业务详情
if (orderEntity.getCheckStatus() != null)
orderService.update(orderEntity);
//更新业务详情
if (CollUtil.isNotEmpty(syncDataResponse.getOrderDetailBizEntities())) {
List<IoOrderDetailBizEntity> orderDetailBizEntities = syncDataResponse.getOrderDetailBizEntities();
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
if (bizEntity.getOrderIdFk().equals(orderEntity.getBillNo())) {
orderDetailBizDao.insertOrUpdate(bizEntity);
}
}
}
//更新码详情
if (CollUtil.isNotEmpty(syncDataResponse.getOrderDetailCodeEntities())) {
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = syncDataResponse.getOrderDetailCodeEntities();
for (IoOrderDetailCodeEntity codeEntity : orderDetailCodeEntities) {
if (codeEntity.getOrderIdFk().equals(orderEntity.getBillNo())) {
orderDetailCodeDao.insertOrUpdate(codeEntity);
}
}
}
}
}

@ -6,12 +6,13 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
@TableName(value = "io_order_detail_code")
public class IoOrderDetailCodeEntity {
public class IoOrderDetailCodeEntity implements Serializable {
@TableId(value = "id", type = IdType.INPUT)
private Long id;

@ -3,6 +3,7 @@ package com.glxp.api.req.inout;
import com.glxp.api.entity.inout.IoOrderDetailCodeEntity;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
@ -12,7 +13,7 @@ import java.util.List;
*/
@Data
public class InvoiceRequest {
public class InvoiceRequest implements Serializable {
private List<IoOrderDetailCodeEntity> list;
private String key;

@ -16,7 +16,7 @@ public class ThrBusTypeOriginResponse {
/**
* id
*/
private Integer id;
private Long id;
/**
*

@ -26,10 +26,7 @@ import com.glxp.api.service.inout.impl.IoOrderInvoiceService;
import com.glxp.api.service.inv.InvPreinDetailService;
import com.glxp.api.service.inv.InvPreinOrderService;
import com.glxp.api.service.inv.InvPreinProductDetailService;
import com.glxp.api.util.CustomUtil;
import com.glxp.api.util.GennerOrderUtils;
import com.glxp.api.util.JasperUtils;
import com.glxp.api.util.OrderNoTypeBean;
import com.glxp.api.util.*;
import com.glxp.api.util.udi.FilterUdiUtils;
import com.glxp.api.util.udi.UdiCalCountUtil;
import lombok.RequiredArgsConstructor;
@ -304,12 +301,10 @@ public class IoCheckInoutService {
orderService.update(orderEntity);
return;
}
if (orderEntity.getFromType() != ConstantStatus.FROM_COPY
&& orderEntity.getFromType() != ConstantStatus.FROM_CHANGE && orderEntity.getFromType() != ConstantStatus.FROM_UDIMS) {
orderDetailBizService.deleteByOrderId(orderEntity.getBillNo());
}
if (orderEntity.getFromType() != ConstantStatus.FROM_UDISP && orderEntity.getFromType() != ConstantStatus.FROM_UDIMS) {
if (orderEntity.getFromType() != ConstantStatus.FROM_UDISP
&& orderEntity.getFromType() != ConstantStatus.FROM_UDIMS) {
if (orderEntity.getFromType() != ConstantStatus.FROM_COPY
&& orderEntity.getFromType() != ConstantStatus.FROM_CHANGE) {
orderDetailBizService.deleteByOrderId(orderEntity.getBillNo());
@ -856,8 +851,11 @@ public class IoCheckInoutService {
//校验完成后生成库存
public void genInv(IoOrderEntity orderEntity, BasicBussinessTypeEntity bussinessTypeEntity) {
if (bussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT) && bussinessTypeEntity.isScanPreIn()) {
if (
IntUtil.value(orderEntity.getFromType()) != ConstantStatus.FROM_UDISP &&
bussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT) && bussinessTypeEntity.isScanPreIn()) {
// ThreadUtil.execAsync(() -> {
// 内网同步出来不进行退货
if (StrUtil.isNotEmpty(bussinessTypeEntity.getPreInBackAction())) {
if (bussinessTypeEntity.getBackPreinType() == 1) { //按单退货

@ -3,9 +3,9 @@ server:
spring:
datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
jdbc-url: jdbc:p6spy:mysql://192.168.0.66:3364/udi_spms_zzzyy?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
password: Glxp@6066
hikari:
connection-timeout: 60000
maximum-pool-size: 60

@ -412,7 +412,7 @@
</select>
<insert id="insertProductInfo" keyProperty="id"
<insert id="insertProductInfo"
parameterType="com.glxp.api.entity.basic.ProductInfoEntity">
REPLACE
INTO productinfo
@ -476,7 +476,7 @@
</insert>
<insert id="insertProductInfos" keyProperty="id"
<insert id="insertProductInfos"
parameterType="com.glxp.api.entity.basic.ProductInfoEntity">
REPLACE INTO productinfo
(id, nameCode, packRatio, packLevel, bhxjsl,

Loading…
Cancel
Save