test(buildpackage): 更新测试代码并添加新功能

- 修改了ConsignmachiningCinfurmInTest中的测试代码,更新了订单号
- 新增了OfsPassiveorderDetailDaoImpl和OfsPassiveorderHeaderDaoImpl两个DAO实现类
- 新增了IOfsPassiveorderDetailDao和IOfsPassiveorderHeaderDao两个DAO接口
- 新增了OfsPassiveorderDetailDto数据传输对象类
- 新增了OfsPassiveorderDetailEntity实体类
This commit is contained in:
liuy 2025-03-14 18:51:46 +08:00
parent 16c3209043
commit 344de0fb40
13 changed files with 2123 additions and 12 deletions

View File

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

View File

@ -0,0 +1,23 @@
package com.hzya.frame.report.lets.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.report.lets.dto.OfsPassiveorderDetailDto;
import com.hzya.frame.report.lets.entity.OfsPassiveorderDetailEntity;
import java.util.List;
/**
* O无源件订单中台明细表(ofs_passiveorder_detail: table)表数据库访问层
*
* @author makejava
* @since 2025-03-12 09:40:26
*/
public interface IOfsPassiveorderDetailDao extends IBaseDao<OfsPassiveorderDetailEntity, String> {
/**
* 导出模式查询 sql
*
* @throws Exception 抛出可能的异常
* @author liuyang
*/
List<OfsPassiveorderDetailDto> queryPassiveComponentsExport(OfsPassiveorderDetailEntity ofsPassiveorderDetailEntity) throws Exception;
}

View File

@ -0,0 +1,14 @@
package com.hzya.frame.report.lets.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.report.lets.entity.OfsPassiveorderHeaderEntity;
/**
* O无源件订单中台主表(ofs_passiveorder_header: table)表数据库访问层
*
* @author makejava
* @since 2025-03-12 09:39:53
*/
public interface IOfsPassiveorderHeaderDao extends IBaseDao<OfsPassiveorderHeaderEntity, String> {
}

View File

@ -0,0 +1,24 @@
package com.hzya.frame.report.lets.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.report.lets.dao.IOfsPassiveorderDetailDao;
import com.hzya.frame.report.lets.dto.OfsPassiveorderDetailDto;
import com.hzya.frame.report.lets.entity.OfsPassiveorderDetailEntity;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* O无源件订单中台明细表(OfsPassiveorderDetail)表数据库访问层
*
* @author makejava
* @since 2025-03-12 09:40:26
*/
@Repository(value = "reportOfsPassiveorderDetailDao")
public class OfsPassiveorderDetailDaoImpl extends MybatisGenericDao<OfsPassiveorderDetailEntity, String> implements IOfsPassiveorderDetailDao {
@Override
public List<OfsPassiveorderDetailDto> queryPassiveComponentsExport(OfsPassiveorderDetailEntity ofsPassiveorderDetailEntity) throws Exception {
return (List<OfsPassiveorderDetailDto>) selectList("com.hzya.frame.report.lets.dao.impl.OfsPassiveorderDetailDaoImpl.entity_list_base_export", ofsPassiveorderDetailEntity);
}
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.report.lets.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.report.lets.dao.IOfsPassiveorderHeaderDao;
import com.hzya.frame.report.lets.entity.OfsPassiveorderHeaderEntity;
import org.springframework.stereotype.Repository;
/**
* O无源件订单中台主表(OfsPassiveorderHeader)表数据库访问层
*
* @author makejava
* @since 2025-03-12 09:39:53
*/
@Repository(value = "reportOfsPassiveorderHeaderDao")
public class OfsPassiveorderHeaderDaoImpl extends MybatisGenericDao<OfsPassiveorderHeaderEntity, String> implements IOfsPassiveorderHeaderDao {
}

View File

@ -0,0 +1,322 @@
package com.hzya.frame.report.lets.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import com.hzya.frame.web.entity.BaseEntity;
/**
* O无源件订单中台明细表(OfsPassiveorderDetail)实体类
*
* @author makejava
* @since 2025-03-12 09:40:26
*/
public class OfsPassiveorderDetailDto {
@ExcelProperty(value = "O无源入库明细主键")
private String id;
@ExcelProperty(value = "O无源入库单号")
private String receiptCode;
@ExcelProperty(value = "O公司")
private String companyCode;
@ExcelProperty(value = "O仓库")
private String facilityCode;
@ExcelProperty(value = "O店铺")
private String storeCode;
@ExcelProperty(value = "O关联时间")
private String relatedAt;
@ExcelProperty(value = "业务类型")
private String businesstype;
@ExcelProperty(value = "业务日期(关联时间)")
private String businessdate;
@ExcelProperty(value = "O货品sku")
private String skucode;
@ExcelProperty(value = "O货品名称")
private String skuname;
@ExcelProperty(value = "O入库数量")
private String quantity;
@ExcelProperty(value = "退款完成时间(取O售后订单表头)")
private String transactionDate;
@ExcelProperty(value = "退款推送时间")
private String newpushdate2;
@ExcelProperty(value = "退款报错详情")
private String newtransmitinfo2;
@ExcelProperty(value = "退款推送状态")
private String newstate2;
@ExcelProperty(value = "入库推送时间")
private String newpushdate;
@ExcelProperty(value = "入库报错详情")
private String newtransmitinfo;
@ExcelProperty(value = "入库推送状态")
private String newstate;
@ExcelProperty(value = "U销售订单编码")
private String newsystemnumber;
@ExcelProperty(value = "U销售订单主键")
private String newsystemprimary;
@ExcelProperty(value = "U应收单号")
private String newsystemnumber2;
@ExcelProperty(value = "U应收单主键")
private String newsystemprimary2;
@ExcelProperty(value = "O计算应收")
private String def1;
@ExcelProperty(value = "O计算公式")
private String def2;
@ExcelProperty(value = "O平台优惠")
private String def3;
@ExcelProperty(value = "O支付优惠")
private String def4;
@ExcelProperty(value = "O达人优惠")
private String def5;
@ExcelProperty(value = "O商家优惠")
private String def6;
public String getReceiptCode() {
return receiptCode;
}
public void setReceiptCode(String receiptCode) {
this.receiptCode = receiptCode;
}
public String getCompanyCode() {
return companyCode;
}
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
public String getFacilityCode() {
return facilityCode;
}
public void setFacilityCode(String facilityCode) {
this.facilityCode = facilityCode;
}
public String getStoreCode() {
return storeCode;
}
public void setStoreCode(String storeCode) {
this.storeCode = storeCode;
}
public String getRelatedAt() {
return relatedAt;
}
public void setRelatedAt(String relatedAt) {
this.relatedAt = relatedAt;
}
public String getBusinesstype() {
return businesstype;
}
public void setBusinesstype(String businesstype) {
this.businesstype = businesstype;
}
public String getBusinessdate() {
return businessdate;
}
public void setBusinessdate(String businessdate) {
this.businessdate = businessdate;
}
public String getSkucode() {
return skucode;
}
public void setSkucode(String skucode) {
this.skucode = skucode;
}
public String getSkuname() {
return skuname;
}
public void setSkuname(String skuname) {
this.skuname = skuname;
}
public String getQuantity() {
return quantity;
}
public void setQuantity(String quantity) {
this.quantity = quantity;
}
public String getTransactionDate() {
return transactionDate;
}
public void setTransactionDate(String transactionDate) {
this.transactionDate = transactionDate;
}
public String getNewpushdate2() {
return newpushdate2;
}
public void setNewpushdate2(String newpushdate2) {
this.newpushdate2 = newpushdate2;
}
public String getNewtransmitinfo2() {
return newtransmitinfo2;
}
public void setNewtransmitinfo2(String newtransmitinfo2) {
this.newtransmitinfo2 = newtransmitinfo2;
}
public String getNewstate2() {
return newstate2;
}
public void setNewstate2(String newstate2) {
this.newstate2 = newstate2;
}
public String getNewpushdate() {
return newpushdate;
}
public void setNewpushdate(String newpushdate) {
this.newpushdate = newpushdate;
}
public String getNewtransmitinfo() {
return newtransmitinfo;
}
public void setNewtransmitinfo(String newtransmitinfo) {
this.newtransmitinfo = newtransmitinfo;
}
public String getNewstate() {
return newstate;
}
public void setNewstate(String newstate) {
this.newstate = newstate;
}
public String getNewsystemnumber() {
return newsystemnumber;
}
public void setNewsystemnumber(String newsystemnumber) {
this.newsystemnumber = newsystemnumber;
}
public String getNewsystemprimary() {
return newsystemprimary;
}
public void setNewsystemprimary(String newsystemprimary) {
this.newsystemprimary = newsystemprimary;
}
public String getNewsystemnumber2() {
return newsystemnumber2;
}
public void setNewsystemnumber2(String newsystemnumber2) {
this.newsystemnumber2 = newsystemnumber2;
}
public String getNewsystemprimary2() {
return newsystemprimary2;
}
public void setNewsystemprimary2(String newsystemprimary2) {
this.newsystemprimary2 = newsystemprimary2;
}
public String getDef1() {
return def1;
}
public void setDef1(String def1) {
this.def1 = def1;
}
public String getDef2() {
return def2;
}
public void setDef2(String def2) {
this.def2 = def2;
}
public String getDef3() {
return def3;
}
public void setDef3(String def3) {
this.def3 = def3;
}
public String getDef4() {
return def4;
}
public void setDef4(String def4) {
this.def4 = def4;
}
public String getDef5() {
return def5;
}
public void setDef5(String def5) {
this.def5 = def5;
}
public String getDef6() {
return def6;
}
public void setDef6(String def6) {
this.def6 = def6;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}

View File

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

View File

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

View File

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

View File

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

View File

@ -37,4 +37,18 @@ public interface ITocofsSaleoutService extends IBaseService<TocofsSaleoutEntity,
* @author liuyang
*/
JsonResultEntity exportToCReturnReportExcel(JSONObject jsonObject) throws Exception;
/**
* 查询无源件推送数据包含 TOBTOC 入库交易成功
*
* @author liuyang
*/
JsonResultEntity queryPassiveComponentsReport(JSONObject jsonObject) throws Exception;
/**
* 导出无源件推送数据包含 TOBTOC 入库交易成功生成 Excel
*
* @author liuyang
*/
JsonResultEntity queryPassiveComponentsReportExcel(JSONObject jsonObject) throws Exception;
}

View File

@ -7,17 +7,9 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.page.PageAttribute;
import com.hzya.frame.report.lets.dao.ITocofsReturngoodsDetailedDao;
import com.hzya.frame.report.lets.dao.ITocofsSaleoutDao;
import com.hzya.frame.report.lets.dao.ITocofsSaleoutDetailedDao;
import com.hzya.frame.report.lets.dto.TobofsReturnGoodsDetailedDto;
import com.hzya.frame.report.lets.dto.TobofsSaleoutDetailedDto;
import com.hzya.frame.report.lets.dto.TocofsReturnGoodsDetailedDto;
import com.hzya.frame.report.lets.dto.TocofsSaleoutDetailedDto;
import com.hzya.frame.report.lets.entity.TocofsReturngoodsDetailedEntity;
import com.hzya.frame.report.lets.entity.TocofsReturngoodsEntity;
import com.hzya.frame.report.lets.entity.TocofsSaleoutDetailedEntity;
import com.hzya.frame.report.lets.entity.TocofsSaleoutEntity;
import com.hzya.frame.report.lets.dao.*;
import com.hzya.frame.report.lets.dto.*;
import com.hzya.frame.report.lets.entity.*;
import com.hzya.frame.report.lets.service.ITocofsSaleoutService;
import com.hzya.frame.uuid.UUIDLong;
import com.hzya.frame.web.entity.BaseResult;
@ -48,6 +40,12 @@ public class TocofsSaleoutServiceImpl extends BaseService<TocofsSaleoutEntity, S
@Autowired
private ITocofsReturngoodsDetailedDao iTocofsReturngoodsDetailedDao;
@Autowired
private IOfsPassiveorderHeaderDao iOfsPassiveorderHeaderDao;
@Autowired
private IOfsPassiveorderDetailDao iOfsPassiveorderDetailDao;
@Autowired
public void setTocofsSaleoutDao(ITocofsSaleoutDao dao) {
this.tocofsSaleoutDao = dao;
@ -402,4 +400,90 @@ public class TocofsSaleoutServiceImpl extends BaseService<TocofsSaleoutEntity, S
}
return BaseResult.getFailureMessageEntity("生成TOC、TOB销售业务对应的Excel文件失败");
}
@Override
public JsonResultEntity queryPassiveComponentsReport(JSONObject jsonObject) throws Exception {
Assert.notNull(jsonObject, "jsonObject不能为空");
JSONObject jsonStr = getstrObj("jsonStr", jsonObject);
//提供两种模式查询模式 query导出模式 excel
String qType = jsonStr.getString("qType");
//业务类型TOBTOC
String businessType = jsonStr.getString("businesstype");
Assert.notNull(businessType, "businesstype不能为空!");
//关联时间范围
String businessDateStart = jsonStr.getString("businessDateStart");
String businessDateEnd = jsonStr.getString("businessDateEnd");
if (businessDateStart != null) {
businessDateStart += " 00:00:00";
}
if (businessDateEnd != null) {
businessDateEnd += " 23:59:59";
}
//入库推送状态
String newState = jsonStr.getString("newstate");
//退款完成状态状态
String newState2 = jsonStr.getString("newstate2");
OfsPassiveorderDetailEntity ofsPassiveorderDetailEntity = new OfsPassiveorderDetailEntity();
ofsPassiveorderDetailEntity.setNewstate(newState);
ofsPassiveorderDetailEntity.setNewstate2(newState2);
ofsPassiveorderDetailEntity.setBusinessDateStart(businessDateStart);
ofsPassiveorderDetailEntity.setBusinessDateEnd(businessDateEnd);
ofsPassiveorderDetailEntity.setBusinesstype(businessType);
if (qType == null || "".equals(qType.trim()) || "query".equals(qType.trim())) {
//分页模式
String pageNum = jsonStr.getString("pageNum");
String pageSize = jsonStr.getString("pageSize");
Assert.notNull(pageNum, "pageNum不能为空");
Assert.notNull(pageSize, "pageSize不能为空");
ofsPassiveorderDetailEntity.setPageNum(Integer.valueOf(pageNum));
ofsPassiveorderDetailEntity.setPageSize(Integer.valueOf(pageSize));
PageHelper.startPage(ofsPassiveorderDetailEntity.getPageNum(), ofsPassiveorderDetailEntity.getPageSize());
List<OfsPassiveorderDetailEntity> ofsPassiveorderHeaderEntityList = iOfsPassiveorderDetailDao.query(ofsPassiveorderDetailEntity);
PageInfo pageInfo = new PageInfo(ofsPassiveorderHeaderEntityList);
return BaseResult.getSuccessMessageEntity("查询成功", pageInfo);
} else if ("excel".equals(qType)) {
//导出模式
List<OfsPassiveorderDetailDto> ofsPassiveorderDetailDtos = new ArrayList<>();
try {
ofsPassiveorderDetailDtos = iOfsPassiveorderDetailDao.queryPassiveComponentsExport(ofsPassiveorderDetailEntity);
} catch (Exception e) {
logger.error("导出模式下,查询目标数据失败!", e);
}
return BaseResult.getSuccessMessageEntity("查询成功", ofsPassiveorderDetailDtos);
} else {
return BaseResult.getFailureMessageEntity("查询失败,无法确定查询模式!请选择:查询模式 query、导出模式 excel");
}
}
@Override
public JsonResultEntity queryPassiveComponentsReportExcel(JSONObject jsonObject) throws Exception {
Assert.notNull(jsonObject, "jsonObject不能为空");
JSONObject jsonStr = getstrObj("jsonStr", jsonObject);
Assert.notNull(jsonStr, "jsonStr对象不能为空");
jsonStr.put("qType", "excel");
jsonObject.put("jsonStr", jsonStr);
JsonResultEntity jsonResultEntity = queryPassiveComponentsReport(jsonObject);
if (jsonResultEntity != null && jsonResultEntity.getAttribute() != null) {
InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream(reportTemplatesurl);
String[] excelFile = createExcelFile();
List<OfsPassiveorderDetailDto> tocofsSaleoutDetailedEntityList = (List<OfsPassiveorderDetailDto>) jsonResultEntity.getAttribute();
EasyExcel.write(excelFile[0], OfsPassiveorderDetailDto.class).withTemplate(templateFileName).sheet().doWrite(tocofsSaleoutDetailedEntityList);
return BaseResult.getSuccessMessageEntity(excelFile[1]);
} else {
return BaseResult.getFailureMessageEntity("导出Excel查询数据失败");
}
}
}

View File

@ -148,6 +148,14 @@ public class OfsUnifiedServiceImpl implements OfsUnifiedService {
//创建自定义的httpclient对象
CloseableHttpClient client = HttpClients.custom().build();
HttpPost post = new HttpPost(url);
// 设置超时参数10分钟
RequestConfig requestConfig = RequestConfig.custom()
.setConnectTimeout(600000)
.setSocketTimeout(600000)
.setConnectionRequestTimeout(600000)
.build();
post.setConfig(requestConfig);
CloseableHttpResponse res = null;
try {
List<NameValuePair> nvps = new ArrayList<NameValuePair>();