feat(lets): 添加售后订单批量插入和更新功能

- 在 OnlyAfterSalesBDaoImpl 和 OnlyAfterSalesHDaoImpl 中添加批量插入和更新方法
- 在 IOnlyAfterSalesBDao 和 IOnlyAfterSalesHDao 中添加相应接口- 在 OnlyAfterSalesBEntity 和 OnlyAfterSalesHEntity 中添加业务类型、推送状态等新字段- 更新 OnlyAfterSalesBEntity.xml 映射文件,添加新字段的映射
This commit is contained in:
liuy 2025-04-16 14:00:29 +08:00
parent b5f1ede6b8
commit db6284e56b
35 changed files with 5105 additions and 324 deletions

View File

@ -3,6 +3,8 @@ package com.hzya.frame.plugin.lets.dao;
import com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity; import com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity;
import com.hzya.frame.basedao.dao.IBaseDao; import com.hzya.frame.basedao.dao.IBaseDao;
import java.util.List;
/** /**
* 售后订单表_仅退款_子表(only_after_sales_b: table)表数据库访问层 * 售后订单表_仅退款_子表(only_after_sales_b: table)表数据库访问层
* *
@ -10,6 +12,17 @@ import com.hzya.frame.basedao.dao.IBaseDao;
* @since 2024-09-23 10:43:46 * @since 2024-09-23 10:43:46
*/ */
public interface IOnlyAfterSalesBDao extends IBaseDao<OnlyAfterSalesBEntity, String> { public interface IOnlyAfterSalesBDao extends IBaseDao<OnlyAfterSalesBEntity, String> {
/**
* 批量插入或更新数据行
*
* @author liuyang
*/
void entityInsertOrUpdateBatch(List<OnlyAfterSalesBEntity> onlyAfterSalesHEntityList) throws Exception;
/**
* 批量插入或更新,推送状态
*
* @author liuyang
*/
void entityInsertOrUpdateBatchBySuccessOrFail(List<OnlyAfterSalesBEntity> onlyAfterSalesHEntityList) throws Exception;
} }

View File

@ -12,5 +12,17 @@ import java.util.List;
* @since 2024-09-23 10:43:07 * @since 2024-09-23 10:43:07
*/ */
public interface IOnlyAfterSalesHDao extends IBaseDao<OnlyAfterSalesHEntity, String> { public interface IOnlyAfterSalesHDao extends IBaseDao<OnlyAfterSalesHEntity, String> {
} /**
* 批量插入或者更新
*
* @author liuyang
*/
void insertOrUpdate(List<OnlyAfterSalesHEntity> onlyAfterSalesHEntityList) throws Exception;
/**
* 批量更新成功或失败状态
*
* @author liuyang
*/
// void entityInsertOrUpdateBatchBySuccessOrFail(List<OnlyAfterSalesHEntity> onlyAfterSalesHEntityList) throws Exception;
}

View File

@ -4,13 +4,24 @@ import com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity;
import com.hzya.frame.plugin.lets.dao.IOnlyAfterSalesBDao; import com.hzya.frame.plugin.lets.dao.IOnlyAfterSalesBDao;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao; import com.hzya.frame.basedao.dao.MybatisGenericDao;
import java.util.List;
/** /**
* 售后订单表_仅退款_子表(OnlyAfterSalesB)表数据库访问层 * 售后订单表_仅退款_子表(OnlyAfterSalesB)表数据库访问层
* *
* @author makejava * @author makejava
* @since 2024-09-23 10:43:46 * @since 2024-09-23 10:43:46
*/ */
public class OnlyAfterSalesBDaoImpl extends MybatisGenericDao<OnlyAfterSalesBEntity, String> implements IOnlyAfterSalesBDao{ public class OnlyAfterSalesBDaoImpl extends MybatisGenericDao<OnlyAfterSalesBEntity, String> implements IOnlyAfterSalesBDao {
@Override
public void entityInsertOrUpdateBatch(List<OnlyAfterSalesBEntity> onlyAfterSalesHEntityList) throws Exception {
insert("com.hzya.frame.plugin.lets.dao.impl.OnlyAfterSalesBDaoImpl.entityInsertOrUpdateBatch", onlyAfterSalesHEntityList);
}
@Override
public void entityInsertOrUpdateBatchBySuccessOrFail(List<OnlyAfterSalesBEntity> onlyAfterSalesHEntityList) throws Exception {
insert("com.hzya.frame.plugin.lets.dao.impl.OnlyAfterSalesBDaoImpl.entityInsertOrUpdateBatchBySuccessOrFail", onlyAfterSalesHEntityList);
}
} }

View File

@ -2,7 +2,6 @@ package com.hzya.frame.plugin.lets.dao.impl;
import com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity; import com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity;
import com.hzya.frame.plugin.lets.dao.IOnlyAfterSalesHDao; import com.hzya.frame.plugin.lets.dao.IOnlyAfterSalesHDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao; import com.hzya.frame.basedao.dao.MybatisGenericDao;
import java.util.List; import java.util.List;
@ -13,6 +12,15 @@ import java.util.List;
* @author makejava * @author makejava
* @since 2024-09-23 10:43:07 * @since 2024-09-23 10:43:07
*/ */
public class OnlyAfterSalesHDaoImpl extends MybatisGenericDao<OnlyAfterSalesHEntity, String> implements IOnlyAfterSalesHDao{ public class OnlyAfterSalesHDaoImpl extends MybatisGenericDao<OnlyAfterSalesHEntity, String> implements IOnlyAfterSalesHDao {
@Override
public void insertOrUpdate(List<OnlyAfterSalesHEntity> onlyAfterSalesHEntityList) throws Exception {
insert("com.hzya.frame.plugin.lets.dao.impl.OnlyAfterSalesHDaoImpl.entityInsertOrUpdateBatch", onlyAfterSalesHEntityList);
}
// @Override
// public void entityInsertOrUpdateBatchBySuccessOrFail(List<OnlyAfterSalesHEntity> onlyAfterSalesHEntityList) throws Exception {
// insert("com.hzya.frame.plugin.lets.dao.impl.OnlyAfterSalesHDaoImpl.entityInsertOrUpdateBatchBySuccessOrFail", onlyAfterSalesHEntityList);
// }
} }

View File

@ -14,60 +14,118 @@ public class OnlyAfterSalesBEntity extends BaseEntity {
private String hid; private String hid;
private String ofsid; private String ofsid;
/** 退货单ID */ /**
private Long returnorderid; * 根据明细主键批量查询
/** 退货单号 */ */
private String returnordercode; private String ofsids;
/** SKU编码 */ /**
private String skucode; * 退货单ID
/** SKU名称 */ */
private String skuname; private Long returnorderid;
/** 货主编码 */ /**
private String companycode; * 退货单号
/** 组织 */ */
private String clientcode; private String returnordercode;
/** 店铺 */ /**
private String storecode; * SKU编码
/** 退货类型 */ */
private String returntype; private String skucode;
/** 是否退款 */ /**
private String refundind; * SKU名称
/** 请求数量 */ */
private String requestqty; private String skuname;
/** 实际退货数量 */ /**
private String fulfillqty; * 货主编码
/** 货品单位 */ */
private String quantityum; private String companycode;
/** 商品零售价 */ /**
private String msrprice; * 组织
/** 总重量 */ */
private String totalweight; private String clientcode;
/** 总体积 */ /**
private String totalvolume; * 店铺
/** 重量单位 */ */
private String weightum; private String storecode;
/** 体积单位 */ /**
private String volumeum; * 退货类型
/** 退货金额 */ */
private String totalamount; private String returntype;
/** 平台订单行号 */ /**
private String sourcelinenum; * 是否退款
/** 原订单号 */ */
private String sourceordercode; private String refundind;
/** 原支付单价 */ /**
private String sourcediscountprice; * 请求数量
/** 原支付金额 */ */
private String sourcepayamount; private String requestqty;
/** 原购买数量 */ /**
private String sourcerequestqty; * 实际退货数量
/** bom类型 */ */
private String bomtype; private String fulfillqty;
/** 拆分bom前的明细id */ /**
private Long originaldetailid; * 货品单位
/** 处理原因 */ */
private String reasoncode; private String quantityum;
/** 处理备注 */ /**
private String reasondesc; * 商品零售价
*/
private String msrprice;
/**
* 总重量
*/
private String totalweight;
/**
* 总体积
*/
private String totalvolume;
/**
* 重量单位
*/
private String weightum;
/**
* 体积单位
*/
private String volumeum;
/**
* 退货金额
*/
private String totalamount;
/**
* 平台订单行号
*/
private String sourcelinenum;
/**
* 原订单号
*/
private String sourceordercode;
/**
* 原支付单价
*/
private String sourcediscountprice;
/**
* 原支付金额
*/
private String sourcepayamount;
/**
* 原购买数量
*/
private String sourcerequestqty;
/**
* bom类型
*/
private String bomtype;
/**
* 拆分bom前的明细id
*/
private Long originaldetailid;
/**
* 处理原因
*/
private String reasoncode;
/**
* 处理备注
*/
private String reasondesc;
//平台优惠表头的 //平台优惠表头的
@ -79,6 +137,37 @@ public class OnlyAfterSalesBEntity extends BaseEntity {
//支付优惠表头的 //支付优惠表头的
private String payDiscounts; private String payDiscounts;
//业务类型
private String businessType;
//业务日期-退货完成时间或交易成功时间
private String transactionDate;
//推送时间
private String newPushDate;
//报错详情
private String newTransmitInfo;
//推送状态
private String newState;
//下游单号
private String newsystemnumber;
//下游主键
private String newsystemprimary;
private String def1;
private String def2;
private String def3;
private String def4;
private String def5;
private String def6;
} }

View File

@ -37,7 +37,21 @@
<result property="merchantDiscounts" column="merchantDiscounts" jdbcType="VARCHAR"/> <result property="merchantDiscounts" column="merchantDiscounts" jdbcType="VARCHAR"/>
<result property="expertDiscounts" column="expertDiscounts" jdbcType="VARCHAR"/> <result property="expertDiscounts" column="expertDiscounts" jdbcType="VARCHAR"/>
<result property="payDiscounts" column="payDiscounts" jdbcType="VARCHAR"/> <result property="payDiscounts" column="payDiscounts" jdbcType="VARCHAR"/>
<result property="businessType" column="businessType" jdbcType="VARCHAR"/>
<result property="transactionDate" column="transactionDate" 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="def1" column="def1" jdbcType="VARCHAR"/>
<result property="def2" column="def2" jdbcType="VARCHAR"/>
<result property="def3" column="def3" jdbcType="VARCHAR"/>
<result property="def4" column="def4" jdbcType="VARCHAR"/>
<result property="def5" column="def5" jdbcType="VARCHAR"/>
<result property="def6" column="def6" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<!-- 查询的字段--> <!-- 查询的字段-->
<sql id = "OnlyAfterSalesBEntity_Base_Column_List"> <sql id = "OnlyAfterSalesBEntity_Base_Column_List">
id id
@ -74,7 +88,21 @@
,merchantDiscounts ,merchantDiscounts
,expertDiscounts ,expertDiscounts
,payDiscounts ,payDiscounts
,businessType
,transactionDate
,newPushDate
,newTransmitInfo
,newState
,newsystemnumber
,newsystemprimary
,def1
,def2
,def3
,def4
,def5
,def6
</sql> </sql>
<!-- 查询 采用==查询 --> <!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-OnlyAfterSalesBEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity"> <select id="entity_list_base" resultMap="get-OnlyAfterSalesBEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity">
select select
@ -115,10 +143,16 @@
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if> <if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if> <if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> and businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate = #{transactionDate} </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="ofsids!=null and ofsids!=''">and ofsid in (${ofsids})</if>
</trim> </trim>
</select> </select>
<!-- 查询符合条件的数量 --> <!-- 查询符合条件的数量 -->
@ -159,7 +193,13 @@
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if> <if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if> <if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> and businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate = #{transactionDate} </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>
</trim> </trim>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if> <if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
@ -205,10 +245,14 @@
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts like concat('%',#{merchantDiscounts},'%') </if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts like concat('%',#{merchantDiscounts},'%') </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts like concat('%',#{expertDiscounts},'%') </if> <if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts like concat('%',#{expertDiscounts},'%') </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts like concat('%',#{payDiscounts},'%') </if> <if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts like concat('%',#{payDiscounts},'%') </if>
<if test="businessType != null and businessType != ''"> and businessType like concat('%',#{businessType},'%') </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate like concat('%',#{transactionDate},'%') </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>
</trim> </trim>
</select> </select>
<!-- 查询列表 字段采用or格式 --> <!-- 查询列表 字段采用or格式 -->
@ -251,9 +295,14 @@
<if test="merchantDiscounts != null and merchantDiscounts != ''"> or merchantDiscounts = #{merchantDiscounts} </if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> or merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> or expertDiscounts = #{expertDiscounts} </if> <if test="expertDiscounts != null and expertDiscounts != ''"> or expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> or payDiscounts = #{payDiscounts} </if> <if test="payDiscounts != null and payDiscounts != ''"> or payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> or businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> or transactionDate = #{transactionDate} </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>
</trim> </trim>
</select> </select>
<!--新增所有列--> <!--新增所有列-->
@ -294,6 +343,13 @@
<if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts , </if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts , </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts , </if> <if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts , </if>
<if test="payDiscounts != null and payDiscounts != ''"> payDiscounts , </if> <if test="payDiscounts != null and payDiscounts != ''"> payDiscounts , </if>
<if test="businessType != null and businessType != ''"> businessType , </if>
<if test="transactionDate != null and transactionDate != ''"> transactionDate , </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>
</trim> </trim>
)values( )values(
<trim suffix="" suffixOverrides=","> <trim suffix="" suffixOverrides=",">
@ -331,23 +387,32 @@
<if test="merchantDiscounts != null and merchantDiscounts != ''"> #{merchantDiscounts} ,</if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> #{merchantDiscounts} ,</if>
<if test="expertDiscounts != null and expertDiscounts != ''"> #{expertDiscounts} ,</if> <if test="expertDiscounts != null and expertDiscounts != ''"> #{expertDiscounts} ,</if>
<if test="payDiscounts != null and payDiscounts != ''"> #{payDiscounts} ,</if> <if test="payDiscounts != null and payDiscounts != ''"> #{payDiscounts} ,</if>
</trim> <if test="businessType != null and businessType != ''"> #{businessType} ,</if>
<if test="transactionDate != null and transactionDate != ''"> #{transactionDate} ,</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>
</trim>
) )
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_b(hid,ofsid,returnOrderId, returnOrderCode, skuCode, skuName, companyCode, clientCode, storeCode, returnType, refundInd, requestQty, fulfillQty, quantityUM, msrPrice, totalWeight, totalVolume, weightUM, volumeUM, totalAmount, sourceLineNum, sourceOrderCode, sourceDiscountPrice, sourcePayAmount, sourceRequestQty, bomType, originalDetailId, reasonCode, reasonDescs) insert into only_after_sales_b(hid,ofsid,returnOrderId, returnOrderCode, skuCode, skuName, companyCode, clientCode, storeCode, returnType, refundInd, requestQty, fulfillQty, quantityUM, msrPrice, totalWeight, totalVolume, weightUM, volumeUM, totalAmount, sourceLineNum, sourceOrderCode, sourceDiscountPrice, sourcePayAmount, sourceRequestQty, bomType, originalDetailId, reasonCode, reasonDescs,businessType,transactionDate,newPushDate,newTransmitInfo,newState,newsystemnumber,newsystemprimary)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="list" item="entity" separator=",">
(#{entity.hid},#{entity.ofsid},#{entity.returnorderid},#{entity.returnordercode},#{entity.skucode},#{entity.skuname},#{entity.companycode},#{entity.clientcode},#{entity.storecode},#{entity.returntype},#{entity.refundind},#{entity.requestqty},#{entity.fulfillqty},#{entity.quantityum},#{entity.msrprice},#{entity.totalweight},#{entity.totalvolume},#{entity.weightum},#{entity.volumeum},#{entity.totalamount},#{entity.sourcelinenum},#{entity.sourceordercode},#{entity.sourcediscountprice},#{entity.sourcepayamount},#{entity.sourcerequestqty},#{entity.bomtype},#{entity.originaldetailid},#{entity.reasoncode},#{entity.reasondesc}) (#{entity.hid},#{entity.ofsid},#{entity.returnorderid},#{entity.returnordercode},#{entity.skucode},#{entity.skuname},#{entity.companycode},#{entity.clientcode},#{entity.storecode},#{entity.returntype},#{entity.refundind},#{entity.requestqty},#{entity.fulfillqty},#{entity.quantityum},#{entity.msrprice},#{entity.totalweight},#{entity.totalvolume},#{entity.weightum},#{entity.volumeum},#{entity.totalamount},#{entity.sourcelinenum},#{entity.sourceordercode},#{entity.sourcediscountprice},#{entity.sourcepayamount},#{entity.sourcerequestqty},#{entity.bomtype},#{entity.originaldetailid},#{entity.reasoncode},#{entity.reasondesc},#{entity.businessType},#{entity.transactionDate},#{entity.newPushDate},#{entity.newTransmitInfo},#{entity.newState},#{entity.newsystemnumber},#{entity.newsystemprimary})
</foreach> </foreach>
</insert> </insert>
<!-- 批量新增或者修改--> <!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_b(hid,ofsid,returnOrderId, returnOrderCode, skuCode, skuName, companyCode, clientCode, storeCode, returnType, refundInd, requestQty, fulfillQty, quantityUM, msrPrice, totalWeight, totalVolume, weightUM, volumeUM, totalAmount, sourceLineNum, sourceOrderCode, sourceDiscountPrice, sourcePayAmount, sourceRequestQty, bomType, originalDetailId, reasonCode, reasonDesc) insert into only_after_sales_b(hid,ofsid,returnOrderId, returnOrderCode, skuCode, skuName, companyCode, clientCode, storeCode, returnType, refundInd, requestQty, fulfillQty, quantityUM, msrPrice, totalWeight, totalVolume, weightUM, volumeUM, totalAmount, sourceLineNum, sourceOrderCode, sourceDiscountPrice, sourcePayAmount, sourceRequestQty, bomType, originalDetailId, reasonCode, reasonDesc,businessType)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="list" item="entity" separator=",">
(#{entity.hid},#{entity.ofsid},#{entity.returnorderid},#{entity.returnordercode},#{entity.skucode},#{entity.skuname},#{entity.companycode},#{entity.clientcode},#{entity.storecode},#{entity.returntype},#{entity.refundind},#{entity.requestqty},#{entity.fulfillqty},#{entity.quantityum},#{entity.msrprice},#{entity.totalweight},#{entity.totalvolume},#{entity.weightum},#{entity.volumeum},#{entity.totalamount},#{entity.sourcelinenum},#{entity.sourceordercode},#{entity.sourcediscountprice},#{entity.sourcepayamount},#{entity.sourcerequestqty},#{entity.bomtype},#{entity.originaldetailid},#{entity.reasoncode},#{entity.reasondesc}) (#{entity.hid},#{entity.ofsid},#{entity.returnorderid},#{entity.returnordercode},#{entity.skucode},#{entity.skuname},#{entity.companycode},#{entity.clientcode},#{entity.storecode},#{entity.returntype},#{entity.refundind},#{entity.requestqty},#{entity.fulfillqty},#{entity.quantityum},#{entity.msrprice},#{entity.totalweight},#{entity.totalvolume},#{entity.weightum},#{entity.volumeum},#{entity.totalamount},#{entity.sourcelinenum},#{entity.sourceordercode},#{entity.sourcediscountprice},#{entity.sourcepayamount},#{entity.sourcerequestqty},#{entity.bomtype},#{entity.originaldetailid},#{entity.reasoncode},#{entity.reasondesc},#{entity.businessType})
</foreach> </foreach>
on duplicate key update on duplicate key update
hid = values(hid), hid = values(hid),
@ -378,7 +443,32 @@
bomType = values(bomType), bomType = values(bomType),
originalDetailId = values(originalDetailId), originalDetailId = values(originalDetailId),
reasonCode = values(reasonCode), reasonCode = values(reasonCode),
reasonDesc = values(reasonDesc)</insert> reasonDesc = values(reasonDesc),
businessType = values(businessType)
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatchBySuccessOrFail" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_b(ofsid,newPushDate,newTransmitInfo,newState,newsystemnumber,newsystemprimary,def1,def2,def3,def4,def5,def6)
values
<foreach collection="list" item="entity" separator=",">
(#{entity.ofsid},#{entity.newPushDate},#{entity.newTransmitInfo},#{entity.newState},#{entity.newsystemnumber},#{entity.newsystemprimary},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6})
</foreach>
on duplicate key update
ofsid = values(ofsid),
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)
</insert>
<!--通过主键修改方法--> <!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity" > <update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity" >
update only_after_sales_b set update only_after_sales_b set
@ -416,14 +506,23 @@ update only_after_sales_b set
<if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts = #{merchantDiscounts},</if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts = #{merchantDiscounts},</if>
<if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts = #{expertDiscounts},</if> <if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts = #{expertDiscounts},</if>
<if test="payDiscounts != null and payDiscounts != ''"> payDiscounts = #{payDiscounts},</if> <if test="payDiscounts != null and payDiscounts != ''"> payDiscounts = #{payDiscounts},</if>
<if test="businessType != null and businessType != ''"> businessType = #{businessType},</if>
<if test="transactionDate != null and transactionDate != ''"> transactionDate = #{transactionDate},</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>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity" > <update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity" >
update only_after_sales_b set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} update only_after_sales_b set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id} where id = #{id}
</update> </update>
<!-- 多条件逻辑删除 --> <!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity" > <update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity" >
update only_after_sales_b set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} update only_after_sales_b set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
@ -462,13 +561,19 @@ update only_after_sales_b set sts= 'N' ,modify_time = #{modify_time},modify_use
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if> <if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if> <if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> and businessType = #{businessType} </if>
</trim> <if test="transactionDate != null and transactionDate != ''"> and transactionDate = #{transactionDate} </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>
</trim>
</update> </update>
<!--通过主键删除--> <!--通过主键删除-->
<delete id="entity_delete"> <delete id="entity_delete">
delete from only_after_sales_b where id = #{id} delete from only_after_sales_b where id = #{id}
</delete> </delete>
</mapper> </mapper>

View File

@ -1,6 +1,7 @@
package com.hzya.frame.plugin.lets.entity; package com.hzya.frame.plugin.lets.entity;
import java.util.Date; import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity; import com.hzya.frame.web.entity.BaseEntity;
import lombok.Data; import lombok.Data;
@ -15,136 +16,266 @@ public class OnlyAfterSalesHEntity extends BaseEntity {
private String ofsid; private String ofsid;
/** 退货类型 */ /**
private String returntype; * 退货类型
/** 换货方式 */ */
private String exchangetype; private String returntype;
/** 是否退款 */ /**
private String refundind; * 换货方式
/** 系统内部类型 */ */
private String internalordertype; private String exchangetype;
/** 业务发生渠道 */ /**
private String bizchannel; * 是否退款
/** 售后凭证单号 */ */
private String code; private String refundind;
/** 商家编码 */ /**
private String companycode; * 系统内部类型
/** 组织 */ */
private String clientcode; private String internalordertype;
/** 店铺编码 */ /**
private String storecode; * 业务发生渠道
/** 平台客户账号 */ */
private String sourceuseraccount; private String bizchannel;
/** 平台客户昵称 */ /**
private String sourceusername; * 售后凭证单号
/** 退货状态 */ */
private String returnstatus; private String code;
/** 发货状态 */ /**
private String shipstatus; * 商家编码
/** 退款状态 */ */
private String refundstatus; private String companycode;
/** 退回仓库 */ /**
private String facilitycode; * 组织
/** 销售订单编号 */ */
private String refordercode; private String clientcode;
/** 销售订单ID */ /**
private Long reforderid; * 店铺编码
/** 销售订单类型 */ */
private String refordertype; private String storecode;
/** 生成售后订单时的订单状态 */ /**
private String reforderstatuswhenreturned; * 平台客户账号
/** 来源平台 */ */
private String sourceplatformcode; private String sourceuseraccount;
/** 平台订单号 */ /**
private String sourceordercode; * 平台客户昵称
/** 平台订单状态 */ */
private String sourceorderstatuswhenreturned; private String sourceusername;
/** 平台退货单号 */ /**
private String sourcereturncode; * 退货状态
/** 平台退货单状态 */ */
private String sourcereturnstatus; private String returnstatus;
/** 退货原因 */ /**
private String reasoncode; * 发货状态
/** 客服备注 */ */
private String returnnote; private String shipstatus;
/** 卖家备注 */ /**
private String sellernote; * 退款状态
/** 应退金额 */ */
private String requestrefundamount; private String refundstatus;
/** 实退金额 */ /**
private String actualrefundamount; * 退回仓库
/** 应退商品总数 */ */
private String totalqty; private String facilitycode;
/** 实退总数 */ /**
private String totalfulfillqty; * 销售订单编号
/** 发货人 */ */
private String shipfromattentionto; private String refordercode;
/** 地址 */ /**
private String shipfromaddress; * 销售订单ID
/** 国家 */ */
private String shipfromcountry; private Long reforderid;
/** 省份 */ /**
private String shipfromstate; * 销售订单类型
/** 城市 */ */
private String shipfromcity; private String refordertype;
/** 区域 */ /**
private String shipfromdistrict; * 生成售后订单时的订单状态
/** 邮编 */ */
private String shipfrompostalcode; private String reforderstatuswhenreturned;
/** 电话 */ /**
private String shipfromphone; * 来源平台
/** 手机 */ */
private String shipfrommobile; private String sourceplatformcode;
/** 传真 */ /**
private String shipfromfax; * 平台订单号
/** 电子邮箱 */ */
private String shipfromemail; private String sourceordercode;
/** 发货快递公司 */ /**
private String shipcarrier; * 平台订单状态
/** 发货快递单号 */ */
private String shipwaybillcode; private String sourceorderstatuswhenreturned;
/** 发货物流状态 */ /**
private String shiplogisticsstatus; * 平台退货单号
/** 退回快递公司 */ */
private String returncarrier; private String sourcereturncode;
/** 退回快递单号 */ /**
private String returnwaybillcode; * 平台退货单状态
/** 退货物流状态 */ */
private String returnlogisticsstatus; private String sourcereturnstatus;
/** 支付账号 */ /**
private String payaccount; * 退货原因
/** 退款支付交易单号 */ */
private String payorderno; private String reasoncode;
/** 审核人 */ /**
private String auditby; * 客服备注
/** 审核时间 */ */
private Date auditat; private String returnnote;
/** 退款方式 */ /**
private String refundthru; * 卖家备注
/** 客服工号 */ */
private String csstuff; private String sellernote;
/** 仓库备注 */ /**
private String returnwarehousenote; * 应退金额
/** 锁定原因 */ */
private String holdcode; private String requestrefundamount;
/** 锁定用户 */ /**
private String holduser; * 实退金额
/** 锁定时间 */ */
private Date holdat; private String actualrefundamount;
/** 异常类型 */ /**
private String errorcode; * 应退商品总数
/** 异常消息 */ */
private String errordesc; private String totalqty;
/** 核销状态 */ /**
private String verificationstatus; * 实退总数
/** 核销异常描述 */ */
private String verificationerrordesc; private String totalfulfillqty;
/** 退款时间 */ /**
private Date refundedat; * 发货人
/** 状态 */ */
private String status; private String shipfromattentionto;
/** 处理类型 */ /**
private String processtype; * 地址
*/
private String shipfromaddress;
/**
* 国家
*/
private String shipfromcountry;
/**
* 省份
*/
private String shipfromstate;
/**
* 城市
*/
private String shipfromcity;
/**
* 区域
*/
private String shipfromdistrict;
/**
* 邮编
*/
private String shipfrompostalcode;
/**
* 电话
*/
private String shipfromphone;
/**
* 手机
*/
private String shipfrommobile;
/**
* 传真
*/
private String shipfromfax;
/**
* 电子邮箱
*/
private String shipfromemail;
/**
* 发货快递公司
*/
private String shipcarrier;
/**
* 发货快递单号
*/
private String shipwaybillcode;
/**
* 发货物流状态
*/
private String shiplogisticsstatus;
/**
* 退回快递公司
*/
private String returncarrier;
/**
* 退回快递单号
*/
private String returnwaybillcode;
/**
* 退货物流状态
*/
private String returnlogisticsstatus;
/**
* 支付账号
*/
private String payaccount;
/**
* 退款支付交易单号
*/
private String payorderno;
/**
* 审核人
*/
private String auditby;
/**
* 审核时间
*/
private String auditat;
/**
* 退款方式
*/
private String refundthru;
/**
* 客服工号
*/
private String csstuff;
/**
* 仓库备注
*/
private String returnwarehousenote;
/**
* 锁定原因
*/
private String holdcode;
/**
* 锁定用户
*/
private String holduser;
/**
* 锁定时间
*/
private String holdat;
/**
* 异常类型
*/
private String errorcode;
/**
* 异常消息
*/
private String errordesc;
/**
* 核销状态
*/
private String verificationstatus;
/**
* 核销异常描述
*/
private String verificationerrordesc;
/**
* 退款时间
*/
private String refundedat;
/**
* 状态
*/
private String status;
/**
* 处理类型
*/
private String processtype;
//平台优惠 //平台优惠
@ -156,5 +287,24 @@ public class OnlyAfterSalesHEntity extends BaseEntity {
//支付优惠 //支付优惠
private String payDiscounts; private String payDiscounts;
} //业务类型
private String businessType;
//业务日期-退货完成时间或交易成功时间
private String transactionDate;
//推送时间
private String newPushDate;
//报错详情
private String newTransmitInfo;
//推送状态
private String newState;
//下游单号
private String newsystemnumber;
//下游主键
private String newsystemprimary;
}

View File

@ -3,7 +3,7 @@
<mapper namespace="com.hzya.frame.plugin.lets.dao.impl.OnlyAfterSalesHDaoImpl"> <mapper namespace="com.hzya.frame.plugin.lets.dao.impl.OnlyAfterSalesHDaoImpl">
<resultMap id="get-OnlyAfterSalesHEntity-result" type="com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity" > <resultMap id="get-OnlyAfterSalesHEntity-result" type="com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity" >
<result property="id" column="id" jdbcType="INTEGER"/> <result property="id" column="id" jdbcType="INTEGER"/>
<result property="ofsid" column="ofsid" jdbcType="VARCHAR"/> <result property="ofsid" column="ofsid" jdbcType="VARCHAR"/>
<result property="returntype" column="returnType" jdbcType="VARCHAR"/> <result property="returntype" column="returnType" jdbcType="VARCHAR"/>
<result property="exchangetype" column="exchangeType" jdbcType="VARCHAR"/> <result property="exchangetype" column="exchangeType" jdbcType="VARCHAR"/>
@ -74,7 +74,16 @@
<result property="merchantDiscounts" column="merchantDiscounts" jdbcType="VARCHAR"/> <result property="merchantDiscounts" column="merchantDiscounts" jdbcType="VARCHAR"/>
<result property="expertDiscounts" column="expertDiscounts" jdbcType="VARCHAR"/> <result property="expertDiscounts" column="expertDiscounts" jdbcType="VARCHAR"/>
<result property="payDiscounts" column="payDiscounts" jdbcType="VARCHAR"/> <result property="payDiscounts" column="payDiscounts" jdbcType="VARCHAR"/>
<result property="businessType" column="businessType" jdbcType="VARCHAR"/>
<result property="transactionDate" column="transactionDate" 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"/>
</resultMap> </resultMap>
<!-- 查询的字段--> <!-- 查询的字段-->
<sql id = "OnlyAfterSalesHEntity_Base_Column_List"> <sql id = "OnlyAfterSalesHEntity_Base_Column_List">
id id
@ -148,7 +157,15 @@
,merchantDiscounts ,merchantDiscounts
,expertDiscounts ,expertDiscounts
,payDiscounts ,payDiscounts
,businessType
,transactionDate
,newPushDate
,newTransmitInfo
,newState
,newsystemnumber
,newsystemprimary
</sql> </sql>
<!-- 查询 采用==查询 --> <!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-OnlyAfterSalesHEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity"> <select id="entity_list_base" resultMap="get-OnlyAfterSalesHEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity">
select select
@ -226,10 +243,14 @@
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if> <if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if> <if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> and businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate = #{transactionDate} </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>
</trim> </trim>
</select> </select>
<!-- 查询符合条件的数量 --> <!-- 查询符合条件的数量 -->
@ -307,7 +328,13 @@
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if> <if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if> <if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> and businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate = #{transactionDate} </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>
</trim> </trim>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if> <if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
@ -390,7 +417,14 @@
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts like concat('%',#{merchantDiscounts},'%') </if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts like concat('%',#{merchantDiscounts},'%') </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts like concat('%',#{expertDiscounts},'%') </if> <if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts like concat('%',#{expertDiscounts},'%') </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts like concat('%',#{payDiscounts},'%') </if> <if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts like concat('%',#{payDiscounts},'%') </if>
</trim> <if test="businessType != null and businessType != ''"> and businessType like concat('%',#{businessType},'%') </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate like concat('%',#{transactionDate},'%') </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>
</trim>
</select> </select>
@ -472,9 +506,14 @@
<if test="merchantDiscounts != null and merchantDiscounts != ''"> or merchantDiscounts = #{merchantDiscounts} </if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> or merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> or expertDiscounts = #{expertDiscounts} </if> <if test="expertDiscounts != null and expertDiscounts != ''"> or expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> or payDiscounts = #{payDiscounts} </if> <if test="payDiscounts != null and payDiscounts != ''"> or payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> or businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> or transactionDate = #{transactionDate} </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>
</trim> </trim>
</select> </select>
<!--新增所有列--> <!--新增所有列-->
@ -552,6 +591,13 @@
<if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts , </if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts , </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts , </if> <if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts , </if>
<if test="payDiscounts != null and payDiscounts != ''"> payDiscounts , </if> <if test="payDiscounts != null and payDiscounts != ''"> payDiscounts , </if>
<if test="businessType != null and businessType != ''"> businessType , </if>
<if test="transactionDate != null and transactionDate != ''"> transactionDate , </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>
</trim> </trim>
)values( )values(
<trim suffix="" suffixOverrides=","> <trim suffix="" suffixOverrides=",">
@ -626,23 +672,32 @@
<if test="merchantDiscounts != null and merchantDiscounts != ''"> #{merchantDiscounts} ,</if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> #{merchantDiscounts} ,</if>
<if test="expertDiscounts != null and expertDiscounts != ''"> #{expertDiscounts} ,</if> <if test="expertDiscounts != null and expertDiscounts != ''"> #{expertDiscounts} ,</if>
<if test="payDiscounts != null and payDiscounts != ''"> #{payDiscounts} ,</if> <if test="payDiscounts != null and payDiscounts != ''"> #{payDiscounts} ,</if>
</trim> <if test="businessType != null and businessType != ''"> #{businessType} ,</if>
<if test="transactionDate != null and transactionDate != ''"> #{transactionDate} ,</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>
</trim>
) )
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_h(ofsid,returnType, exchangeType, refundInd, internalOrderType, bizChannel, code, companyCode, clientCode, storeCode, sourceUserAccount, sourceUserName, returnStatus, shipStatus, refundStatus, facilityCode, refOrderCode, refOrderId, refOrderType, refOrderStatusWhenReturned, sourcePlatformCode, sourceOrderCode, sourceOrderStatusWhenReturned, sourceReturnCode, sourceReturnStatus, reasonCode, returnNote, sellerNote, requestRefundAmount, actualRefundAmount, totalQty, totalFulfillQty, shipFromAttentionTo, shipFromAddress, shipFromCountry, shipFromState, shipFromCity, shipFromDistrict, shipFromPostalCode, shipFromPhone, shipFromMobile, shipFromFax, shipFromEmail, shipCarrier, shipWaybillCode, shipLogisticsStatus, returnCarrier, returnWaybillCode, returnLogisticsStatus, payAccount, payOrderNo, auditBy, auditAt, refundThru, csStuff, returnWarehouseNote, holdCode, holdUser, holdAt, errorCode, errorDesc, verificationStatus, verificationErrorDesc, refundedAt, status, processType) insert into only_after_sales_h(id,ofsid,returnType, exchangeType, refundInd, internalOrderType, bizChannel, code, companyCode, clientCode, storeCode, sourceUserAccount, sourceUserName, returnStatus, shipStatus, refundStatus, facilityCode, refOrderCode, refOrderId, refOrderType, refOrderStatusWhenReturned, sourcePlatformCode, sourceOrderCode, sourceOrderStatusWhenReturned, sourceReturnCode, sourceReturnStatus, reasonCode, returnNote, sellerNote, requestRefundAmount, actualRefundAmount, totalQty, totalFulfillQty, shipFromAttentionTo, shipFromAddress, shipFromCountry, shipFromState, shipFromCity, shipFromDistrict, shipFromPostalCode, shipFromPhone, shipFromMobile, shipFromFax, shipFromEmail, shipCarrier, shipWaybillCode, shipLogisticsStatus, returnCarrier, returnWaybillCode, returnLogisticsStatus, payAccount, payOrderNo, auditBy, auditAt, refundThru, csStuff, returnWarehouseNote, holdCode, holdUser, holdAt, errorCode, errorDesc, verificationStatus, verificationErrorDesc, refundedAt, status, processType,businessType,transactionDate,newPushDate,newTransmitInfo,newState,newsystemnumber,newsystemprimary)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{entity.ofsid},#{entity.returntype},#{entity.exchangetype},#{entity.refundind},#{entity.internalordertype},#{entity.bizchannel},#{entity.code},#{entity.companycode},#{entity.clientcode},#{entity.storecode},#{entity.sourceuseraccount},#{entity.sourceusername},#{entity.returnstatus},#{entity.shipstatus},#{entity.refundstatus},#{entity.facilitycode},#{entity.refordercode},#{entity.reforderid},#{entity.refordertype},#{entity.reforderstatuswhenreturned},#{entity.sourceplatformcode},#{entity.sourceordercode},#{entity.sourceorderstatuswhenreturned},#{entity.sourcereturncode},#{entity.sourcereturnstatus},#{entity.reasoncode},#{entity.returnnote},#{entity.sellernote},#{entity.requestrefundamount},#{entity.actualrefundamount},#{entity.totalqty},#{entity.totalfulfillqty},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromcountry},#{entity.shipfromstate},#{entity.shipfromcity},#{entity.shipfromdistrict},#{entity.shipfrompostalcode},#{entity.shipfromphone},#{entity.shipfrommobile},#{entity.shipfromfax},#{entity.shipfromemail},#{entity.shipcarrier},#{entity.shipwaybillcode},#{entity.shiplogisticsstatus},#{entity.returncarrier},#{entity.returnwaybillcode},#{entity.returnlogisticsstatus},#{entity.payaccount},#{entity.payorderno},#{entity.auditby},#{entity.auditat},#{entity.refundthru},#{entity.csstuff},#{entity.returnwarehousenote},#{entity.holdcode},#{entity.holduser},#{entity.holdat},#{entity.errorcode},#{entity.errordesc},#{entity.verificationstatus},#{entity.verificationerrordesc},#{entity.refundedat},#{entity.status},#{entity.processtype}) (#{entity.id},#{entity.ofsid},#{entity.returntype},#{entity.exchangetype},#{entity.refundind},#{entity.internalordertype},#{entity.bizchannel},#{entity.code},#{entity.companycode},#{entity.clientcode},#{entity.storecode},#{entity.sourceuseraccount},#{entity.sourceusername},#{entity.returnstatus},#{entity.shipstatus},#{entity.refundstatus},#{entity.facilitycode},#{entity.refordercode},#{entity.reforderid},#{entity.refordertype},#{entity.reforderstatuswhenreturned},#{entity.sourceplatformcode},#{entity.sourceordercode},#{entity.sourceorderstatuswhenreturned},#{entity.sourcereturncode},#{entity.sourcereturnstatus},#{entity.reasoncode},#{entity.returnnote},#{entity.sellernote},#{entity.requestrefundamount},#{entity.actualrefundamount},#{entity.totalqty},#{entity.totalfulfillqty},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromcountry},#{entity.shipfromstate},#{entity.shipfromcity},#{entity.shipfromdistrict},#{entity.shipfrompostalcode},#{entity.shipfromphone},#{entity.shipfrommobile},#{entity.shipfromfax},#{entity.shipfromemail},#{entity.shipcarrier},#{entity.shipwaybillcode},#{entity.shiplogisticsstatus},#{entity.returncarrier},#{entity.returnwaybillcode},#{entity.returnlogisticsstatus},#{entity.payaccount},#{entity.payorderno},#{entity.auditby},#{entity.auditat},#{entity.refundthru},#{entity.csstuff},#{entity.returnwarehousenote},#{entity.holdcode},#{entity.holduser},#{entity.holdat},#{entity.errorcode},#{entity.errordesc},#{entity.verificationstatus},#{entity.verificationerrordesc},#{entity.refundedat},#{entity.status},#{entity.processtype},#{entity.businessType},#{entity.transactionDate},#{entity.newPushDate},#{entity.newTransmitInfo},#{entity.newState},#{entity.newsystemnumber},#{entity.newsystemprimary})
</foreach> </foreach>
</insert> </insert>
<!-- 批量新增或者修改--> <!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_h(ofsid,returnType, exchangeType, refundInd, internalOrderType, bizChannel, code, companyCode, clientCode, storeCode, sourceUserAccount, sourceUserName, returnStatus, shipStatus, refundStatus, facilityCode, refOrderCode, refOrderId, refOrderType, refOrderStatusWhenReturned, sourcePlatformCode, sourceOrderCode, sourceOrderStatusWhenReturned, sourceReturnCode, sourceReturnStatus, reasonCode, returnNote, sellerNote, requestRefundAmount, actualRefundAmount, totalQty, totalFulfillQty, shipFromAttentionTo, shipFromAddress, shipFromCountry, shipFromState, shipFromCity, shipFromDistrict, shipFromPostalCode, shipFromPhone, shipFromMobile, shipFromFax, shipFromEmail, shipCarrier, shipWaybillCode, shipLogisticsStatus, returnCarrier, returnWaybillCode, returnLogisticsStatus, payAccount, payOrderNo, auditBy, auditAt, refundThru, csStuff, returnWarehouseNote, holdCode, holdUser, holdAt, errorCode, errorDesc, verificationStatus, verificationErrorDesc, refundedAt, status, processType) insert into only_after_sales_h(ofsid,returnType, exchangeType, refundInd, internalOrderType, bizChannel, code, companyCode, clientCode, storeCode, sourceUserAccount, sourceUserName, returnStatus, shipStatus, refundStatus, facilityCode, refOrderCode, refOrderId, refOrderType, refOrderStatusWhenReturned, sourcePlatformCode, sourceOrderCode, sourceOrderStatusWhenReturned, sourceReturnCode, sourceReturnStatus, reasonCode, returnNote, sellerNote, requestRefundAmount, actualRefundAmount, totalQty, totalFulfillQty, shipFromAttentionTo, shipFromAddress, shipFromCountry, shipFromState, shipFromCity, shipFromDistrict, shipFromPostalCode, shipFromPhone, shipFromMobile, shipFromFax, shipFromEmail, shipCarrier, shipWaybillCode, shipLogisticsStatus, returnCarrier, returnWaybillCode, returnLogisticsStatus, payAccount, payOrderNo, auditBy, auditAt, refundThru, csStuff, returnWarehouseNote, holdCode, holdUser, holdAt, errorCode, errorDesc, verificationStatus, verificationErrorDesc, refundedAt, status, processType,businessType)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="list" item="entity" separator=",">
(#{entity.ofsid},#{entity.returntype},#{entity.exchangetype},#{entity.refundind},#{entity.internalordertype},#{entity.bizchannel},#{entity.code},#{entity.companycode},#{entity.clientcode},#{entity.storecode},#{entity.sourceuseraccount},#{entity.sourceusername},#{entity.returnstatus},#{entity.shipstatus},#{entity.refundstatus},#{entity.facilitycode},#{entity.refordercode},#{entity.reforderid},#{entity.refordertype},#{entity.reforderstatuswhenreturned},#{entity.sourceplatformcode},#{entity.sourceordercode},#{entity.sourceorderstatuswhenreturned},#{entity.sourcereturncode},#{entity.sourcereturnstatus},#{entity.reasoncode},#{entity.returnnote},#{entity.sellernote},#{entity.requestrefundamount},#{entity.actualrefundamount},#{entity.totalqty},#{entity.totalfulfillqty},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromcountry},#{entity.shipfromstate},#{entity.shipfromcity},#{entity.shipfromdistrict},#{entity.shipfrompostalcode},#{entity.shipfromphone},#{entity.shipfrommobile},#{entity.shipfromfax},#{entity.shipfromemail},#{entity.shipcarrier},#{entity.shipwaybillcode},#{entity.shiplogisticsstatus},#{entity.returncarrier},#{entity.returnwaybillcode},#{entity.returnlogisticsstatus},#{entity.payaccount},#{entity.payorderno},#{entity.auditby},#{entity.auditat},#{entity.refundthru},#{entity.csstuff},#{entity.returnwarehousenote},#{entity.holdcode},#{entity.holduser},#{entity.holdat},#{entity.errorcode},#{entity.errordesc},#{entity.verificationstatus},#{entity.verificationerrordesc},#{entity.refundedat},#{entity.status},#{entity.processtype}) (#{entity.ofsid},#{entity.returntype},#{entity.exchangetype},#{entity.refundind},#{entity.internalordertype},#{entity.bizchannel},#{entity.code},#{entity.companycode},#{entity.clientcode},#{entity.storecode},#{entity.sourceuseraccount},#{entity.sourceusername},#{entity.returnstatus},#{entity.shipstatus},#{entity.refundstatus},#{entity.facilitycode},#{entity.refordercode},#{entity.reforderid},#{entity.refordertype},#{entity.reforderstatuswhenreturned},#{entity.sourceplatformcode},#{entity.sourceordercode},#{entity.sourceorderstatuswhenreturned},#{entity.sourcereturncode},#{entity.sourcereturnstatus},#{entity.reasoncode},#{entity.returnnote},#{entity.sellernote},#{entity.requestrefundamount},#{entity.actualrefundamount},#{entity.totalqty},#{entity.totalfulfillqty},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromcountry},#{entity.shipfromstate},#{entity.shipfromcity},#{entity.shipfromdistrict},#{entity.shipfrompostalcode},#{entity.shipfromphone},#{entity.shipfrommobile},#{entity.shipfromfax},#{entity.shipfromemail},#{entity.shipcarrier},#{entity.shipwaybillcode},#{entity.shiplogisticsstatus},#{entity.returncarrier},#{entity.returnwaybillcode},#{entity.returnlogisticsstatus},#{entity.payaccount},#{entity.payorderno},#{entity.auditby},#{entity.auditat},#{entity.refundthru},#{entity.csstuff},#{entity.returnwarehousenote},#{entity.holdcode},#{entity.holduser},#{entity.holdat},#{entity.errorcode},#{entity.errordesc},#{entity.verificationstatus},#{entity.verificationerrordesc},#{entity.refundedat},#{entity.status},#{entity.processtype},#{entity.businessType})
</foreach> </foreach>
on duplicate key update on duplicate key update
ofsid = values(ofsid), ofsid = values(ofsid),
@ -710,7 +765,29 @@
verificationErrorDesc = values(verificationErrorDesc), verificationErrorDesc = values(verificationErrorDesc),
refundedAt = values(refundedAt), refundedAt = values(refundedAt),
status = values(status), status = values(status),
processType = values(processType)</insert> processType = values(processType),
businessType = values(businessType)
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatchBySuccessOrFail" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_h(id,businessType,transactionDate,newPushDate,newTransmitInfo,newState,newsystemnumber,newsystemprimary)
values
<foreach collection="list" item="entity" separator=",">
(#{entity.id},#{entity.businessType},#{entity.transactionDate},#{entity.newPushDate},#{entity.newTransmitInfo},#{entity.newState},#{entity.newsystemnumber},#{entity.newsystemprimary})
</foreach>
on duplicate key update
id = values(id),
businessType = values(businessType),
transactionDate = values(transactionDate),
newPushDate = values(newPushDate),
newTransmitInfo = values(newTransmitInfo),
newState = values(newState),
newsystemnumber = values(newsystemnumber),
newsystemprimary = values(newsystemprimary)
</insert>
<!--通过主键修改方法--> <!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity" > <update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity" >
update only_after_sales_h set update only_after_sales_h set
@ -785,14 +862,23 @@ update only_after_sales_h set
<if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts = #{merchantDiscounts},</if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts = #{merchantDiscounts},</if>
<if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts = #{expertDiscounts},</if> <if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts = #{expertDiscounts},</if>
<if test="payDiscounts != null and payDiscounts != ''"> payDiscounts = #{payDiscounts},</if> <if test="payDiscounts != null and payDiscounts != ''"> payDiscounts = #{payDiscounts},</if>
<if test="businessType != null and businessType != ''"> businessType = #{businessType},</if>
<if test="transactionDate != null and transactionDate != ''"> transactionDate = #{transactionDate},</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>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity" > <update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity" >
update only_after_sales_h set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} update only_after_sales_h set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id} where id = #{id}
</update> </update>
<!-- 多条件逻辑删除 --> <!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity" > <update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity" >
update only_after_sales_h set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} update only_after_sales_h set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
@ -868,16 +954,20 @@ update only_after_sales_h set sts= 'N' ,modify_time = #{modify_time},modify_use
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if> <if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if> <if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if> <if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> and businessType = #{businessType} </if>
</trim> <if test="transactionDate != null and transactionDate != ''"> and transactionDate = #{transactionDate} </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>
</trim>
</update> </update>
<!--通过主键删除--> <!--通过主键删除-->
<delete id="entity_delete"> <delete id="entity_delete">
delete from only_after_sales_h where id = #{id} delete from only_after_sales_h where id = #{id}
</delete> </delete>
<!--批量新增--> <!--批量新增-->
</mapper> </mapper>

View File

@ -127,6 +127,8 @@ public class OfsPassiveorderDetailEntity extends BaseEntity {
private String def10; private String def10;
// private String ofsId;
public String getDef1() { public String getDef1() {
return def1; return def1;
} }

View File

@ -45,6 +45,7 @@
,lastUpdated ,lastUpdated
,lastUpdatedBy ,lastUpdatedBy
</sql> </sql>
<!-- 查询 采用==查询 --> <!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-OfsPassiveorderHeaderEntity-result" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity"> <select id="entity_list_base" resultMap="get-OfsPassiveorderHeaderEntity-result" parameterType = "com.hzya.frame.plugin.lets.ofs.entity.OfsPassiveorderHeaderEntity">
select select
@ -219,6 +220,7 @@
</trim> </trim>
) )
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true"> <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) insert into ofs_passiveorder_header(clientCode, companyCode, facilityCode, storeCode, receiptCode, warehouseCode, returnWaybillCode, sourceReturnCode, sourceOrderCode, returnOrderCode, actualRefundAmount, returnTime, relatedAt, status, created, createdBy, lastUpdated, lastUpdatedBy, sts)
@ -313,6 +315,7 @@ update ofs_passiveorder_header set sts= 'N' ,modify_time = #{modify_time},modif
and sts='Y' and sts='Y'
</trim> </trim>
</update> </update>
<!--通过主键删除--> <!--通过主键删除-->
<delete id="entity_delete"> <delete id="entity_delete">
delete from ofs_passiveorder_header where id = #{id} delete from ofs_passiveorder_header where id = #{id}

View File

@ -521,6 +521,10 @@ public class ConsignmachiningCinfurmIn extends PluginBaseEntity {
consignmachiningInBodyDto.setBomversion("1.0");//BOM version consignmachiningInBodyDto.setBomversion("1.0");//BOM version
consignmachiningInBodyDto.setCsourcebillbid(u8cPoOrderDetail.getCorderBid());//来源明细主键 consignmachiningInBodyDto.setCsourcebillbid(u8cPoOrderDetail.getCorderBid());//来源明细主键
consignmachiningInBodyDto.setCsourcebillhid(scOrderEntity.getCorderid());//来源表头主键 consignmachiningInBodyDto.setCsourcebillhid(scOrderEntity.getCorderid());//来源表头主键
consignmachiningInBodyDto.setCfirstbillbid(u8cPoOrderDetail.getCorderBid());//源头单据表体id
consignmachiningInBodyDto.setCfirstbillhid(scOrderEntity.getCorderid());//源头单据表头id
consignmachiningInBodyDto.setCfirsttype("61");//源头单据类型
consignmachiningInBodyDtoArrayList.add(consignmachiningInBodyDto); consignmachiningInBodyDtoArrayList.add(consignmachiningInBodyDto);
} }

View File

@ -483,6 +483,10 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
consignmachiningInBodyDto.setBomversion("1.0");//BOM version consignmachiningInBodyDto.setBomversion("1.0");//BOM version
consignmachiningInBodyDto.setCsourcebillbid(u8cPoOrderDetail.getCorderBid());//来源明细主键 consignmachiningInBodyDto.setCsourcebillbid(u8cPoOrderDetail.getCorderBid());//来源明细主键
consignmachiningInBodyDto.setCsourcebillhid(scOrderEntity.getCorderid());//来源表头主键 consignmachiningInBodyDto.setCsourcebillhid(scOrderEntity.getCorderid());//来源表头主键
consignmachiningInBodyDto.setCfirstbillbid(u8cPoOrderDetail.getCorderBid());//源头单据表体id
consignmachiningInBodyDto.setCfirstbillhid(scOrderEntity.getCorderid());//源头单据表头id
consignmachiningInBodyDto.setCfirsttype("61");//源头单据类型
consignmachiningInBodyDtoArrayList.add(consignmachiningInBodyDto); consignmachiningInBodyDtoArrayList.add(consignmachiningInBodyDto);
} }

View File

@ -899,17 +899,17 @@ public class RefundOnlyPluginInitializerToB extends PluginBaseEntity {
OnlyAfterSalesHEntity onlyAfterSalesHEntity = new OnlyAfterSalesHEntity(); OnlyAfterSalesHEntity onlyAfterSalesHEntity = new OnlyAfterSalesHEntity();
BeanUtil.copyProperties(header, onlyAfterSalesHEntity, CopyOptions.create().ignoreCase()); BeanUtil.copyProperties(header, onlyAfterSalesHEntity, CopyOptions.create().ignoreCase());
// allH.add(onlyAfterSalesHEntity); // allH.add(onlyAfterSalesHEntity);
onlyAfterSalesHEntity.setId(null); // onlyAfterSalesHEntity.setId(null);
onlyAfterSalesHEntity.setOfsid(header.getId()); onlyAfterSalesHEntity.setOfsid(header.getId());
OnlyAfterSalesHEntity save = onlyAfterSalesHDao.save(onlyAfterSalesHEntity); OnlyAfterSalesHEntity save = onlyAfterSalesHDao.save(onlyAfterSalesHEntity);
String HId = save.getId(); String HId = save.getOfsid();
List<RerturnGoodsOrderSearchDetails> details = returnGoodsOrder.getDetails(); List<RerturnGoodsOrderSearchDetails> details = returnGoodsOrder.getDetails();
for (RerturnGoodsOrderSearchDetails detail : details) { for (RerturnGoodsOrderSearchDetails detail : details) {
OnlyAfterSalesBEntity onlyAfterSalesBEntity = new OnlyAfterSalesBEntity(); OnlyAfterSalesBEntity onlyAfterSalesBEntity = new OnlyAfterSalesBEntity();
BeanUtil.copyProperties(detail, onlyAfterSalesBEntity, CopyOptions.create().ignoreCase()); BeanUtil.copyProperties(detail, onlyAfterSalesBEntity, CopyOptions.create().ignoreCase());
// allB.add(onlyAfterSalesBEntity); // allB.add(onlyAfterSalesBEntity);
onlyAfterSalesBEntity.setId(null); // onlyAfterSalesBEntity.setId(null);
onlyAfterSalesBEntity.setHid(HId); onlyAfterSalesBEntity.setHid(HId);
onlyAfterSalesBEntity.setOfsid(detail.getId()); onlyAfterSalesBEntity.setOfsid(detail.getId());
//四个优惠platformDiscounts 平台优惠merchantDiscounts 商家优惠expertDiscounts 达人优惠payDiscounts 支付优惠 //四个优惠platformDiscounts 平台优惠merchantDiscounts 商家优惠expertDiscounts 达人优惠payDiscounts 支付优惠

View File

@ -878,17 +878,16 @@ public class RefundOnlyPluginInitializerToC extends PluginBaseEntity {
OnlyAfterSalesHEntity onlyAfterSalesHEntity = new OnlyAfterSalesHEntity(); OnlyAfterSalesHEntity onlyAfterSalesHEntity = new OnlyAfterSalesHEntity();
BeanUtil.copyProperties(header, onlyAfterSalesHEntity, CopyOptions.create().ignoreCase()); BeanUtil.copyProperties(header, onlyAfterSalesHEntity, CopyOptions.create().ignoreCase());
// allH.add(onlyAfterSalesHEntity); // allH.add(onlyAfterSalesHEntity);
onlyAfterSalesHEntity.setId(null); // onlyAfterSalesHEntity.setId(null);
onlyAfterSalesHEntity.setOfsid(header.getId()); onlyAfterSalesHEntity.setOfsid(header.getId());
OnlyAfterSalesHEntity save = onlyAfterSalesHDao.save(onlyAfterSalesHEntity); OnlyAfterSalesHEntity save = onlyAfterSalesHDao.save(onlyAfterSalesHEntity);
String HId = save.getId(); String HId = save.getOfsid();
List<RerturnGoodsOrderSearchDetails> details = returnGoodsOrder.getDetails(); List<RerturnGoodsOrderSearchDetails> details = returnGoodsOrder.getDetails();
for (RerturnGoodsOrderSearchDetails detail : details) { for (RerturnGoodsOrderSearchDetails detail : details) {
OnlyAfterSalesBEntity onlyAfterSalesBEntity = new OnlyAfterSalesBEntity(); OnlyAfterSalesBEntity onlyAfterSalesBEntity = new OnlyAfterSalesBEntity();
BeanUtil.copyProperties(detail, onlyAfterSalesBEntity, CopyOptions.create().ignoreCase()); BeanUtil.copyProperties(detail, onlyAfterSalesBEntity, CopyOptions.create().ignoreCase());
// allB.add(onlyAfterSalesBEntity); // allB.add(onlyAfterSalesBEntity);
onlyAfterSalesBEntity.setId(null);
onlyAfterSalesBEntity.setHid(HId); onlyAfterSalesBEntity.setHid(HId);
onlyAfterSalesBEntity.setOfsid(detail.getId()); onlyAfterSalesBEntity.setOfsid(detail.getId());
//四个优惠platformDiscounts 平台优惠merchantDiscounts 商家优惠expertDiscounts 达人优惠payDiscounts 支付优惠 //四个优惠platformDiscounts 平台优惠merchantDiscounts 商家优惠expertDiscounts 达人优惠payDiscounts 支付优惠

View File

@ -1372,12 +1372,18 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
if (stockinH != null && stockinH.getRefundedAt() != null) { if (stockinH != null && stockinH.getRefundedAt() != null) {
String refundedAt = stockinH.getRefundedAt(); String refundedAt = stockinH.getRefundedAt();
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto = stockinH.getHeaderDetailsDto();
com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header = headerDetailsDto.getHeader();
String businessFormat = null; String businessFormat = null;
try { try {
//2025年1月22日 17:44:55 先暂时还是使用旧逻辑 //2025年1月22日 17:44:55 先暂时还是使用旧逻辑
Date dbill = DateUtil.parse(refundedAt); Date refundedAtDate = DateUtil.parse(refundedAt);
DateTime tradeSuccessAtDate = DateUtil.parse(header.getTradeSuccessAt());
Date effectiveDate = refundedAtDate.compareTo(tradeSuccessAtDate) > 0 ? refundedAtDate : tradeSuccessAtDate;
// Date dbill = DateUtil.parse(timeJudgment(stockinH)); // Date dbill = DateUtil.parse(timeJudgment(stockinH));
businessFormat = DateUtil.format(dbill, "yyyy-MM-dd"); businessFormat = DateUtil.format(effectiveDate, "yyyy-MM-dd");
} catch (Exception e) { } catch (Exception e) {
logger.error("业务日期生成失败refundedAt(O退款完成时间)解析异常:{} O售后入库单编码{}", e.getMessage(), code); logger.error("业务日期生成失败refundedAt(O退款完成时间)解析异常:{} O售后入库单编码{}", e.getMessage(), code);
Assert.state(false, "业务日期生成失败refundedAt(O退款完成时间)解析异常:{} O售后入库单编码{}", e.getMessage(), code); Assert.state(false, "业务日期生成失败refundedAt(O退款完成时间)解析异常:{} O售后入库单编码{}", e.getMessage(), code);
@ -3381,21 +3387,32 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
if (returnGoodHeaderDetailsDataDtoList1 != null && returnGoodHeaderDetailsDataDtoList1.size() > 0) { if (returnGoodHeaderDetailsDataDtoList1 != null && returnGoodHeaderDetailsDataDtoList1.size() > 0) {
filteredList = returnGoodHeaderDetailsDataDtoList1.stream().filter(stockinOrder -> { filteredList = returnGoodHeaderDetailsDataDtoList1.stream().filter(stockinOrder -> {
StockinOrderSearchResponse.StockinOrder.StockinH header = stockinOrder.getHeader(); StockinOrderSearchResponse.StockinOrder.StockinH header = stockinOrder.getHeader();
if (header == null) { com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto = header.getHeaderDetailsDto();//OFS销售订单
// 如果 StockinH 为空保留该对象 if (headerDetailsDto == null) {
return true; return false;
} }
RerturnGoodsOrderSearchData returnData = header.getRerturnGoodsOrderSearchData(); com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDto header1 = headerDetailsDto.getHeader();
if (returnData == null || returnData.getHeader() == null) { String tradeSuccessAt = header1.getTradeSuccessAt();
// 如果 RerturnGoodsOrderSearchData 为空保留该对象 if (tradeSuccessAt == null) {
return true; return false;
} }
if (returnData.getHeader().getReturnNode() == null) { return true;
// 如果 RerturnGoodsOrderSearchData 为空保留该对象
return true; // if (header == null) {
} // // 如果 StockinH 为空保留该对象
// 检查 returnNode 是否不等于 200若不等于则保留 // return true;
return !"200".equals(returnData.getHeader().getReturnNode().trim()); // }
// RerturnGoodsOrderSearchData returnData = header.getRerturnGoodsOrderSearchData();
// if (returnData == null || returnData.getHeader() == null) {
// // 如果 RerturnGoodsOrderSearchData 为空保留该对象
// return true;
// }
// if (returnData.getHeader().getReturnNode() == null) {
// // 如果 RerturnGoodsOrderSearchData 为空保留该对象
// return true;
// }
// // 检查 returnNode 是否不等于 200若不等于则保留
// return !"200".equals(returnData.getHeader().getReturnNode().trim());
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
return filteredList; return filteredList;

View File

@ -24,4 +24,7 @@ public class ConsignmachiningInBodyDto {
private String vdef16; private String vdef16;
private String csourcebillbid;//来源明细主键 private String csourcebillbid;//来源明细主键
private String csourcebillhid;//来源表头主键 private String csourcebillhid;//来源表头主键
private String cfirstbillbid;//源头单据表体id
private String cfirstbillhid;//源头单据表头id
private String cfirsttype;//源头单据类型
} }

View File

@ -0,0 +1,52 @@
package com.hzya.frame.plugin.lets.u8cdto;
import com.hzya.frame.ttxofs.dto.passivestorage.PassiveStorageResponse;
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchDetails;
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchHeader;
import lombok.Data;
import java.util.List;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.u8cdto
* @ProjectkangarooDataCenterV3
* @nameErrorHeaderDetailsDtoDto
* @Date2024/9/5 15:48
* @FilenameErrorHeaderDetailsDtoDto
*/
@Data
public class ErrorHeaderDetailsDtoDtoV4 {
//(销售)推送时间
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;
//交易成功时间
// private String transactionDate;
//表头
private RerturnGoodsOrderSearchHeader header;
//明细
private List<RerturnGoodsOrderSearchDetails> details;
}

View File

@ -0,0 +1,146 @@
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.returngoodordersearch.RerturnGoodsOrderSearchDetails;
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchHeader;
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 PassiveStorageSonDetailsDto2 extends RerturnGoodsOrderSearchDetails {
/**
* 表头对象
*/
private RerturnGoodsOrderSearchHeader 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

@ -0,0 +1,653 @@
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.returngoodordersearch.RerturnGoodsOrderSearchData;
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchDetails;
import com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchHeader;
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 PassiveComponentsArchivesCacheUtilV2 {
@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<RerturnGoodsOrderSearchHeader> headerDtoList) {
Map<String, BdCubasdocEntity> stringBdCubasdocEntityMap = new HashMap<>();
List<BdCubasdocEntity> allBdCumandocEntityList = new ArrayList<>();
if (headerDtoList != null && headerDtoList.size() > 0) {
Set<String> stringSet = headerDtoList.stream().map(RerturnGoodsOrderSearchHeader::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<RerturnGoodsOrderSearchHeader> 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(RerturnGoodsOrderSearchHeader::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<RerturnGoodsOrderSearchDetails> 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(RerturnGoodsOrderSearchDetails::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<RerturnGoodsOrderSearchDetails> detailsDtoList) throws Exception {
List<BdInvbasdocEntity> allBdInvbasdocEntityList = new ArrayList<>();
if (detailsDtoList != null && detailsDtoList.size() > 0) {
Set<String> stringSet = detailsDtoList.stream().map(RerturnGoodsOrderSearchDetails::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<RerturnGoodsOrderSearchDetails> 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(RerturnGoodsOrderSearchDetails::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 rerturnGoodsOrderSearchDataList1 OFS售后入库单
* @author liuyang
*/
public CacheTocMapVoV2 initCache(List<RerturnGoodsOrderSearchData> rerturnGoodsOrderSearchDataList1) throws Exception {
Assert.notNull(rerturnGoodsOrderSearchDataList1, "rerturnGoodsOrderSearchDataList1不能为空");
List<RerturnGoodsOrderSearchHeader> rerturnGoodsOrderSearchHeaders = initOFsHeadDto(rerturnGoodsOrderSearchDataList1);
List<RerturnGoodsOrderSearchDetails> rerturnGoodsOrderSearchDetails = initOfsDetailsDto(rerturnGoodsOrderSearchDataList1);
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(rerturnGoodsOrderSearchHeaders);
Map<String, BdCumandocEntity> stringBdCumandocEntityMap = initBdCumandocV2(rerturnGoodsOrderSearchHeaders);
Map<String, BdInvmandocEntity> stringBdInvmandocEntityMap = initInventoryFileV2(rerturnGoodsOrderSearchDetails);
Map<String, BdInvbasdocEntity> stringBdInvbasdocEntityMap = initBasicInventoryFileV2(rerturnGoodsOrderSearchDetails);
Map<String, BdTaxitemsEntity> stringBdTaxitemsEntityMap = initBdTaxitemsEntityV2(rerturnGoodsOrderSearchDetails);
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<RerturnGoodsOrderSearchDetails> initOfsDetailsDto(List<RerturnGoodsOrderSearchData> passiveStorageResponseDataDtoList) {
List<RerturnGoodsOrderSearchDetails> stockinBList = new ArrayList<>();
if (passiveStorageResponseDataDtoList != null && passiveStorageResponseDataDtoList.size() > 0) {
for (int i = 0; i < passiveStorageResponseDataDtoList.size(); i++) {
RerturnGoodsOrderSearchData rerturnGoodsOrderSearchData = passiveStorageResponseDataDtoList.get(i);
RerturnGoodsOrderSearchHeader header = rerturnGoodsOrderSearchData.getHeader();
List<RerturnGoodsOrderSearchDetails> details = rerturnGoodsOrderSearchData.getDetails();
stockinBList.addAll(details);
}
}
return stockinBList;
}
/**
* 整理出表头集合
*
* @author liuyang
*/
private List<RerturnGoodsOrderSearchHeader> initOFsHeadDto(List<RerturnGoodsOrderSearchData> rerturnGoodsOrderSearchDataList) throws Exception {
List<RerturnGoodsOrderSearchHeader> stockinHList = new ArrayList<>();
if (rerturnGoodsOrderSearchDataList != null && rerturnGoodsOrderSearchDataList.size() > 0) {
for (int i = 0; i < rerturnGoodsOrderSearchDataList.size(); i++) {
RerturnGoodsOrderSearchData rerturnGoodsOrderSearchData = rerturnGoodsOrderSearchDataList.get(i);
RerturnGoodsOrderSearchHeader header = rerturnGoodsOrderSearchData.getHeader();
List<RerturnGoodsOrderSearchDetails> details = rerturnGoodsOrderSearchData.getDetails();
stockinHList.add(header);
}
}
return stockinHList;
}
}

View File

@ -30,7 +30,7 @@ public class ConsignmachiningCinfurmInTest {
// consignmachiningCinfurmIn.startImplementByTime("2024-01-02 00:00:00", "2024-01-02 23:59:59"); // consignmachiningCinfurmIn.startImplementByTime("2024-01-02 00:00:00", "2024-01-02 23:59:59");
// String code = "LETS-RE2024111400002771-confirm"; // String code = "LETS-RE2024111400002771-confirm";
String code = "LETS-RE2025031700001761-confirm"; String code = "LETS-RE2024112900000538-confirm";
consignmachiningCinfurmIn.startImplementByCode(code); consignmachiningCinfurmIn.startImplementByCode(code);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

View File

@ -3,7 +3,9 @@ package com.hzya.frame.plugin.lets.plugin.sales;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.WebappApplication; import com.hzya.frame.WebappApplication;
import com.hzya.frame.plugin.lets.entity.BdBusitypeEntity; import com.hzya.frame.plugin.lets.entity.BdBusitypeEntity;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.queryvo.StartAndEndVo; import com.hzya.frame.plugin.lets.queryvo.StartAndEndVo;
import com.hzya.frame.plugin.lets.util.OfsStandardUtil;
import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil; import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse; import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -12,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -32,17 +35,28 @@ public class SoSaleReturnPluginInitializerToCTest {
@Autowired @Autowired
private QueryBdBusitypeUtil queryBdBusitypeUtil; private QueryBdBusitypeUtil queryBdBusitypeUtil;
@Autowired
private OfsStandardUtil ofsStandardUtil;
@Test @Test
public void startImplement() { public void startImplement() {
// soSaleReturnPluginInitializerToC.startImplement(null, null); // soSaleReturnPluginInitializerToC.startImplement(null, null);
try { try {
//带优惠金额场景 //带优惠金额场景
String code = "LETS-RE2025030100000112"; // String code = "LETS-RE2025030100000112";
soSaleReturnPluginInitializerToC.startImplementByCode(code, "tran"); // soSaleReturnPluginInitializerToC.startImplementByCode(code, "tran");
//无优惠金额场景 //无优惠金额场景
// String code = "LETS-RE2025031900000002"; // String code = "LETS-RE2025031900000002";
// soSaleReturnPluginInitializerToC.startImplementByCode(code, "tran"); // soSaleReturnPluginInitializerToC.startImplementByCode(code, "tran");
List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtoArrayList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setCode("LETS-SO2025040100000698");
ofsStandardUtil.getOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoArrayList, 1L);
if (headerDetailsDtoArrayList.size() > 0) {
System.out.println(headerDetailsDtoArrayList.get(0));
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -0,0 +1,23 @@
package com.hzya.frame.report.lets.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.report.lets.dto.OnlyAfterSalesBDto;
import com.hzya.frame.report.lets.entity.OnlyAfterSalesBEntity;
import java.util.List;
/**
* 售后订单表_仅退款_子表(only_after_sales_b: table)表数据库访问层
*
* @author makejava
* @since 2024-09-23 10:43:46
*/
public interface IOnlyAfterSalesBDao extends IBaseDao<OnlyAfterSalesBEntity, String> {
/**
* 查询无源件退款部分的数据导出excel
*
* @author liuyang
*/
List<OnlyAfterSalesBDto> queryPassiveComponentsExport(OnlyAfterSalesBEntity onlyAfterSalesBEntity) throws Exception;
}

View File

@ -0,0 +1,14 @@
package com.hzya.frame.report.lets.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.report.lets.entity.OnlyAfterSalesHEntity;
/**
* 售后订单表_仅退款_主表(only_after_sales_h: table)表数据库访问层
*
* @author makejava
* @since 2024-09-23 10:43:07
*/
public interface IOnlyAfterSalesHDao extends IBaseDao<OnlyAfterSalesHEntity, String> {
}

View File

@ -0,0 +1,25 @@
package com.hzya.frame.report.lets.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.report.lets.dao.IOnlyAfterSalesBDao;
import com.hzya.frame.report.lets.dto.OfsPassiveorderDetailDto;
import com.hzya.frame.report.lets.dto.OnlyAfterSalesBDto;
import com.hzya.frame.report.lets.entity.OnlyAfterSalesBEntity;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* 售后订单表_仅退款_子表(OnlyAfterSalesB)表数据库访问层
*
* @author makejava
* @since 2024-09-23 10:43:46
*/
@Repository(value = "reportIOnlyAfterSalesBDao")
public class OnlyAfterSalesBDaoImpl extends MybatisGenericDao<OnlyAfterSalesBEntity, String> implements IOnlyAfterSalesBDao {
@Override
public List<OnlyAfterSalesBDto> queryPassiveComponentsExport(OnlyAfterSalesBEntity onlyAfterSalesBEntity) throws Exception {
return (List<OnlyAfterSalesBDto>) selectList("com.hzya.frame.report.lets.dao.impl.OnlyAfterSalesBDaoImpl.queryPassiveComponentsExport", onlyAfterSalesBEntity);
}
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.report.lets.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.report.lets.dao.IOnlyAfterSalesHDao;
import com.hzya.frame.report.lets.entity.OnlyAfterSalesHEntity;
import org.springframework.stereotype.Repository;
/**
* 售后订单表_仅退款_主表(OnlyAfterSalesH)表数据库访问层
*
* @author makejava
* @since 2024-09-23 10:43:07
*/
@Repository(value = "reportIOnlyAfterSalesHDao")
public class OnlyAfterSalesHDaoImpl extends MybatisGenericDao<OnlyAfterSalesHEntity, String> implements IOnlyAfterSalesHDao {
}

View File

@ -0,0 +1,108 @@
package com.hzya.frame.report.lets.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import com.hzya.frame.web.entity.BaseEntity;
import lombok.Data;
/**
* 售后订单表_仅退款_子表(OnlyAfterSalesB)实体类
*
* @author makejava
* @since 2024-09-23 10:43:46
*/
@Data
public class OnlyAfterSalesBDto {
@ExcelProperty(value = "O售后订单主键")
private String hid;
@ExcelProperty(value = "O售后订单明细行id")
private String ofsid;
/**
* 退货单号
*/
@ExcelProperty(value = "O售后订单号")
private String returnordercode;
/**
* SKU编码
*/
@ExcelProperty(value = "O货品编码")
private String skucode;
/**
* SKU名称
*/
@ExcelProperty(value = "O货品名称")
private String skuname;
/**
* 货主编码
*/
@ExcelProperty(value = "O货主编码")
private String companycode;
/**
* 店铺
*/
@ExcelProperty(value = "O店铺编码")
private String storecode;
/**
* 请求数量
*/
@ExcelProperty(value = "O请求数量")
private String requestqty;
/**
* 实际退货数量
*/
@ExcelProperty(value = "O实退数量")
private String fulfillqty;
/**
* 退货金额
*/
@ExcelProperty(value = "O退货金额")
private String totalamount;
//业务类型
@ExcelProperty(value = "O业务类型")
private String businessType;
//业务日期-退货完成时间或交易成功时间
@ExcelProperty(value = "O业务日期")
private String transactionDate;
//推送时间
@ExcelProperty(value = "O推送时间")
private String newPushDate;
//报错详情
@ExcelProperty(value = "O报错详情")
private String newTransmitInfo;
//推送状态
@ExcelProperty(value = "O推送状态")
private String newState;
//下游单号
@ExcelProperty(value = "O下游单号")
private String newsystemnumber;
//下游主键
@ExcelProperty(value = "O下游主键")
private String newsystemprimary;
@ExcelProperty(value = "O计算应收")
private String def1;
@ExcelProperty(value = "O计算公式")
private String def2;
@ExcelProperty(value = "O平台优惠")
private String def3;
@ExcelProperty(value = "O支付优惠")
private String def4;
@ExcelProperty(value = "O达人优惠")
private String def5;
@ExcelProperty(value = "O商家优惠")
private String def6;
}

View File

@ -0,0 +1,177 @@
package com.hzya.frame.report.lets.entity;
import com.hzya.frame.web.entity.BaseEntity;
import lombok.Data;
/**
* 售后订单表_仅退款_子表(OnlyAfterSalesB)实体类
*
* @author makejava
* @since 2024-09-23 10:43:46
*/
@Data
public class OnlyAfterSalesBEntity extends BaseEntity {
private String hid;
private String ofsid;
/**
* 根据明细主键批量查询
*/
private String ofsids;
/**
* 退货单ID
*/
private Long returnorderid;
/**
* 退货单号
*/
private String returnordercode;
/**
* SKU编码
*/
private String skucode;
/**
* SKU名称
*/
private String skuname;
/**
* 货主编码
*/
private String companycode;
/**
* 组织
*/
private String clientcode;
/**
* 店铺
*/
private String storecode;
/**
* 退货类型
*/
private String returntype;
/**
* 是否退款
*/
private String refundind;
/**
* 请求数量
*/
private String requestqty;
/**
* 实际退货数量
*/
private String fulfillqty;
/**
* 货品单位
*/
private String quantityum;
/**
* 商品零售价
*/
private String msrprice;
/**
* 总重量
*/
private String totalweight;
/**
* 总体积
*/
private String totalvolume;
/**
* 重量单位
*/
private String weightum;
/**
* 体积单位
*/
private String volumeum;
/**
* 退货金额
*/
private String totalamount;
/**
* 平台订单行号
*/
private String sourcelinenum;
/**
* 原订单号
*/
private String sourceordercode;
/**
* 原支付单价
*/
private String sourcediscountprice;
/**
* 原支付金额
*/
private String sourcepayamount;
/**
* 原购买数量
*/
private String sourcerequestqty;
/**
* bom类型
*/
private String bomtype;
/**
* 拆分bom前的明细id
*/
private Long originaldetailid;
/**
* 处理原因
*/
private String reasoncode;
/**
* 处理备注
*/
private String reasondesc;
//平台优惠表头的
private String platformDiscounts;
//商家优惠表头的
private String merchantDiscounts;
//达人优惠表头的
private String expertDiscounts;
//支付优惠表头的
private String payDiscounts;
//业务类型
private String businessType;
//业务日期-退货完成时间或交易成功时间
private String transactionDate;
//推送时间
private String newPushDate;
//报错详情
private String newTransmitInfo;
//推送状态
private String newState;
//下游单号
private String newsystemnumber;
//下游主键
private String newsystemprimary;
private String def1;
private String def2;
private String def3;
private String def4;
private String def5;
private String def6;
private String transactionDateStart;
private String transactionDateEnd;
}

View File

@ -0,0 +1,675 @@
<?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.report.lets.dao.impl.OnlyAfterSalesBDaoImpl">
<resultMap id="get-OnlyAfterSalesBEntity-result" type="com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity" >
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="hid" column="hid" jdbcType="INTEGER"/>
<result property="ofsid" column="ofsid" jdbcType="INTEGER"/>
<result property="returnorderid" column="returnOrderId" jdbcType="INTEGER"/>
<result property="returnordercode" column="returnOrderCode" jdbcType="VARCHAR"/>
<result property="skucode" column="skuCode" jdbcType="VARCHAR"/>
<result property="skuname" column="skuName" jdbcType="VARCHAR"/>
<result property="companycode" column="companyCode" jdbcType="VARCHAR"/>
<result property="clientcode" column="clientCode" jdbcType="VARCHAR"/>
<result property="storecode" column="storeCode" jdbcType="VARCHAR"/>
<result property="returntype" column="returnType" jdbcType="VARCHAR"/>
<result property="refundind" column="refundInd" jdbcType="VARCHAR"/>
<result property="requestqty" column="requestQty" jdbcType="VARCHAR"/>
<result property="fulfillqty" column="fulfillQty" jdbcType="VARCHAR"/>
<result property="quantityum" column="quantityUM" jdbcType="VARCHAR"/>
<result property="msrprice" column="msrPrice" jdbcType="VARCHAR"/>
<result property="totalweight" column="totalWeight" jdbcType="VARCHAR"/>
<result property="totalvolume" column="totalVolume" jdbcType="VARCHAR"/>
<result property="weightum" column="weightUM" jdbcType="VARCHAR"/>
<result property="volumeum" column="volumeUM" jdbcType="VARCHAR"/>
<result property="totalamount" column="totalAmount" jdbcType="VARCHAR"/>
<result property="sourcelinenum" column="sourceLineNum" jdbcType="VARCHAR"/>
<result property="sourceordercode" column="sourceOrderCode" jdbcType="VARCHAR"/>
<result property="sourcediscountprice" column="sourceDiscountPrice" jdbcType="VARCHAR"/>
<result property="sourcepayamount" column="sourcePayAmount" jdbcType="VARCHAR"/>
<result property="sourcerequestqty" column="sourceRequestQty" jdbcType="VARCHAR"/>
<result property="bomtype" column="bomType" jdbcType="VARCHAR"/>
<result property="originaldetailid" column="originalDetailId" jdbcType="INTEGER"/>
<result property="reasoncode" column="reasonCode" jdbcType="VARCHAR"/>
<result property="reasondesc" column="reasonDesc" jdbcType="VARCHAR"/>
<result property="platformDiscounts" column="platformDiscounts" jdbcType="VARCHAR"/>
<result property="merchantDiscounts" column="merchantDiscounts" jdbcType="VARCHAR"/>
<result property="expertDiscounts" column="expertDiscounts" jdbcType="VARCHAR"/>
<result property="payDiscounts" column="payDiscounts" jdbcType="VARCHAR"/>
<result property="businessType" column="businessType" jdbcType="VARCHAR"/>
<result property="transactionDate" column="transactionDate" 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="def1" column="def1" jdbcType="VARCHAR"/>
<result property="def2" column="def2" jdbcType="VARCHAR"/>
<result property="def3" column="def3" jdbcType="VARCHAR"/>
<result property="def4" column="def4" jdbcType="VARCHAR"/>
<result property="def5" column="def5" jdbcType="VARCHAR"/>
<result property="def6" column="def6" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="get-OnlyAfterSalesBEntity-result2" type="com.hzya.frame.report.lets.dto.OnlyAfterSalesBDto" >
<result property="hid" column="hid" jdbcType="INTEGER"/>
<result property="ofsid" column="ofsid" jdbcType="INTEGER"/>
<result property="returnordercode" column="returnOrderCode" jdbcType="VARCHAR"/>
<result property="skucode" column="skuCode" jdbcType="VARCHAR"/>
<result property="skuname" column="skuName" jdbcType="VARCHAR"/>
<result property="companycode" column="companyCode" jdbcType="VARCHAR"/>
<result property="storecode" column="storeCode" jdbcType="VARCHAR"/>
<result property="requestqty" column="requestQty" jdbcType="VARCHAR"/>
<result property="fulfillqty" column="fulfillQty" jdbcType="VARCHAR"/>
<result property="totalamount" column="totalAmount" jdbcType="VARCHAR"/>
<result property="businessType" column="businessType" jdbcType="VARCHAR"/>
<result property="transactionDate" column="transactionDate" 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="def1" column="def1" jdbcType="VARCHAR"/>
<result property="def2" column="def2" jdbcType="VARCHAR"/>
<result property="def3" column="def3" jdbcType="VARCHAR"/>
<result property="def4" column="def4" jdbcType="VARCHAR"/>
<result property="def5" column="def5" jdbcType="VARCHAR"/>
<result property="def6" column="def6" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "OnlyAfterSalesBEntity_Base_Column_List">
id
,hid
,ofsid
,returnOrderId
,returnOrderCode
,skuCode
,skuName
,companyCode
,clientCode
,storeCode
,returnType
,refundInd
,requestQty
,fulfillQty
,quantityUM
,msrPrice
,totalWeight
,totalVolume
,weightUM
,volumeUM
,totalAmount
,sourceLineNum
,sourceOrderCode
,sourceDiscountPrice
,sourcePayAmount
,sourceRequestQty
,bomType
,originalDetailId
,reasonCode
,reasonDesc
,platformDiscounts
,merchantDiscounts
,expertDiscounts
,payDiscounts
,businessType
,transactionDate
,newPushDate
,newTransmitInfo
,newState
,newsystemnumber
,newsystemprimary
,def1
,def2
,def3
,def4
,def5
,def6
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-OnlyAfterSalesBEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity">
select
<include refid="OnlyAfterSalesBEntity_Base_Column_List" />
from only_after_sales_b
<trim prefix="where" prefixOverrides="and">
<if test="id != null"> and id = #{id} </if>
<if test="hid != null"> and hid = #{hid} </if>
<if test="ofsid != null"> and ofsid = #{ofsid} </if>
<if test="returnorderid != null"> and returnOrderId = #{returnorderid} </if>
<if test="returnordercode != null and returnordercode != ''"> and returnOrderCode = #{returnordercode} </if>
<if test="skucode != null and skucode != ''"> and skuCode = #{skucode} </if>
<if test="skuname != null and skuname != ''"> and skuName = #{skuname} </if>
<if test="companycode != null and companycode != ''"> and companyCode = #{companycode} </if>
<if test="clientcode != null and clientcode != ''"> and clientCode = #{clientcode} </if>
<if test="storecode != null and storecode != ''"> and storeCode = #{storecode} </if>
<if test="returntype != null and returntype != ''"> and returnType = #{returntype} </if>
<if test="refundind != null and refundind != ''"> and refundInd = #{refundind} </if>
<if test="requestqty != null and requestqty != ''"> and requestQty = #{requestqty} </if>
<if test="fulfillqty != null and fulfillqty != ''"> and fulfillQty = #{fulfillqty} </if>
<if test="quantityum != null and quantityum != ''"> and quantityUM = #{quantityum} </if>
<if test="msrprice != null and msrprice != ''"> and msrPrice = #{msrprice} </if>
<if test="totalweight != null and totalweight != ''"> and totalWeight = #{totalweight} </if>
<if test="totalvolume != null and totalvolume != ''"> and totalVolume = #{totalvolume} </if>
<if test="weightum != null and weightum != ''"> and weightUM = #{weightum} </if>
<if test="volumeum != null and volumeum != ''"> and volumeUM = #{volumeum} </if>
<if test="totalamount != null and totalamount != ''"> and totalAmount = #{totalamount} </if>
<if test="sourcelinenum != null and sourcelinenum != ''"> and sourceLineNum = #{sourcelinenum} </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode = #{sourceordercode} </if>
<if test="sourcediscountprice != null and sourcediscountprice != ''"> and sourceDiscountPrice = #{sourcediscountprice} </if>
<if test="sourcepayamount != null and sourcepayamount != ''"> and sourcePayAmount = #{sourcepayamount} </if>
<if test="sourcerequestqty != null and sourcerequestqty != ''"> and sourceRequestQty = #{sourcerequestqty} </if>
<if test="bomtype != null and bomtype != ''"> and bomType = #{bomtype} </if>
<if test="originaldetailid != null"> and originalDetailId = #{originaldetailid} </if>
<if test="reasoncode != null and reasoncode != ''"> and reasonCode = #{reasoncode} </if>
<if test="reasondesc != null and reasondesc != ''"> and reasonDesc = #{reasondesc} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> and businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate = #{transactionDate} </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="ofsids!=null and ofsids!=''">and ofsid in (${ofsids})</if>
<if test="transactionDateStart!=null and transactionDateStart!=''">
and transactionDate >= #{transactionDateStart}
</if>
<if test="transactionDateEnd!=null and transactionDateEnd!=''">
and transactionDate &lt;= #{transactionDateEnd}
</if>
</trim>
</select>
<!-- 查询无源件退款部分的数据导出excel -->
<select id="queryPassiveComponentsExport" resultMap="get-OnlyAfterSalesBEntity-result2" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity">
select
<include refid="OnlyAfterSalesBEntity_Base_Column_List" />
from only_after_sales_b
<trim prefix="where" prefixOverrides="and">
<if test="id != null"> and id = #{id} </if>
<if test="hid != null"> and hid = #{hid} </if>
<if test="ofsid != null"> and ofsid = #{ofsid} </if>
<if test="returnorderid != null"> and returnOrderId = #{returnorderid} </if>
<if test="returnordercode != null and returnordercode != ''"> and returnOrderCode = #{returnordercode} </if>
<if test="skucode != null and skucode != ''"> and skuCode = #{skucode} </if>
<if test="skuname != null and skuname != ''"> and skuName = #{skuname} </if>
<if test="companycode != null and companycode != ''"> and companyCode = #{companycode} </if>
<if test="clientcode != null and clientcode != ''"> and clientCode = #{clientcode} </if>
<if test="storecode != null and storecode != ''"> and storeCode = #{storecode} </if>
<if test="returntype != null and returntype != ''"> and returnType = #{returntype} </if>
<if test="refundind != null and refundind != ''"> and refundInd = #{refundind} </if>
<if test="requestqty != null and requestqty != ''"> and requestQty = #{requestqty} </if>
<if test="fulfillqty != null and fulfillqty != ''"> and fulfillQty = #{fulfillqty} </if>
<if test="quantityum != null and quantityum != ''"> and quantityUM = #{quantityum} </if>
<if test="msrprice != null and msrprice != ''"> and msrPrice = #{msrprice} </if>
<if test="totalweight != null and totalweight != ''"> and totalWeight = #{totalweight} </if>
<if test="totalvolume != null and totalvolume != ''"> and totalVolume = #{totalvolume} </if>
<if test="weightum != null and weightum != ''"> and weightUM = #{weightum} </if>
<if test="volumeum != null and volumeum != ''"> and volumeUM = #{volumeum} </if>
<if test="totalamount != null and totalamount != ''"> and totalAmount = #{totalamount} </if>
<if test="sourcelinenum != null and sourcelinenum != ''"> and sourceLineNum = #{sourcelinenum} </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode = #{sourceordercode} </if>
<if test="sourcediscountprice != null and sourcediscountprice != ''"> and sourceDiscountPrice = #{sourcediscountprice} </if>
<if test="sourcepayamount != null and sourcepayamount != ''"> and sourcePayAmount = #{sourcepayamount} </if>
<if test="sourcerequestqty != null and sourcerequestqty != ''"> and sourceRequestQty = #{sourcerequestqty} </if>
<if test="bomtype != null and bomtype != ''"> and bomType = #{bomtype} </if>
<if test="originaldetailid != null"> and originalDetailId = #{originaldetailid} </if>
<if test="reasoncode != null and reasoncode != ''"> and reasonCode = #{reasoncode} </if>
<if test="reasondesc != null and reasondesc != ''"> and reasonDesc = #{reasondesc} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> and businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate = #{transactionDate} </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="ofsids!=null and ofsids!=''">and ofsid in (${ofsids})</if>
<if test="transactionDateStart!=null and transactionDateStart!=''">
and transactionDate >= #{transactionDateStart}
</if>
<if test="transactionDateEnd!=null and transactionDateEnd!=''">
and transactionDate &lt;= #{transactionDateEnd}
</if>
</trim>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity">
select count(1) from only_after_sales_b
<trim prefix="where" prefixOverrides="and">
<if test="id != null"> and id = #{id} </if>
<if test="hid != null"> and hid = #{hid} </if>
<if test="ofsid != null"> and ofsid = #{ofsid} </if>
<if test="returnorderid != null"> and returnOrderId = #{returnorderid} </if>
<if test="returnordercode != null and returnordercode != ''"> and returnOrderCode = #{returnordercode} </if>
<if test="skucode != null and skucode != ''"> and skuCode = #{skucode} </if>
<if test="skuname != null and skuname != ''"> and skuName = #{skuname} </if>
<if test="companycode != null and companycode != ''"> and companyCode = #{companycode} </if>
<if test="clientcode != null and clientcode != ''"> and clientCode = #{clientcode} </if>
<if test="storecode != null and storecode != ''"> and storeCode = #{storecode} </if>
<if test="returntype != null and returntype != ''"> and returnType = #{returntype} </if>
<if test="refundind != null and refundind != ''"> and refundInd = #{refundind} </if>
<if test="requestqty != null and requestqty != ''"> and requestQty = #{requestqty} </if>
<if test="fulfillqty != null and fulfillqty != ''"> and fulfillQty = #{fulfillqty} </if>
<if test="quantityum != null and quantityum != ''"> and quantityUM = #{quantityum} </if>
<if test="msrprice != null and msrprice != ''"> and msrPrice = #{msrprice} </if>
<if test="totalweight != null and totalweight != ''"> and totalWeight = #{totalweight} </if>
<if test="totalvolume != null and totalvolume != ''"> and totalVolume = #{totalvolume} </if>
<if test="weightum != null and weightum != ''"> and weightUM = #{weightum} </if>
<if test="volumeum != null and volumeum != ''"> and volumeUM = #{volumeum} </if>
<if test="totalamount != null and totalamount != ''"> and totalAmount = #{totalamount} </if>
<if test="sourcelinenum != null and sourcelinenum != ''"> and sourceLineNum = #{sourcelinenum} </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode = #{sourceordercode} </if>
<if test="sourcediscountprice != null and sourcediscountprice != ''"> and sourceDiscountPrice = #{sourcediscountprice} </if>
<if test="sourcepayamount != null and sourcepayamount != ''"> and sourcePayAmount = #{sourcepayamount} </if>
<if test="sourcerequestqty != null and sourcerequestqty != ''"> and sourceRequestQty = #{sourcerequestqty} </if>
<if test="bomtype != null and bomtype != ''"> and bomType = #{bomtype} </if>
<if test="originaldetailid != null"> and originalDetailId = #{originaldetailid} </if>
<if test="reasoncode != null and reasoncode != ''"> and reasonCode = #{reasoncode} </if>
<if test="reasondesc != null and reasondesc != ''"> and reasonDesc = #{reasondesc} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> and businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate = #{transactionDate} </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>
</trim>
<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-OnlyAfterSalesBEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity">
select
<include refid="OnlyAfterSalesBEntity_Base_Column_List" />
from only_after_sales_b
<trim prefix="where" prefixOverrides="and">
<if test="id != null"> and id like concat('%',#{id},'%') </if>
<if test="hid != null"> and hid like concat('%',#{hid},'%') </if>
<if test="ofsid != null"> and ofsid like concat('%',#{ofsid},'%') </if>
<if test="returnorderid != null"> and returnOrderId like concat('%',#{returnorderid},'%') </if>
<if test="returnordercode != null and returnordercode != ''"> and returnOrderCode like concat('%',#{returnordercode},'%') </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="companycode != null and companycode != ''"> and companyCode like concat('%',#{companycode},'%') </if>
<if test="clientcode != null and clientcode != ''"> and clientCode like concat('%',#{clientcode},'%') </if>
<if test="storecode != null and storecode != ''"> and storeCode like concat('%',#{storecode},'%') </if>
<if test="returntype != null and returntype != ''"> and returnType like concat('%',#{returntype},'%') </if>
<if test="refundind != null and refundind != ''"> and refundInd like concat('%',#{refundind},'%') </if>
<if test="requestqty != null and requestqty != ''"> and requestQty like concat('%',#{requestqty},'%') </if>
<if test="fulfillqty != null and fulfillqty != ''"> and fulfillQty like concat('%',#{fulfillqty},'%') </if>
<if test="quantityum != null and quantityum != ''"> and quantityUM like concat('%',#{quantityum},'%') </if>
<if test="msrprice != null and msrprice != ''"> and msrPrice like concat('%',#{msrprice},'%') </if>
<if test="totalweight != null and totalweight != ''"> and totalWeight like concat('%',#{totalweight},'%') </if>
<if test="totalvolume != null and totalvolume != ''"> and totalVolume like concat('%',#{totalvolume},'%') </if>
<if test="weightum != null and weightum != ''"> and weightUM like concat('%',#{weightum},'%') </if>
<if test="volumeum != null and volumeum != ''"> and volumeUM like concat('%',#{volumeum},'%') </if>
<if test="totalamount != null and totalamount != ''"> and totalAmount like concat('%',#{totalamount},'%') </if>
<if test="sourcelinenum != null and sourcelinenum != ''"> and sourceLineNum like concat('%',#{sourcelinenum},'%') </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode like concat('%',#{sourceordercode},'%') </if>
<if test="sourcediscountprice != null and sourcediscountprice != ''"> and sourceDiscountPrice like concat('%',#{sourcediscountprice},'%') </if>
<if test="sourcepayamount != null and sourcepayamount != ''"> and sourcePayAmount like concat('%',#{sourcepayamount},'%') </if>
<if test="sourcerequestqty != null and sourcerequestqty != ''"> and sourceRequestQty like concat('%',#{sourcerequestqty},'%') </if>
<if test="bomtype != null and bomtype != ''"> and bomType like concat('%',#{bomtype},'%') </if>
<if test="originaldetailid != null"> and originalDetailId like concat('%',#{originaldetailid},'%') </if>
<if test="reasoncode != null and reasoncode != ''"> and reasonCode like concat('%',#{reasoncode},'%') </if>
<if test="reasondesc != null and reasondesc != ''"> and reasonDesc like concat('%',#{reasondesc},'%') </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts like concat('%',#{platformDiscounts},'%') </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts like concat('%',#{merchantDiscounts},'%') </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts like concat('%',#{expertDiscounts},'%') </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts like concat('%',#{payDiscounts},'%') </if>
<if test="businessType != null and businessType != ''"> and businessType like concat('%',#{businessType},'%') </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate like concat('%',#{transactionDate},'%') </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>
</trim>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="OnlyAfterSalesBentity_list_or" resultMap="get-OnlyAfterSalesBEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity">
select
<include refid="OnlyAfterSalesBEntity_Base_Column_List" />
from only_after_sales_b
<trim prefix="where" prefixOverrides="and">
<if test="id != null"> or id = #{id} </if>
<if test="hid != null"> or hid = #{hid} </if>
<if test="ofsid != null"> or ofsid = #{ofsid} </if>
<if test="returnorderid != null"> or returnOrderId = #{returnorderid} </if>
<if test="returnordercode != null and returnordercode != ''"> or returnOrderCode = #{returnordercode} </if>
<if test="skucode != null and skucode != ''"> or skuCode = #{skucode} </if>
<if test="skuname != null and skuname != ''"> or skuName = #{skuname} </if>
<if test="companycode != null and companycode != ''"> or companyCode = #{companycode} </if>
<if test="clientcode != null and clientcode != ''"> or clientCode = #{clientcode} </if>
<if test="storecode != null and storecode != ''"> or storeCode = #{storecode} </if>
<if test="returntype != null and returntype != ''"> or returnType = #{returntype} </if>
<if test="refundind != null and refundind != ''"> or refundInd = #{refundind} </if>
<if test="requestqty != null and requestqty != ''"> or requestQty = #{requestqty} </if>
<if test="fulfillqty != null and fulfillqty != ''"> or fulfillQty = #{fulfillqty} </if>
<if test="quantityum != null and quantityum != ''"> or quantityUM = #{quantityum} </if>
<if test="msrprice != null and msrprice != ''"> or msrPrice = #{msrprice} </if>
<if test="totalweight != null and totalweight != ''"> or totalWeight = #{totalweight} </if>
<if test="totalvolume != null and totalvolume != ''"> or totalVolume = #{totalvolume} </if>
<if test="weightum != null and weightum != ''"> or weightUM = #{weightum} </if>
<if test="volumeum != null and volumeum != ''"> or volumeUM = #{volumeum} </if>
<if test="totalamount != null and totalamount != ''"> or totalAmount = #{totalamount} </if>
<if test="sourcelinenum != null and sourcelinenum != ''"> or sourceLineNum = #{sourcelinenum} </if>
<if test="sourceordercode != null and sourceordercode != ''"> or sourceOrderCode = #{sourceordercode} </if>
<if test="sourcediscountprice != null and sourcediscountprice != ''"> or sourceDiscountPrice = #{sourcediscountprice} </if>
<if test="sourcepayamount != null and sourcepayamount != ''"> or sourcePayAmount = #{sourcepayamount} </if>
<if test="sourcerequestqty != null and sourcerequestqty != ''"> or sourceRequestQty = #{sourcerequestqty} </if>
<if test="bomtype != null and bomtype != ''"> or bomType = #{bomtype} </if>
<if test="originaldetailid != null"> or originalDetailId = #{originaldetailid} </if>
<if test="reasoncode != null and reasoncode != ''"> or reasonCode = #{reasoncode} </if>
<if test="reasondesc != null and reasondesc != ''"> or reasonDesc = #{reasondesc} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> or platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> or merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> or expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> or payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> or businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> or transactionDate = #{transactionDate} </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>
</trim>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_b(
<trim suffix="" suffixOverrides=",">
<if test="id != null"> id , </if>
<if test="hid != null"> hid , </if>
<if test="ofsid != null"> ofsid , </if>
<if test="returnorderid != null"> returnOrderId , </if>
<if test="returnordercode != null and returnordercode != ''"> returnOrderCode , </if>
<if test="skucode != null and skucode != ''"> skuCode , </if>
<if test="skuname != null and skuname != ''"> skuName , </if>
<if test="companycode != null and companycode != ''"> companyCode , </if>
<if test="clientcode != null and clientcode != ''"> clientCode , </if>
<if test="storecode != null and storecode != ''"> storeCode , </if>
<if test="returntype != null and returntype != ''"> returnType , </if>
<if test="refundind != null and refundind != ''"> refundInd , </if>
<if test="requestqty != null and requestqty != ''"> requestQty , </if>
<if test="fulfillqty != null and fulfillqty != ''"> fulfillQty , </if>
<if test="quantityum != null and quantityum != ''"> quantityUM , </if>
<if test="msrprice != null and msrprice != ''"> msrPrice , </if>
<if test="totalweight != null and totalweight != ''"> totalWeight , </if>
<if test="totalvolume != null and totalvolume != ''"> totalVolume , </if>
<if test="weightum != null and weightum != ''"> weightUM , </if>
<if test="volumeum != null and volumeum != ''"> volumeUM , </if>
<if test="totalamount != null and totalamount != ''"> totalAmount , </if>
<if test="sourcelinenum != null and sourcelinenum != ''"> sourceLineNum , </if>
<if test="sourceordercode != null and sourceordercode != ''"> sourceOrderCode , </if>
<if test="sourcediscountprice != null and sourcediscountprice != ''"> sourceDiscountPrice , </if>
<if test="sourcepayamount != null and sourcepayamount != ''"> sourcePayAmount , </if>
<if test="sourcerequestqty != null and sourcerequestqty != ''"> sourceRequestQty , </if>
<if test="bomtype != null and bomtype != ''"> bomType , </if>
<if test="originaldetailid != null"> originalDetailId , </if>
<if test="reasoncode != null and reasoncode != ''"> reasonCode , </if>
<if test="reasondesc != null and reasondesc != ''"> reasonDesc , </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> platformDiscounts , </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts , </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts , </if>
<if test="payDiscounts != null and payDiscounts != ''"> payDiscounts , </if>
<if test="businessType != null and businessType != ''"> businessType , </if>
<if test="transactionDate != null and transactionDate != ''"> transactionDate , </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>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null"> #{id} ,</if>
<if test="hid != null"> #{hid} ,</if>
<if test="ofsid != null"> #{ofsid} ,</if>
<if test="returnorderid != null"> #{returnorderid} ,</if>
<if test="returnordercode != null and returnordercode != ''"> #{returnordercode} ,</if>
<if test="skucode != null and skucode != ''"> #{skucode} ,</if>
<if test="skuname != null and skuname != ''"> #{skuname} ,</if>
<if test="companycode != null and companycode != ''"> #{companycode} ,</if>
<if test="clientcode != null and clientcode != ''"> #{clientcode} ,</if>
<if test="storecode != null and storecode != ''"> #{storecode} ,</if>
<if test="returntype != null and returntype != ''"> #{returntype} ,</if>
<if test="refundind != null and refundind != ''"> #{refundind} ,</if>
<if test="requestqty != null and requestqty != ''"> #{requestqty} ,</if>
<if test="fulfillqty != null and fulfillqty != ''"> #{fulfillqty} ,</if>
<if test="quantityum != null and quantityum != ''"> #{quantityum} ,</if>
<if test="msrprice != null and msrprice != ''"> #{msrprice} ,</if>
<if test="totalweight != null and totalweight != ''"> #{totalweight} ,</if>
<if test="totalvolume != null and totalvolume != ''"> #{totalvolume} ,</if>
<if test="weightum != null and weightum != ''"> #{weightum} ,</if>
<if test="volumeum != null and volumeum != ''"> #{volumeum} ,</if>
<if test="totalamount != null and totalamount != ''"> #{totalamount} ,</if>
<if test="sourcelinenum != null and sourcelinenum != ''"> #{sourcelinenum} ,</if>
<if test="sourceordercode != null and sourceordercode != ''"> #{sourceordercode} ,</if>
<if test="sourcediscountprice != null and sourcediscountprice != ''"> #{sourcediscountprice} ,</if>
<if test="sourcepayamount != null and sourcepayamount != ''"> #{sourcepayamount} ,</if>
<if test="sourcerequestqty != null and sourcerequestqty != ''"> #{sourcerequestqty} ,</if>
<if test="bomtype != null and bomtype != ''"> #{bomtype} ,</if>
<if test="originaldetailid != null"> #{originaldetailid} ,</if>
<if test="reasoncode != null and reasoncode != ''"> #{reasoncode} ,</if>
<if test="reasondesc != null and reasondesc != ''"> #{reasondesc} ,</if>
<if test="platformDiscounts != null and platformDiscounts != ''"> #{platformDiscounts} ,</if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> #{merchantDiscounts} ,</if>
<if test="expertDiscounts != null and expertDiscounts != ''"> #{expertDiscounts} ,</if>
<if test="payDiscounts != null and payDiscounts != ''"> #{payDiscounts} ,</if>
<if test="businessType != null and businessType != ''"> #{businessType} ,</if>
<if test="transactionDate != null and transactionDate != ''"> #{transactionDate} ,</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>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_b(hid,ofsid,returnOrderId, returnOrderCode, skuCode, skuName, companyCode, clientCode, storeCode, returnType, refundInd, requestQty, fulfillQty, quantityUM, msrPrice, totalWeight, totalVolume, weightUM, volumeUM, totalAmount, sourceLineNum, sourceOrderCode, sourceDiscountPrice, sourcePayAmount, sourceRequestQty, bomType, originalDetailId, reasonCode, reasonDescs,businessType,transactionDate,newPushDate,newTransmitInfo,newState,newsystemnumber,newsystemprimary)
values
<foreach collection="list" item="entity" separator=",">
(#{entity.hid},#{entity.ofsid},#{entity.returnorderid},#{entity.returnordercode},#{entity.skucode},#{entity.skuname},#{entity.companycode},#{entity.clientcode},#{entity.storecode},#{entity.returntype},#{entity.refundind},#{entity.requestqty},#{entity.fulfillqty},#{entity.quantityum},#{entity.msrprice},#{entity.totalweight},#{entity.totalvolume},#{entity.weightum},#{entity.volumeum},#{entity.totalamount},#{entity.sourcelinenum},#{entity.sourceordercode},#{entity.sourcediscountprice},#{entity.sourcepayamount},#{entity.sourcerequestqty},#{entity.bomtype},#{entity.originaldetailid},#{entity.reasoncode},#{entity.reasondesc},#{entity.businessType},#{entity.transactionDate},#{entity.newPushDate},#{entity.newTransmitInfo},#{entity.newState},#{entity.newsystemnumber},#{entity.newsystemprimary})
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_b(hid,ofsid,returnOrderId, returnOrderCode, skuCode, skuName, companyCode, clientCode, storeCode, returnType, refundInd, requestQty, fulfillQty, quantityUM, msrPrice, totalWeight, totalVolume, weightUM, volumeUM, totalAmount, sourceLineNum, sourceOrderCode, sourceDiscountPrice, sourcePayAmount, sourceRequestQty, bomType, originalDetailId, reasonCode, reasonDesc,businessType,transactionDate,newPushDate,newTransmitInfo,newState,newsystemnumber,newsystemprimary)
values
<foreach collection="list" item="entity" separator=",">
(#{entity.hid},#{entity.ofsid},#{entity.returnorderid},#{entity.returnordercode},#{entity.skucode},#{entity.skuname},#{entity.companycode},#{entity.clientcode},#{entity.storecode},#{entity.returntype},#{entity.refundind},#{entity.requestqty},#{entity.fulfillqty},#{entity.quantityum},#{entity.msrprice},#{entity.totalweight},#{entity.totalvolume},#{entity.weightum},#{entity.volumeum},#{entity.totalamount},#{entity.sourcelinenum},#{entity.sourceordercode},#{entity.sourcediscountprice},#{entity.sourcepayamount},#{entity.sourcerequestqty},#{entity.bomtype},#{entity.originaldetailid},#{entity.reasoncode},#{entity.reasondesc},#{entity.businessType},#{entity.transactionDate},#{entity.newPushDate},#{entity.newTransmitInfo},#{entity.newState},#{entity.newsystemnumber},#{entity.newsystemprimary})
</foreach>
on duplicate key update
hid = values(hid),
ofsid = values(ofsid),
returnOrderId = values(returnOrderId),
returnOrderCode = values(returnOrderCode),
skuCode = values(skuCode),
skuName = values(skuName),
companyCode = values(companyCode),
clientCode = values(clientCode),
storeCode = values(storeCode),
returnType = values(returnType),
refundInd = values(refundInd),
requestQty = values(requestQty),
fulfillQty = values(fulfillQty),
quantityUM = values(quantityUM),
msrPrice = values(msrPrice),
totalWeight = values(totalWeight),
totalVolume = values(totalVolume),
weightUM = values(weightUM),
volumeUM = values(volumeUM),
totalAmount = values(totalAmount),
sourceLineNum = values(sourceLineNum),
sourceOrderCode = values(sourceOrderCode),
sourceDiscountPrice = values(sourceDiscountPrice),
sourcePayAmount = values(sourcePayAmount),
sourceRequestQty = values(sourceRequestQty),
bomType = values(bomType),
originalDetailId = values(originalDetailId),
reasonCode = values(reasonCode),
reasonDesc = values(reasonDesc),
businessType = values(businessType),
transactionDate = values(transactionDate),
newPushDate = values(newPushDate),
newTransmitInfo = values(newTransmitInfo),
newState = values(newState),
newsystemnumber = values(newsystemnumber),
newsystemprimary = values(newsystemprimary)
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatchBySuccessOrFail" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_b(ofsid,newPushDate,newTransmitInfo,newState,newsystemnumber,newsystemprimary,def1,def2,def3,def4,def5,def6)
values
<foreach collection="list" item="entity" separator=",">
(#{entity.ofsid},#{entity.newPushDate},#{entity.newTransmitInfo},#{entity.newState},#{entity.newsystemnumber},#{entity.newsystemprimary},#{entity.def1},#{entity.def2},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6})
</foreach>
on duplicate key update
ofsid = values(ofsid),
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)
</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity" >
update only_after_sales_b set
<trim suffix="" suffixOverrides=",">
<if test="hid != null"> hid = #{hid},</if>
<if test="ofsid != null"> ofsid = #{ofsid},</if>
<if test="returnorderid != null"> returnOrderId = #{returnorderid},</if>
<if test="returnordercode != null and returnordercode != ''"> returnOrderCode = #{returnordercode},</if>
<if test="skucode != null and skucode != ''"> skuCode = #{skucode},</if>
<if test="skuname != null and skuname != ''"> skuName = #{skuname},</if>
<if test="companycode != null and companycode != ''"> companyCode = #{companycode},</if>
<if test="clientcode != null and clientcode != ''"> clientCode = #{clientcode},</if>
<if test="storecode != null and storecode != ''"> storeCode = #{storecode},</if>
<if test="returntype != null and returntype != ''"> returnType = #{returntype},</if>
<if test="refundind != null and refundind != ''"> refundInd = #{refundind},</if>
<if test="requestqty != null and requestqty != ''"> requestQty = #{requestqty},</if>
<if test="fulfillqty != null and fulfillqty != ''"> fulfillQty = #{fulfillqty},</if>
<if test="quantityum != null and quantityum != ''"> quantityUM = #{quantityum},</if>
<if test="msrprice != null and msrprice != ''"> msrPrice = #{msrprice},</if>
<if test="totalweight != null and totalweight != ''"> totalWeight = #{totalweight},</if>
<if test="totalvolume != null and totalvolume != ''"> totalVolume = #{totalvolume},</if>
<if test="weightum != null and weightum != ''"> weightUM = #{weightum},</if>
<if test="volumeum != null and volumeum != ''"> volumeUM = #{volumeum},</if>
<if test="totalamount != null and totalamount != ''"> totalAmount = #{totalamount},</if>
<if test="sourcelinenum != null and sourcelinenum != ''"> sourceLineNum = #{sourcelinenum},</if>
<if test="sourceordercode != null and sourceordercode != ''"> sourceOrderCode = #{sourceordercode},</if>
<if test="sourcediscountprice != null and sourcediscountprice != ''"> sourceDiscountPrice = #{sourcediscountprice},</if>
<if test="sourcepayamount != null and sourcepayamount != ''"> sourcePayAmount = #{sourcepayamount},</if>
<if test="sourcerequestqty != null and sourcerequestqty != ''"> sourceRequestQty = #{sourcerequestqty},</if>
<if test="bomtype != null and bomtype != ''"> bomType = #{bomtype},</if>
<if test="originaldetailid != null"> originalDetailId = #{originaldetailid},</if>
<if test="reasoncode != null and reasoncode != ''"> reasonCode = #{reasoncode},</if>
<if test="reasondesc != null and reasondesc != ''"> reasonDesc = #{reasondesc},</if>
<if test="platformDiscounts != null and platformDiscounts != ''"> platformDiscounts = #{platformDiscounts},</if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts = #{merchantDiscounts},</if>
<if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts = #{expertDiscounts},</if>
<if test="payDiscounts != null and payDiscounts != ''"> payDiscounts = #{payDiscounts},</if>
<if test="businessType != null and businessType != ''"> businessType = #{businessType},</if>
<if test="transactionDate != null and transactionDate != ''"> transactionDate = #{transactionDate},</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>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity" >
update only_after_sales_b 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.entity.OnlyAfterSalesBEntity" >
update only_after_sales_b set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null"> and id = #{id} </if>
<if test="hid != null"> and hid = #{hid} </if>
<if test="ofsid != null"> and ofsid = #{ofsid} </if>
<if test="returnorderid != null"> and returnOrderId = #{returnorderid} </if>
<if test="returnordercode != null and returnordercode != ''"> and returnOrderCode = #{returnordercode} </if>
<if test="skucode != null and skucode != ''"> and skuCode = #{skucode} </if>
<if test="skuname != null and skuname != ''"> and skuName = #{skuname} </if>
<if test="companycode != null and companycode != ''"> and companyCode = #{companycode} </if>
<if test="clientcode != null and clientcode != ''"> and clientCode = #{clientcode} </if>
<if test="storecode != null and storecode != ''"> and storeCode = #{storecode} </if>
<if test="returntype != null and returntype != ''"> and returnType = #{returntype} </if>
<if test="refundind != null and refundind != ''"> and refundInd = #{refundind} </if>
<if test="requestqty != null and requestqty != ''"> and requestQty = #{requestqty} </if>
<if test="fulfillqty != null and fulfillqty != ''"> and fulfillQty = #{fulfillqty} </if>
<if test="quantityum != null and quantityum != ''"> and quantityUM = #{quantityum} </if>
<if test="msrprice != null and msrprice != ''"> and msrPrice = #{msrprice} </if>
<if test="totalweight != null and totalweight != ''"> and totalWeight = #{totalweight} </if>
<if test="totalvolume != null and totalvolume != ''"> and totalVolume = #{totalvolume} </if>
<if test="weightum != null and weightum != ''"> and weightUM = #{weightum} </if>
<if test="volumeum != null and volumeum != ''"> and volumeUM = #{volumeum} </if>
<if test="totalamount != null and totalamount != ''"> and totalAmount = #{totalamount} </if>
<if test="sourcelinenum != null and sourcelinenum != ''"> and sourceLineNum = #{sourcelinenum} </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode = #{sourceordercode} </if>
<if test="sourcediscountprice != null and sourcediscountprice != ''"> and sourceDiscountPrice = #{sourcediscountprice} </if>
<if test="sourcepayamount != null and sourcepayamount != ''"> and sourcePayAmount = #{sourcepayamount} </if>
<if test="sourcerequestqty != null and sourcerequestqty != ''"> and sourceRequestQty = #{sourcerequestqty} </if>
<if test="bomtype != null and bomtype != ''"> and bomType = #{bomtype} </if>
<if test="originaldetailid != null"> and originalDetailId = #{originaldetailid} </if>
<if test="reasoncode != null and reasoncode != ''"> and reasonCode = #{reasoncode} </if>
<if test="reasondesc != null and reasondesc != ''"> and reasonDesc = #{reasondesc} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> and businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate = #{transactionDate} </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>
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from only_after_sales_b where id = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,308 @@
package com.hzya.frame.report.lets.entity;
import com.hzya.frame.web.entity.BaseEntity;
import lombok.Data;
/**
* 售后订单表_仅退款_主表(OnlyAfterSalesH)实体类
*
* @author makejava
* @since 2024-09-23 10:43:08
*/
@Data
public class OnlyAfterSalesHEntity extends BaseEntity {
private String ofsid;
/**
* 退货类型
*/
private String returntype;
/**
* 换货方式
*/
private String exchangetype;
/**
* 是否退款
*/
private String refundind;
/**
* 系统内部类型
*/
private String internalordertype;
/**
* 业务发生渠道
*/
private String bizchannel;
/**
* 售后凭证单号
*/
private String code;
/**
* 商家编码
*/
private String companycode;
/**
* 组织
*/
private String clientcode;
/**
* 店铺编码
*/
private String storecode;
/**
* 平台客户账号
*/
private String sourceuseraccount;
/**
* 平台客户昵称
*/
private String sourceusername;
/**
* 退货状态
*/
private String returnstatus;
/**
* 发货状态
*/
private String shipstatus;
/**
* 退款状态
*/
private String refundstatus;
/**
* 退回仓库
*/
private String facilitycode;
/**
* 销售订单编号
*/
private String refordercode;
/**
* 销售订单ID
*/
private Long reforderid;
/**
* 销售订单类型
*/
private String refordertype;
/**
* 生成售后订单时的订单状态
*/
private String reforderstatuswhenreturned;
/**
* 来源平台
*/
private String sourceplatformcode;
/**
* 平台订单号
*/
private String sourceordercode;
/**
* 平台订单状态
*/
private String sourceorderstatuswhenreturned;
/**
* 平台退货单号
*/
private String sourcereturncode;
/**
* 平台退货单状态
*/
private String sourcereturnstatus;
/**
* 退货原因
*/
private String reasoncode;
/**
* 客服备注
*/
private String returnnote;
/**
* 卖家备注
*/
private String sellernote;
/**
* 应退金额
*/
private String requestrefundamount;
/**
* 实退金额
*/
private String actualrefundamount;
/**
* 应退商品总数
*/
private String totalqty;
/**
* 实退总数
*/
private String totalfulfillqty;
/**
* 发货人
*/
private String shipfromattentionto;
/**
* 地址
*/
private String shipfromaddress;
/**
* 国家
*/
private String shipfromcountry;
/**
* 省份
*/
private String shipfromstate;
/**
* 城市
*/
private String shipfromcity;
/**
* 区域
*/
private String shipfromdistrict;
/**
* 邮编
*/
private String shipfrompostalcode;
/**
* 电话
*/
private String shipfromphone;
/**
* 手机
*/
private String shipfrommobile;
/**
* 传真
*/
private String shipfromfax;
/**
* 电子邮箱
*/
private String shipfromemail;
/**
* 发货快递公司
*/
private String shipcarrier;
/**
* 发货快递单号
*/
private String shipwaybillcode;
/**
* 发货物流状态
*/
private String shiplogisticsstatus;
/**
* 退回快递公司
*/
private String returncarrier;
/**
* 退回快递单号
*/
private String returnwaybillcode;
/**
* 退货物流状态
*/
private String returnlogisticsstatus;
/**
* 支付账号
*/
private String payaccount;
/**
* 退款支付交易单号
*/
private String payorderno;
/**
* 审核人
*/
private String auditby;
/**
* 审核时间
*/
private String auditat;
/**
* 退款方式
*/
private String refundthru;
/**
* 客服工号
*/
private String csstuff;
/**
* 仓库备注
*/
private String returnwarehousenote;
/**
* 锁定原因
*/
private String holdcode;
/**
* 锁定用户
*/
private String holduser;
/**
* 锁定时间
*/
private String holdat;
/**
* 异常类型
*/
private String errorcode;
/**
* 异常消息
*/
private String errordesc;
/**
* 核销状态
*/
private String verificationstatus;
/**
* 核销异常描述
*/
private String verificationerrordesc;
/**
* 退款时间
*/
private String refundedat;
/**
* 状态
*/
private String status;
/**
* 处理类型
*/
private String processtype;
//平台优惠
private String platformDiscounts;
//商家优惠
private String merchantDiscounts;
//达人优惠
private String expertDiscounts;
//支付优惠
private String payDiscounts;
//业务类型
private String businessType;
//业务日期-退货完成时间或交易成功时间
private String transactionDate;
//推送时间
private String newPushDate;
//报错详情
private String newTransmitInfo;
//推送状态
private String newState;
//下游单号
private String newsystemnumber;
//下游主键
private String newsystemprimary;
}

View File

@ -0,0 +1,973 @@
<?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.report.lets.dao.impl.OnlyAfterSalesHDaoImpl">
<resultMap id="get-OnlyAfterSalesHEntity-result" type="com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity" >
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="ofsid" column="ofsid" jdbcType="VARCHAR"/>
<result property="returntype" column="returnType" jdbcType="VARCHAR"/>
<result property="exchangetype" column="exchangeType" jdbcType="VARCHAR"/>
<result property="refundind" column="refundInd" jdbcType="VARCHAR"/>
<result property="internalordertype" column="internalOrderType" jdbcType="VARCHAR"/>
<result property="bizchannel" column="bizChannel" jdbcType="VARCHAR"/>
<result property="code" column="code" jdbcType="VARCHAR"/>
<result property="companycode" column="companyCode" jdbcType="VARCHAR"/>
<result property="clientcode" column="clientCode" jdbcType="VARCHAR"/>
<result property="storecode" column="storeCode" jdbcType="VARCHAR"/>
<result property="sourceuseraccount" column="sourceUserAccount" jdbcType="VARCHAR"/>
<result property="sourceusername" column="sourceUserName" jdbcType="VARCHAR"/>
<result property="returnstatus" column="returnStatus" jdbcType="VARCHAR"/>
<result property="shipstatus" column="shipStatus" jdbcType="VARCHAR"/>
<result property="refundstatus" column="refundStatus" jdbcType="VARCHAR"/>
<result property="facilitycode" column="facilityCode" jdbcType="VARCHAR"/>
<result property="refordercode" column="refOrderCode" jdbcType="VARCHAR"/>
<result property="reforderid" column="refOrderId" jdbcType="INTEGER"/>
<result property="refordertype" column="refOrderType" jdbcType="VARCHAR"/>
<result property="reforderstatuswhenreturned" column="refOrderStatusWhenReturned" jdbcType="VARCHAR"/>
<result property="sourceplatformcode" column="sourcePlatformCode" jdbcType="VARCHAR"/>
<result property="sourceordercode" column="sourceOrderCode" jdbcType="VARCHAR"/>
<result property="sourceorderstatuswhenreturned" column="sourceOrderStatusWhenReturned" jdbcType="VARCHAR"/>
<result property="sourcereturncode" column="sourceReturnCode" jdbcType="VARCHAR"/>
<result property="sourcereturnstatus" column="sourceReturnStatus" jdbcType="VARCHAR"/>
<result property="reasoncode" column="reasonCode" jdbcType="VARCHAR"/>
<result property="returnnote" column="returnNote" jdbcType="VARCHAR"/>
<result property="sellernote" column="sellerNote" jdbcType="VARCHAR"/>
<result property="requestrefundamount" column="requestRefundAmount" jdbcType="VARCHAR"/>
<result property="actualrefundamount" column="actualRefundAmount" jdbcType="VARCHAR"/>
<result property="totalqty" column="totalQty" jdbcType="VARCHAR"/>
<result property="totalfulfillqty" column="totalFulfillQty" jdbcType="VARCHAR"/>
<result property="shipfromattentionto" column="shipFromAttentionTo" jdbcType="VARCHAR"/>
<result property="shipfromaddress" column="shipFromAddress" jdbcType="VARCHAR"/>
<result property="shipfromcountry" column="shipFromCountry" jdbcType="VARCHAR"/>
<result property="shipfromstate" column="shipFromState" jdbcType="VARCHAR"/>
<result property="shipfromcity" column="shipFromCity" jdbcType="VARCHAR"/>
<result property="shipfromdistrict" column="shipFromDistrict" jdbcType="VARCHAR"/>
<result property="shipfrompostalcode" column="shipFromPostalCode" jdbcType="VARCHAR"/>
<result property="shipfromphone" column="shipFromPhone" jdbcType="VARCHAR"/>
<result property="shipfrommobile" column="shipFromMobile" jdbcType="VARCHAR"/>
<result property="shipfromfax" column="shipFromFax" jdbcType="VARCHAR"/>
<result property="shipfromemail" column="shipFromEmail" jdbcType="VARCHAR"/>
<result property="shipcarrier" column="shipCarrier" jdbcType="VARCHAR"/>
<result property="shipwaybillcode" column="shipWaybillCode" jdbcType="VARCHAR"/>
<result property="shiplogisticsstatus" column="shipLogisticsStatus" jdbcType="VARCHAR"/>
<result property="returncarrier" column="returnCarrier" jdbcType="VARCHAR"/>
<result property="returnwaybillcode" column="returnWaybillCode" jdbcType="VARCHAR"/>
<result property="returnlogisticsstatus" column="returnLogisticsStatus" jdbcType="VARCHAR"/>
<result property="payaccount" column="payAccount" jdbcType="VARCHAR"/>
<result property="payorderno" column="payOrderNo" jdbcType="VARCHAR"/>
<result property="auditby" column="auditBy" jdbcType="VARCHAR"/>
<result property="auditat" column="auditAt" jdbcType="TIMESTAMP"/>
<result property="refundthru" column="refundThru" jdbcType="VARCHAR"/>
<result property="csstuff" column="csStuff" jdbcType="VARCHAR"/>
<result property="returnwarehousenote" column="returnWarehouseNote" jdbcType="VARCHAR"/>
<result property="holdcode" column="holdCode" jdbcType="VARCHAR"/>
<result property="holduser" column="holdUser" jdbcType="VARCHAR"/>
<result property="holdat" column="holdAt" jdbcType="TIMESTAMP"/>
<result property="errorcode" column="errorCode" jdbcType="VARCHAR"/>
<result property="errordesc" column="errorDesc" jdbcType="VARCHAR"/>
<result property="verificationstatus" column="verificationStatus" jdbcType="VARCHAR"/>
<result property="verificationerrordesc" column="verificationErrorDesc" jdbcType="VARCHAR"/>
<result property="refundedat" column="refundedAt" jdbcType="TIMESTAMP"/>
<result property="status" column="status" jdbcType="VARCHAR"/>
<result property="processtype" column="processType" jdbcType="VARCHAR"/>
<result property="platformDiscounts" column="platformDiscounts" jdbcType="VARCHAR"/>
<result property="merchantDiscounts" column="merchantDiscounts" jdbcType="VARCHAR"/>
<result property="expertDiscounts" column="expertDiscounts" jdbcType="VARCHAR"/>
<result property="payDiscounts" column="payDiscounts" jdbcType="VARCHAR"/>
<result property="businessType" column="businessType" jdbcType="VARCHAR"/>
<result property="transactionDate" column="transactionDate" 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"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "OnlyAfterSalesHEntity_Base_Column_List">
id
,ofsid
,returnType
,exchangeType
,refundInd
,internalOrderType
,bizChannel
,code
,companyCode
,clientCode
,storeCode
,sourceUserAccount
,sourceUserName
,returnStatus
,shipStatus
,refundStatus
,facilityCode
,refOrderCode
,refOrderId
,refOrderType
,refOrderStatusWhenReturned
,sourcePlatformCode
,sourceOrderCode
,sourceOrderStatusWhenReturned
,sourceReturnCode
,sourceReturnStatus
,reasonCode
,returnNote
,sellerNote
,requestRefundAmount
,actualRefundAmount
,totalQty
,totalFulfillQty
,shipFromAttentionTo
,shipFromAddress
,shipFromCountry
,shipFromState
,shipFromCity
,shipFromDistrict
,shipFromPostalCode
,shipFromPhone
,shipFromMobile
,shipFromFax
,shipFromEmail
,shipCarrier
,shipWaybillCode
,shipLogisticsStatus
,returnCarrier
,returnWaybillCode
,returnLogisticsStatus
,payAccount
,payOrderNo
,auditBy
,auditAt
,refundThru
,csStuff
,returnWarehouseNote
,holdCode
,holdUser
,holdAt
,errorCode
,errorDesc
,verificationStatus
,verificationErrorDesc
,refundedAt
,status
,processType
,platformDiscounts
,merchantDiscounts
,expertDiscounts
,payDiscounts
,businessType
,transactionDate
,newPushDate
,newTransmitInfo
,newState
,newsystemnumber
,newsystemprimary
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-OnlyAfterSalesHEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity">
select
<include refid="OnlyAfterSalesHEntity_Base_Column_List" />
from only_after_sales_h
<trim prefix="where" prefixOverrides="and">
<if test="id != null"> and id = #{id} </if>
<if test="ofsid != null and ofsid != ''"> and ofsid = #{ofsid} </if>
<if test="returntype != null and returntype != ''"> and returnType = #{returntype} </if>
<if test="exchangetype != null and exchangetype != ''"> and exchangeType = #{exchangetype} </if>
<if test="refundind != null and refundind != ''"> and refundInd = #{refundind} </if>
<if test="internalordertype != null and internalordertype != ''"> and internalOrderType = #{internalordertype} </if>
<if test="bizchannel != null and bizchannel != ''"> and bizChannel = #{bizchannel} </if>
<if test="code != null and code != ''"> and code = #{code} </if>
<if test="companycode != null and companycode != ''"> and companyCode = #{companycode} </if>
<if test="clientcode != null and clientcode != ''"> and clientCode = #{clientcode} </if>
<if test="storecode != null and storecode != ''"> and storeCode = #{storecode} </if>
<if test="sourceuseraccount != null and sourceuseraccount != ''"> and sourceUserAccount = #{sourceuseraccount} </if>
<if test="sourceusername != null and sourceusername != ''"> and sourceUserName = #{sourceusername} </if>
<if test="returnstatus != null and returnstatus != ''"> and returnStatus = #{returnstatus} </if>
<if test="shipstatus != null and shipstatus != ''"> and shipStatus = #{shipstatus} </if>
<if test="refundstatus != null and refundstatus != ''"> and refundStatus = #{refundstatus} </if>
<if test="facilitycode != null and facilitycode != ''"> and facilityCode = #{facilitycode} </if>
<if test="refordercode != null and refordercode != ''"> and refOrderCode = #{refordercode} </if>
<if test="reforderid != null"> and refOrderId = #{reforderid} </if>
<if test="refordertype != null and refordertype != ''"> and refOrderType = #{refordertype} </if>
<if test="reforderstatuswhenreturned != null and reforderstatuswhenreturned != ''"> and refOrderStatusWhenReturned = #{reforderstatuswhenreturned} </if>
<if test="sourceplatformcode != null and sourceplatformcode != ''"> and sourcePlatformCode = #{sourceplatformcode} </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode = #{sourceordercode} </if>
<if test="sourceorderstatuswhenreturned != null and sourceorderstatuswhenreturned != ''"> and sourceOrderStatusWhenReturned = #{sourceorderstatuswhenreturned} </if>
<if test="sourcereturncode != null and sourcereturncode != ''"> and sourceReturnCode = #{sourcereturncode} </if>
<if test="sourcereturnstatus != null and sourcereturnstatus != ''"> and sourceReturnStatus = #{sourcereturnstatus} </if>
<if test="reasoncode != null and reasoncode != ''"> and reasonCode = #{reasoncode} </if>
<if test="returnnote != null and returnnote != ''"> and returnNote = #{returnnote} </if>
<if test="sellernote != null and sellernote != ''"> and sellerNote = #{sellernote} </if>
<if test="requestrefundamount != null and requestrefundamount != ''"> and requestRefundAmount = #{requestrefundamount} </if>
<if test="actualrefundamount != null and actualrefundamount != ''"> and actualRefundAmount = #{actualrefundamount} </if>
<if test="totalqty != null and totalqty != ''"> and totalQty = #{totalqty} </if>
<if test="totalfulfillqty != null and totalfulfillqty != ''"> and totalFulfillQty = #{totalfulfillqty} </if>
<if test="shipfromattentionto != null and shipfromattentionto != ''"> and shipFromAttentionTo = #{shipfromattentionto} </if>
<if test="shipfromaddress != null and shipfromaddress != ''"> and shipFromAddress = #{shipfromaddress} </if>
<if test="shipfromcountry != null and shipfromcountry != ''"> and shipFromCountry = #{shipfromcountry} </if>
<if test="shipfromstate != null and shipfromstate != ''"> and shipFromState = #{shipfromstate} </if>
<if test="shipfromcity != null and shipfromcity != ''"> and shipFromCity = #{shipfromcity} </if>
<if test="shipfromdistrict != null and shipfromdistrict != ''"> and shipFromDistrict = #{shipfromdistrict} </if>
<if test="shipfrompostalcode != null and shipfrompostalcode != ''"> and shipFromPostalCode = #{shipfrompostalcode} </if>
<if test="shipfromphone != null and shipfromphone != ''"> and shipFromPhone = #{shipfromphone} </if>
<if test="shipfrommobile != null and shipfrommobile != ''"> and shipFromMobile = #{shipfrommobile} </if>
<if test="shipfromfax != null and shipfromfax != ''"> and shipFromFax = #{shipfromfax} </if>
<if test="shipfromemail != null and shipfromemail != ''"> and shipFromEmail = #{shipfromemail} </if>
<if test="shipcarrier != null and shipcarrier != ''"> and shipCarrier = #{shipcarrier} </if>
<if test="shipwaybillcode != null and shipwaybillcode != ''"> and shipWaybillCode = #{shipwaybillcode} </if>
<if test="shiplogisticsstatus != null and shiplogisticsstatus != ''"> and shipLogisticsStatus = #{shiplogisticsstatus} </if>
<if test="returncarrier != null and returncarrier != ''"> and returnCarrier = #{returncarrier} </if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> and returnWaybillCode = #{returnwaybillcode} </if>
<if test="returnlogisticsstatus != null and returnlogisticsstatus != ''"> and returnLogisticsStatus = #{returnlogisticsstatus} </if>
<if test="payaccount != null and payaccount != ''"> and payAccount = #{payaccount} </if>
<if test="payorderno != null and payorderno != ''"> and payOrderNo = #{payorderno} </if>
<if test="auditby != null and auditby != ''"> and auditBy = #{auditby} </if>
<if test="auditat != null"> and auditAt = #{auditat} </if>
<if test="refundthru != null and refundthru != ''"> and refundThru = #{refundthru} </if>
<if test="csstuff != null and csstuff != ''"> and csStuff = #{csstuff} </if>
<if test="returnwarehousenote != null and returnwarehousenote != ''"> and returnWarehouseNote = #{returnwarehousenote} </if>
<if test="holdcode != null and holdcode != ''"> and holdCode = #{holdcode} </if>
<if test="holduser != null and holduser != ''"> and holdUser = #{holduser} </if>
<if test="holdat != null"> and holdAt = #{holdat} </if>
<if test="errorcode != null and errorcode != ''"> and errorCode = #{errorcode} </if>
<if test="errordesc != null and errordesc != ''"> and errorDesc = #{errordesc} </if>
<if test="verificationstatus != null and verificationstatus != ''"> and verificationStatus = #{verificationstatus} </if>
<if test="verificationerrordesc != null and verificationerrordesc != ''"> and verificationErrorDesc = #{verificationerrordesc} </if>
<if test="refundedat != null"> and refundedAt = #{refundedat} </if>
<if test="status != null and status != ''"> and status = #{status} </if>
<if test="processtype != null and processtype != ''"> and processType = #{processtype} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> and businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate = #{transactionDate} </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>
</trim>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity">
select count(1) from only_after_sales_h
<trim prefix="where" prefixOverrides="and">
<if test="id != null"> and id = #{id} </if>
<if test="ofsid != null and ofsid != ''"> and ofsid = #{ofsid} </if>
<if test="returntype != null and returntype != ''"> and returnType = #{returntype} </if>
<if test="exchangetype != null and exchangetype != ''"> and exchangeType = #{exchangetype} </if>
<if test="refundind != null and refundind != ''"> and refundInd = #{refundind} </if>
<if test="internalordertype != null and internalordertype != ''"> and internalOrderType = #{internalordertype} </if>
<if test="bizchannel != null and bizchannel != ''"> and bizChannel = #{bizchannel} </if>
<if test="code != null and code != ''"> and code = #{code} </if>
<if test="companycode != null and companycode != ''"> and companyCode = #{companycode} </if>
<if test="clientcode != null and clientcode != ''"> and clientCode = #{clientcode} </if>
<if test="storecode != null and storecode != ''"> and storeCode = #{storecode} </if>
<if test="sourceuseraccount != null and sourceuseraccount != ''"> and sourceUserAccount = #{sourceuseraccount} </if>
<if test="sourceusername != null and sourceusername != ''"> and sourceUserName = #{sourceusername} </if>
<if test="returnstatus != null and returnstatus != ''"> and returnStatus = #{returnstatus} </if>
<if test="shipstatus != null and shipstatus != ''"> and shipStatus = #{shipstatus} </if>
<if test="refundstatus != null and refundstatus != ''"> and refundStatus = #{refundstatus} </if>
<if test="facilitycode != null and facilitycode != ''"> and facilityCode = #{facilitycode} </if>
<if test="refordercode != null and refordercode != ''"> and refOrderCode = #{refordercode} </if>
<if test="reforderid != null"> and refOrderId = #{reforderid} </if>
<if test="refordertype != null and refordertype != ''"> and refOrderType = #{refordertype} </if>
<if test="reforderstatuswhenreturned != null and reforderstatuswhenreturned != ''"> and refOrderStatusWhenReturned = #{reforderstatuswhenreturned} </if>
<if test="sourceplatformcode != null and sourceplatformcode != ''"> and sourcePlatformCode = #{sourceplatformcode} </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode = #{sourceordercode} </if>
<if test="sourceorderstatuswhenreturned != null and sourceorderstatuswhenreturned != ''"> and sourceOrderStatusWhenReturned = #{sourceorderstatuswhenreturned} </if>
<if test="sourcereturncode != null and sourcereturncode != ''"> and sourceReturnCode = #{sourcereturncode} </if>
<if test="sourcereturnstatus != null and sourcereturnstatus != ''"> and sourceReturnStatus = #{sourcereturnstatus} </if>
<if test="reasoncode != null and reasoncode != ''"> and reasonCode = #{reasoncode} </if>
<if test="returnnote != null and returnnote != ''"> and returnNote = #{returnnote} </if>
<if test="sellernote != null and sellernote != ''"> and sellerNote = #{sellernote} </if>
<if test="requestrefundamount != null and requestrefundamount != ''"> and requestRefundAmount = #{requestrefundamount} </if>
<if test="actualrefundamount != null and actualrefundamount != ''"> and actualRefundAmount = #{actualrefundamount} </if>
<if test="totalqty != null and totalqty != ''"> and totalQty = #{totalqty} </if>
<if test="totalfulfillqty != null and totalfulfillqty != ''"> and totalFulfillQty = #{totalfulfillqty} </if>
<if test="shipfromattentionto != null and shipfromattentionto != ''"> and shipFromAttentionTo = #{shipfromattentionto} </if>
<if test="shipfromaddress != null and shipfromaddress != ''"> and shipFromAddress = #{shipfromaddress} </if>
<if test="shipfromcountry != null and shipfromcountry != ''"> and shipFromCountry = #{shipfromcountry} </if>
<if test="shipfromstate != null and shipfromstate != ''"> and shipFromState = #{shipfromstate} </if>
<if test="shipfromcity != null and shipfromcity != ''"> and shipFromCity = #{shipfromcity} </if>
<if test="shipfromdistrict != null and shipfromdistrict != ''"> and shipFromDistrict = #{shipfromdistrict} </if>
<if test="shipfrompostalcode != null and shipfrompostalcode != ''"> and shipFromPostalCode = #{shipfrompostalcode} </if>
<if test="shipfromphone != null and shipfromphone != ''"> and shipFromPhone = #{shipfromphone} </if>
<if test="shipfrommobile != null and shipfrommobile != ''"> and shipFromMobile = #{shipfrommobile} </if>
<if test="shipfromfax != null and shipfromfax != ''"> and shipFromFax = #{shipfromfax} </if>
<if test="shipfromemail != null and shipfromemail != ''"> and shipFromEmail = #{shipfromemail} </if>
<if test="shipcarrier != null and shipcarrier != ''"> and shipCarrier = #{shipcarrier} </if>
<if test="shipwaybillcode != null and shipwaybillcode != ''"> and shipWaybillCode = #{shipwaybillcode} </if>
<if test="shiplogisticsstatus != null and shiplogisticsstatus != ''"> and shipLogisticsStatus = #{shiplogisticsstatus} </if>
<if test="returncarrier != null and returncarrier != ''"> and returnCarrier = #{returncarrier} </if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> and returnWaybillCode = #{returnwaybillcode} </if>
<if test="returnlogisticsstatus != null and returnlogisticsstatus != ''"> and returnLogisticsStatus = #{returnlogisticsstatus} </if>
<if test="payaccount != null and payaccount != ''"> and payAccount = #{payaccount} </if>
<if test="payorderno != null and payorderno != ''"> and payOrderNo = #{payorderno} </if>
<if test="auditby != null and auditby != ''"> and auditBy = #{auditby} </if>
<if test="auditat != null"> and auditAt = #{auditat} </if>
<if test="refundthru != null and refundthru != ''"> and refundThru = #{refundthru} </if>
<if test="csstuff != null and csstuff != ''"> and csStuff = #{csstuff} </if>
<if test="returnwarehousenote != null and returnwarehousenote != ''"> and returnWarehouseNote = #{returnwarehousenote} </if>
<if test="holdcode != null and holdcode != ''"> and holdCode = #{holdcode} </if>
<if test="holduser != null and holduser != ''"> and holdUser = #{holduser} </if>
<if test="holdat != null"> and holdAt = #{holdat} </if>
<if test="errorcode != null and errorcode != ''"> and errorCode = #{errorcode} </if>
<if test="errordesc != null and errordesc != ''"> and errorDesc = #{errordesc} </if>
<if test="verificationstatus != null and verificationstatus != ''"> and verificationStatus = #{verificationstatus} </if>
<if test="verificationerrordesc != null and verificationerrordesc != ''"> and verificationErrorDesc = #{verificationerrordesc} </if>
<if test="refundedat != null"> and refundedAt = #{refundedat} </if>
<if test="status != null and status != ''"> and status = #{status} </if>
<if test="processtype != null and processtype != ''"> and processType = #{processtype} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> and businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate = #{transactionDate} </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>
</trim>
<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-OnlyAfterSalesHEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity">
select
<include refid="OnlyAfterSalesHEntity_Base_Column_List" />
from only_after_sales_h
<trim prefix="where" prefixOverrides="and">
<if test="id != null"> and id like concat('%',#{id},'%') </if>
<if test="ofsid != null and ofsid != ''"> and ofsid like concat('%',#{ofsid},'%') </if>
<if test="returntype != null and returntype != ''"> and returnType like concat('%',#{returntype},'%') </if>
<if test="exchangetype != null and exchangetype != ''"> and exchangeType like concat('%',#{exchangetype},'%') </if>
<if test="refundind != null and refundind != ''"> and refundInd like concat('%',#{refundind},'%') </if>
<if test="internalordertype != null and internalordertype != ''"> and internalOrderType like concat('%',#{internalordertype},'%') </if>
<if test="bizchannel != null and bizchannel != ''"> and bizChannel like concat('%',#{bizchannel},'%') </if>
<if test="code != null and code != ''"> and code like concat('%',#{code},'%') </if>
<if test="companycode != null and companycode != ''"> and companyCode like concat('%',#{companycode},'%') </if>
<if test="clientcode != null and clientcode != ''"> and clientCode like concat('%',#{clientcode},'%') </if>
<if test="storecode != null and storecode != ''"> and storeCode like concat('%',#{storecode},'%') </if>
<if test="sourceuseraccount != null and sourceuseraccount != ''"> and sourceUserAccount like concat('%',#{sourceuseraccount},'%') </if>
<if test="sourceusername != null and sourceusername != ''"> and sourceUserName like concat('%',#{sourceusername},'%') </if>
<if test="returnstatus != null and returnstatus != ''"> and returnStatus like concat('%',#{returnstatus},'%') </if>
<if test="shipstatus != null and shipstatus != ''"> and shipStatus like concat('%',#{shipstatus},'%') </if>
<if test="refundstatus != null and refundstatus != ''"> and refundStatus like concat('%',#{refundstatus},'%') </if>
<if test="facilitycode != null and facilitycode != ''"> and facilityCode like concat('%',#{facilitycode},'%') </if>
<if test="refordercode != null and refordercode != ''"> and refOrderCode like concat('%',#{refordercode},'%') </if>
<if test="reforderid != null"> and refOrderId like concat('%',#{reforderid},'%') </if>
<if test="refordertype != null and refordertype != ''"> and refOrderType like concat('%',#{refordertype},'%') </if>
<if test="reforderstatuswhenreturned != null and reforderstatuswhenreturned != ''"> and refOrderStatusWhenReturned like concat('%',#{reforderstatuswhenreturned},'%') </if>
<if test="sourceplatformcode != null and sourceplatformcode != ''"> and sourcePlatformCode like concat('%',#{sourceplatformcode},'%') </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode like concat('%',#{sourceordercode},'%') </if>
<if test="sourceorderstatuswhenreturned != null and sourceorderstatuswhenreturned != ''"> and sourceOrderStatusWhenReturned like concat('%',#{sourceorderstatuswhenreturned},'%') </if>
<if test="sourcereturncode != null and sourcereturncode != ''"> and sourceReturnCode like concat('%',#{sourcereturncode},'%') </if>
<if test="sourcereturnstatus != null and sourcereturnstatus != ''"> and sourceReturnStatus like concat('%',#{sourcereturnstatus},'%') </if>
<if test="reasoncode != null and reasoncode != ''"> and reasonCode like concat('%',#{reasoncode},'%') </if>
<if test="returnnote != null and returnnote != ''"> and returnNote like concat('%',#{returnnote},'%') </if>
<if test="sellernote != null and sellernote != ''"> and sellerNote like concat('%',#{sellernote},'%') </if>
<if test="requestrefundamount != null and requestrefundamount != ''"> and requestRefundAmount like concat('%',#{requestrefundamount},'%') </if>
<if test="actualrefundamount != null and actualrefundamount != ''"> and actualRefundAmount like concat('%',#{actualrefundamount},'%') </if>
<if test="totalqty != null and totalqty != ''"> and totalQty like concat('%',#{totalqty},'%') </if>
<if test="totalfulfillqty != null and totalfulfillqty != ''"> and totalFulfillQty like concat('%',#{totalfulfillqty},'%') </if>
<if test="shipfromattentionto != null and shipfromattentionto != ''"> and shipFromAttentionTo like concat('%',#{shipfromattentionto},'%') </if>
<if test="shipfromaddress != null and shipfromaddress != ''"> and shipFromAddress like concat('%',#{shipfromaddress},'%') </if>
<if test="shipfromcountry != null and shipfromcountry != ''"> and shipFromCountry like concat('%',#{shipfromcountry},'%') </if>
<if test="shipfromstate != null and shipfromstate != ''"> and shipFromState like concat('%',#{shipfromstate},'%') </if>
<if test="shipfromcity != null and shipfromcity != ''"> and shipFromCity like concat('%',#{shipfromcity},'%') </if>
<if test="shipfromdistrict != null and shipfromdistrict != ''"> and shipFromDistrict like concat('%',#{shipfromdistrict},'%') </if>
<if test="shipfrompostalcode != null and shipfrompostalcode != ''"> and shipFromPostalCode like concat('%',#{shipfrompostalcode},'%') </if>
<if test="shipfromphone != null and shipfromphone != ''"> and shipFromPhone like concat('%',#{shipfromphone},'%') </if>
<if test="shipfrommobile != null and shipfrommobile != ''"> and shipFromMobile like concat('%',#{shipfrommobile},'%') </if>
<if test="shipfromfax != null and shipfromfax != ''"> and shipFromFax like concat('%',#{shipfromfax},'%') </if>
<if test="shipfromemail != null and shipfromemail != ''"> and shipFromEmail like concat('%',#{shipfromemail},'%') </if>
<if test="shipcarrier != null and shipcarrier != ''"> and shipCarrier like concat('%',#{shipcarrier},'%') </if>
<if test="shipwaybillcode != null and shipwaybillcode != ''"> and shipWaybillCode like concat('%',#{shipwaybillcode},'%') </if>
<if test="shiplogisticsstatus != null and shiplogisticsstatus != ''"> and shipLogisticsStatus like concat('%',#{shiplogisticsstatus},'%') </if>
<if test="returncarrier != null and returncarrier != ''"> and returnCarrier like concat('%',#{returncarrier},'%') </if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> and returnWaybillCode like concat('%',#{returnwaybillcode},'%') </if>
<if test="returnlogisticsstatus != null and returnlogisticsstatus != ''"> and returnLogisticsStatus like concat('%',#{returnlogisticsstatus},'%') </if>
<if test="payaccount != null and payaccount != ''"> and payAccount like concat('%',#{payaccount},'%') </if>
<if test="payorderno != null and payorderno != ''"> and payOrderNo like concat('%',#{payorderno},'%') </if>
<if test="auditby != null and auditby != ''"> and auditBy like concat('%',#{auditby},'%') </if>
<if test="auditat != null"> and auditAt like concat('%',#{auditat},'%') </if>
<if test="refundthru != null and refundthru != ''"> and refundThru like concat('%',#{refundthru},'%') </if>
<if test="csstuff != null and csstuff != ''"> and csStuff like concat('%',#{csstuff},'%') </if>
<if test="returnwarehousenote != null and returnwarehousenote != ''"> and returnWarehouseNote like concat('%',#{returnwarehousenote},'%') </if>
<if test="holdcode != null and holdcode != ''"> and holdCode like concat('%',#{holdcode},'%') </if>
<if test="holduser != null and holduser != ''"> and holdUser like concat('%',#{holduser},'%') </if>
<if test="holdat != null"> and holdAt like concat('%',#{holdat},'%') </if>
<if test="errorcode != null and errorcode != ''"> and errorCode like concat('%',#{errorcode},'%') </if>
<if test="errordesc != null and errordesc != ''"> and errorDesc like concat('%',#{errordesc},'%') </if>
<if test="verificationstatus != null and verificationstatus != ''"> and verificationStatus like concat('%',#{verificationstatus},'%') </if>
<if test="verificationerrordesc != null and verificationerrordesc != ''"> and verificationErrorDesc like concat('%',#{verificationerrordesc},'%') </if>
<if test="refundedat != null"> and refundedAt like concat('%',#{refundedat},'%') </if>
<if test="status != null and status != ''"> and status like concat('%',#{status},'%') </if>
<if test="processtype != null and processtype != ''"> and processType like concat('%',#{processtype},'%') </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts like concat('%',#{platformDiscounts},'%') </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts like concat('%',#{merchantDiscounts},'%') </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts like concat('%',#{expertDiscounts},'%') </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts like concat('%',#{payDiscounts},'%') </if>
<if test="businessType != null and businessType != ''"> and businessType like concat('%',#{businessType},'%') </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate like concat('%',#{transactionDate},'%') </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>
</trim>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="OnlyAfterSalesHentity_list_or" resultMap="get-OnlyAfterSalesHEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity">
select
<include refid="OnlyAfterSalesHEntity_Base_Column_List" />
from only_after_sales_h
<trim prefix="where" prefixOverrides="and">
<if test="id != null"> or id = #{id} </if>
<if test="ofsid != null and ofsid != ''"> or ofsid = #{ofsid} </if>
<if test="returntype != null and returntype != ''"> or returnType = #{returntype} </if>
<if test="exchangetype != null and exchangetype != ''"> or exchangeType = #{exchangetype} </if>
<if test="refundind != null and refundind != ''"> or refundInd = #{refundind} </if>
<if test="internalordertype != null and internalordertype != ''"> or internalOrderType = #{internalordertype} </if>
<if test="bizchannel != null and bizchannel != ''"> or bizChannel = #{bizchannel} </if>
<if test="code != null and code != ''"> or code = #{code} </if>
<if test="companycode != null and companycode != ''"> or companyCode = #{companycode} </if>
<if test="clientcode != null and clientcode != ''"> or clientCode = #{clientcode} </if>
<if test="storecode != null and storecode != ''"> or storeCode = #{storecode} </if>
<if test="sourceuseraccount != null and sourceuseraccount != ''"> or sourceUserAccount = #{sourceuseraccount} </if>
<if test="sourceusername != null and sourceusername != ''"> or sourceUserName = #{sourceusername} </if>
<if test="returnstatus != null and returnstatus != ''"> or returnStatus = #{returnstatus} </if>
<if test="shipstatus != null and shipstatus != ''"> or shipStatus = #{shipstatus} </if>
<if test="refundstatus != null and refundstatus != ''"> or refundStatus = #{refundstatus} </if>
<if test="facilitycode != null and facilitycode != ''"> or facilityCode = #{facilitycode} </if>
<if test="refordercode != null and refordercode != ''"> or refOrderCode = #{refordercode} </if>
<if test="reforderid != null"> or refOrderId = #{reforderid} </if>
<if test="refordertype != null and refordertype != ''"> or refOrderType = #{refordertype} </if>
<if test="reforderstatuswhenreturned != null and reforderstatuswhenreturned != ''"> or refOrderStatusWhenReturned = #{reforderstatuswhenreturned} </if>
<if test="sourceplatformcode != null and sourceplatformcode != ''"> or sourcePlatformCode = #{sourceplatformcode} </if>
<if test="sourceordercode != null and sourceordercode != ''"> or sourceOrderCode = #{sourceordercode} </if>
<if test="sourceorderstatuswhenreturned != null and sourceorderstatuswhenreturned != ''"> or sourceOrderStatusWhenReturned = #{sourceorderstatuswhenreturned} </if>
<if test="sourcereturncode != null and sourcereturncode != ''"> or sourceReturnCode = #{sourcereturncode} </if>
<if test="sourcereturnstatus != null and sourcereturnstatus != ''"> or sourceReturnStatus = #{sourcereturnstatus} </if>
<if test="reasoncode != null and reasoncode != ''"> or reasonCode = #{reasoncode} </if>
<if test="returnnote != null and returnnote != ''"> or returnNote = #{returnnote} </if>
<if test="sellernote != null and sellernote != ''"> or sellerNote = #{sellernote} </if>
<if test="requestrefundamount != null and requestrefundamount != ''"> or requestRefundAmount = #{requestrefundamount} </if>
<if test="actualrefundamount != null and actualrefundamount != ''"> or actualRefundAmount = #{actualrefundamount} </if>
<if test="totalqty != null and totalqty != ''"> or totalQty = #{totalqty} </if>
<if test="totalfulfillqty != null and totalfulfillqty != ''"> or totalFulfillQty = #{totalfulfillqty} </if>
<if test="shipfromattentionto != null and shipfromattentionto != ''"> or shipFromAttentionTo = #{shipfromattentionto} </if>
<if test="shipfromaddress != null and shipfromaddress != ''"> or shipFromAddress = #{shipfromaddress} </if>
<if test="shipfromcountry != null and shipfromcountry != ''"> or shipFromCountry = #{shipfromcountry} </if>
<if test="shipfromstate != null and shipfromstate != ''"> or shipFromState = #{shipfromstate} </if>
<if test="shipfromcity != null and shipfromcity != ''"> or shipFromCity = #{shipfromcity} </if>
<if test="shipfromdistrict != null and shipfromdistrict != ''"> or shipFromDistrict = #{shipfromdistrict} </if>
<if test="shipfrompostalcode != null and shipfrompostalcode != ''"> or shipFromPostalCode = #{shipfrompostalcode} </if>
<if test="shipfromphone != null and shipfromphone != ''"> or shipFromPhone = #{shipfromphone} </if>
<if test="shipfrommobile != null and shipfrommobile != ''"> or shipFromMobile = #{shipfrommobile} </if>
<if test="shipfromfax != null and shipfromfax != ''"> or shipFromFax = #{shipfromfax} </if>
<if test="shipfromemail != null and shipfromemail != ''"> or shipFromEmail = #{shipfromemail} </if>
<if test="shipcarrier != null and shipcarrier != ''"> or shipCarrier = #{shipcarrier} </if>
<if test="shipwaybillcode != null and shipwaybillcode != ''"> or shipWaybillCode = #{shipwaybillcode} </if>
<if test="shiplogisticsstatus != null and shiplogisticsstatus != ''"> or shipLogisticsStatus = #{shiplogisticsstatus} </if>
<if test="returncarrier != null and returncarrier != ''"> or returnCarrier = #{returncarrier} </if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> or returnWaybillCode = #{returnwaybillcode} </if>
<if test="returnlogisticsstatus != null and returnlogisticsstatus != ''"> or returnLogisticsStatus = #{returnlogisticsstatus} </if>
<if test="payaccount != null and payaccount != ''"> or payAccount = #{payaccount} </if>
<if test="payorderno != null and payorderno != ''"> or payOrderNo = #{payorderno} </if>
<if test="auditby != null and auditby != ''"> or auditBy = #{auditby} </if>
<if test="auditat != null"> or auditAt = #{auditat} </if>
<if test="refundthru != null and refundthru != ''"> or refundThru = #{refundthru} </if>
<if test="csstuff != null and csstuff != ''"> or csStuff = #{csstuff} </if>
<if test="returnwarehousenote != null and returnwarehousenote != ''"> or returnWarehouseNote = #{returnwarehousenote} </if>
<if test="holdcode != null and holdcode != ''"> or holdCode = #{holdcode} </if>
<if test="holduser != null and holduser != ''"> or holdUser = #{holduser} </if>
<if test="holdat != null"> or holdAt = #{holdat} </if>
<if test="errorcode != null and errorcode != ''"> or errorCode = #{errorcode} </if>
<if test="errordesc != null and errordesc != ''"> or errorDesc = #{errordesc} </if>
<if test="verificationstatus != null and verificationstatus != ''"> or verificationStatus = #{verificationstatus} </if>
<if test="verificationerrordesc != null and verificationerrordesc != ''"> or verificationErrorDesc = #{verificationerrordesc} </if>
<if test="refundedat != null"> or refundedAt = #{refundedat} </if>
<if test="status != null and status != ''"> or status = #{status} </if>
<if test="processtype != null and processtype != ''"> or processType = #{processtype} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> or platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> or merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> or expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> or payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> or businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> or transactionDate = #{transactionDate} </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>
</trim>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_h(
<trim suffix="" suffixOverrides=",">
<if test="id != null"> id , </if>
<if test="ofsid != null and ofsid != ''"> ofsid , </if>
<if test="returntype != null and returntype != ''"> returnType , </if>
<if test="exchangetype != null and exchangetype != ''"> exchangeType , </if>
<if test="refundind != null and refundind != ''"> refundInd , </if>
<if test="internalordertype != null and internalordertype != ''"> internalOrderType , </if>
<if test="bizchannel != null and bizchannel != ''"> bizChannel , </if>
<if test="code != null and code != ''"> code , </if>
<if test="companycode != null and companycode != ''"> companyCode , </if>
<if test="clientcode != null and clientcode != ''"> clientCode , </if>
<if test="storecode != null and storecode != ''"> storeCode , </if>
<if test="sourceuseraccount != null and sourceuseraccount != ''"> sourceUserAccount , </if>
<if test="sourceusername != null and sourceusername != ''"> sourceUserName , </if>
<if test="returnstatus != null and returnstatus != ''"> returnStatus , </if>
<if test="shipstatus != null and shipstatus != ''"> shipStatus , </if>
<if test="refundstatus != null and refundstatus != ''"> refundStatus , </if>
<if test="facilitycode != null and facilitycode != ''"> facilityCode , </if>
<if test="refordercode != null and refordercode != ''"> refOrderCode , </if>
<if test="reforderid != null"> refOrderId , </if>
<if test="refordertype != null and refordertype != ''"> refOrderType , </if>
<if test="reforderstatuswhenreturned != null and reforderstatuswhenreturned != ''"> refOrderStatusWhenReturned , </if>
<if test="sourceplatformcode != null and sourceplatformcode != ''"> sourcePlatformCode , </if>
<if test="sourceordercode != null and sourceordercode != ''"> sourceOrderCode , </if>
<if test="sourceorderstatuswhenreturned != null and sourceorderstatuswhenreturned != ''"> sourceOrderStatusWhenReturned , </if>
<if test="sourcereturncode != null and sourcereturncode != ''"> sourceReturnCode , </if>
<if test="sourcereturnstatus != null and sourcereturnstatus != ''"> sourceReturnStatus , </if>
<if test="reasoncode != null and reasoncode != ''"> reasonCode , </if>
<if test="returnnote != null and returnnote != ''"> returnNote , </if>
<if test="sellernote != null and sellernote != ''"> sellerNote , </if>
<if test="requestrefundamount != null and requestrefundamount != ''"> requestRefundAmount , </if>
<if test="actualrefundamount != null and actualrefundamount != ''"> actualRefundAmount , </if>
<if test="totalqty != null and totalqty != ''"> totalQty , </if>
<if test="totalfulfillqty != null and totalfulfillqty != ''"> totalFulfillQty , </if>
<if test="shipfromattentionto != null and shipfromattentionto != ''"> shipFromAttentionTo , </if>
<if test="shipfromaddress != null and shipfromaddress != ''"> shipFromAddress , </if>
<if test="shipfromcountry != null and shipfromcountry != ''"> shipFromCountry , </if>
<if test="shipfromstate != null and shipfromstate != ''"> shipFromState , </if>
<if test="shipfromcity != null and shipfromcity != ''"> shipFromCity , </if>
<if test="shipfromdistrict != null and shipfromdistrict != ''"> shipFromDistrict , </if>
<if test="shipfrompostalcode != null and shipfrompostalcode != ''"> shipFromPostalCode , </if>
<if test="shipfromphone != null and shipfromphone != ''"> shipFromPhone , </if>
<if test="shipfrommobile != null and shipfrommobile != ''"> shipFromMobile , </if>
<if test="shipfromfax != null and shipfromfax != ''"> shipFromFax , </if>
<if test="shipfromemail != null and shipfromemail != ''"> shipFromEmail , </if>
<if test="shipcarrier != null and shipcarrier != ''"> shipCarrier , </if>
<if test="shipwaybillcode != null and shipwaybillcode != ''"> shipWaybillCode , </if>
<if test="shiplogisticsstatus != null and shiplogisticsstatus != ''"> shipLogisticsStatus , </if>
<if test="returncarrier != null and returncarrier != ''"> returnCarrier , </if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> returnWaybillCode , </if>
<if test="returnlogisticsstatus != null and returnlogisticsstatus != ''"> returnLogisticsStatus , </if>
<if test="payaccount != null and payaccount != ''"> payAccount , </if>
<if test="payorderno != null and payorderno != ''"> payOrderNo , </if>
<if test="auditby != null and auditby != ''"> auditBy , </if>
<if test="auditat != null"> auditAt , </if>
<if test="refundthru != null and refundthru != ''"> refundThru , </if>
<if test="csstuff != null and csstuff != ''"> csStuff , </if>
<if test="returnwarehousenote != null and returnwarehousenote != ''"> returnWarehouseNote , </if>
<if test="holdcode != null and holdcode != ''"> holdCode , </if>
<if test="holduser != null and holduser != ''"> holdUser , </if>
<if test="holdat != null"> holdAt , </if>
<if test="errorcode != null and errorcode != ''"> errorCode , </if>
<if test="errordesc != null and errordesc != ''"> errorDesc , </if>
<if test="verificationstatus != null and verificationstatus != ''"> verificationStatus , </if>
<if test="verificationerrordesc != null and verificationerrordesc != ''"> verificationErrorDesc , </if>
<if test="refundedat != null"> refundedAt , </if>
<if test="status != null and status != ''"> status , </if>
<if test="processtype != null and processtype != ''"> processType , </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> platformDiscounts , </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts , </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts , </if>
<if test="payDiscounts != null and payDiscounts != ''"> payDiscounts , </if>
<if test="businessType != null and businessType != ''"> businessType , </if>
<if test="transactionDate != null and transactionDate != ''"> transactionDate , </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>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null"> #{id} ,</if>
<if test="ofsid != null and ofsid != ''"> #{ofsid} ,</if>
<if test="returntype != null and returntype != ''"> #{returntype} ,</if>
<if test="exchangetype != null and exchangetype != ''"> #{exchangetype} ,</if>
<if test="refundind != null and refundind != ''"> #{refundind} ,</if>
<if test="internalordertype != null and internalordertype != ''"> #{internalordertype} ,</if>
<if test="bizchannel != null and bizchannel != ''"> #{bizchannel} ,</if>
<if test="code != null and code != ''"> #{code} ,</if>
<if test="companycode != null and companycode != ''"> #{companycode} ,</if>
<if test="clientcode != null and clientcode != ''"> #{clientcode} ,</if>
<if test="storecode != null and storecode != ''"> #{storecode} ,</if>
<if test="sourceuseraccount != null and sourceuseraccount != ''"> #{sourceuseraccount} ,</if>
<if test="sourceusername != null and sourceusername != ''"> #{sourceusername} ,</if>
<if test="returnstatus != null and returnstatus != ''"> #{returnstatus} ,</if>
<if test="shipstatus != null and shipstatus != ''"> #{shipstatus} ,</if>
<if test="refundstatus != null and refundstatus != ''"> #{refundstatus} ,</if>
<if test="facilitycode != null and facilitycode != ''"> #{facilitycode} ,</if>
<if test="refordercode != null and refordercode != ''"> #{refordercode} ,</if>
<if test="reforderid != null"> #{reforderid} ,</if>
<if test="refordertype != null and refordertype != ''"> #{refordertype} ,</if>
<if test="reforderstatuswhenreturned != null and reforderstatuswhenreturned != ''"> #{reforderstatuswhenreturned} ,</if>
<if test="sourceplatformcode != null and sourceplatformcode != ''"> #{sourceplatformcode} ,</if>
<if test="sourceordercode != null and sourceordercode != ''"> #{sourceordercode} ,</if>
<if test="sourceorderstatuswhenreturned != null and sourceorderstatuswhenreturned != ''"> #{sourceorderstatuswhenreturned} ,</if>
<if test="sourcereturncode != null and sourcereturncode != ''"> #{sourcereturncode} ,</if>
<if test="sourcereturnstatus != null and sourcereturnstatus != ''"> #{sourcereturnstatus} ,</if>
<if test="reasoncode != null and reasoncode != ''"> #{reasoncode} ,</if>
<if test="returnnote != null and returnnote != ''"> #{returnnote} ,</if>
<if test="sellernote != null and sellernote != ''"> #{sellernote} ,</if>
<if test="requestrefundamount != null and requestrefundamount != ''"> #{requestrefundamount} ,</if>
<if test="actualrefundamount != null and actualrefundamount != ''"> #{actualrefundamount} ,</if>
<if test="totalqty != null and totalqty != ''"> #{totalqty} ,</if>
<if test="totalfulfillqty != null and totalfulfillqty != ''"> #{totalfulfillqty} ,</if>
<if test="shipfromattentionto != null and shipfromattentionto != ''"> #{shipfromattentionto} ,</if>
<if test="shipfromaddress != null and shipfromaddress != ''"> #{shipfromaddress} ,</if>
<if test="shipfromcountry != null and shipfromcountry != ''"> #{shipfromcountry} ,</if>
<if test="shipfromstate != null and shipfromstate != ''"> #{shipfromstate} ,</if>
<if test="shipfromcity != null and shipfromcity != ''"> #{shipfromcity} ,</if>
<if test="shipfromdistrict != null and shipfromdistrict != ''"> #{shipfromdistrict} ,</if>
<if test="shipfrompostalcode != null and shipfrompostalcode != ''"> #{shipfrompostalcode} ,</if>
<if test="shipfromphone != null and shipfromphone != ''"> #{shipfromphone} ,</if>
<if test="shipfrommobile != null and shipfrommobile != ''"> #{shipfrommobile} ,</if>
<if test="shipfromfax != null and shipfromfax != ''"> #{shipfromfax} ,</if>
<if test="shipfromemail != null and shipfromemail != ''"> #{shipfromemail} ,</if>
<if test="shipcarrier != null and shipcarrier != ''"> #{shipcarrier} ,</if>
<if test="shipwaybillcode != null and shipwaybillcode != ''"> #{shipwaybillcode} ,</if>
<if test="shiplogisticsstatus != null and shiplogisticsstatus != ''"> #{shiplogisticsstatus} ,</if>
<if test="returncarrier != null and returncarrier != ''"> #{returncarrier} ,</if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> #{returnwaybillcode} ,</if>
<if test="returnlogisticsstatus != null and returnlogisticsstatus != ''"> #{returnlogisticsstatus} ,</if>
<if test="payaccount != null and payaccount != ''"> #{payaccount} ,</if>
<if test="payorderno != null and payorderno != ''"> #{payorderno} ,</if>
<if test="auditby != null and auditby != ''"> #{auditby} ,</if>
<if test="auditat != null"> #{auditat} ,</if>
<if test="refundthru != null and refundthru != ''"> #{refundthru} ,</if>
<if test="csstuff != null and csstuff != ''"> #{csstuff} ,</if>
<if test="returnwarehousenote != null and returnwarehousenote != ''"> #{returnwarehousenote} ,</if>
<if test="holdcode != null and holdcode != ''"> #{holdcode} ,</if>
<if test="holduser != null and holduser != ''"> #{holduser} ,</if>
<if test="holdat != null"> #{holdat} ,</if>
<if test="errorcode != null and errorcode != ''"> #{errorcode} ,</if>
<if test="errordesc != null and errordesc != ''"> #{errordesc} ,</if>
<if test="verificationstatus != null and verificationstatus != ''"> #{verificationstatus} ,</if>
<if test="verificationerrordesc != null and verificationerrordesc != ''"> #{verificationerrordesc} ,</if>
<if test="refundedat != null"> #{refundedat} ,</if>
<if test="status != null and status != ''"> #{status} ,</if>
<if test="processtype != null and processtype != ''"> #{processtype} ,</if>
<if test="platformDiscounts != null and platformDiscounts != ''"> #{platformDiscounts} ,</if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> #{merchantDiscounts} ,</if>
<if test="expertDiscounts != null and expertDiscounts != ''"> #{expertDiscounts} ,</if>
<if test="payDiscounts != null and payDiscounts != ''"> #{payDiscounts} ,</if>
<if test="businessType != null and businessType != ''"> #{businessType} ,</if>
<if test="transactionDate != null and transactionDate != ''"> #{transactionDate} ,</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>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_h(id,ofsid,returnType, exchangeType, refundInd, internalOrderType, bizChannel, code, companyCode, clientCode, storeCode, sourceUserAccount, sourceUserName, returnStatus, shipStatus, refundStatus, facilityCode, refOrderCode, refOrderId, refOrderType, refOrderStatusWhenReturned, sourcePlatformCode, sourceOrderCode, sourceOrderStatusWhenReturned, sourceReturnCode, sourceReturnStatus, reasonCode, returnNote, sellerNote, requestRefundAmount, actualRefundAmount, totalQty, totalFulfillQty, shipFromAttentionTo, shipFromAddress, shipFromCountry, shipFromState, shipFromCity, shipFromDistrict, shipFromPostalCode, shipFromPhone, shipFromMobile, shipFromFax, shipFromEmail, shipCarrier, shipWaybillCode, shipLogisticsStatus, returnCarrier, returnWaybillCode, returnLogisticsStatus, payAccount, payOrderNo, auditBy, auditAt, refundThru, csStuff, returnWarehouseNote, holdCode, holdUser, holdAt, errorCode, errorDesc, verificationStatus, verificationErrorDesc, refundedAt, status, processType,businessType,transactionDate,newPushDate,newTransmitInfo,newState,newsystemnumber,newsystemprimary)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.id},#{entity.ofsid},#{entity.returntype},#{entity.exchangetype},#{entity.refundind},#{entity.internalordertype},#{entity.bizchannel},#{entity.code},#{entity.companycode},#{entity.clientcode},#{entity.storecode},#{entity.sourceuseraccount},#{entity.sourceusername},#{entity.returnstatus},#{entity.shipstatus},#{entity.refundstatus},#{entity.facilitycode},#{entity.refordercode},#{entity.reforderid},#{entity.refordertype},#{entity.reforderstatuswhenreturned},#{entity.sourceplatformcode},#{entity.sourceordercode},#{entity.sourceorderstatuswhenreturned},#{entity.sourcereturncode},#{entity.sourcereturnstatus},#{entity.reasoncode},#{entity.returnnote},#{entity.sellernote},#{entity.requestrefundamount},#{entity.actualrefundamount},#{entity.totalqty},#{entity.totalfulfillqty},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromcountry},#{entity.shipfromstate},#{entity.shipfromcity},#{entity.shipfromdistrict},#{entity.shipfrompostalcode},#{entity.shipfromphone},#{entity.shipfrommobile},#{entity.shipfromfax},#{entity.shipfromemail},#{entity.shipcarrier},#{entity.shipwaybillcode},#{entity.shiplogisticsstatus},#{entity.returncarrier},#{entity.returnwaybillcode},#{entity.returnlogisticsstatus},#{entity.payaccount},#{entity.payorderno},#{entity.auditby},#{entity.auditat},#{entity.refundthru},#{entity.csstuff},#{entity.returnwarehousenote},#{entity.holdcode},#{entity.holduser},#{entity.holdat},#{entity.errorcode},#{entity.errordesc},#{entity.verificationstatus},#{entity.verificationerrordesc},#{entity.refundedat},#{entity.status},#{entity.processtype},#{entity.businessType},#{entity.transactionDate},#{entity.newPushDate},#{entity.newTransmitInfo},#{entity.newState},#{entity.newsystemnumber},#{entity.newsystemprimary})
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_h(ofsid,returnType, exchangeType, refundInd, internalOrderType, bizChannel, code, companyCode, clientCode, storeCode, sourceUserAccount, sourceUserName, returnStatus, shipStatus, refundStatus, facilityCode, refOrderCode, refOrderId, refOrderType, refOrderStatusWhenReturned, sourcePlatformCode, sourceOrderCode, sourceOrderStatusWhenReturned, sourceReturnCode, sourceReturnStatus, reasonCode, returnNote, sellerNote, requestRefundAmount, actualRefundAmount, totalQty, totalFulfillQty, shipFromAttentionTo, shipFromAddress, shipFromCountry, shipFromState, shipFromCity, shipFromDistrict, shipFromPostalCode, shipFromPhone, shipFromMobile, shipFromFax, shipFromEmail, shipCarrier, shipWaybillCode, shipLogisticsStatus, returnCarrier, returnWaybillCode, returnLogisticsStatus, payAccount, payOrderNo, auditBy, auditAt, refundThru, csStuff, returnWarehouseNote, holdCode, holdUser, holdAt, errorCode, errorDesc, verificationStatus, verificationErrorDesc, refundedAt, status, processType,businessType)
values
<foreach collection="list" item="entity" separator=",">
(#{entity.ofsid},#{entity.returntype},#{entity.exchangetype},#{entity.refundind},#{entity.internalordertype},#{entity.bizchannel},#{entity.code},#{entity.companycode},#{entity.clientcode},#{entity.storecode},#{entity.sourceuseraccount},#{entity.sourceusername},#{entity.returnstatus},#{entity.shipstatus},#{entity.refundstatus},#{entity.facilitycode},#{entity.refordercode},#{entity.reforderid},#{entity.refordertype},#{entity.reforderstatuswhenreturned},#{entity.sourceplatformcode},#{entity.sourceordercode},#{entity.sourceorderstatuswhenreturned},#{entity.sourcereturncode},#{entity.sourcereturnstatus},#{entity.reasoncode},#{entity.returnnote},#{entity.sellernote},#{entity.requestrefundamount},#{entity.actualrefundamount},#{entity.totalqty},#{entity.totalfulfillqty},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromcountry},#{entity.shipfromstate},#{entity.shipfromcity},#{entity.shipfromdistrict},#{entity.shipfrompostalcode},#{entity.shipfromphone},#{entity.shipfrommobile},#{entity.shipfromfax},#{entity.shipfromemail},#{entity.shipcarrier},#{entity.shipwaybillcode},#{entity.shiplogisticsstatus},#{entity.returncarrier},#{entity.returnwaybillcode},#{entity.returnlogisticsstatus},#{entity.payaccount},#{entity.payorderno},#{entity.auditby},#{entity.auditat},#{entity.refundthru},#{entity.csstuff},#{entity.returnwarehousenote},#{entity.holdcode},#{entity.holduser},#{entity.holdat},#{entity.errorcode},#{entity.errordesc},#{entity.verificationstatus},#{entity.verificationerrordesc},#{entity.refundedat},#{entity.status},#{entity.processtype},#{entity.businessType})
</foreach>
on duplicate key update
ofsid = values(ofsid),
returnType = values(returnType),
exchangeType = values(exchangeType),
refundInd = values(refundInd),
internalOrderType = values(internalOrderType),
bizChannel = values(bizChannel),
code = values(code),
companyCode = values(companyCode),
clientCode = values(clientCode),
storeCode = values(storeCode),
sourceUserAccount = values(sourceUserAccount),
sourceUserName = values(sourceUserName),
returnStatus = values(returnStatus),
shipStatus = values(shipStatus),
refundStatus = values(refundStatus),
facilityCode = values(facilityCode),
refOrderCode = values(refOrderCode),
refOrderId = values(refOrderId),
refOrderType = values(refOrderType),
refOrderStatusWhenReturned = values(refOrderStatusWhenReturned),
sourcePlatformCode = values(sourcePlatformCode),
sourceOrderCode = values(sourceOrderCode),
sourceOrderStatusWhenReturned = values(sourceOrderStatusWhenReturned),
sourceReturnCode = values(sourceReturnCode),
sourceReturnStatus = values(sourceReturnStatus),
reasonCode = values(reasonCode),
returnNote = values(returnNote),
sellerNote = values(sellerNote),
requestRefundAmount = values(requestRefundAmount),
actualRefundAmount = values(actualRefundAmount),
totalQty = values(totalQty),
totalFulfillQty = values(totalFulfillQty),
shipFromAttentionTo = values(shipFromAttentionTo),
shipFromAddress = values(shipFromAddress),
shipFromCountry = values(shipFromCountry),
shipFromState = values(shipFromState),
shipFromCity = values(shipFromCity),
shipFromDistrict = values(shipFromDistrict),
shipFromPostalCode = values(shipFromPostalCode),
shipFromPhone = values(shipFromPhone),
shipFromMobile = values(shipFromMobile),
shipFromFax = values(shipFromFax),
shipFromEmail = values(shipFromEmail),
shipCarrier = values(shipCarrier),
shipWaybillCode = values(shipWaybillCode),
shipLogisticsStatus = values(shipLogisticsStatus),
returnCarrier = values(returnCarrier),
returnWaybillCode = values(returnWaybillCode),
returnLogisticsStatus = values(returnLogisticsStatus),
payAccount = values(payAccount),
payOrderNo = values(payOrderNo),
auditBy = values(auditBy),
auditAt = values(auditAt),
refundThru = values(refundThru),
csStuff = values(csStuff),
returnWarehouseNote = values(returnWarehouseNote),
holdCode = values(holdCode),
holdUser = values(holdUser),
holdAt = values(holdAt),
errorCode = values(errorCode),
errorDesc = values(errorDesc),
verificationStatus = values(verificationStatus),
verificationErrorDesc = values(verificationErrorDesc),
refundedAt = values(refundedAt),
status = values(status),
processType = values(processType),
businessType = values(businessType)
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatchBySuccessOrFail" keyProperty="id" useGeneratedKeys="true">
insert into only_after_sales_h(id,businessType,transactionDate,newPushDate,newTransmitInfo,newState,newsystemnumber,newsystemprimary)
values
<foreach collection="list" item="entity" separator=",">
(#{entity.id},#{entity.businessType},#{entity.transactionDate},#{entity.newPushDate},#{entity.newTransmitInfo},#{entity.newState},#{entity.newsystemnumber},#{entity.newsystemprimary})
</foreach>
on duplicate key update
id = values(id),
businessType = values(businessType),
transactionDate = values(transactionDate),
newPushDate = values(newPushDate),
newTransmitInfo = values(newTransmitInfo),
newState = values(newState),
newsystemnumber = values(newsystemnumber),
newsystemprimary = values(newsystemprimary)
</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity" >
update only_after_sales_h set
<trim suffix="" suffixOverrides=",">
<if test="ofsid != null and ofsid != ''"> ofsid = #{ofsid},</if>
<if test="returntype != null and returntype != ''"> returnType = #{returntype},</if>
<if test="exchangetype != null and exchangetype != ''"> exchangeType = #{exchangetype},</if>
<if test="refundind != null and refundind != ''"> refundInd = #{refundind},</if>
<if test="internalordertype != null and internalordertype != ''"> internalOrderType = #{internalordertype},</if>
<if test="bizchannel != null and bizchannel != ''"> bizChannel = #{bizchannel},</if>
<if test="code != null and code != ''"> code = #{code},</if>
<if test="companycode != null and companycode != ''"> companyCode = #{companycode},</if>
<if test="clientcode != null and clientcode != ''"> clientCode = #{clientcode},</if>
<if test="storecode != null and storecode != ''"> storeCode = #{storecode},</if>
<if test="sourceuseraccount != null and sourceuseraccount != ''"> sourceUserAccount = #{sourceuseraccount},</if>
<if test="sourceusername != null and sourceusername != ''"> sourceUserName = #{sourceusername},</if>
<if test="returnstatus != null and returnstatus != ''"> returnStatus = #{returnstatus},</if>
<if test="shipstatus != null and shipstatus != ''"> shipStatus = #{shipstatus},</if>
<if test="refundstatus != null and refundstatus != ''"> refundStatus = #{refundstatus},</if>
<if test="facilitycode != null and facilitycode != ''"> facilityCode = #{facilitycode},</if>
<if test="refordercode != null and refordercode != ''"> refOrderCode = #{refordercode},</if>
<if test="reforderid != null"> refOrderId = #{reforderid},</if>
<if test="refordertype != null and refordertype != ''"> refOrderType = #{refordertype},</if>
<if test="reforderstatuswhenreturned != null and reforderstatuswhenreturned != ''"> refOrderStatusWhenReturned = #{reforderstatuswhenreturned},</if>
<if test="sourceplatformcode != null and sourceplatformcode != ''"> sourcePlatformCode = #{sourceplatformcode},</if>
<if test="sourceordercode != null and sourceordercode != ''"> sourceOrderCode = #{sourceordercode},</if>
<if test="sourceorderstatuswhenreturned != null and sourceorderstatuswhenreturned != ''"> sourceOrderStatusWhenReturned = #{sourceorderstatuswhenreturned},</if>
<if test="sourcereturncode != null and sourcereturncode != ''"> sourceReturnCode = #{sourcereturncode},</if>
<if test="sourcereturnstatus != null and sourcereturnstatus != ''"> sourceReturnStatus = #{sourcereturnstatus},</if>
<if test="reasoncode != null and reasoncode != ''"> reasonCode = #{reasoncode},</if>
<if test="returnnote != null and returnnote != ''"> returnNote = #{returnnote},</if>
<if test="sellernote != null and sellernote != ''"> sellerNote = #{sellernote},</if>
<if test="requestrefundamount != null and requestrefundamount != ''"> requestRefundAmount = #{requestrefundamount},</if>
<if test="actualrefundamount != null and actualrefundamount != ''"> actualRefundAmount = #{actualrefundamount},</if>
<if test="totalqty != null and totalqty != ''"> totalQty = #{totalqty},</if>
<if test="totalfulfillqty != null and totalfulfillqty != ''"> totalFulfillQty = #{totalfulfillqty},</if>
<if test="shipfromattentionto != null and shipfromattentionto != ''"> shipFromAttentionTo = #{shipfromattentionto},</if>
<if test="shipfromaddress != null and shipfromaddress != ''"> shipFromAddress = #{shipfromaddress},</if>
<if test="shipfromcountry != null and shipfromcountry != ''"> shipFromCountry = #{shipfromcountry},</if>
<if test="shipfromstate != null and shipfromstate != ''"> shipFromState = #{shipfromstate},</if>
<if test="shipfromcity != null and shipfromcity != ''"> shipFromCity = #{shipfromcity},</if>
<if test="shipfromdistrict != null and shipfromdistrict != ''"> shipFromDistrict = #{shipfromdistrict},</if>
<if test="shipfrompostalcode != null and shipfrompostalcode != ''"> shipFromPostalCode = #{shipfrompostalcode},</if>
<if test="shipfromphone != null and shipfromphone != ''"> shipFromPhone = #{shipfromphone},</if>
<if test="shipfrommobile != null and shipfrommobile != ''"> shipFromMobile = #{shipfrommobile},</if>
<if test="shipfromfax != null and shipfromfax != ''"> shipFromFax = #{shipfromfax},</if>
<if test="shipfromemail != null and shipfromemail != ''"> shipFromEmail = #{shipfromemail},</if>
<if test="shipcarrier != null and shipcarrier != ''"> shipCarrier = #{shipcarrier},</if>
<if test="shipwaybillcode != null and shipwaybillcode != ''"> shipWaybillCode = #{shipwaybillcode},</if>
<if test="shiplogisticsstatus != null and shiplogisticsstatus != ''"> shipLogisticsStatus = #{shiplogisticsstatus},</if>
<if test="returncarrier != null and returncarrier != ''"> returnCarrier = #{returncarrier},</if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> returnWaybillCode = #{returnwaybillcode},</if>
<if test="returnlogisticsstatus != null and returnlogisticsstatus != ''"> returnLogisticsStatus = #{returnlogisticsstatus},</if>
<if test="payaccount != null and payaccount != ''"> payAccount = #{payaccount},</if>
<if test="payorderno != null and payorderno != ''"> payOrderNo = #{payorderno},</if>
<if test="auditby != null and auditby != ''"> auditBy = #{auditby},</if>
<if test="auditat != null"> auditAt = #{auditat},</if>
<if test="refundthru != null and refundthru != ''"> refundThru = #{refundthru},</if>
<if test="csstuff != null and csstuff != ''"> csStuff = #{csstuff},</if>
<if test="returnwarehousenote != null and returnwarehousenote != ''"> returnWarehouseNote = #{returnwarehousenote},</if>
<if test="holdcode != null and holdcode != ''"> holdCode = #{holdcode},</if>
<if test="holduser != null and holduser != ''"> holdUser = #{holduser},</if>
<if test="holdat != null"> holdAt = #{holdat},</if>
<if test="errorcode != null and errorcode != ''"> errorCode = #{errorcode},</if>
<if test="errordesc != null and errordesc != ''"> errorDesc = #{errordesc},</if>
<if test="verificationstatus != null and verificationstatus != ''"> verificationStatus = #{verificationstatus},</if>
<if test="verificationerrordesc != null and verificationerrordesc != ''"> verificationErrorDesc = #{verificationerrordesc},</if>
<if test="refundedat != null"> refundedAt = #{refundedat},</if>
<if test="status != null and status != ''"> status = #{status},</if>
<if test="processtype != null and processtype != ''"> processType = #{processtype},</if>
<if test="platformDiscounts != null and platformDiscounts != ''"> platformDiscounts = #{platformDiscounts},</if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> merchantDiscounts = #{merchantDiscounts},</if>
<if test="expertDiscounts != null and expertDiscounts != ''"> expertDiscounts = #{expertDiscounts},</if>
<if test="payDiscounts != null and payDiscounts != ''"> payDiscounts = #{payDiscounts},</if>
<if test="businessType != null and businessType != ''"> businessType = #{businessType},</if>
<if test="transactionDate != null and transactionDate != ''"> transactionDate = #{transactionDate},</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>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity" >
update only_after_sales_h 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.entity.OnlyAfterSalesHEntity" >
update only_after_sales_h set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null"> and id = #{id} </if>
<if test="ofsid != null and ofsid != ''"> and ofsid = #{ofsid} </if>
<if test="returntype != null and returntype != ''"> and returnType = #{returntype} </if>
<if test="exchangetype != null and exchangetype != ''"> and exchangeType = #{exchangetype} </if>
<if test="refundind != null and refundind != ''"> and refundInd = #{refundind} </if>
<if test="internalordertype != null and internalordertype != ''"> and internalOrderType = #{internalordertype} </if>
<if test="bizchannel != null and bizchannel != ''"> and bizChannel = #{bizchannel} </if>
<if test="code != null and code != ''"> and code = #{code} </if>
<if test="companycode != null and companycode != ''"> and companyCode = #{companycode} </if>
<if test="clientcode != null and clientcode != ''"> and clientCode = #{clientcode} </if>
<if test="storecode != null and storecode != ''"> and storeCode = #{storecode} </if>
<if test="sourceuseraccount != null and sourceuseraccount != ''"> and sourceUserAccount = #{sourceuseraccount} </if>
<if test="sourceusername != null and sourceusername != ''"> and sourceUserName = #{sourceusername} </if>
<if test="returnstatus != null and returnstatus != ''"> and returnStatus = #{returnstatus} </if>
<if test="shipstatus != null and shipstatus != ''"> and shipStatus = #{shipstatus} </if>
<if test="refundstatus != null and refundstatus != ''"> and refundStatus = #{refundstatus} </if>
<if test="facilitycode != null and facilitycode != ''"> and facilityCode = #{facilitycode} </if>
<if test="refordercode != null and refordercode != ''"> and refOrderCode = #{refordercode} </if>
<if test="reforderid != null"> and refOrderId = #{reforderid} </if>
<if test="refordertype != null and refordertype != ''"> and refOrderType = #{refordertype} </if>
<if test="reforderstatuswhenreturned != null and reforderstatuswhenreturned != ''"> and refOrderStatusWhenReturned = #{reforderstatuswhenreturned} </if>
<if test="sourceplatformcode != null and sourceplatformcode != ''"> and sourcePlatformCode = #{sourceplatformcode} </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode = #{sourceordercode} </if>
<if test="sourceorderstatuswhenreturned != null and sourceorderstatuswhenreturned != ''"> and sourceOrderStatusWhenReturned = #{sourceorderstatuswhenreturned} </if>
<if test="sourcereturncode != null and sourcereturncode != ''"> and sourceReturnCode = #{sourcereturncode} </if>
<if test="sourcereturnstatus != null and sourcereturnstatus != ''"> and sourceReturnStatus = #{sourcereturnstatus} </if>
<if test="reasoncode != null and reasoncode != ''"> and reasonCode = #{reasoncode} </if>
<if test="returnnote != null and returnnote != ''"> and returnNote = #{returnnote} </if>
<if test="sellernote != null and sellernote != ''"> and sellerNote = #{sellernote} </if>
<if test="requestrefundamount != null and requestrefundamount != ''"> and requestRefundAmount = #{requestrefundamount} </if>
<if test="actualrefundamount != null and actualrefundamount != ''"> and actualRefundAmount = #{actualrefundamount} </if>
<if test="totalqty != null and totalqty != ''"> and totalQty = #{totalqty} </if>
<if test="totalfulfillqty != null and totalfulfillqty != ''"> and totalFulfillQty = #{totalfulfillqty} </if>
<if test="shipfromattentionto != null and shipfromattentionto != ''"> and shipFromAttentionTo = #{shipfromattentionto} </if>
<if test="shipfromaddress != null and shipfromaddress != ''"> and shipFromAddress = #{shipfromaddress} </if>
<if test="shipfromcountry != null and shipfromcountry != ''"> and shipFromCountry = #{shipfromcountry} </if>
<if test="shipfromstate != null and shipfromstate != ''"> and shipFromState = #{shipfromstate} </if>
<if test="shipfromcity != null and shipfromcity != ''"> and shipFromCity = #{shipfromcity} </if>
<if test="shipfromdistrict != null and shipfromdistrict != ''"> and shipFromDistrict = #{shipfromdistrict} </if>
<if test="shipfrompostalcode != null and shipfrompostalcode != ''"> and shipFromPostalCode = #{shipfrompostalcode} </if>
<if test="shipfromphone != null and shipfromphone != ''"> and shipFromPhone = #{shipfromphone} </if>
<if test="shipfrommobile != null and shipfrommobile != ''"> and shipFromMobile = #{shipfrommobile} </if>
<if test="shipfromfax != null and shipfromfax != ''"> and shipFromFax = #{shipfromfax} </if>
<if test="shipfromemail != null and shipfromemail != ''"> and shipFromEmail = #{shipfromemail} </if>
<if test="shipcarrier != null and shipcarrier != ''"> and shipCarrier = #{shipcarrier} </if>
<if test="shipwaybillcode != null and shipwaybillcode != ''"> and shipWaybillCode = #{shipwaybillcode} </if>
<if test="shiplogisticsstatus != null and shiplogisticsstatus != ''"> and shipLogisticsStatus = #{shiplogisticsstatus} </if>
<if test="returncarrier != null and returncarrier != ''"> and returnCarrier = #{returncarrier} </if>
<if test="returnwaybillcode != null and returnwaybillcode != ''"> and returnWaybillCode = #{returnwaybillcode} </if>
<if test="returnlogisticsstatus != null and returnlogisticsstatus != ''"> and returnLogisticsStatus = #{returnlogisticsstatus} </if>
<if test="payaccount != null and payaccount != ''"> and payAccount = #{payaccount} </if>
<if test="payorderno != null and payorderno != ''"> and payOrderNo = #{payorderno} </if>
<if test="auditby != null and auditby != ''"> and auditBy = #{auditby} </if>
<if test="auditat != null"> and auditAt = #{auditat} </if>
<if test="refundthru != null and refundthru != ''"> and refundThru = #{refundthru} </if>
<if test="csstuff != null and csstuff != ''"> and csStuff = #{csstuff} </if>
<if test="returnwarehousenote != null and returnwarehousenote != ''"> and returnWarehouseNote = #{returnwarehousenote} </if>
<if test="holdcode != null and holdcode != ''"> and holdCode = #{holdcode} </if>
<if test="holduser != null and holduser != ''"> and holdUser = #{holduser} </if>
<if test="holdat != null"> and holdAt = #{holdat} </if>
<if test="errorcode != null and errorcode != ''"> and errorCode = #{errorcode} </if>
<if test="errordesc != null and errordesc != ''"> and errorDesc = #{errordesc} </if>
<if test="verificationstatus != null and verificationstatus != ''"> and verificationStatus = #{verificationstatus} </if>
<if test="verificationerrordesc != null and verificationerrordesc != ''"> and verificationErrorDesc = #{verificationerrordesc} </if>
<if test="refundedat != null"> and refundedAt = #{refundedat} </if>
<if test="status != null and status != ''"> and status = #{status} </if>
<if test="processtype != null and processtype != ''"> and processType = #{processtype} </if>
<if test="platformDiscounts != null and platformDiscounts != ''"> and platformDiscounts = #{platformDiscounts} </if>
<if test="merchantDiscounts != null and merchantDiscounts != ''"> and merchantDiscounts = #{merchantDiscounts} </if>
<if test="expertDiscounts != null and expertDiscounts != ''"> and expertDiscounts = #{expertDiscounts} </if>
<if test="payDiscounts != null and payDiscounts != ''"> and payDiscounts = #{payDiscounts} </if>
<if test="businessType != null and businessType != ''"> and businessType = #{businessType} </if>
<if test="transactionDate != null and transactionDate != ''"> and transactionDate = #{transactionDate} </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>
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from only_after_sales_h where id = #{id}
</delete>
<!--批量新增-->
</mapper>

View File

@ -51,4 +51,18 @@ public interface ITocofsSaleoutService extends IBaseService<TocofsSaleoutEntity,
* @author liuyang * @author liuyang
*/ */
JsonResultEntity queryPassiveComponentsReportExcel(JSONObject jsonObject) throws Exception; JsonResultEntity queryPassiveComponentsReportExcel(JSONObject jsonObject) throws Exception;
/**
* 无源件退款业务查询
*
* @author liuyang
*/
JsonResultEntity queryRefundPassiveComponents(JSONObject jsonObject) throws Exception;
/**
* 无源件退款业务查询,Excel导出
*
* @author liuyang
*/
JsonResultEntity queryRefundPassiveComponentsExcel(JSONObject jsonObject) throws Exception;
} }

View File

@ -46,6 +46,9 @@ public class TocofsSaleoutServiceImpl extends BaseService<TocofsSaleoutEntity, S
@Autowired @Autowired
private IOfsPassiveorderDetailDao iOfsPassiveorderDetailDao; private IOfsPassiveorderDetailDao iOfsPassiveorderDetailDao;
@Autowired
private IOnlyAfterSalesBDao iOnlyAfterSalesBDao;
@Autowired @Autowired
public void setTocofsSaleoutDao(ITocofsSaleoutDao dao) { public void setTocofsSaleoutDao(ITocofsSaleoutDao dao) {
this.tocofsSaleoutDao = dao; this.tocofsSaleoutDao = dao;
@ -483,6 +486,89 @@ public class TocofsSaleoutServiceImpl extends BaseService<TocofsSaleoutEntity, S
return BaseResult.getFailureMessageEntity("导出Excel查询数据失败"); return BaseResult.getFailureMessageEntity("导出Excel查询数据失败");
} }
} }
@Override
public JsonResultEntity queryRefundPassiveComponents(JSONObject jsonObject) throws Exception {
Assert.notNull(jsonObject, "jsonObject不能为空");
JSONObject jsonStr = getstrObj("jsonStr", jsonObject);
//提供两种模式查询模式 query导出模式 excel
String qType = jsonStr.getString("qType");
//业务类型目前固定成passiveSalesService
String businessType = jsonStr.getString("businesstype");
Assert.notNull(businessType, "businesstype不能为空!");
//售后订单号
String returnOrderCode = jsonStr.getString("returnOrderCode");
//O售后订单业务日期时间范围
String transactionDateStart = jsonStr.getString("transactionDateStart");
String transactionDateEnd = jsonStr.getString("transactionDateEnd");
if (transactionDateStart != null && !"".equals(transactionDateEnd)) {
transactionDateStart += " 00:00:00";
}
if (transactionDateEnd != null && !"".equals(transactionDateEnd)) {
transactionDateEnd += " 23:59:59";
}
//退款完成推送状态
String newState = jsonStr.getString("newState");
OnlyAfterSalesBEntity onlyAfterSalesBEntity = new OnlyAfterSalesBEntity();
onlyAfterSalesBEntity.setNewState(newState);
onlyAfterSalesBEntity.setTransactionDateStart(transactionDateStart);
onlyAfterSalesBEntity.setTransactionDateEnd(transactionDateEnd);
onlyAfterSalesBEntity.setBusinessType(businessType);
onlyAfterSalesBEntity.setReturnordercode(returnOrderCode);
if (qType == null || "".equals(qType.trim()) || "query".equals(qType.trim())) {
//分页模式
String pageNum = jsonStr.getString("pageNum");
String pageSize = jsonStr.getString("pageSize");
Assert.notNull(pageNum, "pageNum不能为空");
Assert.notNull(pageSize, "pageSize不能为空");
onlyAfterSalesBEntity.setPageNum(Integer.valueOf(pageNum));
onlyAfterSalesBEntity.setPageSize(Integer.valueOf(pageSize));
PageHelper.startPage(onlyAfterSalesBEntity.getPageNum(), onlyAfterSalesBEntity.getPageSize());
List<OnlyAfterSalesBEntity> onlyAfterSalesBEntityList = iOnlyAfterSalesBDao.query(onlyAfterSalesBEntity);
PageInfo pageInfo = new PageInfo(onlyAfterSalesBEntityList);
return BaseResult.getSuccessMessageEntity("查询成功", pageInfo);
} else if ("excel".equals(qType)) {
//导出模式
List<OnlyAfterSalesBDto> onlyAfterSalesBDtoArrayList = new ArrayList<>();
try {
onlyAfterSalesBDtoArrayList = iOnlyAfterSalesBDao.queryPassiveComponentsExport(onlyAfterSalesBEntity);
} catch (Exception e) {
logger.error("导出模式下,查询目标数据失败!", e);
}
return BaseResult.getSuccessMessageEntity("查询成功", onlyAfterSalesBDtoArrayList);
} else {
return BaseResult.getFailureMessageEntity("查询失败,无法确定查询模式!请选择:查询模式 query、导出模式 excel");
}
}
@Override
public JsonResultEntity queryRefundPassiveComponentsExcel(JSONObject jsonObject) throws Exception {
Assert.notNull(jsonObject, "jsonObject不能为空");
JSONObject jsonStr = getstrObj("jsonStr", jsonObject);
Assert.notNull(jsonStr, "jsonStr对象不能为空");
jsonStr.put("qType", "excel");
jsonObject.put("jsonStr", jsonStr);
JsonResultEntity jsonResultEntity = queryRefundPassiveComponents(jsonObject);
if (jsonResultEntity != null && jsonResultEntity.getAttribute() != null) {
InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream(reportTemplatesurl);
String[] excelFile = createExcelFile();
List<OnlyAfterSalesBDto> jsonResultEntityAttribute = (List<OnlyAfterSalesBDto>) jsonResultEntity.getAttribute();
EasyExcel.write(excelFile[0], OnlyAfterSalesBDto.class).withTemplate(templateFileName).sheet().doWrite(jsonResultEntityAttribute);
return BaseResult.getSuccessMessageEntity(excelFile[1]);
} else {
return BaseResult.getFailureMessageEntity("导出Excel查询数据失败");
}
}
} }

View File

@ -98,6 +98,8 @@ public class HeaderDto {
private String shipmentCode; private String shipmentCode;
private String isFinanical; private String isFinanical;
private String finanicalStatus; private String finanicalStatus;
//交易成功时间
private String tradeSuccessAt;
//会员id //会员id
private String memberId; private String memberId;

View File

@ -74,4 +74,9 @@ public class RerturnGoodsOrderSearchDetails {
private String expertDiscounts; private String expertDiscounts;
//支付优惠 //支付优惠
private String payDiscounts; private String payDiscounts;
//售后订单表头
private RerturnGoodsOrderSearchHeader rerturnGoodsOrderSearchHeader;
//目标业务时间
private String targetBusinessDate;
} }