丽知:新增仅退款插件。

This commit is contained in:
zhengyf 2024-09-23 14:22:34 +08:00
parent ca121aad33
commit 15e6019b06
15 changed files with 2064 additions and 21 deletions

View File

@ -0,0 +1,15 @@
package com.hzya.frame.plugin.lets.dao;
import com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
/**
* 售后订单表_仅退款_子表(only_after_sales_b: table)表数据库访问层
*
* @author makejava
* @since 2024-09-23 10:43:46
*/
public interface IOnlyAfterSalesBDao extends IBaseDao<OnlyAfterSalesBEntity, String> {
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.plugin.lets.dao;
import com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import java.util.List;
/**
* 售后订单表_仅退款_主表(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,16 @@
package com.hzya.frame.plugin.lets.dao.impl;
import com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity;
import com.hzya.frame.plugin.lets.dao.IOnlyAfterSalesBDao;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 售后订单表_仅退款_子表(OnlyAfterSalesB)表数据库访问层
*
* @author makejava
* @since 2024-09-23 10:43:46
*/
public class OnlyAfterSalesBDaoImpl extends MybatisGenericDao<OnlyAfterSalesBEntity, String> implements IOnlyAfterSalesBDao{
}

View File

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

View File

@ -0,0 +1,74 @@
package com.hzya.frame.plugin.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;
/** 退货单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;
}

View File

@ -0,0 +1,434 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.plugin.lets.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"/>
</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
</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>
</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>
</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>
</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>
</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>
</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>
</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)
values
<foreach collection="entities" 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})
</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)
values
<foreach collection="entities" 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})
</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)</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>
</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>
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from only_after_sales_b where id = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,150 @@
package com.hzya.frame.plugin.lets.entity;
import java.util.Date;
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 Date auditat;
/** 退款方式 */
private String refundthru;
/** 客服工号 */
private String csstuff;
/** 仓库备注 */
private String returnwarehousenote;
/** 锁定原因 */
private String holdcode;
/** 锁定用户 */
private String holduser;
/** 锁定时间 */
private Date holdat;
/** 异常类型 */
private String errorcode;
/** 异常消息 */
private String errordesc;
/** 核销状态 */
private String verificationstatus;
/** 核销异常描述 */
private String verificationerrordesc;
/** 退款时间 */
private Date refundedat;
/** 状态 */
private String status;
/** 处理类型 */
private String processtype;
}

View File

@ -0,0 +1,844 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.plugin.lets.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"/>
</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
</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>
</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>
</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>
</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>
</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>
</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>
</trim>
)
</insert>
<!-- 批量新增 -->
<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)
values
<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})
</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)
values
<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})
</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)</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>
</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>
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from only_after_sales_h where id = #{id}
</delete>
<!--批量新增-->
</mapper>

View File

@ -0,0 +1,40 @@
package com.hzya.frame.plugin.lets.ofsvo;
import lombok.Data;
/**
* ofs 销售退货单查询 请求类
*/
@Data
public class QueryReturnOrderRequestVO {
/** 开始时间 */
private String created_start;
/** 结束时间 */
private String created_end;
/** 退款开始时间 */
private String refundedAt_start;
/** 退款结束时间 */
private String refundedAt_end;
/** 组织 */
private String clientCode;
/** 调拨订单 */
private String code;
/** 状态 */
private String status;
/** 订单类型 OFS数据字典 INTERNAL_ORDER_TYPE*/
private String internalOrderType;
/** 销售订单类型 OFS数据字典 INTERNAL_ORDER_TYPE*/
private String refOrderType;
/** 销售订单编号 */
private String refOrderCode;
/** 货主 */
private String companyCode;
/** 库存地点 */
private String facilityCode;
/** 分页页数 */
private Long pageNo;
/** 每页条数 1-500,默认50 */
private Long pageSize;
}

View File

@ -1,32 +1,55 @@
package com.hzya.frame.plugin.lets.plugin.sales;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.lets.constant.OverallConstant;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.dao.IOnlyAfterSalesBDao;
import com.hzya.frame.plugin.lets.dao.IOnlyAfterSalesHDao;
import com.hzya.frame.plugin.lets.entity.OnlyAfterSalesBEntity;
import com.hzya.frame.plugin.lets.entity.OnlyAfterSalesHEntity;
import com.hzya.frame.plugin.lets.ofsvo.QueryReturnOrderRequestVO;
import com.hzya.frame.plugin.lets.u8cdto.ArapDjzbVO;
import com.hzya.frame.plugin.lets.u8cdto.BillVO;
import com.hzya.frame.plugin.lets.util.QueryU8CEntityUtil;
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
import com.hzya.frame.plugin.lets.util.pushData.PushU8CByApiCode;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.ttxofs.basics.ReturnMessageBasics;
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
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 com.hzya.frame.ttxofs.dto.returngoodordersearch.RerturnGoodsOrderSearchJsonRootBean;
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* add by zyd
* O售后订单(仅退款) -> U8C红字应收单
*
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.plugin.sales
* @ProjectkangarooDataCenterV3
* @nameRefundOnly
* @Date2024/9/3 17:19
* @FilenameRefundOnly
* returnType:0 不退货
* exchangeType:0 不换货
* refundInd:1 退款
*
* 按天推送
*
* @Date2024/9/21 17:19
*/
public class RefundOnlyPluginInitializer extends PluginBaseEntity {
@ -62,6 +85,9 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
return "3";
}
@Autowired
private OfsUnifiedService ofsUnifiedService;
@Autowired
private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao;
@Autowired
@ -71,6 +97,11 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
@Autowired
private QueryU8CEntityUtil queryU8CEntityUtil;
@Autowired
private IOnlyAfterSalesHDao onlyAfterSalesHDao;
@Autowired
private IOnlyAfterSalesBDao onlyAfterSalesBDao;
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
@ -114,22 +145,46 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
//获取当前时间
Date currentDate = new Date();
Date startTime = DateUtil.offset(currentDate, DateField.MINUTE, -10);
Date endTime = DateUtil.offset(currentDate, DateField.MINUTE, -4);
Date endTime = DateUtil.offset(currentDate, DateField.MINUTE, -3);
String startTimeStr = DateUtil.format(startTime, "yyyy-MM-dd HH:mm:ss");
String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss");
QueryReturnOrderRequestVO queryReturnOrderRequestVO = new QueryReturnOrderRequestVO();
queryReturnOrderRequestVO.setRefundedAt_start(startTimeStr);
queryReturnOrderRequestVO.setRefundedAt_end(endTimeStr);
// queryOfsOnlyReturnOrders(queryReturnOrderRequestVO);
}catch (Exception e){
logger.error("丽知:售后订单(仅退款)--->U8C红字应收单,start()方法报错:"+e);
}
}
public void start(String vbillcode){
try {
/**
* @param ofsCode 售后订单号
*/
public void start(String ofsCode){
try {
QueryReturnOrderRequestVO queryReturnOrderRequestVO = new QueryReturnOrderRequestVO();
queryReturnOrderRequestVO.setCode(ofsCode);
List<RerturnGoodsOrderSearchData> returnGoodsOrders = queryOfsOnlyReturnOrders(queryReturnOrderRequestVO);
if (returnGoodsOrders == null || returnGoodsOrders.size() == 0) {
Assert.state(false, "丽知:售后订单(仅退款):{} --->U8C红字应收单未查询到OFS售后订单(仅退款)", ofsCode);
}
//底表存数据库
saveOrUpdate(returnGoodsOrders);
//过滤日志
List<RerturnGoodsOrderSearchData> filterReturnGoodsOrders = filterData(returnGoodsOrders);
if(filterReturnGoodsOrders==null||filterReturnGoodsOrders.size()==0){
Assert.state(false, "丽知:售后订单(仅退款):{} --->U8C红字应收单该售后订单(仅退款)已被推送成功,请勿重新推送", ofsCode);
}
//推送
// implement(filterReturnGoodsOrders);
}catch (Exception e){
logger.error("丽知:售后订单(仅退款)--->U8C红字应收单,start()方法报错:"+e);
logger.error("丽知:售后订单(仅退款)--->U8C红字应收单,start(String ofsCode)方法报错:"+e);
}
}
public void start(String startTime, String endTime){
@ -139,11 +194,212 @@ public class RefundOnlyPluginInitializer extends PluginBaseEntity {
String start = DateUtil.format(business_start, "yyyy-MM-dd") + " 00:00:00";
String end = DateUtil.format(business_end, "yyyy-MM-dd") + " 23:59:59";
QueryReturnOrderRequestVO queryReturnOrderRequestVO = new QueryReturnOrderRequestVO();
queryReturnOrderRequestVO.setRefundedAt_start(start);
queryReturnOrderRequestVO.setRefundedAt_end(end);
// queryOfsOnlyReturnOrders(queryReturnOrderRequestVO);
}catch (Exception e){
logger.error("丽知:售后订单(仅退款)--->U8C红字应收单,start()方法报错:"+e);
logger.error("丽知:售后订单(仅退款)--->U8C红字应收单,start(String startTime, String endTime)方法报错:"+e);
}
}
/**
* 过滤成功日志
*/
public List<RerturnGoodsOrderSearchData> filterData(List<RerturnGoodsOrderSearchData> returnGoodsOrders){
List<RerturnGoodsOrderSearchData> filterReturnGoodsOrders=new ArrayList<>();
for (RerturnGoodsOrderSearchData returnGoodsOrder : returnGoodsOrders) {
RerturnGoodsOrderSearchHeader header = returnGoodsOrder.getHeader();
String rootAppPk=header.getCode();
boolean isExis = true;
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setRootAppPk(rootAppPk);
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
List<IntegrationTaskLivingDetailsEntity> integrationTaskLivingDetailsEntities = iIntegrationTaskLivingDetailsDao.query(integrationTaskLivingDetailsEntity);
if (integrationTaskLivingDetailsEntities == null || integrationTaskLivingDetailsEntities.size() == 0) {
isExis = false;
}
if (!isExis) {
filterReturnGoodsOrders.add(returnGoodsOrder);
}
}
return filterReturnGoodsOrders;
}
/**
* 具体实现推送U8C红字应收单
*
* 公司+店铺+仓库+SKU+收发类别+部门 分组
*
* 因为优惠金额在表头先按单据便利一变具体分摊金额拆到每行在去汇总
*
*/
public void implement(List<RerturnGoodsOrderSearchData> filterReturnGoodsOrders){
//分摊后的明细
List<RerturnGoodsOrderSearchDetails> ofsDetails=new ArrayList<>();
// for (RerturnGoodsOrderSearchData returnGoodsOrder : filterReturnGoodsOrders) {
// System.out.println(returnGoodsOrder);
//
// String mapStr = "";
// String format = "";//暂时取创建时间refundAt没返回
// String response = "";
// String ofsCode = returnGoodsOrder.getHeader().getCode();
// String ofsId = returnGoodsOrder.getHeader().getId();
//
// try {
//
// ArapDjzbVO arapDjzbVO = new ArapDjzbVO();
// //主表 在表头先
// RerturnGoodsOrderSearchHeader header = returnGoodsOrder.getHeader();
// ArapDjzbVO.Parentt parentvo = new ArapDjzbVO.Parentt();
//
// //djrq 单据日期
// format = returnGoodsOrder.getHeader().getCreated();//暂时取创建时间refundAt没返回
// parentvo.setDjrq(format.substring(0,10));
// //dwbm 公司
// parentvo.setDwbm(header.getCompanyCode());
// //lrr 录入人
// parentvo.setLrr(OverallConstant.getOverAllValue("u8cApiZdrCode"));
//
// //wldx 往来对象标识 (0 客户 2部门 3业务员)
// //hbbm 客商
// //deptid 部门
// //ywybm 业务员编码
//
//
// //shr 审核人
// parentvo.setShr(OverallConstant.getOverAllValue("u8cApiZdrCode"));
// //shrq 审核日
// parentvo.setShrq(format.substring(0,10));
// //scomment 备注 returnNote 客服备注 sellerNote 卖家备注
// parentvo.setScomment(header.getReturnNote());
//
//
// //zyx1店铺
// parentvo.setZyx1(header.getStoreCode());
// //zyx2来源平台
// parentvo.setZyx2(header.getSourcePlatformCode());
// //zyx3 收发类别 ????
//
//
// //子表
// List<ArapDjzbVO.Childrenn> children=new ArrayList<>();
// List<RerturnGoodsOrderSearchDetails> details = returnGoodsOrder.getDetails();
// for (RerturnGoodsOrderSearchDetails ofsDetail : details) {
// ArapDjzbVO.Childrenn childrenn = new ArapDjzbVO.Childrenn();
//
// //cinventoryid 存货
//
// //jfbbje jfybje 借方本币金额/借方原币金额
// //jfbbsj jfybsj存货 借方本币税金/借方原币税金
// //wbfbbje jfybwsje 借方本币无税金额/借方原币无税金额
//
//
//
// //zyx4 平台优惠
// //zyx5 支付优惠
// //zyx6 达人优惠
// //zyx7 商家优惠
// children.add(childrenn);
// }
// arapDjzbVO.setParentvo(parentvo);
// arapDjzbVO.setChildren(children);
// System.out.println(arapDjzbVO);
// mapStr="{\"djzbvo\":["+ JSONUtil.toJsonStr(arapDjzbVO) +"]}";
//
//
//
//
// }catch (Exception e){
// e.printStackTrace();
// logger.error("推送U8C丽知售后订单(仅退款)--->U8C红字应收单失败失败原因" + e);
// //失败
// }
//
// }
}
/**
* ofs仅退款数据存中台mysql数据库
* 表头表体分别存忽略大小写 BeanUtil.copyPropreties(a,b,Copyoptions.create().ignoreCase())
* @param returnGoodsOrders
*/
public void saveOrUpdate(List<RerturnGoodsOrderSearchData> returnGoodsOrders){
// List<OnlyAfterSalesHEntity> allH=new ArrayList<>();
// List<OnlyAfterSalesBEntity> allB=new ArrayList<>();
for (RerturnGoodsOrderSearchData returnGoodsOrder : returnGoodsOrders) {
RerturnGoodsOrderSearchHeader header = returnGoodsOrder.getHeader();
OnlyAfterSalesHEntity onlyAfterSalesHEntity = new OnlyAfterSalesHEntity();
BeanUtil.copyProperties(header,onlyAfterSalesHEntity, CopyOptions.create().ignoreCase());
// allH.add(onlyAfterSalesHEntity);
onlyAfterSalesHEntity.setId(null);
onlyAfterSalesHEntity.setOfsid(header.getId());
OnlyAfterSalesHEntity save = onlyAfterSalesHDao.save(onlyAfterSalesHEntity);
String HId = save.getId();
List<RerturnGoodsOrderSearchDetails> details = returnGoodsOrder.getDetails();
for (RerturnGoodsOrderSearchDetails detail : details) {
OnlyAfterSalesBEntity onlyAfterSalesBEntity = new OnlyAfterSalesBEntity();
BeanUtil.copyProperties(detail,onlyAfterSalesBEntity, CopyOptions.create().ignoreCase());
// allB.add(onlyAfterSalesBEntity);
onlyAfterSalesBEntity.setId(null);
onlyAfterSalesBEntity.setHid(HId);
onlyAfterSalesBEntity.setOfsid(detail.getId());
onlyAfterSalesBDao.save(onlyAfterSalesBEntity);
}
}
}
/**
* 查询ofs仅退款订单 销售退货单查询ofs.returnOrder. search)
*
* 查询条件refundedAt_startrefundedAt_endcode
* returnType:0 不退货
* exchangeType:0 不换货
* refundInd:1 退款
*/
public List<RerturnGoodsOrderSearchData> queryOfsOnlyReturnOrders(QueryReturnOrderRequestVO queryReturnOrderRequestVO) throws Exception {
Long pageNo = 1L;
List<RerturnGoodsOrderSearchData> all=new ArrayList<>();
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
interfaceParamDto.setApi("ofs.returnOrder.search");
queryReturnOrderRequestVO.setClientCode("LETS");
//100订单池 500待同步 510已同步 900售后成功 400待合单 800已入库 999作废 700收货中 0待完善
// queryReturnOrderRequestVO.setStatus("900");
queryReturnOrderRequestVO.setPageNo(pageNo);
queryReturnOrderRequestVO.setPageSize(500L);
interfaceParamDto.setData(JSON.toJSONString(queryReturnOrderRequestVO));
RerturnGoodsOrderSearchJsonRootBean rerturnGoodsOrderSearchJsonRootBean =(RerturnGoodsOrderSearchJsonRootBean) ofsUnifiedService.unified(interfaceParamDto);
if (rerturnGoodsOrderSearchJsonRootBean.getData() == null || rerturnGoodsOrderSearchJsonRootBean.getData().size() == 0) {
return null;
}
all.addAll(rerturnGoodsOrderSearchJsonRootBean.getData());
int count = rerturnGoodsOrderSearchJsonRootBean.getData().size();
while (count >= 500) {//>=500,可能还有下一页
//还有下一页
pageNo++;
queryReturnOrderRequestVO.setPageNo(pageNo);
interfaceParamDto.setData(JSON.toJSONString(queryReturnOrderRequestVO));
RerturnGoodsOrderSearchJsonRootBean rerturnGoodsOrderSearchJsonRootBean1 =(RerturnGoodsOrderSearchJsonRootBean) ofsUnifiedService.unified(interfaceParamDto);
all.addAll(rerturnGoodsOrderSearchJsonRootBean1.getData());
count = rerturnGoodsOrderSearchJsonRootBean1.getData().size();
}
return all;
}
}

View File

@ -0,0 +1,163 @@
package com.hzya.frame.plugin.lets.u8cdto;
import lombok.Data;
import java.util.List;
/**
* 单据主表-应收应付
*/
@Data
public class ArapDjzbVO {
private Parentt parentvo;
private List<Childrenn> children;
@Data
public static class Parentt {
private String bfyhzh;//本方银行帐号付结单:付款银行账号;收结单:收款银行账号
private String bzbm;//币种
private String deinvdate;//开票日期
private String deptid;//部门
private String dfyhzh;//对方银行账号付结单:收款银行账号;收结单:付款银行账号
private String djbh;//单据号
private String djlxbm;//单据类型编码交易类型编码使用此字段如D0D1D2
private String djrq;//单据日期
private String dwbm;//公司
private String effectdate;//起算日期
private String feinvstatus;//开票状态
private String finvoicetype;//发票类型0 增值税专用发票 1 增值税普通发票 2 营业税发票 3 收据 4 其他发票 5 增值税电子普通发票
private String hbbm;//客商
private String isreded;//红冲
private String isselectedpay;//选择付款(1选择付款 0非选择付款)
private String kmbm;//科目编码v5.1开始传科目编码之前只能传主键
private String lrr;//录入人
private String lybz;//来源标志0 应收系统 1应付系统 3 销售系统 4 采购系统 5 资金结算 6 网上银行 8 票据管理 9 协同单据 10 信贷系统 11 汇兑损益系统 12 项目管理 13 全面预算 14 签字确认 15 发运管理 16 内部交易 17 外部交换平台 18 资金计息 19 库存管理
private String pj_jsfs;//结算方式
private String pj_num;//票据号
private String pk_glorgbook;//账簿编码v5.1开始支持
private String prepay;//预收付款标志
private String qcbz;//期初
private String scomment;//备注
private String shr;//审核人审批时必填
private String shrq;//审核日期审批时必填
private String szxmid;//收支项目
private String tradertype;//交易对象类型0 客商 1 部门 2 人员 3 散户
private String veinvcode;//发票代码
private String veinvnumber;//发票号码
private String vouchid;//表头主键(修改必填)
private String wldx;//往来对象标识(0 客户 1供应商 2部门 3业务员 )
private String xslxbm;//业务流程
private String ywybm;//业务员编码
private String zgyf;//暂估应付标志
private String zyx1;//自定义项1档案类型的传pk
private String zyx10;//自定义项10档案类型的传pk
private String zyx11;//自定义11档案类型的传pk
private String zyx12;//自定义12档案类型的传pk
private String zyx13;//自定义13档案类型的传pk
private String zyx14;//自定义14档案类型的传pk
private String zyx15;//自定义15档案类型的传pk
private String zyx16;//自定义16档案类型的传pk
private String zyx17;//自定义17档案类型的传pk
private String zyx18;//自定义18档案类型的传pk
private String zyx19;//自定义19档案类型的传pk
private String zyx2;//自定义项2档案类型的传pk
private String zyx20;//自定义20档案类型的传pk
private String zyx21;//自定义项21档案类型的传pk
private String zyx22;//自定义项22档案类型的传pk
private String zyx23;//自定义项23档案类型的传pk
private String zyx24;//自定义项24档案类型的传pk
private String zyx25;//自定义项25档案类型的传pk
private String zyx26;//自定义项26档案类型的传pk
private String zyx27;//自定义项27档案类型的传pk
private String zyx28;//自定义项28档案类型的传pk
private String zyx29;//自定义项29档案类型的传pk
private String zyx3;//自定义项3档案类型的传pk
private String zyx30;//自定义项30档案类型的传pk
private String zyx4;//自定义项4档案类型的传pk
private String zyx5;//自定义项5档案类型的传pk
private String zyx6;//自定义项6档案类型的传pk
private String zyx7;//自定义项7档案类型的传pk
private String zyx8;//自定义项8档案类型的传pk
private String zyx9;//自定义项9档案类型的传pk
}
@Data
public static class Childrenn {
private String bankrollprojet;//计划项目编码5.1开始支持
private String bfyhzh;//本方银行帐号
private String cashitem;//现金流量项目
private String cinventoryid;//存货
private String cksqsh;//源头单据表体主键
private String ddh;//订单号
private String ddhh;//上层来源单据表体主键
private String ddlx;//上层来源单据表头主键
private String deptid;//部门
private String dfbbje;//贷方本币金额
private String dfbbsj;//贷方本币税金
private String dfbbwsje;//贷方本币无税金额
private String dfshl;//贷方数量
private String dfybje;//贷方原币金额(应付收款时必填
private String dfybsj;//贷方原币税金
private String dfybwsje;//贷方原币无税金额
private String dfyhzh;//对方银行帐号
private String dj;//单价
private String fb_oid;//表体主键(修改必填)
private String fph;//发票号
private String hbbm;//合作伙伴客商编码
private String hsdj;//含税单价
private String item_bill_pk;//事项审批单PK
private String jfbbje;//借方本币金额
private String jfbbsj;//借方本币税金
private String jfshl;//借方数量
private String jfybje;//借方原币金额应收付款时必填注意传参时加双引号
private String jfybsj;//借方原币税金
private String jfybwsje;//借方原币无税金额
private String jobid;//专项
private String jsfsbm;//上层来源单据类型应付单类型D1应收单类型D0
private String kmbm;//科目编码v5.1开始传科目编码之前只能传主键
private String kslb;//扣税类别
private String notetype;//票据类型5.0sp添加
private String occupationmny;//预占用核销原币余额
private String ordercusmandoc;//订单客商
private String ph;//源头单据类型
private String sfkxyh;//收付款协议
private String sl;//税率
private String szxmid;//收支项目
private String wbfbbje;//借方本币无税金额
private String wldx;//往来对象标识(0 客户 1供应商 2部门 3业务员 )
private String xyzh;//源头单据表头主键
private String ywybm;//业务员编码5.0及以上支持
private String zy;//摘要
private String zyx1;//自定义项1档案类型的传pk
private String zyx10;//自定义项10档案类型的传pk
private String zyx11;//自定义项11档案类型的传pk
private String zyx12;//自定义项12档案类型的传pk
private String zyx13;//自定义项13档案类型的传pk
private String zyx14;//自定义项14档案类型的传pk
private String zyx15;//自定义项15档案类型的传pk
private String zyx16;//自定义项16档案类型的传pk
private String zyx17;//自定义项17档案类型的传pk
private String zyx18;//自定义项18档案类型的传pk
private String zyx19;//自定义项19档案类型的传pk
private String zyx2;//自定义项2档案类型的传pk
private String zyx20;//自定义项20档案类型的传pk
private String zyx21;//自定义项21档案类型的传pk
private String zyx22;//自定义项22档案类型的传pk
private String zyx23;//自定义项23档案类型的传pk
private String zyx24;//自定义项24档案类型的传pk
private String zyx25;//自定义项25档案类型的传pk
private String zyx26;//自定义项26档案类型的传pk
private String zyx27;//自定义项27档案类型的传pk
private String zyx28;//自定义项28档案类型的传pk
private String zyx29;//自定义项29档案类型的传pk
private String zyx3;//自定义项3档案类型的传pk
private String zyx30;//自定义项30档案类型的传pk
private String zyx4;//自定义项4档案类型的传pk
private String zyx5;//自定义项5档案类型的传pk
private String zyx6;//自定义项6档案类型的传pk
private String zyx7;//自定义项7档案类型的传pk
private String zyx8;//自定义项8档案类型的传pk
private String zyx9;//自定义项9档案类型的传pk
}
}

View File

@ -61,4 +61,7 @@
<bean name="bdSetpartDao" class="com.hzya.frame.plugin.lets.dao.impl.BdSetpartDaoImpl"/>
<bean name="bdCostsubjDaoImpl" class="com.hzya.frame.plugin.lets.dao.impl.BdCostsubjDaoImpl"/>
<bean name="onlyAfterSalesHDao" class="com.hzya.frame.plugin.lets.dao.impl.OnlyAfterSalesHDaoImpl"/>
<bean name="onlyAfterSalesBDao" class="com.hzya.frame.plugin.lets.dao.impl.OnlyAfterSalesBDaoImpl"/>
</beans>

View File

@ -29,7 +29,9 @@ public class BaseTest {
}
@Test
public void t01(){
skuPluginInitializer.start("test0717001");
// skuPluginInitializer.start("test0717001");
skuPluginInitializer.start("gdkfc778");
// skuPluginInitializer.start("6971229882248");
}
@Test
public void t02(){
@ -67,7 +69,7 @@ public class BaseTest {
/////////////////////////////////////////////////////////////////////////////////////实物组套
@Test
public void t30(){
kitPluginInitializer.start("test0717001");
kitPluginInitializer.start("666888");
}

View File

@ -2,6 +2,7 @@ package com.hzya.frame.plugin.lets.plugin.transfer;
import com.hzya.frame.WebappApplication;
import com.hzya.frame.plugin.lets.plugin.adjust.*;
import com.hzya.frame.plugin.lets.plugin.sales.RefundOnlyPluginInitializer;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@ -28,6 +29,8 @@ public class TransferTest {
private OtherOutPluginInitializer otherOutPluginInitializer;
@Autowired
private OtherInPluginInitializer otherInPluginInitializer;
@Autowired
private RefundOnlyPluginInitializer refundOnlyPluginInitializer;
////////////////////////////////////////////////////////////////////////////////////调拨订单
// @Test
@ -45,12 +48,12 @@ public class TransferTest {
@Test
public void t10(){
transferOutPluginInitializer.start("LETS-SH2024090400000005");
transferOutPluginInitializer.start("LETS-SH2024092000000005");
}
@Test
public void t11(){
transferOutPluginInitializer.start("2024-08-06","2024-08-11");
transferOutPluginInitializer.start("2024-09-20","2024-09-20");
}
@Test
public void t12() throws Exception {
@ -78,11 +81,11 @@ public class TransferTest {
@Test
public void t31(){
// adjustInPluginInitializer.start("LETS-RE2024091100000001");
adjustInPluginInitializer.start("LETS-RE2024091100000002");
adjustInPluginInitializer.start("LETS-RE2024092000000012");
}
@Test
public void t32(){
adjustInPluginInitializer.start("2024-08-14","2024-08-20");
adjustInPluginInitializer.start("2024-09-20","2024-09-20");
}
////////////////////////////////////////////////////////////////////////////////////调整出库单
@ -92,7 +95,7 @@ public class TransferTest {
}
@Test
public void t41(){
adjustOutPluginInitializer.start("LETS-SH2024090400000005");
adjustOutPluginInitializer.start("LETS-SH2024092000000004");
}
@Test
public void t42(){
@ -121,7 +124,15 @@ public class TransferTest {
////////////////////////////////////////////////////////////////////////////////////入库审核
@Test
public void t70(){
otherInPluginInitializer.start("TR2409130007");
otherInPluginInitializer.start("TR2409200003");
}
////////////////////////////////////////////////////////////////////////////////////入库审核
////////////////////////////////////////////////////////////////////////////////////仅退款
@Test
public void t80(){
refundOnlyPluginInitializer.start("LETS-RO2024012600005007");
}
////////////////////////////////////////////////////////////////////////////////////仅退款
}

View File

@ -1,9 +1,10 @@
/**
* Copyright 2024 bejson.com
*/
package com.hzya.frame.ttxofs.dto.returngoodordersearch;
import lombok.Data;
import java.math.BigDecimal;
/**
* Auto-generated: 2024-08-19 11:31:49
*