提交TOC代码到本地

This commit is contained in:
liuy 2024-08-08 09:52:22 +08:00
parent 30d5c9a4af
commit 913889998e
21 changed files with 1245 additions and 212 deletions

View File

@ -3,6 +3,8 @@ package com.hzya.frame.plugin.lets.dao;
import com.hzya.frame.basedao.dao.IBaseDao; import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.plugin.lets.entity.BdInvbasdocEntity; import com.hzya.frame.plugin.lets.entity.BdInvbasdocEntity;
import java.util.List;
/** /**
* (bd_invbasdoc: table)表数据库访问层 * (bd_invbasdoc: table)表数据库访问层
* *
@ -18,5 +20,11 @@ public interface IBdInvbasdocDao extends IBaseDao<BdInvbasdocEntity, String> {
*/ */
BdInvbasdocEntity queryBdInvbasdocByPkInvmandoc(BdInvbasdocEntity bdInvbasdocEntity) throws Exception; BdInvbasdocEntity queryBdInvbasdocByPkInvmandoc(BdInvbasdocEntity bdInvbasdocEntity) throws Exception;
/**
* 查询存货基础档案
*
* @author liuyang
*/
List<BdInvbasdocEntity> queryBdInvbasdocByPkInvmandocV2(BdInvbasdocEntity bdInvbasdocEntity) throws Exception;
} }

View File

@ -3,6 +3,8 @@ package com.hzya.frame.plugin.lets.dao;
import com.hzya.frame.basedao.dao.IBaseDao; import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.plugin.lets.entity.BdInvmandocEntity; import com.hzya.frame.plugin.lets.entity.BdInvmandocEntity;
import java.util.List;
/** /**
* (bd_invmandoc: table)表数据库访问层 * (bd_invmandoc: table)表数据库访问层
* *
@ -17,4 +19,11 @@ public interface IBdInvmandocDao extends IBaseDao<BdInvmandocEntity, String> {
* @author liuyang * @author liuyang
*/ */
BdInvmandocEntity queryBdInvmandocByInvcode(BdInvmandocEntity bdInvmandocEntity) throws Exception; BdInvmandocEntity queryBdInvmandocByInvcode(BdInvmandocEntity bdInvmandocEntity) throws Exception;
/**
* 根据存货编码查询存货管理档案
*
* @author liuyang
*/
List<BdInvmandocEntity> queryBdInvmandocByInvcodeList(BdInvmandocEntity bdInvmandocEntity) throws Exception;
} }

View File

@ -3,6 +3,8 @@ package com.hzya.frame.plugin.lets.dao;
import com.hzya.frame.basedao.dao.IBaseDao; import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.plugin.lets.entity.BdTaxitemsEntity; import com.hzya.frame.plugin.lets.entity.BdTaxitemsEntity;
import java.util.List;
/** /**
* (bd_taxitems: table)表数据库访问层 * (bd_taxitems: table)表数据库访问层
* *
@ -17,4 +19,11 @@ public interface IBdTaxitemsDao extends IBaseDao<BdTaxitemsEntity, String> {
* @author liuyang * @author liuyang
*/ */
BdTaxitemsEntity queryBdInvbasdocByInvcode(BdTaxitemsEntity bdTaxitemsEntity) throws Exception; BdTaxitemsEntity queryBdInvbasdocByInvcode(BdTaxitemsEntity bdTaxitemsEntity) throws Exception;
/**
* 根据存货编码查询税率
*
* @author liuyang
*/
List<BdTaxitemsEntity> queryBdInvbasdocByInvcodeV2(BdTaxitemsEntity bdTaxitemsEntity) throws Exception;
} }

View File

@ -6,6 +6,8 @@ import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.plugin.lets.dao.IBdInvbasdocDao; import com.hzya.frame.plugin.lets.dao.IBdInvbasdocDao;
import com.hzya.frame.plugin.lets.entity.BdInvbasdocEntity; import com.hzya.frame.plugin.lets.entity.BdInvbasdocEntity;
import java.util.List;
/** /**
* (BdInvbasdoc)表数据库访问层 * (BdInvbasdoc)表数据库访问层
* *
@ -24,4 +26,14 @@ public class BdInvbasdocDaoImpl extends MybatisGenericDao<BdInvbasdocEntity, Str
return query(bdInvbasdocEntity, "com.hzya.frame.plugin.lets.dao.impl.BdInvbasdocDaoImpl.queryBdInvbasdocByPkInvmandoc"); return query(bdInvbasdocEntity, "com.hzya.frame.plugin.lets.dao.impl.BdInvbasdocDaoImpl.queryBdInvbasdocByPkInvmandoc");
} }
@Override
public List<BdInvbasdocEntity> queryBdInvbasdocByPkInvmandocV2(BdInvbasdocEntity bdInvbasdocEntity) throws Exception {
Assert.notNull(bdInvbasdocEntity, "BdInvmandocEntity不可为空");
// Assert.notNull(bdInvbasdocEntity.getPk_invmandoc(), "pkInvmandoc不可为空");
// Assert.notNull(bdInvbasdocEntity.getPk_corp(), "存货管理档案公司主键不能为空");
List<BdInvbasdocEntity> bdInvbasdocEntities = queryList(bdInvbasdocEntity, "com.hzya.frame.plugin.lets.dao.impl.BdInvbasdocDaoImpl.queryBdInvbasdocByPkInvmandoc");
return bdInvbasdocEntities;
}
} }

View File

@ -16,12 +16,12 @@ import java.util.List;
*/ */
//@Repository("BdInvmandocDaoImpl") //@Repository("BdInvmandocDaoImpl")
public class BdInvmandocDaoImpl extends MybatisGenericDao<BdInvmandocEntity, String> implements IBdInvmandocDao { public class BdInvmandocDaoImpl extends MybatisGenericDao<BdInvmandocEntity, String> implements IBdInvmandocDao {
@DS("sowow_sqlserver_test") @DS("lets_u8c")
@Override @Override
public BdInvmandocEntity queryBdInvmandocByInvcode(BdInvmandocEntity bdInvmandocEntity) throws Exception { public BdInvmandocEntity queryBdInvmandocByInvcode(BdInvmandocEntity bdInvmandocEntity) throws Exception {
Assert.notNull(bdInvmandocEntity, "bdInvmandocEntity must not be null"); Assert.notNull(bdInvmandocEntity, "bdInvmandocEntity must not be null");
// Assert.notNull(bdInvmandocEntity.getInvcode(), "存货档案编码不能为空"); // Assert.notNull(bdInvmandocEntity.getInvcode(), "存货档案编码不能为空");
Assert.notNull(bdInvmandocEntity.getPkCorp(), "存货档案所属企业id不能为空"); // Assert.notNull(bdInvmandocEntity.getPkCorp(), "存货档案所属企业id不能为空");
List<BdInvmandocEntity> bdInvmandocEntityList = query("com.hzya.frame.plugin.lets.dao.impl.BdInvmandocDaoImpl.queryBdInvmandocByInvcode", bdInvmandocEntity); List<BdInvmandocEntity> bdInvmandocEntityList = query("com.hzya.frame.plugin.lets.dao.impl.BdInvmandocDaoImpl.queryBdInvmandocByInvcode", bdInvmandocEntity);
if (bdInvmandocEntityList != null && bdInvmandocEntityList.size() > 0) { if (bdInvmandocEntityList != null && bdInvmandocEntityList.size() > 0) {
@ -29,4 +29,11 @@ public class BdInvmandocDaoImpl extends MybatisGenericDao<BdInvmandocEntity, Str
} }
return null; return null;
} }
@DS("lets_u8c")
@Override
public List<BdInvmandocEntity> queryBdInvmandocByInvcodeList(BdInvmandocEntity bdInvmandocEntity) throws Exception {
Assert.notNull(bdInvmandocEntity, "bdInvmandocEntity must not be null!");
return query("com.hzya.frame.plugin.lets.dao.impl.BdInvmandocDaoImpl.queryBdInvmandocByInvcode", bdInvmandocEntity);
}
} }

View File

@ -15,7 +15,7 @@ import java.util.List;
* @since 2023-08-30 18:32:17 * @since 2023-08-30 18:32:17
*/ */
public class BdTaxitemsDaoImpl extends MybatisGenericDao<BdTaxitemsEntity, String> implements IBdTaxitemsDao { public class BdTaxitemsDaoImpl extends MybatisGenericDao<BdTaxitemsEntity, String> implements IBdTaxitemsDao {
@DS("sowow_sqlserver_test") @DS("lets_u8c")
@Override @Override
public BdTaxitemsEntity queryBdInvbasdocByInvcode(BdTaxitemsEntity bdTaxitemsEntity) throws Exception { public BdTaxitemsEntity queryBdInvbasdocByInvcode(BdTaxitemsEntity bdTaxitemsEntity) throws Exception {
Assert.notNull(bdTaxitemsEntity, "bdTaxitemsEntity不能为空"); Assert.notNull(bdTaxitemsEntity, "bdTaxitemsEntity不能为空");
@ -27,4 +27,11 @@ public class BdTaxitemsDaoImpl extends MybatisGenericDao<BdTaxitemsEntity, Strin
} }
return null; return null;
} }
@DS("lets_u8c")
@Override
public List<BdTaxitemsEntity> queryBdInvbasdocByInvcodeV2(BdTaxitemsEntity bdTaxitemsEntity) throws Exception {
List<BdTaxitemsEntity> bdTaxitemsEntityList = query("com.hzya.frame.plugin.lets.dao.impl.BdTaxitemsDaoImpl.queryBdInvbasdocByInvcodeV2", bdTaxitemsEntity);
return bdTaxitemsEntityList;
}
} }

View File

@ -1,6 +1,7 @@
package com.hzya.frame.plugin.lets.entity; package com.hzya.frame.plugin.lets.entity;
import com.hzya.frame.web.entity.BaseEntity; import com.hzya.frame.web.entity.BaseEntity;
/** /**
* (BdCalbody)实体类 * (BdCalbody)实体类
* *
@ -8,28 +9,28 @@ import com.hzya.frame.web.entity.BaseEntity;
* @since 2023-09-06 17:31:08 * @since 2023-09-06 17:31:08
*/ */
public class BdCalbodyEntity extends BaseEntity { public class BdCalbodyEntity extends BaseEntity {
private Integer aheaddays; private Integer aheaddays;
private String area; private String area;
private String bodycode; private String bodycode;
private String bodyname; private String bodyname;
private String createdate; private String createdate;
private String def1; private String def1;
private String def2; private String def2;
private String def3; private String def3;
private String def4; private String def4;
private String def5; private String def5;
private Integer dr; private Integer dr;
private String isuseretail; private String isuseretail;
private String pkAddress; private String pkAddress;
private String pkAreacl; private String pkAreacl;
private String pkCalbody; private String pkCalbody;
private String pkCorp; private String pkCorp;
private Integer property; private Integer property;
private Double rationmny; private Double rationmny;
private String sealflag; private String sealflag;
private String ts; private String ts;
private String vnote; private String vnote;
public Integer getAheaddays() { public Integer getAheaddays() {

View File

@ -96,6 +96,8 @@
<result property="serialmanaflag" column="serialmanaflag" jdbcType="VARCHAR"/> <result property="serialmanaflag" column="serialmanaflag" jdbcType="VARCHAR"/>
<result property="ts" column="ts" jdbcType="VARCHAR"/> <result property="ts" column="ts" jdbcType="VARCHAR"/>
<result property="wholemanaflag" column="wholemanaflag" jdbcType="VARCHAR"/> <result property="wholemanaflag" column="wholemanaflag" jdbcType="VARCHAR"/>
<!--存货编码-->
<result property="invcode" column="invcode" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<!-- 查询的字段--> <!-- 查询的字段-->
<sql id = "BdInvmandocEntity_Base_Column_List"> <sql id = "BdInvmandocEntity_Base_Column_List">
@ -1128,7 +1130,103 @@ update bd_invmandoc set sts= 'N'
<select id="queryBdInvmandocByInvcode" parameterType="com.hzya.frame.plugin.lets.entity.BdInvmandocEntity" resultMap="get-BdInvmandocEntity-result"> <select id="queryBdInvmandocByInvcode" parameterType="com.hzya.frame.plugin.lets.entity.BdInvmandocEntity" resultMap="get-BdInvmandocEntity-result">
select <include refid="BdInvmandocEntity_Base_Column_List"></include> from bd_invmandoc where pk_invbasdoc in ( select
bd_invmandoc.abctype
,bd_invmandoc.accflag
,bd_invmandoc.cinvmnecode
,bd_invmandoc.consumesettleflag
,bd_invmandoc.coopdayfrom
,bd_invmandoc.coopdayto
,bd_invmandoc.costprice
,bd_invmandoc.createtime
,bd_invmandoc.creator
,bd_invmandoc.def1
,bd_invmandoc.def10
,bd_invmandoc.def11
,bd_invmandoc.def12
,bd_invmandoc.def13
,bd_invmandoc.def14
,bd_invmandoc.def15
,bd_invmandoc.def16
,bd_invmandoc.def17
,bd_invmandoc.def18
,bd_invmandoc.def19
,bd_invmandoc.def2
,bd_invmandoc.def20
,bd_invmandoc.def3
,bd_invmandoc.def4
,bd_invmandoc.def5
,bd_invmandoc.def6
,bd_invmandoc.def7
,bd_invmandoc.def8
,bd_invmandoc.def9
,bd_invmandoc.dr
,bd_invmandoc.expaybacktax
,bd_invmandoc.free1
,bd_invmandoc.free2
,bd_invmandoc.free3
,bd_invmandoc.free4
,bd_invmandoc.free5
,bd_invmandoc.grade
,bd_invmandoc.invlifeperiod
,bd_invmandoc.isappendant
,bd_invmandoc.isautoatpcheck
,bd_invmandoc.iscancalculatedinvcost
,bd_invmandoc.iscanpurchased
,bd_invmandoc.iscansaleinvoice
,bd_invmandoc.iscansold
,bd_invmandoc.isconfigable
,bd_invmandoc.isctlprodplanprice
,bd_invmandoc.isfatherofbom
,bd_invmandoc.isinvretfreeofchk
,bd_invmandoc.isinvretinstobychk
,bd_invmandoc.isinvreturned
,bd_invmandoc.isnoconallowed
,bd_invmandoc.isprimarybarcode
,bd_invmandoc.isrecurrentcheck
,bd_invmandoc.issalable
,bd_invmandoc.issecondarybarcode
,bd_invmandoc.isselfapprsupplier
,bd_invmandoc.isspecialty
,bd_invmandoc.issupplierstock
,bd_invmandoc.isused
,bd_invmandoc.isvirtual
,bd_invmandoc.keepwasterate
,bd_invmandoc.lowestprice
,bd_invmandoc.mantaxitem
,bd_invmandoc.maxprice
,bd_invmandoc.memo
,bd_invmandoc.modifier
,bd_invmandoc.modifytime
,bd_invmandoc.negallowed
,bd_invmandoc.outpriority
,bd_invmandoc.outtrackin
,bd_invmandoc.pebegin
,bd_invmandoc.peend
,bd_invmandoc.pk_corp
,bd_invmandoc.pk_cumandoc
,bd_invmandoc.pk_dftfactory
,bd_invmandoc.pk_invbasdoc
,bd_invmandoc.pk_invmandoc
,bd_invmandoc.pk_sealuser
,bd_invmandoc.planprice
,bd_invmandoc.prodarea
,bd_invmandoc.purchasestge
,bd_invmandoc.purwasterate
,bd_invmandoc.qualitydaynum
,bd_invmandoc.qualitymanflag
,bd_invmandoc.qualityperiodunit
,bd_invmandoc.recurrentchkcyc
,bd_invmandoc.refsaleprice
,bd_invmandoc.sealdate
,bd_invmandoc.sealflag
,bd_invmandoc.sellproxyflag
,bd_invmandoc.serialmanaflag
,bd_invmandoc.ts
,bd_invmandoc.wholemanaflag
,bd_invbasdoc.invcode
from bd_invmandoc left join bd_invbasdoc on bd_invbasdoc.pk_invbasdoc = bd_invmandoc.pk_invbasdoc
where bd_invmandoc.pk_invbasdoc in (
select pk_invbasdoc from bd_invbasdoc bib select pk_invbasdoc from bd_invbasdoc bib
where bib.dr = 0 where bib.dr = 0
<if test="invcode!=null and invcode!=''"> <if test="invcode!=null and invcode!=''">
@ -1137,7 +1235,10 @@ update bd_invmandoc set sts= 'N'
<if test="invmnecode!=null and invmnecode!=''"> <if test="invmnecode!=null and invmnecode!=''">
and bib.invmnecode = #{invmnecode} and bib.invmnecode = #{invmnecode}
</if> </if>
) and dr = 0 and pk_corp = #{pkCorp} ) and bd_invmandoc.dr = 0
<if test="pkCorp!=null and pkCorp!=''">
and bd_invmandoc.pk_corp = #{pkCorp}
</if>
</select> </select>
</mapper> </mapper>

View File

@ -22,6 +22,19 @@ public class BdTaxitemsEntity extends BaseEntity {
*/ */
private String invcode; private String invcode;
/**
* 存货档案主键
*/
private String pk_invbasdoc;
public String getPk_invbasdoc() {
return pk_invbasdoc;
}
public void setPk_invbasdoc(String pk_invbasdoc) {
this.pk_invbasdoc = pk_invbasdoc;
}
public String getInvcode() { public String getInvcode() {
return invcode; return invcode;
} }

View File

@ -9,6 +9,8 @@
<result property="taxname" column="taxname" jdbcType="VARCHAR"/> <result property="taxname" column="taxname" jdbcType="VARCHAR"/>
<result property="taxratio" column="taxratio" jdbcType="NUMERIC"/> <result property="taxratio" column="taxratio" jdbcType="NUMERIC"/>
<result property="ts" column="ts" jdbcType="VARCHAR"/> <result property="ts" column="ts" jdbcType="VARCHAR"/>
<result property="pk_invbasdoc" column="pk_invbasdoc" jdbcType="VARCHAR"/>
<result property="invcode" column="invcode" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<!-- 查询的字段--> <!-- 查询的字段-->
<sql id="BdTaxitemsEntity_Base_Column_List"> <sql id="BdTaxitemsEntity_Base_Column_List">
@ -189,5 +191,18 @@
) and dr = 0 ) and dr = 0
</select> </select>
</mapper> <!--查询存货对应的税率-->
<select id="queryBdInvbasdocByInvcodeV2" parameterType="com.hzya.frame.plugin.lets.entity.BdTaxitemsEntity" resultMap="get-BdTaxitemsEntity-result">
SELECT
bd_invbasdoc.pk_invbasdoc,
bd_invbasdoc.invcode,
bd_taxitems.*
FROM
bd_invbasdoc
LEFT JOIN bd_taxitems ON bd_invbasdoc.pk_taxitems = bd_taxitems.pk_taxitems
WHERE
bd_invbasdoc.dr = 0
and bd_taxitems.dr = 0
</select>
</mapper>

View File

@ -134,6 +134,66 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
// this.rootid = rootid; // this.rootid = rootid;
// } // }
private String newTransmitInfo;
private String newPushDate;
private String newState;
private String newSystemNumber;
private String newSystemPrimary;
private String primaryKey;
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() { public String getClientcode() {
return clientcode; return clientcode;
} }

View File

@ -32,6 +32,14 @@
<result property="createdby" column="createdBy" jdbcType="VARCHAR"/> <result property="createdby" column="createdBy" jdbcType="VARCHAR"/>
<result property="lastupdated" column="lastUpdated" jdbcType="VARCHAR"/> <result property="lastupdated" column="lastUpdated" jdbcType="VARCHAR"/>
<result property="lastupdatedby" column="lastUpdatedBy" jdbcType="VARCHAR"/> <result property="lastupdatedby" column="lastUpdatedBy" jdbcType="VARCHAR"/>
<result property="newTransmitInfo" column="newTransmitInfo" jdbcType="VARCHAR"/>
<result property="newPushDate" column="newPushDate" jdbcType="VARCHAR"/>
<result property="newState" column="newState" jdbcType="VARCHAR"/>
<result property="newSystemNumber" column="newSystemNumber" jdbcType="VARCHAR"/>
<result property="newSystemPrimary" column="newSystemPrimary" jdbcType="VARCHAR"/>
<result property="primaryKey" column="primaryKey" jdbcType="VARCHAR"/>
<result property="businessDate" column="businessDate" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<!-- 查询的字段--> <!-- 查询的字段-->
<sql id = "TocofsSaleoutDetailedEntity_Base_Column_List"> <sql id = "TocofsSaleoutDetailedEntity_Base_Column_List">
@ -62,7 +70,13 @@
,created ,created
,createdBy ,createdBy
,lastUpdated ,lastUpdated
,lastUpdatedBy ,lastUpdatedBy
,newTransmitInfo
,newPushDate
,newState
,newSystemNumber
,newSystemPrimary
,primaryKey
</sql> </sql>
<!-- 查询 采用==查询 --> <!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-TocofsSaleoutDetailedEntity-result" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutDetailedEntity"> <select id="entity_list_base" resultMap="get-TocofsSaleoutDetailedEntity-result" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutDetailedEntity">
@ -99,10 +113,16 @@
<if test="createdby != null and createdby != ''"> and createdBy = #{createdby} </if> <if test="createdby != null and createdby != ''"> and createdBy = #{createdby} </if>
<if test="lastupdated != null and lastupdated != ''"> and lastUpdated = #{lastupdated} </if> <if test="lastupdated != null and lastupdated != ''"> and lastUpdated = #{lastupdated} </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy = #{lastupdatedby} </if> <if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy = #{lastupdatedby} </if>
and sts='Y' -- and sts='Y'
<if test="newTransmitInfo != null and newTransmitInfo != ''"> and newTransmitInfo = #{newTransmitInfo} </if>
<if test="newPushDate != null and newPushDate != ''"> and newPushDate = #{newPushDate} </if>
<if test="newState != null and newState != ''"> and newState = #{newState} </if>
<if test="newSystemNumber != null and newSystemNumber != ''"> and newSystemNumber = #{newSystemNumber} </if>
<if test="newSystemPrimary != null and newSystemPrimary != ''"> and newSystemPrimary = #{newSystemPrimary} </if>
<if test="primaryKey != null and primaryKey != ''"> and primaryKey = #{primaryKey} </if>
</trim> </trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if> <!-- <if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>-->
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if> <!-- <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>-->
</select> </select>
<!-- 查询符合条件的数量 --> <!-- 查询符合条件的数量 -->
@ -138,10 +158,16 @@
<if test="createdby != null and createdby != ''"> and createdBy = #{createdby} </if> <if test="createdby != null and createdby != ''"> and createdBy = #{createdby} </if>
<if test="lastupdated != null and lastupdated != ''"> and lastUpdated = #{lastupdated} </if> <if test="lastupdated != null and lastupdated != ''"> and lastUpdated = #{lastupdated} </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy = #{lastupdatedby} </if> <if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy = #{lastupdatedby} </if>
and sts='Y' -- and sts='Y'
<if test="newTransmitInfo != null and newTransmitInfo != ''"> and newTransmitInfo = #{newTransmitInfo} </if>
<if test="newPushDate != null and newPushDate != ''"> and newPushDate = #{newPushDate} </if>
<if test="newState != null and newState != ''"> and newState = #{newState} </if>
<if test="newSystemNumber != null and newSystemNumber != ''"> and newSystemNumber = #{newSystemNumber} </if>
<if test="newSystemPrimary != null and newSystemPrimary != ''"> and newSystemPrimary = #{newSystemPrimary} </if>
<if test="primaryKey != null and primaryKey != ''"> and primaryKey = #{primaryKey} </if>
</trim> </trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if> <!-- <if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>-->
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if> <!-- <if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>-->
</select> </select>
<!-- 分页查询列表 采用like格式 --> <!-- 分页查询列表 采用like格式 -->
@ -179,10 +205,16 @@
<if test="createdby != null and createdby != ''"> and createdBy like concat('%',#{createdby},'%') </if> <if test="createdby != null and createdby != ''"> and createdBy like concat('%',#{createdby},'%') </if>
<if test="lastupdated != null and lastupdated != ''"> and lastUpdated like concat('%',#{lastupdated},'%') </if> <if test="lastupdated != null and lastupdated != ''"> and lastUpdated like concat('%',#{lastupdated},'%') </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy like concat('%',#{lastupdatedby},'%') </if> <if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy like concat('%',#{lastupdatedby},'%') </if>
and sts='Y' -- and sts='Y'
<if test="newTransmitInfo != null and newTransmitInfo != ''"> and newTransmitInfo like concat('%',#{newTransmitInfo},'%') </if>
<if test="newPushDate != null and newPushDate != ''"> and newPushDate like concat('%',#{newPushDate},'%') </if>
<if test="newState != null and newState != ''"> and newState like concat('%',#{newState},'%') </if>
<if test="newSystemNumber != null and newSystemNumber != ''"> and newSystemNumber like concat('%',#{newSystemNumber},'%') </if>
<if test="newSystemPrimary != null and newSystemPrimary != ''"> and newSystemPrimary like concat('%',#{newSystemPrimary},'%') </if>
<if test="primaryKey != null and primaryKey != ''"> and primaryKey like concat('%',#{primaryKey},'%') </if>
</trim> </trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if> <!-- <if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>-->
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if> <!-- <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>-->
</select> </select>
<!-- 查询列表 字段采用or格式 --> <!-- 查询列表 字段采用or格式 -->
@ -220,108 +252,115 @@
<if test="createdby != null and createdby != ''"> or createdBy = #{createdby} </if> <if test="createdby != null and createdby != ''"> or createdBy = #{createdby} </if>
<if test="lastupdated != null and lastupdated != ''"> or lastUpdated = #{lastupdated} </if> <if test="lastupdated != null and lastupdated != ''"> or lastUpdated = #{lastupdated} </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> or lastUpdatedBy = #{lastupdatedby} </if> <if test="lastupdatedby != null and lastupdatedby != ''"> or lastUpdatedBy = #{lastupdatedby} </if>
and sts='Y' -- and sts='Y'
<if test="newTransmitInfo != null and newTransmitInfo != ''"> or newTransmitInfo = #{newTransmitInfo} </if>
<if test="newPushDate != null and newPushDate != ''"> or newPushDate = #{newPushDate} </if>
<if test="newState != null and newState != ''"> or newState = #{newState} </if>
<if test="newSystemNumber != null and newSystemNumber != ''"> or newSystemNumber = #{newSystemNumber} </if>
<if test="newSystemPrimary != null and newSystemPrimary != ''"> or newSystemPrimary = #{newSystemPrimary} </if>
<if test="primaryKey != null and primaryKey != ''"> or primaryKey = #{primaryKey} </if>
</trim> </trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if> <!-- <if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>-->
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if> <!-- <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>-->
</select> </select>
<!--新增所有列--> <!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutDetailedEntity" keyProperty="rootid" useGeneratedKeys="true"> <!--<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutDetailedEntity" keyProperty="rootid" useGeneratedKeys="true">-->
insert into tocofs_saleout_detailed( <!-- insert into tocofs_saleout_detailed(-->
<trim suffix="" suffixOverrides=","> <!-- <trim suffix="" suffixOverrides=",">-->
-- <if test="rootid != null"> rootId , </if> <!--&#45;&#45; <if test="rootid != null"> rootId , </if>-->
<if test="clientcode != null and clientcode != ''"> clientCode , </if> <!-- <if test="clientcode != null and clientcode != ''"> clientCode , </if>-->
<if test="companycode != null and companycode != ''"> companyCode , </if> <!-- <if test="companycode != null and companycode != ''"> companyCode , </if>-->
<if test="facilitycode != null and facilitycode != ''"> facilityCode , </if> <!-- <if test="facilitycode != null and facilitycode != ''"> facilityCode , </if>-->
<if test="shipmentcode != null and shipmentcode != ''"> shipmentCode , </if> <!-- <if test="shipmentcode != null and shipmentcode != ''"> shipmentCode , </if>-->
<if test="reforderid != null"> refOrderId , </if> <!-- <if test="reforderid != null"> refOrderId , </if>-->
<if test="reforderdetailid != null"> refOrderDetailId , </if> <!-- <if test="reforderdetailid != null"> refOrderDetailId , </if>-->
<if test="refordercode != null and refordercode != ''"> refOrderCode , </if> <!-- <if test="refordercode != null and refordercode != ''"> refOrderCode , </if>-->
<if test="allocinvid != null"> allocInvId , </if> <!-- <if test="allocinvid != null"> allocInvId , </if>-->
<if test="skucode != null and skucode != ''"> skuCode , </if> <!-- <if test="skucode != null and skucode != ''"> skuCode , </if>-->
<if test="skuname != null and skuname != ''"> skuName , </if> <!-- <if test="skuname != null and skuname != ''"> skuName , </if>-->
<if test="sourceordercode != null and sourceordercode != ''"> sourceOrderCode , </if> <!-- <if test="sourceordercode != null and sourceordercode != ''"> sourceOrderCode , </if>-->
<if test="inventorysts != null and inventorysts != ''"> inventorySts , </if> <!-- <if test="inventorysts != null and inventorysts != ''"> inventorySts , </if>-->
<if test="isgift != null"> isGift , </if> <!-- <if test="isgift != null"> isGift , </if>-->
<if test="requestqty != null"> requestQty , </if> <!-- <if test="requestqty != null"> requestQty , </if>-->
<if test="shipqty != null"> shipQty , </if> <!-- <if test="shipqty != null"> shipQty , </if>-->
<if test="quantityum != null and quantityum != ''"> quantityUM , </if> <!-- <if test="quantityum != null and quantityum != ''"> quantityUM , </if>-->
<if test="listprice != null"> listPrice , </if> <!-- <if test="listprice != null"> listPrice , </if>-->
<if test="itemtotalamount != null"> itemTotalAmount , </if> <!-- <if test="itemtotalamount != null"> itemTotalAmount , </if>-->
<if test="totalpayamount != null"> totalPayAmount , </if> <!-- <if test="totalpayamount != null"> totalPayAmount , </if>-->
<if test="totalweight != null"> totalWeight , </if> <!-- <if test="totalweight != null"> totalWeight , </if>-->
<if test="totalvolume != null"> totalVolume , </if> <!-- <if test="totalvolume != null"> totalVolume , </if>-->
<if test="totalvolumeweight != null"> totalVolumeWeight , </if> <!-- <if test="totalvolumeweight != null"> totalVolumeWeight , </if>-->
<if test="weightum != null and weightum != ''"> weightUM , </if> <!-- <if test="weightum != null and weightum != ''"> weightUM , </if>-->
<if test="volumeum != null and volumeum != ''"> volumeUM , </if> <!-- <if test="volumeum != null and volumeum != ''"> volumeUM , </if>-->
<if test="created != null and created != ''"> created , </if> <!-- <if test="created != null and created != ''"> created , </if>-->
<if test="createdby != null and createdby != ''"> createdBy , </if> <!-- <if test="createdby != null and createdby != ''"> createdBy , </if>-->
<if test="lastupdated != null and lastupdated != ''"> lastUpdated , </if> <!-- <if test="lastupdated != null and lastupdated != ''"> lastUpdated , </if>-->
<if test="lastupdatedby != null and lastupdatedby != ''"> lastUpdatedBy , </if> <!-- <if test="lastupdatedby != null and lastupdatedby != ''"> lastUpdatedBy , </if>-->
<if test="sorts == null ">sorts,</if> <!-- <if test="sorts == null ">sorts,</if>-->
<if test="sts == null ">sts,</if> <!-- <if test="sts == null ">sts,</if>-->
</trim> <!-- </trim>-->
)values( <!-- )values(-->
<trim suffix="" suffixOverrides=","> <!-- <trim suffix="" suffixOverrides=",">-->
-- <if test="rootid != null"> #{rootid} ,</if> <!--&#45;&#45; <if test="rootid != null"> #{rootid} ,</if>-->
<if test="clientcode != null and clientcode != ''"> #{clientcode} ,</if> <!-- <if test="clientcode != null and clientcode != ''"> #{clientcode} ,</if>-->
<if test="companycode != null and companycode != ''"> #{companycode} ,</if> <!-- <if test="companycode != null and companycode != ''"> #{companycode} ,</if>-->
<if test="facilitycode != null and facilitycode != ''"> #{facilitycode} ,</if> <!-- <if test="facilitycode != null and facilitycode != ''"> #{facilitycode} ,</if>-->
<if test="shipmentcode != null and shipmentcode != ''"> #{shipmentcode} ,</if> <!-- <if test="shipmentcode != null and shipmentcode != ''"> #{shipmentcode} ,</if>-->
<if test="reforderid != null"> #{reforderid} ,</if> <!-- <if test="reforderid != null"> #{reforderid} ,</if>-->
<if test="reforderdetailid != null"> #{reforderdetailid} ,</if> <!-- <if test="reforderdetailid != null"> #{reforderdetailid} ,</if>-->
<if test="refordercode != null and refordercode != ''"> #{refordercode} ,</if> <!-- <if test="refordercode != null and refordercode != ''"> #{refordercode} ,</if>-->
<if test="allocinvid != null"> #{allocinvid} ,</if> <!-- <if test="allocinvid != null"> #{allocinvid} ,</if>-->
<if test="skucode != null and skucode != ''"> #{skucode} ,</if> <!-- <if test="skucode != null and skucode != ''"> #{skucode} ,</if>-->
<if test="skuname != null and skuname != ''"> #{skuname} ,</if> <!-- <if test="skuname != null and skuname != ''"> #{skuname} ,</if>-->
<if test="sourceordercode != null and sourceordercode != ''"> #{sourceordercode} ,</if> <!-- <if test="sourceordercode != null and sourceordercode != ''"> #{sourceordercode} ,</if>-->
<if test="inventorysts != null and inventorysts != ''"> #{inventorysts} ,</if> <!-- <if test="inventorysts != null and inventorysts != ''"> #{inventorysts} ,</if>-->
<if test="isgift != null"> #{isgift} ,</if> <!-- <if test="isgift != null"> #{isgift} ,</if>-->
<if test="requestqty != null"> #{requestqty} ,</if> <!-- <if test="requestqty != null"> #{requestqty} ,</if>-->
<if test="shipqty != null"> #{shipqty} ,</if> <!-- <if test="shipqty != null"> #{shipqty} ,</if>-->
<if test="quantityum != null and quantityum != ''"> #{quantityum} ,</if> <!-- <if test="quantityum != null and quantityum != ''"> #{quantityum} ,</if>-->
<if test="listprice != null"> #{listprice} ,</if> <!-- <if test="listprice != null"> #{listprice} ,</if>-->
<if test="itemtotalamount != null"> #{itemtotalamount} ,</if> <!-- <if test="itemtotalamount != null"> #{itemtotalamount} ,</if>-->
<if test="totalpayamount != null"> #{totalpayamount} ,</if> <!-- <if test="totalpayamount != null"> #{totalpayamount} ,</if>-->
<if test="totalweight != null"> #{totalweight} ,</if> <!-- <if test="totalweight != null"> #{totalweight} ,</if>-->
<if test="totalvolume != null"> #{totalvolume} ,</if> <!-- <if test="totalvolume != null"> #{totalvolume} ,</if>-->
<if test="totalvolumeweight != null"> #{totalvolumeweight} ,</if> <!-- <if test="totalvolumeweight != null"> #{totalvolumeweight} ,</if>-->
<if test="weightum != null and weightum != ''"> #{weightum} ,</if> <!-- <if test="weightum != null and weightum != ''"> #{weightum} ,</if>-->
<if test="volumeum != null and volumeum != ''"> #{volumeum} ,</if> <!-- <if test="volumeum != null and volumeum != ''"> #{volumeum} ,</if>-->
<if test="created != null and created != ''"> #{created} ,</if> <!-- <if test="created != null and created != ''"> #{created} ,</if>-->
<if test="createdby != null and createdby != ''"> #{createdby} ,</if> <!-- <if test="createdby != null and createdby != ''"> #{createdby} ,</if>-->
<if test="lastupdated != null and lastupdated != ''"> #{lastupdated} ,</if> <!-- <if test="lastupdated != null and lastupdated != ''"> #{lastupdated} ,</if>-->
<if test="lastupdatedby != null and lastupdatedby != ''"> #{lastupdatedby} ,</if> <!-- <if test="lastupdatedby != null and lastupdatedby != ''"> #{lastupdatedby} ,</if>-->
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from tocofs_saleout_detailed a WHERE a.sts = 'Y' ),</if> <!-- <if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from tocofs_saleout_detailed a WHERE a.sts = 'Y' ),</if>-->
<if test="sts == null ">'Y',</if> <!-- <if test="sts == null ">'Y',</if>-->
</trim> <!-- </trim>-->
) <!-- ) -->
</insert> <!--</insert>-->
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="rootid" useGeneratedKeys="true"> <!--<insert id="entityInsertBatch" keyProperty="rootid" useGeneratedKeys="true">-->
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, sts) <!-- 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, sts) -->
values <!-- values-->
<foreach collection="entities" item="entity" separator=","> <!-- <foreach collection="entities" item="entity" separator=",">-->
(#{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}, 'Y') <!-- (#{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}, 'Y')-->
</foreach> <!-- </foreach>-->
</insert> <!--</insert>-->
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="entityInsertBatchV2" keyProperty="refOrderDetailId" useGeneratedKeys="true"> <insert id="entityInsertBatchV2" keyProperty="refOrderDetailId" useGeneratedKeys="true">
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) 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)
values values
<foreach collection="list" item="entity" separator=","> <foreach collection="list" item="entity" separator=",">
(#{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.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})
</foreach> </foreach>
</insert> </insert>
<!-- 批量新增或者修改--> <!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="rootid" useGeneratedKeys="true"> <insert id="entityInsertOrUpdateBatch" keyProperty="rootid" useGeneratedKeys="true">
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) 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)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{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.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})
</foreach> </foreach>
on duplicate key update on duplicate key update
clientCode = values(clientCode), clientCode = values(clientCode),
@ -351,7 +390,14 @@
created = values(created), created = values(created),
createdBy = values(createdBy), createdBy = values(createdBy),
lastUpdated = values(lastUpdated), lastUpdated = values(lastUpdated),
lastUpdatedBy = values(lastUpdatedBy)</insert> lastUpdatedBy = values(lastUpdatedBy),
newTransmitInfo = values(newTransmitInfo),
newPushDate = values(newPushDate),
newState = values(newState),
newSystemNumber = values(newSystemNumber),
newSystemPrimary = values(newSystemPrimary),
primaryKey = values(primaryKey)
</insert>
<!--通过主键修改方法--> <!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutDetailedEntity" > <update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutDetailedEntity" >
update tocofs_saleout_detailed set update tocofs_saleout_detailed set
@ -384,6 +430,12 @@ update tocofs_saleout_detailed set
<if test="createdby != null and createdby != ''"> createdBy = #{createdby},</if> <if test="createdby != null and createdby != ''"> createdBy = #{createdby},</if>
<if test="lastupdated != null and lastupdated != ''"> lastUpdated = #{lastupdated},</if> <if test="lastupdated != null and lastupdated != ''"> lastUpdated = #{lastupdated},</if>
<if test="lastupdatedby != null and lastupdatedby != ''"> lastUpdatedBy = #{lastupdatedby},</if> <if test="lastupdatedby != null and lastupdatedby != ''"> lastUpdatedBy = #{lastupdatedby},</if>
<if test="newTransmitInfo != null and newTransmitInfo != ''"> newTransmitInfo = #{newTransmitInfo},</if>
<if test="newPushDate != null and newPushDate != ''"> newPushDate = #{newPushDate},</if>
<if test="newState != null and newState != ''"> newState = #{newState},</if>
<if test="newSystemNumber != null and newSystemNumber != ''"> newSystemNumber = #{newSystemNumber},</if>
<if test="newSystemPrimary != null and newSystemPrimary != ''"> newSystemPrimary = #{newSystemPrimary},</if>
<if test="primaryKey != null and primaryKey != ''"> primaryKey = #{primaryKey},</if>
</trim> </trim>
where rootId = #{rootid} where rootId = #{rootid}
</update> </update>
@ -425,8 +477,14 @@ update tocofs_saleout_detailed set sts= 'N' ,modify_time = #{modify_time},modif
<if test="createdby != null and createdby != ''"> and createdBy = #{createdby} </if> <if test="createdby != null and createdby != ''"> and createdBy = #{createdby} </if>
<if test="lastupdated != null and lastupdated != ''"> and lastUpdated = #{lastupdated} </if> <if test="lastupdated != null and lastupdated != ''"> and lastUpdated = #{lastupdated} </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy = #{lastupdatedby} </if> <if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy = #{lastupdatedby} </if>
and sts='Y' -- and sts='Y'
</trim> <if test="newTransmitInfo != null and newTransmitInfo != ''"> and newTransmitInfo = #{newTransmitInfo} </if>
<if test="newPushDate != null and newPushDate != ''"> and newPushDate = #{newPushDate} </if>
<if test="newState != null and newState != ''"> and newState = #{newState} </if>
<if test="newSystemNumber != null and newSystemNumber != ''"> and newSystemNumber = #{newSystemNumber} </if>
<if test="newSystemPrimary != null and newSystemPrimary != ''"> and newSystemPrimary = #{newSystemPrimary} </if>
<if test="primaryKey != null and primaryKey != ''"> and primaryKey = #{primaryKey} </if>
</trim>
</update> </update>
<!--通过主键删除--> <!--通过主键删除-->
<delete id="entity_delete"> <delete id="entity_delete">

View File

@ -225,6 +225,18 @@ public class TocofsSaleoutEntity extends BaseEntity {
*/ */
private String shiptodistrictname; private String shiptodistrictname;
/**
* 发货时间
*/
private String shipAt;
public String getShipAt() {
return shipAt;
}
public void setShipAt(String shipAt) {
this.shipAt = shipAt;
}
public String getClientcode() { public String getClientcode() {
return clientcode; return clientcode;

View File

@ -63,6 +63,8 @@
<result property="shiptostatename" column="shipToStateName" jdbcType="VARCHAR"/> <result property="shiptostatename" column="shipToStateName" jdbcType="VARCHAR"/>
<result property="shiptocityname" column="shipToCityName" jdbcType="VARCHAR"/> <result property="shiptocityname" column="shipToCityName" jdbcType="VARCHAR"/>
<result property="shiptodistrictname" column="shipToDistrictName" jdbcType="VARCHAR"/> <result property="shiptodistrictname" column="shipToDistrictName" jdbcType="VARCHAR"/>
<result property="shipAt" column="shipAt" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<!-- 查询的字段--> <!-- 查询的字段-->
@ -126,7 +128,8 @@
,taxPaid ,taxPaid
,shipToStateName ,shipToStateName
,shipToCityName ,shipToCityName
,shipToDistrictName ,shipToDistrictName
,shipAt
</sql> </sql>
<!-- 查询 采用==查询 --> <!-- 查询 采用==查询 -->
@ -195,10 +198,11 @@
<if test="shiptostatename != null and shiptostatename != ''"> and shipToStateName = #{shiptostatename} </if> <if test="shiptostatename != null and shiptostatename != ''"> and shipToStateName = #{shiptostatename} </if>
<if test="shiptocityname != null and shiptocityname != ''"> and shipToCityName = #{shiptocityname} </if> <if test="shiptocityname != null and shiptocityname != ''"> and shipToCityName = #{shiptocityname} </if>
<if test="shiptodistrictname != null and shiptodistrictname != ''"> and shipToDistrictName = #{shiptodistrictname} </if> <if test="shiptodistrictname != null and shiptodistrictname != ''"> and shipToDistrictName = #{shiptodistrictname} </if>
and sts='Y' -- and sts='Y'
<if test="shipAt != null and shipAt != ''"> and shipAt = #{shipAt} </if>
</trim> </trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if> <!-- <if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>-->
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if> <!-- <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>-->
</select> </select>
<!-- 查询符合条件的数量 --> <!-- 查询符合条件的数量 -->
@ -265,10 +269,11 @@
<if test="shiptostatename != null and shiptostatename != ''"> and shipToStateName = #{shiptostatename} </if> <if test="shiptostatename != null and shiptostatename != ''"> and shipToStateName = #{shiptostatename} </if>
<if test="shiptocityname != null and shiptocityname != ''"> and shipToCityName = #{shiptocityname} </if> <if test="shiptocityname != null and shiptocityname != ''"> and shipToCityName = #{shiptocityname} </if>
<if test="shiptodistrictname != null and shiptodistrictname != ''"> and shipToDistrictName = #{shiptodistrictname} </if> <if test="shiptodistrictname != null and shiptodistrictname != ''"> and shipToDistrictName = #{shiptodistrictname} </if>
and sts='Y' -- and sts='Y'
<if test="shipAt != null and shipAt != ''"> and shipAt = #{shipAt} </if>
</trim> </trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if> <!-- <if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>-->
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if> <!-- <if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>-->
</select> </select>
<!-- 分页查询列表 采用like格式 --> <!-- 分页查询列表 采用like格式 -->
@ -337,10 +342,11 @@
<if test="shiptostatename != null and shiptostatename != ''"> and shipToStateName like concat('%',#{shiptostatename},'%') </if> <if test="shiptostatename != null and shiptostatename != ''"> and shipToStateName like concat('%',#{shiptostatename},'%') </if>
<if test="shiptocityname != null and shiptocityname != ''"> and shipToCityName like concat('%',#{shiptocityname},'%') </if> <if test="shiptocityname != null and shiptocityname != ''"> and shipToCityName like concat('%',#{shiptocityname},'%') </if>
<if test="shiptodistrictname != null and shiptodistrictname != ''"> and shipToDistrictName like concat('%',#{shiptodistrictname},'%') </if> <if test="shiptodistrictname != null and shiptodistrictname != ''"> and shipToDistrictName like concat('%',#{shiptodistrictname},'%') </if>
and sts='Y' -- and sts='Y'
<if test="shipAt != null and shipAt != ''"> and shipAt like concat('%',#{shipAt},'%') </if>
</trim> </trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if> <!-- <if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>-->
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if> <!-- <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>-->
</select> </select>
<!-- 查询列表 字段采用or格式 --> <!-- 查询列表 字段采用or格式 -->
@ -409,10 +415,11 @@
<if test="shiptostatename != null and shiptostatename != ''"> or shipToStateName = #{shiptostatename} </if> <if test="shiptostatename != null and shiptostatename != ''"> or shipToStateName = #{shiptostatename} </if>
<if test="shiptocityname != null and shiptocityname != ''"> or shipToCityName = #{shiptocityname} </if> <if test="shiptocityname != null and shiptocityname != ''"> or shipToCityName = #{shiptocityname} </if>
<if test="shiptodistrictname != null and shiptodistrictname != ''"> or shipToDistrictName = #{shiptodistrictname} </if> <if test="shiptodistrictname != null and shiptodistrictname != ''"> or shipToDistrictName = #{shiptodistrictname} </if>
and sts='Y' -- and sts='Y'
<if test="shipAt != null and shipAt != ''"> or shipAt = #{shipAt} </if>
</trim> </trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if> <!-- <if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>-->
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if> <!-- <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>-->
</select> </select>
<!--新增所有列--> <!--新增所有列-->
@ -561,19 +568,19 @@
<!-- 批量新增v2 --> <!-- 批量新增v2 -->
<insert id="entityInsertBatchV2" keyProperty="id" useGeneratedKeys="true"> <insert id="entityInsertBatchV2" keyProperty="id" useGeneratedKeys="true">
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) 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 values
<foreach collection="list" item="entity" separator=","> <foreach collection="list" item="entity" separator=",">
(#{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.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})
</foreach> </foreach>
</insert> </insert>
<!-- 批量新增或者修改--> <!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
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) 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 values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{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.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})
</foreach> </foreach>
on duplicate key update on duplicate key update
clientCode = values(clientCode), clientCode = values(clientCode),
@ -634,7 +641,9 @@
taxPaid = values(taxPaid), taxPaid = values(taxPaid),
shipToStateName = values(shipToStateName), shipToStateName = values(shipToStateName),
shipToCityName = values(shipToCityName), shipToCityName = values(shipToCityName),
shipToDistrictName = values(shipToDistrictName)</insert> shipToDistrictName = values(shipToDistrictName),
shipAt = values(shipAt)
</insert>
<!--通过主键修改方法--> <!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutEntity" > <update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutEntity" >

View File

@ -26,6 +26,16 @@ public class QueryOfsSoSaleOutVo {
private Long pageSize; private Long pageSize;
private String code;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getInternalInstructionType() { public String getInternalInstructionType() {
return internalInstructionType; return internalInstructionType;
} }

View File

@ -14,26 +14,30 @@ 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.entity.TocofsSaleoutEntity;
import com.hzya.frame.plugin.lets.ofs.service.ITocofsSaleoutService; import com.hzya.frame.plugin.lets.ofs.service.ITocofsSaleoutService;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo; import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleVo;
import com.hzya.frame.plugin.lets.resultvo.CalculateDateVo; import com.hzya.frame.plugin.lets.resultvo.CalculateDateVo;
import com.hzya.frame.plugin.lets.u8cdto.SaleorderRequestChildrenDto;
import com.hzya.frame.plugin.lets.u8cdto.SaleorderRequestDto;
import com.hzya.frame.plugin.lets.u8cdto.SaleorderRequestParentDto;
import com.hzya.frame.plugin.lets.u8cdto.SonDetailsDto;
import com.hzya.frame.plugin.lets.util.BasicArchivesCacheUtil; import com.hzya.frame.plugin.lets.util.BasicArchivesCacheUtil;
import com.hzya.frame.plugin.lets.util.DateStrUtil; import com.hzya.frame.plugin.lets.util.DateStrUtil;
import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil;
import com.hzya.frame.split.SplitListByCountUtil; import com.hzya.frame.split.SplitListByCountUtil;
import com.hzya.frame.ttxofs.dto.InterfaceParamDto; import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto; import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.DetailsDto;
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto;
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto;
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleReturnMessageDto;
import com.hzya.frame.ttxofs.service.OfsUnifiedService; import com.hzya.frame.ttxofs.service.OfsUnifiedService;
import com.hzya.frame.web.entity.JsonResultEntity; import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.Collectors;
/** /**
* OFS销售出库单(TOC)生成U8C销售订单 * OFS销售出库单(TOC)生成U8C销售订单
@ -97,6 +101,13 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
@Autowired @Autowired
private ITocofsSaleoutDetailedDao iTocofsSaleoutDetailedDao; private ITocofsSaleoutDetailedDao iTocofsSaleoutDetailedDao;
@Autowired
private QueryBdBusitypeUtil queryBdBusitypeUtil;
private static final String NOTHING = "";
private static final String ADD = "+";
/** /**
* 按指定时间拉取 * 按指定时间拉取
* *
@ -116,21 +127,24 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>(); List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setCreated_start("2024-03-27 12:03:30"); queryOfsSoSaleOutVo.setCreated_start("2024-07-05 16:38:00");
queryOfsSoSaleOutVo.setCreated_end("2024-03-27 12:04:00"); queryOfsSoSaleOutVo.setCreated_end("2024-07-05 16:40:30");
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
// queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); // queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
queryOfsSoSaleOutVo.setCompanyCode("LETS"); queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
// queryOfsSoSaleOutVo.setStatus(900L); // queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003");
queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L); queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L);
logger.info("数据返回行数:{}", headerDetailsDtoList.size()); logger.info("数据返回行数:{}", headerDetailsDtoList.size());
if (headerDetailsDtoList.size() > 0) { if (headerDetailsDtoList.size() > 0) {
//保存到mysql //保存到mysql
batchInsert(headerDetailsDtoList); batchInsert(headerDetailsDtoList);
//过滤成功的数据 //过滤成功的数据
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtos = filterData(headerDetailsDtoList);
//执行推送主逻辑 //执行推送主逻辑
implement(headerDetailsDtos);
} else { } else {
logger.info("没有查询到任何数据!不需要同步"); logger.info("没有查询到任何数据!不需要同步");
} }
@ -150,7 +164,21 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
} }
/** /**
* 保存抓取到的数据到mysql底表 * 过滤掉成功的数据
*
* @author liuyang
*/
private List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> filterData(List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList) {
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList1 = new ArrayList<>();
if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) {
//TODO 出库单明细主键需要O返回目前没有已经提需求
headerDetailsDtoList1.addAll(headerDetailsDtoList);
}
return headerDetailsDtoList1;
}
/**
* 保存抓取到的数据到mysql底表如果底表里已经存在则会忽略
* *
* @param headerDetailsDtoList 数据行 * @param headerDetailsDtoList 数据行
*/ */
@ -223,41 +251,165 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
} }
} }
public void queryOfsSaleOrder() throws Exception { // public void queryOfsSaleOrder() throws Exception {
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); // QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setCreated_start("2024-03-27 12:03:30"); // queryOfsSoSaleOutVo.setCreated_start("2024-07-05 16:38:00");
queryOfsSoSaleOutVo.setCreated_end("2024-03-27 12:04:00"); // queryOfsSoSaleOutVo.setCreated_end("2024-07-05 16:40:30");
queryOfsSoSaleOutVo.setClientCode("LETS"); // queryOfsSoSaleOutVo.setClientCode("LETS");
// queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); //// queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
queryOfsSoSaleOutVo.setCompanyCode("LETS"); // queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
// queryOfsSoSaleOutVo.setStatus(900L); //// queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); // queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); // queryOfsSoSaleOutVo.setPageSize(50L);
// queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003");
InterfaceParamDto interfaceParamDto = new InterfaceParamDto(); //
interfaceParamDto.setApi("ofs.shipment.search"); // InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
interfaceParamDto.setData(JSON.toJSONString(queryOfsSoSaleOutVo)); // interfaceParamDto.setApi("ofs.shipment.search");
SaleOutReturnMessageDto saleOutReturnMessageDto = (SaleOutReturnMessageDto) ofsUnifiedService.unified(interfaceParamDto); // interfaceParamDto.setData(JSON.toJSONString(queryOfsSoSaleOutVo));
System.out.println(saleOutReturnMessageDto); // SaleOutReturnMessageDto saleOutReturnMessageDto = (SaleOutReturnMessageDto) ofsUnifiedService.unified(interfaceParamDto);
} // System.out.println(saleOutReturnMessageDto);
// }
/** /**
* 代码同步逻辑 * 代码同步逻辑
*
* @param headerDetailsDtos 查询得到的O出库单对象
* @author liuyang
*/ */
private void implement(List<HeaderDetailsDto> headerDetailsDtoList) { private void implement(List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtos) throws Exception {
if (headerDetailsDtoList.size() > 0) { if (headerDetailsDtos != null && headerDetailsDtos.size() > 0) {
for (HeaderDetailsDto headerDetailsDto : headerDetailsDtoList) { try {
HeaderDto header = headerDetailsDto.getHeader(); // 查询基本档案
List<DetailsDto> details = headerDetailsDto.getDetails(); List<SonDetailsDto> sonDetailsDtoList = queryBasicArchives(headerDetailsDtos);
// 分组汇总
Map<String, List<SonDetailsDto>> summaryDimensionMap = groupSummary(sonDetailsDtoList);
// 查询U8C业务流程
BdBusitypeEntity bdBusitypeEntity = u8cOperationFlow();
//生成业务日期 if (bdBusitypeEntity != null && summaryDimensionMap != null) {
String generateBusinessDate = createGenerateBusinessDate(header); Iterator<Map.Entry<String, List<SonDetailsDto>>> iterator = summaryDimensionMap.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry<String, List<SonDetailsDto>> entry = iterator.next();
String keyGroup = entry.getKey();
List<SonDetailsDto> 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();//客商档案
try { try {
checkArchives(oldValue.get(0));
//生成业务日期
String generateBusinessDate = createGenerateBusinessDate(header);
} catch (Exception e) { SaleorderRequestDto saleorderRequestDto = new SaleorderRequestDto();
logger.error("数据转换过程中抛出异常:{}", e); SaleorderRequestParentDto saleorderRequestParentDto = new SaleorderRequestParentDto();
saleorderRequestParentDto.setDbilldate(generateBusinessDate);//单据日期
saleorderRequestParentDto.setBretinvflag("N");//退货标记
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.setVdef18(keyGroup);//汇总单号=汇总维度
saleorderRequestDto.setParentvo(saleorderRequestParentDto);
List<SaleorderRequestChildrenDto> saleorderRequestChildrenDtoList = new ArrayList<>();
saleorderRequestDto.setChildrenvo(saleorderRequestChildrenDtoList);
//把汇总好的出库单明细行合并成一行
SonDetailsDto sonDetailsDto = groupMergeDetailedRows(oldValue);
//存货管理档案取发货公司的存货管理档案
BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(sonDetailsDto, bdCalbodyEntity.getPkCorp());
//存货基础档案
BdInvbasdocEntity bdInvbasdocEntity = queryStockBasicArchives(bdInvmandocEntity.getPkInvmandoc(), deliverGoodsCorp.getPkCorp());
//根据存货基础档案编码查询当前存货的税率
BdTaxitemsEntity bdTaxitemsEntity1 = queryBdTaxitems(bdInvbasdocEntity.getInvcode());
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());
}
//判断是否为赠品
String isblargessflag = "N";
if (noriginalcursummny.longValue() == 0) {
isblargessflag = "Y";
}
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接口
//记录成功
} catch (Exception e) {
logger.error("TOC业务转换成U8C对象过程中、或者单据推送到U8C出现异常", e);
//记录失败
}
}
} else {
//2024年8月6日 11:28:54此处不记录失败不认为是错误
logger.info("summaryDimensionMap变量或者bdBusitypeEntity变量为空因此主要的推送逻辑不会被执行");
} }
} catch (Exception e) {
logger.error("外层转换逻辑抛出异常", e);
// 记录失败
} }
} }
} }
@ -268,10 +420,10 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
* *
* @author liuyang * @author liuyang
*/ */
private String createGenerateBusinessDate(HeaderDto headerDto) { private String createGenerateBusinessDate(com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto header) {
if (headerDto != null && headerDto.getShipAt() != null) { if (header != null && header.getShipAt() != null) {
//TOC以出库日期作为业务日期 //TOC以出库日期作为业务日期
String shipAt = headerDto.getShipAt(); String shipAt = header.getShipAt();
String businessFormat = null; String businessFormat = null;
try { try {
Date dbill = DateUtil.parse(shipAt); Date dbill = DateUtil.parse(shipAt);
@ -282,8 +434,8 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
} }
return businessFormat; return businessFormat;
} else { } else {
logger.error("生成出库日期失败或者shipAt为空! json{}", JSON.toJSON(headerDto)); logger.error("生成出库日期失败或者shipAt为空! json{}", JSON.toJSON(header));
Assert.state(false, "生成出库日期失败或者shipAt为空! json{}", JSON.toJSON(headerDto)); Assert.state(false, "生成出库日期失败或者shipAt为空! json{}", JSON.toJSON(header));
return null; return null;
} }
} }
@ -293,34 +445,79 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
* *
* @author liuyang * @author liuyang
*/ */
private void queryBasicArchives(List<HeaderDetailsDto> headerDetailsDtoList) { private List<SonDetailsDto> queryBasicArchives(List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList) {
if (headerDetailsDtoList.size() > 0) { List<SonDetailsDto> sonDetailsDtoList = new ArrayList<>();
if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) {
try { try {
//初始化档案缓存 //初始化档案缓存
basicArchivesCacheUtil.initCache(); basicArchivesCacheUtil.initCache();
for (int i = 0; i < headerDetailsDtoList.size(); i++) { for (int i = 0; i < headerDetailsDtoList.size(); i++) {
HeaderDetailsDto headerDetailsDto = headerDetailsDtoList.get(i); HeaderDetailsDto headerDetailsDto = headerDetailsDtoList.get(i);
HeaderDto header = headerDetailsDto.getHeader();
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto> details = headerDetailsDto.getDetails();
//表头公司通过名称匹配U8C公司 //表头公司通过名称匹配U8C公司
BdCorpEntity bdCorpEntity = BasicArchivesCacheUtil.stringBdCorpEntityMap.get("上海娜美诺丝化妆品有限公司"); BdCorpEntity bdCorpEntity = BasicArchivesCacheUtil.stringBdCorpEntityMap.get("上海丽知品牌管理有限公司管理员");
//发货库存组织 //发货库存组织
BdCalbodyEntity bdCalbodyEntity = BasicArchivesCacheUtil.stringBdCalbodyEntityMap.get(bdCorpEntity.getPkCorp()); BdCalbodyEntity bdCalbodyEntity = BasicArchivesCacheUtil.stringBdCalbodyEntityMap.get(bdCorpEntity.getPkCorp());
Assert.notNull(bdCalbodyEntity, "根据公司主键没有查询到发货库存组织 公司主键:{}", bdCorpEntity.getPkCorp()); Assert.notNull(bdCalbodyEntity, "根据公司主键没有查询到发货库存组织 公司主键:{}", bdCorpEntity.getPkCorp());
//发货公司暂时把O表头公司作为发货公司正常情况下需要把O库存地点对于的公司作为发货公司
//发货仓库 //发货仓库
//发货公司 //2024年8月5日 15:06:38 仓库O与U两边仓库编码是一致的和妮姐确认过了
String facilityCode = header.getFacilityCode();
Assert.notNull(facilityCode, "O仓库编码不能为空");
BdStordocEntity bdStordocEntity = BasicArchivesCacheUtil.stringBdStordocEntityMap.get(facilityCode + bdCalbodyEntity.getPkCalbody());
Assert.notNull(bdStordocEntity, "没有匹配到发货仓库 发货库存组织主键:{} O库存地点编码{}", facilityCode, bdCalbodyEntity.getPkCalbody());
//收货库存组织 //2024年8月5日 15:25:07 收货库存组织收货仓库默认和发货库存组织发货仓库一致已经和佳妮确认
//收货仓库 //收货库存组织速网来看收货库存组织对应表头工具
//收货仓库通过收货库存组织+仓库编码确定收货仓库
//销售组织 //销售组织2024年8月5日 15:33:40 和妮姐确认销售组织和表头公司作为一对一的关系
//业务部门 BdSalestruEntity bdSalestruEntity = BasicArchivesCacheUtil.stringBdSalestruEntityMap.get(bdCorpEntity.getPkCorp());
//客商档案 Assert.notNull(bdSalestruEntity, "无匹配到销售组织 公司名称:{}", bdCorpEntity.getPkCorp());
//业务部门暂定的部门名称其他2024年8月5日 15:39:42 已经和妮姐确认
BdDeptdocEntity bdDeptdocEntity = BasicArchivesCacheUtil.stringBdDeptdocEntityMap.get(bdCorpEntity.getPkCorp());
Assert.notNull(bdDeptdocEntity, "无法匹配到业务部门 部门名称:其他 对应公司名称:{}", bdCorpEntity.getPkCorp());
//客商档案2024年8月5日 15:41:54 TOC店铺名称查询U8C客商档案已经和妮姐确认
//2024年8月5日 15:49:49 先根据O店铺编码得到店铺档案信息取到名称通过U8C接口查询出来
//目前O店铺信息查询接口还没有等待开发所以我这里先写所一个名字
BdCumandocEntity bdCumandocEntity = BasicArchivesCacheUtil.stringBdCumandocEntityMap.get("天猫intoyou旗舰店-自营");
Assert.notNull(bdCumandocEntity, "无法匹配到客商档案 店铺名称:{}", "天猫intoyou旗舰店-自营");
//字段拷贝
for (int j = 0; j < details.size(); j++) {
DetailsDto detailsDto = details.get(j);
//2024年8月6日 10:16:22 通过O出库单的表头查询得出U8C档案放在表体的原因是方便分组汇总
//下一个步骤的分组汇总是通过表体明细完成的
SonDetailsDto sonDetailsDto = new SonDetailsDto();
sonDetailsDto.setHeader(header);
sonDetailsDto.setBdCorpEntity(bdCorpEntity);
sonDetailsDto.setDeliverGoodsCorp(bdCorpEntity);
sonDetailsDto.setBdCalbodyEntity(bdCalbodyEntity);
sonDetailsDto.setBdStordocEntity(bdStordocEntity);
sonDetailsDto.setBdCalbodyEntity1(bdCalbodyEntity);
sonDetailsDto.setBdStordocEntity1(bdStordocEntity);
sonDetailsDto.setBdSalestruEntity(bdSalestruEntity);
sonDetailsDto.setBdDeptdocEntity(bdDeptdocEntity);
sonDetailsDto.setBdCumandocEntity(bdCumandocEntity);
BeanUtil.copyPropertiesV2(detailsDto, sonDetailsDto);
sonDetailsDtoList.add(sonDetailsDto);
}
} }
//成功
} catch (Exception e) { } catch (Exception e) {
logger.error("OFS销售出库单关联查询U8C档案失败", e); logger.error("OFS销售出库单关联查询U8C档案失败", e);
//失败
} finally { } finally {
try { try {
basicArchivesCacheUtil.clearCache(); basicArchivesCacheUtil.clearCache();
@ -331,6 +528,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
} else { } else {
logger.info("queryBasicArchives方法headerDetailsDtoList.size为0"); logger.info("queryBasicArchives方法headerDetailsDtoList.size为0");
} }
return sonDetailsDtoList;
} }
/** /**
@ -368,4 +566,182 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
} }
return tocofsSaleoutDetailedEntityArrayList; return tocofsSaleoutDetailedEntityArrayList;
} }
/**
* 分组汇总公司+店铺+仓库+SKU+出库类型数量合并相加
*
* @author liuyang
*/
private Map<String, List<SonDetailsDto>> groupSummary(List<SonDetailsDto> sonDetailsDtoList) {
if (sonDetailsDtoList != null && sonDetailsDtoList.size() > 0) {
for (int i = 0; i < sonDetailsDtoList.size(); i++) {
SonDetailsDto sonDetailsDto = sonDetailsDtoList.get(i);
//2024年8月6日 10:35:25表头对象用于带出表头相关的分组汇总信息
HeaderDto header = sonDetailsDto.getHeader();
//公司
BdCorpEntity bdCorpEntity = sonDetailsDto.getBdCorpEntity();
//店铺主要是店铺编码
String storeCode = header.getStoreCode();
//仓库
String facilityCode = header.getFacilityCode();
//SKU
String skuCode = sonDetailsDto.getSkuCode();
//出库类型
String shipmentType = header.getShipmentType();
StringBuffer summaryDimensionStr = new StringBuffer();
if (bdCorpEntity != null && bdCorpEntity.getPkCorp() != null) {
summaryDimensionStr.append(bdCorpEntity.getPkCorp());
} else {
summaryDimensionStr.append(NOTHING);
}
summaryDimensionStr.append(ADD);
if (storeCode != null && !"".equals(storeCode)) {
summaryDimensionStr.append(storeCode);
} else {
summaryDimensionStr.append(NOTHING);
}
summaryDimensionStr.append(ADD);
if (facilityCode != null && !"".equals(facilityCode)) {
summaryDimensionStr.append(facilityCode);
} else {
summaryDimensionStr.append(NOTHING);
}
summaryDimensionStr.append(ADD);
if (skuCode != null && !"".equals(skuCode)) {
summaryDimensionStr.append(skuCode);
} else {
summaryDimensionStr.append(NOTHING);
}
summaryDimensionStr.append(ADD);
if (shipmentType != null && !"".equals(shipmentType)) {
summaryDimensionStr.append(shipmentType);
} else {
summaryDimensionStr.append(NOTHING);
}
sonDetailsDto.setSummaryDimensionStr(summaryDimensionStr.toString());
}
logger.info("TOC{}个出库单对象需要汇总", sonDetailsDtoList.size());
return sonDetailsDtoList.stream().collect(Collectors.groupingBy(SonDetailsDto::getSummaryDimensionStr));
}
logger.info("TOC0个对象需要汇总");
return null;
}
/**
* 2024年8月6日 10:59:03 查询U8C业务流程
*
* @author liuyang
*/
private BdBusitypeEntity u8cOperationFlow() throws Exception {
//查询业务流程
//2024年8月6日 11:33:07 具体的业务流程名称还需要实施提供
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));
}
/**
* 查询存货管理档案
*
* @param pkCorp 发货公司主键
* @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 = BasicArchivesCacheUtil.stringBdInvmandocEntityMap.get(sonDetailsDto.getSkuCode() + pkCorp);
Assert.notNull(bdInvmandocEntity, "无法匹配到存货管理档案 存货商家编码:{} 存货发货公司:{}", sonDetailsDto.getSkuCode(), pkCorp);
return bdInvmandocEntity;
}
/**
* 合并明细行
* 单价计算公式sum(实付金额/实发数量) 最后除以条数
*
* @author liuyang
*/
private SonDetailsDto groupMergeDetailedRows(List<SonDetailsDto> sonDetailsDtoList) throws Exception {
if (sonDetailsDtoList != null && sonDetailsDtoList.size() > 0) {
BigDecimal groupTotalPayAmount = new BigDecimal("0");
BigDecimal groupShipQty = new BigDecimal("0");
for (int i = 0; i < sonDetailsDtoList.size(); i++) {
SonDetailsDto sonDetailsDto = sonDetailsDtoList.get(i);
//实付金额/实发数量
Assert.notNull(sonDetailsDto.getTotalPayAmount(), "实付金额不能为空 明细行对象:{}", JSON.toJSONString(sonDetailsDto));
Assert.notNull(sonDetailsDto.getShipQty(), "实发数量不能为空 明细行对象:{}", JSON.toJSONString(sonDetailsDto));
BigDecimal totalPayAmountBigDecimal = new BigDecimal(sonDetailsDto.getTotalPayAmount());
BigDecimal shipQtyBigDecimal = new BigDecimal(sonDetailsDto.getShipQty());
groupTotalPayAmount = groupTotalPayAmount.add(totalPayAmountBigDecimal);
groupShipQty = groupShipQty.add(shipQtyBigDecimal);
}
SonDetailsDto sonDetailsDto = sonDetailsDtoList.get(0);
sonDetailsDto.setGroupShipQty(groupShipQty);
sonDetailsDto.setGroupTotalPayAmount(groupTotalPayAmount);
logger.info("{}个明细行发生了合并!", sonDetailsDtoList.size());
return sonDetailsDto;
} else {
logger.info("sonDetailsDtoList集合是空的");
}
return null;
}
/**
* 2024年8月7日 10:25:29
* 查询基础档案根据公司管理档案主键查询
*
* @author liuyang
*/
private BdInvbasdocEntity queryStockBasicArchives(String pkInvmandoc, String pkCorp) {
Assert.notNull(pkInvmandoc, "存货管理档案不能为空");
Assert.notNull(pkCorp, "公司档案不能为空");
BdInvbasdocEntity bdInvbasdocEntity = BasicArchivesCacheUtil.stringBdInvbasdocEntityHashMap.get(pkInvmandoc + pkCorp);
Assert.notNull(bdInvbasdocEntity, "根据公司主键:{} 和存货管理档案主键:{} 没有查询到存货基本档案", pkCorp, pkInvmandoc);
return bdInvbasdocEntity;
}
/**
* 2024年8月7日 14:58:34
* 查询税目档案
*
* @author liuyang
*/
private BdTaxitemsEntity queryBdTaxitems(String invcode) {
Assert.notNull(invcode, "存货编码不能为空");
BdTaxitemsEntity bdTaxitemsEntity = BasicArchivesCacheUtil.stringBdTaxitemsEntityHashMap.get(invcode);
Assert.notNull(bdTaxitemsEntity, "根据存货编码({}),无法匹配到税率!", invcode);
return bdTaxitemsEntity;
}
} }

View File

@ -0,0 +1,187 @@
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 java.math.BigDecimal;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.ttxofs.dto.u8cson
* @ProjectkangarooDataCenterV3
* @nameSonDetailsDto
* @Date2024/8/5 16:07
* @FilenameSonDetailsDto
*/
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 String summaryDimensionStr;
/**
* 汇总总金额
*/
private BigDecimal groupTotalPayAmount;
/**
* 汇总实发数量
*/
private BigDecimal groupShipQty;
/**
* 发货公司
*/
private BdCorpEntity deliverGoodsCorp;
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;
}
}

View File

@ -40,16 +40,25 @@ public class BasicArchivesCacheUtil {
@Autowired @Autowired
private IBdCumandocDao iBdCumandocDao; private IBdCumandocDao iBdCumandocDao;
@Autowired
private IBdInvmandocDao iBdInvmandocDao;
@Autowired
private IBdInvbasdocDao iBdInvbasdocDao;
@Autowired
private IBdTaxitemsDao iBdTaxitemsDao;
/** /**
* 初始化公司档案-表头公司 * 初始化公司档案-表头公司
* 2024年7月31日 11:16:23 * 2024年7月31日 11:16:23
*/ */
public static Map<String, BdCorpEntity> stringBdCorpEntityMap = new HashMap<>(); public static Map<String, BdCorpEntity> stringBdCorpEntityMap = new HashMap<>();
public void initShop() throws Exception { private void initShop() throws Exception {
BdCorpEntity bdCorpEntity = new BdCorpEntity(); BdCorpEntity bdCorpEntity = new BdCorpEntity();
bdCorpEntity.setDr(0); bdCorpEntity.setDr(0);
bdCorpEntity.setDataSourceCode("sowow_sqlserver_test"); bdCorpEntity.setDataSourceCode("lets_u8c");
List<BdCorpEntity> bdCorpEntityList = iBdCorpDao.query(bdCorpEntity); List<BdCorpEntity> bdCorpEntityList = iBdCorpDao.query(bdCorpEntity);
if (bdCorpEntityList != null && bdCorpEntityList.size() > 0) { if (bdCorpEntityList != null && bdCorpEntityList.size() > 0) {
for (int i = 0; i < bdCorpEntityList.size(); i++) { for (int i = 0; i < bdCorpEntityList.size(); i++) {
@ -66,10 +75,10 @@ public class BasicArchivesCacheUtil {
*/ */
public static Map<String, BdStordocEntity> stringBdStordocEntityMap = new HashMap<>(); public static Map<String, BdStordocEntity> stringBdStordocEntityMap = new HashMap<>();
public void initBdStordoc() throws Exception { private void initBdStordoc() throws Exception {
BdStordocEntity bdStordocEntity = new BdStordocEntity(); BdStordocEntity bdStordocEntity = new BdStordocEntity();
bdStordocEntity.setDr(0L); bdStordocEntity.setDr(0L);
bdStordocEntity.setDataSourceCode("sowow_sqlserver_test"); bdStordocEntity.setDataSourceCode("lets_u8c");
List<BdStordocEntity> bdStordocEntityList = iBdStordocDao.query(bdStordocEntity); List<BdStordocEntity> bdStordocEntityList = iBdStordocDao.query(bdStordocEntity);
if (bdStordocEntityList != null && bdStordocEntityList.size() > 0) { if (bdStordocEntityList != null && bdStordocEntityList.size() > 0) {
for (int i = 0; i < bdStordocEntityList.size(); i++) { for (int i = 0; i < bdStordocEntityList.size(); i++) {
@ -84,10 +93,10 @@ public class BasicArchivesCacheUtil {
*/ */
public static Map<String, BdCalbodyEntity> stringBdCalbodyEntityMap = new HashMap<>(); public static Map<String, BdCalbodyEntity> stringBdCalbodyEntityMap = new HashMap<>();
public void initBdCalbody() throws Exception { private void initBdCalbody() throws Exception {
BdCalbodyEntity bdCalbodyEntity = new BdCalbodyEntity(); BdCalbodyEntity bdCalbodyEntity = new BdCalbodyEntity();
bdCalbodyEntity.setDr(0); bdCalbodyEntity.setDr(0);
bdCalbodyEntity.setDataSourceCode("sowow_sqlserver_test"); bdCalbodyEntity.setDataSourceCode("lets_u8c");
List<BdCalbodyEntity> bdCalbodyEntities = iBdCalbodyDao.query(bdCalbodyEntity); List<BdCalbodyEntity> bdCalbodyEntities = iBdCalbodyDao.query(bdCalbodyEntity);
if (bdCalbodyEntities != null && bdCalbodyEntities.size() > 0) { if (bdCalbodyEntities != null && bdCalbodyEntities.size() > 0) {
for (int i = 0; i < bdCalbodyEntities.size(); i++) { for (int i = 0; i < bdCalbodyEntities.size(); i++) {
@ -102,15 +111,15 @@ public class BasicArchivesCacheUtil {
*/ */
public static Map<String, BdSalestruEntity> stringBdSalestruEntityMap = new HashMap<>(); public static Map<String, BdSalestruEntity> stringBdSalestruEntityMap = new HashMap<>();
public void initBdSalestru() throws Exception { private void initBdSalestru() throws Exception {
BdSalestruEntity bdSalestruEntity = new BdSalestruEntity(); BdSalestruEntity bdSalestruEntity = new BdSalestruEntity();
bdSalestruEntity.setDr(0); bdSalestruEntity.setDr(0);
bdSalestruEntity.setDataSourceCode("sowow_sqlserver_test"); bdSalestruEntity.setDataSourceCode("lets_u8c");
List<BdSalestruEntity> bdSalestruEntityList = iBdSalestruDao.query(bdSalestruEntity); List<BdSalestruEntity> bdSalestruEntityList = iBdSalestruDao.query(bdSalestruEntity);
if (bdSalestruEntityList != null && bdSalestruEntityList.size() > 0) { if (bdSalestruEntityList != null && bdSalestruEntityList.size() > 0) {
for (int i = 0; i < bdSalestruEntityList.size(); i++) { for (int i = 0; i < bdSalestruEntityList.size(); i++) {
BdSalestruEntity bdSalestruEntity1 = bdSalestruEntityList.get(i); BdSalestruEntity bdSalestruEntity1 = bdSalestruEntityList.get(i);
stringBdSalestruEntityMap.put(bdSalestruEntity1.getBelongcorp(), bdSalestruEntity1); stringBdSalestruEntityMap.put(bdSalestruEntity1.getPkCorp(), bdSalestruEntity1);
} }
} }
} }
@ -122,11 +131,11 @@ public class BasicArchivesCacheUtil {
*/ */
public static Map<String, BdDeptdocEntity> stringBdDeptdocEntityMap = new HashMap<>(); public static Map<String, BdDeptdocEntity> stringBdDeptdocEntityMap = new HashMap<>();
public void initDept() { private void initDept() {
BdDeptdocEntity bdDeptdocEntity = new BdDeptdocEntity(); BdDeptdocEntity bdDeptdocEntity = new BdDeptdocEntity();
bdDeptdocEntity.setDataSourceCode("sowow_sqlserver_test"); bdDeptdocEntity.setDataSourceCode("lets_u8c");
bdDeptdocEntity.setDr(0); bdDeptdocEntity.setDr(0);
bdDeptdocEntity.setDeptname("业务部门"); bdDeptdocEntity.setDeptname("其他");
List<BdDeptdocEntity> bdDeptdocEntityList = iBdDeptdocDao.query(bdDeptdocEntity); List<BdDeptdocEntity> bdDeptdocEntityList = iBdDeptdocDao.query(bdDeptdocEntity);
if (bdDeptdocEntityList != null && bdDeptdocEntityList.size() > 0) { if (bdDeptdocEntityList != null && bdDeptdocEntityList.size() > 0) {
for (int i = 0; i < bdDeptdocEntityList.size(); i++) { for (int i = 0; i < bdDeptdocEntityList.size(); i++) {
@ -143,9 +152,9 @@ public class BasicArchivesCacheUtil {
*/ */
public static Map<String, BdCumandocEntity> stringBdCumandocEntityMap = new HashMap<>(); public static Map<String, BdCumandocEntity> stringBdCumandocEntityMap = new HashMap<>();
public void initBdCumandoc() { private void initBdCumandoc() {
BdCumandocEntity bdCumandocEntity1 = new BdCumandocEntity(); BdCumandocEntity bdCumandocEntity1 = new BdCumandocEntity();
bdCumandocEntity1.setDataSourceCode("sowow_sqlserver_test"); bdCumandocEntity1.setDataSourceCode("lets_u8c");
bdCumandocEntity1.setDr(0L); bdCumandocEntity1.setDr(0L);
// bdCumandocEntity1.setCustflags(ProfilesActiveConstant.CUSTOMER);//客商:2客户 // bdCumandocEntity1.setCustflags(ProfilesActiveConstant.CUSTOMER);//客商:2客户
List<BdCumandocEntity> bdCumandocEntityList = iBdCumandocDao.query(bdCumandocEntity1); List<BdCumandocEntity> bdCumandocEntityList = iBdCumandocDao.query(bdCumandocEntity1);
@ -157,6 +166,63 @@ public class BasicArchivesCacheUtil {
} }
} }
/**
* 初始化存货管理档案
*/
public static Map<String, BdInvmandocEntity> stringBdInvmandocEntityMap = new HashMap<>();
private void initInventoryFile() throws Exception {
BdInvmandocEntity bdInvmandocEntity = new BdInvmandocEntity();
// bdInvmandocEntity.setInvcode(copyRowDetailsListVo.getSpec_no());
// bdInvmandocEntity.setPkCorp(shippingCompanyBdCorpEntity.getPkCorp());
List<BdInvmandocEntity> bdInvmandocEntity2 = iBdInvmandocDao.queryBdInvmandocByInvcodeList(bdInvmandocEntity);
if (bdInvmandocEntity2 != null && bdInvmandocEntity2.size() > 0) {
for (int i = 0; i < bdInvmandocEntity2.size(); i++) {
BdInvmandocEntity bdInvmandocEntity1 = bdInvmandocEntity2.get(i);
//2024年8月6日 14:27:45 通过存货编码+公司缓存
stringBdInvmandocEntityMap.put(bdInvmandocEntity1.getInvcode() + bdInvmandocEntity1.getPkCorp(), bdInvmandocEntity1);
}
}
}
/**
* 初始化存货基本档案
* 2024年8月7日 10:57:55
*/
public static Map<String, BdInvbasdocEntity> stringBdInvbasdocEntityHashMap = new HashMap<>();
private void initBasicInventoryFile() throws Exception {
BdInvbasdocEntity bdInvbasdocEntity = new BdInvbasdocEntity();
// bdInvbasdocEntity.setPk_invmandoc(bdInvmandocEntity1.getPkInvmandoc());
// bdInvbasdocEntity.setPk_corp(shippingCompanyBdCorpEntity.getPkCorp());
List<BdInvbasdocEntity> bdInvbasdocEntity2 = iBdInvbasdocDao.queryBdInvbasdocByPkInvmandocV2(bdInvbasdocEntity);
if (bdInvbasdocEntity2 != null && bdInvbasdocEntity2.size() > 0) {
for (int i = 0; i < bdInvbasdocEntity2.size(); i++) {
BdInvbasdocEntity bdInvbasdocEntity1 = bdInvbasdocEntity2.get(i);
stringBdInvbasdocEntityHashMap.put(bdInvbasdocEntity1.getPk_invmandoc() + bdInvbasdocEntity1.getPkCorp(), bdInvbasdocEntity1);
}
}
}
/**
* 2024年8月7日 10:59:30
* 初始化存货税率
*
* @author liuyang
*/
public static Map<String, BdTaxitemsEntity> stringBdTaxitemsEntityHashMap = new HashMap<>();
private void initBdTaxitemsEntity() throws Exception {
BdTaxitemsEntity bdTaxitemsEntity = new BdTaxitemsEntity();
List<BdTaxitemsEntity> bdTaxitemsEntityList = iBdTaxitemsDao.queryBdInvbasdocByInvcodeV2(bdTaxitemsEntity);
if (bdTaxitemsEntityList != null && bdTaxitemsEntityList.size() > 0) {
for (int i = 0; i < bdTaxitemsEntityList.size(); i++) {
BdTaxitemsEntity bdTaxitemsEntity1 = bdTaxitemsEntityList.get(i);
stringBdTaxitemsEntityHashMap.put(bdTaxitemsEntity1.getInvcode(), bdTaxitemsEntity1);
}
}
}
/** /**
* 清理缓存 * 清理缓存
* *
@ -169,6 +235,9 @@ public class BasicArchivesCacheUtil {
stringBdSalestruEntityMap.clear(); stringBdSalestruEntityMap.clear();
stringBdDeptdocEntityMap.clear(); stringBdDeptdocEntityMap.clear();
stringBdCumandocEntityMap.clear(); stringBdCumandocEntityMap.clear();
stringBdInvmandocEntityMap.clear();
stringBdInvbasdocEntityHashMap.clear();
stringBdTaxitemsEntityHashMap.clear();
} }
/** /**
@ -185,5 +254,9 @@ public class BasicArchivesCacheUtil {
initBdSalestru(); initBdSalestru();
initDept(); initDept();
initBdCumandoc(); initBdCumandoc();
initInventoryFile();
initBasicInventoryFile();
initBdTaxitemsEntity();
} }
}
}

View File

@ -0,0 +1,41 @@
package com.hzya.frame.plugin.lets.util;
import cn.hutool.core.lang.Assert;
import com.hzya.frame.plugin.lets.dao.IBdBusitypeDao;
import com.hzya.frame.plugin.lets.entity.BdBusitypeEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 业务流程查询
*
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.sowow.util
* @ProjectkangarooDataCenter
* @nameQueryBdBusitypeUtil
* @Date2023/11/22 20:11
* @FilenameQueryBdBusitypeUtil
*/
@Component
public class QueryBdBusitypeUtil {
@Autowired
private IBdBusitypeDao iBdBusitypeDao;
public BdBusitypeEntity queryBdBusitype(String businame) {
//查询业务流程
BdBusitypeEntity bdBusitypeEntity = new BdBusitypeEntity();
bdBusitypeEntity.setDataSourceCode("lets_u8c");
bdBusitypeEntity.setBusiname(businame);
bdBusitypeEntity.setDr(0);
List<BdBusitypeEntity> bdBusitypeEntityList = iBdBusitypeDao.query(bdBusitypeEntity);
if (bdBusitypeEntityList.size() == 0) {
Assert.state(false, "没有查询到业务流程,业务流程名称:{}", bdBusitypeEntity.getBusiname());
} else if (bdBusitypeEntityList.size() > 1) {
Assert.state(false, "查询到多个业务流程,业务流程名称:{}", bdBusitypeEntity.getBusiname());
}
return bdBusitypeEntityList.get(0);
}
}

View File

@ -63,6 +63,32 @@ public class HeaderDto {
private String shipToCityName; private String shipToCityName;
private String shipToDistrictName; private String shipToDistrictName;
/**
* 发货日期
*/
private String shipAt;
/**
* 出库类型
*/
private String shipmentType;
public String getShipmentType() {
return shipmentType;
}
public void setShipmentType(String shipmentType) {
this.shipmentType = shipmentType;
}
public String getShipAt() {
return shipAt;
}
public void setShipAt(String shipAt) {
this.shipAt = shipAt;
}
public String getId() { public String getId() {
return id; return id;
} }

View File

@ -115,8 +115,7 @@ public class AopDynamicRoutingDataSourceInit {
driveClass = DataSourceUtilProperties.SQL2000DRIVER; driveClass = DataSourceUtilProperties.SQL2000DRIVER;
} else if ("sqlServer".equalsIgnoreCase(source_type)) { } else if ("sqlServer".equalsIgnoreCase(source_type)) {
driveClass = DataSourceUtilProperties.SQL2005DRIVER; driveClass = DataSourceUtilProperties.SQL2005DRIVER;
} } else if ("dm".equalsIgnoreCase(source_type)) {
else if ("dm".equalsIgnoreCase(source_type)) {
driveClass = DataSourceUtilProperties.dm; driveClass = DataSourceUtilProperties.dm;
} }
try { try {