From 45bcbbf2e93543ab843cb5f62fe1a039628dd72f Mon Sep 17 00:00:00 2001 From: liuy <37787198+LiuyCodes@users.noreply.github.com> Date: Thu, 5 Sep 2024 12:06:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96TOC=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/lets/ofs/dao/ITocofsSaleoutDao.bak | 21 + .../lets/ofs/dao/ITocofsSaleoutDao.java | 12 +- .../ofs/dao/ITocofsSaleoutDetailedDao.java | 8 +- .../ofs/dao/impl/TocofsSaleoutDaoImpl.java | 11 +- .../dao/impl/TocofsSaleoutDaoImpl.java.bak | 21 + .../impl/TocofsSaleoutDetailedDaoImpl.java | 8 +- .../entity/TocofsSaleoutDetailedEntity.java | 560 +++---- .../entity/TocofsSaleoutDetailedEntity.xml | 1396 +++++++++++----- .../lets/ofs/entity/TocofsSaleoutEntity.java | 681 +++----- .../lets/ofs/entity/TocofsSaleoutEntity.xml | 1483 +++++++++++------ .../outsourc/ConsignmachiningInReturn.java | 12 +- .../purchase/ProxyPurchaseWarehous.java | 4 +- .../sales/SoSaleOutPluginInitializerToB.java | 19 +- .../sales/SoSaleOutPluginInitializerToC.java | 766 +++++++-- .../plugin/lets/resultvo/CacheTocMapVo.java | 31 + .../plugin/lets/u8cdto/SonDetailsDto.java | 198 +-- .../util/TocOrderBasicArchivesCacheUtil.java | 185 +- .../SoSaleOutPluginInitializerToCTest.java | 4 +- .../dto/ofssaleorderoutsearch/DetailsDto.java | 5 +- .../dto/ofssaleorderoutsearch/HeaderDto.java | 8 +- 20 files changed, 3308 insertions(+), 2125 deletions(-) create mode 100644 buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/ITocofsSaleoutDao.bak create mode 100644 buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/impl/TocofsSaleoutDaoImpl.java.bak create mode 100644 buildpackage/src/main/java/com/hzya/frame/plugin/lets/resultvo/CacheTocMapVo.java diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/ITocofsSaleoutDao.bak b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/ITocofsSaleoutDao.bak new file mode 100644 index 00000000..4dfb3e30 --- /dev/null +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/ITocofsSaleoutDao.bak @@ -0,0 +1,21 @@ +package com.hzya.frame.plugin.lets.ofs.dao; + +import com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutEntity; +import com.hzya.frame.basedao.dao.IBaseDao; + +import java.util.List; + +/** + * root(tocofs_saleout: table)表数据库访问层 + * + * @author makejava + * @since 2024-08-01 17:01:32 + */ +public interface ITocofsSaleoutDao extends IBaseDao { + /** + * 批量插入主表信息 + * + * @author liuyang + */ + void entityInsertBatchV2(List tocofsSaleoutEntityList) throws Exception; +} \ No newline at end of file diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/ITocofsSaleoutDao.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/ITocofsSaleoutDao.java index 4dfb3e30..a3ad9437 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/ITocofsSaleoutDao.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/ITocofsSaleoutDao.java @@ -6,16 +6,18 @@ import com.hzya.frame.basedao.dao.IBaseDao; import java.util.List; /** - * root(tocofs_saleout: table)表数据库访问层 + * O出库单表头(TOC、TOB业务底表)(tocofs_saleout: table)表数据库访问层 * * @author makejava - * @since 2024-08-01 17:01:32 + * @since 2024-09-04 17:48:16 */ public interface ITocofsSaleoutDao extends IBaseDao { + /** - * 批量插入主表信息 + * 批量查询或者更新 * * @author liuyang */ - void entityInsertBatchV2(List tocofsSaleoutEntityList) throws Exception; -} \ No newline at end of file + void entityInsertOrUpdateBatch(List tocofsSaleoutEntityList) throws Exception; +} + diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/ITocofsSaleoutDetailedDao.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/ITocofsSaleoutDetailedDao.java index 4c7b4fdc..34e563f0 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/ITocofsSaleoutDetailedDao.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/ITocofsSaleoutDetailedDao.java @@ -6,18 +6,18 @@ import com.hzya.frame.basedao.dao.IBaseDao; import java.util.List; /** - * tocofs_saleout_detailed(tocofs_saleout_detailed: table)表数据库访问层 + * O出库单明细表(TOC、TOB业务底表)(tocofs_saleout_detailed: table)表数据库访问层 * * @author makejava - * @since 2024-08-01 17:01:53 + * @since 2024-09-04 17:48:28 */ public interface ITocofsSaleoutDetailedDao extends IBaseDao { /** - * 批量查询明细信息 + * 批量插入或者更新 * * @author liuyang */ - void entityInsertBatchV2(List tocofsSaleoutDetailedEntity) throws Exception; + void entityInsertOrUpdateBatch(List tocofsSaleoutDetailedEntities) throws Exception; } diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/impl/TocofsSaleoutDaoImpl.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/impl/TocofsSaleoutDaoImpl.java index 333997ab..0b274f89 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/impl/TocofsSaleoutDaoImpl.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/impl/TocofsSaleoutDaoImpl.java @@ -8,14 +8,15 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao; import java.util.List; /** - * root(TocofsSaleout)表数据库访问层 + * O出库单表头(TOC、TOB业务底表)(TocofsSaleout)表数据库访问层 * * @author makejava - * @since 2024-08-01 17:01:32 + * @since 2024-09-04 17:48:16 */ public class TocofsSaleoutDaoImpl extends MybatisGenericDao implements ITocofsSaleoutDao { @Override - public void entityInsertBatchV2(List tocofsSaleoutEntityList) throws Exception { - this.insert("com.hzya.frame.plugin.lets.ofs.dao.impl.TocofsSaleoutDaoImpl.entityInsertBatchV2", tocofsSaleoutEntityList); + public void entityInsertOrUpdateBatch(List tocofsSaleoutEntityList) throws Exception { + insert("com.hzya.frame.plugin.lets.ofs.dao.impl.TocofsSaleoutDaoImpl.entityInsertOrUpdateBatch", tocofsSaleoutEntityList); } -} \ No newline at end of file +} + diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/impl/TocofsSaleoutDaoImpl.java.bak b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/impl/TocofsSaleoutDaoImpl.java.bak new file mode 100644 index 00000000..333997ab --- /dev/null +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/impl/TocofsSaleoutDaoImpl.java.bak @@ -0,0 +1,21 @@ +package com.hzya.frame.plugin.lets.ofs.dao.impl; + +import com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutEntity; +import com.hzya.frame.plugin.lets.ofs.dao.ITocofsSaleoutDao; +import org.springframework.stereotype.Repository; +import com.hzya.frame.basedao.dao.MybatisGenericDao; + +import java.util.List; + +/** + * root(TocofsSaleout)表数据库访问层 + * + * @author makejava + * @since 2024-08-01 17:01:32 + */ +public class TocofsSaleoutDaoImpl extends MybatisGenericDao implements ITocofsSaleoutDao { + @Override + public void entityInsertBatchV2(List tocofsSaleoutEntityList) throws Exception { + this.insert("com.hzya.frame.plugin.lets.ofs.dao.impl.TocofsSaleoutDaoImpl.entityInsertBatchV2", tocofsSaleoutEntityList); + } +} \ No newline at end of file diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/impl/TocofsSaleoutDetailedDaoImpl.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/impl/TocofsSaleoutDetailedDaoImpl.java index b7313308..a80da4a7 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/impl/TocofsSaleoutDetailedDaoImpl.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/dao/impl/TocofsSaleoutDetailedDaoImpl.java @@ -8,14 +8,14 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao; import java.util.List; /** - * tocofs_saleout_detailed(TocofsSaleoutDetailed)表数据库访问层 + * O出库单明细表(TOC、TOB业务底表)(TocofsSaleoutDetailed)表数据库访问层 * * @author makejava - * @since 2024-08-01 17:01:53 + * @since 2024-09-04 17:48:28 */ public class TocofsSaleoutDetailedDaoImpl extends MybatisGenericDao implements ITocofsSaleoutDetailedDao { @Override - public void entityInsertBatchV2(List tocofsSaleoutDetailedEntity) throws Exception { - this.insert("com.hzya.frame.plugin.lets.ofs.dao.impl.TocofsSaleoutDetailedDaoImpl.entityInsertBatchV2", tocofsSaleoutDetailedEntity); + public void entityInsertOrUpdateBatch(List tocofsSaleoutDetailedEntities) throws Exception { + insert("com.hzya.frame.plugin.lets.ofs.dao.impl.TocofsSaleoutDetailedDaoImpl.entityInsertOrUpdateBatch", tocofsSaleoutDetailedEntities); } } \ No newline at end of file diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutDetailedEntity.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutDetailedEntity.java index c32b28f1..eb3f0a79 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutDetailedEntity.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutDetailedEntity.java @@ -1,18 +1,19 @@ package com.hzya.frame.plugin.lets.ofs.entity; import com.hzya.frame.web.entity.BaseEntity; +import lombok.Data; /** - * tocofs_saleout_detailed(TocofsSaleoutDetailed)实体类 + * O出库单明细表(TOC、TOB业务底表)(TocofsSaleoutDetailed)实体类 * * @author makejava - * @since 2024-08-01 17:01:53 + * @since 2024-09-04 17:48:28 */ +//@Data +//2024年9月5日 11:00:32 抛出异常,There is no getter for property named 'primaryKey' in 'class com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutDetailedEntity' +//2024年9月5日 11:05:13 没用,不是@data这里的问题 +@Data public class TocofsSaleoutDetailedEntity extends BaseEntity { - /** - * rootId - */ -// private Long rootid; /** * LETS */ @@ -30,7 +31,7 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity { */ private String shipmentcode; /** - * 22814582 + * 22814582 主键 */ private Long reforderid; /** @@ -57,6 +58,7 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity { * LETS-SO2024031900000002 */ private String sourceordercode; + private String sourcelinenum; /** * AVAILABLE */ @@ -73,6 +75,7 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity { * 0 */ private Long shipqty; + private String shipat; /** * EA */ @@ -125,327 +128,236 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity { * LETS-ADMIN */ private String lastupdatedby; - -// public Long getRootid() { -// return rootid; -// } -// -// public void setRootid(Long rootid) { -// this.rootid = rootid; -// } - - private String newTransmitInfo; - - private String newPushDate; - - private String newState; - - private String newSystemNumber; - - private String newSystemPrimary; - /** * 主表主键 */ - private String primaryKey; - + private String maintableid; /** - * 业务类型 + * (销售)推送时间 */ - private String businessType; - + private String newpushdate; /** - * 业务日期 + * (销售)报错详情 */ - private String businessDate; - - public String getBusinessDate() { - return businessDate; - } - - public void setBusinessDate(String businessDate) { - this.businessDate = businessDate; - } - - public String getBusinessType() { - return businessType; - } - - public void setBusinessType(String businessType) { - this.businessType = businessType; - } - - public String getNewTransmitInfo() { - return newTransmitInfo; - } - - public void setNewTransmitInfo(String newTransmitInfo) { - this.newTransmitInfo = newTransmitInfo; - } - - public String getNewPushDate() { - return newPushDate; - } - - public void setNewPushDate(String newPushDate) { - this.newPushDate = newPushDate; - } - - public String getNewState() { - return newState; - } - - public void setNewState(String newState) { - this.newState = newState; - } - - public String getNewSystemNumber() { - return newSystemNumber; - } - - public void setNewSystemNumber(String newSystemNumber) { - this.newSystemNumber = newSystemNumber; - } - - public String getNewSystemPrimary() { - return newSystemPrimary; - } - - public void setNewSystemPrimary(String newSystemPrimary) { - this.newSystemPrimary = newSystemPrimary; - } - - public String getPrimaryKey() { - return primaryKey; - } - - public void setPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - } - - public String getClientcode() { - return clientcode; - } - - public void setClientcode(String clientcode) { - this.clientcode = clientcode; - } - - public String getCompanycode() { - return companycode; - } - - public void setCompanycode(String companycode) { - this.companycode = companycode; - } - - public String getFacilitycode() { - return facilitycode; - } - - public void setFacilitycode(String facilitycode) { - this.facilitycode = facilitycode; - } - - public String getShipmentcode() { - return shipmentcode; - } - - public void setShipmentcode(String shipmentcode) { - this.shipmentcode = shipmentcode; - } - - public Long getReforderid() { - return reforderid; - } - - public void setReforderid(Long reforderid) { - this.reforderid = reforderid; - } - - public Long getReforderdetailid() { - return reforderdetailid; - } - - public void setReforderdetailid(Long reforderdetailid) { - this.reforderdetailid = reforderdetailid; - } - - public String getRefordercode() { - return refordercode; - } - - public void setRefordercode(String refordercode) { - this.refordercode = refordercode; - } - - public Long getAllocinvid() { - return allocinvid; - } - - public void setAllocinvid(Long allocinvid) { - this.allocinvid = allocinvid; - } - - public String getSkucode() { - return skucode; - } - - public void setSkucode(String skucode) { - this.skucode = skucode; - } - - public String getSkuname() { - return skuname; - } - - public void setSkuname(String skuname) { - this.skuname = skuname; - } - - public String getSourceordercode() { - return sourceordercode; - } - - public void setSourceordercode(String sourceordercode) { - this.sourceordercode = sourceordercode; - } - - public String getInventorysts() { - return inventorysts; - } - - public void setInventorysts(String inventorysts) { - this.inventorysts = inventorysts; - } - - public Long getIsgift() { - return isgift; - } - - public void setIsgift(Long isgift) { - this.isgift = isgift; - } - - public Long getRequestqty() { - return requestqty; - } - - public void setRequestqty(Long requestqty) { - this.requestqty = requestqty; - } - - public Long getShipqty() { - return shipqty; - } - - public void setShipqty(Long shipqty) { - this.shipqty = shipqty; - } - - public String getQuantityum() { - return quantityum; - } - - public void setQuantityum(String quantityum) { - this.quantityum = quantityum; - } - - public Long getListprice() { - return listprice; - } - - public void setListprice(Long listprice) { - this.listprice = listprice; - } - - public Long getItemtotalamount() { - return itemtotalamount; - } - - public void setItemtotalamount(Long itemtotalamount) { - this.itemtotalamount = itemtotalamount; - } - - public Long getTotalpayamount() { - return totalpayamount; - } - - public void setTotalpayamount(Long totalpayamount) { - this.totalpayamount = totalpayamount; - } - - public Long getTotalweight() { - return totalweight; - } - - public void setTotalweight(Long totalweight) { - this.totalweight = totalweight; - } - - public Long getTotalvolume() { - return totalvolume; - } - - public void setTotalvolume(Long totalvolume) { - this.totalvolume = totalvolume; - } - - public Long getTotalvolumeweight() { - return totalvolumeweight; - } - - public void setTotalvolumeweight(Long totalvolumeweight) { - this.totalvolumeweight = totalvolumeweight; - } - - public String getWeightum() { - return weightum; - } - - public void setWeightum(String weightum) { - this.weightum = weightum; - } - - public String getVolumeum() { - return volumeum; - } - - public void setVolumeum(String volumeum) { - this.volumeum = volumeum; - } - - public String getCreated() { - return created; - } - - public void setCreated(String created) { - this.created = created; - } - - public String getCreatedby() { - return createdby; - } - - public void setCreatedby(String createdby) { - this.createdby = createdby; - } - - public String getLastupdated() { - return lastupdated; - } - - public void setLastupdated(String lastupdated) { - this.lastupdated = lastupdated; - } - - public String getLastupdatedby() { - return lastupdatedby; - } - - public void setLastupdatedby(String lastupdatedby) { - this.lastupdatedby = lastupdatedby; - } - -} - + private String newtransmitinfo; + /** + * (销售)出库同步是否成功 + */ + private String newstate; + /** + * (销售)交易成功(红)是否成功 + */ + private String newstate2; + /** + * (销售)交易成功(蓝)是否成功 + */ + private String newstate3; + /** + * (销售)交易成功(TOB发票)是否成功 + */ + private String newstate4; + /** + * (销售)下游系统编码(库存) + */ + private String newsystemnumber; + /** + * (销售)下游系统主键(库存) + */ + private String newsystemprimary; + /** + * (销售)下游系统编码(交易成功红) + */ + private String newsystemnumber2; + /** + * (销售)下游系统主键(交易成功红) + */ + private String newsystemprimary2; + /** + * (销售)下游系统编码(交易成功蓝) + */ + private String newsystemnumber3; + /** + * (销售)下游系统主键(交易成功蓝) + */ + private String newsystemprimary3; + /** + * (销售)下游系统编码(交易成功TOB发票) + */ + private String newsystemnumber4; + /** + * (销售)下游系统主键(交易成功TOB发票) + */ + private String newsystemprimary4; + /** + * (销售)业务日期-出库日期 + */ + private String businessdate; + /** + * (销售)业务日期-交易日期 + */ + private String successfultradedate; + /** + * (销售)业务发生类型 + */ + private String businesstype; + /** + * 自定义项 + */ + private String def1; + /** + * 自定义项 + */ + private String def2; + /** + * 自定义项 + */ + private String def3; + /** + * 自定义项 + */ + private String def4; + /** + * 自定义项 + */ + private String def5; + /** + * 自定义项 + */ + private String def6; + /** + * 自定义项 + */ + private String def7; + /** + * 自定义项 + */ + private String def8; + /** + * 自定义项 + */ + private String def9; + /** + * 自定义项 + */ + private String def10; + /** + * 自定义项 + */ + private String def11; + /** + * 自定义项 + */ + private String def12; + /** + * 自定义项 + */ + private String def13; + /** + * 自定义项 + */ + private String def14; + /** + * 自定义项 + */ + private String def15; + /** + * 自定义项 + */ + private String def16; + /** + * 自定义项 + */ + private String def17; + /** + * 自定义项 + */ + private String def18; + /** + * 自定义项 + */ + private String def19; + /** + * 自定义项 + */ + private String def20; + /** + * 自定义项 + */ + private String def21; + /** + * 自定义项 + */ + private String def22; + /** + * 自定义项 + */ + private String def23; + /** + * 自定义项 + */ + private String def24; + /** + * 自定义项 + */ + private String def25; + /** + * 自定义项 + */ + private String def26; + /** + * 自定义项 + */ + private String def27; + /** + * 自定义项 + */ + private String def28; + /** + * 自定义项 + */ + private String def29; + /** + * 自定义项 + */ + private String def30; + /** + * 自定义项 + */ + private String def31; + /** + * 自定义项 + */ + private String def32; + /** + * 自定义项 + */ + private String def33; + /** + * 自定义项 + */ + private String def34; + /** + * 自定义项 + */ + private String def35; + /** + * 自定义项 + */ + private String def36; + /** + * 自定义项 + */ + private String def37; + /** + * 自定义项 + */ + private String def38; + /** + * 自定义项 + */ + private String def39; + /** + * 自定义项 + */ + private String def40; +} \ No newline at end of file diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutDetailedEntity.xml b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutDetailedEntity.xml index 69b54661..53ce04d7 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutDetailedEntity.xml +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutDetailedEntity.xml @@ -1,143 +1,295 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - clientCode - ,companyCode - ,facilityCode - ,shipmentCode - ,refOrderId - ,refOrderDetailId - ,refOrderCode - ,allocInvId - ,skuCode - ,skuName - ,sourceOrderCode - ,inventorySts - ,isGift - ,requestQty - ,shipQty - ,quantityUM - ,listPrice - ,itemTotalAmount - ,totalPayAmount - ,totalWeight - ,totalVolume - ,totalVolumeWeight - ,weightUM - ,volumeUM - ,created - ,createdBy - ,lastUpdated + id + ,clientCode + ,companyCode + ,facilityCode + ,shipmentCode + ,refOrderId + ,refOrderDetailId + ,refOrderCode + ,allocInvId + ,skuCode + ,skuName + ,sourceOrderCode + ,sourceLineNum + ,inventorySts + ,isGift + ,requestQty + ,shipQty + ,shipAt + ,quantityUM + ,listPrice + ,itemTotalAmount + ,totalPayAmount + ,totalWeight + ,totalVolume + ,totalVolumeWeight + ,weightUM + ,volumeUM + ,created + ,createdBy + ,lastUpdated ,lastUpdatedBy - ,newTransmitInfo + ,mainTableId ,newPushDate + ,newTransmitInfo ,newState + ,newState2 + ,newState3 + ,newState4 ,newSystemNumber ,newSystemPrimary - ,primaryKey - ,businessType + ,newSystemNumber2 + ,newSystemPrimary2 + ,newSystemNumber3 + ,newSystemPrimary3 + ,newSystemNumber4 + ,newSystemPrimary4 ,businessDate - + ,successfulTradeDate + ,businessType + ,def1 + ,def2 + ,def3 + ,def4 + ,def5 + ,def6 + ,def7 + ,def8 + ,def9 + ,def10 + ,def11 + ,def12 + ,def13 + ,def14 + ,def15 + ,def16 + ,def17 + ,def18 + ,def19 + ,def20 + ,def21 + ,def22 + ,def23 + ,def24 + ,def25 + ,def26 + ,def27 + ,def28 + ,def29 + ,def30 + ,def31 + ,def32 + ,def33 + ,def34 + ,def35 + ,def36 + ,def37 + ,def38 + ,def39 + ,def40 + + + - - - - - select count(1) from tocofs_saleout_detailed - --- and rootId = #{rootid} + + and id = #{id} and clientCode = #{clientcode} and companyCode = #{companycode} and facilityCode = #{facilitycode} @@ -149,10 +301,12 @@ and skuCode = #{skucode} and skuName = #{skuname} and sourceOrderCode = #{sourceordercode} + and sourceLineNum = #{sourcelinenum} and inventorySts = #{inventorysts} and isGift = #{isgift} and requestQty = #{requestqty} and shipQty = #{shipqty} + and shipAt = #{shipat} and quantityUM = #{quantityum} and listPrice = #{listprice} and itemTotalAmount = #{itemtotalamount} @@ -166,27 +320,77 @@ and createdBy = #{createdby} and lastUpdated = #{lastupdated} and lastUpdatedBy = #{lastupdatedby} --- and sts='Y' - and newTransmitInfo = #{newTransmitInfo} - and newPushDate = #{newPushDate} - and newState = #{newState} - and newSystemNumber = #{newSystemNumber} - and newSystemPrimary = #{newSystemPrimary} - and primaryKey = #{primaryKey} - and businessType = #{businessType} - and businessDate = #{businessDate} - - - + and mainTableId = #{maintableid} + and newPushDate = #{newpushdate} + and newTransmitInfo = #{newtransmitinfo} + and newState = #{newstate} + and newState2 = #{newstate2} + and newState3 = #{newstate3} + and newState4 = #{newstate4} + and newSystemNumber = #{newsystemnumber} + and newSystemPrimary = #{newsystemprimary} + and newSystemNumber2 = #{newsystemnumber2} + and newSystemPrimary2 = #{newsystemprimary2} + and newSystemNumber3 = #{newsystemnumber3} + and newSystemPrimary3 = #{newsystemprimary3} + and newSystemNumber4 = #{newsystemnumber4} + and newSystemPrimary4 = #{newsystemprimary4} + and businessDate = #{businessdate} + and successfulTradeDate = #{successfultradedate} + and businessType = #{businesstype} + and def1 = #{def1} + and def2 = #{def2} + and def3 = #{def3} + and def4 = #{def4} + and def5 = #{def5} + and def6 = #{def6} + and def7 = #{def7} + and def8 = #{def8} + and def9 = #{def9} + and def10 = #{def10} + and def11 = #{def11} + and def12 = #{def12} + and def13 = #{def13} + and def14 = #{def14} + and def15 = #{def15} + and def16 = #{def16} + and def17 = #{def17} + and def18 = #{def18} + and def19 = #{def19} + and def20 = #{def20} + and def21 = #{def21} + and def22 = #{def22} + and def23 = #{def23} + and def24 = #{def24} + and def25 = #{def25} + and def26 = #{def26} + and def27 = #{def27} + and def28 = #{def28} + and def29 = #{def29} + and def30 = #{def30} + and def31 = #{def31} + and def32 = #{def32} + and def33 = #{def33} + and def34 = #{def34} + and def35 = #{def35} + and def36 = #{def36} + and def37 = #{def37} + and def38 = #{def38} + and def39 = #{def39} + and def40 = #{def40} + and sts='Y' + + order by sorts asc + order by ${sort} ${order} - + select + + from tocofs_saleout_detailed + + and id like concat('%',#{id},'%') and clientCode like concat('%',#{clientcode},'%') and companyCode like concat('%',#{companycode},'%') and facilityCode like concat('%',#{facilitycode},'%') @@ -198,10 +402,12 @@ and skuCode like concat('%',#{skucode},'%') and skuName like concat('%',#{skuname},'%') and sourceOrderCode like concat('%',#{sourceordercode},'%') + and sourceLineNum like concat('%',#{sourcelinenum},'%') and inventorySts like concat('%',#{inventorysts},'%') and isGift like concat('%',#{isgift},'%') and requestQty like concat('%',#{requestqty},'%') and shipQty like concat('%',#{shipqty},'%') + and shipAt like concat('%',#{shipat},'%') and quantityUM like concat('%',#{quantityum},'%') and listPrice like concat('%',#{listprice},'%') and itemTotalAmount like concat('%',#{itemtotalamount},'%') @@ -215,259 +421,573 @@ and createdBy like concat('%',#{createdby},'%') and lastUpdated like concat('%',#{lastupdated},'%') and lastUpdatedBy like concat('%',#{lastupdatedby},'%') --- and sts='Y' - and newTransmitInfo like concat('%',#{newTransmitInfo},'%') - and newPushDate like concat('%',#{newPushDate},'%') - and newState like concat('%',#{newState},'%') - and newSystemNumber like concat('%',#{newSystemNumber},'%') - and newSystemPrimary like concat('%',#{newSystemPrimary},'%') - and primaryKey like concat('%',#{primaryKey},'%') - and businessType like concat('%',#{businessType},'%') - and businessDate like concat('%',#{businessDate},'%') - - - - + and mainTableId like concat('%',#{maintableid},'%') + and newPushDate like concat('%',#{newpushdate},'%') + and newTransmitInfo like concat('%',#{newtransmitinfo},'%') + and newState like concat('%',#{newstate},'%') + and newState2 like concat('%',#{newstate2},'%') + and newState3 like concat('%',#{newstate3},'%') + and newState4 like concat('%',#{newstate4},'%') + and newSystemNumber like concat('%',#{newsystemnumber},'%') + and newSystemPrimary like concat('%',#{newsystemprimary},'%') + and newSystemNumber2 like concat('%',#{newsystemnumber2},'%') + and newSystemPrimary2 like concat('%',#{newsystemprimary2},'%') + and newSystemNumber3 like concat('%',#{newsystemnumber3},'%') + and newSystemPrimary3 like concat('%',#{newsystemprimary3},'%') + and newSystemNumber4 like concat('%',#{newsystemnumber4},'%') + and newSystemPrimary4 like concat('%',#{newsystemprimary4},'%') + and businessDate like concat('%',#{businessdate},'%') + and successfulTradeDate like concat('%',#{successfultradedate},'%') + and businessType like concat('%',#{businesstype},'%') + and def1 like concat('%',#{def1},'%') + and def2 like concat('%',#{def2},'%') + and def3 like concat('%',#{def3},'%') + and def4 like concat('%',#{def4},'%') + and def5 like concat('%',#{def5},'%') + and def6 like concat('%',#{def6},'%') + and def7 like concat('%',#{def7},'%') + and def8 like concat('%',#{def8},'%') + and def9 like concat('%',#{def9},'%') + and def10 like concat('%',#{def10},'%') + and def11 like concat('%',#{def11},'%') + and def12 like concat('%',#{def12},'%') + and def13 like concat('%',#{def13},'%') + and def14 like concat('%',#{def14},'%') + and def15 like concat('%',#{def15},'%') + and def16 like concat('%',#{def16},'%') + and def17 like concat('%',#{def17},'%') + and def18 like concat('%',#{def18},'%') + and def19 like concat('%',#{def19},'%') + and def20 like concat('%',#{def20},'%') + and def21 like concat('%',#{def21},'%') + and def22 like concat('%',#{def22},'%') + and def23 like concat('%',#{def23},'%') + and def24 like concat('%',#{def24},'%') + and def25 like concat('%',#{def25},'%') + and def26 like concat('%',#{def26},'%') + and def27 like concat('%',#{def27},'%') + and def28 like concat('%',#{def28},'%') + and def29 like concat('%',#{def29},'%') + and def30 like concat('%',#{def30},'%') + and def31 like concat('%',#{def31},'%') + and def32 like concat('%',#{def32},'%') + and def33 like concat('%',#{def33},'%') + and def34 like concat('%',#{def34},'%') + and def35 like concat('%',#{def35},'%') + and def36 like concat('%',#{def36},'%') + and def37 like concat('%',#{def37},'%') + and def38 like concat('%',#{def38},'%') + and def39 like concat('%',#{def39},'%') + and def40 like concat('%',#{def40},'%') + and sts='Y' + + order by sorts asc + order by ${sort} ${order} + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - insert IGNORE into tocofs_saleout_detailed(clientCode, companyCode, facilityCode, shipmentCode, refOrderId, refOrderDetailId, refOrderCode, allocInvId, skuCode, skuName, sourceOrderCode, inventorySts, isGift, requestQty, shipQty, quantityUM, listPrice, itemTotalAmount, totalPayAmount, totalWeight, totalVolume, totalVolumeWeight, weightUM, volumeUM, created, createdBy, lastUpdated, lastUpdatedBy,newTransmitInfo,newPushDate,newState,newSystemNumber,newSystemPrimary,primaryKey,businessType,businessDate) - values - - (#{entity.clientcode},#{entity.companycode},#{entity.facilitycode},#{entity.shipmentcode},#{entity.reforderid},#{entity.reforderdetailid},#{entity.refordercode},#{entity.allocinvid},#{entity.skucode},#{entity.skuname},#{entity.sourceordercode},#{entity.inventorysts},#{entity.isgift},#{entity.requestqty},#{entity.shipqty},#{entity.quantityum},#{entity.listprice},#{entity.itemtotalamount},#{entity.totalpayamount},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.weightum},#{entity.volumeum},#{entity.created},#{entity.createdby},#{entity.lastupdated},#{entity.lastupdatedby},#{entity.newTransmitInfo},#{entity.newPushDate},#{entity.newState},#{entity.newSystemNumber},#{entity.newSystemPrimary},#{entity.primaryKey},#{entity.businessType},#{entity.businessDate}) - - - - - - insert into tocofs_saleout_detailed(clientCode, companyCode, facilityCode, shipmentCode, refOrderId, refOrderDetailId, refOrderCode, allocInvId, skuCode, skuName, sourceOrderCode, inventorySts, isGift, requestQty, shipQty, quantityUM, listPrice, itemTotalAmount, totalPayAmount, totalWeight, totalVolume, totalVolumeWeight, weightUM, volumeUM, created, createdBy, lastUpdated, lastUpdatedBy,newTransmitInfo,newPushDate,newState,newSystemNumber,newSystemPrimary,primaryKey,businessType,businessDate) - values - - (#{entity.clientcode},#{entity.companycode},#{entity.facilitycode},#{entity.shipmentcode},#{entity.reforderid},#{entity.reforderdetailid},#{entity.refordercode},#{entity.allocinvid},#{entity.skucode},#{entity.skuname},#{entity.sourceordercode},#{entity.inventorysts},#{entity.isgift},#{entity.requestqty},#{entity.shipqty},#{entity.quantityum},#{entity.listprice},#{entity.itemtotalamount},#{entity.totalpayamount},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.weightum},#{entity.volumeum},#{entity.created},#{entity.createdby},#{entity.lastupdatedby},#{entity.lastupdated},#{entity.newTransmitInfo},#{entity.newPushDate},#{entity.newState},#{entity.newSystemNumber},#{entity.newSystemPrimary},#{entity.primaryKey},#{entity.businessType},#{entity.businessDate}) - - on duplicate key update - clientCode = values(clientCode), - companyCode = values(companyCode), - facilityCode = values(facilityCode), - shipmentCode = values(shipmentCode), - refOrderId = values(refOrderId), - refOrderDetailId = values(refOrderDetailId), - refOrderCode = values(refOrderCode), - allocInvId = values(allocInvId), - skuCode = values(skuCode), - skuName = values(skuName), - sourceOrderCode = values(sourceOrderCode), - inventorySts = values(inventorySts), - isGift = values(isGift), - requestQty = values(requestQty), - shipQty = values(shipQty), - quantityUM = values(quantityUM), - listPrice = values(listPrice), - itemTotalAmount = values(itemTotalAmount), - totalPayAmount = values(totalPayAmount), - totalWeight = values(totalWeight), - totalVolume = values(totalVolume), - totalVolumeWeight = values(totalVolumeWeight), - weightUM = values(weightUM), - volumeUM = values(volumeUM), - created = values(created), - createdBy = values(createdBy), - lastUpdated = values(lastUpdated), - lastUpdatedBy = values(lastUpdatedBy), - newTransmitInfo = values(newTransmitInfo), - newPushDate = values(newPushDate), - newState = values(newState), - newSystemNumber = values(newSystemNumber), - newSystemPrimary = values(newSystemPrimary), - primaryKey = values(primaryKey), - businessType = values(businessType), - businessDate = values(businessDate) - - - - -update tocofs_saleout_detailed set - - clientCode = #{clientcode}, - companyCode = #{companycode}, - facilityCode = #{facilitycode}, - shipmentCode = #{shipmentcode}, - refOrderId = #{reforderid}, - refOrderDetailId = #{reforderdetailid}, - refOrderCode = #{refordercode}, - allocInvId = #{allocinvid}, - skuCode = #{skucode}, - skuName = #{skuname}, - sourceOrderCode = #{sourceordercode}, - inventorySts = #{inventorysts}, - isGift = #{isgift}, - requestQty = #{requestqty}, - shipQty = #{shipqty}, - quantityUM = #{quantityum}, - listPrice = #{listprice}, - itemTotalAmount = #{itemtotalamount}, - totalPayAmount = #{totalpayamount}, - totalWeight = #{totalweight}, - totalVolume = #{totalvolume}, - totalVolumeWeight = #{totalvolumeweight}, - weightUM = #{weightum}, - volumeUM = #{volumeum}, - created = #{created}, - createdBy = #{createdby}, - lastUpdated = #{lastupdated}, - lastUpdatedBy = #{lastupdatedby}, - newTransmitInfo = #{newTransmitInfo}, - newPushDate = #{newPushDate}, - newState = #{newState}, - newSystemNumber = #{newSystemNumber}, - newSystemPrimary = #{newSystemPrimary}, - primaryKey = #{primaryKey}, - businessType = #{businessType}, - businessDate = #{businessDate} - -where rootId = #{rootid} - - - -update tocofs_saleout_detailed set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} -where rootId = #{rootid} - - - -update tocofs_saleout_detailed set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} - - and rootId = #{rootid} + + + insert into tocofs_saleout_detailed( + + id , + clientCode , + companyCode , + facilityCode , + shipmentCode , + refOrderId , + refOrderDetailId , + refOrderCode , + allocInvId , + skuCode , + skuName , + sourceOrderCode , + sourceLineNum , + inventorySts , + isGift , + requestQty , + shipQty , + shipAt , + quantityUM , + listPrice , + itemTotalAmount , + totalPayAmount , + totalWeight , + totalVolume , + totalVolumeWeight , + weightUM , + volumeUM , + created , + createdBy , + lastUpdated , + lastUpdatedBy , + mainTableId , + newPushDate , + newTransmitInfo , + newState , + newState2 , + newState3 , + newState4 , + newSystemNumber , + newSystemPrimary , + newSystemNumber2 , + newSystemPrimary2 , + newSystemNumber3 , + newSystemPrimary3 , + newSystemNumber4 , + newSystemPrimary4 , + businessDate , + successfulTradeDate , + businessType , + def1 , + def2 , + def3 , + def4 , + def5 , + def6 , + def7 , + def8 , + def9 , + def10 , + def11 , + def12 , + def13 , + def14 , + def15 , + def16 , + def17 , + def18 , + def19 , + def20 , + def21 , + def22 , + def23 , + def24 , + def25 , + def26 , + def27 , + def28 , + def29 , + def30 , + def31 , + def32 , + def33 , + def34 , + def35 , + def36 , + def37 , + def38 , + def39 , + def40 , + sorts, + sts, + + )values( + + #{id} , + #{clientcode} , + #{companycode} , + #{facilitycode} , + #{shipmentcode} , + #{reforderid} , + #{reforderdetailid} , + #{refordercode} , + #{allocinvid} , + #{skucode} , + #{skuname} , + #{sourceordercode} , + #{sourcelinenum} , + #{inventorysts} , + #{isgift} , + #{requestqty} , + #{shipqty} , + #{shipat} , + #{quantityum} , + #{listprice} , + #{itemtotalamount} , + #{totalpayamount} , + #{totalweight} , + #{totalvolume} , + #{totalvolumeweight} , + #{weightum} , + #{volumeum} , + #{created} , + #{createdby} , + #{lastupdated} , + #{lastupdatedby} , + #{maintableid} , + #{newpushdate} , + #{newtransmitinfo} , + #{newstate} , + #{newstate2} , + #{newstate3} , + #{newstate4} , + #{newsystemnumber} , + #{newsystemprimary} , + #{newsystemnumber2} , + #{newsystemprimary2} , + #{newsystemnumber3} , + #{newsystemprimary3} , + #{newsystemnumber4} , + #{newsystemprimary4} , + #{businessdate} , + #{successfultradedate} , + #{businesstype} , + #{def1} , + #{def2} , + #{def3} , + #{def4} , + #{def5} , + #{def6} , + #{def7} , + #{def8} , + #{def9} , + #{def10} , + #{def11} , + #{def12} , + #{def13} , + #{def14} , + #{def15} , + #{def16} , + #{def17} , + #{def18} , + #{def19} , + #{def20} , + #{def21} , + #{def22} , + #{def23} , + #{def24} , + #{def25} , + #{def26} , + #{def27} , + #{def28} , + #{def29} , + #{def30} , + #{def31} , + #{def32} , + #{def33} , + #{def34} , + #{def35} , + #{def36} , + #{def37} , + #{def38} , + #{def39} , + #{def40} , + (select (max(IFNULL( a.sorts, 0 )) + 1) as sort from tocofs_saleout_detailed a WHERE a.sts = 'Y' ), + 'Y', + + ) + + + + insert into tocofs_saleout_detailed(clientCode, companyCode, facilityCode, shipmentCode, refOrderId, refOrderDetailId, refOrderCode, allocInvId, skuCode, skuName, sourceOrderCode, sourceLineNum, inventorySts, isGift, requestQty, shipQty, shipAt, quantityUM, listPrice, itemTotalAmount, totalPayAmount, totalWeight, totalVolume, totalVolumeWeight, weightUM, volumeUM, created, createdBy, lastUpdated, lastUpdatedBy, mainTableId, newPushDate, newTransmitInfo, newState, newState2, newState3, newState4, newSystemNumber, newSystemPrimary, newSystemNumber2, newSystemPrimary2, newSystemNumber3, newSystemPrimary3, newSystemNumber4, newSystemPrimary4, businessDate, successfulTradeDate, businessType, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, def11, def12, def13, def14, def15, def16, def17, def18, def19, def20, def21, def22, def23, def24, def25, def26, def27, def28, def29, def30, def31, def32, def33, def34, def35, def36, def37, def38, def39, def40, sts) + values + + (#{entity.clientcode},#{entity.companycode},#{entity.facilitycode},#{entity.shipmentcode},#{entity.reforderid},#{entity.reforderdetailid},#{entity.refordercode},#{entity.allocinvid},#{entity.skucode},#{entity.skuname},#{entity.sourceordercode},#{entity.sourcelinenum},#{entity.inventorysts},#{entity.isgift},#{entity.requestqty},#{entity.shipqty},#{entity.shipat},#{entity.quantityum},#{entity.listprice},#{entity.itemtotalamount},#{entity.totalpayamount},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.weightum},#{entity.volumeum},#{entity.created},#{entity.createdby},#{entity.lastupdated},#{entity.lastupdatedby},#{entity.maintableid},#{entity.newpushdate},#{entity.newtransmitinfo},#{entity.newstate},#{entity.newstate2},#{entity.newstate3},#{entity.newstate4},#{entity.newsystemnumber},#{entity.newsystemprimary},#{entity.newsystemnumber2},#{entity.newsystemprimary2},#{entity.newsystemnumber3},#{entity.newsystemprimary3},#{entity.newsystemnumber4},#{entity.newsystemprimary4},#{entity.businessdate},#{entity.successfultradedate},#{entity.businesstype},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.def11},#{entity.def12},#{entity.def13},#{entity.def14},#{entity.def15},#{entity.def16},#{entity.def17},#{entity.def18},#{entity.def19},#{entity.def20},#{entity.def21},#{entity.def22},#{entity.def23},#{entity.def24},#{entity.def25},#{entity.def26},#{entity.def27},#{entity.def28},#{entity.def29},#{entity.def30},#{entity.def31},#{entity.def32},#{entity.def33},#{entity.def34},#{entity.def35},#{entity.def36},#{entity.def37},#{entity.def38},#{entity.def39},#{entity.def40}, 'Y') + + + + + insert into tocofs_saleout_detailed(id,clientCode, companyCode, facilityCode, shipmentCode, refOrderId, refOrderDetailId, refOrderCode, allocInvId, skuCode, skuName, sourceOrderCode, sourceLineNum, inventorySts, isGift, requestQty, shipQty, shipAt, quantityUM, listPrice, itemTotalAmount, totalPayAmount, totalWeight, totalVolume, totalVolumeWeight, weightUM, volumeUM, created, createdBy, lastUpdated, lastUpdatedBy, mainTableId, newPushDate, newTransmitInfo, newState, newState2, newState3, newState4, newSystemNumber, newSystemPrimary, newSystemNumber2, newSystemPrimary2, newSystemNumber3, newSystemPrimary3, newSystemNumber4, newSystemPrimary4, businessDate, successfulTradeDate, businessType, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, def11, def12, def13, def14, def15, def16, def17, def18, def19, def20, def21, def22, def23, def24, def25, def26, def27, def28, def29, def30, def31, def32, def33, def34, def35, def36, def37, def38, def39, def40) + values + + (#{entity.id},#{entity.clientcode},#{entity.companycode},#{entity.facilitycode},#{entity.shipmentcode},#{entity.reforderid},#{entity.reforderdetailid},#{entity.refordercode},#{entity.allocinvid},#{entity.skucode},#{entity.skuname},#{entity.sourceordercode},#{entity.sourcelinenum},#{entity.inventorysts},#{entity.isgift},#{entity.requestqty},#{entity.shipqty},#{entity.shipat},#{entity.quantityum},#{entity.listprice},#{entity.itemtotalamount},#{entity.totalpayamount},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.weightum},#{entity.volumeum},#{entity.created},#{entity.createdby},#{entity.lastupdated},#{entity.lastupdatedby},#{entity.maintableid},#{entity.newpushdate},#{entity.newtransmitinfo},#{entity.newstate},#{entity.newstate2},#{entity.newstate3},#{entity.newstate4},#{entity.newsystemnumber},#{entity.newsystemprimary},#{entity.newsystemnumber2},#{entity.newsystemprimary2},#{entity.newsystemnumber3},#{entity.newsystemprimary3},#{entity.newsystemnumber4},#{entity.newsystemprimary4},#{entity.businessdate},#{entity.successfultradedate},#{entity.businesstype},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.def11},#{entity.def12},#{entity.def13},#{entity.def14},#{entity.def15},#{entity.def16},#{entity.def17},#{entity.def18},#{entity.def19},#{entity.def20},#{entity.def21},#{entity.def22},#{entity.def23},#{entity.def24},#{entity.def25},#{entity.def26},#{entity.def27},#{entity.def28},#{entity.def29},#{entity.def30},#{entity.def31},#{entity.def32},#{entity.def33},#{entity.def34},#{entity.def35},#{entity.def36},#{entity.def37},#{entity.def38},#{entity.def39},#{entity.def40}) + + on duplicate key update + id = values(id), + clientCode = values(clientCode), + companyCode = values(companyCode), + facilityCode = values(facilityCode), + shipmentCode = values(shipmentCode), + refOrderId = values(refOrderId), + refOrderDetailId = values(refOrderDetailId), + refOrderCode = values(refOrderCode), + allocInvId = values(allocInvId), + skuCode = values(skuCode), + skuName = values(skuName), + sourceOrderCode = values(sourceOrderCode), + sourceLineNum = values(sourceLineNum), + inventorySts = values(inventorySts), + isGift = values(isGift), + requestQty = values(requestQty), + shipQty = values(shipQty), + shipAt = values(shipAt), + quantityUM = values(quantityUM), + listPrice = values(listPrice), + itemTotalAmount = values(itemTotalAmount), + totalPayAmount = values(totalPayAmount), + totalWeight = values(totalWeight), + totalVolume = values(totalVolume), + totalVolumeWeight = values(totalVolumeWeight), + weightUM = values(weightUM), + volumeUM = values(volumeUM), + created = values(created), + createdBy = values(createdBy), + lastUpdated = values(lastUpdated), + lastUpdatedBy = values(lastUpdatedBy), + mainTableId = values(mainTableId), + newPushDate = values(newPushDate), + newTransmitInfo = values(newTransmitInfo), + newState = values(newState), + newState2 = values(newState2), + newState3 = values(newState3), + newState4 = values(newState4), + newSystemNumber = values(newSystemNumber), + newSystemPrimary = values(newSystemPrimary), + newSystemNumber2 = values(newSystemNumber2), + newSystemPrimary2 = values(newSystemPrimary2), + newSystemNumber3 = values(newSystemNumber3), + newSystemPrimary3 = values(newSystemPrimary3), + newSystemNumber4 = values(newSystemNumber4), + newSystemPrimary4 = values(newSystemPrimary4), + businessDate = values(businessDate), + successfulTradeDate = values(successfulTradeDate), + businessType = values(businessType), + def1 = values(def1), + def2 = values(def2), + def3 = values(def3), + def4 = values(def4), + def5 = values(def5), + def6 = values(def6), + def7 = values(def7), + def8 = values(def8), + def9 = values(def9), + def10 = values(def10), + def11 = values(def11), + def12 = values(def12), + def13 = values(def13), + def14 = values(def14), + def15 = values(def15), + def16 = values(def16), + def17 = values(def17), + def18 = values(def18), + def19 = values(def19), + def20 = values(def20), + def21 = values(def21), + def22 = values(def22), + def23 = values(def23), + def24 = values(def24), + def25 = values(def25), + def26 = values(def26), + def27 = values(def27), + def28 = values(def28), + def29 = values(def29), + def30 = values(def30), + def31 = values(def31), + def32 = values(def32), + def33 = values(def33), + def34 = values(def34), + def35 = values(def35), + def36 = values(def36), + def37 = values(def37), + def38 = values(def38), + def39 = values(def39), + def40 = values(def40) + + + update tocofs_saleout_detailed set + + clientCode = #{clientcode}, + companyCode = #{companycode}, + facilityCode = #{facilitycode}, + shipmentCode = #{shipmentcode}, + refOrderId = #{reforderid}, + refOrderDetailId = #{reforderdetailid}, + refOrderCode = #{refordercode}, + allocInvId = #{allocinvid}, + skuCode = #{skucode}, + skuName = #{skuname}, + sourceOrderCode = #{sourceordercode}, + sourceLineNum = #{sourcelinenum}, + inventorySts = #{inventorysts}, + isGift = #{isgift}, + requestQty = #{requestqty}, + shipQty = #{shipqty}, + shipAt = #{shipat}, + quantityUM = #{quantityum}, + listPrice = #{listprice}, + itemTotalAmount = #{itemtotalamount}, + totalPayAmount = #{totalpayamount}, + totalWeight = #{totalweight}, + totalVolume = #{totalvolume}, + totalVolumeWeight = #{totalvolumeweight}, + weightUM = #{weightum}, + volumeUM = #{volumeum}, + created = #{created}, + createdBy = #{createdby}, + lastUpdated = #{lastupdated}, + lastUpdatedBy = #{lastupdatedby}, + mainTableId = #{maintableid}, + newPushDate = #{newpushdate}, + newTransmitInfo = #{newtransmitinfo}, + newState = #{newstate}, + newState2 = #{newstate2}, + newState3 = #{newstate3}, + newState4 = #{newstate4}, + newSystemNumber = #{newsystemnumber}, + newSystemPrimary = #{newsystemprimary}, + newSystemNumber2 = #{newsystemnumber2}, + newSystemPrimary2 = #{newsystemprimary2}, + newSystemNumber3 = #{newsystemnumber3}, + newSystemPrimary3 = #{newsystemprimary3}, + newSystemNumber4 = #{newsystemnumber4}, + newSystemPrimary4 = #{newsystemprimary4}, + businessDate = #{businessdate}, + successfulTradeDate = #{successfultradedate}, + businessType = #{businesstype}, + def1 = #{def1}, + def2 = #{def2}, + def3 = #{def3}, + def4 = #{def4}, + def5 = #{def5}, + def6 = #{def6}, + def7 = #{def7}, + def8 = #{def8}, + def9 = #{def9}, + def10 = #{def10}, + def11 = #{def11}, + def12 = #{def12}, + def13 = #{def13}, + def14 = #{def14}, + def15 = #{def15}, + def16 = #{def16}, + def17 = #{def17}, + def18 = #{def18}, + def19 = #{def19}, + def20 = #{def20}, + def21 = #{def21}, + def22 = #{def22}, + def23 = #{def23}, + def24 = #{def24}, + def25 = #{def25}, + def26 = #{def26}, + def27 = #{def27}, + def28 = #{def28}, + def29 = #{def29}, + def30 = #{def30}, + def31 = #{def31}, + def32 = #{def32}, + def33 = #{def33}, + def34 = #{def34}, + def35 = #{def35}, + def36 = #{def36}, + def37 = #{def37}, + def38 = #{def38}, + def39 = #{def39}, + def40 = #{def40}, + + where id = #{id} + + + + update tocofs_saleout_detailed set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} + where id = #{id} + + + + update tocofs_saleout_detailed set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} + + and id = #{id} and clientCode = #{clientcode} and companyCode = #{companycode} and facilityCode = #{facilitycode} @@ -479,10 +999,12 @@ update tocofs_saleout_detailed set sts= 'N' ,modify_time = #{modify_time},modif and skuCode = #{skucode} and skuName = #{skuname} and sourceOrderCode = #{sourceordercode} + and sourceLineNum = #{sourcelinenum} and inventorySts = #{inventorysts} and isGift = #{isgift} and requestQty = #{requestqty} and shipQty = #{shipqty} + and shipAt = #{shipat} and quantityUM = #{quantityum} and listPrice = #{listprice} and itemTotalAmount = #{itemtotalamount} @@ -496,21 +1018,69 @@ update tocofs_saleout_detailed set sts= 'N' ,modify_time = #{modify_time},modif and createdBy = #{createdby} and lastUpdated = #{lastupdated} and lastUpdatedBy = #{lastupdatedby} --- and sts='Y' - and newTransmitInfo = #{newTransmitInfo} - and newPushDate = #{newPushDate} - and newState = #{newState} - and newSystemNumber = #{newSystemNumber} - and newSystemPrimary = #{newSystemPrimary} - and primaryKey = #{primaryKey} - and businessType = #{businessType} - and businessDate = #{businessDate} - - - - - delete from tocofs_saleout_detailed where rootId = #{rootid} - - - - + and mainTableId = #{maintableid} + and newPushDate = #{newpushdate} + and newTransmitInfo = #{newtransmitinfo} + and newState = #{newstate} + and newState2 = #{newstate2} + and newState3 = #{newstate3} + and newState4 = #{newstate4} + and newSystemNumber = #{newsystemnumber} + and newSystemPrimary = #{newsystemprimary} + and newSystemNumber2 = #{newsystemnumber2} + and newSystemPrimary2 = #{newsystemprimary2} + and newSystemNumber3 = #{newsystemnumber3} + and newSystemPrimary3 = #{newsystemprimary3} + and newSystemNumber4 = #{newsystemnumber4} + and newSystemPrimary4 = #{newsystemprimary4} + and businessDate = #{businessdate} + and successfulTradeDate = #{successfultradedate} + and businessType = #{businesstype} + and def1 = #{def1} + and def2 = #{def2} + and def3 = #{def3} + and def4 = #{def4} + and def5 = #{def5} + and def6 = #{def6} + and def7 = #{def7} + and def8 = #{def8} + and def9 = #{def9} + and def10 = #{def10} + and def11 = #{def11} + and def12 = #{def12} + and def13 = #{def13} + and def14 = #{def14} + and def15 = #{def15} + and def16 = #{def16} + and def17 = #{def17} + and def18 = #{def18} + and def19 = #{def19} + and def20 = #{def20} + and def21 = #{def21} + and def22 = #{def22} + and def23 = #{def23} + and def24 = #{def24} + and def25 = #{def25} + and def26 = #{def26} + and def27 = #{def27} + and def28 = #{def28} + and def29 = #{def29} + and def30 = #{def30} + and def31 = #{def31} + and def32 = #{def32} + and def33 = #{def33} + and def34 = #{def34} + and def35 = #{def35} + and def36 = #{def36} + and def37 = #{def37} + and def38 = #{def38} + and def39 = #{def39} + and def40 = #{def40} + and sts='Y' + + + + + delete from tocofs_saleout_detailed where id = #{id} + + \ No newline at end of file diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutEntity.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutEntity.java index 8e6f0c54..ba70d018 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutEntity.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutEntity.java @@ -1,14 +1,17 @@ package com.hzya.frame.plugin.lets.ofs.entity; import com.hzya.frame.web.entity.BaseEntity; +import lombok.Data; /** - * root(TocofsSaleout)实体类 + * O出库单表头(TOC、TOB业务底表)(TocofsSaleout)实体类 * * @author makejava - * @since 2024-08-01 17:01:32 + * @since 2024-09-04 17:48:16 */ +@Data public class TocofsSaleoutEntity extends BaseEntity { + /** * LETS */ @@ -73,14 +76,14 @@ public class TocofsSaleoutEntity extends BaseEntity { * LETS-SO2024031900000002 */ private String sourceordercode; - /** - * TB - */ - private String sourceuseraccount; /** * 杨 */ private String shiptoattentionto; + /** + * TB + */ + private String sourceuseraccount; /** * AAA */ @@ -157,10 +160,19 @@ public class TocofsSaleoutEntity extends BaseEntity { * 640 */ private Long itemtotalamount; + private String totalfulfillqty; + private String totalfulfillweight; + private String totalfulfillvolume; + private String totalfulfillvolumeweight; + /** + * 发货日期 + */ + private String shipat; /** * ZTO */ private String carriercode; + private String primarywaybillcode; /** * 1 */ @@ -212,6 +224,14 @@ public class TocofsSaleoutEntity extends BaseEntity { * 1 */ private Long taxpaid; + /** + * 交易成功时间 + */ + private String tradesuccessat; + /** + * 交易成功状态 + */ + private String sourceorderstatus; /** * 上海市 */ @@ -224,491 +244,168 @@ public class TocofsSaleoutEntity extends BaseEntity { * 杨浦区 */ private String shiptodistrictname; - /** - * 发货时间 + * 出库类型 */ - private String shipAt; - - public String getShipAt() { - return shipAt; - } - - public void setShipAt(String shipAt) { - this.shipAt = shipAt; - } - - public String getClientcode() { - return clientcode; - } - - public void setClientcode(String clientcode) { - this.clientcode = clientcode; - } - - public String getCompanycode() { - return companycode; - } - - public void setCompanycode(String companycode) { - this.companycode = companycode; - } - - public String getStorecode() { - return storecode; - } - - public void setStorecode(String storecode) { - this.storecode = storecode; - } - - public String getFacilitycode() { - return facilitycode; - } - - public void setFacilitycode(String facilitycode) { - this.facilitycode = facilitycode; - } - - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - public Long getReforderid() { - return reforderid; - } - - public void setReforderid(Long reforderid) { - this.reforderid = reforderid; - } - - public String getRefordercode() { - return refordercode; - } - - public void setRefordercode(String refordercode) { - this.refordercode = refordercode; - } - - public String getRefordertype() { - return refordertype; - } - - public void setRefordertype(String refordertype) { - this.refordertype = refordertype; - } - - public Long getStatus() { - return status; - } - - public void setStatus(Long status) { - this.status = status; - } - - public Long getConsolidated() { - return consolidated; - } - - public void setConsolidated(Long consolidated) { - this.consolidated = consolidated; - } - - public String getInternalinstructiontype() { - return internalinstructiontype; - } - - public void setInternalinstructiontype(String internalinstructiontype) { - this.internalinstructiontype = internalinstructiontype; - } - - public String getBizchannel() { - return bizchannel; - } - - public void setBizchannel(String bizchannel) { - this.bizchannel = bizchannel; - } - - public String getSourceplatformcode() { - return sourceplatformcode; - } - - public void setSourceplatformcode(String sourceplatformcode) { - this.sourceplatformcode = sourceplatformcode; - } - - public String getProcesstype() { - return processtype; - } - - public void setProcesstype(String processtype) { - this.processtype = processtype; - } - - public Long getSourceorderid() { - return sourceorderid; - } - - public void setSourceorderid(Long sourceorderid) { - this.sourceorderid = sourceorderid; - } - - public String getSourceordercode() { - return sourceordercode; - } - - public void setSourceordercode(String sourceordercode) { - this.sourceordercode = sourceordercode; - } - - public String getSourceuseraccount() { - return sourceuseraccount; - } - - public void setSourceuseraccount(String sourceuseraccount) { - this.sourceuseraccount = sourceuseraccount; - } - - public String getShiptoattentionto() { - return shiptoattentionto; - } - - public void setShiptoattentionto(String shiptoattentionto) { - this.shiptoattentionto = shiptoattentionto; - } - - public String getShiptoaddress() { - return shiptoaddress; - } - - public void setShiptoaddress(String shiptoaddress) { - this.shiptoaddress = shiptoaddress; - } - - public String getShiptocountry() { - return shiptocountry; - } - - public void setShiptocountry(String shiptocountry) { - this.shiptocountry = shiptocountry; - } - - public String getShiptostate() { - return shiptostate; - } - - public void setShiptostate(String shiptostate) { - this.shiptostate = shiptostate; - } - - public String getShiptocity() { - return shiptocity; - } - - public void setShiptocity(String shiptocity) { - this.shiptocity = shiptocity; - } - - public String getShiptodistrict() { - return shiptodistrict; - } - - public void setShiptodistrict(String shiptodistrict) { - this.shiptodistrict = shiptodistrict; - } - - public String getShiptomobile() { - return shiptomobile; - } - - public void setShiptomobile(String shiptomobile) { - this.shiptomobile = shiptomobile; - } - - public Long getTotallines() { - return totallines; - } - - public void setTotallines(Long totallines) { - this.totallines = totallines; - } - - public Long getTotalqty() { - return totalqty; - } - - public void setTotalqty(Long totalqty) { - this.totalqty = totalqty; - } - - public Long getTotalcontainers() { - return totalcontainers; - } - - public void setTotalcontainers(Long totalcontainers) { - this.totalcontainers = totalcontainers; - } - - public Long getTotalcases() { - return totalcases; - } - - public void setTotalcases(Long totalcases) { - this.totalcases = totalcases; - } - - public Long getTotalweight() { - return totalweight; - } - - public void setTotalweight(Long totalweight) { - this.totalweight = totalweight; - } - - public Long getTotalvolume() { - return totalvolume; - } - - public void setTotalvolume(Long totalvolume) { - this.totalvolume = totalvolume; - } - - public Long getTotalvolumeweight() { - return totalvolumeweight; - } - - public void setTotalvolumeweight(Long totalvolumeweight) { - this.totalvolumeweight = totalvolumeweight; - } - - public String getWeightum() { - return weightum; - } - - public void setWeightum(String weightum) { - this.weightum = weightum; - } - - public String getVolumeum() { - return volumeum; - } - - public void setVolumeum(String volumeum) { - this.volumeum = volumeum; - } - - public Long getTotalamount() { - return totalamount; - } - - public void setTotalamount(Long totalamount) { - this.totalamount = totalamount; - } - - public Long getTotalpayamount() { - return totalpayamount; - } - - public void setTotalpayamount(Long totalpayamount) { - this.totalpayamount = totalpayamount; - } - - public Long getPostageamount() { - return postageamount; - } - - public void setPostageamount(Long postageamount) { - this.postageamount = postageamount; - } - - public Long getItemtotalamount() { - return itemtotalamount; - } - - public void setItemtotalamount(Long itemtotalamount) { - this.itemtotalamount = itemtotalamount; - } - - public String getCarriercode() { - return carriercode; - } - - public void setCarriercode(String carriercode) { - this.carriercode = carriercode; - } - - public Long getPaymentstatus() { - return paymentstatus; - } - - public void setPaymentstatus(Long paymentstatus) { - this.paymentstatus = paymentstatus; - } - - public String getCodrequired() { - return codrequired; - } - - public void setCodrequired(String codrequired) { - this.codrequired = codrequired; - } - - public String getInvoicerequired() { - return invoicerequired; - } - - public void setInvoicerequired(String invoicerequired) { - this.invoicerequired = invoicerequired; - } - - public String getPaidat() { - return paidat; - } - - public void setPaidat(String paidat) { - this.paidat = paidat; - } - - public String getShipfromattentionto() { - return shipfromattentionto; - } - - public void setShipfromattentionto(String shipfromattentionto) { - this.shipfromattentionto = shipfromattentionto; - } - - public String getShipfromaddress() { - return shipfromaddress; - } - - public void setShipfromaddress(String shipfromaddress) { - this.shipfromaddress = shipfromaddress; - } - - public String getShipfromdistrict() { - return shipfromdistrict; - } - - public void setShipfromdistrict(String shipfromdistrict) { - this.shipfromdistrict = shipfromdistrict; - } - - public String getShipfromcity() { - return shipfromcity; - } - - public void setShipfromcity(String shipfromcity) { - this.shipfromcity = shipfromcity; - } - - public String getShipfromstate() { - return shipfromstate; - } - - public void setShipfromstate(String shipfromstate) { - this.shipfromstate = shipfromstate; - } - - public String getShipfromcountry() { - return shipfromcountry; - } - - public void setShipfromcountry(String shipfromcountry) { - this.shipfromcountry = shipfromcountry; - } - - public String getShipfrompostalcode() { - return shipfrompostalcode; - } - - public void setShipfrompostalcode(String shipfrompostalcode) { - this.shipfrompostalcode = shipfrompostalcode; - } - - public String getShipfromphone() { - return shipfromphone; - } - - public void setShipfromphone(String shipfromphone) { - this.shipfromphone = shipfromphone; - } - - public String getShipfrommobile() { - return shipfrommobile; - } - - public void setShipfrommobile(String shipfrommobile) { - this.shipfrommobile = shipfrommobile; - } - - public String getShipfromfax() { - return shipfromfax; - } - - public void setShipfromfax(String shipfromfax) { - this.shipfromfax = shipfromfax; - } - - public String getShipfromemail() { - return shipfromemail; - } - - public void setShipfromemail(String shipfromemail) { - this.shipfromemail = shipfromemail; - } - - public Long getCodamount() { - return codamount; - } - - public void setCodamount(Long codamount) { - this.codamount = codamount; - } - - public Long getTax() { - return tax; - } - - public void setTax(Long tax) { - this.tax = tax; - } - - public Long getTaxpaid() { - return taxpaid; - } - - public void setTaxpaid(Long taxpaid) { - this.taxpaid = taxpaid; - } - - public String getShiptostatename() { - return shiptostatename; - } - - public void setShiptostatename(String shiptostatename) { - this.shiptostatename = shiptostatename; - } - - public String getShiptocityname() { - return shiptocityname; - } - - public void setShiptocityname(String shiptocityname) { - this.shiptocityname = shiptocityname; - } - - public String getShiptodistrictname() { - return shiptodistrictname; - } - - public void setShiptodistrictname(String shiptodistrictname) { - this.shiptodistrictname = shiptodistrictname; - } - -} - + private String shipmenttype; + /** + * 自定义项 + */ + private String def1; + /** + * 自定义项 + */ + private String def2; + /** + * 自定义项 + */ + private String def3; + /** + * 自定义项 + */ + private String def4; + /** + * 自定义项 + */ + private String def5; + /** + * 自定义项 + */ + private String def6; + /** + * 自定义项 + */ + private String def7; + /** + * 自定义项 + */ + private String def8; + /** + * 自定义项 + */ + private String def9; + /** + * 自定义项 + */ + private String def10; + /** + * 自定义项 + */ + private String def11; + /** + * 自定义项 + */ + private String def12; + /** + * 自定义项 + */ + private String def13; + /** + * 自定义项 + */ + private String def14; + /** + * 自定义项 + */ + private String def15; + /** + * 自定义项 + */ + private String def16; + /** + * 自定义项 + */ + private String def17; + /** + * 自定义项 + */ + private String def18; + /** + * 自定义项 + */ + private String def19; + /** + * 自定义项 + */ + private String def20; + /** + * 自定义项 + */ + private String def21; + /** + * 自定义项 + */ + private String def22; + /** + * 自定义项 + */ + private String def23; + /** + * 自定义项 + */ + private String def24; + /** + * 自定义项 + */ + private String def25; + /** + * 自定义项 + */ + private String def26; + /** + * 自定义项 + */ + private String def27; + /** + * 自定义项 + */ + private String def28; + /** + * 自定义项 + */ + private String def29; + /** + * 自定义项 + */ + private String def30; + /** + * 自定义项 + */ + private String def31; + /** + * 自定义项 + */ + private String def32; + /** + * 自定义项 + */ + private String def33; + /** + * 自定义项 + */ + private String def34; + /** + * 自定义项 + */ + private String def35; + /** + * 自定义项 + */ + private String def36; + /** + * 自定义项 + */ + private String def37; + /** + * 自定义项 + */ + private String def38; + /** + * 自定义项 + */ + private String def39; + /** + * 自定义项 + */ + private String def40; +} \ No newline at end of file diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutEntity.xml b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutEntity.xml index e9d778e7..55f5edd6 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutEntity.xml +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsSaleoutEntity.xml @@ -1,215 +1,355 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id - ,clientCode - ,companyCode - ,storeCode - ,facilityCode - ,code - ,refOrderId - ,refOrderCode - ,refOrderType - ,status - ,consolidated - ,internalInstructionType - ,bizChannel - ,sourcePlatformCode - ,processType - ,sourceOrderId - ,sourceOrderCode - ,sourceUserAccount - ,shipToAttentionTo - ,shipToAddress - ,shipToCountry - ,shipToState - ,shipToCity - ,shipToDistrict - ,shipToMobile - ,totalLines - ,totalQty - ,totalContainers - ,totalCases - ,totalWeight - ,totalVolume - ,totalVolumeWeight - ,weightUM - ,volumeUM - ,totalAmount - ,totalPayAmount - ,postageAmount - ,itemTotalAmount - ,carrierCode - ,paymentStatus - ,codRequired - ,invoiceRequired - ,paidAt - ,shipFromAttentionTo - ,shipFromAddress - ,shipFromDistrict - ,shipFromCity - ,shipFromState - ,shipFromCountry - ,shipFromPostalCode - ,shipFromPhone - ,shipFromMobile - ,shipFromFax - ,shipFromEmail - ,codAmount - ,tax - ,taxPaid - ,shipToStateName - ,shipToCityName - ,shipToDistrictName + ,clientCode + ,companyCode + ,storeCode + ,facilityCode + ,code + ,refOrderId + ,refOrderCode + ,refOrderType + ,status + ,consolidated + ,internalInstructionType + ,bizChannel + ,sourcePlatformCode + ,processType + ,sourceOrderId + ,sourceOrderCode + ,shipToAttentionTo + ,sourceUserAccount + ,shipToAddress + ,shipToCountry + ,shipToState + ,shipToCity + ,shipToDistrict + ,shipToMobile + ,totalLines + ,totalQty + ,totalContainers + ,totalCases + ,totalWeight + ,totalVolume + ,totalVolumeWeight + ,weightUM + ,volumeUM + ,totalAmount + ,totalPayAmount + ,postageAmount + ,itemTotalAmount + ,totalFulfillQty + ,totalFulfillWeight + ,totalFulfillVolume + ,totalFulfillVolumeWeight ,shipAt - + ,carrierCode + ,primaryWaybillCode + ,paymentStatus + ,codRequired + ,invoiceRequired + ,paidAt + ,shipFromAttentionTo + ,shipFromAddress + ,shipFromDistrict + ,shipFromCity + ,shipFromState + ,shipFromCountry + ,shipFromPostalCode + ,shipFromPhone + ,shipFromMobile + ,shipFromFax + ,shipFromEmail + ,codAmount + ,tax + ,taxPaid + ,tradeSuccessAt + ,sourceOrderStatus + ,shipToStateName + ,shipToCityName + ,shipToDistrictName + ,shipmentType + ,def1 + ,def2 + ,def3 + ,def4 + ,def5 + ,def6 + ,def7 + ,def8 + ,def9 + ,def10 + ,def11 + ,def12 + ,def13 + ,def14 + ,def15 + ,def16 + ,def17 + ,def18 + ,def19 + ,def20 + ,def21 + ,def22 + ,def23 + ,def24 + ,def25 + ,def26 + ,def27 + ,def28 + ,def29 + ,def30 + ,def31 + ,def32 + ,def33 + ,def34 + ,def35 + ,def36 + ,def37 + ,def38 + ,def39 + ,def40 + + + - - - - - select count(1) from tocofs_saleout - - and id = #{id} + + and id = #{id} and clientCode = #{clientcode} and companyCode = #{companycode} and storeCode = #{storecode} @@ -226,8 +366,8 @@ and processType = #{processtype} and sourceOrderId = #{sourceorderid} and sourceOrderCode = #{sourceordercode} - and sourceUserAccount = #{sourceuseraccount} and shipToAttentionTo = #{shiptoattentionto} + and sourceUserAccount = #{sourceuseraccount} and shipToAddress = #{shiptoaddress} and shipToCountry = #{shiptocountry} and shipToState = #{shiptostate} @@ -247,7 +387,13 @@ and totalPayAmount = #{totalpayamount} and postageAmount = #{postageamount} and itemTotalAmount = #{itemtotalamount} + and totalFulfillQty = #{totalfulfillqty} + and totalFulfillWeight = #{totalfulfillweight} + and totalFulfillVolume = #{totalfulfillvolume} + and totalFulfillVolumeWeight = #{totalfulfillvolumeweight} + and shipAt = #{shipat} and carrierCode = #{carriercode} + and primaryWaybillCode = #{primarywaybillcode} and paymentStatus = #{paymentstatus} and codRequired = #{codrequired} and invoiceRequired = #{invoicerequired} @@ -266,23 +412,65 @@ and codAmount = #{codamount} and tax = #{tax} and taxPaid = #{taxpaid} + and tradeSuccessAt = #{tradesuccessat} + and sourceOrderStatus = #{sourceorderstatus} and shipToStateName = #{shiptostatename} and shipToCityName = #{shiptocityname} and shipToDistrictName = #{shiptodistrictname} --- and sts='Y' - and shipAt = #{shipAt} - - - + and shipmentType = #{shipmenttype} + and def1 = #{def1} + and def2 = #{def2} + and def3 = #{def3} + and def4 = #{def4} + and def5 = #{def5} + and def6 = #{def6} + and def7 = #{def7} + and def8 = #{def8} + and def9 = #{def9} + and def10 = #{def10} + and def11 = #{def11} + and def12 = #{def12} + and def13 = #{def13} + and def14 = #{def14} + and def15 = #{def15} + and def16 = #{def16} + and def17 = #{def17} + and def18 = #{def18} + and def19 = #{def19} + and def20 = #{def20} + and def21 = #{def21} + and def22 = #{def22} + and def23 = #{def23} + and def24 = #{def24} + and def25 = #{def25} + and def26 = #{def26} + and def27 = #{def27} + and def28 = #{def28} + and def29 = #{def29} + and def30 = #{def30} + and def31 = #{def31} + and def32 = #{def32} + and def33 = #{def33} + and def34 = #{def34} + and def35 = #{def35} + and def36 = #{def36} + and def37 = #{def37} + and def38 = #{def38} + and def39 = #{def39} + and def40 = #{def40} + and sts='Y' + + order by sorts asc + order by ${sort} ${order} - + select + + from tocofs_saleout + + and id like concat('%',#{id},'%') and clientCode like concat('%',#{clientcode},'%') and companyCode like concat('%',#{companycode},'%') and storeCode like concat('%',#{storecode},'%') @@ -299,8 +487,8 @@ and processType like concat('%',#{processtype},'%') and sourceOrderId like concat('%',#{sourceorderid},'%') and sourceOrderCode like concat('%',#{sourceordercode},'%') - and sourceUserAccount like concat('%',#{sourceuseraccount},'%') and shipToAttentionTo like concat('%',#{shiptoattentionto},'%') + and sourceUserAccount like concat('%',#{sourceuseraccount},'%') and shipToAddress like concat('%',#{shiptoaddress},'%') and shipToCountry like concat('%',#{shiptocountry},'%') and shipToState like concat('%',#{shiptostate},'%') @@ -320,7 +508,13 @@ and totalPayAmount like concat('%',#{totalpayamount},'%') and postageAmount like concat('%',#{postageamount},'%') and itemTotalAmount like concat('%',#{itemtotalamount},'%') + and totalFulfillQty like concat('%',#{totalfulfillqty},'%') + and totalFulfillWeight like concat('%',#{totalfulfillweight},'%') + and totalFulfillVolume like concat('%',#{totalfulfillvolume},'%') + and totalFulfillVolumeWeight like concat('%',#{totalfulfillvolumeweight},'%') + and shipAt like concat('%',#{shipat},'%') and carrierCode like concat('%',#{carriercode},'%') + and primaryWaybillCode like concat('%',#{primarywaybillcode},'%') and paymentStatus like concat('%',#{paymentstatus},'%') and codRequired like concat('%',#{codrequired},'%') and invoiceRequired like concat('%',#{invoicerequired},'%') @@ -339,94 +533,184 @@ and codAmount like concat('%',#{codamount},'%') and tax like concat('%',#{tax},'%') and taxPaid like concat('%',#{taxpaid},'%') + and tradeSuccessAt like concat('%',#{tradesuccessat},'%') + and sourceOrderStatus like concat('%',#{sourceorderstatus},'%') and shipToStateName like concat('%',#{shiptostatename},'%') and shipToCityName like concat('%',#{shiptocityname},'%') and shipToDistrictName like concat('%',#{shiptodistrictname},'%') --- and sts='Y' - and shipAt like concat('%',#{shipAt},'%') - - - - + and shipmentType like concat('%',#{shipmenttype},'%') + and def1 like concat('%',#{def1},'%') + and def2 like concat('%',#{def2},'%') + and def3 like concat('%',#{def3},'%') + and def4 like concat('%',#{def4},'%') + and def5 like concat('%',#{def5},'%') + and def6 like concat('%',#{def6},'%') + and def7 like concat('%',#{def7},'%') + and def8 like concat('%',#{def8},'%') + and def9 like concat('%',#{def9},'%') + and def10 like concat('%',#{def10},'%') + and def11 like concat('%',#{def11},'%') + and def12 like concat('%',#{def12},'%') + and def13 like concat('%',#{def13},'%') + and def14 like concat('%',#{def14},'%') + and def15 like concat('%',#{def15},'%') + and def16 like concat('%',#{def16},'%') + and def17 like concat('%',#{def17},'%') + and def18 like concat('%',#{def18},'%') + and def19 like concat('%',#{def19},'%') + and def20 like concat('%',#{def20},'%') + and def21 like concat('%',#{def21},'%') + and def22 like concat('%',#{def22},'%') + and def23 like concat('%',#{def23},'%') + and def24 like concat('%',#{def24},'%') + and def25 like concat('%',#{def25},'%') + and def26 like concat('%',#{def26},'%') + and def27 like concat('%',#{def27},'%') + and def28 like concat('%',#{def28},'%') + and def29 like concat('%',#{def29},'%') + and def30 like concat('%',#{def30},'%') + and def31 like concat('%',#{def31},'%') + and def32 like concat('%',#{def32},'%') + and def33 like concat('%',#{def33},'%') + and def34 like concat('%',#{def34},'%') + and def35 like concat('%',#{def35},'%') + and def36 like concat('%',#{def36},'%') + and def37 like concat('%',#{def37},'%') + and def38 like concat('%',#{def38},'%') + and def39 like concat('%',#{def39},'%') + and def40 like concat('%',#{def40},'%') + and sts='Y' + + order by sorts asc + order by ${sort} ${order} + - - + + - - - insert into tocofs_saleout( - - id , + + + insert into tocofs_saleout( + + id , clientCode , companyCode , storeCode , @@ -443,8 +727,8 @@ processType , sourceOrderId , sourceOrderCode , - sourceUserAccount , shipToAttentionTo , + sourceUserAccount , shipToAddress , shipToCountry , shipToState , @@ -464,7 +748,13 @@ totalPayAmount , postageAmount , itemTotalAmount , + totalFulfillQty , + totalFulfillWeight , + totalFulfillVolume , + totalFulfillVolumeWeight , + shipAt , carrierCode , + primaryWaybillCode , paymentStatus , codRequired , invoiceRequired , @@ -483,15 +773,58 @@ codAmount , tax , taxPaid , + tradeSuccessAt , + sourceOrderStatus , shipToStateName , shipToCityName , shipToDistrictName , + shipmentType , + def1 , + def2 , + def3 , + def4 , + def5 , + def6 , + def7 , + def8 , + def9 , + def10 , + def11 , + def12 , + def13 , + def14 , + def15 , + def16 , + def17 , + def18 , + def19 , + def20 , + def21 , + def22 , + def23 , + def24 , + def25 , + def26 , + def27 , + def28 , + def29 , + def30 , + def31 , + def32 , + def33 , + def34 , + def35 , + def36 , + def37 , + def38 , + def39 , + def40 , sorts, - sts, - - )values( - - #{id} , + sts, + + )values( + + #{id} , #{clientcode} , #{companycode} , #{storecode} , @@ -508,8 +841,8 @@ #{processtype} , #{sourceorderid} , #{sourceordercode} , - #{sourceuseraccount} , #{shiptoattentionto} , + #{sourceuseraccount} , #{shiptoaddress} , #{shiptocountry} , #{shiptostate} , @@ -529,7 +862,13 @@ #{totalpayamount} , #{postageamount} , #{itemtotalamount} , + #{totalfulfillqty} , + #{totalfulfillweight} , + #{totalfulfillvolume} , + #{totalfulfillvolumeweight} , + #{shipat} , #{carriercode} , + #{primarywaybillcode} , #{paymentstatus} , #{codrequired} , #{invoicerequired} , @@ -548,180 +887,306 @@ #{codamount} , #{tax} , #{taxpaid} , + #{tradesuccessat} , + #{sourceorderstatus} , #{shiptostatename} , #{shiptocityname} , #{shiptodistrictname} , + #{shipmenttype} , + #{def1} , + #{def2} , + #{def3} , + #{def4} , + #{def5} , + #{def6} , + #{def7} , + #{def8} , + #{def9} , + #{def10} , + #{def11} , + #{def12} , + #{def13} , + #{def14} , + #{def15} , + #{def16} , + #{def17} , + #{def18} , + #{def19} , + #{def20} , + #{def21} , + #{def22} , + #{def23} , + #{def24} , + #{def25} , + #{def26} , + #{def27} , + #{def28} , + #{def29} , + #{def30} , + #{def31} , + #{def32} , + #{def33} , + #{def34} , + #{def35} , + #{def36} , + #{def37} , + #{def38} , + #{def39} , + #{def40} , (select (max(IFNULL( a.sorts, 0 )) + 1) as sort from tocofs_saleout a WHERE a.sts = 'Y' ), - 'Y', - - ) - - - - - insert into tocofs_saleout(clientCode, companyCode, storeCode, facilityCode, code, refOrderId, refOrderCode, refOrderType, status, consolidated, internalInstructionType, bizChannel, sourcePlatformCode, processType, sourceOrderId, sourceOrderCode, sourceUserAccount, shipToAttentionTo, shipToAddress, shipToCountry, shipToState, shipToCity, shipToDistrict, shipToMobile, totalLines, totalQty, totalContainers, totalCases, totalWeight, totalVolume, totalVolumeWeight, weightUM, volumeUM, totalAmount, totalPayAmount, postageAmount, itemTotalAmount, carrierCode, paymentStatus, codRequired, invoiceRequired, paidAt, shipFromAttentionTo, shipFromAddress, shipFromDistrict, shipFromCity, shipFromState, shipFromCountry, shipFromPostalCode, shipFromPhone, shipFromMobile, shipFromFax, shipFromEmail, codAmount, tax, taxPaid, shipToStateName, shipToCityName, shipToDistrictName, sts) - values - - (#{entity.clientcode},#{entity.companycode},#{entity.storecode},#{entity.facilitycode},#{entity.code},#{entity.reforderid},#{entity.refordercode},#{entity.refordertype},#{entity.status},#{entity.consolidated},#{entity.internalinstructiontype},#{entity.bizchannel},#{entity.sourceplatformcode},#{entity.processtype},#{entity.sourceorderid},#{entity.sourceordercode},#{entity.sourceuseraccount},#{entity.shiptoattentionto},#{entity.shiptoaddress},#{entity.shiptocountry},#{entity.shiptostate},#{entity.shiptocity},#{entity.shiptodistrict},#{entity.shiptomobile},#{entity.totallines},#{entity.totalqty},#{entity.totalcontainers},#{entity.totalcases},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.weightum},#{entity.volumeum},#{entity.totalamount},#{entity.totalpayamount},#{entity.postageamount},#{entity.itemtotalamount},#{entity.carriercode},#{entity.paymentstatus},#{entity.codrequired},#{entity.invoicerequired},#{entity.paidat},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromdistrict},#{entity.shipfromcity},#{entity.shipfromstate},#{entity.shipfromcountry},#{entity.shipfrompostalcode},#{entity.shipfromphone},#{entity.shipfrommobile},#{entity.shipfromfax},#{entity.shipfromemail},#{entity.codamount},#{entity.tax},#{entity.taxpaid},#{entity.shiptostatename},#{entity.shiptocityname},#{entity.shiptodistrictname}, 'Y') - - - - - - insert IGNORE into tocofs_saleout(id,clientCode, companyCode, storeCode, facilityCode, code, refOrderId, refOrderCode, refOrderType, status, consolidated, internalInstructionType, bizChannel, sourcePlatformCode, processType, sourceOrderId, sourceOrderCode, sourceUserAccount, shipToAttentionTo, shipToAddress, shipToCountry, shipToState, shipToCity, shipToDistrict, shipToMobile, totalLines, totalQty, totalContainers, totalCases, totalWeight, totalVolume, totalVolumeWeight, weightUM, volumeUM, totalAmount, totalPayAmount, postageAmount, itemTotalAmount, carrierCode, paymentStatus, codRequired, invoiceRequired, paidAt, shipFromAttentionTo, shipFromAddress, shipFromDistrict, shipFromCity, shipFromState, shipFromCountry, shipFromPostalCode, shipFromPhone, shipFromMobile, shipFromFax, shipFromEmail, codAmount, tax, taxPaid, shipToStateName, shipToCityName, shipToDistrictName,shipAt) - values - - (#{entity.id},#{entity.clientcode},#{entity.companycode},#{entity.storecode},#{entity.facilitycode},#{entity.code},#{entity.reforderid},#{entity.refordercode},#{entity.refordertype},#{entity.status},#{entity.consolidated},#{entity.internalinstructiontype},#{entity.bizchannel},#{entity.sourceplatformcode},#{entity.processtype},#{entity.sourceorderid},#{entity.sourceordercode},#{entity.sourceuseraccount},#{entity.shiptoattentionto},#{entity.shiptoaddress},#{entity.shiptocountry},#{entity.shiptostate},#{entity.shiptocity},#{entity.shiptodistrict},#{entity.shiptomobile},#{entity.totallines},#{entity.totalqty},#{entity.totalcontainers},#{entity.totalcases},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.weightum},#{entity.volumeum},#{entity.totalamount},#{entity.totalpayamount},#{entity.postageamount},#{entity.itemtotalamount},#{entity.carriercode},#{entity.paymentstatus},#{entity.codrequired},#{entity.invoicerequired},#{entity.paidat},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromdistrict},#{entity.shipfromcity},#{entity.shipfromstate},#{entity.shipfromcountry},#{entity.shipfrompostalcode},#{entity.shipfromphone},#{entity.shipfrommobile},#{entity.shipfromfax},#{entity.shipfromemail},#{entity.codamount},#{entity.tax},#{entity.taxpaid},#{entity.shiptostatename},#{entity.shiptocityname},#{entity.shiptodistrictname},#{entity.shipAt}) - - - - - - insert into tocofs_saleout(clientCode, companyCode, storeCode, facilityCode, code, refOrderId, refOrderCode, refOrderType, status, consolidated, internalInstructionType, bizChannel, sourcePlatformCode, processType, sourceOrderId, sourceOrderCode, sourceUserAccount, shipToAttentionTo, shipToAddress, shipToCountry, shipToState, shipToCity, shipToDistrict, shipToMobile, totalLines, totalQty, totalContainers, totalCases, totalWeight, totalVolume, totalVolumeWeight, weightUM, volumeUM, totalAmount, totalPayAmount, postageAmount, itemTotalAmount, carrierCode, paymentStatus, codRequired, invoiceRequired, paidAt, shipFromAttentionTo, shipFromAddress, shipFromDistrict, shipFromCity, shipFromState, shipFromCountry, shipFromPostalCode, shipFromPhone, shipFromMobile, shipFromFax, shipFromEmail, codAmount, tax, taxPaid, shipToStateName, shipToCityName, shipToDistrictName,shipAt) - values - - (#{entity.clientcode},#{entity.companycode},#{entity.storecode},#{entity.facilitycode},#{entity.code},#{entity.reforderid},#{entity.refordercode},#{entity.refordertype},#{entity.status},#{entity.consolidated},#{entity.internalinstructiontype},#{entity.bizchannel},#{entity.sourceplatformcode},#{entity.processtype},#{entity.sourceorderid},#{entity.sourceordercode},#{entity.sourceuseraccount},#{entity.shiptoattentionto},#{entity.shiptoaddress},#{entity.shiptocountry},#{entity.shiptostate},#{entity.shiptocity},#{entity.shiptodistrict},#{entity.shiptomobile},#{entity.totallines},#{entity.totalqty},#{entity.totalcontainers},#{entity.totalcases},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.weightum},#{entity.volumeum},#{entity.totalamount},#{entity.totalpayamount},#{entity.postageamount},#{entity.itemtotalamount},#{entity.carriercode},#{entity.paymentstatus},#{entity.codrequired},#{entity.invoicerequired},#{entity.paidat},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromdistrict},#{entity.shipfromcity},#{entity.shipfromstate},#{entity.shipfromcountry},#{entity.shipfrompostalcode},#{entity.shipfromphone},#{entity.shipfrommobile},#{entity.shipfromfax},#{entity.shipfromemail},#{entity.codamount},#{entity.tax},#{entity.taxpaid},#{entity.shiptostatename},#{entity.shiptocityname},#{entity.shiptodistrictname},#{entity.shipAt}) - - on duplicate key update - clientCode = values(clientCode), - companyCode = values(companyCode), - storeCode = values(storeCode), - facilityCode = values(facilityCode), - code = values(code), - refOrderId = values(refOrderId), - refOrderCode = values(refOrderCode), - refOrderType = values(refOrderType), - status = values(status), - consolidated = values(consolidated), - internalInstructionType = values(internalInstructionType), - bizChannel = values(bizChannel), - sourcePlatformCode = values(sourcePlatformCode), - processType = values(processType), - sourceOrderId = values(sourceOrderId), - sourceOrderCode = values(sourceOrderCode), - sourceUserAccount = values(sourceUserAccount), - shipToAttentionTo = values(shipToAttentionTo), - shipToAddress = values(shipToAddress), - shipToCountry = values(shipToCountry), - shipToState = values(shipToState), - shipToCity = values(shipToCity), - shipToDistrict = values(shipToDistrict), - shipToMobile = values(shipToMobile), - totalLines = values(totalLines), - totalQty = values(totalQty), - totalContainers = values(totalContainers), - totalCases = values(totalCases), - totalWeight = values(totalWeight), - totalVolume = values(totalVolume), - totalVolumeWeight = values(totalVolumeWeight), - weightUM = values(weightUM), - volumeUM = values(volumeUM), - totalAmount = values(totalAmount), - totalPayAmount = values(totalPayAmount), - postageAmount = values(postageAmount), - itemTotalAmount = values(itemTotalAmount), - carrierCode = values(carrierCode), - paymentStatus = values(paymentStatus), - codRequired = values(codRequired), - invoiceRequired = values(invoiceRequired), - paidAt = values(paidAt), - shipFromAttentionTo = values(shipFromAttentionTo), - shipFromAddress = values(shipFromAddress), - shipFromDistrict = values(shipFromDistrict), - shipFromCity = values(shipFromCity), - shipFromState = values(shipFromState), - shipFromCountry = values(shipFromCountry), - shipFromPostalCode = values(shipFromPostalCode), - shipFromPhone = values(shipFromPhone), - shipFromMobile = values(shipFromMobile), - shipFromFax = values(shipFromFax), - shipFromEmail = values(shipFromEmail), - codAmount = values(codAmount), - tax = values(tax), - taxPaid = values(taxPaid), - shipToStateName = values(shipToStateName), - shipToCityName = values(shipToCityName), - shipToDistrictName = values(shipToDistrictName), - shipAt = values(shipAt) - - - - -update tocofs_saleout set - - clientCode = #{clientcode}, - companyCode = #{companycode}, - storeCode = #{storecode}, - facilityCode = #{facilitycode}, - code = #{code}, - refOrderId = #{reforderid}, - refOrderCode = #{refordercode}, - refOrderType = #{refordertype}, - status = #{status}, - consolidated = #{consolidated}, - internalInstructionType = #{internalinstructiontype}, - bizChannel = #{bizchannel}, - sourcePlatformCode = #{sourceplatformcode}, - processType = #{processtype}, - sourceOrderId = #{sourceorderid}, - sourceOrderCode = #{sourceordercode}, - sourceUserAccount = #{sourceuseraccount}, - shipToAttentionTo = #{shiptoattentionto}, - shipToAddress = #{shiptoaddress}, - shipToCountry = #{shiptocountry}, - shipToState = #{shiptostate}, - shipToCity = #{shiptocity}, - shipToDistrict = #{shiptodistrict}, - shipToMobile = #{shiptomobile}, - totalLines = #{totallines}, - totalQty = #{totalqty}, - totalContainers = #{totalcontainers}, - totalCases = #{totalcases}, - totalWeight = #{totalweight}, - totalVolume = #{totalvolume}, - totalVolumeWeight = #{totalvolumeweight}, - weightUM = #{weightum}, - volumeUM = #{volumeum}, - totalAmount = #{totalamount}, - totalPayAmount = #{totalpayamount}, - postageAmount = #{postageamount}, - itemTotalAmount = #{itemtotalamount}, - carrierCode = #{carriercode}, - paymentStatus = #{paymentstatus}, - codRequired = #{codrequired}, - invoiceRequired = #{invoicerequired}, - paidAt = #{paidat}, - shipFromAttentionTo = #{shipfromattentionto}, - shipFromAddress = #{shipfromaddress}, - shipFromDistrict = #{shipfromdistrict}, - shipFromCity = #{shipfromcity}, - shipFromState = #{shipfromstate}, - shipFromCountry = #{shipfromcountry}, - shipFromPostalCode = #{shipfrompostalcode}, - shipFromPhone = #{shipfromphone}, - shipFromMobile = #{shipfrommobile}, - shipFromFax = #{shipfromfax}, - shipFromEmail = #{shipfromemail}, - codAmount = #{codamount}, - tax = #{tax}, - taxPaid = #{taxpaid}, - shipToStateName = #{shiptostatename}, - shipToCityName = #{shiptocityname}, - shipToDistrictName = #{shiptodistrictname}, - -where id = #{id} - - - - -update tocofs_saleout set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} -where id = #{id} - - - - -update tocofs_saleout set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} - + 'Y', + + ) + + + + insert into tocofs_saleout(clientCode, companyCode, storeCode, facilityCode, code, refOrderId, refOrderCode, refOrderType, status, consolidated, internalInstructionType, bizChannel, sourcePlatformCode, processType, sourceOrderId, sourceOrderCode, shipToAttentionTo, sourceUserAccount, shipToAddress, shipToCountry, shipToState, shipToCity, shipToDistrict, shipToMobile, totalLines, totalQty, totalContainers, totalCases, totalWeight, totalVolume, totalVolumeWeight, weightUM, volumeUM, totalAmount, totalPayAmount, postageAmount, itemTotalAmount, totalFulfillQty, totalFulfillWeight, totalFulfillVolume, totalFulfillVolumeWeight, shipAt, carrierCode, primaryWaybillCode, paymentStatus, codRequired, invoiceRequired, paidAt, shipFromAttentionTo, shipFromAddress, shipFromDistrict, shipFromCity, shipFromState, shipFromCountry, shipFromPostalCode, shipFromPhone, shipFromMobile, shipFromFax, shipFromEmail, codAmount, tax, taxPaid, tradeSuccessAt, sourceOrderStatus, shipToStateName, shipToCityName, shipToDistrictName, shipmentType, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, def11, def12, def13, def14, def15, def16, def17, def18, def19, def20, def21, def22, def23, def24, def25, def26, def27, def28, def29, def30, def31, def32, def33, def34, def35, def36, def37, def38, def39, def40, sts) + values + + (#{entity.clientcode},#{entity.companycode},#{entity.storecode},#{entity.facilitycode},#{entity.code},#{entity.reforderid},#{entity.refordercode},#{entity.refordertype},#{entity.status},#{entity.consolidated},#{entity.internalinstructiontype},#{entity.bizchannel},#{entity.sourceplatformcode},#{entity.processtype},#{entity.sourceorderid},#{entity.sourceordercode},#{entity.shiptoattentionto},#{entity.sourceuseraccount},#{entity.shiptoaddress},#{entity.shiptocountry},#{entity.shiptostate},#{entity.shiptocity},#{entity.shiptodistrict},#{entity.shiptomobile},#{entity.totallines},#{entity.totalqty},#{entity.totalcontainers},#{entity.totalcases},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.weightum},#{entity.volumeum},#{entity.totalamount},#{entity.totalpayamount},#{entity.postageamount},#{entity.itemtotalamount},#{entity.totalfulfillqty},#{entity.totalfulfillweight},#{entity.totalfulfillvolume},#{entity.totalfulfillvolumeweight},#{entity.shipat},#{entity.carriercode},#{entity.primarywaybillcode},#{entity.paymentstatus},#{entity.codrequired},#{entity.invoicerequired},#{entity.paidat},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromdistrict},#{entity.shipfromcity},#{entity.shipfromstate},#{entity.shipfromcountry},#{entity.shipfrompostalcode},#{entity.shipfromphone},#{entity.shipfrommobile},#{entity.shipfromfax},#{entity.shipfromemail},#{entity.codamount},#{entity.tax},#{entity.taxpaid},#{entity.tradesuccessat},#{entity.sourceorderstatus},#{entity.shiptostatename},#{entity.shiptocityname},#{entity.shiptodistrictname},#{entity.shipmenttype},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.def11},#{entity.def12},#{entity.def13},#{entity.def14},#{entity.def15},#{entity.def16},#{entity.def17},#{entity.def18},#{entity.def19},#{entity.def20},#{entity.def21},#{entity.def22},#{entity.def23},#{entity.def24},#{entity.def25},#{entity.def26},#{entity.def27},#{entity.def28},#{entity.def29},#{entity.def30},#{entity.def31},#{entity.def32},#{entity.def33},#{entity.def34},#{entity.def35},#{entity.def36},#{entity.def37},#{entity.def38},#{entity.def39},#{entity.def40}, 'Y') + + + + + insert into tocofs_saleout(id,clientCode, companyCode, storeCode, facilityCode, code, refOrderId, refOrderCode, refOrderType, status, consolidated, internalInstructionType, bizChannel, sourcePlatformCode, processType, sourceOrderId, sourceOrderCode, shipToAttentionTo, sourceUserAccount, shipToAddress, shipToCountry, shipToState, shipToCity, shipToDistrict, shipToMobile, totalLines, totalQty, totalContainers, totalCases, totalWeight, totalVolume, totalVolumeWeight, weightUM, volumeUM, totalAmount, totalPayAmount, postageAmount, itemTotalAmount, totalFulfillQty, totalFulfillWeight, totalFulfillVolume, totalFulfillVolumeWeight, shipAt, carrierCode, primaryWaybillCode, paymentStatus, codRequired, invoiceRequired, paidAt, shipFromAttentionTo, shipFromAddress, shipFromDistrict, shipFromCity, shipFromState, shipFromCountry, shipFromPostalCode, shipFromPhone, shipFromMobile, shipFromFax, shipFromEmail, codAmount, tax, taxPaid, tradeSuccessAt, sourceOrderStatus, shipToStateName, shipToCityName, shipToDistrictName, shipmentType, def1, def2, def3, def4, def5, def6, def7, def8, def9, def10, def11, def12, def13, def14, def15, def16, def17, def18, def19, def20, def21, def22, def23, def24, def25, def26, def27, def28, def29, def30, def31, def32, def33, def34, def35, def36, def37, def38, def39, def40) + values + + (#{entity.id},#{entity.clientcode},#{entity.companycode},#{entity.storecode},#{entity.facilitycode},#{entity.code},#{entity.reforderid},#{entity.refordercode},#{entity.refordertype},#{entity.status},#{entity.consolidated},#{entity.internalinstructiontype},#{entity.bizchannel},#{entity.sourceplatformcode},#{entity.processtype},#{entity.sourceorderid},#{entity.sourceordercode},#{entity.shiptoattentionto},#{entity.sourceuseraccount},#{entity.shiptoaddress},#{entity.shiptocountry},#{entity.shiptostate},#{entity.shiptocity},#{entity.shiptodistrict},#{entity.shiptomobile},#{entity.totallines},#{entity.totalqty},#{entity.totalcontainers},#{entity.totalcases},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.weightum},#{entity.volumeum},#{entity.totalamount},#{entity.totalpayamount},#{entity.postageamount},#{entity.itemtotalamount},#{entity.totalfulfillqty},#{entity.totalfulfillweight},#{entity.totalfulfillvolume},#{entity.totalfulfillvolumeweight},#{entity.shipat},#{entity.carriercode},#{entity.primarywaybillcode},#{entity.paymentstatus},#{entity.codrequired},#{entity.invoicerequired},#{entity.paidat},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromdistrict},#{entity.shipfromcity},#{entity.shipfromstate},#{entity.shipfromcountry},#{entity.shipfrompostalcode},#{entity.shipfromphone},#{entity.shipfrommobile},#{entity.shipfromfax},#{entity.shipfromemail},#{entity.codamount},#{entity.tax},#{entity.taxpaid},#{entity.tradesuccessat},#{entity.sourceorderstatus},#{entity.shiptostatename},#{entity.shiptocityname},#{entity.shiptodistrictname},#{entity.shipmenttype},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10},#{entity.def11},#{entity.def12},#{entity.def13},#{entity.def14},#{entity.def15},#{entity.def16},#{entity.def17},#{entity.def18},#{entity.def19},#{entity.def20},#{entity.def21},#{entity.def22},#{entity.def23},#{entity.def24},#{entity.def25},#{entity.def26},#{entity.def27},#{entity.def28},#{entity.def29},#{entity.def30},#{entity.def31},#{entity.def32},#{entity.def33},#{entity.def34},#{entity.def35},#{entity.def36},#{entity.def37},#{entity.def38},#{entity.def39},#{entity.def40}) + + on duplicate key update + id = values(id), + clientCode = values(clientCode), + companyCode = values(companyCode), + storeCode = values(storeCode), + facilityCode = values(facilityCode), + code = values(code), + refOrderId = values(refOrderId), + refOrderCode = values(refOrderCode), + refOrderType = values(refOrderType), + status = values(status), + consolidated = values(consolidated), + internalInstructionType = values(internalInstructionType), + bizChannel = values(bizChannel), + sourcePlatformCode = values(sourcePlatformCode), + processType = values(processType), + sourceOrderId = values(sourceOrderId), + sourceOrderCode = values(sourceOrderCode), + shipToAttentionTo = values(shipToAttentionTo), + sourceUserAccount = values(sourceUserAccount), + shipToAddress = values(shipToAddress), + shipToCountry = values(shipToCountry), + shipToState = values(shipToState), + shipToCity = values(shipToCity), + shipToDistrict = values(shipToDistrict), + shipToMobile = values(shipToMobile), + totalLines = values(totalLines), + totalQty = values(totalQty), + totalContainers = values(totalContainers), + totalCases = values(totalCases), + totalWeight = values(totalWeight), + totalVolume = values(totalVolume), + totalVolumeWeight = values(totalVolumeWeight), + weightUM = values(weightUM), + volumeUM = values(volumeUM), + totalAmount = values(totalAmount), + totalPayAmount = values(totalPayAmount), + postageAmount = values(postageAmount), + itemTotalAmount = values(itemTotalAmount), + totalFulfillQty = values(totalFulfillQty), + totalFulfillWeight = values(totalFulfillWeight), + totalFulfillVolume = values(totalFulfillVolume), + totalFulfillVolumeWeight = values(totalFulfillVolumeWeight), + shipAt = values(shipAt), + carrierCode = values(carrierCode), + primaryWaybillCode = values(primaryWaybillCode), + paymentStatus = values(paymentStatus), + codRequired = values(codRequired), + invoiceRequired = values(invoiceRequired), + paidAt = values(paidAt), + shipFromAttentionTo = values(shipFromAttentionTo), + shipFromAddress = values(shipFromAddress), + shipFromDistrict = values(shipFromDistrict), + shipFromCity = values(shipFromCity), + shipFromState = values(shipFromState), + shipFromCountry = values(shipFromCountry), + shipFromPostalCode = values(shipFromPostalCode), + shipFromPhone = values(shipFromPhone), + shipFromMobile = values(shipFromMobile), + shipFromFax = values(shipFromFax), + shipFromEmail = values(shipFromEmail), + codAmount = values(codAmount), + tax = values(tax), + taxPaid = values(taxPaid), + tradeSuccessAt = values(tradeSuccessAt), + sourceOrderStatus = values(sourceOrderStatus), + shipToStateName = values(shipToStateName), + shipToCityName = values(shipToCityName), + shipToDistrictName = values(shipToDistrictName), + shipmentType = values(shipmentType), + def1 = values(def1), + def2 = values(def2), + def3 = values(def3), + def4 = values(def4), + def5 = values(def5), + def6 = values(def6), + def7 = values(def7), + def8 = values(def8), + def9 = values(def9), + def10 = values(def10), + def11 = values(def11), + def12 = values(def12), + def13 = values(def13), + def14 = values(def14), + def15 = values(def15), + def16 = values(def16), + def17 = values(def17), + def18 = values(def18), + def19 = values(def19), + def20 = values(def20), + def21 = values(def21), + def22 = values(def22), + def23 = values(def23), + def24 = values(def24), + def25 = values(def25), + def26 = values(def26), + def27 = values(def27), + def28 = values(def28), + def29 = values(def29), + def30 = values(def30), + def31 = values(def31), + def32 = values(def32), + def33 = values(def33), + def34 = values(def34), + def35 = values(def35), + def36 = values(def36), + def37 = values(def37), + def38 = values(def38), + def39 = values(def39), + def40 = values(def40) + + + update tocofs_saleout set + + clientCode = #{clientcode}, + companyCode = #{companycode}, + storeCode = #{storecode}, + facilityCode = #{facilitycode}, + code = #{code}, + refOrderId = #{reforderid}, + refOrderCode = #{refordercode}, + refOrderType = #{refordertype}, + status = #{status}, + consolidated = #{consolidated}, + internalInstructionType = #{internalinstructiontype}, + bizChannel = #{bizchannel}, + sourcePlatformCode = #{sourceplatformcode}, + processType = #{processtype}, + sourceOrderId = #{sourceorderid}, + sourceOrderCode = #{sourceordercode}, + shipToAttentionTo = #{shiptoattentionto}, + sourceUserAccount = #{sourceuseraccount}, + shipToAddress = #{shiptoaddress}, + shipToCountry = #{shiptocountry}, + shipToState = #{shiptostate}, + shipToCity = #{shiptocity}, + shipToDistrict = #{shiptodistrict}, + shipToMobile = #{shiptomobile}, + totalLines = #{totallines}, + totalQty = #{totalqty}, + totalContainers = #{totalcontainers}, + totalCases = #{totalcases}, + totalWeight = #{totalweight}, + totalVolume = #{totalvolume}, + totalVolumeWeight = #{totalvolumeweight}, + weightUM = #{weightum}, + volumeUM = #{volumeum}, + totalAmount = #{totalamount}, + totalPayAmount = #{totalpayamount}, + postageAmount = #{postageamount}, + itemTotalAmount = #{itemtotalamount}, + totalFulfillQty = #{totalfulfillqty}, + totalFulfillWeight = #{totalfulfillweight}, + totalFulfillVolume = #{totalfulfillvolume}, + totalFulfillVolumeWeight = #{totalfulfillvolumeweight}, + shipAt = #{shipat}, + carrierCode = #{carriercode}, + primaryWaybillCode = #{primarywaybillcode}, + paymentStatus = #{paymentstatus}, + codRequired = #{codrequired}, + invoiceRequired = #{invoicerequired}, + paidAt = #{paidat}, + shipFromAttentionTo = #{shipfromattentionto}, + shipFromAddress = #{shipfromaddress}, + shipFromDistrict = #{shipfromdistrict}, + shipFromCity = #{shipfromcity}, + shipFromState = #{shipfromstate}, + shipFromCountry = #{shipfromcountry}, + shipFromPostalCode = #{shipfrompostalcode}, + shipFromPhone = #{shipfromphone}, + shipFromMobile = #{shipfrommobile}, + shipFromFax = #{shipfromfax}, + shipFromEmail = #{shipfromemail}, + codAmount = #{codamount}, + tax = #{tax}, + taxPaid = #{taxpaid}, + tradeSuccessAt = #{tradesuccessat}, + sourceOrderStatus = #{sourceorderstatus}, + shipToStateName = #{shiptostatename}, + shipToCityName = #{shiptocityname}, + shipToDistrictName = #{shiptodistrictname}, + shipmentType = #{shipmenttype}, + def1 = #{def1}, + def2 = #{def2}, + def3 = #{def3}, + def4 = #{def4}, + def5 = #{def5}, + def6 = #{def6}, + def7 = #{def7}, + def8 = #{def8}, + def9 = #{def9}, + def10 = #{def10}, + def11 = #{def11}, + def12 = #{def12}, + def13 = #{def13}, + def14 = #{def14}, + def15 = #{def15}, + def16 = #{def16}, + def17 = #{def17}, + def18 = #{def18}, + def19 = #{def19}, + def20 = #{def20}, + def21 = #{def21}, + def22 = #{def22}, + def23 = #{def23}, + def24 = #{def24}, + def25 = #{def25}, + def26 = #{def26}, + def27 = #{def27}, + def28 = #{def28}, + def29 = #{def29}, + def30 = #{def30}, + def31 = #{def31}, + def32 = #{def32}, + def33 = #{def33}, + def34 = #{def34}, + def35 = #{def35}, + def36 = #{def36}, + def37 = #{def37}, + def38 = #{def38}, + def39 = #{def39}, + def40 = #{def40}, + + where id = #{id} + + + + update tocofs_saleout set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} + where id = #{id} + + + + update tocofs_saleout set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} + and id = #{id} and clientCode = #{clientcode} and companyCode = #{companycode} @@ -739,8 +1204,8 @@ update tocofs_saleout set sts= 'N' ,modify_time = #{modify_time},modify_user_id and processType = #{processtype} and sourceOrderId = #{sourceorderid} and sourceOrderCode = #{sourceordercode} - and sourceUserAccount = #{sourceuseraccount} and shipToAttentionTo = #{shiptoattentionto} + and sourceUserAccount = #{sourceuseraccount} and shipToAddress = #{shiptoaddress} and shipToCountry = #{shiptocountry} and shipToState = #{shiptostate} @@ -760,7 +1225,13 @@ update tocofs_saleout set sts= 'N' ,modify_time = #{modify_time},modify_user_id and totalPayAmount = #{totalpayamount} and postageAmount = #{postageamount} and itemTotalAmount = #{itemtotalamount} + and totalFulfillQty = #{totalfulfillqty} + and totalFulfillWeight = #{totalfulfillweight} + and totalFulfillVolume = #{totalfulfillvolume} + and totalFulfillVolumeWeight = #{totalfulfillvolumeweight} + and shipAt = #{shipat} and carrierCode = #{carriercode} + and primaryWaybillCode = #{primarywaybillcode} and paymentStatus = #{paymentstatus} and codRequired = #{codrequired} and invoiceRequired = #{invoicerequired} @@ -779,17 +1250,57 @@ update tocofs_saleout set sts= 'N' ,modify_time = #{modify_time},modify_user_id and codAmount = #{codamount} and tax = #{tax} and taxPaid = #{taxpaid} + and tradeSuccessAt = #{tradesuccessat} + and sourceOrderStatus = #{sourceorderstatus} and shipToStateName = #{shiptostatename} and shipToCityName = #{shiptocityname} and shipToDistrictName = #{shiptodistrictname} + and shipmentType = #{shipmenttype} + and def1 = #{def1} + and def2 = #{def2} + and def3 = #{def3} + and def4 = #{def4} + and def5 = #{def5} + and def6 = #{def6} + and def7 = #{def7} + and def8 = #{def8} + and def9 = #{def9} + and def10 = #{def10} + and def11 = #{def11} + and def12 = #{def12} + and def13 = #{def13} + and def14 = #{def14} + and def15 = #{def15} + and def16 = #{def16} + and def17 = #{def17} + and def18 = #{def18} + and def19 = #{def19} + and def20 = #{def20} + and def21 = #{def21} + and def22 = #{def22} + and def23 = #{def23} + and def24 = #{def24} + and def25 = #{def25} + and def26 = #{def26} + and def27 = #{def27} + and def28 = #{def28} + and def29 = #{def29} + and def30 = #{def30} + and def31 = #{def31} + and def32 = #{def32} + and def33 = #{def33} + and def34 = #{def34} + and def35 = #{def35} + and def36 = #{def36} + and def37 = #{def37} + and def38 = #{def38} + and def39 = #{def39} + and def40 = #{def40} and sts='Y' - - - - - - delete from tocofs_saleout where id = #{id} - - - - + + + + + delete from tocofs_saleout where id = #{id} + + \ No newline at end of file diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningInReturn.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningInReturn.java index 8c7be5fd..7319df2c 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningInReturn.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/outsourc/ConsignmachiningInReturn.java @@ -840,12 +840,12 @@ public class ConsignmachiningInReturn extends PluginBaseEntity { * * @author liuyang */ - private BdTaxitemsEntity queryBdTaxitems(String invcode) { - Assert.notNull(invcode, "存货编码不能为空"); - BdTaxitemsEntity bdTaxitemsEntity = TocOrderBasicArchivesCacheUtil.stringBdTaxitemsEntityHashMap.get(invcode); - Assert.notNull(bdTaxitemsEntity, "根据存货编码({}),无法匹配到税率!", invcode); - return bdTaxitemsEntity; - } +// private BdTaxitemsEntity queryBdTaxitems(String invcode) { +// Assert.notNull(invcode, "存货编码不能为空"); +// BdTaxitemsEntity bdTaxitemsEntity = TocOrderBasicArchivesCacheUtil.stringBdTaxitemsEntityHashMap.get(invcode); +// Assert.notNull(bdTaxitemsEntity, "根据存货编码({}),无法匹配到税率!", invcode); +// return bdTaxitemsEntity; +// } /** * 2024年8月20日 16:42:14 diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseWarehous.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseWarehous.java index 090bcbdb..345260cd 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseWarehous.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/purchase/ProxyPurchaseWarehous.java @@ -395,8 +395,8 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity { OfsPoOrderDetails ofsPoOrderDetail = findOfsPoOrderDetail(ofsPoOrderDataDetails, stockinB); //TODO 测试 - stockinB.setReceivedQty("1"); - ofsPoOrderDetail.setFulfillAmount("10"); +// stockinB.setReceivedQty("1"); +// ofsPoOrderDetail.setFulfillAmount("10"); //2024年8月20日 16:02:21 已经和妮姐、万万确认,采购公司和收货公司目前是一致的,暂时不用区分取数逻辑 BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(stockinB, bdCorpEntity.getPkCorp()); diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToB.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToB.java index b7b3626c..fb270ee1 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToB.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToB.java @@ -382,7 +382,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity { List tocofsSaleoutEntityList = copyHeaderDto(headerDtoList); if (tocofsSaleoutEntityList.size() > 0) { logger.info("TOBofsSaleoutDetailedEntities:插入底表{}个对象(表头)", tocofsSaleoutEntityList.size()); - iTocofsSaleoutDao.entityInsertBatchV2(tocofsSaleoutEntityList); + iTocofsSaleoutDao.entityInsertOrUpdateBatch(tocofsSaleoutEntityList); } else { logger.info("TOBofsSaleoutEntityList:没有对象被插入表头底表"); } @@ -395,7 +395,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity { List tocofsSaleoutDetailedEntities = copyDetailsDto(detailsDtos); if (tocofsSaleoutDetailedEntities.size() > 0) { logger.info("TOBofsSaleoutDetailedEntities:插入底表{}个对象(表体)", tocofsSaleoutDetailedEntities.size()); - iTocofsSaleoutDetailedDao.entityInsertBatchV2(tocofsSaleoutDetailedEntities); + iTocofsSaleoutDetailedDao.entityInsertOrUpdateBatch(tocofsSaleoutDetailedEntities); } else { logger.info("TOBofsSaleoutDetailedEntities:没有对象被插入表头底表"); } @@ -1091,9 +1091,16 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity { if (tocofsSaleoutDetailedEntity != null && detailsDto != null && detailsDto.getHeaderDto() != null) { HeaderDto headerDto = detailsDto.getHeaderDto(); - tocofsSaleoutDetailedEntity.setPrimaryKey(headerDto.getId());//主表主键 - tocofsSaleoutDetailedEntity.setBusinessDate(headerDto.getShipAt());//业务日期 - tocofsSaleoutDetailedEntity.setBusinessType("TOB_ORDER");//业务类型 + if (headerDto.getId() != null) { + tocofsSaleoutDetailedEntity.setMaintableid(headerDto.getId());//主表主键 + } + if (headerDto.getShipAt() != null) { + tocofsSaleoutDetailedEntity.setBusinessdate(headerDto.getShipAt());//业务日期-出库日期 + } + if (headerDto.getTradeSuccessAt() != null) { + tocofsSaleoutDetailedEntity.setSuccessfultradedate(headerDto.getTradeSuccessAt());//业务日期-交易时间 + } + tocofsSaleoutDetailedEntity.setBusinesstype("TOB_ORDER");//业务类型 } else { logger.info("createPrimaryKeyAndBusinessDateAndBusinessType方法存在false!"); } @@ -1471,7 +1478,7 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity { isblargessflag = true; } //TODO 测试 - detailsDto.setShipQty("1"); +// detailsDto.setShipQty("1"); SalesInvoiceBodyDto salesInvoiceBodyDto = new SalesInvoiceBodyDto(); salesInvoiceBodyDto.setCinventoryid(bdInvmandocEntity.getPkInvmandoc()); salesInvoiceBodyDto.setCupreceipttype("4C");//来源单据类型 diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java index 0517df99..6503c4e9 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToC.java @@ -16,6 +16,7 @@ import com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutDetailedEntity; import com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutEntity; import com.hzya.frame.plugin.lets.ofs.service.ITocofsSaleoutService; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo; +import com.hzya.frame.plugin.lets.resultvo.CacheTocMapVo; import com.hzya.frame.plugin.lets.resultvo.CalculateDateVo; import com.hzya.frame.plugin.lets.u8cdto.*; import com.hzya.frame.plugin.lets.util.*; @@ -114,10 +115,13 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { /** * 按指定时间拉取 * + * @param startTime O出库开始时间 + * @param endTime O出库结束时间 * @author liuyang */ - public void startImplement(String startTime, String endTime) { - String threadNameStrStart = StrUtil.format("开始 OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{}", startTime, endTime); + public void startImplementStockByTime(String startTime, String endTime) { + long startMillis = System.currentTimeMillis(); + String threadNameStrStart = StrUtil.format("开始 OFS销售出库(TOC)同步U8C销售订单 开始 开始时间:{} 结束时间:{}", startTime, endTime); logger.info(threadNameStrStart); Thread thread = new Thread(new Runnable() { @@ -125,6 +129,9 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { public void run() { LOCK.lock(); try { + Assert.notNull(startTime, "查询条件,开始时间不能为空!"); + Assert.notNull(endTime, "查询条件,结束时间不能为空!"); + // CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr); String tobShop = shopTobOrToCUtil.getCommaShop("TOC"); @@ -138,24 +145,24 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setPageNo(1L); - queryOfsSoSaleOutVo.setPageSize(50L); + queryOfsSoSaleOutVo.setPageSize(100L); queryOfsSoSaleOutVo.setStoreCode(tobShop); // queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003"); ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search"); logger.info("数据返回行数:{}", headerDetailsDtoList.size()); if (headerDetailsDtoList.size() > 0) { - getSet(headerDetailsDtoList); + getSetStock(headerDetailsDtoList); } else { logger.info("TOC没有查询到任何数据!不需要同步"); } } catch (Exception e) { logger.error("startImplement方法抛出异常", e); } finally { - try { - basicArchivesCacheUtil.clearCache(); - } catch (Exception e) { - logger.info("清理档案缓存失败", e); - } +// try { +// basicArchivesCacheUtil.clearCache(); +// } catch (Exception e) { +// logger.info("清理档案缓存失败", e); +// } LOCK.unlock(); } } @@ -166,77 +173,184 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { } catch (Exception e) { logger.error("thread.join()异常", e); } - String threadNameStrEnd = StrUtil.format("结束 OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{}", startTime, endTime); + long endMillis = System.currentTimeMillis(); + String threadNameStrEnd = StrUtil.format("结束 OFS销售出库(TOC)同步U8C销售订单 结束 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis)); logger.info(threadNameStrEnd); } /** * 按指定时间拉取 * + * @param code O销售出库单编码 * @author liuyang */ - public void startImplement(String code) { - String threadNameStr = StrUtil.format("OFS销售出库(TOC)同步U8C销售订单 出库单单据号:{}", code); - logger.info(threadNameStr); + public void startImplementStockByCode(String code) { + long startMillis = System.currentTimeMillis(); + String threadNameStrStart = StrUtil.format("OFS销售出库(TOC)同步U8C销售订单 开始 出库单单据号:{}", code); + logger.info(threadNameStrStart); Thread thread = new Thread(new Runnable() { @Override public void run() { LOCK.lock(); try { - String tobShop = shopTobOrToCUtil.getCommaShop("TOC"); + Assert.notNull(code, "O出库单编码不能为空!code is null!"); + String tobShop = shopTobOrToCUtil.getCommaShop("TOC"); List headerDetailsDtoList = new ArrayList<>(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setPageNo(1L); - queryOfsSoSaleOutVo.setPageSize(50L); + queryOfsSoSaleOutVo.setPageSize(100L); queryOfsSoSaleOutVo.setStoreCode(tobShop); queryOfsSoSaleOutVo.setCode(code); ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search"); logger.info("数据返回行数:{}", headerDetailsDtoList.size()); if (headerDetailsDtoList.size() > 0) { - getSet(headerDetailsDtoList); + getSetStock(headerDetailsDtoList); } else { logger.info("没有查询到任何数据!不需要同步"); } } catch (Exception e) { logger.error("startImplement方法抛出异常", e); } finally { - try { - basicArchivesCacheUtil.clearCache(); - } catch (Exception e) { - logger.info("清理档案缓存失败", e); - } +// try { +// basicArchivesCacheUtil.clearCache(); +// } catch (Exception e) { +// logger.info("清理档案缓存失败", e); +// } LOCK.unlock(); } } - }, threadNameStr); + }, threadNameStrStart); thread.start(); try { thread.join(); } catch (Exception e) { logger.error("thread.join()异常", e); } - } - - private void getSet(List headerDetailsDtoList) throws Exception { - //保存到mysql - batchInsert(headerDetailsDtoList); - //过滤成功的数据 - List headerDetailsDtos = filterData(headerDetailsDtoList); - //执行推送主逻辑 - implement(headerDetailsDtos); + long endMillis = System.currentTimeMillis(); + String threadNameStrEnd = StrUtil.format("OFS销售出库(TOC)同步U8C销售订单 结束 出库单单据号:{} 耗时:{}", code, (endMillis - startMillis)); + logger.info(threadNameStrEnd); } /** - * 过滤掉成功的数据 + * 按交易完成时间拉取生成 + * + * @param startTime O交易完成开始时间 + * @param endTime O交易完成结束时间 + * @author liuyang + */ + public void startImplementTranByTime(String startTime, String endTime) { + long startMillis = System.currentTimeMillis(); + String threadNameStrStart = StrUtil.format("开始OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{}", startTime, endTime); + logger.info(threadNameStrStart); + + Thread thread = new Thread(new Runnable() { + @Override + public void run() { + LOCK.lock(); + try { + Assert.notNull(startTime, "查询条件,开始时间不能为空!"); + Assert.notNull(endTime, "查询条件,结束时间不能为空!"); + +// CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr); + String tocShop = shopTobOrToCUtil.getCommaShop("TOC"); + + List headerDetailsDtoList = new ArrayList<>(); + QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); +// queryOfsSoSaleOutVo.setShipAt_start(calculateDateVo.getStart_time()); +// queryOfsSoSaleOutVo.setShipAt_end(calculateDateVo.getEnd_time()); + queryOfsSoSaleOutVo.setTradeSuccessAt_start(startTime); + queryOfsSoSaleOutVo.setTradeSuccessAt_end(endTime); + queryOfsSoSaleOutVo.setClientCode("LETS"); + queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); + queryOfsSoSaleOutVo.setSourceOrderStatus("TRADE_FINISHED");//交易成功状态 +// queryOfsSoSaleOutVo.setStatus(900L); + queryOfsSoSaleOutVo.setPageNo(1L); + queryOfsSoSaleOutVo.setPageSize(100L); + queryOfsSoSaleOutVo.setStoreCode(tocShop); +// queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003"); + ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search"); + logger.info("TOC数据返回行数:{}", headerDetailsDtoList.size()); + if (headerDetailsDtoList.size() > 0) { + getSetTran(headerDetailsDtoList); + } else { + logger.info("TOC没有查询到任何数据!不需要同步"); + } + } catch (Exception e) { + logger.error("startImplement方法抛出异常", e); + } finally { +// try { +// basicArchivesCacheUtil.clearCache(); +// } catch (Exception e) { +// logger.info("清理档案缓存失败", e); +// } + LOCK.unlock(); + } + } + }, threadNameStrStart); + thread.start(); + try { + thread.join(); + } catch (Exception e) { + logger.error("thread.join()异常", e); + } + long endMillis = System.currentTimeMillis(); + String threadNameStrEnd = StrUtil.format("结束OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis)); + logger.info(threadNameStrEnd); + } + + /** + * 触发数据转换之前的预备逻辑 * * @author liuyang */ - private List filterData(List headerDetailsDtoList) { + private void getSetStock(List headerDetailsDtoList) throws Exception { + //保存到mysql底表 + batchInsert(headerDetailsDtoList); + //过滤成功的数据 +// List headerDetailsDtos = filterDataStock(headerDetailsDtoList); + //执行推送主逻辑 +// implementStock(headerDetailsDtos); + } + + /** + * 触发数据转换之前的预备逻辑 + * + * @author liuyang + */ + private void getSetTran(List headerDetailsDtoList) throws Exception { + //保存到mysql底表 + batchInsert(headerDetailsDtoList); + //过滤成功的数据 + List headerDetailsDtos = filterDataSTran(headerDetailsDtoList); + //执行推送主逻辑 + implementStock(headerDetailsDtos); + } + + /** + * 出库成功:过滤掉成功的数据 + * + * @author liuyang + */ + private List filterDataStock(List headerDetailsDtoList) { + List headerDetailsDtoList1 = new ArrayList<>(); + if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) { + //TODO 出库单明细主键,需要O返回,目前没有,已经提需求 + headerDetailsDtoList1.addAll(headerDetailsDtoList); + } + return headerDetailsDtoList1; + } + + /** + * 交易成功:过滤掉成功的数据 + * + * @author liuyang + */ + private List filterDataSTran(List headerDetailsDtoList) { List headerDetailsDtoList1 = new ArrayList<>(); if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) { //TODO 出库单明细主键,需要O返回,目前没有,已经提需求 @@ -252,46 +366,48 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { */ private void batchInsert(List headerDetailsDtoList) throws Exception { if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) { - List headerDetailsDtoList1 = new ArrayList<>(); - List headerDetailsDtoList2 = new ArrayList<>(); + try { + List headerDetailsDtoList1 = new ArrayList<>(); + List headerDetailsDtoList2 = new ArrayList<>(); - for (com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto index : headerDetailsDtoList) { - com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto header = index.getHeader();// 主表 - List details = index.getDetails();//明细表 - - for (int i = 0; i < details.size(); i++) { - DetailsDto detailsDto = details.get(i); - detailsDto.setHeaderDto(header); + for (com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto index : headerDetailsDtoList) { + com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto header = index.getHeader();// 主表 + List details = index.getDetails();//明细表 + for (int i = 0; i < details.size(); i++) { + DetailsDto detailsDto = details.get(i); + detailsDto.setHeaderDto(header); + } + headerDetailsDtoList1.add(header); + headerDetailsDtoList2.addAll(details); } - headerDetailsDtoList1.add(header); - headerDetailsDtoList2.addAll(details); - } - - //每250作为一个批次插入主表,根据主键(id)判断是否重复,如果重复的,则不进行插入 - List> ofssaleorderoutsearchList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList1, 100); - for (int i = 0; i < ofssaleorderoutsearchList.size(); i++) { - List headerDtoList = ofssaleorderoutsearchList.get(i); - List tocofsSaleoutEntityList = copyHeaderDto(headerDtoList); - if (tocofsSaleoutEntityList.size() > 0) { - logger.info("TocofsSaleoutEntity:插入底表{}个对象(表头)", tocofsSaleoutEntityList.size()); - iTocofsSaleoutDao.entityInsertBatchV2(tocofsSaleoutEntityList); - } else { - logger.info("TocofsSaleoutEntity:没有对象被插入表头底表"); + //每50作为一个批次插入主表,根据主键(id)判断是否重复,如果重复的,则不进行插入 + List> ofssaleorderoutsearchList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList1, 50); + for (int i = 0; i < ofssaleorderoutsearchList.size(); i++) { + List headerDtoList = ofssaleorderoutsearchList.get(i); + List tocofsSaleoutEntityList = copyHeaderDto(headerDtoList); + if (tocofsSaleoutEntityList != null && tocofsSaleoutEntityList.size() > 0) { + logger.info("TocofsSaleoutEntity:插入底表{}个对象(表头)", tocofsSaleoutEntityList.size()); + iTocofsSaleoutDao.entityInsertOrUpdateBatch(tocofsSaleoutEntityList); + } else { + logger.info("TocofsSaleoutEntity:TOC业务没有对象被插入表头底表"); + } } - } - //插入明细表 - List> detailsDtoList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList2, 100); - for (int i = 0; i < detailsDtoList.size(); i++) { - List detailsDtos = detailsDtoList.get(i); - List tocofsSaleoutDetailedEntities = copyDetailsDto(detailsDtos); - if (tocofsSaleoutDetailedEntities.size() > 0) { - logger.info("TocofsSaleoutDetailedEntity:插入底表{}个对象(表体)", tocofsSaleoutDetailedEntities.size()); - iTocofsSaleoutDetailedDao.entityInsertBatchV2(tocofsSaleoutDetailedEntities); - } else { - logger.info("TocofsSaleoutDetailedEntity:没有对象被插入表头底表"); + //插入明细表 + List> detailsDtoList = SplitListByCountUtil.splitListByCount(headerDetailsDtoList2, 50); + for (int i = 0; i < detailsDtoList.size(); i++) { + List detailsDtos = detailsDtoList.get(i); + List tocofsSaleoutDetailedEntities = copyDetailsDto(detailsDtos); + if (tocofsSaleoutDetailedEntities.size() > 0) { + logger.info("TocofsSaleoutDetailedEntity:插入底表{}个对象(表体)", tocofsSaleoutDetailedEntities.size()); + iTocofsSaleoutDetailedDao.entityInsertOrUpdateBatch(tocofsSaleoutDetailedEntities); + } else { + logger.info("TocofsSaleoutDetailedEntity:没有对象被插入表头底表"); + } } + } catch (Exception e) { + logger.error("TOC业务保存到Mysql底表失败!", e); } } } @@ -350,19 +466,19 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { // } /** - * 代码同步逻辑 + * 库存同步,代码同步逻辑 * * @param headerDetailsDtos 查询得到的O出库单对象 * @author liuyang */ - private void implement(List headerDetailsDtos) throws Exception { - logger.info("TOC销售业务:{}行需要进行数据转换", headerDetailsDtos.size()); + private void implementStock(List headerDetailsDtos) throws Exception { + logger.info("TOC销售库存业务:{}行需要进行数据转换", headerDetailsDtos.size()); if (headerDetailsDtos != null && headerDetailsDtos.size() > 0) { try { // 查询基本档案 - List sonDetailsDtoList = queryBasicArchives(headerDetailsDtos); + List sonDetailsDtoList = queryBasicArchivesStock(headerDetailsDtos); // 分组汇总 - Map> summaryDimensionMap = groupSummary(sonDetailsDtoList); + Map> summaryDimensionMap = groupSummaryStock(sonDetailsDtoList); // 查询U8C业务流程 BdBusitypeEntity bdBusitypeEntity = u8cOperationFlow(); // 查询销售收发类别 @@ -389,9 +505,9 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { BdDefdocEntity shopArchives = oldValue.get(0).getShopArchives();//U8C店铺档案 try { - checkArchives(oldValue.get(0)); +// checkArchives(oldValue.get(0)); //生成业务日期 - String generateBusinessDate = createGenerateBusinessDate(header); + String generateBusinessDate = createGenerateBusinessDateStock(header); SaleorderRequestDto saleorderRequestDto = new SaleorderRequestDto(); SaleorderRequestParentDto saleorderRequestParentDto = new SaleorderRequestParentDto(); @@ -419,6 +535,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { saleorderRequestParentDto.setPk_defdoc2(platformArchives.getPkDefdoc()); saleorderRequestParentDto.setVdef2(platformArchives.getDocname()); + //2024年8月8日 17:17:58 店铺档案自定义项1,先不传,后续维护好之后再传! //店铺 saleorderRequestParentDto.setPk_defdoc1(shopArchives.getPkDefdoc()); saleorderRequestParentDto.setVdef1(shopArchives.getDocname()); @@ -427,8 +544,6 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { saleorderRequestParentDto.setPk_defdoc3(bdRdclEntity.getPkRdcl()); saleorderRequestParentDto.setVdef3(bdRdclEntity.getRdname()); - //TODO 2024年8月8日 17:17:58 店铺档案自定义项1,先不传,后续维护好之后再传! - saleorderRequestDto.setParentvo(saleorderRequestParentDto); List saleorderRequestChildrenDtoList = new ArrayList<>(); @@ -438,13 +553,16 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { SonDetailsDto sonDetailsDto = groupMergeDetailedRows(oldValue); //存货管理档案:取发货公司的存货管理档案 - BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(sonDetailsDto, bdCalbodyEntity.getPkCorp()); +// BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(sonDetailsDto, bdCalbodyEntity.getPkCorp()); + BdInvmandocEntity bdInvmandocEntity = sonDetailsDto.getBdInvmandocEntity(); //存货基础档案 - BdInvbasdocEntity bdInvbasdocEntity = queryStockBasicArchives(bdInvmandocEntity.getPkInvmandoc(), deliverGoodsCorp.getPkCorp()); +// BdInvbasdocEntity bdInvbasdocEntity = queryStockBasicArchives(bdInvmandocEntity.getPkInvmandoc(), deliverGoodsCorp.getPkCorp()); + BdInvbasdocEntity bdInvbasdocEntity = sonDetailsDto.getBdInvbasdocEntity(); //根据存货基础档案编码,查询当前存货的税率 - BdTaxitemsEntity bdTaxitemsEntity1 = queryBdTaxitems(bdInvbasdocEntity.getInvcode()); +// BdTaxitemsEntity bdTaxitemsEntity1 = queryBdTaxitems(bdInvbasdocEntity.getInvcode()); + BdTaxitemsEntity bdTaxitemsEntity1 = sonDetailsDto.getBdTaxitemsEntity(); String tax = "0." + new BigDecimal(bdTaxitemsEntity1.getTaxratio()).stripTrailingZeros().toPlainString(); BigDecimal noriginalcurprice = null;//无税单价 @@ -528,7 +646,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { * * @author liuyang */ - private String createGenerateBusinessDate(com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto header) { + private String createGenerateBusinessDateStock(com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto header) { if (header != null && header.getShipAt() != null) { //TOC以出库日期作为业务日期 String shipAt = header.getShipAt(); @@ -539,6 +657,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { } catch (Exception e) { // e.printStackTrace(); logger.error("业务日期转换失败", e); + Assert.state(false, "业务日期生成失败,原因:", e); } return businessFormat; } else { @@ -549,17 +668,46 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { } /** - * 档案转换 + * 2024年9月4日 14:46:28 + * 生成业务日期,以交易成功时间作为业务日期 * * @author liuyang */ - private List queryBasicArchives(List headerDetailsDtoList) { + private String createGenerateBusinessDateTran(com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto header) { + if (header != null && header.getTradeSuccessAt() != null) { + //TOC以出库日期作为业务日期 + String tradeSuccessAt = header.getTradeSuccessAt(); + String businessFormat = null; + try { + Date dbill = DateUtil.parse(tradeSuccessAt); + businessFormat = DateUtil.format(dbill, "yyyy-MM-dd"); + } catch (Exception e) { +// e.printStackTrace(); + logger.error("业务日期转换失败", e); + Assert.state(false, "业务日期生成失败,原因:", e); + } + return businessFormat; + } else { + logger.error("生成出库日期失败,或者tradeSuccessAt为空! json:{}", JSON.toJSON(header)); + Assert.state(false, "生成出库日期失败,或者tradeSuccessAt为空! json:{}", JSON.toJSON(header)); + return null; + } + } + + + /** + * 档案转换 + * 2024年9月4日 14:11:28 库存同步、确认收入同步是可以共用这个方法的 + * + * @author liuyang + */ + private List queryBasicArchivesStock(List headerDetailsDtoList) { List sonDetailsDtoList = new ArrayList<>(); if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) { try { //初始化档案缓存 - basicArchivesCacheUtil.initCache(); + CacheTocMapVo cacheTocMapVo = basicArchivesCacheUtil.initCache(); for (int i = 0; i < headerDetailsDtoList.size(); i++) { HeaderDetailsDto headerDetailsDto = headerDetailsDtoList.get(i); @@ -567,12 +715,14 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { List details = headerDetailsDto.getDetails(); //表头公司:通过名称匹配U8C公司 - String corpName = "上海丽知品牌管理有限公司"; - BdCorpEntity bdCorpEntity = TocOrderBasicArchivesCacheUtil.stringBdCorpEntityMap.get(corpName); - Assert.notNull(bdCorpEntity, "根据公司名称({})没有匹配到U8C公司档案", corpName); +// String corpName = "上海丽知品牌管理有限公司"; + String companyCode = header.getCompanyCode(); + Assert.notNull(companyCode, "O出库单表头货主不能为空!"); + BdCorpEntity bdCorpEntity = cacheTocMapVo.getStringBdCorpEntityMap().get(companyCode); + Assert.notNull(bdCorpEntity, "根据公司编码({})没有匹配到U8C公司档案(公司编码=O货主)", companyCode); //发货库存组织 - BdCalbodyEntity bdCalbodyEntity = TocOrderBasicArchivesCacheUtil.stringBdCalbodyEntityMap.get(bdCorpEntity.getPkCorp()); + BdCalbodyEntity bdCalbodyEntity = cacheTocMapVo.getStringBdCalbodyEntityMap().get(bdCorpEntity.getPkCorp()); Assert.notNull(bdCalbodyEntity, "根据公司主键没有查询到发货库存组织 公司主键:{}", bdCorpEntity.getPkCorp()); //发货公司,暂时把O表头公司作为发货公司,正常情况下需要把O库存地点对于的公司作为发货公司 @@ -581,7 +731,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { //2024年8月5日 15:06:38 仓库O与U两边仓库编码是一致的,和妮姐确认过了 String facilityCode = header.getFacilityCode(); Assert.notNull(facilityCode, "O仓库编码不能为空"); - BdStordocEntity bdStordocEntity = TocOrderBasicArchivesCacheUtil.stringBdStordocEntityMap.get(facilityCode + bdCalbodyEntity.getPkCalbody()); + BdStordocEntity bdStordocEntity = cacheTocMapVo.getStringBdStordocEntityMap().get(facilityCode + bdCalbodyEntity.getPkCalbody()); Assert.notNull(bdStordocEntity, "没有匹配到发货仓库 发货库存组织主键:{} O库存地点编码:{}", facilityCode, bdCalbodyEntity.getPkCalbody()); //2024年8月5日 15:25:07 收货库存组织、收货仓库、默认和发货库存组织、发货仓库一致,已经和佳妮确认 @@ -589,37 +739,48 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { //收货仓库:通过收货库存组织+仓库编码,确定收货仓库 //销售组织2024年8月5日 15:33:40 和妮姐确认,销售组织和表头公司,作为一对一的关系, - BdSalestruEntity bdSalestruEntity = TocOrderBasicArchivesCacheUtil.stringBdSalestruEntityMap.get(bdCorpEntity.getUnitname()); + BdSalestruEntity bdSalestruEntity = cacheTocMapVo.getStringBdSalestruEntityMap().get(bdCorpEntity.getUnitname()); Assert.notNull(bdSalestruEntity, "无匹配到销售组织 表头公司名称:{}", bdCorpEntity.getUnitname()); //业务部门:暂定的部门名称:其他,2024年8月5日 15:39:42 已经和妮姐确认 - BdDeptdocEntity bdDeptdocEntity = TocOrderBasicArchivesCacheUtil.stringBdDeptdocEntityMap.get(bdCorpEntity.getPkCorp()); + BdDeptdocEntity bdDeptdocEntity = cacheTocMapVo.getStringBdDeptdocEntityMap().get(bdCorpEntity.getPkCorp()); Assert.notNull(bdDeptdocEntity, "无法匹配到业务部门 部门名称:其他 对应公司名称:{}", bdCorpEntity.getPkCorp()); //客商基本档案 - //TODO 2024年8月8日 12:05:10 O店铺的业务编码=U8C客商自定义项1,O没有店铺信息查询接口,因此无法通过出库单的店铺编码,查询到O店铺档案对应的业务编码,接口上线之后需要补充这一部分逻辑 - String custName = "天猫intoyou旗舰店-自营"; - BdCubasdocEntity bdCubasdocEntity = TocOrderBasicArchivesCacheUtil.stringBdCubasdocEntityHashMap.get(custName); - Assert.notNull(bdCubasdocEntity, "无法匹配到客户档案 客商名称:{}", custName); + // 2024年8月8日 12:05:10 O店铺的业务编码=U8C客商自定义项1,O没有店铺信息查询接口,因此无法通过出库单的店铺编码,查询到O店铺档案对应的业务编码,接口上线之后需要补充这一部分逻辑 +// String custName = "天猫intoyou旗舰店-自营"; + String storeCode = header.getStoreCode(); + Assert.notNull(storeCode, "O店铺编码不能为空,没有办法完成业务逻辑!"); + Assert.state(!"".equals(storeCode.trim()), "O店铺编码不能为空,没有办法完成业务逻辑!"); + BdCubasdocEntity bdCubasdocEntity = cacheTocMapVo.getStringBdCubasdocEntityMap().get(storeCode); + Assert.notNull(bdCubasdocEntity, "根据U8C客商基本档案def1(记录o店铺编码),无法匹配到客户档案 o店铺编码:{}", storeCode); //客商管理档案:2024年8月5日 15:41:54 TOC店铺名称查询U8C客商档案,已经和妮姐确认 //2024年8月5日 15:49:49 先根据O店铺编码,得到店铺档案信息,取到名称,通过U8C接口查询出来 //目前O店铺信息查询接口还没有,等待开发,所以我这里先写所一个名字 - BdCumandocEntity bdCumandocEntity = TocOrderBasicArchivesCacheUtil.stringBdCumandocEntityMap.get(bdCubasdocEntity.getPkCubasdoc() + bdCorpEntity.getPkCorp()); + BdCumandocEntity bdCumandocEntity = cacheTocMapVo.getStringBdCumandocEntityMap().get(bdCubasdocEntity.getPkCubasdoc() + bdCorpEntity.getPkCorp()); Assert.notNull(bdCumandocEntity, "无法匹配到客商档案 店铺名称:{}", "天猫intoyou旗舰店-自营"); //查找平台 - BdDefdocEntity bdDefdocEntity = TocOrderBasicArchivesCacheUtil.stringBdDefdocEntityHashMap.get(header.getSourcePlatformCode()); + BdDefdocEntity bdDefdocEntity = cacheTocMapVo.getStringBdDefdocPlatformEntityMap().get(header.getSourcePlatformCode()); Assert.notNull(bdDefdocEntity, "根据O平台编码({})无法匹配到U8C平台自定义档案", header.getSourcePlatformCode()); //查找店铺 - BdDefdocEntity bdDefdocEntity1 = TocOrderBasicArchivesCacheUtil.shopDefdocEntityHashMap.get(header.getStoreCode()); + BdDefdocEntity bdDefdocEntity1 = cacheTocMapVo.getStringBdDefdocShopEntityMap().get(header.getStoreCode()); Assert.notNull(bdDefdocEntity1, "根据O店铺编码({})无法匹配到U8C店铺自定义档案", header.getStoreCode()); //字段拷贝 for (int j = 0; j < details.size(); j++) { DetailsDto detailsDto = details.get(j); + //存货管理档案,是发货公司的存货档案 + BdInvmandocEntity bdInvmandocEntity = cacheTocMapVo.getStringBdInvmandocEntityMap().get(detailsDto.getSkuCode() + bdCorpEntity.getPkCorp()); + //存货基本档案 + BdInvbasdocEntity bdInvbasdocEntity = cacheTocMapVo.getStringBdInvbasdocEntityMap().get(bdInvmandocEntity.getPkInvmandoc() + bdCorpEntity.getPkCorp()); + //存货税率 + BdTaxitemsEntity bdTaxitemsEntity = cacheTocMapVo.getStringBdTaxitemsEntityMap().get(bdInvmandocEntity.getInvcode()); + + //2024年8月6日 10:16:22 通过O出库单的表头,查询得出U8C档案,放在表体的原因是方便分组汇总 //下一个步骤的分组汇总,是通过表体明细完成的 SonDetailsDto sonDetailsDto = new SonDetailsDto(); @@ -636,6 +797,10 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { sonDetailsDto.setBdCubasdocEntity(bdCubasdocEntity); sonDetailsDto.setPlatformArchives(bdDefdocEntity); sonDetailsDto.setShopArchives(bdDefdocEntity1); + sonDetailsDto.setBdInvmandocEntity(bdInvmandocEntity); + sonDetailsDto.setBdInvbasdocEntity(bdInvbasdocEntity); + sonDetailsDto.setBdTaxitemsEntity(bdTaxitemsEntity); + BeanUtil.copyPropertiesV2(detailsDto, sonDetailsDto); sonDetailsDtoList.add(sonDetailsDto); @@ -684,6 +849,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { // BeanUtils.copyProperties(detailsDto, tocofsSaleoutDetailedEntity); BeanUtil.copyPropertiesV2(detailsDto, tocofsSaleoutDetailedEntity); + //补充一些业务字段 createPrimaryKeyAndBusinessDateAndBusinessType(tocofsSaleoutDetailedEntity, detailsDto); tocofsSaleoutDetailedEntityArrayList.add(tocofsSaleoutDetailedEntity); } @@ -696,7 +862,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { * * @author liuyang */ - private Map> groupSummary(List sonDetailsDtoList) { + private Map> groupSummaryStock(List sonDetailsDtoList) { if (sonDetailsDtoList != null && sonDetailsDtoList.size() > 0) { for (int i = 0; i < sonDetailsDtoList.size(); i++) { SonDetailsDto sonDetailsDto = sonDetailsDtoList.get(i); @@ -772,24 +938,48 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { return bdBusitypeEntity; } + /** + * 2024年8月6日 10:59:03 查询U8C业务流程 + * + * @author liuyang + */ + private BdBusitypeEntity u8cOperationFlowV2() throws Exception { + String processName = "TOC冲回发出商品"; + BdBusitypeEntity bdBusitypeEntity = queryBdBusitypeUtil.queryBdBusitype(processName); + Assert.notNull(bdBusitypeEntity, "根据业务流程名称({})没有查询到业务流程", processName); + return bdBusitypeEntity; + } + + /** + * 2024年8月6日 10:59:03 查询U8C业务流程 + * + * @author liuyang + */ + private BdBusitypeEntity u8cOperationFlowV3() throws Exception { + String processName = "TOC确认收入"; + BdBusitypeEntity bdBusitypeEntity = queryBdBusitypeUtil.queryBdBusitype(processName); + Assert.notNull(bdBusitypeEntity, "根据业务流程名称({})没有查询到业务流程", processName); + return bdBusitypeEntity; + } + /** * 检查参数是否为空 * 2024年8月6日 11:40:19 保险的做法,最好还是验证一下 * * @author liuyang */ - private void checkArchives(SonDetailsDto sonDetailsDto) { - Assert.notNull(sonDetailsDto, "sonDetailsDto不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); - Assert.notNull(sonDetailsDto.getHeader(), "header对象不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); - Assert.notNull(sonDetailsDto.getBdCorpEntity(), "表头公司不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); - Assert.notNull(sonDetailsDto.getBdCalbodyEntity(), "发货库存组织不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); - Assert.notNull(sonDetailsDto.getBdStordocEntity(), "发货仓库不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); - Assert.notNull(sonDetailsDto.getBdCalbodyEntity1(), "收货库存组织不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); - Assert.notNull(sonDetailsDto.getBdStordocEntity1(), "收货库存不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); - Assert.notNull(sonDetailsDto.getBdSalestruEntity(), "销售组织不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); - Assert.notNull(sonDetailsDto.getBdDeptdocEntity(), "业务部门不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); - Assert.notNull(sonDetailsDto.getBdCumandocEntity(), "客商档案不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); - } +// private void checkArchives(SonDetailsDto sonDetailsDto) { +// Assert.notNull(sonDetailsDto, "sonDetailsDto不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); +// Assert.notNull(sonDetailsDto.getHeader(), "header对象不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); +// Assert.notNull(sonDetailsDto.getBdCorpEntity(), "表头公司不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); +// Assert.notNull(sonDetailsDto.getBdCalbodyEntity(), "发货库存组织不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); +// Assert.notNull(sonDetailsDto.getBdStordocEntity(), "发货仓库不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); +// Assert.notNull(sonDetailsDto.getBdCalbodyEntity1(), "收货库存组织不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); +// Assert.notNull(sonDetailsDto.getBdStordocEntity1(), "收货库存不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); +// Assert.notNull(sonDetailsDto.getBdSalestruEntity(), "销售组织不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); +// Assert.notNull(sonDetailsDto.getBdDeptdocEntity(), "业务部门不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); +// Assert.notNull(sonDetailsDto.getBdCumandocEntity(), "客商档案不能为空 对象json:{}", JSON.toJSONString(sonDetailsDto)); +// } /** * 查询存货管理档案 @@ -798,15 +988,15 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { * @param sonDetailsDto 出库单存货明细行 * @author liuyang */ - private BdInvmandocEntity queryInventoryMan(SonDetailsDto sonDetailsDto, String pkCorp) { - Assert.notNull(sonDetailsDto, "sonDetailsDto不能为空"); - Assert.notNull(sonDetailsDto.getSkuCode(), "O存货商家编码不能为空"); - Assert.notNull(pkCorp, "发货公司主键不能为空"); - - BdInvmandocEntity bdInvmandocEntity = TocOrderBasicArchivesCacheUtil.stringBdInvmandocEntityMap.get(sonDetailsDto.getSkuCode() + pkCorp); - Assert.notNull(bdInvmandocEntity, "无法匹配到存货管理档案 存货商家编码:{} 存货发货公司:{}", sonDetailsDto.getSkuCode(), pkCorp); - return bdInvmandocEntity; - } +// private BdInvmandocEntity queryInventoryMan(SonDetailsDto sonDetailsDto, String pkCorp) { +// Assert.notNull(sonDetailsDto, "sonDetailsDto不能为空"); +// Assert.notNull(sonDetailsDto.getSkuCode(), "O存货商家编码不能为空"); +// Assert.notNull(pkCorp, "发货公司主键不能为空"); +// +// BdInvmandocEntity bdInvmandocEntity = TocOrderBasicArchivesCacheUtil.stringBdInvmandocEntityMap.get(sonDetailsDto.getSkuCode() + pkCorp); +// Assert.notNull(bdInvmandocEntity, "无法匹配到存货管理档案 存货商家编码:{} 存货发货公司:{}", sonDetailsDto.getSkuCode(), pkCorp); +// return bdInvmandocEntity; +// } /** * 合并明细行 @@ -848,13 +1038,13 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { * * @author liuyang */ - private BdInvbasdocEntity queryStockBasicArchives(String pkInvmandoc, String pkCorp) { - Assert.notNull(pkInvmandoc, "存货管理档案不能为空"); - Assert.notNull(pkCorp, "公司档案不能为空"); - BdInvbasdocEntity bdInvbasdocEntity = TocOrderBasicArchivesCacheUtil.stringBdInvbasdocEntityHashMap.get(pkInvmandoc + pkCorp); - Assert.notNull(bdInvbasdocEntity, "根据公司主键:{} 和存货管理档案主键:{} 没有查询到存货基本档案", pkCorp, pkInvmandoc); - return bdInvbasdocEntity; - } +// private BdInvbasdocEntity queryStockBasicArchives(String pkInvmandoc, String pkCorp) { +// Assert.notNull(pkInvmandoc, "存货管理档案不能为空"); +// Assert.notNull(pkCorp, "公司档案不能为空"); +// BdInvbasdocEntity bdInvbasdocEntity = TocOrderBasicArchivesCacheUtil.stringBdInvbasdocEntityHashMap.get(pkInvmandoc + pkCorp); +// Assert.notNull(bdInvbasdocEntity, "根据公司主键:{} 和存货管理档案主键:{} 没有查询到存货基本档案", pkCorp, pkInvmandoc); +// return bdInvbasdocEntity; +// } /** * 2024年8月7日 14:58:34 @@ -862,12 +1052,12 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { * * @author liuyang */ - private BdTaxitemsEntity queryBdTaxitems(String invcode) { - Assert.notNull(invcode, "存货编码不能为空"); - BdTaxitemsEntity bdTaxitemsEntity = TocOrderBasicArchivesCacheUtil.stringBdTaxitemsEntityHashMap.get(invcode); - Assert.notNull(bdTaxitemsEntity, "根据存货编码({}),无法匹配到税率!", invcode); - return bdTaxitemsEntity; - } +// private BdTaxitemsEntity queryBdTaxitems(String invcode) { +// Assert.notNull(invcode, "存货编码不能为空"); +// BdTaxitemsEntity bdTaxitemsEntity = TocOrderBasicArchivesCacheUtil.stringBdTaxitemsEntityHashMap.get(invcode); +// Assert.notNull(bdTaxitemsEntity, "根据存货编码({}),无法匹配到税率!", invcode); +// return bdTaxitemsEntity; +// } /** * 2024年8月8日 10:54:48 @@ -875,7 +1065,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { * * @author liuyang */ - public SoSaleResultRootDto sendU8CTOCOrder(String param) { + public SoSaleResultRootDto sendU8CTOCOrder(String param) throws Exception { long startLong = System.currentTimeMillis(); logger.info("TOC推送开始,推送参数:" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL); String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息,多个头信息多次调用此方法即可 @@ -921,7 +1111,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { return JSON.parseObject(resultData, SoSaleResultRootDto.class); } } catch (Exception e) { - e.printStackTrace(); +// e.printStackTrace(); logger.error("解析返回参数失败的错误", e); //如果解析失败,记录原因,但是不能影响结果的记录 } @@ -936,11 +1126,311 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity { if (tocofsSaleoutDetailedEntity != null && detailsDto != null && detailsDto.getHeaderDto() != null) { HeaderDto headerDto = detailsDto.getHeaderDto(); - tocofsSaleoutDetailedEntity.setPrimaryKey(headerDto.getId());//主表主键 - tocofsSaleoutDetailedEntity.setBusinessDate(headerDto.getShipAt());//业务日期 - tocofsSaleoutDetailedEntity.setBusinessType("TOC_ORDER");//业务类型 + if (headerDto.getId() != null) { + tocofsSaleoutDetailedEntity.setMaintableid(headerDto.getId());//主表主键 + } + if (headerDto.getShipAt() != null) { + tocofsSaleoutDetailedEntity.setBusinessdate(headerDto.getShipAt());//业务日期-出库时间 + } + if (headerDto.getTradeSuccessAt() != null) { + tocofsSaleoutDetailedEntity.setSuccessfultradedate(headerDto.getTradeSuccessAt());//业务日期-交易时间 + } + tocofsSaleoutDetailedEntity.setBusinesstype("TOC_ORDER");//业务类型 } else { logger.info("createPrimaryKeyAndBusinessDateAndBusinessType方法存在false!"); } } -} + + /** + * 库存同步,代码同步逻辑 + * + * @param headerDetailsDtos 查询得到的O出库单对象 + * @author liuyang + */ + private void implementTran(List headerDetailsDtos) throws Exception { + logger.info("TOC销售库存业务:{}行需要进行数据转换", headerDetailsDtos.size()); + + if (headerDetailsDtos != null && headerDetailsDtos.size() > 0) { + try { + //查询基本档案 + List sonDetailsDtoList = queryBasicArchivesStock(headerDetailsDtos); + //分组汇总 + Map> summaryDimensionMap = groupSummaryStock(sonDetailsDtoList); + //TOC业务流程-TOC冲回发出商品 + BdBusitypeEntity bdBusitypeEntity = u8cOperationFlowV2(); + //TOC业务流程-TOC确认收入 + BdBusitypeEntity bdBusitypeEntity2 = u8cOperationFlowV3(); + //查询销售收发类别 + BdRdclEntity bdRdclEntity = rdclUtil.queryRdClObject("202"); + + if (bdBusitypeEntity != null && bdBusitypeEntity2 != null && summaryDimensionMap != null) { + Iterator>> iterator = summaryDimensionMap.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry> entry = iterator.next(); + String keyGroup = entry.getKey(); + List oldValue = entry.getValue(); + HeaderDto header = oldValue.get(0).getHeader(); + BdCorpEntity bdCorpEntity = oldValue.get(0).getBdCorpEntity();//表头销售公司 + BdCorpEntity deliverGoodsCorp = oldValue.get(0).getDeliverGoodsCorp();//发货公司 + BdCalbodyEntity bdCalbodyEntity = oldValue.get(0).getBdCalbodyEntity();//发货仓库组织 + BdStordocEntity bdStordocEntity = oldValue.get(0).getBdStordocEntity();//发货仓库 + BdCalbodyEntity bdCalbodyEntity1 = oldValue.get(0).getBdCalbodyEntity1();//收货库存组织 + BdStordocEntity bdStordocEntity1 = oldValue.get(0).getBdStordocEntity1();//收货仓库 + BdSalestruEntity bdSalestruEntity = oldValue.get(0).getBdSalestruEntity();//销售组织 + BdDeptdocEntity bdDeptdocEntity = oldValue.get(0).getBdDeptdocEntity();//业务部门 + BdCumandocEntity bdCumandocEntity = oldValue.get(0).getBdCumandocEntity();//客商管理档案 + BdCubasdocEntity bdCubasdocEntity = oldValue.get(0).getBdCubasdocEntity();//客商基本档案 + BdDefdocEntity platformArchives = oldValue.get(0).getPlatformArchives();//U8C平台档案 + BdDefdocEntity shopArchives = oldValue.get(0).getShopArchives();//U8C店铺档案 + SonDetailsDto sonDetailsDto = groupMergeDetailedRows(oldValue);//把汇总好的出库单明细行合并成一行 +// BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(sonDetailsDto, bdCalbodyEntity.getPkCorp()); + BdInvmandocEntity bdInvmandocEntity = sonDetailsDto.getBdInvmandocEntity();//存货管理档案:取发货公司的存货管理档案 +// BdInvbasdocEntity bdInvbasdocEntity = queryStockBasicArchives(bdInvmandocEntity.getPkInvmandoc(), deliverGoodsCorp.getPkCorp()); + BdInvbasdocEntity bdInvbasdocEntity = sonDetailsDto.getBdInvbasdocEntity();//存货基础档案 +// BdTaxitemsEntity bdTaxitemsEntity1 = queryBdTaxitems(bdInvbasdocEntity.getInvcode()); + BdTaxitemsEntity bdTaxitemsEntity1 = sonDetailsDto.getBdTaxitemsEntity();//根据存货基础档案编码,查询当前存货的税率 + + logger.info("开始第一阶段:负数销售订单->(自动生成) 负数销售出库单"); + Boolean isOneSuccess = false; + try { + //验证数据完整性 +// checkArchives(oldValue.get(0)); + //取交易成功时间,生成业务日期 + String generateBusinessDate = createGenerateBusinessDateTran(header); + + SaleorderRequestDto saleorderRequestDto = new SaleorderRequestDto(); + SaleorderRequestParentDto saleorderRequestParentDto = new SaleorderRequestParentDto(); + saleorderRequestParentDto.setDbilldate(generateBusinessDate);//单据日期 + saleorderRequestParentDto.setBretinvflag("Y");//退货标记 + saleorderRequestParentDto.setCbiztype(bdBusitypeEntity.getPkBusitype());//业务流程 + saleorderRequestParentDto.setCcalbodyid(bdCalbodyEntity.getPkCalbody());//库存组织 + saleorderRequestParentDto.setCcustomerid(bdCumandocEntity.getPkCumandoc());//客户=开票单位=收货单位=表体收货单位=收货单位 + saleorderRequestParentDto.setCdeptid(bdDeptdocEntity.getPkDeptdoc());//部门 + saleorderRequestParentDto.setCemployeeid(null);//业务员 + saleorderRequestParentDto.setCoperatorid("0001A110000000000U3D");//制单人 + saleorderRequestParentDto.setCreceiptcorpid(bdCumandocEntity.getPkCumandoc());//开票单位 + saleorderRequestParentDto.setCreceiptcustomerid(bdCumandocEntity.getPkCumandoc());//收货单位 + saleorderRequestParentDto.setCsalecorpid(bdSalestruEntity.getCsalestruid());//销售组织 + saleorderRequestParentDto.setCwarehouseid(bdStordocEntity.getPkStordoc());//仓库 + saleorderRequestParentDto.setDapprovedate(generateBusinessDate);//审核日期 + saleorderRequestParentDto.setNdiscountrate("100.000000");//整单折扣 + saleorderRequestParentDto.setPk_corp(bdCorpEntity.getPkCorp());//公司id + saleorderRequestParentDto.setVdef17(ProfilesActiveConstant.sourceSystem1);//来源系统 + saleorderRequestParentDto.setVdef18(keyGroup);//汇总单号=汇总维度 +// saleorderRequestParentDto.setVdef19(); 这两个值TOC传递不了的 +// saleorderRequestParentDto.setVdef20(); + saleorderRequestParentDto.setPk_defdoc2(platformArchives.getPkDefdoc()); + saleorderRequestParentDto.setVdef2(platformArchives.getDocname());//平台,2024年8月8日 17:17:58 店铺档案自定义项1,先不传,后续维护好之后再传! + saleorderRequestParentDto.setPk_defdoc1(shopArchives.getPkDefdoc()); + saleorderRequestParentDto.setVdef1(shopArchives.getDocname());//店铺 + saleorderRequestParentDto.setPk_defdoc3(bdRdclEntity.getPkRdcl());//收发类别 + saleorderRequestParentDto.setVdef3(bdRdclEntity.getRdname()); + saleorderRequestDto.setParentvo(saleorderRequestParentDto); + + List saleorderRequestChildrenDtoList = new ArrayList<>(); + saleorderRequestDto.setChildrenvo(saleorderRequestChildrenDtoList); + + String tax = "0." + new BigDecimal(bdTaxitemsEntity1.getTaxratio()).stripTrailingZeros().toPlainString(); + BigDecimal noriginalcurprice = null;//无税单价 + BigDecimal noriginalcurmny = null;//无税金额 + BigDecimal noriginalcurtaxprice = null;//含税单价 + BigDecimal noriginalcursummny = null;//价税合计 + BigDecimal noriginalcurtaxmny = null;//税额 + try { + noriginalcurtaxprice = sonDetailsDto.getGroupTotalPayAmount().divide(sonDetailsDto.getGroupShipQty(), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP); + noriginalcurprice = noriginalcurtaxprice.divide(new BigDecimal(1).add(new BigDecimal(tax)), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP); + noriginalcurmny = noriginalcurprice.multiply(sonDetailsDto.getGroupShipQty()).setScale(2, BigDecimal.ROUND_HALF_UP); + noriginalcursummny = noriginalcurtaxprice.multiply(sonDetailsDto.getGroupShipQty()).setScale(2, BigDecimal.ROUND_HALF_UP); + noriginalcurtaxmny = noriginalcursummny.subtract(noriginalcurmny).setScale(2, BigDecimal.ROUND_HALF_UP); + } catch (Exception e) { + logger.error("TOC金额计算错误", e); + Assert.state(false, "金额计算错误,原因:{}" + e.getMessage()); + } + //判断是否为赠品 + Boolean isblargessflag = false; + if (noriginalcursummny.longValue() == 0) { + isblargessflag = true; + } + + SaleorderRequestChildrenDto saleorderRequestChildrenDto = new SaleorderRequestChildrenDto(); + saleorderRequestChildrenDto.setBlargessflag(isblargessflag);//是否赠品 + saleorderRequestChildrenDto.setCadvisecalbodyid(bdCalbodyEntity.getPkCalbody());//发货库存组织 + saleorderRequestChildrenDto.setCbodywarehouseid(bdStordocEntity.getPkStordoc());//发货仓库 + saleorderRequestChildrenDto.setCbodywarehousecode(bdStordocEntity.getStorcode());//发货仓库编码:这个字段不需要给openapi接口,而是提供给下游方法使用 + saleorderRequestChildrenDto.setCconsigncorpid(deliverGoodsCorp.getPkCorp());//发货公司 + saleorderRequestChildrenDto.setCcurrencytypeid("00010000000000000001");//币种 + saleorderRequestChildrenDto.setCinventoryid(bdInvmandocEntity.getPkInvmandoc());//存货id + saleorderRequestChildrenDto.setCinventorycode(bdInvbasdocEntity.getInvcode());//存货编码 + saleorderRequestChildrenDto.setCreceiptcorpid(bdCumandocEntity.getPkCumandoc());//收货单位 + saleorderRequestChildrenDto.setDconsigndate(generateBusinessDate);//计划发货日期 + saleorderRequestChildrenDto.setDdeliverdate(generateBusinessDate);//要求收货日期 + saleorderRequestChildrenDto.setNexchangeotobrate("1.00000000");//折本汇率 + saleorderRequestChildrenDto.setNitemdiscountrate("100.000000");//单品折扣 + saleorderRequestChildrenDto.setNnumber("-" + String.valueOf(sonDetailsDto.getGroupShipQty()));//数量 + saleorderRequestChildrenDto.setNoriginalcurdiscountmny("0");//折扣额 + saleorderRequestChildrenDto.setNoriginalcurmny("-" + noriginalcurmny.stripTrailingZeros().toPlainString());//无税金额 +// saleorderRequestChildrenDto.setNoriginalcurnetprice(noriginalcurprice.stripTrailingZeros().toPlainString());//无税净价 +// saleorderRequestChildrenDto.setNoriginalcurprice(noriginalcurprice.stripTrailingZeros().toPlainString());//无税单价 + saleorderRequestChildrenDto.setNoriginalcursummny("-" + noriginalcursummny.stripTrailingZeros().toPlainString());//价税合计 + saleorderRequestChildrenDto.setNoriginalcurtaxmny("-" + noriginalcurtaxmny.stripTrailingZeros().toPlainString());//税额 + saleorderRequestChildrenDto.setNoriginalcurtaxnetprice(noriginalcurtaxprice.stripTrailingZeros().toPlainString());//含税净价 + saleorderRequestChildrenDto.setNoriginalcurtaxprice(noriginalcurtaxprice.stripTrailingZeros().toPlainString());//含税单价 + saleorderRequestChildrenDto.setNtaxrate(new BigDecimal(bdTaxitemsEntity1.getTaxratio()).stripTrailingZeros().toPlainString());//税率 +// saleorderRequestChildrenDto.setCreccalbodyid(bdCalbodyEntity1.getPkCalbody());//收货库存组织:2024年8月7日 16:21:48 和佳妮、道品一起测试,收货库存组织、收货仓库 是不需要传递的 +// saleorderRequestChildrenDto.setCrecwareid(bdStordocEntity1.getPkStordoc());//收货仓库 + saleorderRequestChildrenDtoList.add(saleorderRequestChildrenDto); + + //销售订单单据推送到u8c + List saleorderRequestDtoList = new ArrayList<>(); + saleorderRequestDtoList.add(saleorderRequestDto); + + Map> stringStringMap = new HashMap<>(); + stringStringMap.put("saleorder", saleorderRequestDtoList); + SoSaleResultRootDto soSaleResultRootDto = sendU8CTOCOrder(JSON.toJSONString(stringStringMap)); + + String vreceiptcode = null; + String pk_corp = null; + String csaleid = null; + if (soSaleResultRootDto != null && soSaleResultRootDto.getParentvo() != null) { + SoSaleResultHeadDto parentvo = soSaleResultRootDto.getParentvo(); + vreceiptcode = parentvo.getVreceiptcode(); + pk_corp = parentvo.getPk_corp(); + csaleid = parentvo.getCsaleid(); + } else { + logger.error("第一阶段推送,令人匪夷所思的错误,正常来说是不可能执行到这里的,sendU8CTOCOrder方法的错误会向上抛出! json:{}", JSON.toJSON(soSaleResultRootDto)); + } + logger.info("第一阶段:负数销售订单->(自动生成) 负数销售出库单抛出成功,销售订单编号:{} 销售订单主键:{} 销售公司:{}", vreceiptcode, csaleid, pk_corp); + isOneSuccess = true; + //第一阶段记录成功 + } catch (Exception e) { + logger.error("第一阶段:负数销售订单->(自动生成) 负数销售出库单抛出异常", e); + //第一阶段记录失败 + } + logger.info("结束第一阶段:负数销售订单->(自动生成) 负数销售出库单"); + + if (isOneSuccess) { + //2024年9月4日 14:30:31 第一阶段推送成功,才能执行第二阶段,否则不能执行以下代码 + logger.info("开始第二阶段:销售订单 ->(自动生成) 销售出库单 ->(自动生成) 销售发票"); + try { + //取交易成功时间,生成业务日期 + String generateBusinessDate = createGenerateBusinessDateTran(header); + + SaleorderRequestDto saleorderRequestDto = new SaleorderRequestDto(); + SaleorderRequestParentDto saleorderRequestParentDto = new SaleorderRequestParentDto(); + saleorderRequestParentDto.setDbilldate(generateBusinessDate);//单据日期 + saleorderRequestParentDto.setBretinvflag("N");//退货标记 + saleorderRequestParentDto.setCbiztype(bdBusitypeEntity2.getPkBusitype());//业务流程 + saleorderRequestParentDto.setCcalbodyid(bdCalbodyEntity.getPkCalbody());//库存组织 + saleorderRequestParentDto.setCcustomerid(bdCumandocEntity.getPkCumandoc());//客户=开票单位=收货单位=表体收货单位=收货单位 + saleorderRequestParentDto.setCdeptid(bdDeptdocEntity.getPkDeptdoc());//部门 + saleorderRequestParentDto.setCemployeeid(null);//业务员 + saleorderRequestParentDto.setCoperatorid("0001A110000000000U3D");//制单人 + saleorderRequestParentDto.setCreceiptcorpid(bdCumandocEntity.getPkCumandoc());//开票单位 + saleorderRequestParentDto.setCreceiptcustomerid(bdCumandocEntity.getPkCumandoc());//收货单位 + saleorderRequestParentDto.setCsalecorpid(bdSalestruEntity.getCsalestruid());//销售组织 + saleorderRequestParentDto.setCwarehouseid(bdStordocEntity.getPkStordoc());//仓库 + saleorderRequestParentDto.setDapprovedate(generateBusinessDate);//审核日期 + saleorderRequestParentDto.setNdiscountrate("100.000000");//整单折扣 + saleorderRequestParentDto.setPk_corp(bdCorpEntity.getPkCorp());//公司id + saleorderRequestParentDto.setVdef17(ProfilesActiveConstant.sourceSystem1);//来源系统 + saleorderRequestParentDto.setVdef18(keyGroup);//汇总单号=汇总维度 + saleorderRequestParentDto.setPk_defdoc2(platformArchives.getPkDefdoc()); + saleorderRequestParentDto.setVdef2(platformArchives.getDocname());//平台,2024年8月8日 17:17:58 店铺档案自定义项1,先不传,后续维护好之后再传! + saleorderRequestParentDto.setPk_defdoc1(shopArchives.getPkDefdoc()); + saleorderRequestParentDto.setVdef1(shopArchives.getDocname());//店铺 + saleorderRequestParentDto.setPk_defdoc3(bdRdclEntity.getPkRdcl());//收发类别 + saleorderRequestParentDto.setVdef3(bdRdclEntity.getRdname()); + saleorderRequestDto.setParentvo(saleorderRequestParentDto); + + List saleorderRequestChildrenDtoList = new ArrayList<>(); + saleorderRequestDto.setChildrenvo(saleorderRequestChildrenDtoList); + + String tax = "0." + new BigDecimal(bdTaxitemsEntity1.getTaxratio()).stripTrailingZeros().toPlainString(); + BigDecimal noriginalcurprice = null;//无税单价 + BigDecimal noriginalcurmny = null;//无税金额 + BigDecimal noriginalcurtaxprice = null;//含税单价 + BigDecimal noriginalcursummny = null;//价税合计 + BigDecimal noriginalcurtaxmny = null;//税额 + try { + noriginalcurtaxprice = sonDetailsDto.getGroupTotalPayAmount().divide(sonDetailsDto.getGroupShipQty(), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP); + noriginalcurprice = noriginalcurtaxprice.divide(new BigDecimal(1).add(new BigDecimal(tax)), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP); + noriginalcurmny = noriginalcurprice.multiply(sonDetailsDto.getGroupShipQty()).setScale(2, BigDecimal.ROUND_HALF_UP); + noriginalcursummny = noriginalcurtaxprice.multiply(sonDetailsDto.getGroupShipQty()).setScale(2, BigDecimal.ROUND_HALF_UP); + noriginalcurtaxmny = noriginalcursummny.subtract(noriginalcurmny).setScale(2, BigDecimal.ROUND_HALF_UP); + } catch (Exception e) { + logger.error("TOC金额计算错误", e); + Assert.state(false, "金额计算错误,原因:{}" + e.getMessage()); + } + //判断是否为赠品 + Boolean isblargessflag = false; + if (noriginalcursummny.longValue() == 0) { + isblargessflag = true; + } + + SaleorderRequestChildrenDto saleorderRequestChildrenDto = new SaleorderRequestChildrenDto(); + saleorderRequestChildrenDto.setBlargessflag(isblargessflag);//是否赠品 + saleorderRequestChildrenDto.setCadvisecalbodyid(bdCalbodyEntity.getPkCalbody());//发货库存组织 + saleorderRequestChildrenDto.setCbodywarehouseid(bdStordocEntity.getPkStordoc());//发货仓库 + saleorderRequestChildrenDto.setCbodywarehousecode(bdStordocEntity.getStorcode());//发货仓库编码:这个字段不需要给openapi接口,而是提供给下游方法使用 + saleorderRequestChildrenDto.setCconsigncorpid(deliverGoodsCorp.getPkCorp());//发货公司 + saleorderRequestChildrenDto.setCcurrencytypeid("00010000000000000001");//币种 + saleorderRequestChildrenDto.setCinventoryid(bdInvmandocEntity.getPkInvmandoc());//存货id + saleorderRequestChildrenDto.setCinventorycode(bdInvbasdocEntity.getInvcode());//存货编码 + saleorderRequestChildrenDto.setCreceiptcorpid(bdCumandocEntity.getPkCumandoc());//收货单位 + saleorderRequestChildrenDto.setDconsigndate(generateBusinessDate);//计划发货日期 + saleorderRequestChildrenDto.setDdeliverdate(generateBusinessDate);//要求收货日期 + saleorderRequestChildrenDto.setNexchangeotobrate("1.00000000");//折本汇率 + saleorderRequestChildrenDto.setNitemdiscountrate("100.000000");//单品折扣 + saleorderRequestChildrenDto.setNnumber(sonDetailsDto.getGroupShipQty().stripTrailingZeros().toPlainString());//数量 + saleorderRequestChildrenDto.setNoriginalcurdiscountmny("0");//折扣额 + saleorderRequestChildrenDto.setNoriginalcurmny(noriginalcurmny.stripTrailingZeros().toPlainString());//无税金额 +// saleorderRequestChildrenDto.setNoriginalcurnetprice(noriginalcurprice.stripTrailingZeros().toPlainString());//无税净价 +// saleorderRequestChildrenDto.setNoriginalcurprice(noriginalcurprice.stripTrailingZeros().toPlainString());//无税单价 + saleorderRequestChildrenDto.setNoriginalcursummny(noriginalcursummny.stripTrailingZeros().toPlainString());//价税合计 + saleorderRequestChildrenDto.setNoriginalcurtaxmny(noriginalcurtaxmny.stripTrailingZeros().toPlainString());//税额 + saleorderRequestChildrenDto.setNoriginalcurtaxnetprice(noriginalcurtaxprice.stripTrailingZeros().toPlainString());//含税净价 + saleorderRequestChildrenDto.setNoriginalcurtaxprice(noriginalcurtaxprice.stripTrailingZeros().toPlainString());//含税单价 + saleorderRequestChildrenDto.setNtaxrate(new BigDecimal(bdTaxitemsEntity1.getTaxratio()).stripTrailingZeros().toPlainString());//税率 +// saleorderRequestChildrenDto.setCreccalbodyid(bdCalbodyEntity1.getPkCalbody());//收货库存组织:2024年8月7日 16:21:48 和佳妮、道品一起测试,收货库存组织、收货仓库 是不需要传递的 +// saleorderRequestChildrenDto.setCrecwareid(bdStordocEntity1.getPkStordoc());//收货仓库 + saleorderRequestChildrenDtoList.add(saleorderRequestChildrenDto); + + //销售订单单据推送到u8c + List saleorderRequestDtoList = new ArrayList<>(); + saleorderRequestDtoList.add(saleorderRequestDto); + + Map> stringStringMap = new HashMap<>(); + stringStringMap.put("saleorder", saleorderRequestDtoList); + SoSaleResultRootDto soSaleResultRootDto = sendU8CTOCOrder(JSON.toJSONString(stringStringMap)); + + String vreceiptcode = null; + String pk_corp = null; + String csaleid = null; + if (soSaleResultRootDto != null && soSaleResultRootDto.getParentvo() != null) { + SoSaleResultHeadDto parentvo = soSaleResultRootDto.getParentvo(); + vreceiptcode = parentvo.getVreceiptcode(); + pk_corp = parentvo.getPk_corp(); + csaleid = parentvo.getCsaleid(); + } else { + logger.error("第二阶段推送,令人匪夷所思的错误,正常来说是不可能执行到这里的,sendU8CTOCOrder方法的错误会向上抛出! json:{}", JSON.toJSON(soSaleResultRootDto)); + } + logger.info("第二阶段:负数销售订单->(自动生成) 负数销售出库单抛出成功,销售订单编号:{} 销售订单主键:{} 销售公司:{}", vreceiptcode, csaleid, pk_corp); + //第二阶段记录成功 + } catch (Exception e) { + logger.error("第二阶段:销售订单 ->(自动生成) 销售出库单 ->(自动生成) 销售发票失败", e); + //第二阶段记录失败 + } + logger.info("结束第二阶段:销售订单 ->(自动生成) 销售出库单 ->(自动生成) 销售发票"); + } + } + } else { + //2024年8月6日 11:28:54此处不记录失败,不认为是错误 + logger.info("条件:bdBusitypeEntity != null && bdBusitypeEntity2 != null && summaryDimensionMap != null 条件不合法,因此主要的推送逻辑不会被执行!"); + } + } catch (Exception e) { + logger.error("外层转换逻辑抛出异常", e); + // 记录失败 + } + } + } +} \ No newline at end of file diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/resultvo/CacheTocMapVo.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/resultvo/CacheTocMapVo.java new file mode 100644 index 00000000..b2392229 --- /dev/null +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/resultvo/CacheTocMapVo.java @@ -0,0 +1,31 @@ +package com.hzya.frame.plugin.lets.resultvo; + +import com.hzya.frame.plugin.lets.entity.*; +import lombok.Data; + +import java.util.Map; + +/** + * @Author:liuyang + * @Package:com.hzya.frame.plugin.lets.resultvo + * @Project:kangarooDataCenterV3 + * @name:CacheMapVo + * @Date:2024/9/4 13:35 + * @Filename:CacheMapVo + */ +@Data +public class CacheTocMapVo { + private Map stringBdCorpEntityMap; + private Map stringBdStordocEntityMap; + private Map stringBdCalbodyEntityMap; + private Map stringBdSalestruEntityMap; + private Map stringBdDeptdocEntityMap; + private Map stringBdCumandocEntityMap; + private Map stringBdInvmandocEntityMap; + private Map stringBdInvbasdocEntityMap; + private Map stringBdTaxitemsEntityMap; + private Map stringBdCubasdocEntityMap; + private Map stringBdDefdocPlatformEntityMap; + private Map stringBdDefdocShopEntityMap; + private Map stringBdRdclEntityMap; +} diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/u8cdto/SonDetailsDto.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/u8cdto/SonDetailsDto.java index 5b06b4a5..17289f5e 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/u8cdto/SonDetailsDto.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/u8cdto/SonDetailsDto.java @@ -3,6 +3,7 @@ package com.hzya.frame.plugin.lets.u8cdto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto; import com.hzya.frame.plugin.lets.entity.*; +import lombok.Data; import java.math.BigDecimal; @@ -14,213 +15,62 @@ import java.math.BigDecimal; * @Date:2024/8/5 16:07 * @Filename:SonDetailsDto */ +@Data public class SonDetailsDto extends DetailsDto { - - /** - * 表头对象 - */ + //表头对象 private HeaderDto header; - /** - * 表头公司(销售公司) - */ + //表头公司(销售公司) private BdCorpEntity bdCorpEntity; - /** - * 发货库存组织 - */ + //发货库存组织 private BdCalbodyEntity bdCalbodyEntity; - /** - * 发货仓库 - */ + //发货仓库 private BdStordocEntity bdStordocEntity; - /** - * 收货库存组织 - */ + //收货库存组织 private BdCalbodyEntity bdCalbodyEntity1; - /** - * 收货仓库 - */ + //收货仓库 private BdStordocEntity bdStordocEntity1; - /** - * 销售组织 - */ + //销售组织 private BdSalestruEntity bdSalestruEntity; - /** - * 业务部门 - */ + //业务部门 private BdDeptdocEntity bdDeptdocEntity; - /** - * 客商管理档案 - */ + //客商管理档案 private BdCumandocEntity bdCumandocEntity; - /** - * 客商基本档案 - */ + //客商基本档案 private BdCubasdocEntity bdCubasdocEntity; - /** - * 生成汇总维度字符串 - */ + //生成汇总维度字符串 private String summaryDimensionStr; - /** - * 汇总总金额 - */ + //汇总总金额 private BigDecimal groupTotalPayAmount; - /** - * 汇总实发数量 - */ + //汇总实发数量 private BigDecimal groupShipQty; - /** - * 发货公司 - */ + //发货公司 private BdCorpEntity deliverGoodsCorp; - /** - * U8C平台档案 - */ + //U8C平台档案 private BdDefdocEntity platformArchives; - /** - * U8C店铺档案 - */ + //U8C店铺档案 private BdDefdocEntity shopArchives; - public BdDefdocEntity getShopArchives() { - return shopArchives; - } + //存货管理档案,是发货公司的存货档案 + private BdInvmandocEntity bdInvmandocEntity; - public void setShopArchives(BdDefdocEntity shopArchives) { - this.shopArchives = shopArchives; - } + //存货基本档案 + private BdInvbasdocEntity bdInvbasdocEntity; - public BdDefdocEntity getPlatformArchives() { - return platformArchives; - } - - public void setPlatformArchives(BdDefdocEntity platformArchives) { - this.platformArchives = platformArchives; - } - - public BdCorpEntity getDeliverGoodsCorp() { - return deliverGoodsCorp; - } - - public void setDeliverGoodsCorp(BdCorpEntity deliverGoodsCorp) { - this.deliverGoodsCorp = deliverGoodsCorp; - } - - public BigDecimal getGroupShipQty() { - return groupShipQty; - } - - public void setGroupShipQty(BigDecimal groupShipQty) { - this.groupShipQty = groupShipQty; - } - - public BigDecimal getGroupTotalPayAmount() { - return groupTotalPayAmount; - } - - public void setGroupTotalPayAmount(BigDecimal groupTotalPayAmount) { - this.groupTotalPayAmount = groupTotalPayAmount; - } - - public String getSummaryDimensionStr() { - return summaryDimensionStr; - } - - public void setSummaryDimensionStr(String summaryDimensionStr) { - this.summaryDimensionStr = summaryDimensionStr; - } - - public BdCorpEntity getBdCorpEntity() { - return bdCorpEntity; - } - - public void setBdCorpEntity(BdCorpEntity bdCorpEntity) { - this.bdCorpEntity = bdCorpEntity; - } - - public BdCalbodyEntity getBdCalbodyEntity() { - return bdCalbodyEntity; - } - - public void setBdCalbodyEntity(BdCalbodyEntity bdCalbodyEntity) { - this.bdCalbodyEntity = bdCalbodyEntity; - } - - public BdStordocEntity getBdStordocEntity() { - return bdStordocEntity; - } - - public void setBdStordocEntity(BdStordocEntity bdStordocEntity) { - this.bdStordocEntity = bdStordocEntity; - } - - public BdCalbodyEntity getBdCalbodyEntity1() { - return bdCalbodyEntity1; - } - - public void setBdCalbodyEntity1(BdCalbodyEntity bdCalbodyEntity1) { - this.bdCalbodyEntity1 = bdCalbodyEntity1; - } - - public BdStordocEntity getBdStordocEntity1() { - return bdStordocEntity1; - } - - public void setBdStordocEntity1(BdStordocEntity bdStordocEntity1) { - this.bdStordocEntity1 = bdStordocEntity1; - } - - public BdSalestruEntity getBdSalestruEntity() { - return bdSalestruEntity; - } - - public void setBdSalestruEntity(BdSalestruEntity bdSalestruEntity) { - this.bdSalestruEntity = bdSalestruEntity; - } - - public BdDeptdocEntity getBdDeptdocEntity() { - return bdDeptdocEntity; - } - - public void setBdDeptdocEntity(BdDeptdocEntity bdDeptdocEntity) { - this.bdDeptdocEntity = bdDeptdocEntity; - } - - public BdCumandocEntity getBdCumandocEntity() { - return bdCumandocEntity; - } - - public void setBdCumandocEntity(BdCumandocEntity bdCumandocEntity) { - this.bdCumandocEntity = bdCumandocEntity; - } - - public HeaderDto getHeader() { - return header; - } - - public void setHeader(HeaderDto header) { - this.header = header; - } - - public BdCubasdocEntity getBdCubasdocEntity() { - return bdCubasdocEntity; - } - - public void setBdCubasdocEntity(BdCubasdocEntity bdCubasdocEntity) { - this.bdCubasdocEntity = bdCubasdocEntity; - } + //存货税率 + private BdTaxitemsEntity bdTaxitemsEntity; } \ No newline at end of file diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/TocOrderBasicArchivesCacheUtil.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/TocOrderBasicArchivesCacheUtil.java index 12343e4d..fcf64668 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/TocOrderBasicArchivesCacheUtil.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/TocOrderBasicArchivesCacheUtil.java @@ -2,6 +2,10 @@ package com.hzya.frame.plugin.lets.util; import com.hzya.frame.plugin.lets.dao.*; import com.hzya.frame.plugin.lets.entity.*; +import com.hzya.frame.plugin.lets.plugin.sales.SoSaleOutPluginInitializerToC; +import com.hzya.frame.plugin.lets.resultvo.CacheTocMapVo; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -22,6 +26,8 @@ import java.util.Map; @Component public class TocOrderBasicArchivesCacheUtil { + Logger logger = LoggerFactory.getLogger(TocOrderBasicArchivesCacheUtil.class); + @Autowired private IBdCorpDao iBdCorpDao; @@ -55,13 +61,17 @@ public class TocOrderBasicArchivesCacheUtil { @Autowired private IBdDefdocDao iBdDefdocDao; + @Autowired + private IBdRdclDao iBdRdclDao; + /** * 初始化公司档案-表头公司 * 2024年7月31日 11:16:23 */ - public static Map stringBdCorpEntityMap = new HashMap<>(); +// public static Map stringBdCorpEntityMap = new HashMap<>(); + private Map initShop() throws Exception { + Map stringBdCorpEntityMap = new HashMap<>(); - private void initShop() throws Exception { BdCorpEntity bdCorpEntity = new BdCorpEntity(); bdCorpEntity.setDr(0); bdCorpEntity.setDataSourceCode("lets_u8c"); @@ -69,9 +79,10 @@ public class TocOrderBasicArchivesCacheUtil { if (bdCorpEntityList != null && bdCorpEntityList.size() > 0) { for (int i = 0; i < bdCorpEntityList.size(); i++) { BdCorpEntity bdCorpEntity1 = bdCorpEntityList.get(i); - stringBdCorpEntityMap.put(bdCorpEntity1.getUnitname(), bdCorpEntity1); + stringBdCorpEntityMap.put(bdCorpEntity1.getUnitcode(), bdCorpEntity1); } } + return stringBdCorpEntityMap; } /** @@ -79,9 +90,10 @@ public class TocOrderBasicArchivesCacheUtil { * 2024年7月31日 11:16:27 * 202403011513:仓库根据仓库编码+库存组织编码去查询,之前是仓库编码+公司主键,和李佳妮确认好了 */ - public static Map stringBdStordocEntityMap = new HashMap<>(); +// public static Map stringBdStordocEntityMap = new HashMap<>(); + private Map initBdStordoc() throws Exception { + Map stringBdStordocEntityMap = new HashMap<>(); - private void initBdStordoc() throws Exception { BdStordocEntity bdStordocEntity = new BdStordocEntity(); bdStordocEntity.setDr(0L); bdStordocEntity.setDataSourceCode("lets_u8c"); @@ -92,14 +104,16 @@ public class TocOrderBasicArchivesCacheUtil { stringBdStordocEntityMap.put(bdStordocEntity1.getStorcode() + bdStordocEntity1.getPkCalbody(), bdStordocEntity1); } } + return stringBdStordocEntityMap; } /** * 2024年7月31日 11:09:12 查询发货库存组织 */ - public static Map stringBdCalbodyEntityMap = new HashMap<>(); +// public static Map stringBdCalbodyEntityMap = new HashMap<>(); + private Map initBdCalbody() throws Exception { + Map stringBdCalbodyEntityMap = new HashMap<>(); - private void initBdCalbody() throws Exception { BdCalbodyEntity bdCalbodyEntity = new BdCalbodyEntity(); bdCalbodyEntity.setDr(0); bdCalbodyEntity.setDataSourceCode("lets_u8c"); @@ -110,14 +124,16 @@ public class TocOrderBasicArchivesCacheUtil { stringBdCalbodyEntityMap.put(bdCalbodyEntity1.getPkCorp(), bdCalbodyEntity1); } } + return stringBdCalbodyEntityMap; } /** * 初始化销售组织 */ - public static Map stringBdSalestruEntityMap = new HashMap<>(); +// public static Map stringBdSalestruEntityMap = new HashMap<>(); + private Map initBdSalestru() throws Exception { + Map stringBdSalestruEntityMap = new HashMap<>(); - private void initBdSalestru() throws Exception { BdSalestruEntity bdSalestruEntity = new BdSalestruEntity(); bdSalestruEntity.setDr(0); bdSalestruEntity.setDataSourceCode("lets_u8c"); @@ -128,6 +144,7 @@ public class TocOrderBasicArchivesCacheUtil { stringBdSalestruEntityMap.put(bdSalestruEntity1.getVsalestruname(), bdSalestruEntity1); } } + return stringBdSalestruEntityMap; } /** @@ -135,9 +152,10 @@ public class TocOrderBasicArchivesCacheUtil { * * @author liuyang */ - public static Map stringBdDeptdocEntityMap = new HashMap<>(); +// public static Map stringBdDeptdocEntityMap = new HashMap<>(); + private Map initDept() { + Map stringBdDeptdocEntityMap = new HashMap<>(); - private void initDept() { BdDeptdocEntity bdDeptdocEntity = new BdDeptdocEntity(); bdDeptdocEntity.setDataSourceCode("lets_u8c"); bdDeptdocEntity.setDr(0); @@ -149,6 +167,7 @@ public class TocOrderBasicArchivesCacheUtil { stringBdDeptdocEntityMap.put(bdDeptdocEntity1.getPkCorp(), bdDeptdocEntity1); } } + return stringBdDeptdocEntityMap; } /** @@ -156,9 +175,10 @@ public class TocOrderBasicArchivesCacheUtil { * * @author liuyang */ - public static Map stringBdCubasdocEntityHashMap = new HashMap<>(); +// public static Map stringBdCubasdocEntityHashMap = new HashMap<>(); + private Map initBdCubasdoc() { + Map stringBdCubasdocEntityHashMap = new HashMap<>(); - private void initBdCubasdoc() { BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity(); bdCubasdocEntity.setDataSourceCode("lets_u8c"); bdCubasdocEntity.setDr(0L); @@ -166,9 +186,14 @@ public class TocOrderBasicArchivesCacheUtil { if (bdCumandocEntityList != null && bdCumandocEntityList.size() > 0) { for (int i = 0; i < bdCumandocEntityList.size(); i++) { BdCubasdocEntity bdCubasdocEntity1 = bdCumandocEntityList.get(i); - stringBdCubasdocEntityHashMap.put(bdCubasdocEntity1.getCustname(), bdCubasdocEntity1); + if (stringBdCubasdocEntityHashMap.get(bdCubasdocEntity1.getDef1()) == null) { + stringBdCubasdocEntityHashMap.put(bdCubasdocEntity1.getDef1(), bdCubasdocEntity1); + } else { + logger.warn("客商档案def1重复,客商编码:{}", bdCubasdocEntity1.getCustcode()); + } } } + return stringBdCubasdocEntityHashMap; } /** @@ -176,9 +201,10 @@ public class TocOrderBasicArchivesCacheUtil { * * @author liuyang */ - public static Map stringBdCumandocEntityMap = new HashMap<>(); +// public static Map stringBdCumandocEntityMap = new HashMap<>(); + private Map initBdCumandoc() { + Map stringBdCumandocEntityMap = new HashMap<>(); - private void initBdCumandoc() { BdCumandocEntity bdCumandocEntity1 = new BdCumandocEntity(); bdCumandocEntity1.setDataSourceCode("lets_u8c"); bdCumandocEntity1.setDr(0L); @@ -190,14 +216,16 @@ public class TocOrderBasicArchivesCacheUtil { stringBdCumandocEntityMap.put(bdCumandocEntity.getPkCubasdoc() + bdCumandocEntity.getPkCorp(), bdCumandocEntity); } } + return stringBdCumandocEntityMap; } /** * 初始化存货管理档案 */ - public static Map stringBdInvmandocEntityMap = new HashMap<>(); +// public static Map stringBdInvmandocEntityMap = new HashMap<>(); + private Map initInventoryFile() throws Exception { + Map stringBdInvmandocEntityMap = new HashMap<>(); - private void initInventoryFile() throws Exception { BdInvmandocEntity bdInvmandocEntity = new BdInvmandocEntity(); // bdInvmandocEntity.setInvcode(copyRowDetailsListVo.getSpec_no()); // bdInvmandocEntity.setPkCorp(shippingCompanyBdCorpEntity.getPkCorp()); @@ -209,15 +237,17 @@ public class TocOrderBasicArchivesCacheUtil { stringBdInvmandocEntityMap.put(bdInvmandocEntity1.getInvcode() + bdInvmandocEntity1.getPkCorp(), bdInvmandocEntity1); } } + return stringBdInvmandocEntityMap; } /** * 初始化存货基本档案 * 2024年8月7日 10:57:55 */ - public static Map stringBdInvbasdocEntityHashMap = new HashMap<>(); +// public static Map stringBdInvbasdocEntityHashMap = new HashMap<>(); + private Map initBasicInventoryFile() throws Exception { + Map stringBdInvbasdocEntityHashMap = new HashMap<>(); - private void initBasicInventoryFile() throws Exception { BdInvbasdocEntity bdInvbasdocEntity = new BdInvbasdocEntity(); // bdInvbasdocEntity.setPk_invmandoc(bdInvmandocEntity1.getPkInvmandoc()); // bdInvbasdocEntity.setPk_corp(shippingCompanyBdCorpEntity.getPkCorp()); @@ -228,6 +258,7 @@ public class TocOrderBasicArchivesCacheUtil { stringBdInvbasdocEntityHashMap.put(bdInvbasdocEntity1.getPk_invmandoc() + bdInvbasdocEntity1.getPk_corp_man(), bdInvbasdocEntity1); } } + return stringBdInvbasdocEntityHashMap; } /** @@ -236,9 +267,10 @@ public class TocOrderBasicArchivesCacheUtil { * * @author liuyang */ - public static Map stringBdTaxitemsEntityHashMap = new HashMap<>(); +// public static Map stringBdTaxitemsEntityHashMap = new HashMap<>(); + private Map initBdTaxitemsEntity() throws Exception { + Map stringBdTaxitemsEntityHashMap = new HashMap<>(); - private void initBdTaxitemsEntity() throws Exception { BdTaxitemsEntity bdTaxitemsEntity = new BdTaxitemsEntity(); List bdTaxitemsEntityList = iBdTaxitemsDao.queryBdInvbasdocByInvcodeV2(bdTaxitemsEntity); if (bdTaxitemsEntityList != null && bdTaxitemsEntityList.size() > 0) { @@ -247,6 +279,8 @@ public class TocOrderBasicArchivesCacheUtil { stringBdTaxitemsEntityHashMap.put(bdTaxitemsEntity1.getInvcode(), bdTaxitemsEntity1); } } + + return stringBdTaxitemsEntityHashMap; } /** @@ -254,9 +288,10 @@ public class TocOrderBasicArchivesCacheUtil { * * @author liuyang */ - public static Map stringBdDefdocEntityHashMap = new HashMap<>(); +// public static Map stringBdDefdocEntityHashMap = new HashMap<>(); + private Map initSourcePlatform() { + Map stringBdDefdocEntityHashMap = new HashMap<>(); - private void initSourcePlatform() { BdDefdocEntity bdDefdocEntity = new BdDefdocEntity(); bdDefdocEntity.setPkDefdoclist("0001A210000000000JUD"); bdDefdocEntity.setDr(0); @@ -268,14 +303,16 @@ public class TocOrderBasicArchivesCacheUtil { stringBdDefdocEntityHashMap.put(bdDefdocEntity1.getDoccode(), bdDefdocEntity1); } } + return stringBdDefdocEntityHashMap; } /** * 2024年8月14日 15:17:48 缓存U8C店铺自定义档案逻辑 */ - public static Map shopDefdocEntityHashMap = new HashMap<>(); +// public static Map shopDefdocEntityHashMap = new HashMap<>(); + private Map initShopDiy() { + Map shopDefdocEntityHashMap = new HashMap<>(); - private void initShopDiy() { BdDefdocEntity bdDefdocEntity = new BdDefdocEntity(); bdDefdocEntity.setPkDefdoclist("0001A210000000000XZX"); bdDefdocEntity.setDr(0); @@ -287,6 +324,25 @@ public class TocOrderBasicArchivesCacheUtil { shopDefdocEntityHashMap.put(bdDefdocEntity1.getDoccode(), bdDefdocEntity1); } } + return shopDefdocEntityHashMap; + } + + /** + * 初始化收发类别 + */ + private Map initBdRdcl() { + Map stringBdRdclEntityHashMap = new HashMap<>(); + BdRdclEntity bdRdclEntity = new BdRdclEntity(); + bdRdclEntity.setDr(0); + bdRdclEntity.setDataSourceCode("lets_u8c"); + List bdRdclEntityList = iBdRdclDao.query(bdRdclEntity); + if (bdRdclEntityList != null && bdRdclEntityList.size() > 0) { + for (int i = 0; i < bdRdclEntityList.size(); i++) { + BdRdclEntity bdRdclEntity1 = bdRdclEntityList.get(i); + stringBdRdclEntityHashMap.put(bdRdclEntity1.getRdcode(), bdRdclEntity1); + } + } + return stringBdRdclEntityHashMap; } /** @@ -294,40 +350,61 @@ public class TocOrderBasicArchivesCacheUtil { * * @author liuyang */ - public void clearCache() throws Exception { - stringBdCorpEntityMap.clear(); - stringBdStordocEntityMap.clear(); - stringBdCalbodyEntityMap.clear(); - stringBdSalestruEntityMap.clear(); - stringBdDeptdocEntityMap.clear(); - stringBdCumandocEntityMap.clear(); - stringBdInvmandocEntityMap.clear(); - stringBdInvbasdocEntityHashMap.clear(); - stringBdTaxitemsEntityHashMap.clear(); - stringBdCubasdocEntityHashMap.clear(); - stringBdDefdocEntityHashMap.clear(); - shopDefdocEntityHashMap.clear(); - } +// public void clearCache() throws Exception { +// stringBdCorpEntityMap.clear(); +// stringBdStordocEntityMap.clear(); +// stringBdCalbodyEntityMap.clear(); +// stringBdSalestruEntityMap.clear(); +// stringBdDeptdocEntityMap.clear(); +// stringBdCumandocEntityMap.clear(); +// stringBdInvmandocEntityMap.clear(); +// stringBdInvbasdocEntityHashMap.clear(); +// stringBdTaxitemsEntityHashMap.clear(); +// stringBdCubasdocEntityHashMap.clear(); +// stringBdDefdocEntityHashMap.clear(); +// shopDefdocEntityHashMap.clear(); +// } /** * 初始化缓存 * * @author liuyang */ - public void initCache() throws Exception { - clearCache(); + public CacheTocMapVo initCache() throws Exception { +// clearCache(); - initShop(); - initBdStordoc(); - initBdCalbody(); - initBdSalestru(); - initDept(); - initBdCumandoc(); - initInventoryFile(); - initBasicInventoryFile(); - initBdTaxitemsEntity(); - initBdCubasdoc(); - initSourcePlatform(); - initShopDiy(); + long startMillis = System.currentTimeMillis(); + logger.info("初始化缓存开始"); + Map stringBdCorpEntityMap = initShop(); + Map stringBdStordocEntityMap = initBdStordoc(); + Map stringBdCalbodyEntityMap = initBdCalbody(); + Map stringBdSalestruEntityMap = initBdSalestru(); + Map stringBdDeptdocEntityMap = initDept(); + Map stringBdCumandocEntityMap = initBdCumandoc(); + Map stringBdInvmandocEntityMap = initInventoryFile(); + Map stringBdInvbasdocEntityMap = initBasicInventoryFile(); + Map stringBdTaxitemsEntityMap = initBdTaxitemsEntity(); + Map stringBdCubasdocEntityMap = initBdCubasdoc(); + Map stringBdDefdocEntityMap = initSourcePlatform(); + Map stringBdDefdocEntityMap1 = initShopDiy(); + Map stringBdRdclEntityMap = initBdRdcl(); + long endMillis = System.currentTimeMillis(); + logger.info("初始化缓存完成 耗时:{}", (endMillis - startMillis)); + + CacheTocMapVo cacheTocMapVo = new CacheTocMapVo(); + cacheTocMapVo.setStringBdCorpEntityMap(stringBdCorpEntityMap); + cacheTocMapVo.setStringBdStordocEntityMap(stringBdStordocEntityMap); + cacheTocMapVo.setStringBdCalbodyEntityMap(stringBdCalbodyEntityMap); + cacheTocMapVo.setStringBdSalestruEntityMap(stringBdSalestruEntityMap); + cacheTocMapVo.setStringBdDeptdocEntityMap(stringBdDeptdocEntityMap); + cacheTocMapVo.setStringBdCumandocEntityMap(stringBdCumandocEntityMap); + cacheTocMapVo.setStringBdInvmandocEntityMap(stringBdInvmandocEntityMap); + cacheTocMapVo.setStringBdInvbasdocEntityMap(stringBdInvbasdocEntityMap); + cacheTocMapVo.setStringBdTaxitemsEntityMap(stringBdTaxitemsEntityMap); + cacheTocMapVo.setStringBdCubasdocEntityMap(stringBdCubasdocEntityMap); + cacheTocMapVo.setStringBdDefdocPlatformEntityMap(stringBdDefdocEntityMap); + cacheTocMapVo.setStringBdDefdocShopEntityMap(stringBdDefdocEntityMap1); + cacheTocMapVo.setStringBdRdclEntityMap(stringBdRdclEntityMap); + return cacheTocMapVo; } } \ No newline at end of file diff --git a/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToCTest.java b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToCTest.java index 7dd75fe2..cf3d54ce 100644 --- a/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToCTest.java +++ b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToCTest.java @@ -32,10 +32,10 @@ class SoSaleOutPluginInitializerToCTest { try { // QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); -// queryOfsSoSaleOutVo.setCode("LETS-SO2024070500000001"); + soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024081500000001"); // soSaleOutPluginInitializerToC.getOfsOrder(queryOfsSoSaleOutVo, 1L); - soSaleOutPluginInitializerToC.startImplement("2024-04-28 00:00:00", "2024-04-28 23:59:59"); +// soSaleOutPluginInitializerToC.startImplement("2024-04-28 00:00:00", "2024-04-28 23:59:59"); } catch (Exception e) { e.printStackTrace(); } diff --git a/service/src/main/java/com/hzya/frame/ttxofs/dto/ofssaleorderoutsearch/DetailsDto.java b/service/src/main/java/com/hzya/frame/ttxofs/dto/ofssaleorderoutsearch/DetailsDto.java index 794bce9b..d7ec85fa 100755 --- a/service/src/main/java/com/hzya/frame/ttxofs/dto/ofssaleorderoutsearch/DetailsDto.java +++ b/service/src/main/java/com/hzya/frame/ttxofs/dto/ofssaleorderoutsearch/DetailsDto.java @@ -34,9 +34,6 @@ public class DetailsDto { private String createdBy; private String lastUpdated; private String lastUpdatedBy; - - /** - * 表头对象 - */ + //表头对象 private HeaderDto headerDto; } \ No newline at end of file diff --git a/service/src/main/java/com/hzya/frame/ttxofs/dto/ofssaleorderoutsearch/HeaderDto.java b/service/src/main/java/com/hzya/frame/ttxofs/dto/ofssaleorderoutsearch/HeaderDto.java index 029839d3..80800a22 100755 --- a/service/src/main/java/com/hzya/frame/ttxofs/dto/ofssaleorderoutsearch/HeaderDto.java +++ b/service/src/main/java/com/hzya/frame/ttxofs/dto/ofssaleorderoutsearch/HeaderDto.java @@ -68,13 +68,9 @@ public class HeaderDto { private String tradeSuccessAt; private String sourceOrderStatus; - /** - * 发货日期 - */ + //发货日期 private String shipAt; - /** - * 出库类型 - */ + //出库类型 private String shipmentType; } \ No newline at end of file