feat(ofs): 添加无源件订单中台相关实体和 DAO接口

- 新增 OfsPassiveorderDetailEntity 和 OfsPassiveorderHeaderEntity 实体类
- 新增 IOfsPassiveorderDetailDao 和 IOfsPassiveorderHeaderDao DAO 接口
- 新增 OfsPassiveorderDetailDaoImpl 和 OfsPassiveorderHeaderDaoImpl DAO 实现类
This commit is contained in:
liuy 2025-03-12 16:48:04 +08:00
parent a8f79105d1
commit c59059cf17
23 changed files with 5479 additions and 3067 deletions

View File

@ -0,0 +1,35 @@
package com.hzya.frame.plugin.lets.ofs.dao;
import com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderDetailEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import java.util.List;
/**
* O无源件订单中台明细表(ofs_passiveorder_detail: table)表数据库访问层
*
* @author makejava
* @since 2025-03-12 09:40:26
*/
public interface IOfsPassiveorderDetailDao extends IBaseDao<OfsPassiveorderDetailEntity, String> {
/**
* 批量保存/更新 OFS
*
* @author liuyang
*/
void entityInsertOrUpdateBatch(List<OfsPassiveorderDetailEntity> ofsPassiveorderDetailEntity) throws Exception;
/**
* 入库批量保存/更新 OFS
*
* @author liuyang
*/
void entityInsertOrUpdateBatchByStock(List<OfsPassiveorderDetailEntity> ofsPassiveorderDetailEntity) throws Exception;
/**
* 退款完成批量保存/更新 OFS
*
* @author liuyang
*/
void entityInsertOrUpdateBatchByTran(List<OfsPassiveorderDetailEntity> ofsPassiveorderDetailEntity) throws Exception;
}

View File

@ -0,0 +1,21 @@
package com.hzya.frame.plugin.lets.ofs.dao;
import com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import java.util.List;
/**
* O无源件订单中台主表(ofs_passiveorder_header: table)表数据库访问层
*
* @author makejava
* @since 2025-03-12 09:39:53
*/
public interface IOfsPassiveorderHeaderDao extends IBaseDao<OfsPassiveorderHeaderEntity, String> {
/**
* 批量插入或者更新到无源件表头
*
* @author liuyang
*/
void entityInsertOrUpdateBatch(List<OfsPassiveorderHeaderEntity> ofsPassiveorderHeaderEntityList) throws Exception;
}

View File

@ -0,0 +1,32 @@
package com.hzya.frame.plugin.lets.ofs.dao.impl;
import com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderDetailEntity;
import com.hzya.frame.plugin.lets.ofs.dao.IOfsPassiveorderDetailDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import java.util.List;
/**
* O无源件订单中台明细表(OfsPassiveorderDetail)表数据库访问层
*
* @author makejava
* @since 2025-03-12 09:40:26
*/
public class OfsPassiveorderDetailDaoImpl extends MybatisGenericDao<OfsPassiveorderDetailEntity, String> implements IOfsPassiveorderDetailDao {
@Override
public void entityInsertOrUpdateBatch(List<OfsPassiveorderDetailEntity> ofsPassiveorderDetailEntity) throws Exception {
insert("com.hzya.frame.plugin.lets.ofs.dao.impl.OfsPassiveorderDetailDaoImpl.entityInsertOrUpdateBatch", ofsPassiveorderDetailEntity);
}
@Override
public void entityInsertOrUpdateBatchByStock(List<OfsPassiveorderDetailEntity> ofsPassiveorderDetailEntity) throws Exception {
insert("com.hzya.frame.plugin.lets.ofs.dao.impl.OfsPassiveorderDetailDaoImpl.entityInsertOrUpdateBatchV2", ofsPassiveorderDetailEntity);
}
@Override
public void entityInsertOrUpdateBatchByTran(List<OfsPassiveorderDetailEntity> ofsPassiveorderDetailEntity) throws Exception {
insert("com.hzya.frame.plugin.lets.ofs.dao.impl.OfsPassiveorderDetailDaoImpl.entityInsertOrUpdateBatchV3", ofsPassiveorderDetailEntity);
}
}

View File

@ -0,0 +1,21 @@
package com.hzya.frame.plugin.lets.ofs.dao.impl;
import com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity;
import com.hzya.frame.plugin.lets.ofs.dao.IOfsPassiveorderHeaderDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import java.util.List;
/**
* O无源件订单中台主表(OfsPassiveorderHeader)表数据库访问层
*
* @author makejava
* @since 2025-03-12 09:39:53
*/
public class OfsPassiveorderHeaderDaoImpl extends MybatisGenericDao<OfsPassiveorderHeaderEntity, String> implements IOfsPassiveorderHeaderDao {
@Override
public void entityInsertOrUpdateBatch(List<OfsPassiveorderHeaderEntity> ofsPassiveorderHeaderEntityList) throws Exception {
insert("com.hzya.frame.plugin.lets.ofs.dao.impl.OfsPassiveorderHeaderDaoImpl.entityInsertOrUpdateBatch", ofsPassiveorderHeaderEntityList);
}
}

View File

@ -0,0 +1,391 @@
package com.hzya.frame.plugin.lets.ofs.entity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* O无源件订单中台明细表(OfsPassiveorderDetail)实体类
*
* @author makejava
* @since 2025-03-12 09:40:26
*/
public class OfsPassiveorderDetailEntity extends BaseEntity {
/**
* 关联主表ID[1](@ref)
*/
private String headerid;
/**
* 退货单号(与主表一致)[1](@ref)
*/
private String receiptcode;
/**
* 商品编码(示例值:6973391732529)[1](@ref)
*/
private String skucode;
/**
* 商品全称(示例值:INTO YOU心慕与你干杯唇釉OT02)[1](@ref)
*/
private String skuname;
/**
* 退货数量(示例值:1)[1](@ref)
*/
private String quantity;
/**
* 库存状态(示例值:NOT_AVAILABLE)[1](@ref)
*/
private String inventorysts;
/**
* 创建时间[1](@ref)
*/
private String created;
/**
* 创建人[1](@ref)
*/
private String createdby;
/**
* 最后更新时间[1](@ref)
*/
private String lastupdated;
/**
* 最后更新人[1](@ref)
*/
private String lastupdatedby;
/**
* 业务日期
*/
private String businessdate;
/**
* 业务类型
*/
private String businesstype;
/**
* 推送时间-入库
*/
private String newpushdate;
/**
* 报错详情-入库
*/
private String newtransmitinfo;
/**
* 推送状态-入库
*/
private String newstate;
/**
* 下游单号-入库
*/
private String newsystemnumber;
/**
* 下游主键-入库
*/
private String newsystemprimary;
/**
* 推送时间-交易成功
*/
private String newpushdate2;
/**
* 报错详情-交易成功
*/
private String newtransmitinfo2;
/**
* 推送状态-交易成功
*/
private String newstate2;
/**
* 下游单号-交易成功
*/
private String newsystemnumber2;
/**
* 下游主键-交易成功
*/
private String newsystemprimary2;
/**
* 根据 id 批量查询
*/
private String ids;
private String def1;
private String def2;
private String def3;
private String def4;
private String def5;
private String def6;
private String def7;
private String def8;
private String def9;
private String def10;
public String getDef1() {
return def1;
}
public void setDef1(String def1) {
this.def1 = def1;
}
public String getDef2() {
return def2;
}
public void setDef2(String def2) {
this.def2 = def2;
}
public String getDef3() {
return def3;
}
public void setDef3(String def3) {
this.def3 = def3;
}
public String getDef4() {
return def4;
}
public void setDef4(String def4) {
this.def4 = def4;
}
public String getDef5() {
return def5;
}
public void setDef5(String def5) {
this.def5 = def5;
}
public String getDef6() {
return def6;
}
public void setDef6(String def6) {
this.def6 = def6;
}
public String getDef7() {
return def7;
}
public void setDef7(String def7) {
this.def7 = def7;
}
public String getDef8() {
return def8;
}
public void setDef8(String def8) {
this.def8 = def8;
}
public String getDef9() {
return def9;
}
public void setDef9(String def9) {
this.def9 = def9;
}
public String getDef10() {
return def10;
}
public void setDef10(String def10) {
this.def10 = def10;
}
public String getIds() {
return ids;
}
public void setIds(String ids) {
this.ids = ids;
}
public String getHeaderid() {
return headerid;
}
public void setHeaderid(String headerid) {
this.headerid = headerid;
}
public String getReceiptcode() {
return receiptcode;
}
public void setReceiptcode(String receiptcode) {
this.receiptcode = receiptcode;
}
public String getSkucode() {
return skucode;
}
public void setSkucode(String skucode) {
this.skucode = skucode;
}
public String getSkuname() {
return skuname;
}
public void setSkuname(String skuname) {
this.skuname = skuname;
}
public String getQuantity() {
return quantity;
}
public void setQuantity(String quantity) {
this.quantity = quantity;
}
public String getInventorysts() {
return inventorysts;
}
public void setInventorysts(String inventorysts) {
this.inventorysts = inventorysts;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public String getCreatedby() {
return createdby;
}
public void setCreatedby(String createdby) {
this.createdby = createdby;
}
public String getLastupdated() {
return lastupdated;
}
public void setLastupdated(String lastupdated) {
this.lastupdated = lastupdated;
}
public String getLastupdatedby() {
return lastupdatedby;
}
public void setLastupdatedby(String lastupdatedby) {
this.lastupdatedby = lastupdatedby;
}
public String getBusinessdate() {
return businessdate;
}
public void setBusinessdate(String businessdate) {
this.businessdate = businessdate;
}
public String getBusinesstype() {
return businesstype;
}
public void setBusinesstype(String businesstype) {
this.businesstype = businesstype;
}
public String getNewpushdate() {
return newpushdate;
}
public void setNewpushdate(String newpushdate) {
this.newpushdate = newpushdate;
}
public String getNewtransmitinfo() {
return newtransmitinfo;
}
public void setNewtransmitinfo(String newtransmitinfo) {
this.newtransmitinfo = newtransmitinfo;
}
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 getNewpushdate2() {
return newpushdate2;
}
public void setNewpushdate2(String newpushdate2) {
this.newpushdate2 = newpushdate2;
}
public String getNewtransmitinfo2() {
return newtransmitinfo2;
}
public void setNewtransmitinfo2(String newtransmitinfo2) {
this.newtransmitinfo2 = newtransmitinfo2;
}
public String getNewstate2() {
return newstate2;
}
public void setNewstate2(String newstate2) {
this.newstate2 = newstate2;
}
public String getNewsystemnumber2() {
return newsystemnumber2;
}
public void setNewsystemnumber2(String newsystemnumber2) {
this.newsystemnumber2 = newsystemnumber2;
}
public String getNewsystemprimary2() {
return newsystemprimary2;
}
public void setNewsystemprimary2(String newsystemprimary2) {
this.newsystemprimary2 = newsystemprimary2;
}
}

View File

@ -0,0 +1,410 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.plugin.lets.ofs.dao.impl.OfsPassiveorderDetailDaoImpl">
<resultMap id="get-OfsPassiveorderDetailEntity-result" type="com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderDetailEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="headerid" column="headerId" jdbcType="VARCHAR"/>
<result property="receiptcode" column="receiptCode" jdbcType="VARCHAR"/>
<result property="skucode" column="skuCode" jdbcType="VARCHAR"/>
<result property="skuname" column="skuName" jdbcType="VARCHAR"/>
<result property="quantity" column="quantity" jdbcType="VARCHAR"/>
<result property="inventorysts" column="inventorySts" jdbcType="VARCHAR"/>
<result property="created" column="created" jdbcType="VARCHAR"/>
<result property="createdby" column="createdBy" jdbcType="VARCHAR"/>
<result property="lastupdated" column="lastUpdated" jdbcType="VARCHAR"/>
<result property="lastupdatedby" column="lastUpdatedBy" jdbcType="VARCHAR"/>
<result property="businessdate" column="businessDate" jdbcType="VARCHAR"/>
<result property="businesstype" column="businessType" jdbcType="VARCHAR"/>
<result property="newpushdate" column="newPushDate" jdbcType="VARCHAR"/>
<result property="newtransmitinfo" column="newTransmitInfo" 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="newpushdate2" column="newPushDate2" jdbcType="VARCHAR"/>
<result property="newtransmitinfo2" column="newTransmitInfo2" jdbcType="VARCHAR"/>
<result property="newstate2" column="newState2" jdbcType="VARCHAR"/>
<result property="newsystemnumber2" column="newsystemnumber2" jdbcType="VARCHAR"/>
<result property="newsystemprimary2" column="newsystemprimary2" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "OfsPassiveorderDetailEntity_Base_Column_List">
id
,headerId
,receiptCode
,skuCode
,skuName
,quantity
,inventorySts
,created
,createdBy
,lastUpdated
,lastUpdatedBy
,businessDate
,businessType
,newPushDate
,newTransmitInfo
,newState
,newsystemnumber
,newsystemprimary
,newPushDate2
,newTransmitInfo2
,newState2
,newsystemnumber2
,newsystemprimary2
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-OfsPassiveorderDetailEntity-result" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderDetailEntity">
select
<include refid="OfsPassiveorderDetailEntity_Base_Column_List" />
from ofs_passiveorder_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="headerid != null and headerid != ''"> and headerId = #{headerid} </if>
<if test="receiptcode != null and receiptcode != ''"> and receiptCode = #{receiptcode} </if>
<if test="skucode != null and skucode != ''"> and skuCode = #{skucode} </if>
<if test="skuname != null and skuname != ''"> and skuName = #{skuname} </if>
<if test="quantity != null and quantity != ''"> and quantity = #{quantity} </if>
<if test="inventorysts != null and inventorysts != ''"> and inventorySts = #{inventorysts} </if>
<if test="created != null and created != ''"> and created = #{created} </if>
<if test="createdby != null and createdby != ''"> and createdBy = #{createdby} </if>
<if test="lastupdated != null and lastupdated != ''"> and lastUpdated = #{lastupdated} </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy = #{lastupdatedby} </if>
<if test="businessdate != null and businessdate != ''"> and businessDate = #{businessdate} </if>
<if test="businesstype != null and businesstype != ''"> and businessType = #{businesstype} </if>
<if test="newpushdate != null and newpushdate != ''"> and newPushDate = #{newpushdate} </if>
<if test="newtransmitinfo != null and newtransmitinfo != ''"> and newTransmitInfo = #{newtransmitinfo} </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="newpushdate2 != null and newpushdate2 != ''"> and newPushDate2 = #{newpushdate2} </if>
<if test="newtransmitinfo2 != null and newtransmitinfo2 != ''"> and newTransmitInfo2 = #{newtransmitinfo2} </if>
<if test="newstate2 != null and newstate2 != ''"> and newState2 = #{newstate2} </if>
<if test="newsystemnumber2 != null and newsystemnumber2 != ''"> and newsystemnumber2 = #{newsystemnumber2} </if>
<if test="newsystemprimary2 != null and newsystemprimary2 != ''"> and newsystemprimary2 = #{newsystemprimary2} </if>
<if test="ids!=null and ids!=''">and id in (${ids})</if>
</trim>
<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>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderDetailEntity">
select count(1) from ofs_passiveorder_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="headerid != null and headerid != ''"> and headerId = #{headerid} </if>
<if test="receiptcode != null and receiptcode != ''"> and receiptCode = #{receiptcode} </if>
<if test="skucode != null and skucode != ''"> and skuCode = #{skucode} </if>
<if test="skuname != null and skuname != ''"> and skuName = #{skuname} </if>
<if test="quantity != null and quantity != ''"> and quantity = #{quantity} </if>
<if test="inventorysts != null and inventorysts != ''"> and inventorySts = #{inventorysts} </if>
<if test="created != null and created != ''"> and created = #{created} </if>
<if test="createdby != null and createdby != ''"> and createdBy = #{createdby} </if>
<if test="lastupdated != null and lastupdated != ''"> and lastUpdated = #{lastupdated} </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy = #{lastupdatedby} </if>
<if test="businessdate != null and businessdate != ''"> and businessDate = #{businessdate} </if>
<if test="businesstype != null and businesstype != ''"> and businessType = #{businesstype} </if>
<if test="newpushdate != null and newpushdate != ''"> and newPushDate = #{newpushdate} </if>
<if test="newtransmitinfo != null and newtransmitinfo != ''"> and newTransmitInfo = #{newtransmitinfo} </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="newpushdate2 != null and newpushdate2 != ''"> and newPushDate2 = #{newpushdate2} </if>
<if test="newtransmitinfo2 != null and newtransmitinfo2 != ''"> and newTransmitInfo2 = #{newtransmitinfo2} </if>
<if test="newstate2 != null and newstate2 != ''"> and newState2 = #{newstate2} </if>
<if test="newsystemnumber2 != null and newsystemnumber2 != ''"> and newsystemnumber2 = #{newsystemnumber2} </if>
<if test="newsystemprimary2 != null and newsystemprimary2 != ''"> and newsystemprimary2 = #{newsystemprimary2} </if>
and sts='Y'
</trim>
<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>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-OfsPassiveorderDetailEntity-result" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderDetailEntity">
select
<include refid="OfsPassiveorderDetailEntity_Base_Column_List" />
from ofs_passiveorder_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="headerid != null and headerid != ''"> and headerId like concat('%',#{headerid},'%') </if>
<if test="receiptcode != null and receiptcode != ''"> and receiptCode like concat('%',#{receiptcode},'%') </if>
<if test="skucode != null and skucode != ''"> and skuCode like concat('%',#{skucode},'%') </if>
<if test="skuname != null and skuname != ''"> and skuName like concat('%',#{skuname},'%') </if>
<if test="quantity != null and quantity != ''"> and quantity like concat('%',#{quantity},'%') </if>
<if test="inventorysts != null and inventorysts != ''"> and inventorySts like concat('%',#{inventorysts},'%') </if>
<if test="created != null and created != ''"> and created like concat('%',#{created},'%') </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="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy like concat('%',#{lastupdatedby},'%') </if>
<if test="businessdate != null and businessdate != ''"> and businessDate like concat('%',#{businessdate},'%') </if>
<if test="businesstype != null and businesstype != ''"> and businessType like concat('%',#{businesstype},'%') </if>
<if test="newpushdate != null and newpushdate != ''"> and newPushDate like concat('%',#{newpushdate},'%') </if>
<if test="newtransmitinfo != null and newtransmitinfo != ''"> and newTransmitInfo like concat('%',#{newtransmitinfo},'%') </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="newpushdate2 != null and newpushdate2 != ''"> and newPushDate2 like concat('%',#{newpushdate2},'%') </if>
<if test="newtransmitinfo2 != null and newtransmitinfo2 != ''"> and newTransmitInfo2 like concat('%',#{newtransmitinfo2},'%') </if>
<if test="newstate2 != null and newstate2 != ''"> and newState2 like concat('%',#{newstate2},'%') </if>
<if test="newsystemnumber2 != null and newsystemnumber2 != ''"> and newsystemnumber2 like concat('%',#{newsystemnumber2},'%') </if>
<if test="newsystemprimary2 != null and newsystemprimary2 != ''"> and newsystemprimary2 like concat('%',#{newsystemprimary2},'%') </if>
and sts='Y'
</trim>
<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>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="OfsPassiveorderDetailentity_list_or" resultMap="get-OfsPassiveorderDetailEntity-result" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderDetailEntity">
select
<include refid="OfsPassiveorderDetailEntity_Base_Column_List" />
from ofs_passiveorder_detail
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="headerid != null and headerid != ''"> or headerId = #{headerid} </if>
<if test="receiptcode != null and receiptcode != ''"> or receiptCode = #{receiptcode} </if>
<if test="skucode != null and skucode != ''"> or skuCode = #{skucode} </if>
<if test="skuname != null and skuname != ''"> or skuName = #{skuname} </if>
<if test="quantity != null and quantity != ''"> or quantity = #{quantity} </if>
<if test="inventorysts != null and inventorysts != ''"> or inventorySts = #{inventorysts} </if>
<if test="created != null and created != ''"> or created = #{created} </if>
<if test="createdby != null and createdby != ''"> or createdBy = #{createdby} </if>
<if test="lastupdated != null and lastupdated != ''"> or lastUpdated = #{lastupdated} </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> or lastUpdatedBy = #{lastupdatedby} </if>
<if test="businessdate != null and businessdate != ''"> or businessDate = #{businessdate} </if>
<if test="businesstype != null and businesstype != ''"> or businessType = #{businesstype} </if>
<if test="newpushdate != null and newpushdate != ''"> or newPushDate = #{newpushdate} </if>
<if test="newtransmitinfo != null and newtransmitinfo != ''"> or newTransmitInfo = #{newtransmitinfo} </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="newpushdate2 != null and newpushdate2 != ''"> or newPushDate2 = #{newpushdate2} </if>
<if test="newtransmitinfo2 != null and newtransmitinfo2 != ''"> or newTransmitInfo2 = #{newtransmitinfo2} </if>
<if test="newstate2 != null and newstate2 != ''"> or newState2 = #{newstate2} </if>
<if test="newsystemnumber2 != null and newsystemnumber2 != ''"> or newsystemnumber2 = #{newsystemnumber2} </if>
<if test="newsystemprimary2 != null and newsystemprimary2 != ''"> or newsystemprimary2 = #{newsystemprimary2} </if>
and sts='Y'
</trim>
<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>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderDetailEntity" keyProperty="id" useGeneratedKeys="true">
insert into ofs_passiveorder_detail(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="headerid != null and headerid != ''"> headerId , </if>
<if test="receiptcode != null and receiptcode != ''"> receiptCode , </if>
<if test="skucode != null and skucode != ''"> skuCode , </if>
<if test="skuname != null and skuname != ''"> skuName , </if>
<if test="quantity != null and quantity != ''"> quantity , </if>
<if test="inventorysts != null and inventorysts != ''"> inventorySts , </if>
<if test="created != null and created != ''"> created , </if>
<if test="createdby != null and createdby != ''"> createdBy , </if>
<if test="lastupdated != null and lastupdated != ''"> lastUpdated , </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> lastUpdatedBy , </if>
<if test="businessdate != null and businessdate != ''"> businessDate , </if>
<if test="businesstype != null and businesstype != ''"> businessType , </if>
<if test="newpushdate != null and newpushdate != ''"> newPushDate , </if>
<if test="newtransmitinfo != null and newtransmitinfo != ''"> newTransmitInfo , </if>
<if test="newstate != null and newstate != ''"> newState , </if>
<if test="newsystemnumber != null and newsystemnumber != ''"> newsystemnumber , </if>
<if test="newsystemprimary != null and newsystemprimary != ''"> newsystemprimary , </if>
<if test="newpushdate2 != null and newpushdate2 != ''"> newPushDate2 , </if>
<if test="newtransmitinfo2 != null and newtransmitinfo2 != ''"> newTransmitInfo2 , </if>
<if test="newstate2 != null and newstate2 != ''"> newState2 , </if>
<if test="newsystemnumber2 != null and newsystemnumber2 != ''"> newsystemnumber2 , </if>
<if test="newsystemprimary2 != null and newsystemprimary2 != ''"> newsystemprimary2 , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if>
<if test="headerid != null and headerid != ''"> #{headerid} ,</if>
<if test="receiptcode != null and receiptcode != ''"> #{receiptcode} ,</if>
<if test="skucode != null and skucode != ''"> #{skucode} ,</if>
<if test="skuname != null and skuname != ''"> #{skuname} ,</if>
<if test="quantity != null and quantity != ''"> #{quantity} ,</if>
<if test="inventorysts != null and inventorysts != ''"> #{inventorysts} ,</if>
<if test="created != null and created != ''"> #{created} ,</if>
<if test="createdby != null and createdby != ''"> #{createdby} ,</if>
<if test="lastupdated != null and lastupdated != ''"> #{lastupdated} ,</if>
<if test="lastupdatedby != null and lastupdatedby != ''"> #{lastupdatedby} ,</if>
<if test="businessdate != null and businessdate != ''"> #{businessdate} ,</if>
<if test="businesstype != null and businesstype != ''"> #{businesstype} ,</if>
<if test="newpushdate != null and newpushdate != ''"> #{newpushdate} ,</if>
<if test="newtransmitinfo != null and newtransmitinfo != ''"> #{newtransmitinfo} ,</if>
<if test="newstate != null and newstate != ''"> #{newstate} ,</if>
<if test="newsystemnumber != null and newsystemnumber != ''"> #{newsystemnumber} ,</if>
<if test="newsystemprimary != null and newsystemprimary != ''"> #{newsystemprimary} ,</if>
<if test="newpushdate2 != null and newpushdate2 != ''"> #{newpushdate2} ,</if>
<if test="newtransmitinfo2 != null and newtransmitinfo2 != ''"> #{newtransmitinfo2} ,</if>
<if test="newstate2 != null and newstate2 != ''"> #{newstate2} ,</if>
<if test="newsystemnumber2 != null and newsystemnumber2 != ''"> #{newsystemnumber2} ,</if>
<if test="newsystemprimary2 != null and newsystemprimary2 != ''"> #{newsystemprimary2} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from ofs_passiveorder_detail a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into ofs_passiveorder_detail(headerId, receiptCode, skuCode, skuName, quantity, inventorySts, created, createdBy, lastUpdated, lastUpdatedBy, businessDate, businessType, newPushDate, newTransmitInfo, newState, newsystemnumber, newsystemprimary, newPushDate2, newTransmitInfo2, newState2, newsystemnumber2, newsystemprimary2, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.headerid},#{entity.receiptcode},#{entity.skucode},#{entity.skuname},#{entity.quantity},#{entity.inventorysts},#{entity.created},#{entity.createdby},#{entity.lastupdated},#{entity.lastupdatedby},#{entity.businessdate},#{entity.businesstype},#{entity.newpushdate},#{entity.newtransmitinfo},#{entity.newstate},#{entity.newsystemnumber},#{entity.newsystemprimary},#{entity.newpushdate2},#{entity.newtransmitinfo2},#{entity.newstate2},#{entity.newsystemnumber2},#{entity.newsystemprimary2}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改底表数据-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into ofs_passiveorder_detail(id,headerId, receiptCode, skuCode, skuName, quantity, inventorySts, created, createdBy, lastUpdated, lastUpdatedBy, businessDate, businessType)
values
<foreach collection="list" item="entity" separator=",">
(#{entity.id},#{entity.headerid},#{entity.receiptcode},#{entity.skucode},#{entity.skuname},#{entity.quantity},#{entity.inventorysts},#{entity.created},#{entity.createdby},#{entity.lastupdated},#{entity.lastupdatedby},#{entity.businessdate},#{entity.businesstype})
</foreach>
on duplicate key update
id = values(id),
headerId = values(headerId),
receiptCode = values(receiptCode),
skuCode = values(skuCode),
skuName = values(skuName),
quantity = values(quantity),
inventorySts = values(inventorySts),
created = values(created),
createdBy = values(createdBy),
lastUpdated = values(lastUpdated),
lastUpdatedBy = values(lastUpdatedBy),
businessDate = values(businessDate),
businessType = values(businessType)
</insert>
<!-- 批量更新入库或者退款完成的状态-->
<insert id="entityInsertOrUpdateBatchV2" keyProperty="id" useGeneratedKeys="true">
insert into ofs_passiveorder_detail(id,newPushDate, newTransmitInfo, newState, newsystemnumber, newsystemprimary,def1,def2,def3,def4,def5,def6,def7,def8,def9,def10)
values
<foreach collection="list" item="entity" separator=",">
(#{entity.id},#{entity.newpushdate},#{entity.newtransmitinfo},#{entity.newstate},#{entity.newsystemnumber},#{entity.newsystemprimary},#{entity.def1},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10})
</foreach>
on duplicate key update
id = values(id),
newPushDate = values(newPushDate),
newTransmitInfo = values(newTransmitInfo),
newState = values(newState),
newsystemnumber = values(newsystemnumber),
newsystemprimary = values(newsystemprimary),
def1 = values(def1),
def2 = values(def2),
def3 = values(def3),
def4 = values(def4),
def5 = values(def5),
def6 = values(def6),
def7 = values(def7),
def8 = values(def8),
def9 = values(def9),
def10 = values(def10)
</insert>
<!-- 批量更新入库或者退款完成的状态-->
<insert id="entityInsertOrUpdateBatchV3" keyProperty="id" useGeneratedKeys="true">
insert into ofs_passiveorder_detail(id,newPushDate2, newTransmitInfo2, newState2, newsystemnumber2, newsystemprimary2,def1,def2,def3,def4,def5,def6,def7,def8,def9,def10)
values
<foreach collection="list" item="entity" separator=",">
(#{entity.id},#{entity.newpushdate2},#{entity.newtransmitinfo2},#{entity.newstate2},#{entity.newsystemnumber2},#{entity.newsystemprimary2},#{entity.def1},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.def10})
</foreach>
on duplicate key update
id = values(id),
newPushDate2 = values(newPushDate2),
newTransmitInfo2 = values(newTransmitInfo2),
newState2 = values(newState2),
newsystemnumber2 = values(newsystemnumber2),
newsystemprimary2 = values(newsystemprimary2),
def1 = values(def1),
def2 = values(def2),
def3 = values(def3),
def4 = values(def4),
def5 = values(def5),
def6 = values(def6),
def7 = values(def7),
def8 = values(def8),
def9 = values(def9),
def10 = values(def10)
</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderDetailEntity" >
update ofs_passiveorder_detail set
<trim suffix="" suffixOverrides=",">
<if test="headerid != null and headerid != ''"> headerId = #{headerid},</if>
<if test="receiptcode != null and receiptcode != ''"> receiptCode = #{receiptcode},</if>
<if test="skucode != null and skucode != ''"> skuCode = #{skucode},</if>
<if test="skuname != null and skuname != ''"> skuName = #{skuname},</if>
<if test="quantity != null and quantity != ''"> quantity = #{quantity},</if>
<if test="inventorysts != null and inventorysts != ''"> inventorySts = #{inventorysts},</if>
<if test="created != null and created != ''"> created = #{created},</if>
<if test="createdby != null and createdby != ''"> createdBy = #{createdby},</if>
<if test="lastupdated != null and lastupdated != ''"> lastUpdated = #{lastupdated},</if>
<if test="lastupdatedby != null and lastupdatedby != ''"> lastUpdatedBy = #{lastupdatedby},</if>
<if test="businessdate != null and businessdate != ''"> businessDate = #{businessdate},</if>
<if test="businesstype != null and businesstype != ''"> businessType = #{businesstype},</if>
<if test="newpushdate != null and newpushdate != ''"> newPushDate = #{newpushdate},</if>
<if test="newtransmitinfo != null and newtransmitinfo != ''"> newTransmitInfo = #{newtransmitinfo},</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="newpushdate2 != null and newpushdate2 != ''"> newPushDate2 = #{newpushdate2},</if>
<if test="newtransmitinfo2 != null and newtransmitinfo2 != ''"> newTransmitInfo2 = #{newtransmitinfo2},</if>
<if test="newstate2 != null and newstate2 != ''"> newState2 = #{newstate2},</if>
<if test="newsystemnumber2 != null and newsystemnumber2 != ''"> newsystemnumber2 = #{newsystemnumber2},</if>
<if test="newsystemprimary2 != null and newsystemprimary2 != ''"> newsystemprimary2 = #{newsystemprimary2},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderDetailEntity" >
update ofs_passiveorder_detail set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderDetailEntity" >
update ofs_passiveorder_detail set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="headerid != null and headerid != ''"> and headerId = #{headerid} </if>
<if test="receiptcode != null and receiptcode != ''"> and receiptCode = #{receiptcode} </if>
<if test="skucode != null and skucode != ''"> and skuCode = #{skucode} </if>
<if test="skuname != null and skuname != ''"> and skuName = #{skuname} </if>
<if test="quantity != null and quantity != ''"> and quantity = #{quantity} </if>
<if test="inventorysts != null and inventorysts != ''"> and inventorySts = #{inventorysts} </if>
<if test="created != null and created != ''"> and created = #{created} </if>
<if test="createdby != null and createdby != ''"> and createdBy = #{createdby} </if>
<if test="lastupdated != null and lastupdated != ''"> and lastUpdated = #{lastupdated} </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy = #{lastupdatedby} </if>
<if test="businessdate != null and businessdate != ''"> and businessDate = #{businessdate} </if>
<if test="businesstype != null and businesstype != ''"> and businessType = #{businesstype} </if>
<if test="newpushdate != null and newpushdate != ''"> and newPushDate = #{newpushdate} </if>
<if test="newtransmitinfo != null and newtransmitinfo != ''"> and newTransmitInfo = #{newtransmitinfo} </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="newpushdate2 != null and newpushdate2 != ''"> and newPushDate2 = #{newpushdate2} </if>
<if test="newtransmitinfo2 != null and newtransmitinfo2 != ''"> and newTransmitInfo2 = #{newtransmitinfo2} </if>
<if test="newstate2 != null and newstate2 != ''"> and newState2 = #{newstate2} </if>
<if test="newsystemnumber2 != null and newsystemnumber2 != ''"> and newsystemnumber2 = #{newsystemnumber2} </if>
<if test="newsystemprimary2 != null and newsystemprimary2 != ''"> and newsystemprimary2 = #{newsystemprimary2} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from ofs_passiveorder_detail where id = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,243 @@
package com.hzya.frame.plugin.lets.ofs.entity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* O无源件订单中台主表(OfsPassiveorderHeader)实体类
*
* @author makejava
* @since 2025-03-12 09:39:53
*/
public class OfsPassiveorderHeaderEntity extends BaseEntity {
/**
* 客户端编码(示例值:LETS)[1](@ref)
*/
private String clientcode;
/**
* 公司编码(示例值:SHLZ)[1](@ref)
*/
private String companycode;
/**
* 仓库设施编码(示例值:B2CHA20240033)[1](@ref)
*/
private String facilitycode;
/**
* 店铺编码(示例值:pdd-intoyoucz)[1](@ref)
*/
private String storecode;
/**
* 退货单号(示例值:RH20250220000460)[1](@ref)
*/
private String receiptcode;
/**
* 仓库编码(示例值:LETS2C)[1](@ref)
*/
private String warehousecode;
/**
* 退货运单号(示例值:1376811761602)[1](@ref)
*/
private String returnwaybillcode;
/**
* 源退货单号(示例值:117180732225)[1](@ref)
*/
private String sourcereturncode;
/**
* 源订单号(示例值:250206-088457951590214)[1](@ref)
*/
private String sourceordercode;
/**
* 退货订单号(示例值:LETS-RO2025021500008714)[1](@ref)
*/
private String returnordercode;
/**
* 实际退款金额(示例值:29.9)[1](@ref)
*/
private String actualrefundamount;
/**
* 退货时间(ISO8601格式)[1](@ref)
*/
private String returntime;
/**
* 关联时间(ISO8601格式)[1](@ref)
*/
private String relatedat;
/**
* 状态码(示例值:2)[1](@ref)
*/
private String status;
/**
* 创建时间[1](@ref)
*/
private String created;
/**
* 创建人(示例值:api)[1](@ref)
*/
private String createdby;
/**
* 最后更新时间[1](@ref)
*/
private String lastupdated;
/**
* 最后更新人[1](@ref)
*/
private String lastupdatedby;
/**
* 根据 id 多次查询
*/
private String ids;
public String getIds() {
return ids;
}
public void setIds(String ids) {
this.ids = ids;
}
public String getClientcode() {
return clientcode;
}
public void setClientcode(String clientcode) {
this.clientcode = clientcode;
}
public String getCompanycode() {
return companycode;
}
public void setCompanycode(String companycode) {
this.companycode = companycode;
}
public String getFacilitycode() {
return facilitycode;
}
public void setFacilitycode(String facilitycode) {
this.facilitycode = facilitycode;
}
public String getStorecode() {
return storecode;
}
public void setStorecode(String storecode) {
this.storecode = storecode;
}
public String getReceiptcode() {
return receiptcode;
}
public void setReceiptcode(String receiptcode) {
this.receiptcode = receiptcode;
}
public String getWarehousecode() {
return warehousecode;
}
public void setWarehousecode(String warehousecode) {
this.warehousecode = warehousecode;
}
public String getReturnwaybillcode() {
return returnwaybillcode;
}
public void setReturnwaybillcode(String returnwaybillcode) {
this.returnwaybillcode = returnwaybillcode;
}
public String getSourcereturncode() {
return sourcereturncode;
}
public void setSourcereturncode(String sourcereturncode) {
this.sourcereturncode = sourcereturncode;
}
public String getSourceordercode() {
return sourceordercode;
}
public void setSourceordercode(String sourceordercode) {
this.sourceordercode = sourceordercode;
}
public String getReturnordercode() {
return returnordercode;
}
public void setReturnordercode(String returnordercode) {
this.returnordercode = returnordercode;
}
public String getActualrefundamount() {
return actualrefundamount;
}
public void setActualrefundamount(String actualrefundamount) {
this.actualrefundamount = actualrefundamount;
}
public String getReturntime() {
return returntime;
}
public void setReturntime(String returntime) {
this.returntime = returntime;
}
public String getRelatedat() {
return relatedat;
}
public void setRelatedat(String relatedat) {
this.relatedat = relatedat;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public String getCreatedby() {
return createdby;
}
public void setCreatedby(String createdby) {
this.createdby = createdby;
}
public String getLastupdated() {
return lastupdated;
}
public void setLastupdated(String lastupdated) {
this.lastupdated = lastupdated;
}
public String getLastupdatedby() {
return lastupdatedby;
}
public void setLastupdatedby(String lastupdatedby) {
this.lastupdatedby = lastupdatedby;
}
}

View File

@ -0,0 +1,322 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.plugin.lets.ofs.dao.impl.OfsPassiveorderHeaderDaoImpl">
<resultMap id="get-OfsPassiveorderHeaderEntity-result" type="com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="clientcode" column="clientCode" jdbcType="VARCHAR"/>
<result property="companycode" column="companyCode" jdbcType="VARCHAR"/>
<result property="facilitycode" column="facilityCode" jdbcType="VARCHAR"/>
<result property="storecode" column="storeCode" jdbcType="VARCHAR"/>
<result property="receiptcode" column="receiptCode" jdbcType="VARCHAR"/>
<result property="warehousecode" column="warehouseCode" jdbcType="VARCHAR"/>
<result property="returnwaybillcode" column="returnWaybillCode" jdbcType="VARCHAR"/>
<result property="sourcereturncode" column="sourceReturnCode" jdbcType="VARCHAR"/>
<result property="sourceordercode" column="sourceOrderCode" jdbcType="VARCHAR"/>
<result property="returnordercode" column="returnOrderCode" jdbcType="VARCHAR"/>
<result property="actualrefundamount" column="actualRefundAmount" jdbcType="VARCHAR"/>
<result property="returntime" column="returnTime" jdbcType="VARCHAR"/>
<result property="relatedat" column="relatedAt" jdbcType="VARCHAR"/>
<result property="status" column="status" jdbcType="VARCHAR"/>
<result property="created" column="created" jdbcType="VARCHAR"/>
<result property="createdby" column="createdBy" jdbcType="VARCHAR"/>
<result property="lastupdated" column="lastUpdated" jdbcType="VARCHAR"/>
<result property="lastupdatedby" column="lastUpdatedBy" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "OfsPassiveorderHeaderEntity_Base_Column_List">
id
,clientCode
,companyCode
,facilityCode
,storeCode
,receiptCode
,warehouseCode
,returnWaybillCode
,sourceReturnCode
,sourceOrderCode
,returnOrderCode
,actualRefundAmount
,returnTime
,relatedAt
,status
,created
,createdBy
,lastUpdated
,lastUpdatedBy
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-OfsPassiveorderHeaderEntity-result" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity">
select
<include refid="OfsPassiveorderHeaderEntity_Base_Column_List" />
from ofs_passiveorder_header
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="clientcode != null and clientcode != ''"> and clientCode = #{clientcode} </if>
<if test="companycode != null and companycode != ''"> and companyCode = #{companycode} </if>
<if test="facilitycode != null and facilitycode != ''"> and facilityCode = #{facilitycode} </if>
<if test="storecode != null and storecode != ''"> and storeCode = #{storecode} </if>
<if test="receiptcode != null and receiptcode != ''"> and receiptCode = #{receiptcode} </if>
<if test="warehousecode != null and warehousecode != ''"> and warehouseCode = #{warehousecode} </if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> and returnWaybillCode = #{returnwaybillcode} </if>
<if test="sourcereturncode != null and sourcereturncode != ''"> and sourceReturnCode = #{sourcereturncode} </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode = #{sourceordercode} </if>
<if test="returnordercode != null and returnordercode != ''"> and returnOrderCode = #{returnordercode} </if>
<if test="actualrefundamount != null and actualrefundamount != ''"> and actualRefundAmount = #{actualrefundamount} </if>
<if test="returntime != null and returntime != ''"> and returnTime = #{returntime} </if>
<if test="relatedat != null and relatedat != ''"> and relatedAt = #{relatedat} </if>
<if test="status != null and status != ''"> and status = #{status} </if>
<if test="created != null and created != ''"> and created = #{created} </if>
<if test="createdby != null and createdby != ''"> and createdBy = #{createdby} </if>
<if test="lastupdated != null and lastupdated != ''"> and lastUpdated = #{lastupdated} </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy = #{lastupdatedby} </if>
and sts='Y'
</trim>
<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>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity">
select count(1) from ofs_passiveorder_header
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="clientcode != null and clientcode != ''"> and clientCode = #{clientcode} </if>
<if test="companycode != null and companycode != ''"> and companyCode = #{companycode} </if>
<if test="facilitycode != null and facilitycode != ''"> and facilityCode = #{facilitycode} </if>
<if test="storecode != null and storecode != ''"> and storeCode = #{storecode} </if>
<if test="receiptcode != null and receiptcode != ''"> and receiptCode = #{receiptcode} </if>
<if test="warehousecode != null and warehousecode != ''"> and warehouseCode = #{warehousecode} </if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> and returnWaybillCode = #{returnwaybillcode} </if>
<if test="sourcereturncode != null and sourcereturncode != ''"> and sourceReturnCode = #{sourcereturncode} </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode = #{sourceordercode} </if>
<if test="returnordercode != null and returnordercode != ''"> and returnOrderCode = #{returnordercode} </if>
<if test="actualrefundamount != null and actualrefundamount != ''"> and actualRefundAmount = #{actualrefundamount} </if>
<if test="returntime != null and returntime != ''"> and returnTime = #{returntime} </if>
<if test="relatedat != null and relatedat != ''"> and relatedAt = #{relatedat} </if>
<if test="status != null and status != ''"> and status = #{status} </if>
<if test="created != null and created != ''"> and created = #{created} </if>
<if test="createdby != null and createdby != ''"> and createdBy = #{createdby} </if>
<if test="lastupdated != null and lastupdated != ''"> and lastUpdated = #{lastupdated} </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy = #{lastupdatedby} </if>
and sts='Y'
</trim>
<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>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-OfsPassiveorderHeaderEntity-result" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity">
select
<include refid="OfsPassiveorderHeaderEntity_Base_Column_List" />
from ofs_passiveorder_header
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="clientcode != null and clientcode != ''"> and clientCode like concat('%',#{clientcode},'%') </if>
<if test="companycode != null and companycode != ''"> and companyCode like concat('%',#{companycode},'%') </if>
<if test="facilitycode != null and facilitycode != ''"> and facilityCode like concat('%',#{facilitycode},'%') </if>
<if test="storecode != null and storecode != ''"> and storeCode like concat('%',#{storecode},'%') </if>
<if test="receiptcode != null and receiptcode != ''"> and receiptCode like concat('%',#{receiptcode},'%') </if>
<if test="warehousecode != null and warehousecode != ''"> and warehouseCode like concat('%',#{warehousecode},'%') </if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> and returnWaybillCode like concat('%',#{returnwaybillcode},'%') </if>
<if test="sourcereturncode != null and sourcereturncode != ''"> and sourceReturnCode like concat('%',#{sourcereturncode},'%') </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode like concat('%',#{sourceordercode},'%') </if>
<if test="returnordercode != null and returnordercode != ''"> and returnOrderCode like concat('%',#{returnordercode},'%') </if>
<if test="actualrefundamount != null and actualrefundamount != ''"> and actualRefundAmount like concat('%',#{actualrefundamount},'%') </if>
<if test="returntime != null and returntime != ''"> and returnTime like concat('%',#{returntime},'%') </if>
<if test="relatedat != null and relatedat != ''"> and relatedAt like concat('%',#{relatedat},'%') </if>
<if test="status != null and status != ''"> and status like concat('%',#{status},'%') </if>
<if test="created != null and created != ''"> and created like concat('%',#{created},'%') </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="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy like concat('%',#{lastupdatedby},'%') </if>
and sts='Y'
</trim>
<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>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="OfsPassiveorderHeaderentity_list_or" resultMap="get-OfsPassiveorderHeaderEntity-result" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity">
select
<include refid="OfsPassiveorderHeaderEntity_Base_Column_List" />
from ofs_passiveorder_header
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="clientcode != null and clientcode != ''"> or clientCode = #{clientcode} </if>
<if test="companycode != null and companycode != ''"> or companyCode = #{companycode} </if>
<if test="facilitycode != null and facilitycode != ''"> or facilityCode = #{facilitycode} </if>
<if test="storecode != null and storecode != ''"> or storeCode = #{storecode} </if>
<if test="receiptcode != null and receiptcode != ''"> or receiptCode = #{receiptcode} </if>
<if test="warehousecode != null and warehousecode != ''"> or warehouseCode = #{warehousecode} </if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> or returnWaybillCode = #{returnwaybillcode} </if>
<if test="sourcereturncode != null and sourcereturncode != ''"> or sourceReturnCode = #{sourcereturncode} </if>
<if test="sourceordercode != null and sourceordercode != ''"> or sourceOrderCode = #{sourceordercode} </if>
<if test="returnordercode != null and returnordercode != ''"> or returnOrderCode = #{returnordercode} </if>
<if test="actualrefundamount != null and actualrefundamount != ''"> or actualRefundAmount = #{actualrefundamount} </if>
<if test="returntime != null and returntime != ''"> or returnTime = #{returntime} </if>
<if test="relatedat != null and relatedat != ''"> or relatedAt = #{relatedat} </if>
<if test="status != null and status != ''"> or status = #{status} </if>
<if test="created != null and created != ''"> or created = #{created} </if>
<if test="createdby != null and createdby != ''"> or createdBy = #{createdby} </if>
<if test="lastupdated != null and lastupdated != ''"> or lastUpdated = #{lastupdated} </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> or lastUpdatedBy = #{lastupdatedby} </if>
and sts='Y'
</trim>
<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>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity" keyProperty="id" useGeneratedKeys="true">
insert into ofs_passiveorder_header(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="clientcode != null and clientcode != ''"> clientCode , </if>
<if test="companycode != null and companycode != ''"> companyCode , </if>
<if test="facilitycode != null and facilitycode != ''"> facilityCode , </if>
<if test="storecode != null and storecode != ''"> storeCode , </if>
<if test="receiptcode != null and receiptcode != ''"> receiptCode , </if>
<if test="warehousecode != null and warehousecode != ''"> warehouseCode , </if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> returnWaybillCode , </if>
<if test="sourcereturncode != null and sourcereturncode != ''"> sourceReturnCode , </if>
<if test="sourceordercode != null and sourceordercode != ''"> sourceOrderCode , </if>
<if test="returnordercode != null and returnordercode != ''"> returnOrderCode , </if>
<if test="actualrefundamount != null and actualrefundamount != ''"> actualRefundAmount , </if>
<if test="returntime != null and returntime != ''"> returnTime , </if>
<if test="relatedat != null and relatedat != ''"> relatedAt , </if>
<if test="status != null and status != ''"> status , </if>
<if test="created != null and created != ''"> created , </if>
<if test="createdby != null and createdby != ''"> createdBy , </if>
<if test="lastupdated != null and lastupdated != ''"> lastUpdated , </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> lastUpdatedBy , </if>
<if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if>
<if test="clientcode != null and clientcode != ''"> #{clientcode} ,</if>
<if test="companycode != null and companycode != ''"> #{companycode} ,</if>
<if test="facilitycode != null and facilitycode != ''"> #{facilitycode} ,</if>
<if test="storecode != null and storecode != ''"> #{storecode} ,</if>
<if test="receiptcode != null and receiptcode != ''"> #{receiptcode} ,</if>
<if test="warehousecode != null and warehousecode != ''"> #{warehousecode} ,</if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> #{returnwaybillcode} ,</if>
<if test="sourcereturncode != null and sourcereturncode != ''"> #{sourcereturncode} ,</if>
<if test="sourceordercode != null and sourceordercode != ''"> #{sourceordercode} ,</if>
<if test="returnordercode != null and returnordercode != ''"> #{returnordercode} ,</if>
<if test="actualrefundamount != null and actualrefundamount != ''"> #{actualrefundamount} ,</if>
<if test="returntime != null and returntime != ''"> #{returntime} ,</if>
<if test="relatedat != null and relatedat != ''"> #{relatedat} ,</if>
<if test="status != null and status != ''"> #{status} ,</if>
<if test="created != null and created != ''"> #{created} ,</if>
<if test="createdby != null and createdby != ''"> #{createdby} ,</if>
<if test="lastupdated != null and lastupdated != ''"> #{lastupdated} ,</if>
<if test="lastupdatedby != null and lastupdatedby != ''"> #{lastupdatedby} ,</if>
<if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from ofs_passiveorder_header a WHERE a.sts = 'Y' ),</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into ofs_passiveorder_header(clientCode, companyCode, facilityCode, storeCode, receiptCode, warehouseCode, returnWaybillCode, sourceReturnCode, sourceOrderCode, returnOrderCode, actualRefundAmount, returnTime, relatedAt, status, created, createdBy, lastUpdated, lastUpdatedBy, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.clientcode},#{entity.companycode},#{entity.facilitycode},#{entity.storecode},#{entity.receiptcode},#{entity.warehousecode},#{entity.returnwaybillcode},#{entity.sourcereturncode},#{entity.sourceordercode},#{entity.returnordercode},#{entity.actualrefundamount},#{entity.returntime},#{entity.relatedat},#{entity.status},#{entity.created},#{entity.createdby},#{entity.lastupdated},#{entity.lastupdatedby}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into ofs_passiveorder_header(id,clientCode, companyCode, facilityCode, storeCode, receiptCode, warehouseCode, returnWaybillCode, sourceReturnCode, sourceOrderCode, returnOrderCode, actualRefundAmount, returnTime, relatedAt, status, created, createdBy, lastUpdated, lastUpdatedBy)
values
<foreach collection="list" item="entity" separator=",">
(#{entity.id},#{entity.clientcode},#{entity.companycode},#{entity.facilitycode},#{entity.storecode},#{entity.receiptcode},#{entity.warehousecode},#{entity.returnwaybillcode},#{entity.sourcereturncode},#{entity.sourceordercode},#{entity.returnordercode},#{entity.actualrefundamount},#{entity.returntime},#{entity.relatedat},#{entity.status},#{entity.created},#{entity.createdby},#{entity.lastupdated},#{entity.lastupdatedby})
</foreach>
on duplicate key update
id = values(id),
clientCode = values(clientCode),
companyCode = values(companyCode),
facilityCode = values(facilityCode),
storeCode = values(storeCode),
receiptCode = values(receiptCode),
warehouseCode = values(warehouseCode),
returnWaybillCode = values(returnWaybillCode),
sourceReturnCode = values(sourceReturnCode),
sourceOrderCode = values(sourceOrderCode),
returnOrderCode = values(returnOrderCode),
actualRefundAmount = values(actualRefundAmount),
returnTime = values(returnTime),
relatedAt = values(relatedAt),
status = values(status),
created = values(created),
createdBy = values(createdBy),
lastUpdated = values(lastUpdated),
lastUpdatedBy = values(lastUpdatedBy)
</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity" >
update ofs_passiveorder_header set
<trim suffix="" suffixOverrides=",">
<if test="clientcode != null and clientcode != ''"> clientCode = #{clientcode},</if>
<if test="companycode != null and companycode != ''"> companyCode = #{companycode},</if>
<if test="facilitycode != null and facilitycode != ''"> facilityCode = #{facilitycode},</if>
<if test="storecode != null and storecode != ''"> storeCode = #{storecode},</if>
<if test="receiptcode != null and receiptcode != ''"> receiptCode = #{receiptcode},</if>
<if test="warehousecode != null and warehousecode != ''"> warehouseCode = #{warehousecode},</if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> returnWaybillCode = #{returnwaybillcode},</if>
<if test="sourcereturncode != null and sourcereturncode != ''"> sourceReturnCode = #{sourcereturncode},</if>
<if test="sourceordercode != null and sourceordercode != ''"> sourceOrderCode = #{sourceordercode},</if>
<if test="returnordercode != null and returnordercode != ''"> returnOrderCode = #{returnordercode},</if>
<if test="actualrefundamount != null and actualrefundamount != ''"> actualRefundAmount = #{actualrefundamount},</if>
<if test="returntime != null and returntime != ''"> returnTime = #{returntime},</if>
<if test="relatedat != null and relatedat != ''"> relatedAt = #{relatedat},</if>
<if test="status != null and status != ''"> status = #{status},</if>
<if test="created != null and created != ''"> created = #{created},</if>
<if test="createdby != null and createdby != ''"> createdBy = #{createdby},</if>
<if test="lastupdated != null and lastupdated != ''"> lastUpdated = #{lastupdated},</if>
<if test="lastupdatedby != null and lastupdatedby != ''"> lastUpdatedBy = #{lastupdatedby},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity" >
update ofs_passiveorder_header set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity" >
update ofs_passiveorder_header set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="clientcode != null and clientcode != ''"> and clientCode = #{clientcode} </if>
<if test="companycode != null and companycode != ''"> and companyCode = #{companycode} </if>
<if test="facilitycode != null and facilitycode != ''"> and facilityCode = #{facilitycode} </if>
<if test="storecode != null and storecode != ''"> and storeCode = #{storecode} </if>
<if test="receiptcode != null and receiptcode != ''"> and receiptCode = #{receiptcode} </if>
<if test="warehousecode != null and warehousecode != ''"> and warehouseCode = #{warehousecode} </if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> and returnWaybillCode = #{returnwaybillcode} </if>
<if test="sourcereturncode != null and sourcereturncode != ''"> and sourceReturnCode = #{sourcereturncode} </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode = #{sourceordercode} </if>
<if test="returnordercode != null and returnordercode != ''"> and returnOrderCode = #{returnordercode} </if>
<if test="actualrefundamount != null and actualrefundamount != ''"> and actualRefundAmount = #{actualrefundamount} </if>
<if test="returntime != null and returntime != ''"> and returnTime = #{returntime} </if>
<if test="relatedat != null and relatedat != ''"> and relatedAt = #{relatedat} </if>
<if test="status != null and status != ''"> and status = #{status} </if>
<if test="created != null and created != ''"> and created = #{created} </if>
<if test="createdby != null and createdby != ''"> and createdBy = #{createdby} </if>
<if test="lastupdated != null and lastupdated != ''"> and lastUpdated = #{lastupdated} </if>
<if test="lastupdatedby != null and lastupdatedby != ''"> and lastUpdatedBy = #{lastupdatedby} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from ofs_passiveorder_header where id = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,14 @@
package com.hzya.frame.plugin.lets.ofs.service;
import com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderDetailEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* O无源件订单中台明细表(OfsPassiveorderDetail)表服务接口
*
* @author makejava
* @since 2025-03-12 09:40:26
*/
public interface IOfsPassiveorderDetailService extends IBaseService<OfsPassiveorderDetailEntity, String> {
}

View File

@ -0,0 +1,14 @@
package com.hzya.frame.plugin.lets.ofs.service;
import com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* O无源件订单中台主表(OfsPassiveorderHeader)表服务接口
*
* @author makejava
* @since 2025-03-12 09:39:53
*/
public interface IOfsPassiveorderHeaderService extends IBaseService<OfsPassiveorderHeaderEntity, String> {
}

View File

@ -0,0 +1,28 @@
package com.hzya.frame.plugin.lets.ofs.service.impl;
import com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderDetailEntity;
import com.hzya.frame.plugin.lets.ofs.dao.IOfsPassiveorderDetailDao;
import com.hzya.frame.plugin.lets.ofs.service.IOfsPassiveorderDetailService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* O无源件订单中台明细表(OfsPassiveorderDetail)表服务实现类
*
* @author makejava
* @since 2025-03-12 09:40:26
*/
public class OfsPassiveorderDetailServiceImpl extends BaseService<OfsPassiveorderDetailEntity, String> implements IOfsPassiveorderDetailService {
private IOfsPassiveorderDetailDao ofsPassiveorderDetailDao;
@Autowired
public void setOfsPassiveorderDetailDao(IOfsPassiveorderDetailDao dao) {
this.ofsPassiveorderDetailDao = dao;
this.dao = dao;
}
}

View File

@ -0,0 +1,28 @@
package com.hzya.frame.plugin.lets.ofs.service.impl;
import com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity;
import com.hzya.frame.plugin.lets.ofs.dao.IOfsPassiveorderHeaderDao;
import com.hzya.frame.plugin.lets.ofs.service.IOfsPassiveorderHeaderService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* O无源件订单中台主表(OfsPassiveorderHeader)表服务实现类
*
* @author makejava
* @since 2025-03-12 09:39:53
*/
public class OfsPassiveorderHeaderServiceImpl extends BaseService<OfsPassiveorderHeaderEntity, String> implements IOfsPassiveorderHeaderService {
private IOfsPassiveorderHeaderDao ofsPassiveorderHeaderDao;
@Autowired
public void setOfsPassiveorderHeaderDao(IOfsPassiveorderHeaderDao dao) {
this.ofsPassiveorderHeaderDao = dao;
this.dao = dao;
}
}

View File

@ -60,8 +60,8 @@ public class QueryOfsSoSaleOutVo {
private String receivedAt_start;
//确认单收货时间-结束
private String receivedAt_end;
//售后入库确认单关联时间-开始
//无源入库确认单关联时间-开始
private String relatedAt_start;
//售后入库确认单关联时间-结束
//无源入库确认单关联时间-结束
private String relatedAt_end;
}

View File

@ -0,0 +1,43 @@
package com.hzya.frame.plugin.lets.u8cdto;
import com.hzya.frame.ttxofs.dto.passivestorage.PassiveStorageResponse;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.u8cdto
* @ProjectkangarooDataCenterV3
* @nameErrorHeaderDetailsDtoDto
* @Date2024/9/5 15:48
* @FilenameErrorHeaderDetailsDtoDto
*/
@Data
public class ErrorHeaderDetailsDtoDtoV3 extends PassiveStorageResponse.Data {
//(销售)推送时间
private String newPushDate;
//(销售)报错详情
private String newTransmitInfo;
//(销售)出库同步是否成功
private String newstate;
//推送时间
private String def5;
//报错详情
private String def6;
//(销售)交易成功(TOB发票)是否成功
private String newstate4;
//下游单号
private String newSystemNumber4;
//下游主键
private String newSystemPrimary4;
//(销售)推送时间
private String newPushDate2;
//(销售)报错详情
private String newTransmitInfo2;
//(销售)出库同步是否成功
private String newstate2;
//下游单据
private String newsystemnumber;
//下游主键
private String newsystemprimary;
}

View File

@ -0,0 +1,145 @@
package com.hzya.frame.plugin.lets.u8cdto;
import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.ttxofs.dto.passivestorage.PassiveStorageResponse;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
import lombok.Data;
import java.math.BigDecimal;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.ttxofs.dto.u8cson
* @ProjectkangarooDataCenterV3
* @nameSonDetailsDto
* @Date2024/8/5 16:07
* @FilenameSonDetailsDto
*/
@Data
public class PassiveStorageSonDetailsDto extends PassiveStorageResponse.Details {
/**
* 表头对象
*/
private PassiveStorageResponse.Header header;
/**
* 表头公司销售公司
*/
private BdCorpEntity bdCorpEntity;
/**
* 发货库存组织
*/
private BdCalbodyEntity bdCalbodyEntity;
/**
* 发货仓库
*/
private BdStordocEntity bdStordocEntity;
/**
* 收货库存组织
*/
private BdCalbodyEntity bdCalbodyEntity1;
/**
* 收货仓库
*/
private BdStordocEntity bdStordocEntity1;
/**
* 销售组织
*/
private BdSalestruEntity bdSalestruEntity;
/**
* 业务部门
*/
private BdDeptdocEntity bdDeptdocEntity;
/**
* 客商管理档案
*/
private BdCumandocEntity bdCumandocEntity;
/**
* 客商基本档案
*/
private BdCubasdocEntity bdCubasdocEntity;
/**
* 生成汇总维度字符串
*/
private String summaryDimensionStr;
/**
* 汇总总金额
*/
private BigDecimal groupTotalPayAmount;
/**
* 汇总实发数量
*/
private BigDecimal groupShipQty;
/**
* 发货公司
*/
private BdCorpEntity deliverGoodsCorp;
/**
* U8C平台档案
*/
private BdDefdocEntity platformArchives;
/**
* U8C店铺档案
*/
private BdDefdocEntity shopArchives;
/**
* OFS收发类别
*/
private BdRdclEntity bdRdclEntity;
/**
* 存货管理档案
*/
private BdInvmandocEntity bdInvmandocEntity;
/**
* 存货基本档案
*/
private BdInvbasdocEntity bdInvbasdocEntity;
/**
* 存货税率
*/
private BdTaxitemsEntity bdTaxitemsEntity;
//累加平台优惠
private BigDecimal vdef4;
//累加支付优惠
private BigDecimal vdef5;
//累加达人优惠
private BigDecimal vdef6;
//累加商家优惠
private BigDecimal vdef7;
//把销售订单明细行对应的优惠金额保存到销售出库单明细行一份便于存储到中台的底表
//计算应收
private String calculateAccountsReceivable;
//计算公式
private String calculationFormula;
//平台优惠
private String platformDiscounts;
//商家优惠
private String merchantDiscounts;
//达人优惠
private String expertDiscounts;
//支付优惠
private String payDiscounts;
}

View File

@ -15,6 +15,7 @@ import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto;
import com.hzya.frame.ttxofs.dto.ofswareconfirma.OfsWareConfirmaResponse;
import com.hzya.frame.ttxofs.dto.passivestorage.PassiveStorageResponse;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
import org.slf4j.Logger;
@ -323,4 +324,43 @@ public class OfsStandardUtil {
logger.error("rertunGoodsRootBean为空interfaceParamDto对象的结果集json{}", JSON.toJSON(interfaceParamDto));
}
}
/**
* OFS无源入库单查询
*
* @param queryOfsSoSaleOutVo 接口入参
* @param headerDetailsDtoList 收集对象
* @param pageNo 从第几页开始查询
* @param api api接口名称
* @author liuyang
*/
public void queryOfsPassiveComponents(QueryOfsSoSaleOutVo queryOfsSoSaleOutVo, List<PassiveStorageResponse.Data> headerDetailsDtoList, Long pageNo, String api) throws Exception {
Assert.notNull(queryOfsSoSaleOutVo, "queryOfsSoSaleOutVo不能为空");
Assert.notNull(headerDetailsDtoList, "headerDetailsDtoList不能为空");
Assert.notNull(pageNo, "pageNo不能为空");
Assert.notNull(api, "api不能为空");
Long pageSize = 200L;
queryOfsSoSaleOutVo.setPageNo(pageNo);
queryOfsSoSaleOutVo.setPageSize(pageSize);
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
interfaceParamDto.setApi(api);
interfaceParamDto.setData(JSON.toJSONString(queryOfsSoSaleOutVo));
PassiveStorageResponse passiveStorageResponse = (PassiveStorageResponse) ofsUnifiedService.unified(interfaceParamDto);
if (passiveStorageResponse != null) {
if ("false".equals(passiveStorageResponse.getError()) && "0".equals(passiveStorageResponse.getCode()) && "Success".equals(passiveStorageResponse.getMsg())) {
List<PassiveStorageResponse.Data> data = passiveStorageResponse.getData();
if (data != null && data.size() > 0) {
headerDetailsDtoList.addAll(data);
queryOfsPassiveComponents(queryOfsSoSaleOutVo, headerDetailsDtoList, ++pageNo, api);
}
} else {
logger.error("查询失败,失败原因:{}", JSON.toJSON(interfaceParamDto));
}
} else {
logger.error("passiveStorageResponse为空interfaceParamDto对象的结果集json{}", JSON.toJSON(interfaceParamDto));
}
}
}

View File

@ -0,0 +1,651 @@
package com.hzya.frame.plugin.lets.util;
import cn.hutool.core.lang.Assert;
import com.hzya.frame.plugin.lets.constant.OverallConstant;
import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.resultvo.CacheTocMapVoV2;
import com.hzya.frame.split.SplitListByCountUtil;
import com.hzya.frame.ttxofs.dto.passivestorage.PassiveStorageResponse;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.*;
import java.util.stream.Collectors;
/**
* 档案类缓存TOC销售订单转换
*
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.util
* @ProjectkangarooDataCenterV3
* @nameBasicArchivesCacheUtil
* @Date2024/7/31 11:27
* @FilenameBasicArchivesCacheUtil
*/
@Component
public class PassiveComponentsArchivesCacheUtil {
@Autowired
private IBdCorpDao iBdCorpDao;
@Autowired
private IBdStordocDao iBdStordocDao;
@Autowired
private IBdCalbodyDao iBdCalbodyDao;
@Autowired
private IBdSalestruDao iBdSalestruDao;
@Autowired
private IBdDeptdocDao iBdDeptdocDao;
@Autowired
private IBdCumandocDao iBdCumandocDao;
@Autowired
private IBdInvmandocDao iBdInvmandocDao;
@Autowired
private IBdInvbasdocDao iBdInvbasdocDao;
@Autowired
private IBdTaxitemsDao iBdTaxitemsDao;
@Autowired
private IBdCubasdocDao iBdCubasdocDao;
@Autowired
private IBdDefdocDao iBdDefdocDao;
@Autowired
private IBdRdclDao iBdRdclDao;
// public static Map<String, BdCorpEntity> stringBdCorpEntityMap = new HashMap<>();
/**
* 初始化公司档案-表头公司
* 2024年7月31日 11:16:23
*/
private Map<String, BdCorpEntity> initShop() throws Exception {
Map<String, BdCorpEntity> stringBdCorpEntityMap = new HashMap<>();
BdCorpEntity bdCorpEntity = new BdCorpEntity();
bdCorpEntity.setDr(0);
bdCorpEntity.setDataSourceCode("lets_u8c");
List<BdCorpEntity> bdCorpEntityList = iBdCorpDao.query(bdCorpEntity);
if (bdCorpEntityList != null && bdCorpEntityList.size() > 0) {
for (int i = 0; i < bdCorpEntityList.size(); i++) {
BdCorpEntity bdCorpEntity1 = bdCorpEntityList.get(i);
stringBdCorpEntityMap.put(bdCorpEntity1.getUnitcode(), bdCorpEntity1);
}
}
return stringBdCorpEntityMap;
}
// public static Map<String, BdStordocEntity> stringBdStordocEntityMap = new HashMap<>();
/**
* 初始化发货仓库
* 2024年7月31日 11:16:27
* 202403011513仓库根据仓库编码+库存组织编码去查询之前是仓库编码+公司主键和李佳妮确认好了
*/
private Map<String, BdStordocEntity> initBdStordoc() throws Exception {
Map<String, BdStordocEntity> stringBdStordocEntityMap = new HashMap<>();
BdStordocEntity bdStordocEntity = new BdStordocEntity();
bdStordocEntity.setDr(0L);
bdStordocEntity.setDataSourceCode("lets_u8c");
List<BdStordocEntity> bdStordocEntityList = iBdStordocDao.query(bdStordocEntity);
if (bdStordocEntityList != null && bdStordocEntityList.size() > 0) {
for (int i = 0; i < bdStordocEntityList.size(); i++) {
BdStordocEntity bdStordocEntity1 = bdStordocEntityList.get(i);
stringBdStordocEntityMap.put(bdStordocEntity1.getStorcode() + bdStordocEntity1.getPkCalbody(), bdStordocEntity1);
}
}
return stringBdStordocEntityMap;
}
/**
* 2024年7月31日 11:09:12 查询发货库存组织
*/
// public static Map<String, BdCalbodyEntity> stringBdCalbodyEntityMap = new HashMap<>();
private Map<String, BdCalbodyEntity> initBdCalbody() throws Exception {
Map<String, BdCalbodyEntity> stringBdCalbodyEntityMap = new HashMap<>();
BdCalbodyEntity bdCalbodyEntity = new BdCalbodyEntity();
bdCalbodyEntity.setDr(0);
bdCalbodyEntity.setDataSourceCode("lets_u8c");
List<BdCalbodyEntity> bdCalbodyEntities = iBdCalbodyDao.query(bdCalbodyEntity);
if (bdCalbodyEntities != null && bdCalbodyEntities.size() > 0) {
for (int i = 0; i < bdCalbodyEntities.size(); i++) {
BdCalbodyEntity bdCalbodyEntity1 = bdCalbodyEntities.get(i);
stringBdCalbodyEntityMap.put(bdCalbodyEntity1.getPkCorp(), bdCalbodyEntity1);
}
}
return stringBdCalbodyEntityMap;
}
/**
* 初始化销售组织
*/
// public static Map<String, BdSalestruEntity> stringBdSalestruEntityMap = new HashMap<>();
private Map<String, BdSalestruEntity> initBdSalestru() throws Exception {
Map<String, BdSalestruEntity> stringBdSalestruEntityMap = new HashMap<>();
BdSalestruEntity bdSalestruEntity = new BdSalestruEntity();
bdSalestruEntity.setDr(0);
bdSalestruEntity.setDataSourceCode("lets_u8c");
List<BdSalestruEntity> bdSalestruEntityList = iBdSalestruDao.query(bdSalestruEntity);
if (bdSalestruEntityList != null && bdSalestruEntityList.size() > 0) {
for (int i = 0; i < bdSalestruEntityList.size(); i++) {
BdSalestruEntity bdSalestruEntity1 = bdSalestruEntityList.get(i);
stringBdSalestruEntityMap.put(bdSalestruEntity1.getVsalestruname(), bdSalestruEntity1);
}
}
return stringBdSalestruEntityMap;
}
/**
* 初始化业务部门
*
* @author liuyang
*/
// public static Map<String, BdDeptdocEntity> stringBdDeptdocEntityMap = new HashMap<>();
private List<Map<String, BdDeptdocEntity>> initDept() {
List<Map<String, BdDeptdocEntity>> bddeptdocEntityList = new ArrayList<>();
Map<String, BdDeptdocEntity> stringBdDeptdocEntityMap1 = new HashMap<>();
Map<String, BdDeptdocEntity> stringBdDeptdocEntityMap2 = new HashMap<>();
bddeptdocEntityList.add(stringBdDeptdocEntityMap1);
bddeptdocEntityList.add(stringBdDeptdocEntityMap2);
String deptName = "业务部门";
BdDeptdocEntity bdDeptdocEntity = new BdDeptdocEntity();
bdDeptdocEntity.setDataSourceCode("lets_u8c");
bdDeptdocEntity.setDr(0);
bdDeptdocEntity.setDeptname(deptName);
List<BdDeptdocEntity> bdDeptdocEntityList = iBdDeptdocDao.query(bdDeptdocEntity);
if (bdDeptdocEntityList != null && bdDeptdocEntityList.size() > 0) {
for (int i = 0; i < bdDeptdocEntityList.size(); i++) {
BdDeptdocEntity bdDeptdocEntity1 = bdDeptdocEntityList.get(i);
stringBdDeptdocEntityMap1.put(bdDeptdocEntity1.getPkCorp(), bdDeptdocEntity1);
}
}
BdDeptdocEntity bdDeptdocEntity2 = new BdDeptdocEntity();
bdDeptdocEntity2.setDataSourceCode("lets_u8c");
bdDeptdocEntity2.setDr(0);
List<BdDeptdocEntity> bdDeptdocEntityList2 = iBdDeptdocDao.query(bdDeptdocEntity2);
if (bdDeptdocEntityList2 != null && bdDeptdocEntityList2.size() > 0) {
for (int i = 0; i < bdDeptdocEntityList2.size(); i++) {
BdDeptdocEntity bdDeptdocEntity1 = bdDeptdocEntityList2.get(i);
stringBdDeptdocEntityMap2.put(bdDeptdocEntity1.getDeptcode(), bdDeptdocEntity1);
}
}
return bddeptdocEntityList;
}
/**
* 初始化客商基本档案
*
* @author liuyang
*/
// public static Map<String, BdCubasdocEntity> stringBdCubasdocEntityHashMap = new HashMap<>();
// private Map<String, BdCubasdocEntity> initBdCubasdoc() {
// Map<String, BdCubasdocEntity> stringBdCubasdocEntityHashMap = new HashMap<>();
//
// BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity();
// bdCubasdocEntity.setDataSourceCode("lets_u8c");
// bdCubasdocEntity.setDr(0L);
// List<BdCubasdocEntity> bdCumandocEntityList = iBdCubasdocDao.query(bdCubasdocEntity);
// if (bdCumandocEntityList != null && bdCumandocEntityList.size() > 0) {
// for (int i = 0; i < bdCumandocEntityList.size(); i++) {
// BdCubasdocEntity bdCubasdocEntity1 = bdCumandocEntityList.get(i);
// stringBdCubasdocEntityHashMap.put(bdCubasdocEntity1.getCustname(), bdCubasdocEntity1);
// }
// }
// return stringBdCubasdocEntityHashMap;
// }
//O店铺编码=U8C客商档案def1
private Map<String, BdCubasdocEntity> initBdCubasdocV2(List<PassiveStorageResponse.Header> headerDtoList) {
Map<String, BdCubasdocEntity> stringBdCubasdocEntityMap = new HashMap<>();
List<BdCubasdocEntity> allBdCumandocEntityList = new ArrayList<>();
if (headerDtoList != null && headerDtoList.size() > 0) {
Set<String> stringSet = headerDtoList.stream().map(PassiveStorageResponse.Header::getStoreCode).collect(Collectors.toSet());
List<String> stringList = stringSet.stream().collect(Collectors.toList());
List<List<String>> lists = SplitListByCountUtil.splitListByCount(stringList, 900);
for (int i = 0; i < lists.size(); i++) {
List<String> strings = lists.get(i);
String codesStr = strings.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(","));
if (codesStr != null && codesStr.length() > 0) {
BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity();
bdCubasdocEntity.setDataSourceCode("lets_u8c");
bdCubasdocEntity.setDr(0L);
bdCubasdocEntity.setDef1s(codesStr);
List<BdCubasdocEntity> bdCumandocEntityList = iBdCubasdocDao.query(bdCubasdocEntity);
allBdCumandocEntityList.addAll(bdCumandocEntityList);
}
}
}
if (allBdCumandocEntityList.size() > 0) {
for (int i = 0; i < allBdCumandocEntityList.size(); i++) {
BdCubasdocEntity bdCubasdocEntity = allBdCumandocEntityList.get(i);
if (bdCubasdocEntity.getDef1() != null) {
stringBdCubasdocEntityMap.put(bdCubasdocEntity.getDef1(), bdCubasdocEntity);
}
}
}
return stringBdCubasdocEntityMap;
}
/**
* 初始化客商管理档案
*
* @author liuyang
*/
// public static Map<String, BdCumandocEntity> stringBdCumandocEntityMap = new HashMap<>();
// private Map<String, BdCumandocEntity> initBdCumandoc() {
// Map<String, BdCumandocEntity> stringBdCumandocEntityMap = new HashMap<>();
//
// BdCumandocEntity bdCumandocEntity1 = new BdCumandocEntity();
// bdCumandocEntity1.setDataSourceCode("lets_u8c");
// bdCumandocEntity1.setDr(0L);
//// bdCumandocEntity1.setCustflags(ProfilesActiveConstant.CUSTOMER);//客商:2客户
// List<BdCumandocEntity> bdCumandocEntityList = iBdCumandocDao.query(bdCumandocEntity1);
// if (bdCumandocEntityList != null && bdCumandocEntityList.size() > 0) {
// for (int i = 0; i < bdCumandocEntityList.size(); i++) {
// BdCumandocEntity bdCumandocEntity = bdCumandocEntityList.get(i);
// stringBdCumandocEntityMap.put(bdCumandocEntity.getPkCubasdoc() + bdCumandocEntity.getPkCorp(), bdCumandocEntity);
// }
// }
// return stringBdCumandocEntityMap;
// }
/**
* 查询客商管理档案
*
* @author liuyang
*/
private Map<String, BdCumandocEntity> initBdCumandocV2(List<PassiveStorageResponse.Header> headerDtoList) throws Exception {
Map<String, BdCumandocEntity> stringBdCumandocEntityMap = new HashMap<>();
List<BdCumandocEntity> allBdCumandocEntityList = new ArrayList<>();
if (headerDtoList != null && headerDtoList.size() > 0) {
Set<String> stringSet = headerDtoList.stream().map(PassiveStorageResponse.Header::getStoreCode).collect(Collectors.toSet());
List<String> stringList = stringSet.stream().collect(Collectors.toList());
List<List<String>> lists = SplitListByCountUtil.splitListByCount(stringList, 900);
for (int i = 0; i < lists.size(); i++) {
List<String> strings = lists.get(i);
String codesStr = strings.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(","));
BdCumandocEntity bdCumandocEntity = new BdCumandocEntity();
bdCumandocEntity.setDataSourceCode("lets_u8c");
bdCumandocEntity.setDr(0L);
bdCumandocEntity.setDef1s(codesStr);
List<BdCumandocEntity> bdCumandocEntityList = iBdCumandocDao.query(bdCumandocEntity);
allBdCumandocEntityList.addAll(bdCumandocEntityList);
}
}
if (allBdCumandocEntityList.size() > 0) {
for (int i = 0; i < allBdCumandocEntityList.size(); i++) {
BdCumandocEntity bdCumandocEntity = allBdCumandocEntityList.get(i);
stringBdCumandocEntityMap.put(bdCumandocEntity.getPkCubasdoc() + bdCumandocEntity.getPkCorp(), bdCumandocEntity);
}
}
return stringBdCumandocEntityMap;
}
/**
* 初始化存货管理档案
*/
// public static Map<String, BdInvmandocEntity> stringBdInvmandocEntityMap = new HashMap<>();
// private Map<String, BdInvmandocEntity> initInventoryFile() throws Exception {
// Map<String, BdInvmandocEntity> stringBdInvmandocEntityMap = new HashMap<>();
//
// 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);
// }
// }
// return stringBdInvmandocEntityMap;
// }
public Map<String, BdInvmandocEntity> initInventoryFileV2(List<PassiveStorageResponse.Details> detailsDtos) throws Exception {
List<BdInvmandocEntity> allBdInvmandocEntity = new ArrayList<>();
Map<String, BdInvmandocEntity> stringBdInvmandocEntityMap = new HashMap<>();
if (detailsDtos != null && detailsDtos.size() > 0) {
Set<String> stringSet = detailsDtos.stream().map(PassiveStorageResponse.Details::getSkuCode).collect(Collectors.toSet());
List<String> stringList = stringSet.stream().collect(Collectors.toList());
List<List<String>> lists = SplitListByCountUtil.splitListByCount(stringList, 900);
for (int i = 0; i < lists.size(); i++) {
List<String> strings = lists.get(i);
String codesStr = strings.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(","));
if (codesStr != null && codesStr.length() > 0) {
BdInvmandocEntity bdInvmandocEntity = new BdInvmandocEntity();
bdInvmandocEntity.setInvcodes(codesStr);
List<BdInvmandocEntity> bdInvmandocEntity2 = iBdInvmandocDao.queryBdInvmandocByInvcodeList(bdInvmandocEntity);
allBdInvmandocEntity.addAll(bdInvmandocEntity2);
}
}
// List<List<StockinOrderSearchResponse.StockinOrder.StockinB>> lists = SplitListByCountUtil.splitListByCount(detailsDtos, 500);
// for (int i = 0; i < lists.size(); i++) {
// List<StockinOrderSearchResponse.StockinOrder.StockinB> stockinBList = lists.get(i);
// String idsStr = stockinBList.stream().map(StockinOrderSearchResponse.StockinOrder.StockinB::getSkuCode).map(id -> "'" + id + "'").collect(Collectors.joining(","));
//
// BdInvmandocEntity bdInvmandocEntity = new BdInvmandocEntity();
// bdInvmandocEntity.setInvcodes(idsStr);
// List<BdInvmandocEntity> bdInvmandocEntity2 = iBdInvmandocDao.queryBdInvmandocByInvcodeList(bdInvmandocEntity);
// allBdInvmandocEntity.addAll(bdInvmandocEntity2);
// }
}
if (allBdInvmandocEntity.size() > 0) {
for (int i = 0; i < allBdInvmandocEntity.size(); i++) {
BdInvmandocEntity bdInvmandocEntity = allBdInvmandocEntity.get(i);
stringBdInvmandocEntityMap.put(bdInvmandocEntity.getInvcode() + bdInvmandocEntity.getPkCorp(), bdInvmandocEntity);
}
}
return stringBdInvmandocEntityMap;
}
/**
* 初始化存货基本档案
* 2024年8月7日 10:57:55
*/
// public static Map<String, BdInvbasdocEntity> stringBdInvbasdocEntityHashMap = new HashMap<>();
// private Map<String, BdInvbasdocEntity> initBasicInventoryFile() throws Exception {
// Map<String, BdInvbasdocEntity> stringBdInvbasdocEntityHashMap = new HashMap<>();
//
// 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.getPk_corp_man(), bdInvbasdocEntity1);
// }
// }
// return stringBdInvbasdocEntityHashMap;
// }
/**
* 根据O存货商家编码初始化存货基本档案
*
* @author liuyang
*/
private Map<String, BdInvbasdocEntity> initBasicInventoryFileV2(List<PassiveStorageResponse.Details> detailsDtoList) throws Exception {
List<BdInvbasdocEntity> allBdInvbasdocEntityList = new ArrayList<>();
if (detailsDtoList != null && detailsDtoList.size() > 0) {
Set<String> stringSet = detailsDtoList.stream().map(PassiveStorageResponse.Details::getSkuCode).collect(Collectors.toSet());
List<String> stringList = stringSet.stream().collect(Collectors.toList());
List<List<String>> lists = SplitListByCountUtil.splitListByCount(stringList, 900);
for (int i = 0; i < lists.size(); i++) {
List<String> strings = lists.get(i);
String codesStr = strings.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(","));
if (codesStr != null && codesStr.length() > 0) {
BdInvbasdocEntity bdInvbasdocEntity = new BdInvbasdocEntity();
bdInvbasdocEntity.setInvcodes(codesStr);
List<BdInvbasdocEntity> bdInvbasdocEntities = iBdInvbasdocDao.queryBdInvbasdocByPkInvmandocV3(bdInvbasdocEntity);
allBdInvbasdocEntityList.addAll(bdInvbasdocEntities);
}
}
// List<List<StockinOrderSearchResponse.StockinOrder.StockinB>> lists = SplitListByCountUtil.splitListByCount(detailsDtoList, 500);
// for (int i = 0; i < lists.size(); i++) {
// List<StockinOrderSearchResponse.StockinOrder.StockinB> stockinBList = lists.get(i);
// String idsStr = stockinBList.stream().map(StockinOrderSearchResponse.StockinOrder.StockinB::getSkuCode).map(id -> "'" + id + "'").collect(Collectors.joining(","));
//
// BdInvbasdocEntity bdInvbasdocEntity = new BdInvbasdocEntity();
// bdInvbasdocEntity.setInvcodes(idsStr);
// List<BdInvbasdocEntity> bdInvbasdocEntities = iBdInvbasdocDao.queryBdInvbasdocByPkInvmandocV3(bdInvbasdocEntity);
// allBdInvbasdocEntityList.addAll(bdInvbasdocEntities);
// }
}
Map<String, BdInvbasdocEntity> stringBdInvbasdocEntityMap = new HashMap<>();
for (int i = 0; i < allBdInvbasdocEntityList.size(); i++) {
BdInvbasdocEntity bdInvbasdocEntity = allBdInvbasdocEntityList.get(i);
stringBdInvbasdocEntityMap.put(bdInvbasdocEntity.getInvcode(), bdInvbasdocEntity);
}
return stringBdInvbasdocEntityMap;
}
/**
* 2024年8月7日 10:59:30
* 初始化存货税率
*
* @author liuyang
*/
// public static Map<String, BdTaxitemsEntity> stringBdTaxitemsEntityHashMap = new HashMap<>();
// private Map<String, BdTaxitemsEntity> initBdTaxitemsEntity() throws Exception {
// Map<String, BdTaxitemsEntity> stringBdTaxitemsEntityHashMap = new HashMap<>();
//
// 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);
// }
// }
// return stringBdTaxitemsEntityHashMap;
// }
private Map<String, BdTaxitemsEntity> initBdTaxitemsEntityV2(List<PassiveStorageResponse.Details> detailsDtos) throws Exception {
List<BdTaxitemsEntity> allBdTaxitemsEntityList = new ArrayList<>();
Map<String, BdTaxitemsEntity> stringBdTaxitemsEntityMap = new HashMap<>();
if (detailsDtos != null && detailsDtos.size() > 0) {
Set<String> stringSet = detailsDtos.stream().map(PassiveStorageResponse.Details::getSkuCode).collect(Collectors.toSet());
List<String> stringList = stringSet.stream().collect(Collectors.toList());
List<List<String>> lists = SplitListByCountUtil.splitListByCount(stringList, 900);
for (int i = 0; i < lists.size(); i++) {
List<String> strings = lists.get(i);
String result = strings.stream().map(s -> "'" + s.trim() + "'").collect(Collectors.joining(","));
if (result != null && result.length() > 0) {
BdTaxitemsEntity bdTaxitemsEntity = new BdTaxitemsEntity();
bdTaxitemsEntity.setInvcodes(result);
List<BdTaxitemsEntity> bdTaxitemsEntityList = iBdTaxitemsDao.queryBdInvbasdocByInvcodeV2(bdTaxitemsEntity);
allBdTaxitemsEntityList.addAll(bdTaxitemsEntityList);
}
}
// List<List<StockinOrderSearchResponse.StockinOrder.StockinB>> lists = SplitListByCountUtil.splitListByCount(detailsDtos, 500);
// for (int i = 0; i < lists.size(); i++) {
// List<StockinOrderSearchResponse.StockinOrder.StockinB> stockinBList = lists.get(i);
// String codesStr = stockinBList.stream().map(StockinOrderSearchResponse.StockinOrder.StockinB::getSkuCode).map(id -> "'" + id + "'").collect(Collectors.joining(","));
//
// BdTaxitemsEntity bdTaxitemsEntity = new BdTaxitemsEntity();
// bdTaxitemsEntity.setInvcodes(codesStr);
// List<BdTaxitemsEntity> bdTaxitemsEntityList = iBdTaxitemsDao.queryBdInvbasdocByInvcodeV2(bdTaxitemsEntity);
// allBdTaxitemsEntityList.addAll(bdTaxitemsEntityList);
// }
}
if (allBdTaxitemsEntityList.size() > 0) {
for (int i = 0; i < allBdTaxitemsEntityList.size(); i++) {
BdTaxitemsEntity bdTaxitemsEntity = allBdTaxitemsEntityList.get(i);
stringBdTaxitemsEntityMap.put(bdTaxitemsEntity.getInvcode(), bdTaxitemsEntity);
}
}
return stringBdTaxitemsEntityMap;
}
/**
* 缓存来源平台逻辑
*
* @author liuyang
*/
// public static Map<String, BdDefdocEntity> stringBdDefdocEntityHashMap = new HashMap<>();
private Map<String, BdDefdocEntity> initSourcePlatform() {
Map<String, BdDefdocEntity> stringBdDefdocEntityHashMap = new HashMap<>();
String platformZdyId2 = OverallConstant.getOverAllValue("u8c自定义项档案-平台主键");
BdDefdocEntity bdDefdocEntity = new BdDefdocEntity();
// bdDefdocEntity.setPkDefdoclist("0001A210000000000JUD");
bdDefdocEntity.setPkDefdoclist(platformZdyId2);
// bdDefdocEntity.setDr(0);
bdDefdocEntity.setDataSourceCode("lets_u8c");
List<BdDefdocEntity> bdDefdocEntityList = iBdDefdocDao.query(bdDefdocEntity);
if (bdDefdocEntityList != null && bdDefdocEntityList.size() > 0) {
for (int i = 0; i < bdDefdocEntityList.size(); i++) {
BdDefdocEntity bdDefdocEntity1 = bdDefdocEntityList.get(i);
stringBdDefdocEntityHashMap.put(bdDefdocEntity1.getDoccode(), bdDefdocEntity1);
}
}
return stringBdDefdocEntityHashMap;
}
/**
* 2024年8月14日 15:17:48 缓存U8C店铺自定义档案逻辑
*/
// public static Map<String, BdDefdocEntity> shopDefdocEntityHashMap = new HashMap<>();
private Map<String, BdDefdocEntity> initShopDiy() {
Map<String, BdDefdocEntity> shopDefdocEntityHashMap = new HashMap<>();
String platformZdyId2 = OverallConstant.getOverAllValue("u8c自定义项档案-店铺主键");
BdDefdocEntity bdDefdocEntity = new BdDefdocEntity();
// bdDefdocEntity.setPkDefdoclist("0001A210000000000XZX");
bdDefdocEntity.setPkDefdoclist(platformZdyId2);
// bdDefdocEntity.setDr(0);
bdDefdocEntity.setDataSourceCode("lets_u8c");
List<BdDefdocEntity> bdDefdocEntityList = iBdDefdocDao.query(bdDefdocEntity);
if (bdDefdocEntityList != null && bdDefdocEntityList.size() > 0) {
for (int i = 0; i < bdDefdocEntityList.size(); i++) {
BdDefdocEntity bdDefdocEntity1 = bdDefdocEntityList.get(i);
shopDefdocEntityHashMap.put(bdDefdocEntity1.getDoccode(), bdDefdocEntity1);
}
}
return shopDefdocEntityHashMap;
}
// public static Map<String, BdRdclEntity> stringBdRdclEntityHashMap = new HashMap<>();
/**
* 初始化收发类别
*/
private Map<String, BdRdclEntity> initBdRdcl() {
Map<String, BdRdclEntity> stringBdRdclEntityHashMap = new HashMap<>();
BdRdclEntity bdRdclEntity = new BdRdclEntity();
bdRdclEntity.setDr(0);
bdRdclEntity.setDataSourceCode("lets_u8c");
List<BdRdclEntity> bdRdclEntityList = iBdRdclDao.query(bdRdclEntity);
if (bdRdclEntityList != null && bdRdclEntityList.size() > 0) {
for (int i = 0; i < bdRdclEntityList.size(); i++) {
BdRdclEntity bdRdclEntity1 = bdRdclEntityList.get(i);
stringBdRdclEntityHashMap.put(bdRdclEntity1.getRdcode(), bdRdclEntity1);
}
}
return stringBdRdclEntityHashMap;
}
/**
* 清理缓存
*
* @author liuyang
*/
// public void clearCache() throws Exception {
// stringBdCorpEntityMap.clear();
// stringBdStordocEntityMap.clear();
// stringBdCalbodyEntityMap.clear();
// stringBdSalestruEntityMap.clear();
// stringBdDeptdocEntityMap.clear();
// stringBdCumandocEntityMap.clear();
// stringBdInvmandocEntityMap.clear();
// stringBdInvbasdocEntityHashMap.clear();
// stringBdTaxitemsEntityHashMap.clear();
// stringBdCubasdocEntityHashMap.clear();
// stringBdDefdocEntityHashMap.clear();
// shopDefdocEntityHashMap.clear();
// stringBdRdclEntityHashMap.clear();
// }
/**
* 初始化缓存
*
* @param returnGoodHeaderDetailsDataDtoList OFS售后入库单
* @author liuyang
*/
public CacheTocMapVoV2 initCache(List<PassiveStorageResponse.Data> returnGoodHeaderDetailsDataDtoList) throws Exception {
Assert.notNull(returnGoodHeaderDetailsDataDtoList, "returnGoodHeaderDetailsDataDtoList不能为空");
List<PassiveStorageResponse.Header> headers = initOFsHeadDto(returnGoodHeaderDetailsDataDtoList);
List<PassiveStorageResponse.Details> details = initOfsDetailsDto(returnGoodHeaderDetailsDataDtoList);
Map<String, BdCorpEntity> stringBdCorpEntityMap = initShop();
Map<String, BdStordocEntity> stringBdStordocEntityMap = initBdStordoc();
Map<String, BdCalbodyEntity> stringBdCalbodyEntityMap = initBdCalbody();
Map<String, BdSalestruEntity> stringBdSalestruEntityMap = initBdSalestru();
List<Map<String, BdDeptdocEntity>> maps = initDept();
Map<String, BdCubasdocEntity> stringBdCubasdocEntityMap = initBdCubasdocV2(headers);
Map<String, BdCumandocEntity> stringBdCumandocEntityMap = initBdCumandocV2(headers);
Map<String, BdInvmandocEntity> stringBdInvmandocEntityMap = initInventoryFileV2(details);
Map<String, BdInvbasdocEntity> stringBdInvbasdocEntityMap = initBasicInventoryFileV2(details);
Map<String, BdTaxitemsEntity> stringBdTaxitemsEntityMap = initBdTaxitemsEntityV2(details);
Map<String, BdDefdocEntity> stringBdDefdocEntityMap = initSourcePlatform();
Map<String, BdDefdocEntity> stringBdDefdocEntityMap1 = initShopDiy();
Map<String, BdRdclEntity> stringBdRdclEntityMap = initBdRdcl();
CacheTocMapVoV2 cacheTocMapVoV2 = new CacheTocMapVoV2();
cacheTocMapVoV2.setStringBdCorpEntityMap(stringBdCorpEntityMap);
cacheTocMapVoV2.setStringBdStordocEntityMap(stringBdStordocEntityMap);
cacheTocMapVoV2.setStringBdCalbodyEntityMap(stringBdCalbodyEntityMap);
cacheTocMapVoV2.setStringBdSalestruEntityMap(stringBdSalestruEntityMap);
cacheTocMapVoV2.setStringBdDeptdocEntityMap(maps.get(0));
cacheTocMapVoV2.setStringBdDeptdocEntityMapByDeptCode(maps.get(1));
cacheTocMapVoV2.setStringBdCubasdocEntityMap(stringBdCubasdocEntityMap);
cacheTocMapVoV2.setStringBdCumandocEntityMap(stringBdCumandocEntityMap);
cacheTocMapVoV2.setStringBdInvmandocEntityMap(stringBdInvmandocEntityMap);
cacheTocMapVoV2.setStringBdInvbasdocEntityMap(stringBdInvbasdocEntityMap);
cacheTocMapVoV2.setStringBdTaxitemsEntityMap(stringBdTaxitemsEntityMap);
cacheTocMapVoV2.setStringBdDefdocEntityMap(stringBdDefdocEntityMap);
cacheTocMapVoV2.setStringBdDefdocEntityMap1(stringBdDefdocEntityMap1);
cacheTocMapVoV2.setStringBdRdclEntityMap(stringBdRdclEntityMap);
return cacheTocMapVoV2;
}
/**
* 整理出明细集合
*
* @author liuyang
*/
private List<PassiveStorageResponse.Details> initOfsDetailsDto(List<PassiveStorageResponse.Data> passiveStorageResponseDataDtoList) {
List<PassiveStorageResponse.Details> stockinBList = new ArrayList<>();
if (passiveStorageResponseDataDtoList != null && passiveStorageResponseDataDtoList.size() > 0) {
for (int i = 0; i < passiveStorageResponseDataDtoList.size(); i++) {
PassiveStorageResponse.Data data = passiveStorageResponseDataDtoList.get(i);
PassiveStorageResponse.Header header = data.getHeader();
List<PassiveStorageResponse.Details> details = data.getDetails();
stockinBList.addAll(details);
}
}
return stockinBList;
}
/**
* 整理出表头集合
*
* @author liuyang
*/
private List<PassiveStorageResponse.Header> initOFsHeadDto(List<PassiveStorageResponse.Data> passiveStorageResponseDataDtoList) throws Exception {
List<PassiveStorageResponse.Header> stockinHList = new ArrayList<>();
if (passiveStorageResponseDataDtoList != null && passiveStorageResponseDataDtoList.size() > 0) {
for (int i = 0; i < passiveStorageResponseDataDtoList.size(); i++) {
PassiveStorageResponse.Data data = passiveStorageResponseDataDtoList.get(i);
PassiveStorageResponse.Header header = data.getHeader();
List<PassiveStorageResponse.Details> details = data.getDetails();
stockinHList.add(header);
}
}
return stockinHList;
}
}

View File

@ -67,4 +67,7 @@
<bean name="iaPeriodaccountDao" class="com.hzya.frame.plugin.lets.dao.impl.IaPeriodaccountDaoImpl"/>
<bean name="arapDjzbDaoImpl" class="com.hzya.frame.plugin.lets.dao.impl.ArapDjzbDaoImpl"/>
<bean name="IOfsPassiveorderDetailDao" class="com.hzya.frame.plugin.lets.ofs.dao.impl.OfsPassiveorderDetailDaoImpl"/>
<bean name="IOfsPassiveorderHeaderDao" class="com.hzya.frame.plugin.lets.ofs.dao.impl.OfsPassiveorderHeaderDaoImpl"/>
</beans>

View File

@ -6,4 +6,7 @@
<bean name="tocofsReturngoodsDetailedService" class="com.hzya.frame.plugin.lets.ofs.service.impl.TocofsReturngoodsDetailedServiceImpl"/>
<bean name="tocofsReturngoodsService" class="com.hzya.frame.plugin.lets.ofs.service.impl.TocofsReturngoodsServiceImpl"/>
<bean name="IOfsPassiveorderHeaderService" class="com.hzya.frame.plugin.lets.ofs.service.impl.OfsPassiveorderHeaderServiceImpl"/>
<bean name="IOfsPassiveorderDetailService" class="com.hzya.frame.plugin.lets.ofs.service.impl.OfsPassiveorderDetailServiceImpl"/>
</beans>

View File

@ -0,0 +1,35 @@
package com.hzya.frame.plugin.lets.plugin.sales;
import com.hzya.frame.WebappApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import static org.junit.Assert.*;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.plugin.sales
* @ProjectkangarooDataCenterV3
* @namePassiveWarehouseReceiptToCTest
* @Date2025/3/11 18:34
* @FilenamePassiveWarehouseReceiptToCTest
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = WebappApplication.class)
public class PassiveWarehouseReceiptToCTest {
@Autowired
private PassiveWarehouseReceiptToC passiveWarehouseReceiptToC;
@Test
public void startImplementStockByTime() {
try {
passiveWarehouseReceiptToC.startImplementStockByTime("2025-03-11 00:00:00", "2025-03-11 23:59:59");
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -13,6 +13,7 @@ import com.hzya.frame.ttxofs.dto.ofspurchasereturnorder.PurchaseReturnOrderBean;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.SaleOutReturnMessageDto;
import com.hzya.frame.ttxofs.dto.ofssalesordersearch.SaleOrderMessageDto;
import com.hzya.frame.ttxofs.dto.ofswareconfirma.OfsWareConfirmaResponse;
import com.hzya.frame.ttxofs.dto.passivestorage.PassiveStorageResponse;
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchJsonRootBean;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
@ -54,7 +55,8 @@ public class ApiDtoCacheMap {
apiDtoCacheMap.put("ofs.adjustOrder.search", new OFSAdjustOrderSearchResponse());//调整单
apiDtoCacheMap.put("ofs.receipt.confirm.search", new OFSReceiptConfirmSearchResponse());//入库确认单
// apiDtoCacheMap.put("ofs.receipt.confirm.search", new OfsWareConfirmaResponse());//入库确认单
apiDtoCacheMap.put("ofs.passive.order.search", new PassiveStorageResponse());//无源入库单
}
}

View File

@ -0,0 +1,73 @@
package com.hzya.frame.ttxofs.dto.passivestorage;
import com.hzya.frame.ttxofs.basics.ReturnMessageBasics;
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchData;
import java.util.List;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.ttxofs.dto.passivestorage
* @ProjectkangarooDataCenterV3
* @namePassiveStorageResponse
* @Date2025/3/11 18:51
* @FilenamePassiveStorageResponse
*/
@lombok.Data
public class PassiveStorageResponse extends ReturnMessageBasics {
private List<Data> data;
@lombok.Data
public static class Data {
private Header header;
private List<Details> details;
}
@lombok.Data
public static class Header {
private String id;
private String clientCode;
private String companyCode;
private String facilityCode;
private String storeCode;
private String receiptCode;
private String warehouseCode;
private String returnWaybillCode;
private String sourceReturnCode;
private String sourceOrderCode;
private String returnOrderCode;
private String actualRefundAmount;
private String returnTime;
private String relatedAt;
private String status;
private String created;
private String createdBy;
private String lastUpdated;
private String lastUpdatedBy;
//让表头能够关联明细表
// List<PassiveStorageResponse.Details> detailsList;
//对应的售后订单
private RerturnGoodsOrderSearchData rerturnGoodsOrderSearchData;
//对应的销售订单
private com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto;
}
@lombok.Data
public static class Details {
private String id;
private String headerId;
private String receiptCode;
private String clientCode;
private String companyCode;
private String skuCode;
private String skuName;
private String quantity;
private String inventorySts;
private String created;
private String createdBy;
private String lastUpdated;
private String lastUpdatedBy;
private PassiveStorageResponse.Header header;
}
}