数据类型修改和多线程优化

- 实体类中整型字段改为字符串类型,以适配特定的数据库操作需求。
- 在数据映射文件中更新字段类型,保持与修改后的实体类一致。
- 重构executeBusiness方法,使用多线程异步执行业务逻辑,优化性能。
This commit is contained in:
liuy 2024-09-25 13:16:43 +08:00
parent 6c4ddb00a5
commit 23aa38c58f
24 changed files with 822 additions and 891 deletions

View File

@ -11,7 +11,6 @@ import lombok.Data;
*/ */
@Data @Data
public class TocofsReturngoodsDetailedEntity extends BaseEntity { public class TocofsReturngoodsDetailedEntity extends BaseEntity {
/** /**
* 81159 * 81159
*/ */

View File

@ -33,11 +33,11 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
/** /**
* 22814582 主键 * 22814582 主键
*/ */
private Long reforderid; private String reforderid;
/** /**
* 54604811 * 54604811
*/ */
private Long reforderdetailid; private String reforderdetailid;
/** /**
* LETS-SO2024031900000002 * LETS-SO2024031900000002
*/ */
@ -45,7 +45,7 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
/** /**
* 30766 * 30766
*/ */
private Long allocinvid; private String allocinvid;
/** /**
* 6973391732215 * 6973391732215
*/ */
@ -66,15 +66,15 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
/** /**
* 0 * 0
*/ */
private Long isgift; private String isgift;
/** /**
* 10 * 10
*/ */
private Long requestqty; private String requestqty;
/** /**
* 0 * 0
*/ */
private Long shipqty; private String shipqty;
private String shipat; private String shipat;
/** /**
* EA * EA
@ -83,27 +83,27 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
/** /**
* 64 * 64
*/ */
private Long listprice; private String listprice;
/** /**
* 640 * 640
*/ */
private Long itemtotalamount; private String itemtotalamount;
/** /**
* 640 * 640
*/ */
private Long totalpayamount; private String totalpayamount;
/** /**
* 0 * 0
*/ */
private Long totalweight; private String totalweight;
/** /**
* 0 * 0
*/ */
private Long totalvolume; private String totalvolume;
/** /**
* 0 * 0
*/ */
private Long totalvolumeweight; private String totalvolumeweight;
/** /**
* G * G
*/ */

View File

@ -2,31 +2,31 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.plugin.lets.ofs.dao.impl.TocofsSaleoutDetailedDaoImpl"> <mapper namespace="com.hzya.frame.plugin.lets.ofs.dao.impl.TocofsSaleoutDetailedDaoImpl">
<resultMap id="get-TocofsSaleoutDetailedEntity-result" type="com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutDetailedEntity" > <resultMap id="get-TocofsSaleoutDetailedEntity-result" type="com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutDetailedEntity" >
<result property="id" column="id" jdbcType="INTEGER"/> <result property="id" column="id" jdbcType="VARCHAR"/>
<result property="clientcode" column="clientCode" jdbcType="VARCHAR"/> <result property="clientcode" column="clientCode" jdbcType="VARCHAR"/>
<result property="companycode" column="companyCode" jdbcType="VARCHAR"/> <result property="companycode" column="companyCode" jdbcType="VARCHAR"/>
<result property="facilitycode" column="facilityCode" jdbcType="VARCHAR"/> <result property="facilitycode" column="facilityCode" jdbcType="VARCHAR"/>
<result property="shipmentcode" column="shipmentCode" jdbcType="VARCHAR"/> <result property="shipmentcode" column="shipmentCode" jdbcType="VARCHAR"/>
<result property="reforderid" column="refOrderId" jdbcType="INTEGER"/> <result property="reforderid" column="refOrderId" jdbcType="VARCHAR"/>
<result property="reforderdetailid" column="refOrderDetailId" jdbcType="INTEGER"/> <result property="reforderdetailid" column="refOrderDetailId" jdbcType="VARCHAR"/>
<result property="refordercode" column="refOrderCode" jdbcType="VARCHAR"/> <result property="refordercode" column="refOrderCode" jdbcType="VARCHAR"/>
<result property="allocinvid" column="allocInvId" jdbcType="INTEGER"/> <result property="allocinvid" column="allocInvId" jdbcType="VARCHAR"/>
<result property="skucode" column="skuCode" jdbcType="VARCHAR"/> <result property="skucode" column="skuCode" jdbcType="VARCHAR"/>
<result property="skuname" column="skuName" jdbcType="VARCHAR"/> <result property="skuname" column="skuName" jdbcType="VARCHAR"/>
<result property="sourceordercode" column="sourceOrderCode" jdbcType="VARCHAR"/> <result property="sourceordercode" column="sourceOrderCode" jdbcType="VARCHAR"/>
<result property="sourcelinenum" column="sourceLineNum" jdbcType="VARCHAR"/> <result property="sourcelinenum" column="sourceLineNum" jdbcType="VARCHAR"/>
<result property="inventorysts" column="inventorySts" jdbcType="VARCHAR"/> <result property="inventorysts" column="inventorySts" jdbcType="VARCHAR"/>
<result property="isgift" column="isGift" jdbcType="INTEGER"/> <result property="isgift" column="isGift" jdbcType="VARCHAR"/>
<result property="requestqty" column="requestQty" jdbcType="INTEGER"/> <result property="requestqty" column="requestQty" jdbcType="VARCHAR"/>
<result property="shipqty" column="shipQty" jdbcType="INTEGER"/> <result property="shipqty" column="shipQty" jdbcType="VARCHAR"/>
<result property="shipat" column="shipAt" jdbcType="VARCHAR"/> <result property="shipat" column="shipAt" jdbcType="VARCHAR"/>
<result property="quantityum" column="quantityUM" jdbcType="VARCHAR"/> <result property="quantityum" column="quantityUM" jdbcType="VARCHAR"/>
<result property="listprice" column="listPrice" jdbcType="INTEGER"/> <result property="listprice" column="listPrice" jdbcType="VARCHAR"/>
<result property="itemtotalamount" column="itemTotalAmount" jdbcType="INTEGER"/> <result property="itemtotalamount" column="itemTotalAmount" jdbcType="VARCHAR"/>
<result property="totalpayamount" column="totalPayAmount" jdbcType="INTEGER"/> <result property="totalpayamount" column="totalPayAmount" jdbcType="VARCHAR"/>
<result property="totalweight" column="totalWeight" jdbcType="INTEGER"/> <result property="totalweight" column="totalWeight" jdbcType="VARCHAR"/>
<result property="totalvolume" column="totalVolume" jdbcType="INTEGER"/> <result property="totalvolume" column="totalVolume" jdbcType="VARCHAR"/>
<result property="totalvolumeweight" column="totalVolumeWeight" jdbcType="INTEGER"/> <result property="totalvolumeweight" column="totalVolumeWeight" jdbcType="VARCHAR"/>
<result property="weightum" column="weightUM" jdbcType="VARCHAR"/> <result property="weightum" column="weightUM" jdbcType="VARCHAR"/>
<result property="volumeum" column="volumeUM" jdbcType="VARCHAR"/> <result property="volumeum" column="volumeUM" jdbcType="VARCHAR"/>
<result property="created" column="created" jdbcType="VARCHAR"/> <result property="created" column="created" jdbcType="VARCHAR"/>

View File

@ -3,6 +3,8 @@ package com.hzya.frame.plugin.lets.ofs.entity;
import com.hzya.frame.web.entity.BaseEntity; import com.hzya.frame.web.entity.BaseEntity;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
/** /**
* O出库单表头(TOCTOB业务底表)(TocofsSaleout)实体类 * O出库单表头(TOCTOB业务底表)(TocofsSaleout)实体类
* *
@ -11,7 +13,6 @@ import lombok.Data;
*/ */
@Data @Data
public class TocofsSaleoutEntity extends BaseEntity { public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* LETS * LETS
*/ */
@ -35,7 +36,7 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 22814582 * 22814582
*/ */
private Long reforderid; private String reforderid;
/** /**
* LETS-SO2024031900000002 * LETS-SO2024031900000002
*/ */
@ -47,11 +48,11 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 510 * 510
*/ */
private Long status; private String status;
/** /**
* 0 * 0
*/ */
private Long consolidated; private String consolidated;
/** /**
* SALES * SALES
*/ */
@ -71,7 +72,7 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 0 * 0
*/ */
private Long sourceorderid; private String sourceorderid;
/** /**
* LETS-SO2024031900000002 * LETS-SO2024031900000002
*/ */
@ -111,31 +112,31 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 1 * 1
*/ */
private Long totallines; private String totallines;
/** /**
* 10 * 10
*/ */
private Long totalqty; private String totalqty;
/** /**
* 0 * 0
*/ */
private Long totalcontainers; private String totalcontainers;
/** /**
* 0 * 0
*/ */
private Long totalcases; private String totalcases;
/** /**
* 0 * 0
*/ */
private Long totalweight; private String totalweight;
/** /**
* 0 * 0
*/ */
private Long totalvolume; private String totalvolume;
/** /**
* 0 * 0
*/ */
private Long totalvolumeweight; private String totalvolumeweight;
/** /**
* G * G
*/ */
@ -147,19 +148,19 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 640 * 640
*/ */
private Long totalamount; private String totalamount;
/** /**
* 640 * 640
*/ */
private Long totalpayamount; private String totalpayamount;
/** /**
* 0 * 0
*/ */
private Long postageamount; private String postageamount;
/** /**
* 640 * 640
*/ */
private Long itemtotalamount; private String itemtotalamount;
private String totalfulfillqty; private String totalfulfillqty;
private String totalfulfillweight; private String totalfulfillweight;
private String totalfulfillvolume; private String totalfulfillvolume;
@ -176,7 +177,7 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 1 * 1
*/ */
private Long paymentstatus; private String paymentstatus;
/** /**
* 0 * 0
*/ */
@ -215,15 +216,15 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 0 * 0
*/ */
private Long codamount; private String codamount;
/** /**
* 0 * 0
*/ */
private Long tax; private String tax;
/** /**
* 1 * 1
*/ */
private Long taxpaid; private String taxpaid;
/** /**
* 交易成功时间 * 交易成功时间
*/ */

View File

@ -2,22 +2,22 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.plugin.lets.ofs.dao.impl.TocofsSaleoutDaoImpl"> <mapper namespace="com.hzya.frame.plugin.lets.ofs.dao.impl.TocofsSaleoutDaoImpl">
<resultMap id="get-TocofsSaleoutEntity-result" type="com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutEntity" > <resultMap id="get-TocofsSaleoutEntity-result" type="com.hzya.frame.plugin.lets.ofs.entity.TocofsSaleoutEntity" >
<result property="id" column="id" jdbcType="INTEGER"/> <result property="id" column="id" jdbcType="VARCHAR"/>
<result property="clientcode" column="clientCode" jdbcType="VARCHAR"/> <result property="clientcode" column="clientCode" jdbcType="VARCHAR"/>
<result property="companycode" column="companyCode" jdbcType="VARCHAR"/> <result property="companycode" column="companyCode" jdbcType="VARCHAR"/>
<result property="storecode" column="storeCode" jdbcType="VARCHAR"/> <result property="storecode" column="storeCode" jdbcType="VARCHAR"/>
<result property="facilitycode" column="facilityCode" jdbcType="VARCHAR"/> <result property="facilitycode" column="facilityCode" jdbcType="VARCHAR"/>
<result property="code" column="code" jdbcType="VARCHAR"/> <result property="code" column="code" jdbcType="VARCHAR"/>
<result property="reforderid" column="refOrderId" jdbcType="INTEGER"/> <result property="reforderid" column="refOrderId" jdbcType="VARCHAR"/>
<result property="refordercode" column="refOrderCode" jdbcType="VARCHAR"/> <result property="refordercode" column="refOrderCode" jdbcType="VARCHAR"/>
<result property="refordertype" column="refOrderType" jdbcType="VARCHAR"/> <result property="refordertype" column="refOrderType" jdbcType="VARCHAR"/>
<result property="status" column="status" jdbcType="INTEGER"/> <result property="status" column="status" jdbcType="VARCHAR"/>
<result property="consolidated" column="consolidated" jdbcType="INTEGER"/> <result property="consolidated" column="consolidated" jdbcType="VARCHAR"/>
<result property="internalinstructiontype" column="internalInstructionType" jdbcType="VARCHAR"/> <result property="internalinstructiontype" column="internalInstructionType" jdbcType="VARCHAR"/>
<result property="bizchannel" column="bizChannel" jdbcType="VARCHAR"/> <result property="bizchannel" column="bizChannel" jdbcType="VARCHAR"/>
<result property="sourceplatformcode" column="sourcePlatformCode" jdbcType="VARCHAR"/> <result property="sourceplatformcode" column="sourcePlatformCode" jdbcType="VARCHAR"/>
<result property="processtype" column="processType" jdbcType="VARCHAR"/> <result property="processtype" column="processType" jdbcType="VARCHAR"/>
<result property="sourceorderid" column="sourceOrderId" jdbcType="INTEGER"/> <result property="sourceorderid" column="sourceOrderId" jdbcType="VARCHAR"/>
<result property="sourceordercode" column="sourceOrderCode" jdbcType="VARCHAR"/> <result property="sourceordercode" column="sourceOrderCode" jdbcType="VARCHAR"/>
<result property="shiptoattentionto" column="shipToAttentionTo" jdbcType="VARCHAR"/> <result property="shiptoattentionto" column="shipToAttentionTo" jdbcType="VARCHAR"/>
<result property="sourceuseraccount" column="sourceUserAccount" jdbcType="VARCHAR"/> <result property="sourceuseraccount" column="sourceUserAccount" jdbcType="VARCHAR"/>
@ -27,19 +27,19 @@
<result property="shiptocity" column="shipToCity" jdbcType="VARCHAR"/> <result property="shiptocity" column="shipToCity" jdbcType="VARCHAR"/>
<result property="shiptodistrict" column="shipToDistrict" jdbcType="VARCHAR"/> <result property="shiptodistrict" column="shipToDistrict" jdbcType="VARCHAR"/>
<result property="shiptomobile" column="shipToMobile" jdbcType="VARCHAR"/> <result property="shiptomobile" column="shipToMobile" jdbcType="VARCHAR"/>
<result property="totallines" column="totalLines" jdbcType="INTEGER"/> <result property="totallines" column="totalLines" jdbcType="VARCHAR"/>
<result property="totalqty" column="totalQty" jdbcType="INTEGER"/> <result property="totalqty" column="totalQty" jdbcType="VARCHAR"/>
<result property="totalcontainers" column="totalContainers" jdbcType="INTEGER"/> <result property="totalcontainers" column="totalContainers" jdbcType="VARCHAR"/>
<result property="totalcases" column="totalCases" jdbcType="INTEGER"/> <result property="totalcases" column="totalCases" jdbcType="VARCHAR"/>
<result property="totalweight" column="totalWeight" jdbcType="INTEGER"/> <result property="totalweight" column="totalWeight" jdbcType="VARCHAR"/>
<result property="totalvolume" column="totalVolume" jdbcType="INTEGER"/> <result property="totalvolume" column="totalVolume" jdbcType="VARCHAR"/>
<result property="totalvolumeweight" column="totalVolumeWeight" jdbcType="INTEGER"/> <result property="totalvolumeweight" column="totalVolumeWeight" jdbcType="VARCHAR"/>
<result property="weightum" column="weightUM" jdbcType="VARCHAR"/> <result property="weightum" column="weightUM" jdbcType="VARCHAR"/>
<result property="volumeum" column="volumeUM" jdbcType="VARCHAR"/> <result property="volumeum" column="volumeUM" jdbcType="VARCHAR"/>
<result property="totalamount" column="totalAmount" jdbcType="INTEGER"/> <result property="totalamount" column="totalAmount" jdbcType="VARCHAR"/>
<result property="totalpayamount" column="totalPayAmount" jdbcType="INTEGER"/> <result property="totalpayamount" column="totalPayAmount" jdbcType="VARCHAR"/>
<result property="postageamount" column="postageAmount" jdbcType="INTEGER"/> <result property="postageamount" column="postageAmount" jdbcType="VARCHAR"/>
<result property="itemtotalamount" column="itemTotalAmount" jdbcType="INTEGER"/> <result property="itemtotalamount" column="itemTotalAmount" jdbcType="VARCHAR"/>
<result property="totalfulfillqty" column="totalFulfillQty" jdbcType="VARCHAR"/> <result property="totalfulfillqty" column="totalFulfillQty" jdbcType="VARCHAR"/>
<result property="totalfulfillweight" column="totalFulfillWeight" jdbcType="VARCHAR"/> <result property="totalfulfillweight" column="totalFulfillWeight" jdbcType="VARCHAR"/>
<result property="totalfulfillvolume" column="totalFulfillVolume" jdbcType="VARCHAR"/> <result property="totalfulfillvolume" column="totalFulfillVolume" jdbcType="VARCHAR"/>
@ -47,7 +47,7 @@
<result property="shipat" column="shipAt" jdbcType="VARCHAR"/> <result property="shipat" column="shipAt" jdbcType="VARCHAR"/>
<result property="carriercode" column="carrierCode" jdbcType="VARCHAR"/> <result property="carriercode" column="carrierCode" jdbcType="VARCHAR"/>
<result property="primarywaybillcode" column="primaryWaybillCode" jdbcType="VARCHAR"/> <result property="primarywaybillcode" column="primaryWaybillCode" jdbcType="VARCHAR"/>
<result property="paymentstatus" column="paymentStatus" jdbcType="INTEGER"/> <result property="paymentstatus" column="paymentStatus" jdbcType="VARCHAR"/>
<result property="codrequired" column="codRequired" jdbcType="VARCHAR"/> <result property="codrequired" column="codRequired" jdbcType="VARCHAR"/>
<result property="invoicerequired" column="invoiceRequired" jdbcType="VARCHAR"/> <result property="invoicerequired" column="invoiceRequired" jdbcType="VARCHAR"/>
<result property="paidat" column="paidAt" jdbcType="VARCHAR"/> <result property="paidat" column="paidAt" jdbcType="VARCHAR"/>
@ -62,9 +62,9 @@
<result property="shipfrommobile" column="shipFromMobile" jdbcType="VARCHAR"/> <result property="shipfrommobile" column="shipFromMobile" jdbcType="VARCHAR"/>
<result property="shipfromfax" column="shipFromFax" jdbcType="VARCHAR"/> <result property="shipfromfax" column="shipFromFax" jdbcType="VARCHAR"/>
<result property="shipfromemail" column="shipFromEmail" jdbcType="VARCHAR"/> <result property="shipfromemail" column="shipFromEmail" jdbcType="VARCHAR"/>
<result property="codamount" column="codAmount" jdbcType="INTEGER"/> <result property="codamount" column="codAmount" jdbcType="VARCHAR"/>
<result property="tax" column="tax" jdbcType="INTEGER"/> <result property="tax" column="tax" jdbcType="VARCHAR"/>
<result property="taxpaid" column="taxPaid" jdbcType="INTEGER"/> <result property="taxpaid" column="taxPaid" jdbcType="VARCHAR"/>
<result property="tradesuccessat" column="tradeSuccessAt" jdbcType="VARCHAR"/> <result property="tradesuccessat" column="tradeSuccessAt" jdbcType="VARCHAR"/>
<result property="sourceorderstatus" column="sourceOrderStatus" jdbcType="VARCHAR"/> <result property="sourceorderstatus" column="sourceOrderStatus" jdbcType="VARCHAR"/>
<result property="shiptostatename" column="shipToStateName" jdbcType="VARCHAR"/> <result property="shiptostatename" column="shipToStateName" jdbcType="VARCHAR"/>
@ -112,6 +112,7 @@
<result property="def39" column="def39" jdbcType="VARCHAR"/> <result property="def39" column="def39" jdbcType="VARCHAR"/>
<result property="def40" column="def40" jdbcType="VARCHAR"/> <result property="def40" column="def40" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<!-- 查询的字段--> <!-- 查询的字段-->
<sql id = "TocofsSaleoutEntity_Base_Column_List"> <sql id = "TocofsSaleoutEntity_Base_Column_List">
id id

View File

@ -137,41 +137,56 @@ public class ConsignmachiningIn extends PluginBaseEntity {
@Override @Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
long startMillis = System.currentTimeMillis(); Thread thread = new Thread(new Runnable() {
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件"); @Override
public void run() {
long startMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件");
try { try {
String param = String.valueOf(requestJson.get("param")); String param = String.valueOf(requestJson.get("param"));
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) { if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
//按单号推送 //按单号推送
if (param != null && !"".equals(param)) { if (param != null && !"".equals(param)) {
startImplement(param); startImplement(param);
} }
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) { } else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
//前台页面功能日期推送或者接口调用也行 //前台页面功能日期推送或者接口调用也行
String craeteDateStr = offsetTimeTime.computingTime(param); String craeteDateStr = offsetTimeTime.computingTime(param);
if (craeteDateStr != null && !"".equals(craeteDateStr)) { if (craeteDateStr != null && !"".equals(craeteDateStr)) {
splitDateAndPush(craeteDateStr); splitDateAndPush(craeteDateStr);
} }
} else if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) { } else if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
String integration_task_living_details_id = String.valueOf(requestJson.get("integration_task_living_details_id")); String integration_task_living_details_id = String.valueOf(requestJson.get("integration_task_living_details_id"));
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!"); Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id); IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) { if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
startImplement(integrationTaskLivingDetailsEntity.getRootAppBill()); startImplement(integrationTaskLivingDetailsEntity.getRootAppBill());
} }
} else { } else {
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) { if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
//默认被定时器执行实时执行计算时间偏移量 //默认被定时器执行实时执行计算时间偏移量
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime(); StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
startImplement(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time()); startImplement(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
}
}
} catch (Exception e) {
logger.error("executeBusiness-方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness-方法调用结束:" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
// return null;
}
}, "执行插件:" + getPluginName());
thread.start();
if (requestJson != null && requestJson.get("type") != null && ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join();抛出异常", e);
} }
} catch (Exception e) {
logger.error("executeBusiness-方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness-方法调用结束:" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
return null; return null;
} }

View File

@ -139,41 +139,56 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
@Override @Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
long startMillis = System.currentTimeMillis(); Thread thread = new Thread(new Runnable() {
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件"); @Override
public void run() {
long startMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件");
try { try {
String param = String.valueOf(requestJson.get("param")); String param = String.valueOf(requestJson.get("param"));
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) { if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
//按单号推送 //按单号推送
if (param != null && !"".equals(param)) { if (param != null && !"".equals(param)) {
startImplement(param); startImplement(param);
} }
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) { } else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
//前台页面功能日期推送或者接口调用也行 //前台页面功能日期推送或者接口调用也行
String craeteDateStr = offsetTimeTime.computingTime(param); String craeteDateStr = offsetTimeTime.computingTime(param);
if (craeteDateStr != null && !"".equals(craeteDateStr)) { if (craeteDateStr != null && !"".equals(craeteDateStr)) {
splitDateAndPush(craeteDateStr); splitDateAndPush(craeteDateStr);
} }
} else if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) { } else if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
String integration_task_living_details_id = String.valueOf(requestJson.get("integration_task_living_details_id")); String integration_task_living_details_id = String.valueOf(requestJson.get("integration_task_living_details_id"));
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!"); Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id); IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) { if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
startImplement(integrationTaskLivingDetailsEntity.getRootAppBill()); startImplement(integrationTaskLivingDetailsEntity.getRootAppBill());
} }
} else { } else {
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) { if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
//默认被定时器执行实时执行计算时间偏移量 //默认被定时器执行实时执行计算时间偏移量
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime(); StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
startImplementByTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time()); startImplementByTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
}
}
} catch (Exception e) {
logger.error("executeBusiness-方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
// return null;
}
}, "执行插件:" + getPluginName());
thread.start();
if (requestJson != null && requestJson.get("type") != null && ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join();抛出异常", e);
} }
} catch (Exception e) {
logger.error("executeBusiness-方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
return null; return null;
} }

View File

@ -136,41 +136,55 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
@Override @Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
long startMillis = System.currentTimeMillis(); Thread thread = new Thread(new Runnable() {
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件"); @Override
public void run() {
try { long startMillis = System.currentTimeMillis();
String param = String.valueOf(requestJson.get("param")); try {
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) { logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件");
//按单号推送 String param = String.valueOf(requestJson.get("param"));
if (param != null && !"".equals(param)) { if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
startImplement(param); //按单号推送
} if (param != null && !"".equals(param)) {
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) { startImplement(param);
//前台页面功能日期推送或者接口调用也行 }
String craeteDateStr = offsetTimeTime.computingTime(param); } else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
if (craeteDateStr != null && !"".equals(craeteDateStr)) { //前台页面功能日期推送或者接口调用也行
splitDateAndPush(craeteDateStr); String craeteDateStr = offsetTimeTime.computingTime(param);
} if (craeteDateStr != null && !"".equals(craeteDateStr)) {
} else if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) { splitDateAndPush(craeteDateStr);
String integration_task_living_details_id = String.valueOf(requestJson.get("integration_task_living_details_id")); }
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!"); } else if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id); String integration_task_living_details_id = String.valueOf(requestJson.get("integration_task_living_details_id"));
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) { Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
startImplement(integrationTaskLivingDetailsEntity.getRootAppBill()); IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
} if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
} else { startImplement(integrationTaskLivingDetailsEntity.getRootAppBill());
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) { }
//默认被定时器执行实时执行计算时间偏移量 } else {
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime(); if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
startImplement(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time()); //默认被定时器执行实时执行计算时间偏移量
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
startImplement(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
}
}
} catch (Exception e) {
logger.error("executeBusiness-方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
// return null;
}
}, "执行插件:" + getPluginName());
thread.start();
if (requestJson != null && requestJson.get("type") != null && ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join();抛出异常", e);
} }
} catch (Exception e) {
logger.error("executeBusiness-方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
return null; return null;
} }

View File

@ -130,41 +130,56 @@ public class ProxyPurchaseWarehousOrder extends PluginBaseEntity {
@Override @Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
long startMillis = System.currentTimeMillis(); Thread thread = new Thread(new Runnable() {
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件"); @Override
public void run() {
long startMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件");
try { try {
String param = String.valueOf(requestJson.get("param")); String param = String.valueOf(requestJson.get("param"));
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) { if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
//按单号推送 //按单号推送
if (param != null && !"".equals(param)) { if (param != null && !"".equals(param)) {
startImplementByCode(param); startImplementByCode(param);
} }
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) { } else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
//前台页面功能日期推送或者接口调用也行 //前台页面功能日期推送或者接口调用也行
String craeteDateStr = offsetTimeTime.computingTime(param); String craeteDateStr = offsetTimeTime.computingTime(param);
if (craeteDateStr != null && !"".equals(craeteDateStr)) { if (craeteDateStr != null && !"".equals(craeteDateStr)) {
splitDateAndPush(craeteDateStr); splitDateAndPush(craeteDateStr);
} }
} else if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) { } else if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
String integration_task_living_details_id = String.valueOf(requestJson.get("integration_task_living_details_id")); String integration_task_living_details_id = String.valueOf(requestJson.get("integration_task_living_details_id"));
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!"); Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id); IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) { if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
startImplementByCode(integrationTaskLivingDetailsEntity.getRootAppBill()); startImplementByCode(integrationTaskLivingDetailsEntity.getRootAppBill());
} }
} else { } else {
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) { if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
//默认被定时器执行实时执行计算时间偏移量 //默认被定时器执行实时执行计算时间偏移量
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime(); StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
startImplementByTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time()); startImplementByTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
}
}
} catch (Exception e) {
logger.error("executeBusiness-方法抛出异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
// return null;
}
}, "执行插件:" + getPluginName());
thread.start();
if (requestJson != null && requestJson.get("type") != null && ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join();抛出异常", e);
} }
} catch (Exception e) {
logger.error("executeBusiness-方法抛出异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
return null; return null;
} }

View File

@ -133,41 +133,56 @@ public class ProxyPurchaseWarehousWarehouse extends PluginBaseEntity {
@Override @Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
long startMillis = System.currentTimeMillis(); Thread thread = new Thread(new Runnable() {
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件"); @Override
public void run() {
long startMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件");
try { try {
String param = String.valueOf(requestJson.get("param")); String param = String.valueOf(requestJson.get("param"));
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) { if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
//按单号推送 //按单号推送
if (param != null && !"".equals(param)) { if (param != null && !"".equals(param)) {
startImplementByCode(param); startImplementByCode(param);
} }
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) { } else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
//前台页面功能日期推送或者接口调用也行 //前台页面功能日期推送或者接口调用也行
String craeteDateStr = offsetTimeTime.computingTime(param); String craeteDateStr = offsetTimeTime.computingTime(param);
if (craeteDateStr != null && !"".equals(craeteDateStr)) { if (craeteDateStr != null && !"".equals(craeteDateStr)) {
splitDateAndPush(craeteDateStr); splitDateAndPush(craeteDateStr);
} }
} else if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) { } else if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
String integration_task_living_details_id = String.valueOf(requestJson.get("integration_task_living_details_id")); String integration_task_living_details_id = String.valueOf(requestJson.get("integration_task_living_details_id"));
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!"); Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id); IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) { if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
startImplementByCode(integrationTaskLivingDetailsEntity.getRootAppBill()); startImplementByCode(integrationTaskLivingDetailsEntity.getRootAppBill());
} }
} else { } else {
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) { if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
//默认被定时器执行实时执行计算时间偏移量 //默认被定时器执行实时执行计算时间偏移量
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime(); StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
startImplementByTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time()); startImplementByTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
}
}
} catch (Exception e) {
logger.error("executeBusiness方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
// return null;
}
}, "执行插件:" + getPluginName());
thread.start();
if (requestJson != null && requestJson.get("type") != null && ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join();抛出异常", e);
} }
} catch (Exception e) {
logger.error("executeBusiness方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
return null; return null;
} }

View File

@ -111,40 +111,55 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
@Override @Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
long startMillis = System.currentTimeMillis(); Thread thread = new Thread(new Runnable() {
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件"); @Override
public void run() {
long startMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件");
try { try {
String param = String.valueOf(requestJson.get("param")); String param = String.valueOf(requestJson.get("param"));
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneTypestocktran String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneTypestocktran
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) { if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
//按单号 //按单号
Assert.notNull(sceneType, "sceneType参数不能为空"); Assert.notNull(sceneType, "sceneType参数不能为空");
Assert.notNull(!"".equals(sceneType), "sceneType参数不能为空"); Assert.notNull(!"".equals(sceneType), "sceneType参数不能为空");
if (param != null && !"".equals(param)) { if (param != null && !"".equals(param)) {
startImplementByCode(param, sceneType); startImplementByCode(param, sceneType);
} }
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) { } else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
//前台页面功能日期推送或者接口调用也行 //前台页面功能日期推送或者接口调用也行
Assert.notNull(sceneType, "sceneType参数不能为空"); Assert.notNull(sceneType, "sceneType参数不能为空");
Assert.notNull(!"".equals(sceneType), "sceneType参数不能为空"); Assert.notNull(!"".equals(sceneType), "sceneType参数不能为空");
String craeteDateStr = computingTime(param); String craeteDateStr = computingTime(param);
if (craeteDateStr != null && !"".equals(craeteDateStr)) { if (craeteDateStr != null && !"".equals(craeteDateStr)) {
splitDateAndPush(craeteDateStr, sceneType); splitDateAndPush(craeteDateStr, sceneType);
} }
} else { } else {
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) { if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
//实时执行每1分钟调度一次 //实时执行每1分钟调度一次
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime(); StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
startImplementByStockTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time()); startImplementByStockTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
startImplementByTranTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time()); startImplementByTranTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
}
}
} catch (Exception e) {
logger.error("executeBusiness-方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
// return null;
}
}, "执行插件:" + getPluginName());
thread.start();
if (requestJson != null && requestJson.get("type") != null && ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join();抛出异常", e);
} }
} catch (Exception e) {
logger.error("executeBusiness-方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
return null; return null;
} }
@ -219,51 +234,37 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
* *
* @author liuyang * @author liuyang
*/ */
public void startImplementByStockTime(String startTime, String endTime) { public void startImplementByStockTime(String startTime, String endTime) throws Exception {
long startMillis = System.currentTimeMillis(); long startMillis = System.currentTimeMillis();
String threadNameStr = StrUtil.format("OFS销售出库(TOB)同步U8C销售订单开始 同步日期:{} 汇总维度:{}", startTime, endTime); String threadNameStr = StrUtil.format("OFS销售出库(TOB)同步U8C销售订单开始 同步日期:{} 汇总维度:{}", startTime, endTime);
logger.info(threadNameStr); logger.info(threadNameStr);
Thread thread = new Thread(new Runnable() { Assert.notNull(startTime, "出库开始时间不能为空");
@Override Assert.notNull(endTime, "出库结束时间不能为空");
public void run() {
try {
Assert.notNull(startTime, "出库开始时间不能为空");
Assert.notNull(endTime, "出库结束时间不能为空");
// CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr); // CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr);
String tobShop = shopTobOrToCUtil.getCommaShop("TOB"); String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>(); List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setShipAt_start(startTime); queryOfsSoSaleOutVo.setShipAt_start(startTime);
queryOfsSoSaleOutVo.setShipAt_end(endTime); queryOfsSoSaleOutVo.setShipAt_end(endTime);
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
// queryOfsSoSaleOutVo.setCompanyCode("SHLZ"); // queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setStoreCode(tobShop); queryOfsSoSaleOutVo.setStoreCode(tobShop);
// queryOfsSoSaleOutVo.setCode("LETS-SH2024010200000004"); // queryOfsSoSaleOutVo.setCode("LETS-SH2024010200000004");
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search"); ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
logger.info("插件:{} (库存)O接口返回行数{} 时间段:{} {}", getPluginName(), headerDetailsDtoList.size(), startTime, endTime); logger.info("插件:{} (库存)O接口返回行数{} 时间段:{} {}", getPluginName(), headerDetailsDtoList.size(), startTime, endTime);
if (headerDetailsDtoList.size() > 0) { if (headerDetailsDtoList.size() > 0) {
getSetStock(headerDetailsDtoList); getSetStock(headerDetailsDtoList);
} else { } else {
logger.info("没有查询到任何数据!不需要同步"); logger.info("没有查询到任何数据!不需要同步");
}
} catch (Exception e) {
logger.error("startImplementByStockTime-方法抛出异常", e);
}
}
}, threadNameStr);
thread.start();
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
} }
long endMillis = System.currentTimeMillis(); long endMillis = System.currentTimeMillis();
String threadNameEnd = StrUtil.format("OFS销售出库(TOB)同步U8C销售订单结束 同步日期:{} 汇总维度:{} 耗时:{}", startTime, endTime, (endMillis - startMillis)); String threadNameEnd = StrUtil.format("OFS销售出库(TOB)同步U8C销售订单结束 同步日期:{} 汇总维度:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
logger.info(threadNameEnd); logger.info(threadNameEnd);
@ -274,51 +275,37 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
* *
* @author liuyang * @author liuyang
*/ */
public void startImplementByTranTime(String startTime, String endTime) { public void startImplementByTranTime(String startTime, String endTime) throws Exception {
long startMillis = System.currentTimeMillis(); long startMillis = System.currentTimeMillis();
String threadNameStrStart = StrUtil.format("OFS销售出库(TOB交易成功)同步U8C销售发票开始 开始时间:{} 结束时间:{}", startTime, endTime); String threadNameStrStart = StrUtil.format("OFS销售出库(TOB交易成功)同步U8C销售发票开始 开始时间:{} 结束时间:{}", startTime, endTime);
logger.info(threadNameStrStart); logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() { Assert.notNull(startTime, "交易开始时间不能为空");
@Override Assert.notNull(endTime, "交易结束时间不能为空");
public void run() {
try {
Assert.notNull(startTime, "交易开始时间不能为空");
Assert.notNull(endTime, "交易结束时间不能为空");
String tobShop = shopTobOrToCUtil.getCommaShop("TOB"); String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>(); List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
// queryOfsSoSaleOutVo.setShipAt_start(startTime); // queryOfsSoSaleOutVo.setShipAt_start(startTime);
// queryOfsSoSaleOutVo.setShipAt_end(endTime); // queryOfsSoSaleOutVo.setShipAt_end(endTime);
queryOfsSoSaleOutVo.setTradeSuccessAt_start(startTime); queryOfsSoSaleOutVo.setTradeSuccessAt_start(startTime);
queryOfsSoSaleOutVo.setTradeSuccessAt_end(endTime); queryOfsSoSaleOutVo.setTradeSuccessAt_end(endTime);
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
queryOfsSoSaleOutVo.setSourceOrderStatus("TRADE_FINISHED");//交易成功状态 queryOfsSoSaleOutVo.setSourceOrderStatus("TRADE_FINISHED");//交易成功状态
// queryOfsSoSaleOutVo.setStatus(900L); // queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setStoreCode(tobShop); queryOfsSoSaleOutVo.setStoreCode(tobShop);
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search"); ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
logger.info("插件:{} (确认收入)O接口返回行数{} 时间段:{} {}", getPluginName(), headerDetailsDtoList.size(), startTime, endTime); logger.info("插件:{} (确认收入)O接口返回行数{} 时间段:{} {}", getPluginName(), headerDetailsDtoList.size(), startTime, endTime);
if (headerDetailsDtoList.size() > 0) { if (headerDetailsDtoList.size() > 0) {
getSetStockTran(headerDetailsDtoList); getSetStockTran(headerDetailsDtoList);
} else { } else {
logger.info("没有查询到任何数据!不需要同步"); logger.info("没有查询到任何数据!不需要同步");
}
} catch (Exception e) {
logger.error("startImplementByTranTime-方法抛出异常", e);
}
}
}, threadNameStrStart);
thread.start();
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
} }
long endMillis = System.currentTimeMillis(); long endMillis = System.currentTimeMillis();
String threadNameStrEnd = StrUtil.format("OFS销售出库(TOB交易成功)同步U8C销售发票结束 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis)); String threadNameStrEnd = StrUtil.format("OFS销售出库(TOB交易成功)同步U8C销售发票结束 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
logger.info(threadNameStrEnd); logger.info(threadNameStrEnd);
@ -329,51 +316,37 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
* *
* @author liuyang * @author liuyang
*/ */
public void startImplementByCode(String code, String sceneType) { public void startImplementByCode(String code, String sceneType) throws Exception {
long startMillis = System.currentTimeMillis(); long startMillis = System.currentTimeMillis();
String threadNameStrStart = StrUtil.format("OFS销售出库(TOB)同步U8C销售订单开始 出库单单号:{}", code); String threadNameStrStart = StrUtil.format("OFS销售出库(TOB)同步U8C销售订单开始 出库单单号:{}", code);
logger.info(threadNameStrStart); logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() { Assert.notNull(code, "出库单单不能为空");
@Override String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
public void run() { logger.info("TOB-OFS店铺编码{}", tobShop);
try {
Assert.notNull(code, "出库单单不能为空");
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
logger.info("TOB-OFS店铺编码{}", tobShop);
List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>(); List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
//2024年8月30日 10:41:55 如果按编码查询是否应该考虑仅查询已发货的数据 //2024年8月30日 10:41:55 如果按编码查询是否应该考虑仅查询已发货的数据
queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setStoreCode(tobShop); queryOfsSoSaleOutVo.setStoreCode(tobShop);
queryOfsSoSaleOutVo.setCode(code); queryOfsSoSaleOutVo.setCode(code);
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search"); ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
logger.info("根据单据号查询:数据返回行数:{}", headerDetailsDtoList.size()); logger.info("根据单据号查询:数据返回行数:{}", headerDetailsDtoList.size());
if (headerDetailsDtoList.size() > 0) { if (headerDetailsDtoList.size() > 0) {
if (sceneType.equals("stock")) { if (sceneType.equals("stock")) {
getSetStock(headerDetailsDtoList); getSetStock(headerDetailsDtoList);
} else if (sceneType.equals("tran")) { } else if (sceneType.equals("tran")) {
getSetStockTran(headerDetailsDtoList); getSetStockTran(headerDetailsDtoList);
}
} else {
logger.info("没有查询到任何数据!不需要同步");
}
} catch (Exception e) {
logger.error("startImplementByCode方法抛出异常", e);
}
} }
}, threadNameStrStart); } else {
thread.start(); logger.info("没有查询到任何数据!不需要同步");
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
} }
long endMillis = System.currentTimeMillis(); long endMillis = System.currentTimeMillis();
String threadNameStrEnd = StrUtil.format("OFS销售出库(TOB)同步U8C销售订单结束 出库单单号:{} 耗时:{}", code, (endMillis - startMillis)); String threadNameStrEnd = StrUtil.format("OFS销售出库(TOB)同步U8C销售订单结束 出库单单号:{} 耗时:{}", code, (endMillis - startMillis));
logger.info(threadNameStrEnd); logger.info(threadNameStrEnd);

View File

@ -103,41 +103,57 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
@Override @Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
long startMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件"); Thread thread = new Thread(new Runnable() {
@Override
public void run() {
long startMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件");
// if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) { // if (ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
// throw new BaseSystemException("TOC退货业务无法按单行推送需要根据天的维度推送"); // throw new BaseSystemException("TOC退货业务无法按单行推送需要根据天的维度推送");
// } // }
try { try {
String param = String.valueOf(requestJson.get("param")); String param = String.valueOf(requestJson.get("param"));
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneTypestocktran String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneTypestocktran
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) { if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
//按单号 //按单号
if (param != null && !"".equals(param)) { if (param != null && !"".equals(param)) {
startImplementStockByCode(param, sceneType); startImplementStockByCode(param, sceneType);
} }
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) { } else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
//前台页面功能日期推送或者接口调用也行 //前台页面功能日期推送或者接口调用也行
String craeteDateStr = computingTime(param); String craeteDateStr = computingTime(param);
if (craeteDateStr != null && !"".equals(craeteDateStr)) { if (craeteDateStr != null && !"".equals(craeteDateStr)) {
splitDateAndPush(craeteDateStr, sceneType); splitDateAndPush(craeteDateStr, sceneType);
} }
} else { } else {
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) { if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
//默认被定时器执行每天晚上凌晨0点5分 //默认被定时器执行每天晚上凌晨0点5分
//暂定先同步TOC销售库存再推送TOC销售确认收入 //暂定先同步TOC销售库存再推送TOC销售确认收入
List<StartAndEndVo> startAndEndVos = calculateCalculateEntireDayPeriod(null); List<StartAndEndVo> startAndEndVos = calculateCalculateEntireDayPeriod(null);
startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time()); startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
startImplementTranByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time()); startImplementTranByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
}
}
} catch (Exception e) {
logger.error("executeBusiness方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
// return null;
}
}, "执行插件:" + getPluginName());
thread.start();
if (requestJson != null && requestJson.get("type") != null && ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join();抛出异常", e);
} }
} catch (Exception e) {
logger.error("executeBusiness方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
return null; return null;
} }
@ -176,60 +192,38 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
* @param endTime O出库结束时间 * @param endTime O出库结束时间
* @author liuyang * @author liuyang
*/ */
public void startImplementStockByTime(String startTime, String endTime) { public void startImplementStockByTime(String startTime, String endTime) throws Exception {
long startMillis = System.currentTimeMillis(); long startMillis = System.currentTimeMillis();
String threadNameStrStart = StrUtil.format("开始 OFS销售出库(TOC)同步U8C销售订单 开始 开始时间:{} 结束时间:{}", startTime, endTime); String threadNameStrStart = StrUtil.format("开始 OFS销售出库(TOC)同步U8C销售订单 开始 开始时间:{} 结束时间:{}", startTime, endTime);
logger.info(threadNameStrStart); logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() { Assert.notNull(startTime, "查询条件,开始时间不能为空!");
@Override Assert.notNull(endTime, "查询条件,结束时间不能为空!");
public void run() {
LOCK.lock();
try {
Assert.notNull(startTime, "查询条件,开始时间不能为空!");
Assert.notNull(endTime, "查询条件,结束时间不能为空!");
// CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr); // CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr);
String tobShop = shopTobOrToCUtil.getCommaShop("TOC"); String tobShop = shopTobOrToCUtil.getCommaShop("TOC");
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>(); List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
// queryOfsSoSaleOutVo.setShipAt_start(calculateDateVo.getStart_time()); // queryOfsSoSaleOutVo.setShipAt_start(calculateDateVo.getStart_time());
// queryOfsSoSaleOutVo.setShipAt_end(calculateDateVo.getEnd_time()); // queryOfsSoSaleOutVo.setShipAt_end(calculateDateVo.getEnd_time());
queryOfsSoSaleOutVo.setShipAt_start(startTime); queryOfsSoSaleOutVo.setShipAt_start(startTime);
queryOfsSoSaleOutVo.setShipAt_end(endTime); queryOfsSoSaleOutVo.setShipAt_end(endTime);
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(100L); queryOfsSoSaleOutVo.setPageSize(100L);
queryOfsSoSaleOutVo.setStoreCode(tobShop); queryOfsSoSaleOutVo.setStoreCode(tobShop);
// queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003"); // queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003");
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search"); ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
logger.info("数据返回行数:{}", headerDetailsDtoList.size()); logger.info("数据返回行数:{}", headerDetailsDtoList.size());
if (headerDetailsDtoList.size() > 0) { if (headerDetailsDtoList.size() > 0) {
getSetStock(headerDetailsDtoList); getSetStock(headerDetailsDtoList);
} else { } else {
logger.info("TOC没有查询到任何数据不需要同步"); logger.info("TOC没有查询到任何数据不需要同步");
}
} catch (Exception e) {
logger.error("startImplement方法抛出异常", e);
} finally {
// try {
// basicArchivesCacheUtil.clearCache();
// } catch (Exception e) {
// logger.info("清理档案缓存失败", e);
// }
LOCK.unlock();
}
}
}, threadNameStrStart);
thread.start();
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
} }
long endMillis = System.currentTimeMillis(); long endMillis = System.currentTimeMillis();
String threadNameStrEnd = StrUtil.format("结束 OFS销售出库(TOC)同步U8C销售订单 结束 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis)); String threadNameStrEnd = StrUtil.format("结束 OFS销售出库(TOC)同步U8C销售订单 结束 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
logger.info(threadNameStrEnd); logger.info(threadNameStrEnd);
@ -241,58 +235,36 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
* @param code O销售出库单编码 * @param code O销售出库单编码
* @author liuyang * @author liuyang
*/ */
public void startImplementStockByCode(String code, String sceneType) { public void startImplementStockByCode(String code, String sceneType) throws Exception {
long startMillis = System.currentTimeMillis(); long startMillis = System.currentTimeMillis();
String threadNameStrStart = StrUtil.format("OFS销售出库(TOC)同步U8C销售订单 开始 出库单单据号:{}", code); String threadNameStrStart = StrUtil.format("OFS销售出库(TOC)同步U8C销售订单 开始 出库单单据号:{}", code);
logger.info(threadNameStrStart); logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() { Assert.notNull(code, "O出库单编码不能为空code is null");
@Override Assert.notNull(sceneType, "场景类型不能为空!");
public void run() {
LOCK.lock();
try {
Assert.notNull(code, "O出库单编码不能为空code is null");
Assert.notNull(sceneType, "场景类型不能为空!");
String tobShop = shopTobOrToCUtil.getCommaShop("TOC"); String tobShop = shopTobOrToCUtil.getCommaShop("TOC");
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>(); List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
// queryOfsSoSaleOutVo.setStatus(900L); // queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(100L); queryOfsSoSaleOutVo.setPageSize(100L);
// queryOfsSoSaleOutVo.setStoreCode(tobShop); // queryOfsSoSaleOutVo.setStoreCode(tobShop);
queryOfsSoSaleOutVo.setCode(code); queryOfsSoSaleOutVo.setCode(code);
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search"); ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
logger.info("数据返回行数:{}", headerDetailsDtoList.size()); logger.info("数据返回行数:{}", headerDetailsDtoList.size());
if (headerDetailsDtoList.size() > 0) { if (headerDetailsDtoList.size() > 0) {
if (sceneType.equals("stock")) { if (sceneType.equals("stock")) {
getSetStock(headerDetailsDtoList); getSetStock(headerDetailsDtoList);
} else if (sceneType.equals("tran")) { } else if (sceneType.equals("tran")) {
getSetTran(headerDetailsDtoList); getSetTran(headerDetailsDtoList);
}
} else {
logger.info("没有查询到任何数据!不需要同步");
}
} catch (Exception e) {
logger.error("startImplementStockByCode-方法抛出异常", e);
} finally {
// try {
// basicArchivesCacheUtil.clearCache();
// } catch (Exception e) {
// logger.info("清理档案缓存失败", e);
// }
LOCK.unlock();
}
} }
}, threadNameStrStart); } else {
thread.start(); logger.info("没有查询到任何数据!不需要同步");
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
} }
long endMillis = System.currentTimeMillis(); long endMillis = System.currentTimeMillis();
String threadNameStrEnd = StrUtil.format("OFS销售出库(TOC)同步U8C销售订单 结束 出库单单据号:{} 耗时:{}", code, (endMillis - startMillis)); String threadNameStrEnd = StrUtil.format("OFS销售出库(TOC)同步U8C销售订单 结束 出库单单据号:{} 耗时:{}", code, (endMillis - startMillis));
logger.info(threadNameStrEnd); logger.info(threadNameStrEnd);
@ -305,61 +277,39 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
* @param endTime O交易完成结束时间 * @param endTime O交易完成结束时间
* @author liuyang * @author liuyang
*/ */
public void startImplementTranByTime(String startTime, String endTime) { public void startImplementTranByTime(String startTime, String endTime) throws Exception {
long startMillis = System.currentTimeMillis(); long startMillis = System.currentTimeMillis();
String threadNameStrStart = StrUtil.format("开始OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{}", startTime, endTime); String threadNameStrStart = StrUtil.format("开始OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{}", startTime, endTime);
logger.info(threadNameStrStart); logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() { Assert.notNull(startTime, "查询条件,开始时间不能为空!");
@Override Assert.notNull(endTime, "查询条件,结束时间不能为空!");
public void run() {
LOCK.lock();
try {
Assert.notNull(startTime, "查询条件,开始时间不能为空!");
Assert.notNull(endTime, "查询条件,结束时间不能为空!");
// CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr); // CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr);
String tocShop = shopTobOrToCUtil.getCommaShop("TOC"); String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>(); List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
// queryOfsSoSaleOutVo.setShipAt_start(calculateDateVo.getStart_time()); // queryOfsSoSaleOutVo.setShipAt_start(calculateDateVo.getStart_time());
// queryOfsSoSaleOutVo.setShipAt_end(calculateDateVo.getEnd_time()); // queryOfsSoSaleOutVo.setShipAt_end(calculateDateVo.getEnd_time());
queryOfsSoSaleOutVo.setTradeSuccessAt_start(startTime); queryOfsSoSaleOutVo.setTradeSuccessAt_start(startTime);
queryOfsSoSaleOutVo.setTradeSuccessAt_end(endTime); queryOfsSoSaleOutVo.setTradeSuccessAt_end(endTime);
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
queryOfsSoSaleOutVo.setSourceOrderStatus("TRADE_FINISHED");//交易成功状态 queryOfsSoSaleOutVo.setSourceOrderStatus("TRADE_FINISHED");//交易成功状态
// queryOfsSoSaleOutVo.setStatus(900L); // queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(100L); queryOfsSoSaleOutVo.setPageSize(100L);
queryOfsSoSaleOutVo.setStoreCode(tocShop); queryOfsSoSaleOutVo.setStoreCode(tocShop);
// queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003"); // queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003");
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search"); ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
logger.info("TOC数据返回行数{}", headerDetailsDtoList.size()); logger.info("TOC数据返回行数{}", headerDetailsDtoList.size());
if (headerDetailsDtoList.size() > 0) { if (headerDetailsDtoList.size() > 0) {
getSetTran(headerDetailsDtoList); getSetTran(headerDetailsDtoList);
} else { } else {
logger.info("TOC没有查询到任何数据不需要同步"); logger.info("TOC没有查询到任何数据不需要同步");
}
} catch (Exception e) {
logger.error("startImplementTranByTime-方法抛出异常", e);
} finally {
// try {
// basicArchivesCacheUtil.clearCache();
// } catch (Exception e) {
// logger.info("清理档案缓存失败", e);
// }
LOCK.unlock();
}
}
}, threadNameStrStart);
thread.start();
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
} }
long endMillis = System.currentTimeMillis(); long endMillis = System.currentTimeMillis();
String threadNameStrEnd = StrUtil.format("结束OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis)); String threadNameStrEnd = StrUtil.format("结束OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
logger.info(threadNameStrEnd); logger.info(threadNameStrEnd);

View File

@ -103,38 +103,53 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
@Override @Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
long startMillis = System.currentTimeMillis(); Thread thread = new Thread(new Runnable() {
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件"); @Override
public void run() {
long startMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件");
try { try {
String param = String.valueOf(requestJson.get("param")); String param = String.valueOf(requestJson.get("param"));
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneTypestocktran String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneTypestocktran
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) { if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
//按单号 //按单号
if (param != null && !"".equals(param)) { if (param != null && !"".equals(param)) {
startImplementByCode(param, sceneType); startImplementByCode(param, sceneType);
} }
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) { } else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
//前台页面功能日期推送或者接口调用也行 //前台页面功能日期推送或者接口调用也行
Assert.notNull(sceneType, "sceneType参数不能为空"); Assert.notNull(sceneType, "sceneType参数不能为空");
Assert.notNull(!"".equals(sceneType), "sceneType参数不能为空"); Assert.notNull(!"".equals(sceneType), "sceneType参数不能为空");
String craeteDateStr = computingTime(param); String craeteDateStr = computingTime(param);
if (craeteDateStr != null && !"".equals(craeteDateStr)) { if (craeteDateStr != null && !"".equals(craeteDateStr)) {
splitDateAndPush(craeteDateStr, sceneType); splitDateAndPush(craeteDateStr, sceneType);
} }
} else { } else {
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) { if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
//实时执行每1分钟调度一次 //实时执行每1分钟调度一次
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime(); StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
startImplementByStockTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time()); startImplementByStockTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
startImplementByTradeTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time()); startImplementByTradeTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
}
}
} catch (Exception e) {
logger.error("executeBusiness方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
// return null;
}
}, "执行插件:" + getPluginName());
thread.start();
if (requestJson != null && requestJson.get("type") != null && ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join();抛出异常", e);
} }
} catch (Exception e) {
logger.error("executeBusiness方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
return null; return null;
} }
@ -220,50 +235,36 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
* *
* @author liuyang * @author liuyang
*/ */
public void startImplementByStockTime(String startTime, String endTime) { public void startImplementByStockTime(String startTime, String endTime) throws Exception {
long startMillis = System.currentTimeMillis(); long startMillis = System.currentTimeMillis();
String threadNameStrStart = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{}", startTime, endTime); String threadNameStrStart = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{}", startTime, endTime);
logger.info(threadNameStrStart); logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() { Assert.notNull(startTime, "startTime不能为空");
@Override Assert.notNull(endTime, "endTime不能为空");
public void run() { //生成一个时间范围
try {
Assert.notNull(startTime, "startTime不能为空");
Assert.notNull(endTime, "endTime不能为空");
//生成一个时间范围
// StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime(); // StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
//2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性 //2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性
String tobShop = shopTobOrToCUtil.getCommaShop("TOB"); String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>(); List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setClosedAt_start(startTime); queryOfsSoSaleOutVo.setClosedAt_start(startTime);
queryOfsSoSaleOutVo.setClosedAt_end(endTime); queryOfsSoSaleOutVo.setClosedAt_end(endTime);
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setStoreCode(tobShop); queryOfsSoSaleOutVo.setStoreCode(tobShop);
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN"); queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
// queryOfsSoSaleOutVo.setCode("LETS-RE2024081900000001"); // queryOfsSoSaleOutVo.setCode("LETS-RE2024081900000001");
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search"); ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
logger.info("插件:{} (库存)O接口返回行数{} 时间段:{} {}", getPluginName(), returnGoodHeaderDetailsDataDtoArrayList.size(), startTime, endTime); logger.info("插件:{} (库存)O接口返回行数{} 时间段:{} {}", getPluginName(), returnGoodHeaderDetailsDataDtoArrayList.size(), startTime, endTime);
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) { if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
getSetStock(returnGoodHeaderDetailsDataDtoArrayList); getSetStock(returnGoodHeaderDetailsDataDtoArrayList);
} else { } else {
logger.info("没有查询到任何数据!不需要同步"); logger.info("没有查询到任何数据!不需要同步");
}
} catch (Exception e) {
logger.error("startImplementByStockTime-方法抛出异常", e);
}
}
}, threadNameStrStart);
thread.start();
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
} }
long endMillis = System.currentTimeMillis(); long endMillis = System.currentTimeMillis();
String threadNameStrEnd = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis)); String threadNameStrEnd = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
logger.info(threadNameStrEnd); logger.info(threadNameStrEnd);
@ -274,52 +275,38 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
* *
* @author liuyang * @author liuyang
*/ */
public void startImplementByTradeTime(String startTime, String endTime) { public void startImplementByTradeTime(String startTime, String endTime) throws Exception {
long startMillis = System.currentTimeMillis(); long startMillis = System.currentTimeMillis();
String threadNameStrStart = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{}", startTime, endTime); String threadNameStrStart = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{}", startTime, endTime);
logger.info(threadNameStrStart); logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() { Assert.notNull(startTime, "startTime不能为空");
@Override Assert.notNull(endTime, "endTime不能为空");
public void run() {
try {
Assert.notNull(startTime, "startTime不能为空");
Assert.notNull(endTime, "endTime不能为空");
//生成一个时间范围 //生成一个时间范围
// StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime(); // StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
//2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性 //2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性
String tobShop = shopTobOrToCUtil.getCommaShop("TOB"); String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>(); List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setRefundedAt_start(startTime); queryOfsSoSaleOutVo.setRefundedAt_start(startTime);
queryOfsSoSaleOutVo.setRefundedAt_end(endTime); queryOfsSoSaleOutVo.setRefundedAt_end(endTime);
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setStoreCode(tobShop); queryOfsSoSaleOutVo.setStoreCode(tobShop);
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN"); queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
queryOfsSoSaleOutVo.setRefundStatus("900"); queryOfsSoSaleOutVo.setRefundStatus("900");
// queryOfsSoSaleOutVo.setCode("LETS-RE2024081900000001"); // queryOfsSoSaleOutVo.setCode("LETS-RE2024081900000001");
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search"); ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
logger.info("插件:{} (确认收入)O接口返回行数{} 时间段:{} {}", getPluginName(), returnGoodHeaderDetailsDataDtoArrayList.size(), startTime, endTime); logger.info("插件:{} (确认收入)O接口返回行数{} 时间段:{} {}", getPluginName(), returnGoodHeaderDetailsDataDtoArrayList.size(), startTime, endTime);
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) { if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
getSetTrade(returnGoodHeaderDetailsDataDtoArrayList); getSetTrade(returnGoodHeaderDetailsDataDtoArrayList);
} else { } else {
logger.info("没有查询到任何数据!不需要同步"); logger.info("没有查询到任何数据!不需要同步");
}
} catch (Exception e) {
logger.error("startImplementByTradeTime-方法抛出异常", e);
}
}
}, threadNameStrStart);
thread.start();
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
} }
long endMillis = System.currentTimeMillis(); long endMillis = System.currentTimeMillis();
String threadNameStrEnd = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis)); String threadNameStrEnd = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
logger.info(threadNameStrEnd); logger.info(threadNameStrEnd);
@ -330,54 +317,40 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
* *
* @author liuyang * @author liuyang
*/ */
public void startImplementByCode(String code, String sceneType) { public void startImplementByCode(String code, String sceneType) throws Exception {
long startMillis = System.currentTimeMillis(); long startMillis = System.currentTimeMillis();
String threadNameStrStart = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 售后入库单号:{}", code); String threadNameStrStart = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 售后入库单号:{}", code);
logger.info(threadNameStrStart); logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() { Assert.notNull(code, "code不能为空");
@Override //生成一个时间范围
public void run() {
try {
Assert.notNull(code, "code不能为空");
//生成一个时间范围
// StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime(); // StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
//2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性 //2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性
String tobShop = shopTobOrToCUtil.getCommaShop("TOB"); String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>(); List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
// queryOfsSoSaleOutVo.setClosedAt_start("2002-01-01 00:00:00");// 2024年8月19日 17:13:35 仅作为接口参数验证O口头反馈根据单号查询不会启用时间范围搜索 // queryOfsSoSaleOutVo.setClosedAt_start("2002-01-01 00:00:00");// 2024年8月19日 17:13:35 仅作为接口参数验证O口头反馈根据单号查询不会启用时间范围搜索
// queryOfsSoSaleOutVo.setClosedAt_end("2002-01-01 23:59:59"); // queryOfsSoSaleOutVo.setClosedAt_end("2002-01-01 23:59:59");
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);
//测试 //测试
queryOfsSoSaleOutVo.setStoreCode(tobShop); queryOfsSoSaleOutVo.setStoreCode(tobShop);
queryOfsSoSaleOutVo.setCode(code); queryOfsSoSaleOutVo.setCode(code);
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN"); queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search"); ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size()); logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) { if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
if (sceneType.equals("stock")) { if (sceneType.equals("stock")) {
getSetStock(returnGoodHeaderDetailsDataDtoArrayList); getSetStock(returnGoodHeaderDetailsDataDtoArrayList);
} else if (sceneType.equals("tran")) { } else if (sceneType.equals("tran")) {
getSetTrade(returnGoodHeaderDetailsDataDtoArrayList); getSetTrade(returnGoodHeaderDetailsDataDtoArrayList);
}
} else {
logger.info("没有查询到任何数据!不需要同步");
}
} catch (Exception e) {
logger.error("startImplementByCode-方法抛出异常", e);
}
} }
}, threadNameStrStart); } else {
thread.start(); logger.info("没有查询到任何数据!不需要同步");
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
} }
long endMillis = System.currentTimeMillis(); long endMillis = System.currentTimeMillis();
String threadNameStrEnd = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 售后入库单号:{} 耗时:{}", code, (endMillis - startMillis)); String threadNameStrEnd = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 售后入库单号:{} 耗时:{}", code, (endMillis - startMillis));
logger.info(threadNameStrEnd); logger.info(threadNameStrEnd);

View File

@ -99,37 +99,52 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
@Override @Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception { public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
long startMillis = System.currentTimeMillis(); Thread thread = new Thread(new Runnable() {
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件"); @Override
public void run() {
long startMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用开始" + getPluginName() + "-插件");
try { try {
String param = String.valueOf(requestJson.get("param")); String param = String.valueOf(requestJson.get("param"));
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneTypestocktran String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneTypestocktran
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) { if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
//按单号 //按单号
if (param != null && !"".equals(param)) { if (param != null && !"".equals(param)) {
startImplementByCode(param, sceneType); startImplementByCode(param, sceneType);
} }
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) { } else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
//前台页面功能日期推送或者接口调用也行 //前台页面功能日期推送或者接口调用也行
String craeteDateStr = computingTime(param); String craeteDateStr = computingTime(param);
if (craeteDateStr != null && !"".equals(craeteDateStr)) { if (craeteDateStr != null && !"".equals(craeteDateStr)) {
splitDateAndPush(craeteDateStr, sceneType); splitDateAndPush(craeteDateStr, sceneType);
} }
} else { } else {
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) { if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
//默认被定时器执行每天晚上凌晨0点5分 //默认被定时器执行每天晚上凌晨0点5分
//暂定先同步TOC销售库存再推送TOC销售确认收入 //暂定先同步TOC销售库存再推送TOC销售确认收入
List<StartAndEndVo> startAndEndVos = calculateCalculateEntireDayPeriod(null); List<StartAndEndVo> startAndEndVos = calculateCalculateEntireDayPeriod(null);
startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time()); startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
startImplementByTradeTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time()); startImplementByTradeTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
}
}
} catch (Exception e) {
logger.error("executeBusiness方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
// return null;
}
}, "执行插件:" + getPluginName());
thread.start();
if (requestJson != null && requestJson.get("type") != null && ProfilesActiveConstant.TYPE_DETAIL_ERROR.equals(requestJson.get("type"))) {
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join();抛出异常", e);
} }
} catch (Exception e) {
logger.error("executeBusiness方法异常", e);
} }
long endMillis = System.currentTimeMillis();
logger.info("executeBusiness方法调用结束" + getPluginName() + "-插件 执行耗时:{}", (endMillis - startMillis));
return null; return null;
} }
@ -169,61 +184,39 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
* *
* @author liuyang * @author liuyang
*/ */
public void startImplementStockByTime(String startTime, String endTime) { public void startImplementStockByTime(String startTime, String endTime) throws Exception {
long startMillis = System.currentTimeMillis(); long startMillis = System.currentTimeMillis();
String threadNameStrStart = StrUtil.format("开始-OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{}", startTime, endTime); String threadNameStrStart = StrUtil.format("开始-OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{}", startTime, endTime);
logger.info(threadNameStrStart); logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() { Assert.notNull(startTime, "开始时间不能为空");
@Override Assert.notNull(endTime, "结束时间不能为空");
public void run() {
LOCK.lock();
try {
Assert.notNull(startTime, "开始时间不能为空");
Assert.notNull(endTime, "结束时间不能为空");
String tocShop = shopTobOrToCUtil.getCommaShop("TOC"); String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
// CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr); // CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr);
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>(); List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setClosedAt_start(startTime); queryOfsSoSaleOutVo.setClosedAt_start(startTime);
queryOfsSoSaleOutVo.setClosedAt_end(endTime); queryOfsSoSaleOutVo.setClosedAt_end(endTime);
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
//2024年8月22日 14:02:13 已经和O确认这个字段取消传递 //2024年8月22日 14:02:13 已经和O确认这个字段取消传递
// queryOfsSoSaleOutVo.setCompanyCode("SHLZ"); // queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setStoreCode(tocShop); queryOfsSoSaleOutVo.setStoreCode(tocShop);
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN"); queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
// queryOfsSoSaleOutVo.setCode("LETS-RE2024071600000001"); // queryOfsSoSaleOutVo.setCode("LETS-RE2024071600000001");
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search"); ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
logger.info("TOC退货数据返回行数{}", returnGoodHeaderDetailsDataDtoArrayList.size()); logger.info("TOC退货数据返回行数{}", returnGoodHeaderDetailsDataDtoArrayList.size());
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) { if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
getSetStock(returnGoodHeaderDetailsDataDtoArrayList); getSetStock(returnGoodHeaderDetailsDataDtoArrayList);
} else { } else {
logger.info("没有查询到任何数据!不需要同步"); logger.info("没有查询到任何数据!不需要同步");
}
} catch (Exception e) {
logger.error("startImplementStockByTime-方法抛出异常", e);
} finally {
// try {
// tocReturnBasicArchivesCacheUtil.clearCache();
// } catch (Exception e) {
// logger.info("清理档案缓存失败", e);
// }
LOCK.unlock();
}
}
}, threadNameStrStart);
thread.start();
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
} }
long endMillis = System.currentTimeMillis(); long endMillis = System.currentTimeMillis();
String threadNameStrEnd = StrUtil.format("结束-OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis)); String threadNameStrEnd = StrUtil.format("结束-OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
logger.info(threadNameStrEnd); logger.info(threadNameStrEnd);
@ -236,60 +229,38 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
* @param sceneType 场景类型 * @param sceneType 场景类型
* @author liuyang * @author liuyang
*/ */
public void startImplementByCode(String code, String sceneType) { public void startImplementByCode(String code, String sceneType) throws Exception {
long startMillis = System.currentTimeMillis(); long startMillis = System.currentTimeMillis();
String threadNameStrStart = StrUtil.format("开始-OFS销售出库(TOC)同步U8C销售订单 同步单据号:{} 业务场景:{}", code, sceneType); String threadNameStrStart = StrUtil.format("开始-OFS销售出库(TOC)同步U8C销售订单 同步单据号:{} 业务场景:{}", code, sceneType);
logger.info(threadNameStrStart); logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() { Assert.notNull(code, "code不能为空");
@Override Assert.notNull(sceneType, "sceneType不能为空");
public void run() {
LOCK.lock();
try {
Assert.notNull(code, "code不能为空");
Assert.notNull(sceneType, "sceneType不能为空");
String tocShop = shopTobOrToCUtil.getCommaShop("TOC"); String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoList = new ArrayList<>(); List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setInternalInstructionType("SALES"); queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
queryOfsSoSaleOutVo.setStatus(900L); queryOfsSoSaleOutVo.setStatus(900L);
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setStoreCode(tocShop); queryOfsSoSaleOutVo.setStoreCode(tocShop);
queryOfsSoSaleOutVo.setCode(code); queryOfsSoSaleOutVo.setCode(code);
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN"); queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoList, 1L, "ofs.receipt.search"); ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoList, 1L, "ofs.receipt.search");
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoList.size()); logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoList.size());
if (returnGoodHeaderDetailsDataDtoList.size() > 0) { if (returnGoodHeaderDetailsDataDtoList.size() > 0) {
if (sceneType.equals("stock")) { if (sceneType.equals("stock")) {
getSetStock(returnGoodHeaderDetailsDataDtoList); getSetStock(returnGoodHeaderDetailsDataDtoList);
} else if (sceneType.equals("tran")) { } else if (sceneType.equals("tran")) {
getSetTran(returnGoodHeaderDetailsDataDtoList); getSetTran(returnGoodHeaderDetailsDataDtoList);
}
} else {
logger.info("没有查询到任何数据!不需要同步");
}
} catch (Exception e) {
logger.error("startImplementByCode-方法抛出异常", e);
} finally {
// try {
// tocReturnBasicArchivesCacheUtil.clearCache();
// } catch (Exception e) {
// logger.info("清理档案缓存失败", e);
// }
LOCK.unlock();
}
} }
}, threadNameStrStart); } else {
thread.start(); logger.info("没有查询到任何数据!不需要同步");
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
} }
long endMillis = System.currentTimeMillis(); long endMillis = System.currentTimeMillis();
String threadNameStrEnd = StrUtil.format("结束-OFS销售出库(TOC)同步U8C销售订单 同步单据号:{} 业务场景:{} 耗时:{}", code, sceneType, (endMillis - startMillis)); String threadNameStrEnd = StrUtil.format("结束-OFS销售出库(TOC)同步U8C销售订单 同步单据号:{} 业务场景:{} 耗时:{}", code, sceneType, (endMillis - startMillis));
logger.info(threadNameStrEnd); logger.info(threadNameStrEnd);
@ -300,51 +271,37 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
* *
* @author liuyang * @author liuyang
*/ */
public void startImplementByTradeTime(String startTime, String endTime) { public void startImplementByTradeTime(String startTime, String endTime) throws Exception {
long startMillis = System.currentTimeMillis(); long startMillis = System.currentTimeMillis();
String threadNameStrStart = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{}", startTime, endTime); String threadNameStrStart = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{}", startTime, endTime);
logger.info(threadNameStrStart); logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() { Assert.notNull(startTime, "startTime不能为空");
@Override Assert.notNull(endTime, "endTime不能为空");
public void run() { //生成一个时间范围
try {
Assert.notNull(startTime, "startTime不能为空");
Assert.notNull(endTime, "endTime不能为空");
//生成一个时间范围
// StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime(); // StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
//2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性 //2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性
String tocShop = shopTobOrToCUtil.getCommaShop("TOC"); String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>(); List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo(); QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setRefundedAt_start(startTime); queryOfsSoSaleOutVo.setRefundedAt_start(startTime);
queryOfsSoSaleOutVo.setRefundedAt_end(endTime); queryOfsSoSaleOutVo.setRefundedAt_end(endTime);
queryOfsSoSaleOutVo.setClientCode("LETS"); queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setPageNo(1L); queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L); queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setStoreCode(tocShop); queryOfsSoSaleOutVo.setStoreCode(tocShop);
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN"); queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
queryOfsSoSaleOutVo.setRefundStatus("900"); queryOfsSoSaleOutVo.setRefundStatus("900");
// queryOfsSoSaleOutVo.setCode("LETS-RE2024081900000001"); // queryOfsSoSaleOutVo.setCode("LETS-RE2024081900000001");
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search"); ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size()); logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) { if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
getSetTran(returnGoodHeaderDetailsDataDtoArrayList); getSetTran(returnGoodHeaderDetailsDataDtoArrayList);
} else { } else {
logger.info("没有查询到任何数据!不需要同步"); logger.info("没有查询到任何数据!不需要同步");
}
} catch (Exception e) {
logger.error("startImplementByTradeTime-方法抛出异常", e);
}
}
}, threadNameStrStart);
thread.start();
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
} }
long endMillis = System.currentTimeMillis(); long endMillis = System.currentTimeMillis();
String threadNameStrEnd = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis)); String threadNameStrEnd = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
logger.info(threadNameStrEnd); logger.info(threadNameStrEnd);

View File

@ -78,7 +78,9 @@ class SoSaleOutPluginInitializerToCTest {
// soSaleOutPluginInitializerToC.splitDateAndPush(computingTime, "tran"); // soSaleOutPluginInitializerToC.splitDateAndPush(computingTime, "tran");
String s = "LETS-SH2024073100000004"; // String s = "LETS-SH2024073100000004";
soSaleOutPluginInitializerToC.startImplementStockByCode(s, "stock"); // soSaleOutPluginInitializerToC.startImplementStockByCode(s, "stock");
soSaleOutPluginInitializerToC.startImplementStockByTime("2024-09-24 16:35:43","2024-09-24 16:35:45");
} }
} }

View File

@ -36,7 +36,9 @@ public class SoSaleReturnPluginInitializerToBTest {
// soSaleReturnPluginInitializerToB.startImplementByTradeTime("2024-08-30 15:54:41", "2024-08-30 15:54:43"); // soSaleReturnPluginInitializerToB.startImplementByTradeTime("2024-08-30 15:54:41", "2024-08-30 15:54:43");
soSaleReturnPluginInitializerToB.startImplementByCode("LETS-RE2024091400000001", "tran"); // soSaleReturnPluginInitializerToB.startImplementByCode("LETS-RE2024091400000001", "tran");
soSaleReturnPluginInitializerToB.startImplementByStockTime("2024-09-24 16:52:49", "2024-09-24 16:52:52");
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -28,15 +28,14 @@ public class SoSaleReturnPluginInitializerToCTest {
@Test @Test
public void startImplement() { public void startImplement() {
// soSaleReturnPluginInitializerToC.startImplement(null, null); // soSaleReturnPluginInitializerToC.startImplement(null, null);
// try { try {
// String code = "LETS-RE2024091400000001"; String code = "LETS-RE2024091400000001";
// soSaleReturnPluginInitializerToC.startImplementByCode(code, "tran"); soSaleReturnPluginInitializerToC.startImplementByCode(code, "stock");
// } catch (Exception e) { } catch (Exception e) {
// e.printStackTrace(); e.printStackTrace();
// } }
// List<StartAndEndVo> startAndEndVos = soSaleReturnPluginInitializerToC.calculateCalculateEntireDayPeriod(null);
List<StartAndEndVo> startAndEndVos = soSaleReturnPluginInitializerToC.calculateCalculateEntireDayPeriod(null); // soSaleReturnPluginInitializerToC.startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
soSaleReturnPluginInitializerToC.startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
} }
} }

View File

@ -77,6 +77,7 @@ public class BeanUtil {
try { try {
// 忽略 null // 忽略 null
if (field.get(source) != null) { if (field.get(source) != null) {
logger.info("xxx:{}", field.getName());
if ("java.lang.Long".equals(it.getType().getName())) { if ("java.lang.Long".equals(it.getType().getName())) {
it.set(target, Long.valueOf(field.get(source) + "")); it.set(target, Long.valueOf(field.get(source) + ""));
} else { } else {

View File

@ -11,7 +11,6 @@ import lombok.Data;
*/ */
@Data @Data
public class TocofsReturngoodsDetailedEntity extends BaseEntity { public class TocofsReturngoodsDetailedEntity extends BaseEntity {
/** /**
* 81159 * 81159
*/ */

View File

@ -176,10 +176,10 @@
<if test="returncarrier != null and returncarrier != ''"> and returnCarrier = #{returncarrier} </if> <if test="returncarrier != null and returncarrier != ''"> and returnCarrier = #{returncarrier} </if>
<if test="refundedat != null and refundedat != ''"> and refundedAt = #{refundedat} </if> <if test="refundedat != null and refundedat != ''"> and refundedAt = #{refundedat} </if>
<if test="refundstatus != null and refundstatus != ''"> and refundStatus = #{refundstatus} </if> <if test="refundstatus != null and refundstatus != ''"> and refundStatus = #{refundstatus} </if>
and sts='Y' -- and sts='Y'
</trim> </trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if> <!-- <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> <!-- <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>-->
</select> </select>
<!-- 查询符合条件的数量 --> <!-- 查询符合条件的数量 -->

View File

@ -33,11 +33,11 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
/** /**
* 22814582 主键 * 22814582 主键
*/ */
private Long reforderid; private String reforderid;
/** /**
* 54604811 * 54604811
*/ */
private Long reforderdetailid; private String reforderdetailid;
/** /**
* LETS-SO2024031900000002 * LETS-SO2024031900000002
*/ */
@ -45,7 +45,7 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
/** /**
* 30766 * 30766
*/ */
private Long allocinvid; private String allocinvid;
/** /**
* 6973391732215 * 6973391732215
*/ */
@ -66,15 +66,15 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
/** /**
* 0 * 0
*/ */
private Long isgift; private String isgift;
/** /**
* 10 * 10
*/ */
private Long requestqty; private String requestqty;
/** /**
* 0 * 0
*/ */
private Long shipqty; private String shipqty;
private String shipat; private String shipat;
/** /**
* EA * EA
@ -83,27 +83,27 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
/** /**
* 64 * 64
*/ */
private Long listprice; private String listprice;
/** /**
* 640 * 640
*/ */
private Long itemtotalamount; private String itemtotalamount;
/** /**
* 640 * 640
*/ */
private Long totalpayamount; private String totalpayamount;
/** /**
* 0 * 0
*/ */
private Long totalweight; private String totalweight;
/** /**
* 0 * 0
*/ */
private Long totalvolume; private String totalvolume;
/** /**
* 0 * 0
*/ */
private Long totalvolumeweight; private String totalvolumeweight;
/** /**
* G * G
*/ */

View File

@ -290,31 +290,31 @@
,b.code headCode ,b.code headCode
from tocofs_saleout_detailed a left join tocofs_saleout b on a.mainTableId = b.id from tocofs_saleout_detailed a left join tocofs_saleout b on a.mainTableId = b.id
<trim prefix="where" prefixOverrides="and"> <trim prefix="where" prefixOverrides="and">
<if test="id != null"> and a.id = #{id} </if> <if test="id != null and id!=''"> and a.id = #{id} </if>
<if test="clientcode != null and clientcode != ''"> and a.clientCode = #{clientcode} </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="companycode != null and companycode != ''"> and a.companyCode = #{companycode} </if>
<if test="facilitycode != null and facilitycode != ''"> and a.facilityCode = #{facilitycode} </if> <if test="facilitycode != null and facilitycode != ''"> and a.facilityCode = #{facilitycode} </if>
<if test="shipmentcode != null and shipmentcode != ''"> and a.shipmentCode = #{shipmentcode} </if> <if test="shipmentcode != null and shipmentcode != ''"> and a.shipmentCode = #{shipmentcode} </if>
<if test="reforderid != null"> and a.refOrderId = #{reforderid} </if> <if test="reforderid != null and reforderid!=null"> and a.refOrderId = #{reforderid} </if>
<if test="reforderdetailid != null"> and a.refOrderDetailId = #{reforderdetailid} </if> <if test="reforderdetailid != null and reforderdetailid!=''"> and a.refOrderDetailId = #{reforderdetailid} </if>
<if test="refordercode != null and refordercode != ''"> and a.refOrderCode = #{refordercode} </if> <if test="refordercode != null and refordercode != ''"> and a.refOrderCode = #{refordercode} </if>
<if test="allocinvid != null"> and a.allocInvId = #{allocinvid} </if> <if test="allocinvid != null and allocinvid!=''"> and a.allocInvId = #{allocinvid} </if>
<if test="skucode != null and skucode != ''"> and a.skuCode = #{skucode} </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="skuname != null and skuname != ''"> and a.skuName = #{skuname} </if>
<if test="sourceordercode != null and sourceordercode != ''"> and a.sourceOrderCode = #{sourceordercode} </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="sourcelinenum != null and sourcelinenum != ''"> and a.sourceLineNum = #{sourcelinenum} </if>
<if test="inventorysts != null and inventorysts != ''"> and a.inventorySts = #{inventorysts} </if> <if test="inventorysts != null and inventorysts != ''"> and a.inventorySts = #{inventorysts} </if>
<if test="isgift != null"> and a.isGift = #{isgift} </if> <if test="isgift != null and isgift!=''"> and a.isGift = #{isgift} </if>
<if test="requestqty != null"> and a.requestQty = #{requestqty} </if> <if test="requestqty != null and requestqty!=''"> and a.requestQty = #{requestqty} </if>
<if test="shipqty != null"> and a.shipQty = #{shipqty} </if> <if test="shipqty != null and shipqty!=''"> and a.shipQty = #{shipqty} </if>
<if test="shipat != null and shipat != ''"> and a.shipAt = #{shipat} </if> <if test="shipat != null and shipat != ''"> and a.shipAt = #{shipat} </if>
<if test="quantityum != null and quantityum != ''"> and a.quantityUM = #{quantityum} </if> <if test="quantityum != null and quantityum != ''"> and a.quantityUM = #{quantityum} </if>
<if test="listprice != null"> and a.listPrice = #{listprice} </if> <if test="listprice != null and listprice!=''"> and a.listPrice = #{listprice} </if>
<if test="itemtotalamount != null"> and a.itemTotalAmount = #{itemtotalamount} </if> <if test="itemtotalamount != null and itemtotalamount!=''"> and a.itemTotalAmount = #{itemtotalamount} </if>
<if test="totalpayamount != null"> and a.totalPayAmount = #{totalpayamount} </if> <if test="totalpayamount != null and totalpayamount!=''"> and a.totalPayAmount = #{totalpayamount} </if>
<if test="totalweight != null"> and a.totalWeight = #{totalweight} </if> <if test="totalweight != null and totalweight!=''"> and a.totalWeight = #{totalweight} </if>
<if test="totalvolume != null"> and a.totalVolume = #{totalvolume} </if> <if test="totalvolume != null and totalvolume!=''"> and a.totalVolume = #{totalvolume} </if>
<if test="totalvolumeweight != null"> and a.totalVolumeWeight = #{totalvolumeweight} </if> <if test="totalvolumeweight != null and totalvolumeweight!=''"> and a.totalVolumeWeight = #{totalvolumeweight} </if>
<if test="weightum != null and weightum != ''"> and a.weightUM = #{weightum} </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="volumeum != null and volumeum != ''"> and a.volumeUM = #{volumeum} </if>
<if test="created != null and created != ''"> and a.created = #{created} </if> <if test="created != null and created != ''"> and a.created = #{created} </if>

View File

@ -34,7 +34,7 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 22814582 * 22814582
*/ */
private Long reforderid; private String reforderid;
/** /**
* LETS-SO2024031900000002 * LETS-SO2024031900000002
*/ */
@ -46,11 +46,11 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 510 * 510
*/ */
private Long status; private String status;
/** /**
* 0 * 0
*/ */
private Long consolidated; private String consolidated;
/** /**
* SALES * SALES
*/ */
@ -70,7 +70,7 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 0 * 0
*/ */
private Long sourceorderid; private String sourceorderid;
/** /**
* LETS-SO2024031900000002 * LETS-SO2024031900000002
*/ */
@ -110,31 +110,31 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 1 * 1
*/ */
private Long totallines; private String totallines;
/** /**
* 10 * 10
*/ */
private Long totalqty; private String totalqty;
/** /**
* 0 * 0
*/ */
private Long totalcontainers; private String totalcontainers;
/** /**
* 0 * 0
*/ */
private Long totalcases; private String totalcases;
/** /**
* 0 * 0
*/ */
private Long totalweight; private String totalweight;
/** /**
* 0 * 0
*/ */
private Long totalvolume; private String totalvolume;
/** /**
* 0 * 0
*/ */
private Long totalvolumeweight; private String totalvolumeweight;
/** /**
* G * G
*/ */
@ -146,19 +146,19 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 640 * 640
*/ */
private Long totalamount; private String totalamount;
/** /**
* 640 * 640
*/ */
private Long totalpayamount; private String totalpayamount;
/** /**
* 0 * 0
*/ */
private Long postageamount; private String postageamount;
/** /**
* 640 * 640
*/ */
private Long itemtotalamount; private String itemtotalamount;
private String totalfulfillqty; private String totalfulfillqty;
private String totalfulfillweight; private String totalfulfillweight;
private String totalfulfillvolume; private String totalfulfillvolume;
@ -175,7 +175,7 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 1 * 1
*/ */
private Long paymentstatus; private String paymentstatus;
/** /**
* 0 * 0
*/ */
@ -214,15 +214,15 @@ public class TocofsSaleoutEntity extends BaseEntity {
/** /**
* 0 * 0
*/ */
private Long codamount; private String codamount;
/** /**
* 0 * 0
*/ */
private Long tax; private String tax;
/** /**
* 1 * 1
*/ */
private Long taxpaid; private String taxpaid;
/** /**
* 交易成功时间 * 交易成功时间
*/ */

View File

@ -230,22 +230,22 @@
<include refid="TocofsSaleoutEntity_Base_Column_List" /> <include refid="TocofsSaleoutEntity_Base_Column_List" />
from tocofs_saleout from tocofs_saleout
<trim prefix="where" prefixOverrides="and"> <trim prefix="where" prefixOverrides="and">
<if test="id != null"> and id = #{id} </if> <if test="id != null and id !=''"> and id = #{id} </if>
<if test="clientcode != null and clientcode != ''"> and clientCode = #{clientcode} </if> <if test="clientcode != null and clientcode != ''"> and clientCode = #{clientcode} </if>
<if test="companycode != null and companycode != ''"> and companyCode = #{companycode} </if> <if test="companycode != null and companycode != ''"> and companyCode = #{companycode} </if>
<if test="storecode != null and storecode != ''"> and storeCode = #{storecode} </if> <if test="storecode != null and storecode != ''"> and storeCode = #{storecode} </if>
<if test="facilitycode != null and facilitycode != ''"> and facilityCode = #{facilitycode} </if> <if test="facilitycode != null and facilitycode != ''"> and facilityCode = #{facilitycode} </if>
<if test="code != null and code != ''"> and code = #{code} </if> <if test="code != null and code != ''"> and code = #{code} </if>
<if test="reforderid != null"> and refOrderId = #{reforderid} </if> <if test="reforderid != null and reforderid!=''"> and refOrderId = #{reforderid} </if>
<if test="refordercode != null and refordercode != ''"> and refOrderCode = #{refordercode} </if> <if test="refordercode != null and refordercode != ''"> and refOrderCode = #{refordercode} </if>
<if test="refordertype != null and refordertype != ''"> and refOrderType = #{refordertype} </if> <if test="refordertype != null and refordertype != ''"> and refOrderType = #{refordertype} </if>
<if test="status != null"> and status = #{status} </if> <if test="status != null and status!=''"> and status = #{status} </if>
<if test="consolidated != null"> and consolidated = #{consolidated} </if> <if test="consolidated != null and consolidated!=''"> and consolidated = #{consolidated} </if>
<if test="internalinstructiontype != null and internalinstructiontype != ''"> and internalInstructionType = #{internalinstructiontype} </if> <if test="internalinstructiontype != null and internalinstructiontype != ''"> and internalInstructionType = #{internalinstructiontype} </if>
<if test="bizchannel != null and bizchannel != ''"> and bizChannel = #{bizchannel} </if> <if test="bizchannel != null and bizchannel != ''"> and bizChannel = #{bizchannel} </if>
<if test="sourceplatformcode != null and sourceplatformcode != ''"> and sourcePlatformCode = #{sourceplatformcode} </if> <if test="sourceplatformcode != null and sourceplatformcode != ''"> and sourcePlatformCode = #{sourceplatformcode} </if>
<if test="processtype != null and processtype != ''"> and processType = #{processtype} </if> <if test="processtype != null and processtype != ''"> and processType = #{processtype} </if>
<if test="sourceorderid != null"> and sourceOrderId = #{sourceorderid} </if> <if test="sourceorderid != null and sourceorderid!=''"> and sourceOrderId = #{sourceorderid} </if>
<if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode = #{sourceordercode} </if> <if test="sourceordercode != null and sourceordercode != ''"> and sourceOrderCode = #{sourceordercode} </if>
<if test="shiptoattentionto != null and shiptoattentionto != ''"> and shipToAttentionTo = #{shiptoattentionto} </if> <if test="shiptoattentionto != null and shiptoattentionto != ''"> and shipToAttentionTo = #{shiptoattentionto} </if>
<if test="sourceuseraccount != null and sourceuseraccount != ''"> and sourceUserAccount = #{sourceuseraccount} </if> <if test="sourceuseraccount != null and sourceuseraccount != ''"> and sourceUserAccount = #{sourceuseraccount} </if>
@ -255,19 +255,19 @@
<if test="shiptocity != null and shiptocity != ''"> and shipToCity = #{shiptocity} </if> <if test="shiptocity != null and shiptocity != ''"> and shipToCity = #{shiptocity} </if>
<if test="shiptodistrict != null and shiptodistrict != ''"> and shipToDistrict = #{shiptodistrict} </if> <if test="shiptodistrict != null and shiptodistrict != ''"> and shipToDistrict = #{shiptodistrict} </if>
<if test="shiptomobile != null and shiptomobile != ''"> and shipToMobile = #{shiptomobile} </if> <if test="shiptomobile != null and shiptomobile != ''"> and shipToMobile = #{shiptomobile} </if>
<if test="totallines != null"> and totalLines = #{totallines} </if> <if test="totallines != null and totallines!=''"> and totalLines = #{totallines} </if>
<if test="totalqty != null"> and totalQty = #{totalqty} </if> <if test="totalqty != null and totalqty!=''"> and totalQty = #{totalqty} </if>
<if test="totalcontainers != null"> and totalContainers = #{totalcontainers} </if> <if test="totalcontainers != null and totalcontainers!=''"> and totalContainers = #{totalcontainers} </if>
<if test="totalcases != null"> and totalCases = #{totalcases} </if> <if test="totalcases != null and totalcases!=''"> and totalCases = #{totalcases} </if>
<if test="totalweight != null"> and totalWeight = #{totalweight} </if> <if test="totalweight != null and totalweight!=''"> and totalWeight = #{totalweight} </if>
<if test="totalvolume != null"> and totalVolume = #{totalvolume} </if> <if test="totalvolume != null and totalvolume!=''"> and totalVolume = #{totalvolume} </if>
<if test="totalvolumeweight != null"> and totalVolumeWeight = #{totalvolumeweight} </if> <if test="totalvolumeweight != null and totalvolumeweight!=''"> and totalVolumeWeight = #{totalvolumeweight} </if>
<if test="weightum != null and weightum != ''"> and weightUM = #{weightum} </if> <if test="weightum != null and weightum != ''"> and weightUM = #{weightum} </if>
<if test="volumeum != null and volumeum != ''"> and volumeUM = #{volumeum} </if> <if test="volumeum != null and volumeum != ''"> and volumeUM = #{volumeum} </if>
<if test="totalamount != null"> and totalAmount = #{totalamount} </if> <if test="totalamount != null and totalamount!=''"> and totalAmount = #{totalamount} </if>
<if test="totalpayamount != null"> and totalPayAmount = #{totalpayamount} </if> <if test="totalpayamount != null and totalpayamount!=''"> and totalPayAmount = #{totalpayamount} </if>
<if test="postageamount != null"> and postageAmount = #{postageamount} </if> <if test="postageamount != null and postageamount!=''"> and postageAmount = #{postageamount} </if>
<if test="itemtotalamount != null"> and itemTotalAmount = #{itemtotalamount} </if> <if test="itemtotalamount != null and itemtotalamount!=''"> and itemTotalAmount = #{itemtotalamount} </if>
<if test="totalfulfillqty != null and totalfulfillqty != ''"> and totalFulfillQty = #{totalfulfillqty} </if> <if test="totalfulfillqty != null and totalfulfillqty != ''"> and totalFulfillQty = #{totalfulfillqty} </if>
<if test="totalfulfillweight != null and totalfulfillweight != ''"> and totalFulfillWeight = #{totalfulfillweight} </if> <if test="totalfulfillweight != null and totalfulfillweight != ''"> and totalFulfillWeight = #{totalfulfillweight} </if>
<if test="totalfulfillvolume != null and totalfulfillvolume != ''"> and totalFulfillVolume = #{totalfulfillvolume} </if> <if test="totalfulfillvolume != null and totalfulfillvolume != ''"> and totalFulfillVolume = #{totalfulfillvolume} </if>
@ -275,7 +275,7 @@
<if test="shipat != null and shipat != ''"> and shipAt = #{shipat} </if> <if test="shipat != null and shipat != ''"> and shipAt = #{shipat} </if>
<if test="carriercode != null and carriercode != ''"> and carrierCode = #{carriercode} </if> <if test="carriercode != null and carriercode != ''"> and carrierCode = #{carriercode} </if>
<if test="primarywaybillcode != null and primarywaybillcode != ''"> and primaryWaybillCode = #{primarywaybillcode} </if> <if test="primarywaybillcode != null and primarywaybillcode != ''"> and primaryWaybillCode = #{primarywaybillcode} </if>
<if test="paymentstatus != null"> and paymentStatus = #{paymentstatus} </if> <if test="paymentstatus != null and paymentstatus!=''"> and paymentStatus = #{paymentstatus} </if>
<if test="codrequired != null and codrequired != ''"> and codRequired = #{codrequired} </if> <if test="codrequired != null and codrequired != ''"> and codRequired = #{codrequired} </if>
<if test="invoicerequired != null and invoicerequired != ''"> and invoiceRequired = #{invoicerequired} </if> <if test="invoicerequired != null and invoicerequired != ''"> and invoiceRequired = #{invoicerequired} </if>
<if test="paidat != null and paidat != ''"> and paidAt = #{paidat} </if> <if test="paidat != null and paidat != ''"> and paidAt = #{paidat} </if>
@ -290,9 +290,9 @@
<if test="shipfrommobile != null and shipfrommobile != ''"> and shipFromMobile = #{shipfrommobile} </if> <if test="shipfrommobile != null and shipfrommobile != ''"> and shipFromMobile = #{shipfrommobile} </if>
<if test="shipfromfax != null and shipfromfax != ''"> and shipFromFax = #{shipfromfax} </if> <if test="shipfromfax != null and shipfromfax != ''"> and shipFromFax = #{shipfromfax} </if>
<if test="shipfromemail != null and shipfromemail != ''"> and shipFromEmail = #{shipfromemail} </if> <if test="shipfromemail != null and shipfromemail != ''"> and shipFromEmail = #{shipfromemail} </if>
<if test="codamount != null"> and codAmount = #{codamount} </if> <if test="codamount != null and codamount!=''"> and codAmount = #{codamount} </if>
<if test="tax != null"> and tax = #{tax} </if> <if test="tax != null and tax!=''"> and tax = #{tax} </if>
<if test="taxpaid != null"> and taxPaid = #{taxpaid} </if> <if test="taxpaid != null and taxpaid!=''"> and taxPaid = #{taxpaid} </if>
<if test="tradesuccessat != null and tradesuccessat != ''"> and tradeSuccessAt = #{tradesuccessat} </if> <if test="tradesuccessat != null and tradesuccessat != ''"> and tradeSuccessAt = #{tradesuccessat} </if>
<if test="sourceorderstatus != null and sourceorderstatus != ''"> and sourceOrderStatus = #{sourceorderstatus} </if> <if test="sourceorderstatus != null and sourceorderstatus != ''"> and sourceOrderStatus = #{sourceorderstatus} </if>
<if test="shiptostatename != null and shiptostatename != ''"> and shipToStateName = #{shiptostatename} </if> <if test="shiptostatename != null and shiptostatename != ''"> and shipToStateName = #{shiptostatename} </if>