refactor(buildpackage): 移除硬编码并更新报表查询

- 移除销售和退货插件初始化器中的硬编码字符串,使用新的标识符替换。
- 在报表实体类中添加新的查询字段,扩展报表查询功能。
- 更新报表详细实体类,包含额外的查询参数。
- 调整查询方法以支持新的查询参数,增强报表的筛选能力。

销售出库和退货报表的相关代码调整,旨在提高代码可维护性和查询灵活性。
This commit is contained in:
liuy 2024-09-23 14:15:27 +08:00
parent f99eace325
commit ca121aad33
8 changed files with 402 additions and 102 deletions

View File

@ -158,7 +158,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
private static final String NOTHING = "";
private static final String ADD = "@0216@";
private static final String ADD = "(*)";
@Autowired
private ShopTobOrToCUtil shopTobOrToCUtil;
@ -990,7 +990,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
//查询对应的OFS销售订单
List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtos = queryOfsOrder(headerDetailsDtoList);
findMatchingOfsOrder(headerDetailsDtos, headerDetailsDtoList);
for (int i = 0; i < headerDetailsDtoList.size(); i++) {
HeaderDetailsDto headerDetailsDto = headerDetailsDtoList.get(i);
HeaderDto header = headerDetailsDto.getHeader();
@ -1224,6 +1224,8 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
// String refOrderType = header.getRefOrderType();
//收发类别
BdRdclEntity bdRdclEntity = sonDetailsDto.getBdRdclEntity();
//部门
BdDeptdocEntity bdDeptdocEntity = sonDetailsDto.getBdDeptdocEntity();
StringBuffer summaryDimensionStr = new StringBuffer();
if (bdCorpEntity != null && bdCorpEntity.getPkCorp() != null) {
@ -1259,12 +1261,19 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
// } else {
// summaryDimensionStr.append(NOTHING);
// }
if (bdRdclEntity != null && bdRdclEntity.getRdcode() != null) {
summaryDimensionStr.append(bdRdclEntity.getRdcode());
} else {
summaryDimensionStr.append(NOTHING);
}
//TODO 部门O还未开发好待定
summaryDimensionStr.append(ADD);
if (bdDeptdocEntity != null && bdDeptdocEntity.getDeptcode() != null) {
summaryDimensionStr.append(bdDeptdocEntity.getDeptcode());
} else {
summaryDimensionStr.append(NOTHING);
}
sonDetailsDto.setSummaryDimensionStr(summaryDimensionStr.toString());
}

View File

@ -141,7 +141,7 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
private static final String NOTHING = "";
private static final String ADD = "@0216@";
private static final String ADD = "(*)";
@Autowired
private ITocofsReturngoodsDao iTocofsReturngoodsDao;
@ -1241,6 +1241,8 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
// String refOrderType = header.getRefOrderType();
//收发类别
BdRdclEntity bdRdclEntity = goodsRertunSonDetailsDto.getBdRdclEntity();
//部门
BdDeptdocEntity bdDeptdocEntity = goodsRertunSonDetailsDto.getBdDeptdocEntity();
StringBuffer summaryDimensionStr = new StringBuffer();
if (bdCorpEntity != null && bdCorpEntity.getPkCorp() != null) {
@ -1282,8 +1284,13 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
} else {
summaryDimensionStr.append(NOTHING);
}
summaryDimensionStr.append(ADD);
//TODO 部门O还未开发好待定
if (bdDeptdocEntity != null && bdDeptdocEntity.getDeptcode() != null) {
summaryDimensionStr.append(bdDeptdocEntity.getDeptcode());
} else {
summaryDimensionStr.append(NOTHING);
}
goodsRertunSonDetailsDto.setSummaryDimensionStr(summaryDimensionStr.toString());
}

View File

@ -385,4 +385,31 @@ public class TocofsReturngoodsDetailedEntity extends BaseEntity {
* 补充的查询条件
*/
private String ids;
//入库开始时间
private String businessdate_start;
//入库结束时间
private String businessdate_end;
//退款完成开始时间
private String refundedAt_start;
//退款完成结束时间
private String refundedAt_end;
//O货主编码
private String headCompanyCode;
//O发货仓库
private String headFacilityCode;
//O店铺编码
private String headStoreCode;
//O平台编码
private String headSourcePlatformCode;
//O售后入库单号
private String headCode;
}

View File

@ -97,7 +97,15 @@
<result property="def38" column="def38" jdbcType="VARCHAR"/>
<result property="def39" column="def39" jdbcType="VARCHAR"/>
<result property="def40" column="def40" jdbcType="VARCHAR"/>
<result property="headCompanyCode" column="headCompanyCode" jdbcType="VARCHAR"/>
<result property="headFacilityCode" column="headFacilityCode" jdbcType="VARCHAR"/>
<result property="headStoreCode" column="headStoreCode" jdbcType="VARCHAR"/>
<result property="headSourcePlatformCode" column="headSourcePlatformCode" jdbcType="VARCHAR"/>
<result property="headCode" column="headCode" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "TocofsReturngoodsDetailedEntity_Base_Column_List">
id
@ -199,105 +207,230 @@
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-TocofsReturngoodsDetailedEntity-result" parameterType = "com.hzya.frame.report.lets.entity.TocofsReturngoodsDetailedEntity">
select
<include refid="TocofsReturngoodsDetailedEntity_Base_Column_List" />
from tocofs_returngoods_detailed
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 id = #{id} </if>
<if test="receiptid != null and receiptid != ''"> and receiptId = #{receiptid} </if>
<if test="receiptcode != null and receiptcode != ''"> and receiptCode = #{receiptcode} </if>
<if test="reforderid != null and reforderid != ''"> and refOrderId = #{reforderid} </if>
<if test="reforderdetailid != null and reforderdetailid != ''"> and refOrderDetailId = #{reforderdetailid} </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode = #{sourceordercode} </if>
<if test="sourcelinenum != null and sourcelinenum != ''"> and sourceLineNum = #{sourcelinenum} </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="skucode != null and skucode != ''"> and skuCode = #{skucode} </if>
<if test="skuname != null and skuname != ''"> and skuName = #{skuname} </if>
<if test="requestqty != null and requestqty != ''"> and requestQty = #{requestqty} </if>
<if test="receivedqty != null and receivedqty != ''"> and receivedQty = #{receivedqty} </if>
<if test="openqty != null and openqty != ''"> and openQty = #{openqty} </if>
<if test="quantityum != null and quantityum != ''"> and quantityUM = #{quantityum} </if>
<if test="totalweight != null and totalweight != ''"> and totalWeight = #{totalweight} </if>
<if test="totalvolume != null and totalvolume != ''"> and totalVolume = #{totalvolume} </if>
<if test="totalvolumeweight != null and totalvolumeweight != ''"> and totalVolumeWeight = #{totalvolumeweight} </if>
<if test="totalamount != null and totalamount != ''"> and totalAmount = #{totalamount} </if>
<if test="weightum != null and weightum != ''"> and weightUM = #{weightum} </if>
<if test="volumeum != null and volumeum != ''"> and volumeUM = #{volumeum} </if>
<if test="inventorysts != null and inventorysts != ''"> and inventorySts = #{inventorysts} </if>
<if test="intransinvid != null and intransinvid != ''"> and inTransInvId = #{intransinvid} </if>
<if test="closed != null and closed != ''"> and closed = #{closed} </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="discountprice != null and discountprice != ''"> and discountPrice = #{discountprice} </if>
<if test="maintableid != null and maintableid != ''"> and mainTableId = #{maintableid} </if>
<if test="newtransmitinfo != null and newtransmitinfo != ''"> and newTransmitInfo = #{newtransmitinfo} </if>
<if test="newpushdate != null and newpushdate != ''"> and newPushDate = #{newpushdate} </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="newtransmitinfo2 != null and newtransmitinfo2 != ''"> and newTransmitInfo2 = #{newtransmitinfo2} </if>
<if test="newpushdate2 != null and newpushdate2 != ''"> and newPushDate2 = #{newpushdate2} </if>
<if test="newstate2 != null and newstate2 != ''"> and newState2 = #{newstate2} </if>
<if test="newsystemnumber2 != null and newsystemnumber2 != ''"> and newSystemNumber2 = #{newsystemnumber2} </if>
<if test="newsystemprimary2 != null and newsystemprimary2 != ''"> and newSystemPrimary2 = #{newsystemprimary2} </if>
<if test="newtransmitinfo3 != null and newtransmitinfo3 != ''"> and newTransmitInfo3 = #{newtransmitinfo3} </if>
<if test="newpushdate3 != null and newpushdate3 != ''"> and newPushDate3 = #{newpushdate3} </if>
<if test="newstate3 != null and newstate3 != ''"> and newState3 = #{newstate3} </if>
<if test="newsystemnumber3 != null and newsystemnumber3 != ''"> and newSystemNumber3 = #{newsystemnumber3} </if>
<if test="newsystemprimary3 != null and newsystemprimary3 != ''"> and newSystemPrimary3 = #{newsystemprimary3} </if>
<if test="newtransmitinfo4 != null and newtransmitinfo4 != ''"> and newTransmitInfo4 = #{newtransmitinfo4} </if>
<if test="newpushdate4 != null and newpushdate4 != ''"> and newPushDate4 = #{newpushdate4} </if>
<if test="newstate4 != null and newstate4 != ''"> and newState4 = #{newstate4} </if>
<if test="newsystemnumber4 != null and newsystemnumber4 != ''"> and newSystemNumber4 = #{newsystemnumber4} </if>
<if test="newsystemprimary4 != null and newsystemprimary4 != ''"> and newSystemPrimary4 = #{newsystemprimary4} </if>
<if test="businessdate != null and businessdate != ''"> and businessDate = #{businessdate} </if>
<if test="refundedat != null and refundedat != ''"> and refundedAt = #{refundedat} </if>
<if test="businesstype != null and businesstype != ''"> and businessType = #{businesstype} </if>
<if test="def1 != null and def1 != ''"> and def1 = #{def1} </if>
<if test="def2 != null and def2 != ''"> and def2 = #{def2} </if>
<if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
<if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
<if test="def5 != null and def5 != ''"> and def5 = #{def5} </if>
<if test="def6 != null and def6 != ''"> and def6 = #{def6} </if>
<if test="def7 != null and def7 != ''"> and def7 = #{def7} </if>
<if test="def8 != null and def8 != ''"> and def8 = #{def8} </if>
<if test="def9 != null and def9 != ''"> and def9 = #{def9} </if>
<if test="def10 != null and def10 != ''"> and def10 = #{def10} </if>
<if test="def11 != null and def11 != ''"> and def11 = #{def11} </if>
<if test="def12 != null and def12 != ''"> and def12 = #{def12} </if>
<if test="def13 != null and def13 != ''"> and def13 = #{def13} </if>
<if test="def14 != null and def14 != ''"> and def14 = #{def14} </if>
<if test="def15 != null and def15 != ''"> and def15 = #{def15} </if>
<if test="def16 != null and def16 != ''"> and def16 = #{def16} </if>
<if test="def17 != null and def17 != ''"> and def17 = #{def17} </if>
<if test="def18 != null and def18 != ''"> and def18 = #{def18} </if>
<if test="def19 != null and def19 != ''"> and def19 = #{def19} </if>
<if test="def20 != null and def20 != ''"> and def20 = #{def20} </if>
<if test="def21 != null and def21 != ''"> and def21 = #{def21} </if>
<if test="def22 != null and def22 != ''"> and def22 = #{def22} </if>
<if test="def23 != null and def23 != ''"> and def23 = #{def23} </if>
<if test="def24 != null and def24 != ''"> and def24 = #{def24} </if>
<if test="def25 != null and def25 != ''"> and def25 = #{def25} </if>
<if test="def26 != null and def26 != ''"> and def26 = #{def26} </if>
<if test="def27 != null and def27 != ''"> and def27 = #{def27} </if>
<if test="def28 != null and def28 != ''"> and def28 = #{def28} </if>
<if test="def29 != null and def29 != ''"> and def29 = #{def29} </if>
<if test="def30 != null and def30 != ''"> and def30 = #{def30} </if>
<if test="def31 != null and def31 != ''"> and def31 = #{def31} </if>
<if test="def32 != null and def32 != ''"> and def32 = #{def32} </if>
<if test="def33 != null and def33 != ''"> and def33 = #{def33} </if>
<if test="def34 != null and def34 != ''"> and def34 = #{def34} </if>
<if test="def35 != null and def35 != ''"> and def35 = #{def35} </if>
<if test="def36 != null and def36 != ''"> and def36 = #{def36} </if>
<if test="def37 != null and def37 != ''"> and def37 = #{def37} </if>
<if test="def38 != null and def38 != ''"> and def38 = #{def38} </if>
<if test="def39 != null and def39 != ''"> and def39 = #{def39} </if>
<if test="def40 != null and def40 != ''"> and def40 = #{def40} </if>
<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 &lt;= #{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 &lt;= #{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 id in (${ids})
and a.id in (${ids})
</if>
-- and sts='Y'
</trim>

View File

@ -400,4 +400,9 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
* 店铺编码
*/
private String headStoreCode;
/**
* O销售出库单编码
*/
private String headCode;
}

View File

@ -96,6 +96,7 @@
<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"/>
</resultMap>
<!-- 查询的字段-->
@ -286,6 +287,7 @@
,b.facilityCode headFacilityCode
,b.sourcePlatformCode headSourcePlatformCode
,b.storeCode headStoreCode
,b.code headCode
from tocofs_saleout_detailed a left join tocofs_saleout b on a.mainTableId = b.id
<trim prefix="where" prefixOverrides="and">
<if test="id != null"> and a.id = #{id} </if>
@ -399,6 +401,9 @@
<if test="successfultradedate_end!=null and successfultradedate_end!=''">
and a.successfulTradeDate &lt;= #{successfultradedate_end}
</if>
<if test="headCode!=null and headCode!=''">
and b.code = #{headCode}
</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>-->

View File

@ -18,4 +18,11 @@ public interface ITocofsSaleoutService extends IBaseService<TocofsSaleoutEntity,
* @author liuyang
*/
JsonResultEntity queryToCSalesReport(JSONObject jsonObject) throws Exception;
/**
* 查询TOCTOB退货反向流程报表数据
*
* @author liuyang
*/
JsonResultEntity queryToCReturnReport(JSONObject jsonObject) throws Exception;
}

View File

@ -6,8 +6,10 @@ 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.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;
@ -33,6 +35,9 @@ public class TocofsSaleoutServiceImpl extends BaseService<TocofsSaleoutEntity, S
@Autowired
private ITocofsSaleoutDetailedDao iTocofsSaleoutDetailedDao;
@Autowired
private ITocofsReturngoodsDetailedDao iTocofsReturngoodsDetailedDao;
@Autowired
public void setTocofsSaleoutDao(ITocofsSaleoutDao dao) {
this.tocofsSaleoutDao = dao;
@ -49,6 +54,9 @@ public class TocofsSaleoutServiceImpl extends BaseService<TocofsSaleoutEntity, S
Assert.notNull(pageNum, "pageNum不能为空");
Assert.notNull(pageSize, "pageSize不能为空");
//表头编码
String headCode = jsonStr.getString("headCode");
//业务类型TOBTOC
String businessType = jsonStr.getString("businessType");
Assert.notNull(businessType, "businessType不能为空!");
@ -118,6 +126,8 @@ public class TocofsSaleoutServiceImpl extends BaseService<TocofsSaleoutEntity, S
tocofsSaleoutDetailedEntity.setNewsystemnumber3(newsystemnumber3);
tocofsSaleoutDetailedEntity.setNewsystemprimary3(newsystemprimary3);
tocofsSaleoutDetailedEntity.setHeadCode(headCode);
tocofsSaleoutDetailedEntity.setPageNum(Integer.valueOf(pageNum));
tocofsSaleoutDetailedEntity.setPageSize(Integer.valueOf(pageSize));
@ -126,4 +136,101 @@ public class TocofsSaleoutServiceImpl extends BaseService<TocofsSaleoutEntity, S
PageInfo pageInfo = new PageInfo(tocofsSaleoutDetailedEntityPageAttribute);
return BaseResult.getSuccessMessageEntity("查询成功", pageInfo);
}
@Override
public JsonResultEntity queryToCReturnReport(JSONObject jsonObject) throws Exception {
JSONObject jsonStr = getstrObj("jsonStr", jsonObject);
//分页参数
String pageNum = jsonStr.getString("pageNum");
String pageSize = jsonStr.getString("pageSize");
Assert.notNull(pageNum, "pageNum不能为空");
Assert.notNull(pageSize, "pageSize不能为空");
//业务类型TOBTOC
String businessType = jsonStr.getString("businesstype");
Assert.notNull(businessType, "businessType不能为空!");
//表头编码
String headCode = jsonStr.getString("headCode");
//入库日期范围
String businessDate_start = jsonStr.getString("businessdate_start");
String businessDate_end = jsonStr.getString("businessdate_end");
if (businessDate_start != null) {
businessDate_start += " 00:00:00";
}
if (businessDate_end != null) {
businessDate_end += " 23:59:59";
}
//退款完成时间范围
String refundedAt_start = jsonStr.getString("refundedat_start");
if (refundedAt_start != null) {
refundedAt_start += " 00:00:00";
}
String refundedAt_end = jsonStr.getString("refundedat_end");
if (refundedAt_end != null) {
refundedAt_end += " 23:59:59";
}
//推送时间
String newPushDate = jsonStr.getString("newpushdate");
String newPushDate2 = jsonStr.getString("newpushdate2");
String newPushDate3 = jsonStr.getString("newpushdate3");
String newPushDate4 = jsonStr.getString("newpushdate4");
//推送状态
String newState = jsonStr.getString("newstate");
String newState2 = jsonStr.getString("newstate2");
String newState3 = jsonStr.getString("newstate3");
String newState4 = jsonStr.getString("newstate4");
//下游系统单号下游系统主键
String newSystemNumber = jsonStr.getString("newsystemnumber");
String newSystemPrimary = jsonStr.getString("newsystemprimary");
String newSystemNumber2 = jsonStr.getString("newsystemnumber2");
String newSystemPrimary2 = jsonStr.getString("newsystemprimary2");
String newSystemNumber3 = jsonStr.getString("newsystemnumber3");
String newSystemPrimary3 = jsonStr.getString("newsystemprimary3");
String newSystemNumber4 = jsonStr.getString("newsystemnumber4");
String newSystemPrimary4 = jsonStr.getString("newsystemprimary4");
TocofsReturngoodsDetailedEntity tocofsSaleoutDetailedEntity = new TocofsReturngoodsDetailedEntity();
tocofsSaleoutDetailedEntity.setBusinesstype(businessType);
tocofsSaleoutDetailedEntity.setBusinessdate_start(businessDate_start);
tocofsSaleoutDetailedEntity.setBusinessdate_end(businessDate_end);
tocofsSaleoutDetailedEntity.setRefundedAt_start(refundedAt_start);
tocofsSaleoutDetailedEntity.setRefundedAt_end(refundedAt_end);
tocofsSaleoutDetailedEntity.setNewpushdate(newPushDate);
tocofsSaleoutDetailedEntity.setNewpushdate2(newPushDate2);
tocofsSaleoutDetailedEntity.setNewpushdate3(newPushDate3);
tocofsSaleoutDetailedEntity.setNewpushdate4(newPushDate4);
tocofsSaleoutDetailedEntity.setNewstate(newState);
tocofsSaleoutDetailedEntity.setNewstate2(newState2);
tocofsSaleoutDetailedEntity.setNewstate3(newState3);
tocofsSaleoutDetailedEntity.setNewstate4(newState4);
tocofsSaleoutDetailedEntity.setNewsystemnumber(newSystemNumber);
tocofsSaleoutDetailedEntity.setNewsystemprimary(newSystemPrimary);
tocofsSaleoutDetailedEntity.setNewsystemnumber2(newSystemNumber2);
tocofsSaleoutDetailedEntity.setNewsystemprimary2(newSystemPrimary2);
tocofsSaleoutDetailedEntity.setNewsystemnumber3(newSystemNumber3);
tocofsSaleoutDetailedEntity.setNewsystemprimary3(newSystemPrimary3);
tocofsSaleoutDetailedEntity.setNewsystemnumber4(newSystemNumber4);
tocofsSaleoutDetailedEntity.setNewsystemprimary4(newSystemPrimary4);
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);
return BaseResult.getSuccessMessageEntity("查询成功", pageInfo);
}
}