refactor(sales): 暂停 TOC 销售库存和交易推送
- 注释掉 SoSaleOutPluginInitializerToC 类中的库存和交易推送代码 - 新增 TOCOFS 退货查询相关接口和 DTO 类 - 优化 TocofsReturngoodsDetailedDaoImpl 类,实现新的查询方法
This commit is contained in:
parent
96a34e8319
commit
edbde2edb1
|
@ -150,8 +150,9 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
//默认被定时器执行,每天晚上凌晨0点5分
|
||||
//暂定先同步TOC销售库存、再推送TOC销售确认收入
|
||||
List<StartAndEndVo> startAndEndVos = calculateCalculateEntireDayPeriod(null);
|
||||
startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||
startImplementTranByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||
//TODO 1~4号暂时不推送
|
||||
// startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||
// startImplementTranByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.hzya.frame.report.lets.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.report.lets.dto.TobofsReturnGoodsDetailedDto;
|
||||
import com.hzya.frame.report.lets.dto.TocofsReturnGoodsDetailedDto;
|
||||
import com.hzya.frame.report.lets.entity.TocofsReturngoodsDetailedEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -12,4 +14,18 @@ import java.util.List;
|
|||
* @since 2024-09-13 11:58:26
|
||||
*/
|
||||
public interface ITocofsReturngoodsDetailedDao extends IBaseDao<TocofsReturngoodsDetailedEntity, String> {
|
||||
/**
|
||||
* 查询 采用==查询,适用toc
|
||||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
List<TocofsReturnGoodsDetailedDto> queryEntityListBaseToc(TocofsReturngoodsDetailedEntity tocofsReturngoodsDetailedEntity) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* 查询 采用==查询,适用tob
|
||||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
List<TobofsReturnGoodsDetailedDto> queryEntityListBaseTob(TocofsReturngoodsDetailedEntity tocofsReturngoodsDetailedEntity) throws Exception;
|
||||
}
|
|
@ -2,6 +2,8 @@ package com.hzya.frame.report.lets.dao.impl;
|
|||
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.report.lets.dao.ITocofsReturngoodsDetailedDao;
|
||||
import com.hzya.frame.report.lets.dto.TobofsReturnGoodsDetailedDto;
|
||||
import com.hzya.frame.report.lets.dto.TocofsReturnGoodsDetailedDto;
|
||||
import com.hzya.frame.report.lets.entity.TocofsReturngoodsDetailedEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
|
@ -15,5 +17,14 @@ import java.util.List;
|
|||
*/
|
||||
@Repository(value = "tocofsReturngoodsDetailedDaoImplReport")
|
||||
public class TocofsReturngoodsDetailedDaoImpl extends MybatisGenericDao<TocofsReturngoodsDetailedEntity, String> implements ITocofsReturngoodsDetailedDao {
|
||||
@Override
|
||||
public List<TocofsReturnGoodsDetailedDto> queryEntityListBaseToc(TocofsReturngoodsDetailedEntity tocofsReturngoodsDetailedEntity) throws Exception {
|
||||
return (List<TocofsReturnGoodsDetailedDto>) selectList("com.hzya.frame.report.lets.dao.impl.TocofsReturngoodsDetailedDaoImpl.entity_list_base_toc", tocofsReturngoodsDetailedEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TobofsReturnGoodsDetailedDto> queryEntityListBaseTob(TocofsReturngoodsDetailedEntity tocofsReturngoodsDetailedEntity) throws Exception {
|
||||
return (List<TobofsReturnGoodsDetailedDto>) selectList("com.hzya.frame.report.lets.dao.impl.TocofsReturngoodsDetailedDaoImpl.entity_list_base_tob", tocofsReturngoodsDetailedEntity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
package com.hzya.frame.report.lets.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* TOC退货Excel报表导出
|
||||
*
|
||||
* @Author:liuyang
|
||||
* @Package:com.hzya.frame.report.lets.dto
|
||||
* @Project:kangarooDataCenterV3
|
||||
* @name:TocofsSaleoutDetailedDto
|
||||
* @Date:2024/10/30 14:59
|
||||
* @Filename:TocofsSaleoutDetailedDto
|
||||
*/
|
||||
@Data
|
||||
public class TobofsReturnGoodsDetailedDto {
|
||||
|
||||
@ExcelProperty(value = "O入库单明细主键")
|
||||
private String id;
|
||||
@ExcelProperty(value = "O货主编码")
|
||||
private String headCompanyCode;
|
||||
@ExcelProperty(value = "O仓库编码")
|
||||
private String headFacilityCode;
|
||||
@ExcelProperty(value = "O平台编码")
|
||||
private String headSourcePlatformCode;
|
||||
@ExcelProperty(value = "O店铺编码")
|
||||
private String headStoreCode;
|
||||
@ExcelProperty(value = "O售后入库单编码")
|
||||
private String headCode;
|
||||
@ExcelProperty(value = "O中台业务类型")
|
||||
private String businessType;
|
||||
@ExcelProperty(value = "O货品sku")
|
||||
private String skuCode;
|
||||
@ExcelProperty(value = "O货品名称")
|
||||
private String skuName;
|
||||
@ExcelProperty(value = "O实入数量")
|
||||
private String receivedQty;
|
||||
|
||||
//TOC退货-库存 开始
|
||||
@ExcelProperty(value = "O退货入库时间")
|
||||
private String businessDate;
|
||||
@ExcelProperty(value = "库存-报错详情")
|
||||
private String newTransmitInfo;
|
||||
@ExcelProperty(value = "库存-推送时间")
|
||||
private String newPushDate;
|
||||
@ExcelProperty(value = "库存-推送状态")
|
||||
private String newState;
|
||||
@ExcelProperty(value = "库存-U8C单号")
|
||||
private String newSystemNumber;
|
||||
@ExcelProperty(value = "库存-U8C主键")
|
||||
private String newSystemPrimary;
|
||||
//TOC退货-库存 结束
|
||||
|
||||
//TOC退货-交易成功 开始
|
||||
@ExcelProperty(value = "O退款完成时间")
|
||||
private String refundedAt;
|
||||
@ExcelProperty(value = "交易成功-报错详情")
|
||||
private String newTransmitInfo2;
|
||||
@ExcelProperty(value = "交易成功-推送时间")
|
||||
private String newPushDate2;
|
||||
@ExcelProperty(value = "交易成功-推送状态")
|
||||
private String newState2;
|
||||
@ExcelProperty(value = "交易成功-下游单号")
|
||||
private String newSystemNumber2;
|
||||
@ExcelProperty(value = "交易成功-下游主键")
|
||||
private String newSystemPrimary2;
|
||||
//TOC退货-交易成功 结束
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package com.hzya.frame.report.lets.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* TOC退货Excel报表导出
|
||||
*
|
||||
* @Author:liuyang
|
||||
* @Package:com.hzya.frame.report.lets.dto
|
||||
* @Project:kangarooDataCenterV3
|
||||
* @name:TocofsSaleoutDetailedDto
|
||||
* @Date:2024/10/30 14:59
|
||||
* @Filename:TocofsSaleoutDetailedDto
|
||||
*/
|
||||
@Data
|
||||
public class TocofsReturnGoodsDetailedDto {
|
||||
|
||||
@ExcelProperty(value = "O入库单明细主键")
|
||||
private String id;
|
||||
@ExcelProperty(value = "O货主编码")
|
||||
private String headCompanyCode;
|
||||
@ExcelProperty(value = "O仓库编码")
|
||||
private String headFacilityCode;
|
||||
@ExcelProperty(value = "O平台编码")
|
||||
private String headSourcePlatformCode;
|
||||
@ExcelProperty(value = "O店铺编码")
|
||||
private String headStoreCode;
|
||||
@ExcelProperty(value = "O售后入库单编码")
|
||||
private String headCode;
|
||||
@ExcelProperty(value = "O中台业务类型")
|
||||
private String businessType;
|
||||
@ExcelProperty(value = "O货品sku")
|
||||
private String skuCode;
|
||||
@ExcelProperty(value = "O货品名称")
|
||||
private String skuName;
|
||||
@ExcelProperty(value = "O实入数量")
|
||||
private String receivedQty;
|
||||
|
||||
//TOC退货-库存 开始
|
||||
@ExcelProperty(value = "O退货入库时间")
|
||||
private String businessDate;
|
||||
@ExcelProperty(value = "库存-报错详情")
|
||||
private String newTransmitInfo3;
|
||||
@ExcelProperty(value = "库存-推送时间")
|
||||
private String newPushDate3;
|
||||
@ExcelProperty(value = "库存-推送状态")
|
||||
private String newState3;
|
||||
@ExcelProperty(value = "库存-U8C单号")
|
||||
private String newSystemNumber3;
|
||||
@ExcelProperty(value = "库存-U8C主键")
|
||||
private String newSystemPrimary3;
|
||||
//TOC退货-库存 结束
|
||||
|
||||
//TOC退货-交易成功 开始
|
||||
@ExcelProperty(value = "O退款完成时间")
|
||||
private String refundedAt;
|
||||
@ExcelProperty(value = "交易成功-报错详情")
|
||||
private String newTransmitInfo4;
|
||||
@ExcelProperty(value = "交易成功-推送时间")
|
||||
private String newPushDate4;
|
||||
@ExcelProperty(value = "交易成功-推送状态")
|
||||
private String newState4;
|
||||
@ExcelProperty(value = "交易成功-下游单号")
|
||||
private String newSystemNumber4;
|
||||
@ExcelProperty(value = "交易成功-下游主键")
|
||||
private String newSystemPrimary4;
|
||||
//TOC退货-交易成功 结束
|
||||
}
|
|
@ -204,6 +204,7 @@
|
|||
,def40
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-TocofsReturngoodsDetailedEntity-result" parameterType = "com.hzya.frame.report.lets.entity.TocofsReturngoodsDetailedEntity">
|
||||
select
|
||||
|
@ -437,6 +438,552 @@
|
|||
<!-- <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>
|
||||
|
||||
|
||||
|
||||
<resultMap id="get-TocofsReturngoodsDetailedEntity-result-toc" type="com.hzya.frame.report.lets.dto.TocofsReturnGoodsDetailedDto" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="headCompanyCode" column="headCompanyCode" jdbcType="VARCHAR"/>
|
||||
<result property="headFacilityCode" column="headFacilityCode" jdbcType="VARCHAR"/>
|
||||
<result property="headSourcePlatformCode" column="headSourcePlatformCode" jdbcType="VARCHAR"/>
|
||||
<result property="headStoreCode" column="headStoreCode" jdbcType="VARCHAR"/>
|
||||
<result property="headCode" column="headCode" jdbcType="VARCHAR"/>
|
||||
<result property="businessType" column="businessType" jdbcType="VARCHAR"/>
|
||||
<result property="skuCode" column="skuCode" jdbcType="VARCHAR"/>
|
||||
<result property="skuName" column="skuName" jdbcType="VARCHAR"/>
|
||||
<result property="receivedQty" column="receivedQty" jdbcType="VARCHAR"/>
|
||||
|
||||
<result property="businessDate" column="businessDate" jdbcType="VARCHAR"/>
|
||||
<result property="newTransmitInfo3" column="newTransmitInfo3" jdbcType="VARCHAR"/>
|
||||
<result property="newPushDate3" column="newPushDate3" jdbcType="VARCHAR"/>
|
||||
<result property="newState3" column="newState3" jdbcType="VARCHAR"/>
|
||||
<result property="newSystemNumber3" column="newSystemNumber3" jdbcType="VARCHAR"/>
|
||||
<result property="newSystemPrimary3" column="newSystemPrimary3" jdbcType="VARCHAR"/>
|
||||
|
||||
<result property="refundedAt" column="refundedAt" jdbcType="VARCHAR"/>
|
||||
<result property="newTransmitInfo4" column="newTransmitInfo4" jdbcType="VARCHAR"/>
|
||||
<result property="newPushDate4" column="newPushDate4" jdbcType="VARCHAR"/>
|
||||
<result property="newState4" column="newState4" jdbcType="VARCHAR"/>
|
||||
<result property="newSystemNumber4" column="newSystemNumber4" jdbcType="VARCHAR"/>
|
||||
<result property="newSystemPrimary4" column="newSystemPrimary4" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 查询 采用==查询,适用toc -->
|
||||
<select id="entity_list_base_toc" resultMap="get-TocofsReturngoodsDetailedEntity-result-toc" parameterType = "com.hzya.frame.report.lets.entity.TocofsReturngoodsDetailedEntity">
|
||||
select
|
||||
a.id
|
||||
,a.receiptId
|
||||
,a.receiptCode
|
||||
,a.refOrderId
|
||||
,a.refOrderDetailId
|
||||
,a.sourceOrderCode
|
||||
,a.sourceLineNum
|
||||
,a.clientCode
|
||||
,a.companyCode
|
||||
,a.facilityCode
|
||||
,a.skuCode
|
||||
,a.skuName
|
||||
,a.requestQty
|
||||
,a.receivedQty
|
||||
,a.openQty
|
||||
,a.quantityUM
|
||||
,a.totalWeight
|
||||
,a.totalVolume
|
||||
,a.totalVolumeWeight
|
||||
,a.totalAmount
|
||||
,a.weightUM
|
||||
,a.volumeUM
|
||||
,a.inventorySts
|
||||
,a.inTransInvId
|
||||
,a.closed
|
||||
,a.created
|
||||
,a.createdBy
|
||||
,a.lastUpdated
|
||||
,a.lastUpdatedBy
|
||||
,a.discountPrice
|
||||
,a.mainTableId
|
||||
,a.newTransmitInfo
|
||||
,a.newPushDate
|
||||
,a.newState
|
||||
,a.newSystemNumber
|
||||
,a.newSystemPrimary
|
||||
,a.newTransmitInfo2
|
||||
,a.newPushDate2
|
||||
,a.newState2
|
||||
,a.newSystemNumber2
|
||||
,a.newSystemPrimary2
|
||||
,a.newTransmitInfo3
|
||||
,a.newPushDate3
|
||||
,a.newState3
|
||||
,a.newSystemNumber3
|
||||
,a.newSystemPrimary3
|
||||
,a.newTransmitInfo4
|
||||
,a.newPushDate4
|
||||
,a.newState4
|
||||
,a.newSystemNumber4
|
||||
,a.newSystemPrimary4
|
||||
,a.businessDate
|
||||
,a.refundedAt
|
||||
,a.businessType
|
||||
,a.def1
|
||||
,a.def2
|
||||
,a.def3
|
||||
,a.def4
|
||||
,a.def5
|
||||
,a.def6
|
||||
,a.def7
|
||||
,a.def8
|
||||
,a.def9
|
||||
,a.def10
|
||||
,a.def11
|
||||
,a.def12
|
||||
,a.def13
|
||||
,a.def14
|
||||
,a.def15
|
||||
,a.def16
|
||||
,a.def17
|
||||
,a.def18
|
||||
,a.def19
|
||||
,a.def20
|
||||
,a.def21
|
||||
,a.def22
|
||||
,a.def23
|
||||
,a.def24
|
||||
,a.def25
|
||||
,a.def26
|
||||
,a.def27
|
||||
,a.def28
|
||||
,a.def29
|
||||
,a.def30
|
||||
,a.def31
|
||||
,a.def32
|
||||
,a.def33
|
||||
,a.def34
|
||||
,a.def35
|
||||
,a.def36
|
||||
,a.def37
|
||||
,a.def38
|
||||
,a.def39
|
||||
,a.def40
|
||||
,b.companyCode headCompanyCode
|
||||
,b.facilityCode headFacilityCode
|
||||
,b.storeCode headStoreCode
|
||||
,b.sourcePlatformCode headSourcePlatformCode
|
||||
,b.code headCode
|
||||
from tocofs_returngoods_detailed a left join tocofs_returngoods b on b.id = a.mainTableId
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and a.id = #{id} </if>
|
||||
<if test="receiptid != null and receiptid != ''"> and a.receiptId = #{receiptid} </if>
|
||||
<if test="receiptcode != null and receiptcode != ''"> and a.receiptCode = #{receiptcode} </if>
|
||||
<if test="reforderid != null and reforderid != ''"> and a.refOrderId = #{reforderid} </if>
|
||||
<if test="reforderdetailid != null and reforderdetailid != ''"> and a.refOrderDetailId = #{reforderdetailid} </if>
|
||||
<if test="sourceordercode != null and sourceordercode != ''"> and a.sourceOrderCode = #{sourceordercode} </if>
|
||||
<if test="sourcelinenum != null and sourcelinenum != ''"> and a.sourceLineNum = #{sourcelinenum} </if>
|
||||
<if test="clientcode != null and clientcode != ''"> and a.clientCode = #{clientcode} </if>
|
||||
<if test="companycode != null and companycode != ''"> and a.companyCode = #{companycode} </if>
|
||||
<if test="facilitycode != null and facilitycode != ''"> and a.facilityCode = #{facilitycode} </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="requestqty != null and requestqty != ''"> and a.requestQty = #{requestqty} </if>
|
||||
<if test="receivedqty != null and receivedqty != ''"> and a.receivedQty = #{receivedqty} </if>
|
||||
<if test="openqty != null and openqty != ''"> and a.openQty = #{openqty} </if>
|
||||
<if test="quantityum != null and quantityum != ''"> and a.quantityUM = #{quantityum} </if>
|
||||
<if test="totalweight != null and totalweight != ''"> and a.totalWeight = #{totalweight} </if>
|
||||
<if test="totalvolume != null and totalvolume != ''"> and a.totalVolume = #{totalvolume} </if>
|
||||
<if test="totalvolumeweight != null and totalvolumeweight != ''"> and a.totalVolumeWeight = #{totalvolumeweight} </if>
|
||||
<if test="totalamount != null and totalamount != ''"> and a.totalAmount = #{totalamount} </if>
|
||||
<if test="weightum != null and weightum != ''"> and a.weightUM = #{weightum} </if>
|
||||
<if test="volumeum != null and volumeum != ''"> and a.volumeUM = #{volumeum} </if>
|
||||
<if test="inventorysts != null and inventorysts != ''"> and a.inventorySts = #{inventorysts} </if>
|
||||
<if test="intransinvid != null and intransinvid != ''"> and a.inTransInvId = #{intransinvid} </if>
|
||||
<if test="closed != null and closed != ''"> and a.closed = #{closed} </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="discountprice != null and discountprice != ''"> and a.discountPrice = #{discountprice} </if>
|
||||
<if test="maintableid != null and maintableid != ''"> and a.mainTableId = #{maintableid} </if>
|
||||
<if test="newtransmitinfo != null and newtransmitinfo != ''"> and a.newTransmitInfo = #{newtransmitinfo} </if>
|
||||
|
||||
<if test="newpushdate != null and newpushdate != ''"> and LEFT(a.newPushDate,10) = #{newpushdate} </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="newtransmitinfo2 != null and newtransmitinfo2 != ''"> and a.newTransmitInfo2 = #{newtransmitinfo2} </if>
|
||||
|
||||
<if test="newpushdate2 != null and newpushdate2 != ''"> and LEFT(a.newPushDate2,10) = #{newpushdate2} </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="newtransmitinfo3 != null and newtransmitinfo3 != ''"> and a.newTransmitInfo3 = #{newtransmitinfo3} </if>
|
||||
|
||||
<if test="newpushdate3 != null and newpushdate3 != ''"> and LEFT(a.newPushDate3,10) = #{newpushdate3} </if>
|
||||
|
||||
<if test="newstate3 != null and newstate3 != ''"> and a.newState3 = #{newstate3} </if>
|
||||
<if test="newsystemnumber3 != null and newsystemnumber3 != ''"> and a.newSystemNumber3 = #{newsystemnumber3} </if>
|
||||
<if test="newsystemprimary3 != null and newsystemprimary3 != ''"> and a.newSystemPrimary3 = #{newsystemprimary3} </if>
|
||||
<if test="newtransmitinfo4 != null and newtransmitinfo4 != ''"> and a.newTransmitInfo4 = #{newtransmitinfo4} </if>
|
||||
|
||||
<if test="newpushdate4 != null and newpushdate4 != ''"> and LEFT(a.newPushDate4,10) = #{newpushdate4} </if>
|
||||
|
||||
<if test="newstate4 != null and newstate4 != ''"> and a.newState4 = #{newstate4} </if>
|
||||
<if test="newsystemnumber4 != null and newsystemnumber4 != ''"> and a.newSystemNumber4 = #{newsystemnumber4} </if>
|
||||
<if test="newsystemprimary4 != null and newsystemprimary4 != ''"> and a.newSystemPrimary4 = #{newsystemprimary4} </if>
|
||||
<if test="businessdate != null and businessdate != ''"> and a.businessDate = #{businessdate} </if>
|
||||
<if test="refundedat != null and refundedat != ''"> and a.refundedAt = #{refundedat} </if>
|
||||
|
||||
<if test="businesstype != null and businesstype != ''"> and a.businessType = #{businesstype} </if>
|
||||
|
||||
|
||||
<if test="businessdate_start!=null and businessdate_start!=''">
|
||||
and a.businessDate >= #{businessdate_start}
|
||||
</if>
|
||||
<if test="businessdate_end!=null and businessdate_end!=''">
|
||||
and a.businessDate <= #{businessdate_end}
|
||||
</if>
|
||||
<if test="refundedAt_start!=null and refundedAt_start!=''">
|
||||
and a.refundedAt >= #{refundedAt_start}
|
||||
</if>
|
||||
<if test="refundedAt_end!=null and refundedAt_end!=''">
|
||||
and a.refundedAt <= #{refundedAt_end}
|
||||
</if>
|
||||
<if test="headCode!=null and headCode!=''">
|
||||
and b.code = #{headCode}
|
||||
</if>
|
||||
|
||||
<if test="def1 != null and def1 != ''"> and a.def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> and a.def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> and a.def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> and a.def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> and a.def5 = #{def5} </if>
|
||||
<if test="def6 != null and def6 != ''"> and a.def6 = #{def6} </if>
|
||||
<if test="def7 != null and def7 != ''"> and a.def7 = #{def7} </if>
|
||||
<if test="def8 != null and def8 != ''"> and a.def8 = #{def8} </if>
|
||||
<if test="def9 != null and def9 != ''"> and a.def9 = #{def9} </if>
|
||||
<if test="def10 != null and def10 != ''"> and a.def10 = #{def10} </if>
|
||||
<if test="def11 != null and def11 != ''"> and a.def11 = #{def11} </if>
|
||||
<if test="def12 != null and def12 != ''"> and a.def12 = #{def12} </if>
|
||||
<if test="def13 != null and def13 != ''"> and a.def13 = #{def13} </if>
|
||||
<if test="def14 != null and def14 != ''"> and a.def14 = #{def14} </if>
|
||||
<if test="def15 != null and def15 != ''"> and a.def15 = #{def15} </if>
|
||||
<if test="def16 != null and def16 != ''"> and a.def16 = #{def16} </if>
|
||||
<if test="def17 != null and def17 != ''"> and a.def17 = #{def17} </if>
|
||||
<if test="def18 != null and def18 != ''"> and a.def18 = #{def18} </if>
|
||||
<if test="def19 != null and def19 != ''"> and a.def19 = #{def19} </if>
|
||||
<if test="def20 != null and def20 != ''"> and a.def20 = #{def20} </if>
|
||||
<if test="def21 != null and def21 != ''"> and a.def21 = #{def21} </if>
|
||||
<if test="def22 != null and def22 != ''"> and a.def22 = #{def22} </if>
|
||||
<if test="def23 != null and def23 != ''"> and a.def23 = #{def23} </if>
|
||||
<if test="def24 != null and def24 != ''"> and a.def24 = #{def24} </if>
|
||||
<if test="def25 != null and def25 != ''"> and a.def25 = #{def25} </if>
|
||||
<if test="def26 != null and def26 != ''"> and a.def26 = #{def26} </if>
|
||||
<if test="def27 != null and def27 != ''"> and a.def27 = #{def27} </if>
|
||||
<if test="def28 != null and def28 != ''"> and a.def28 = #{def28} </if>
|
||||
<if test="def29 != null and def29 != ''"> and a.def29 = #{def29} </if>
|
||||
<if test="def30 != null and def30 != ''"> and a.def30 = #{def30} </if>
|
||||
<if test="def31 != null and def31 != ''"> and a.def31 = #{def31} </if>
|
||||
<if test="def32 != null and def32 != ''"> and a.def32 = #{def32} </if>
|
||||
<if test="def33 != null and def33 != ''"> and a.def33 = #{def33} </if>
|
||||
<if test="def34 != null and def34 != ''"> and a.def34 = #{def34} </if>
|
||||
<if test="def35 != null and def35 != ''"> and a.def35 = #{def35} </if>
|
||||
<if test="def36 != null and def36 != ''"> and a.def36 = #{def36} </if>
|
||||
<if test="def37 != null and def37 != ''"> and a.def37 = #{def37} </if>
|
||||
<if test="def38 != null and def38 != ''"> and a.def38 = #{def38} </if>
|
||||
<if test="def39 != null and def39 != ''"> and a.def39 = #{def39} </if>
|
||||
<if test="def40 != null and def40 != ''"> and a.def40 = #{def40} </if>
|
||||
<if test="ids!=null and ids!=''">
|
||||
and a.id in (${ids})
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="get-TocofsReturngoodsDetailedEntity-result-tob" type="com.hzya.frame.report.lets.dto.TobofsReturnGoodsDetailedDto" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="headCompanyCode" column="headCompanyCode" jdbcType="VARCHAR"/>
|
||||
<result property="headFacilityCode" column="headFacilityCode" jdbcType="VARCHAR"/>
|
||||
<result property="headSourcePlatformCode" column="headSourcePlatformCode" jdbcType="VARCHAR"/>
|
||||
<result property="headStoreCode" column="headStoreCode" jdbcType="VARCHAR"/>
|
||||
<result property="headCode" column="headCode" jdbcType="VARCHAR"/>
|
||||
<result property="businessType" column="businessType" jdbcType="VARCHAR"/>
|
||||
<result property="skuCode" column="skuCode" jdbcType="VARCHAR"/>
|
||||
<result property="skuName" column="skuName" jdbcType="VARCHAR"/>
|
||||
<result property="receivedQty" column="receivedQty" jdbcType="VARCHAR"/>
|
||||
|
||||
<result property="businessDate" column="businessDate" jdbcType="VARCHAR"/>
|
||||
<result property="newTransmitInfo" column="newTransmitInfo" jdbcType="VARCHAR"/>
|
||||
<result property="newPushDate" column="newPushDate" jdbcType="VARCHAR"/>
|
||||
<result property="newState" column="newState" jdbcType="VARCHAR"/>
|
||||
<result property="newSystemNumber" column="newSystemNumber" jdbcType="VARCHAR"/>
|
||||
<result property="newSystemPrimary" column="newSystemPrimary" jdbcType="VARCHAR"/>
|
||||
|
||||
<result property="refundedAt" column="refundedAt" jdbcType="VARCHAR"/>
|
||||
<result property="newTransmitInfo2" column="newTransmitInfo2" jdbcType="VARCHAR"/>
|
||||
<result property="newPushDate2" column="newPushDate2" jdbcType="VARCHAR"/>
|
||||
<result property="newState2" column="newState2" jdbcType="VARCHAR"/>
|
||||
<result property="newSystemNumber2" column="newSystemNumber2" jdbcType="VARCHAR"/>
|
||||
<result property="newSystemPrimary2" column="newSystemPrimary2" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 查询 采用==查询,适用toc -->
|
||||
<select id="entity_list_base_tob" resultMap="get-TocofsReturngoodsDetailedEntity-result-tob" parameterType = "com.hzya.frame.report.lets.entity.TocofsReturngoodsDetailedEntity">
|
||||
select
|
||||
a.id
|
||||
,a.receiptId
|
||||
,a.receiptCode
|
||||
,a.refOrderId
|
||||
,a.refOrderDetailId
|
||||
,a.sourceOrderCode
|
||||
,a.sourceLineNum
|
||||
,a.clientCode
|
||||
,a.companyCode
|
||||
,a.facilityCode
|
||||
,a.skuCode
|
||||
,a.skuName
|
||||
,a.requestQty
|
||||
,a.receivedQty
|
||||
,a.openQty
|
||||
,a.quantityUM
|
||||
,a.totalWeight
|
||||
,a.totalVolume
|
||||
,a.totalVolumeWeight
|
||||
,a.totalAmount
|
||||
,a.weightUM
|
||||
,a.volumeUM
|
||||
,a.inventorySts
|
||||
,a.inTransInvId
|
||||
,a.closed
|
||||
,a.created
|
||||
,a.createdBy
|
||||
,a.lastUpdated
|
||||
,a.lastUpdatedBy
|
||||
,a.discountPrice
|
||||
,a.mainTableId
|
||||
,a.newTransmitInfo
|
||||
,a.newPushDate
|
||||
,a.newState
|
||||
,a.newSystemNumber
|
||||
,a.newSystemPrimary
|
||||
,a.newTransmitInfo2
|
||||
,a.newPushDate2
|
||||
,a.newState2
|
||||
,a.newSystemNumber2
|
||||
,a.newSystemPrimary2
|
||||
,a.newTransmitInfo3
|
||||
,a.newPushDate3
|
||||
,a.newState3
|
||||
,a.newSystemNumber3
|
||||
,a.newSystemPrimary3
|
||||
,a.newTransmitInfo4
|
||||
,a.newPushDate4
|
||||
,a.newState4
|
||||
,a.newSystemNumber4
|
||||
,a.newSystemPrimary4
|
||||
,a.businessDate
|
||||
,a.refundedAt
|
||||
,a.businessType
|
||||
,a.def1
|
||||
,a.def2
|
||||
,a.def3
|
||||
,a.def4
|
||||
,a.def5
|
||||
,a.def6
|
||||
,a.def7
|
||||
,a.def8
|
||||
,a.def9
|
||||
,a.def10
|
||||
,a.def11
|
||||
,a.def12
|
||||
,a.def13
|
||||
,a.def14
|
||||
,a.def15
|
||||
,a.def16
|
||||
,a.def17
|
||||
,a.def18
|
||||
,a.def19
|
||||
,a.def20
|
||||
,a.def21
|
||||
,a.def22
|
||||
,a.def23
|
||||
,a.def24
|
||||
,a.def25
|
||||
,a.def26
|
||||
,a.def27
|
||||
,a.def28
|
||||
,a.def29
|
||||
,a.def30
|
||||
,a.def31
|
||||
,a.def32
|
||||
,a.def33
|
||||
,a.def34
|
||||
,a.def35
|
||||
,a.def36
|
||||
,a.def37
|
||||
,a.def38
|
||||
,a.def39
|
||||
,a.def40
|
||||
,b.companyCode headCompanyCode
|
||||
,b.facilityCode headFacilityCode
|
||||
,b.storeCode headStoreCode
|
||||
,b.sourcePlatformCode headSourcePlatformCode
|
||||
,b.code headCode
|
||||
from tocofs_returngoods_detailed a left join tocofs_returngoods b on b.id = a.mainTableId
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and a.id = #{id} </if>
|
||||
<if test="receiptid != null and receiptid != ''"> and a.receiptId = #{receiptid} </if>
|
||||
<if test="receiptcode != null and receiptcode != ''"> and a.receiptCode = #{receiptcode} </if>
|
||||
<if test="reforderid != null and reforderid != ''"> and a.refOrderId = #{reforderid} </if>
|
||||
<if test="reforderdetailid != null and reforderdetailid != ''"> and a.refOrderDetailId = #{reforderdetailid} </if>
|
||||
<if test="sourceordercode != null and sourceordercode != ''"> and a.sourceOrderCode = #{sourceordercode} </if>
|
||||
<if test="sourcelinenum != null and sourcelinenum != ''"> and a.sourceLineNum = #{sourcelinenum} </if>
|
||||
<if test="clientcode != null and clientcode != ''"> and a.clientCode = #{clientcode} </if>
|
||||
<if test="companycode != null and companycode != ''"> and a.companyCode = #{companycode} </if>
|
||||
<if test="facilitycode != null and facilitycode != ''"> and a.facilityCode = #{facilitycode} </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="requestqty != null and requestqty != ''"> and a.requestQty = #{requestqty} </if>
|
||||
<if test="receivedqty != null and receivedqty != ''"> and a.receivedQty = #{receivedqty} </if>
|
||||
<if test="openqty != null and openqty != ''"> and a.openQty = #{openqty} </if>
|
||||
<if test="quantityum != null and quantityum != ''"> and a.quantityUM = #{quantityum} </if>
|
||||
<if test="totalweight != null and totalweight != ''"> and a.totalWeight = #{totalweight} </if>
|
||||
<if test="totalvolume != null and totalvolume != ''"> and a.totalVolume = #{totalvolume} </if>
|
||||
<if test="totalvolumeweight != null and totalvolumeweight != ''"> and a.totalVolumeWeight = #{totalvolumeweight} </if>
|
||||
<if test="totalamount != null and totalamount != ''"> and a.totalAmount = #{totalamount} </if>
|
||||
<if test="weightum != null and weightum != ''"> and a.weightUM = #{weightum} </if>
|
||||
<if test="volumeum != null and volumeum != ''"> and a.volumeUM = #{volumeum} </if>
|
||||
<if test="inventorysts != null and inventorysts != ''"> and a.inventorySts = #{inventorysts} </if>
|
||||
<if test="intransinvid != null and intransinvid != ''"> and a.inTransInvId = #{intransinvid} </if>
|
||||
<if test="closed != null and closed != ''"> and a.closed = #{closed} </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="discountprice != null and discountprice != ''"> and a.discountPrice = #{discountprice} </if>
|
||||
<if test="maintableid != null and maintableid != ''"> and a.mainTableId = #{maintableid} </if>
|
||||
<if test="newtransmitinfo != null and newtransmitinfo != ''"> and a.newTransmitInfo = #{newtransmitinfo} </if>
|
||||
|
||||
<if test="newpushdate != null and newpushdate != ''"> and LEFT(a.newPushDate,10) = #{newpushdate} </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="newtransmitinfo2 != null and newtransmitinfo2 != ''"> and a.newTransmitInfo2 = #{newtransmitinfo2} </if>
|
||||
|
||||
<if test="newpushdate2 != null and newpushdate2 != ''"> and LEFT(a.newPushDate2,10) = #{newpushdate2} </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="newtransmitinfo3 != null and newtransmitinfo3 != ''"> and a.newTransmitInfo3 = #{newtransmitinfo3} </if>
|
||||
|
||||
<if test="newpushdate3 != null and newpushdate3 != ''"> and LEFT(a.newPushDate3,10) = #{newpushdate3} </if>
|
||||
|
||||
<if test="newstate3 != null and newstate3 != ''"> and a.newState3 = #{newstate3} </if>
|
||||
<if test="newsystemnumber3 != null and newsystemnumber3 != ''"> and a.newSystemNumber3 = #{newsystemnumber3} </if>
|
||||
<if test="newsystemprimary3 != null and newsystemprimary3 != ''"> and a.newSystemPrimary3 = #{newsystemprimary3} </if>
|
||||
<if test="newtransmitinfo4 != null and newtransmitinfo4 != ''"> and a.newTransmitInfo4 = #{newtransmitinfo4} </if>
|
||||
|
||||
<if test="newpushdate4 != null and newpushdate4 != ''"> and LEFT(a.newPushDate4,10) = #{newpushdate4} </if>
|
||||
|
||||
<if test="newstate4 != null and newstate4 != ''"> and a.newState4 = #{newstate4} </if>
|
||||
<if test="newsystemnumber4 != null and newsystemnumber4 != ''"> and a.newSystemNumber4 = #{newsystemnumber4} </if>
|
||||
<if test="newsystemprimary4 != null and newsystemprimary4 != ''"> and a.newSystemPrimary4 = #{newsystemprimary4} </if>
|
||||
<if test="businessdate != null and businessdate != ''"> and a.businessDate = #{businessdate} </if>
|
||||
<if test="refundedat != null and refundedat != ''"> and a.refundedAt = #{refundedat} </if>
|
||||
|
||||
<if test="businesstype != null and businesstype != ''"> and a.businessType = #{businesstype} </if>
|
||||
|
||||
|
||||
<if test="businessdate_start!=null and businessdate_start!=''">
|
||||
and a.businessDate >= #{businessdate_start}
|
||||
</if>
|
||||
<if test="businessdate_end!=null and businessdate_end!=''">
|
||||
and a.businessDate <= #{businessdate_end}
|
||||
</if>
|
||||
<if test="refundedAt_start!=null and refundedAt_start!=''">
|
||||
and a.refundedAt >= #{refundedAt_start}
|
||||
</if>
|
||||
<if test="refundedAt_end!=null and refundedAt_end!=''">
|
||||
and a.refundedAt <= #{refundedAt_end}
|
||||
</if>
|
||||
<if test="headCode!=null and headCode!=''">
|
||||
and b.code = #{headCode}
|
||||
</if>
|
||||
|
||||
<if test="def1 != null and def1 != ''"> and a.def1 = #{def1} </if>
|
||||
<if test="def2 != null and def2 != ''"> and a.def2 = #{def2} </if>
|
||||
<if test="def3 != null and def3 != ''"> and a.def3 = #{def3} </if>
|
||||
<if test="def4 != null and def4 != ''"> and a.def4 = #{def4} </if>
|
||||
<if test="def5 != null and def5 != ''"> and a.def5 = #{def5} </if>
|
||||
<if test="def6 != null and def6 != ''"> and a.def6 = #{def6} </if>
|
||||
<if test="def7 != null and def7 != ''"> and a.def7 = #{def7} </if>
|
||||
<if test="def8 != null and def8 != ''"> and a.def8 = #{def8} </if>
|
||||
<if test="def9 != null and def9 != ''"> and a.def9 = #{def9} </if>
|
||||
<if test="def10 != null and def10 != ''"> and a.def10 = #{def10} </if>
|
||||
<if test="def11 != null and def11 != ''"> and a.def11 = #{def11} </if>
|
||||
<if test="def12 != null and def12 != ''"> and a.def12 = #{def12} </if>
|
||||
<if test="def13 != null and def13 != ''"> and a.def13 = #{def13} </if>
|
||||
<if test="def14 != null and def14 != ''"> and a.def14 = #{def14} </if>
|
||||
<if test="def15 != null and def15 != ''"> and a.def15 = #{def15} </if>
|
||||
<if test="def16 != null and def16 != ''"> and a.def16 = #{def16} </if>
|
||||
<if test="def17 != null and def17 != ''"> and a.def17 = #{def17} </if>
|
||||
<if test="def18 != null and def18 != ''"> and a.def18 = #{def18} </if>
|
||||
<if test="def19 != null and def19 != ''"> and a.def19 = #{def19} </if>
|
||||
<if test="def20 != null and def20 != ''"> and a.def20 = #{def20} </if>
|
||||
<if test="def21 != null and def21 != ''"> and a.def21 = #{def21} </if>
|
||||
<if test="def22 != null and def22 != ''"> and a.def22 = #{def22} </if>
|
||||
<if test="def23 != null and def23 != ''"> and a.def23 = #{def23} </if>
|
||||
<if test="def24 != null and def24 != ''"> and a.def24 = #{def24} </if>
|
||||
<if test="def25 != null and def25 != ''"> and a.def25 = #{def25} </if>
|
||||
<if test="def26 != null and def26 != ''"> and a.def26 = #{def26} </if>
|
||||
<if test="def27 != null and def27 != ''"> and a.def27 = #{def27} </if>
|
||||
<if test="def28 != null and def28 != ''"> and a.def28 = #{def28} </if>
|
||||
<if test="def29 != null and def29 != ''"> and a.def29 = #{def29} </if>
|
||||
<if test="def30 != null and def30 != ''"> and a.def30 = #{def30} </if>
|
||||
<if test="def31 != null and def31 != ''"> and a.def31 = #{def31} </if>
|
||||
<if test="def32 != null and def32 != ''"> and a.def32 = #{def32} </if>
|
||||
<if test="def33 != null and def33 != ''"> and a.def33 = #{def33} </if>
|
||||
<if test="def34 != null and def34 != ''"> and a.def34 = #{def34} </if>
|
||||
<if test="def35 != null and def35 != ''"> and a.def35 = #{def35} </if>
|
||||
<if test="def36 != null and def36 != ''"> and a.def36 = #{def36} </if>
|
||||
<if test="def37 != null and def37 != ''"> and a.def37 = #{def37} </if>
|
||||
<if test="def38 != null and def38 != ''"> and a.def38 = #{def38} </if>
|
||||
<if test="def39 != null and def39 != ''"> and a.def39 = #{def39} </if>
|
||||
<if test="def40 != null and def40 != ''"> and a.def40 = #{def40} </if>
|
||||
<if test="ids!=null and ids!=''">
|
||||
and a.id in (${ids})
|
||||
</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.TocofsReturngoodsDetailedEntity">
|
||||
|
|
|
@ -22,7 +22,7 @@ public interface ITocofsSaleoutService extends IBaseService<TocofsSaleoutEntity,
|
|||
/**
|
||||
* 导出TOC/TOB销售正向流程报表数据
|
||||
*/
|
||||
JsonResultEntity ToCSalesReportExcel(JSONObject jsonObject) throws Exception;
|
||||
JsonResultEntity exportToCSalesReportExcel(JSONObject jsonObject) throws Exception;
|
||||
|
||||
/**
|
||||
* 查询TOC/TOB退货反向流程报表数据
|
||||
|
@ -31,5 +31,10 @@ public interface ITocofsSaleoutService extends IBaseService<TocofsSaleoutEntity,
|
|||
*/
|
||||
JsonResultEntity queryToCReturnReport(JSONObject jsonObject) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* 导出TOC/TOB退货反向流程报表数据
|
||||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
JsonResultEntity exportToCReturnReportExcel(JSONObject jsonObject) throws Exception;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,9 @@ 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;
|
||||
|
@ -160,7 +162,7 @@ public class TocofsSaleoutServiceImpl extends BaseService<TocofsSaleoutEntity, S
|
|||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity ToCSalesReportExcel(JSONObject jsonObject) throws Exception {
|
||||
public JsonResultEntity exportToCSalesReportExcel(JSONObject jsonObject) throws Exception {
|
||||
Assert.notNull(jsonObject, "jsonObject不能为空");
|
||||
jsonObject.put("qType", "excel");
|
||||
|
||||
|
@ -215,14 +217,11 @@ public class TocofsSaleoutServiceImpl extends BaseService<TocofsSaleoutEntity, S
|
|||
|
||||
@Override
|
||||
public JsonResultEntity queryToCReturnReport(JSONObject jsonObject) throws Exception {
|
||||
long startTime = System.currentTimeMillis();
|
||||
// long startTime = System.currentTimeMillis();
|
||||
JSONObject jsonStr = getstrObj("jsonStr", jsonObject);
|
||||
|
||||
//分页参数
|
||||
String pageNum = jsonStr.getString("pageNum");
|
||||
String pageSize = jsonStr.getString("pageSize");
|
||||
Assert.notNull(pageNum, "pageNum不能为空");
|
||||
Assert.notNull(pageSize, "pageSize不能为空");
|
||||
//提供两种模式:查询模式 query、导出模式 excel
|
||||
String qType = jsonStr.getString("qType");
|
||||
|
||||
//业务类型:TOB、TOC
|
||||
String businessType = jsonStr.getString("businesstype");
|
||||
|
@ -302,15 +301,58 @@ public class TocofsSaleoutServiceImpl extends BaseService<TocofsSaleoutEntity, S
|
|||
|
||||
tocofsSaleoutDetailedEntity.setHeadCode(headCode);
|
||||
|
||||
tocofsSaleoutDetailedEntity.setPageNum(Integer.valueOf(pageNum));
|
||||
tocofsSaleoutDetailedEntity.setPageSize(Integer.valueOf(pageSize));
|
||||
|
||||
//开启分页
|
||||
PageHelper.startPage(tocofsSaleoutDetailedEntity.getPageNum(), tocofsSaleoutDetailedEntity.getPageSize());
|
||||
List<TocofsReturngoodsDetailedEntity> tocofsSaleoutDetailedEntityPageAttribute = iTocofsReturngoodsDetailedDao.query(tocofsSaleoutDetailedEntity);
|
||||
PageInfo pageInfo = new PageInfo(tocofsSaleoutDetailedEntityPageAttribute);
|
||||
long endTime = System.currentTimeMillis();
|
||||
logger.info("报表导出查询耗时:{}", (endTime - startTime));
|
||||
return BaseResult.getSuccessMessageEntity("查询成功", pageInfo);
|
||||
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不能为空");
|
||||
tocofsSaleoutDetailedEntity.setPageNum(Integer.valueOf(pageNum));
|
||||
tocofsSaleoutDetailedEntity.setPageSize(Integer.valueOf(pageSize));
|
||||
PageHelper.startPage(tocofsSaleoutDetailedEntity.getPageNum(), tocofsSaleoutDetailedEntity.getPageSize());
|
||||
List<TocofsReturngoodsDetailedEntity> tocofsSaleoutDetailedEntityPageAttribute = iTocofsReturngoodsDetailedDao.query(tocofsSaleoutDetailedEntity);
|
||||
PageInfo pageInfo = new PageInfo(tocofsSaleoutDetailedEntityPageAttribute);
|
||||
return BaseResult.getSuccessMessageEntity("查询成功", pageInfo);
|
||||
} else if ("excel".equals(qType)) {
|
||||
if (businessType.equals("TOC_ORDER")) {
|
||||
//TOC退货
|
||||
List<TocofsReturnGoodsDetailedDto> tocofsReturnGoodsDetailedDtos = iTocofsReturngoodsDetailedDao.queryEntityListBaseToc(tocofsSaleoutDetailedEntity);
|
||||
return BaseResult.getSuccessMessageEntity("查询成功", tocofsReturnGoodsDetailedDtos);
|
||||
} else if (businessType.equals("TOB_ORDER")) {
|
||||
//TOB退货
|
||||
List<TobofsReturnGoodsDetailedDto> tobofsReturnGoodsDetailedDtos = iTocofsReturngoodsDetailedDao.queryEntityListBaseTob(tocofsSaleoutDetailedEntity);
|
||||
return BaseResult.getSuccessMessageEntity("查询成功", tobofsReturnGoodsDetailedDtos);
|
||||
} else {
|
||||
return BaseResult.getFailureMessageEntity("查询失败,无法确定TOB、TOC!请选择:TOC_ORDER、或者TOB_ORDER!");
|
||||
}
|
||||
} else {
|
||||
return BaseResult.getFailureMessageEntity("查询失败,无法确定查询模式!请选择:查询模式 query、导出模式 excel!");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity exportToCReturnReportExcel(JSONObject jsonObject) throws Exception {
|
||||
Assert.notNull(jsonObject, "jsonObject不能为空");
|
||||
jsonObject.put("qType", "excel");
|
||||
|
||||
String businessType = jsonObject.getString("businessType");
|
||||
Assert.notNull(businessType, "businessType不能为空!");
|
||||
|
||||
JsonResultEntity jsonResultEntity = queryToCReturnReport(jsonObject);
|
||||
if (jsonResultEntity != null && jsonResultEntity.getAttribute() != null) {
|
||||
InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream("template/TOCTOB正向流程导出模版.xlsx");
|
||||
String[] excelFile = createExcelFile();
|
||||
|
||||
if (businessType.equals("TOC_ORDER")) {
|
||||
List<TocofsSaleoutDetailedDto> tocofsSaleoutDetailedEntityList = (List<TocofsSaleoutDetailedDto>) jsonResultEntity.getAttribute();
|
||||
EasyExcel.write(excelFile[0], TocofsSaleoutDetailedDto.class).withTemplate(templateFileName).sheet().doWrite(tocofsSaleoutDetailedEntityList);
|
||||
} else if (businessType.equals("TOB_ORDER")) {
|
||||
List<TobofsSaleoutDetailedDto> tobofsSaleoutDetailedEntityList = (List<TobofsSaleoutDetailedDto>) jsonResultEntity.getAttribute();
|
||||
EasyExcel.write(excelFile[0], TobofsSaleoutDetailedDto.class).withTemplate(templateFileName).sheet().doWrite(tobofsSaleoutDetailedEntityList);
|
||||
} else {
|
||||
return BaseResult.getFailureMessageEntity("查询失败,无法确定TOB、TOC!请选择:TOC_ORDER、或者TOB_ORDER!");
|
||||
}
|
||||
}
|
||||
return BaseResult.getFailureMessageEntity("生成TOC、TOB销售业务对应的Excel文件失败!");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue