数据类型修改和多线程优化
- 实体类中整型字段改为字符串类型,以适配特定的数据库操作需求。 - 在数据映射文件中更新字段类型,保持与修改后的实体类一致。 - 重构executeBusiness方法,使用多线程异步执行业务逻辑,优化性能。
This commit is contained in:
parent
6c4ddb00a5
commit
23aa38c58f
|
@ -11,7 +11,6 @@ import lombok.Data;
|
|||
*/
|
||||
@Data
|
||||
public class TocofsReturngoodsDetailedEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 81159
|
||||
*/
|
||||
|
|
|
@ -33,11 +33,11 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
|
|||
/**
|
||||
* 22814582 主键
|
||||
*/
|
||||
private Long reforderid;
|
||||
private String reforderid;
|
||||
/**
|
||||
* 54604811
|
||||
*/
|
||||
private Long reforderdetailid;
|
||||
private String reforderdetailid;
|
||||
/**
|
||||
* LETS-SO2024031900000002
|
||||
*/
|
||||
|
@ -45,7 +45,7 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
|
|||
/**
|
||||
* 30766
|
||||
*/
|
||||
private Long allocinvid;
|
||||
private String allocinvid;
|
||||
/**
|
||||
* 6973391732215
|
||||
*/
|
||||
|
@ -66,15 +66,15 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
|
|||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long isgift;
|
||||
private String isgift;
|
||||
/**
|
||||
* 10
|
||||
*/
|
||||
private Long requestqty;
|
||||
private String requestqty;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long shipqty;
|
||||
private String shipqty;
|
||||
private String shipat;
|
||||
/**
|
||||
* EA
|
||||
|
@ -83,27 +83,27 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
|
|||
/**
|
||||
* 64
|
||||
*/
|
||||
private Long listprice;
|
||||
private String listprice;
|
||||
/**
|
||||
* 640
|
||||
*/
|
||||
private Long itemtotalamount;
|
||||
private String itemtotalamount;
|
||||
/**
|
||||
* 640
|
||||
*/
|
||||
private Long totalpayamount;
|
||||
private String totalpayamount;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalweight;
|
||||
private String totalweight;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalvolume;
|
||||
private String totalvolume;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalvolumeweight;
|
||||
private String totalvolumeweight;
|
||||
/**
|
||||
* G
|
||||
*/
|
||||
|
|
|
@ -2,31 +2,31 @@
|
|||
<!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">
|
||||
<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="companycode" column="companyCode" jdbcType="VARCHAR"/>
|
||||
<result property="facilitycode" column="facilityCode" jdbcType="VARCHAR"/>
|
||||
<result property="shipmentcode" column="shipmentCode" jdbcType="VARCHAR"/>
|
||||
<result property="reforderid" column="refOrderId" jdbcType="INTEGER"/>
|
||||
<result property="reforderdetailid" column="refOrderDetailId" jdbcType="INTEGER"/>
|
||||
<result property="reforderid" column="refOrderId" jdbcType="VARCHAR"/>
|
||||
<result property="reforderdetailid" column="refOrderDetailId" 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="skuname" column="skuName" jdbcType="VARCHAR"/>
|
||||
<result property="sourceordercode" column="sourceOrderCode" jdbcType="VARCHAR"/>
|
||||
<result property="sourcelinenum" column="sourceLineNum" jdbcType="VARCHAR"/>
|
||||
<result property="inventorysts" column="inventorySts" jdbcType="VARCHAR"/>
|
||||
<result property="isgift" column="isGift" jdbcType="INTEGER"/>
|
||||
<result property="requestqty" column="requestQty" jdbcType="INTEGER"/>
|
||||
<result property="shipqty" column="shipQty" jdbcType="INTEGER"/>
|
||||
<result property="isgift" column="isGift" jdbcType="VARCHAR"/>
|
||||
<result property="requestqty" column="requestQty" jdbcType="VARCHAR"/>
|
||||
<result property="shipqty" column="shipQty" jdbcType="VARCHAR"/>
|
||||
<result property="shipat" column="shipAt" jdbcType="VARCHAR"/>
|
||||
<result property="quantityum" column="quantityUM" jdbcType="VARCHAR"/>
|
||||
<result property="listprice" column="listPrice" jdbcType="INTEGER"/>
|
||||
<result property="itemtotalamount" column="itemTotalAmount" jdbcType="INTEGER"/>
|
||||
<result property="totalpayamount" column="totalPayAmount" jdbcType="INTEGER"/>
|
||||
<result property="totalweight" column="totalWeight" jdbcType="INTEGER"/>
|
||||
<result property="totalvolume" column="totalVolume" jdbcType="INTEGER"/>
|
||||
<result property="totalvolumeweight" column="totalVolumeWeight" jdbcType="INTEGER"/>
|
||||
<result property="listprice" column="listPrice" jdbcType="VARCHAR"/>
|
||||
<result property="itemtotalamount" column="itemTotalAmount" jdbcType="VARCHAR"/>
|
||||
<result property="totalpayamount" column="totalPayAmount" jdbcType="VARCHAR"/>
|
||||
<result property="totalweight" column="totalWeight" jdbcType="VARCHAR"/>
|
||||
<result property="totalvolume" column="totalVolume" jdbcType="VARCHAR"/>
|
||||
<result property="totalvolumeweight" column="totalVolumeWeight" jdbcType="VARCHAR"/>
|
||||
<result property="weightum" column="weightUM" jdbcType="VARCHAR"/>
|
||||
<result property="volumeum" column="volumeUM" jdbcType="VARCHAR"/>
|
||||
<result property="created" column="created" jdbcType="VARCHAR"/>
|
||||
|
|
|
@ -3,6 +3,8 @@ package com.hzya.frame.plugin.lets.ofs.entity;
|
|||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* O出库单表头(TOC、TOB业务底表)(TocofsSaleout)实体类
|
||||
*
|
||||
|
@ -11,7 +13,6 @@ import lombok.Data;
|
|||
*/
|
||||
@Data
|
||||
public class TocofsSaleoutEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* LETS
|
||||
*/
|
||||
|
@ -35,7 +36,7 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 22814582
|
||||
*/
|
||||
private Long reforderid;
|
||||
private String reforderid;
|
||||
/**
|
||||
* LETS-SO2024031900000002
|
||||
*/
|
||||
|
@ -47,11 +48,11 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 510
|
||||
*/
|
||||
private Long status;
|
||||
private String status;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long consolidated;
|
||||
private String consolidated;
|
||||
/**
|
||||
* SALES
|
||||
*/
|
||||
|
@ -71,7 +72,7 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long sourceorderid;
|
||||
private String sourceorderid;
|
||||
/**
|
||||
* LETS-SO2024031900000002
|
||||
*/
|
||||
|
@ -111,31 +112,31 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 1
|
||||
*/
|
||||
private Long totallines;
|
||||
private String totallines;
|
||||
/**
|
||||
* 10
|
||||
*/
|
||||
private Long totalqty;
|
||||
private String totalqty;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalcontainers;
|
||||
private String totalcontainers;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalcases;
|
||||
private String totalcases;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalweight;
|
||||
private String totalweight;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalvolume;
|
||||
private String totalvolume;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalvolumeweight;
|
||||
private String totalvolumeweight;
|
||||
/**
|
||||
* G
|
||||
*/
|
||||
|
@ -147,19 +148,19 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 640
|
||||
*/
|
||||
private Long totalamount;
|
||||
private String totalamount;
|
||||
/**
|
||||
* 640
|
||||
*/
|
||||
private Long totalpayamount;
|
||||
private String totalpayamount;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long postageamount;
|
||||
private String postageamount;
|
||||
/**
|
||||
* 640
|
||||
*/
|
||||
private Long itemtotalamount;
|
||||
private String itemtotalamount;
|
||||
private String totalfulfillqty;
|
||||
private String totalfulfillweight;
|
||||
private String totalfulfillvolume;
|
||||
|
@ -176,7 +177,7 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 1
|
||||
*/
|
||||
private Long paymentstatus;
|
||||
private String paymentstatus;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
|
@ -215,15 +216,15 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long codamount;
|
||||
private String codamount;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long tax;
|
||||
private String tax;
|
||||
/**
|
||||
* 1
|
||||
*/
|
||||
private Long taxpaid;
|
||||
private String taxpaid;
|
||||
/**
|
||||
* 交易成功时间
|
||||
*/
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
<!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">
|
||||
<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="companycode" column="companyCode" jdbcType="VARCHAR"/>
|
||||
<result property="storecode" column="storeCode" jdbcType="VARCHAR"/>
|
||||
<result property="facilitycode" column="facilityCode" 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="refordertype" column="refOrderType" jdbcType="VARCHAR"/>
|
||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||
<result property="consolidated" column="consolidated" jdbcType="INTEGER"/>
|
||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||
<result property="consolidated" column="consolidated" jdbcType="VARCHAR"/>
|
||||
<result property="internalinstructiontype" column="internalInstructionType" jdbcType="VARCHAR"/>
|
||||
<result property="bizchannel" column="bizChannel" jdbcType="VARCHAR"/>
|
||||
<result property="sourceplatformcode" column="sourcePlatformCode" 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="shiptoattentionto" column="shipToAttentionTo" jdbcType="VARCHAR"/>
|
||||
<result property="sourceuseraccount" column="sourceUserAccount" jdbcType="VARCHAR"/>
|
||||
|
@ -27,19 +27,19 @@
|
|||
<result property="shiptocity" column="shipToCity" jdbcType="VARCHAR"/>
|
||||
<result property="shiptodistrict" column="shipToDistrict" jdbcType="VARCHAR"/>
|
||||
<result property="shiptomobile" column="shipToMobile" jdbcType="VARCHAR"/>
|
||||
<result property="totallines" column="totalLines" jdbcType="INTEGER"/>
|
||||
<result property="totalqty" column="totalQty" jdbcType="INTEGER"/>
|
||||
<result property="totalcontainers" column="totalContainers" jdbcType="INTEGER"/>
|
||||
<result property="totalcases" column="totalCases" jdbcType="INTEGER"/>
|
||||
<result property="totalweight" column="totalWeight" jdbcType="INTEGER"/>
|
||||
<result property="totalvolume" column="totalVolume" jdbcType="INTEGER"/>
|
||||
<result property="totalvolumeweight" column="totalVolumeWeight" jdbcType="INTEGER"/>
|
||||
<result property="totallines" column="totalLines" jdbcType="VARCHAR"/>
|
||||
<result property="totalqty" column="totalQty" jdbcType="VARCHAR"/>
|
||||
<result property="totalcontainers" column="totalContainers" jdbcType="VARCHAR"/>
|
||||
<result property="totalcases" column="totalCases" jdbcType="VARCHAR"/>
|
||||
<result property="totalweight" column="totalWeight" jdbcType="VARCHAR"/>
|
||||
<result property="totalvolume" column="totalVolume" jdbcType="VARCHAR"/>
|
||||
<result property="totalvolumeweight" column="totalVolumeWeight" jdbcType="VARCHAR"/>
|
||||
<result property="weightum" column="weightUM" jdbcType="VARCHAR"/>
|
||||
<result property="volumeum" column="volumeUM" jdbcType="VARCHAR"/>
|
||||
<result property="totalamount" column="totalAmount" jdbcType="INTEGER"/>
|
||||
<result property="totalpayamount" column="totalPayAmount" jdbcType="INTEGER"/>
|
||||
<result property="postageamount" column="postageAmount" jdbcType="INTEGER"/>
|
||||
<result property="itemtotalamount" column="itemTotalAmount" jdbcType="INTEGER"/>
|
||||
<result property="totalamount" column="totalAmount" jdbcType="VARCHAR"/>
|
||||
<result property="totalpayamount" column="totalPayAmount" jdbcType="VARCHAR"/>
|
||||
<result property="postageamount" column="postageAmount" jdbcType="VARCHAR"/>
|
||||
<result property="itemtotalamount" column="itemTotalAmount" jdbcType="VARCHAR"/>
|
||||
<result property="totalfulfillqty" column="totalFulfillQty" jdbcType="VARCHAR"/>
|
||||
<result property="totalfulfillweight" column="totalFulfillWeight" jdbcType="VARCHAR"/>
|
||||
<result property="totalfulfillvolume" column="totalFulfillVolume" jdbcType="VARCHAR"/>
|
||||
|
@ -47,7 +47,7 @@
|
|||
<result property="shipat" column="shipAt" jdbcType="VARCHAR"/>
|
||||
<result property="carriercode" column="carrierCode" 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="invoicerequired" column="invoiceRequired" jdbcType="VARCHAR"/>
|
||||
<result property="paidat" column="paidAt" jdbcType="VARCHAR"/>
|
||||
|
@ -62,9 +62,9 @@
|
|||
<result property="shipfrommobile" column="shipFromMobile" jdbcType="VARCHAR"/>
|
||||
<result property="shipfromfax" column="shipFromFax" jdbcType="VARCHAR"/>
|
||||
<result property="shipfromemail" column="shipFromEmail" jdbcType="VARCHAR"/>
|
||||
<result property="codamount" column="codAmount" jdbcType="INTEGER"/>
|
||||
<result property="tax" column="tax" jdbcType="INTEGER"/>
|
||||
<result property="taxpaid" column="taxPaid" jdbcType="INTEGER"/>
|
||||
<result property="codamount" column="codAmount" jdbcType="VARCHAR"/>
|
||||
<result property="tax" column="tax" jdbcType="VARCHAR"/>
|
||||
<result property="taxpaid" column="taxPaid" jdbcType="VARCHAR"/>
|
||||
<result property="tradesuccessat" column="tradeSuccessAt" jdbcType="VARCHAR"/>
|
||||
<result property="sourceorderstatus" column="sourceOrderStatus" jdbcType="VARCHAR"/>
|
||||
<result property="shiptostatename" column="shipToStateName" jdbcType="VARCHAR"/>
|
||||
|
@ -112,6 +112,7 @@
|
|||
<result property="def39" column="def39" jdbcType="VARCHAR"/>
|
||||
<result property="def40" column="def40" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "TocofsSaleoutEntity_Base_Column_List">
|
||||
id
|
||||
|
|
|
@ -137,41 +137,56 @@ public class ConsignmachiningIn extends PluginBaseEntity {
|
|||
|
||||
@Override
|
||||
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() + "-插件");
|
||||
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号推送
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplement(param);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = offsetTimeTime.computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr);
|
||||
}
|
||||
} 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"));
|
||||
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
|
||||
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
|
||||
startImplement(integrationTaskLivingDetailsEntity.getRootAppBill());
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,实时执行,计算时间偏移量
|
||||
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
startImplement(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号推送
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplement(param);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = offsetTimeTime.computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr);
|
||||
}
|
||||
} 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"));
|
||||
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
|
||||
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
|
||||
startImplement(integrationTaskLivingDetailsEntity.getRootAppBill());
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,实时执行,计算时间偏移量
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -139,41 +139,56 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
|
|||
|
||||
@Override
|
||||
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() + "-插件");
|
||||
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号推送
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplement(param);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = offsetTimeTime.computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr);
|
||||
}
|
||||
} 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"));
|
||||
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
|
||||
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
|
||||
startImplement(integrationTaskLivingDetailsEntity.getRootAppBill());
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,实时执行,计算时间偏移量
|
||||
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
startImplementByTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号推送
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplement(param);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = offsetTimeTime.computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr);
|
||||
}
|
||||
} 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"));
|
||||
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
|
||||
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
|
||||
startImplement(integrationTaskLivingDetailsEntity.getRootAppBill());
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,实时执行,计算时间偏移量
|
||||
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -136,41 +136,55 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
|
|||
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
logger.info("executeBusiness方法调用开始:" + getPluginName() + "-插件");
|
||||
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号推送
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplement(param);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = offsetTimeTime.computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr);
|
||||
}
|
||||
} 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"));
|
||||
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
|
||||
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
|
||||
startImplement(integrationTaskLivingDetailsEntity.getRootAppBill());
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,实时执行,计算时间偏移量
|
||||
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
startImplement(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
try {
|
||||
logger.info("executeBusiness方法调用开始:" + getPluginName() + "-插件");
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号推送
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplement(param);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = offsetTimeTime.computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr);
|
||||
}
|
||||
} 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"));
|
||||
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
|
||||
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
|
||||
startImplement(integrationTaskLivingDetailsEntity.getRootAppBill());
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,实时执行,计算时间偏移量
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -130,41 +130,56 @@ public class ProxyPurchaseWarehousOrder extends PluginBaseEntity {
|
|||
|
||||
@Override
|
||||
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() + "-插件");
|
||||
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号推送
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplementByCode(param);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = offsetTimeTime.computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr);
|
||||
}
|
||||
} 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"));
|
||||
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
|
||||
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
|
||||
startImplementByCode(integrationTaskLivingDetailsEntity.getRootAppBill());
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,实时执行,计算时间偏移量
|
||||
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
startImplementByTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号推送
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplementByCode(param);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = offsetTimeTime.computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr);
|
||||
}
|
||||
} 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"));
|
||||
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
|
||||
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
|
||||
startImplementByCode(integrationTaskLivingDetailsEntity.getRootAppBill());
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,实时执行,计算时间偏移量
|
||||
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -133,41 +133,56 @@ public class ProxyPurchaseWarehousWarehouse extends PluginBaseEntity {
|
|||
|
||||
@Override
|
||||
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() + "-插件");
|
||||
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号推送
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplementByCode(param);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = offsetTimeTime.computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr);
|
||||
}
|
||||
} 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"));
|
||||
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
|
||||
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
|
||||
startImplementByCode(integrationTaskLivingDetailsEntity.getRootAppBill());
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,实时执行,计算时间偏移量
|
||||
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
startImplementByTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号推送
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplementByCode(param);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = offsetTimeTime.computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr);
|
||||
}
|
||||
} 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"));
|
||||
Assert.notNull(integration_task_living_details_id, "明细行主键不能为空!");
|
||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = saveOrUpdateBusinessLogUtil.queryIntegrationTaskLivingDetailsEntity(integration_task_living_details_id);
|
||||
if (integrationTaskLivingDetailsEntity != null && integrationTaskLivingDetailsEntity.getRootAppBill() != null) {
|
||||
startImplementByCode(integrationTaskLivingDetailsEntity.getRootAppBill());
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,实时执行,计算时间偏移量
|
||||
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,40 +111,55 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
|
||||
@Override
|
||||
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() + "-插件");
|
||||
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneType:stock、tran
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号
|
||||
Assert.notNull(sceneType, "sceneType参数不能为空");
|
||||
Assert.notNull(!"".equals(sceneType), "sceneType参数不能为空");
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplementByCode(param, sceneType);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
Assert.notNull(sceneType, "sceneType参数不能为空");
|
||||
Assert.notNull(!"".equals(sceneType), "sceneType参数不能为空");
|
||||
String craeteDateStr = computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr, sceneType);
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//实时执行,每1分钟调度一次
|
||||
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
startImplementByStockTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
|
||||
startImplementByTranTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneType:stock、tran
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号
|
||||
Assert.notNull(sceneType, "sceneType参数不能为空");
|
||||
Assert.notNull(!"".equals(sceneType), "sceneType参数不能为空");
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplementByCode(param, sceneType);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
Assert.notNull(sceneType, "sceneType参数不能为空");
|
||||
Assert.notNull(!"".equals(sceneType), "sceneType参数不能为空");
|
||||
String craeteDateStr = computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr, sceneType);
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//实时执行,每1分钟调度一次
|
||||
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
startImplementByStockTime(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;
|
||||
}
|
||||
|
||||
|
@ -219,51 +234,37 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
public void startImplementByStockTime(String startTime, String endTime) {
|
||||
public void startImplementByStockTime(String startTime, String endTime) throws Exception {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
String threadNameStr = StrUtil.format("OFS销售出库(TOB)同步U8C销售订单开始 同步日期:{} 汇总维度:{}", startTime, endTime);
|
||||
logger.info(threadNameStr);
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Assert.notNull(startTime, "出库开始时间不能为空");
|
||||
Assert.notNull(endTime, "出库结束时间不能为空");
|
||||
Assert.notNull(startTime, "出库开始时间不能为空");
|
||||
Assert.notNull(endTime, "出库结束时间不能为空");
|
||||
|
||||
// CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr);
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||
|
||||
List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setShipAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setShipAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setShipAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setShipAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
// queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
|
||||
queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
// queryOfsSoSaleOutVo.setCode("LETS-SH2024010200000004");
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("插件:{} (库存)O接口返回行数:{} 时间段:{} {}", getPluginName(), headerDetailsDtoList.size(), startTime, endTime);
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
getSetStock(headerDetailsDtoList);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("startImplementByStockTime-方法抛出异常", e);
|
||||
}
|
||||
}
|
||||
}, threadNameStr);
|
||||
thread.start();
|
||||
try {
|
||||
thread.join();
|
||||
} catch (Exception e) {
|
||||
logger.error("thread.join()异常", e);
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("插件:{} (库存)O接口返回行数:{} 时间段:{} {}", getPluginName(), headerDetailsDtoList.size(), startTime, endTime);
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
getSetStock(headerDetailsDtoList);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
|
||||
long endMillis = System.currentTimeMillis();
|
||||
String threadNameEnd = StrUtil.format("OFS销售出库(TOB)同步U8C销售订单结束 同步日期:{} 汇总维度:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
|
||||
logger.info(threadNameEnd);
|
||||
|
@ -274,51 +275,37 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
public void startImplementByTranTime(String startTime, String endTime) {
|
||||
public void startImplementByTranTime(String startTime, String endTime) throws Exception {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
String threadNameStrStart = StrUtil.format("OFS销售出库(TOB交易成功)同步U8C销售发票开始 开始时间:{} 结束时间:{}", startTime, endTime);
|
||||
logger.info(threadNameStrStart);
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Assert.notNull(startTime, "交易开始时间不能为空");
|
||||
Assert.notNull(endTime, "交易结束时间不能为空");
|
||||
Assert.notNull(startTime, "交易开始时间不能为空");
|
||||
Assert.notNull(endTime, "交易结束时间不能为空");
|
||||
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||
|
||||
List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
// queryOfsSoSaleOutVo.setShipAt_start(startTime);
|
||||
// queryOfsSoSaleOutVo.setShipAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setTradeSuccessAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setTradeSuccessAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
queryOfsSoSaleOutVo.setSourceOrderStatus("TRADE_FINISHED");//交易成功状态
|
||||
queryOfsSoSaleOutVo.setTradeSuccessAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setTradeSuccessAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
queryOfsSoSaleOutVo.setSourceOrderStatus("TRADE_FINISHED");//交易成功状态
|
||||
// queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("插件:{} (确认收入)O接口返回行数:{} 时间段:{} {}", getPluginName(), headerDetailsDtoList.size(), startTime, endTime);
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
getSetStockTran(headerDetailsDtoList);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("startImplementByTranTime-方法抛出异常", e);
|
||||
}
|
||||
}
|
||||
}, threadNameStrStart);
|
||||
thread.start();
|
||||
try {
|
||||
thread.join();
|
||||
} catch (Exception e) {
|
||||
logger.error("thread.join()异常", e);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("插件:{} (确认收入)O接口返回行数:{} 时间段:{} {}", getPluginName(), headerDetailsDtoList.size(), startTime, endTime);
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
getSetStockTran(headerDetailsDtoList);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
|
||||
long endMillis = System.currentTimeMillis();
|
||||
String threadNameStrEnd = StrUtil.format("OFS销售出库(TOB交易成功)同步U8C销售发票结束 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
|
||||
logger.info(threadNameStrEnd);
|
||||
|
@ -329,51 +316,37 @@ public class SoSaleOutPluginInitializerToB extends PluginBaseEntity {
|
|||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
public void startImplementByCode(String code, String sceneType) {
|
||||
public void startImplementByCode(String code, String sceneType) throws Exception {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
String threadNameStrStart = StrUtil.format("OFS销售出库(TOB)同步U8C销售订单开始 出库单单号:{}", code);
|
||||
logger.info(threadNameStrStart);
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Assert.notNull(code, "出库单单不能为空");
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||
logger.info("TOB-OFS店铺编码:{}", tobShop);
|
||||
Assert.notNull(code, "出库单单不能为空");
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||
logger.info("TOB-OFS店铺编码:{}", tobShop);
|
||||
|
||||
List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
//2024年8月30日 10:41:55 如果按编码查询,是否应该考虑仅查询已发货的数据?
|
||||
queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
queryOfsSoSaleOutVo.setCode(code);
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("根据单据号查询:数据返回行数:{}", headerDetailsDtoList.size());
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
if (sceneType.equals("stock")) {
|
||||
getSetStock(headerDetailsDtoList);
|
||||
} else if (sceneType.equals("tran")) {
|
||||
getSetStockTran(headerDetailsDtoList);
|
||||
}
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("startImplementByCode方法抛出异常", e);
|
||||
}
|
||||
List<HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
//2024年8月30日 10:41:55 如果按编码查询,是否应该考虑仅查询已发货的数据?
|
||||
queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
queryOfsSoSaleOutVo.setCode(code);
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("根据单据号查询:数据返回行数:{}", headerDetailsDtoList.size());
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
if (sceneType.equals("stock")) {
|
||||
getSetStock(headerDetailsDtoList);
|
||||
} else if (sceneType.equals("tran")) {
|
||||
getSetStockTran(headerDetailsDtoList);
|
||||
}
|
||||
}, threadNameStrStart);
|
||||
thread.start();
|
||||
try {
|
||||
thread.join();
|
||||
} catch (Exception e) {
|
||||
logger.error("thread.join()异常", e);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
|
||||
long endMillis = System.currentTimeMillis();
|
||||
String threadNameStrEnd = StrUtil.format("OFS销售出库(TOB)同步U8C销售订单结束 出库单单号:{} 耗时:{}", code, (endMillis - startMillis));
|
||||
logger.info(threadNameStrEnd);
|
||||
|
|
|
@ -103,41 +103,57 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
|
||||
@Override
|
||||
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"))) {
|
||||
// throw new BaseSystemException("TOC退货业务,无法按单行推送!需要根据天的维度推送");
|
||||
// }
|
||||
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneType:stock、tran
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplementStockByCode(param, sceneType);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr, sceneType);
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,每天晚上凌晨0点5分
|
||||
//暂定先同步TOC销售库存、再推送TOC销售确认收入
|
||||
List<StartAndEndVo> startAndEndVos = calculateCalculateEntireDayPeriod(null);
|
||||
startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||
startImplementTranByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneType:stock、tran
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplementStockByCode(param, sceneType);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr, sceneType);
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,每天晚上凌晨0点5分
|
||||
//暂定先同步TOC销售库存、再推送TOC销售确认收入
|
||||
List<StartAndEndVo> startAndEndVos = calculateCalculateEntireDayPeriod(null);
|
||||
startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||
startImplementTranByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||
}
|
||||
}
|
||||
} 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;
|
||||
}
|
||||
|
||||
|
@ -176,60 +192,38 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
* @param endTime O出库结束时间
|
||||
* @author liuyang
|
||||
*/
|
||||
public void startImplementStockByTime(String startTime, String endTime) {
|
||||
public void startImplementStockByTime(String startTime, String endTime) throws Exception {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
String threadNameStrStart = StrUtil.format("开始 OFS销售出库(TOC)同步U8C销售订单 开始 开始时间:{} 结束时间:{}", startTime, endTime);
|
||||
logger.info(threadNameStrStart);
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
LOCK.lock();
|
||||
try {
|
||||
Assert.notNull(startTime, "查询条件,开始时间不能为空!");
|
||||
Assert.notNull(endTime, "查询条件,结束时间不能为空!");
|
||||
Assert.notNull(startTime, "查询条件,开始时间不能为空!");
|
||||
Assert.notNull(endTime, "查询条件,结束时间不能为空!");
|
||||
|
||||
// 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<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
// queryOfsSoSaleOutVo.setShipAt_start(calculateDateVo.getStart_time());
|
||||
// queryOfsSoSaleOutVo.setShipAt_end(calculateDateVo.getEnd_time());
|
||||
queryOfsSoSaleOutVo.setShipAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setShipAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(100L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
queryOfsSoSaleOutVo.setShipAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setShipAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(100L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
// queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003");
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("数据返回行数:{}", headerDetailsDtoList.size());
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
getSetStock(headerDetailsDtoList);
|
||||
} else {
|
||||
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);
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("数据返回行数:{}", headerDetailsDtoList.size());
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
getSetStock(headerDetailsDtoList);
|
||||
} else {
|
||||
logger.info("TOC没有查询到任何数据!不需要同步");
|
||||
}
|
||||
|
||||
long endMillis = System.currentTimeMillis();
|
||||
String threadNameStrEnd = StrUtil.format("结束 OFS销售出库(TOC)同步U8C销售订单 结束 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
|
||||
logger.info(threadNameStrEnd);
|
||||
|
@ -241,58 +235,36 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
* @param code O销售出库单编码
|
||||
* @author liuyang
|
||||
*/
|
||||
public void startImplementStockByCode(String code, String sceneType) {
|
||||
public void startImplementStockByCode(String code, String sceneType) throws Exception {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
String threadNameStrStart = StrUtil.format("OFS销售出库(TOC)同步U8C销售订单 开始 出库单单据号:{}", code);
|
||||
logger.info(threadNameStrStart);
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
LOCK.lock();
|
||||
try {
|
||||
Assert.notNull(code, "O出库单编码不能为空!code is null!");
|
||||
Assert.notNull(sceneType, "场景类型不能为空!");
|
||||
Assert.notNull(code, "O出库单编码不能为空!code is null!");
|
||||
Assert.notNull(sceneType, "场景类型不能为空!");
|
||||
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
// queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(100L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(100L);
|
||||
// queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
queryOfsSoSaleOutVo.setCode(code);
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("数据返回行数:{}", headerDetailsDtoList.size());
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
if (sceneType.equals("stock")) {
|
||||
getSetStock(headerDetailsDtoList);
|
||||
} else if (sceneType.equals("tran")) {
|
||||
getSetTran(headerDetailsDtoList);
|
||||
}
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("startImplementStockByCode-方法抛出异常", e);
|
||||
} finally {
|
||||
// try {
|
||||
// basicArchivesCacheUtil.clearCache();
|
||||
// } catch (Exception e) {
|
||||
// logger.info("清理档案缓存失败", e);
|
||||
// }
|
||||
LOCK.unlock();
|
||||
}
|
||||
queryOfsSoSaleOutVo.setCode(code);
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("数据返回行数:{}", headerDetailsDtoList.size());
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
if (sceneType.equals("stock")) {
|
||||
getSetStock(headerDetailsDtoList);
|
||||
} else if (sceneType.equals("tran")) {
|
||||
getSetTran(headerDetailsDtoList);
|
||||
}
|
||||
}, threadNameStrStart);
|
||||
thread.start();
|
||||
try {
|
||||
thread.join();
|
||||
} catch (Exception e) {
|
||||
logger.error("thread.join()异常", e);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
|
||||
long endMillis = System.currentTimeMillis();
|
||||
String threadNameStrEnd = StrUtil.format("OFS销售出库(TOC)同步U8C销售订单 结束 出库单单据号:{} 耗时:{}", code, (endMillis - startMillis));
|
||||
logger.info(threadNameStrEnd);
|
||||
|
@ -305,61 +277,39 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
|||
* @param endTime O交易完成结束时间
|
||||
* @author liuyang
|
||||
*/
|
||||
public void startImplementTranByTime(String startTime, String endTime) {
|
||||
public void startImplementTranByTime(String startTime, String endTime) throws Exception {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
String threadNameStrStart = StrUtil.format("开始OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{}", startTime, endTime);
|
||||
logger.info(threadNameStrStart);
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
LOCK.lock();
|
||||
try {
|
||||
Assert.notNull(startTime, "查询条件,开始时间不能为空!");
|
||||
Assert.notNull(endTime, "查询条件,结束时间不能为空!");
|
||||
Assert.notNull(startTime, "查询条件,开始时间不能为空!");
|
||||
Assert.notNull(endTime, "查询条件,结束时间不能为空!");
|
||||
|
||||
// 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<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
List<com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto> headerDetailsDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
// queryOfsSoSaleOutVo.setShipAt_start(calculateDateVo.getStart_time());
|
||||
// queryOfsSoSaleOutVo.setShipAt_end(calculateDateVo.getEnd_time());
|
||||
queryOfsSoSaleOutVo.setTradeSuccessAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setTradeSuccessAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
queryOfsSoSaleOutVo.setSourceOrderStatus("TRADE_FINISHED");//交易成功状态
|
||||
queryOfsSoSaleOutVo.setTradeSuccessAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setTradeSuccessAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
queryOfsSoSaleOutVo.setSourceOrderStatus("TRADE_FINISHED");//交易成功状态
|
||||
// queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(100L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tocShop);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(100L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tocShop);
|
||||
// queryOfsSoSaleOutVo.setCode("LETS-SH2024070500000003");
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("TOC数据返回行数:{}", headerDetailsDtoList.size());
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
getSetTran(headerDetailsDtoList);
|
||||
} else {
|
||||
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);
|
||||
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.shipment.search");
|
||||
logger.info("TOC数据返回行数:{}", headerDetailsDtoList.size());
|
||||
if (headerDetailsDtoList.size() > 0) {
|
||||
getSetTran(headerDetailsDtoList);
|
||||
} else {
|
||||
logger.info("TOC没有查询到任何数据!不需要同步");
|
||||
}
|
||||
|
||||
long endMillis = System.currentTimeMillis();
|
||||
String threadNameStrEnd = StrUtil.format("结束OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
|
||||
logger.info(threadNameStrEnd);
|
||||
|
|
|
@ -103,38 +103,53 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
|
||||
@Override
|
||||
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() + "-插件");
|
||||
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneType:stock、tran
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplementByCode(param, sceneType);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
Assert.notNull(sceneType, "sceneType参数不能为空");
|
||||
Assert.notNull(!"".equals(sceneType), "sceneType参数不能为空");
|
||||
String craeteDateStr = computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr, sceneType);
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//实时执行,每1分钟调度一次
|
||||
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
startImplementByStockTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
|
||||
startImplementByTradeTime(startAndEndVo.getStart_time(), startAndEndVo.getEnd_time());
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneType:stock、tran
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplementByCode(param, sceneType);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
Assert.notNull(sceneType, "sceneType参数不能为空");
|
||||
Assert.notNull(!"".equals(sceneType), "sceneType参数不能为空");
|
||||
String craeteDateStr = computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr, sceneType);
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//实时执行,每1分钟调度一次
|
||||
StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
startImplementByStockTime(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;
|
||||
}
|
||||
|
||||
|
@ -220,50 +235,36 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
public void startImplementByStockTime(String startTime, String endTime) {
|
||||
public void startImplementByStockTime(String startTime, String endTime) throws Exception {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
String threadNameStrStart = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{}", startTime, endTime);
|
||||
logger.info(threadNameStrStart);
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Assert.notNull(startTime, "startTime不能为空");
|
||||
Assert.notNull(endTime, "endTime不能为空");
|
||||
//生成一个时间范围
|
||||
Assert.notNull(startTime, "startTime不能为空");
|
||||
Assert.notNull(endTime, "endTime不能为空");
|
||||
//生成一个时间范围
|
||||
// StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
//2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||
//2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||
|
||||
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setClosedAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setClosedAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
|
||||
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setClosedAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setClosedAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
|
||||
// queryOfsSoSaleOutVo.setCode("LETS-RE2024081900000001");
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("插件:{} (库存)O接口返回行数:{} 时间段:{} {}", getPluginName(), returnGoodHeaderDetailsDataDtoArrayList.size(), startTime, endTime);
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
getSetStock(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("startImplementByStockTime-方法抛出异常", e);
|
||||
}
|
||||
}
|
||||
}, threadNameStrStart);
|
||||
thread.start();
|
||||
try {
|
||||
thread.join();
|
||||
} catch (Exception e) {
|
||||
logger.error("thread.join()异常", e);
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("插件:{} (库存)O接口返回行数:{} 时间段:{} {}", getPluginName(), returnGoodHeaderDetailsDataDtoArrayList.size(), startTime, endTime);
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
getSetStock(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
|
||||
long endMillis = System.currentTimeMillis();
|
||||
String threadNameStrEnd = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
|
||||
logger.info(threadNameStrEnd);
|
||||
|
@ -274,52 +275,38 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
public void startImplementByTradeTime(String startTime, String endTime) {
|
||||
public void startImplementByTradeTime(String startTime, String endTime) throws Exception {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
String threadNameStrStart = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{}", startTime, endTime);
|
||||
logger.info(threadNameStrStart);
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Assert.notNull(startTime, "startTime不能为空");
|
||||
Assert.notNull(endTime, "endTime不能为空");
|
||||
Assert.notNull(startTime, "startTime不能为空");
|
||||
Assert.notNull(endTime, "endTime不能为空");
|
||||
|
||||
//生成一个时间范围
|
||||
//生成一个时间范围
|
||||
// StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
//2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||
//2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||
|
||||
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setRefundedAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setRefundedAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
|
||||
queryOfsSoSaleOutVo.setRefundStatus("900");
|
||||
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setRefundedAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setRefundedAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
|
||||
queryOfsSoSaleOutVo.setRefundStatus("900");
|
||||
// queryOfsSoSaleOutVo.setCode("LETS-RE2024081900000001");
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("插件:{} (确认收入)O接口返回行数:{} 时间段:{} {}", getPluginName(), returnGoodHeaderDetailsDataDtoArrayList.size(), startTime, endTime);
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
getSetTrade(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("startImplementByTradeTime-方法抛出异常", e);
|
||||
}
|
||||
}
|
||||
}, threadNameStrStart);
|
||||
thread.start();
|
||||
try {
|
||||
thread.join();
|
||||
} catch (Exception e) {
|
||||
logger.error("thread.join()异常", e);
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("插件:{} (确认收入)O接口返回行数:{} 时间段:{} {}", getPluginName(), returnGoodHeaderDetailsDataDtoArrayList.size(), startTime, endTime);
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
getSetTrade(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
|
||||
long endMillis = System.currentTimeMillis();
|
||||
String threadNameStrEnd = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
|
||||
logger.info(threadNameStrEnd);
|
||||
|
@ -330,54 +317,40 @@ public class SoSaleReturnPluginInitializerToB extends PluginBaseEntity {
|
|||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
public void startImplementByCode(String code, String sceneType) {
|
||||
public void startImplementByCode(String code, String sceneType) throws Exception {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
String threadNameStrStart = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 售后入库单号:{}", code);
|
||||
logger.info(threadNameStrStart);
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Assert.notNull(code, "code不能为空");
|
||||
//生成一个时间范围
|
||||
|
||||
Assert.notNull(code, "code不能为空");
|
||||
//生成一个时间范围
|
||||
// StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
//2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||
//2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性
|
||||
String tobShop = shopTobOrToCUtil.getCommaShop("TOB");
|
||||
|
||||
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
// 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.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
//测试
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
queryOfsSoSaleOutVo.setCode(code);
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
if (sceneType.equals("stock")) {
|
||||
getSetStock(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
} else if (sceneType.equals("tran")) {
|
||||
getSetTrade(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
}
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("startImplementByCode-方法抛出异常", e);
|
||||
}
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
//测试
|
||||
queryOfsSoSaleOutVo.setStoreCode(tobShop);
|
||||
queryOfsSoSaleOutVo.setCode(code);
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
if (sceneType.equals("stock")) {
|
||||
getSetStock(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
} else if (sceneType.equals("tran")) {
|
||||
getSetTrade(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
}
|
||||
}, threadNameStrStart);
|
||||
thread.start();
|
||||
try {
|
||||
thread.join();
|
||||
} catch (Exception e) {
|
||||
logger.error("thread.join()异常", e);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
|
||||
long endMillis = System.currentTimeMillis();
|
||||
String threadNameStrEnd = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 售后入库单号:{} 耗时:{}", code, (endMillis - startMillis));
|
||||
logger.info(threadNameStrEnd);
|
||||
|
|
|
@ -99,37 +99,52 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
|||
|
||||
@Override
|
||||
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() + "-插件");
|
||||
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneType:stock、tran
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplementByCode(param, sceneType);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr, sceneType);
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,每天晚上凌晨0点5分
|
||||
//暂定先同步TOC销售库存、再推送TOC销售确认收入
|
||||
List<StartAndEndVo> startAndEndVos = calculateCalculateEntireDayPeriod(null);
|
||||
startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||
startImplementByTradeTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||
try {
|
||||
String param = String.valueOf(requestJson.get("param"));
|
||||
String sceneType = String.valueOf(requestJson.get("sceneType"));//sceneType:stock、tran
|
||||
if (ProfilesActiveConstant.TYPE_VBILLCODE.equals(requestJson.get("type"))) {
|
||||
//按单号
|
||||
if (param != null && !"".equals(param)) {
|
||||
startImplementByCode(param, sceneType);
|
||||
}
|
||||
} else if (ProfilesActiveConstant.TYPE_TIME_FRAME.equals(requestJson.get("type"))) {
|
||||
//前台页面功能日期推送,或者接口调用也行
|
||||
String craeteDateStr = computingTime(param);
|
||||
if (craeteDateStr != null && !"".equals(craeteDateStr)) {
|
||||
splitDateAndPush(craeteDateStr, sceneType);
|
||||
}
|
||||
} else {
|
||||
if (ProfilesActiveConstant.LETS_PROFILES_ACTIVE.equals(PROD_FILED)) {
|
||||
//默认被定时器执行,每天晚上凌晨0点5分
|
||||
//暂定先同步TOC销售库存、再推送TOC销售确认收入
|
||||
List<StartAndEndVo> startAndEndVos = calculateCalculateEntireDayPeriod(null);
|
||||
startImplementStockByTime(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;
|
||||
}
|
||||
|
||||
|
@ -169,61 +184,39 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
|||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
public void startImplementStockByTime(String startTime, String endTime) {
|
||||
public void startImplementStockByTime(String startTime, String endTime) throws Exception {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
String threadNameStrStart = StrUtil.format("开始-OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{}", startTime, endTime);
|
||||
logger.info(threadNameStrStart);
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
LOCK.lock();
|
||||
try {
|
||||
Assert.notNull(startTime, "开始时间不能为空");
|
||||
Assert.notNull(endTime, "结束时间不能为空");
|
||||
Assert.notNull(startTime, "开始时间不能为空");
|
||||
Assert.notNull(endTime, "结束时间不能为空");
|
||||
|
||||
String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||
String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||
// CalculateDateVo calculateDateVo = DateStrUtil.calculateCalculateEntireDayPeriod(dateStr);
|
||||
|
||||
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setClosedAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setClosedAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
//2024年8月22日 14:02:13 已经和O确认,这个字段取消传递!
|
||||
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setClosedAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setClosedAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
//2024年8月22日 14:02:13 已经和O确认,这个字段取消传递!
|
||||
// queryOfsSoSaleOutVo.setCompanyCode("SHLZ");
|
||||
queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tocShop);
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
|
||||
queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tocShop);
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
|
||||
// queryOfsSoSaleOutVo.setCode("LETS-RE2024071600000001");
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("TOC退货数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
getSetStock(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
} else {
|
||||
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);
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("TOC退货数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
getSetStock(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
|
||||
long endMillis = System.currentTimeMillis();
|
||||
String threadNameStrEnd = StrUtil.format("结束-OFS销售出库(TOC)同步U8C销售订单 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
|
||||
logger.info(threadNameStrEnd);
|
||||
|
@ -236,60 +229,38 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
|||
* @param sceneType 场景类型
|
||||
* @author liuyang
|
||||
*/
|
||||
public void startImplementByCode(String code, String sceneType) {
|
||||
public void startImplementByCode(String code, String sceneType) throws Exception {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
String threadNameStrStart = StrUtil.format("开始-OFS销售出库(TOC)同步U8C销售订单 同步单据号:{} 业务场景:{}", code, sceneType);
|
||||
logger.info(threadNameStrStart);
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
LOCK.lock();
|
||||
try {
|
||||
Assert.notNull(code, "code不能为空");
|
||||
Assert.notNull(sceneType, "sceneType不能为空");
|
||||
Assert.notNull(code, "code不能为空");
|
||||
Assert.notNull(sceneType, "sceneType不能为空");
|
||||
|
||||
String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||
String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||
|
||||
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tocShop);
|
||||
queryOfsSoSaleOutVo.setCode(code);
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoList, 1L, "ofs.receipt.search");
|
||||
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoList.size());
|
||||
if (returnGoodHeaderDetailsDataDtoList.size() > 0) {
|
||||
if (sceneType.equals("stock")) {
|
||||
getSetStock(returnGoodHeaderDetailsDataDtoList);
|
||||
} else if (sceneType.equals("tran")) {
|
||||
getSetTran(returnGoodHeaderDetailsDataDtoList);
|
||||
}
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("startImplementByCode-方法抛出异常", e);
|
||||
} finally {
|
||||
// try {
|
||||
// tocReturnBasicArchivesCacheUtil.clearCache();
|
||||
// } catch (Exception e) {
|
||||
// logger.info("清理档案缓存失败", e);
|
||||
// }
|
||||
LOCK.unlock();
|
||||
}
|
||||
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("SALES");
|
||||
queryOfsSoSaleOutVo.setStatus(900L);
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tocShop);
|
||||
queryOfsSoSaleOutVo.setCode(code);
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoList, 1L, "ofs.receipt.search");
|
||||
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoList.size());
|
||||
if (returnGoodHeaderDetailsDataDtoList.size() > 0) {
|
||||
if (sceneType.equals("stock")) {
|
||||
getSetStock(returnGoodHeaderDetailsDataDtoList);
|
||||
} else if (sceneType.equals("tran")) {
|
||||
getSetTran(returnGoodHeaderDetailsDataDtoList);
|
||||
}
|
||||
}, threadNameStrStart);
|
||||
thread.start();
|
||||
try {
|
||||
thread.join();
|
||||
} catch (Exception e) {
|
||||
logger.error("thread.join()异常", e);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
|
||||
long endMillis = System.currentTimeMillis();
|
||||
String threadNameStrEnd = StrUtil.format("结束-OFS销售出库(TOC)同步U8C销售订单 同步单据号:{} 业务场景:{} 耗时:{}", code, sceneType, (endMillis - startMillis));
|
||||
logger.info(threadNameStrEnd);
|
||||
|
@ -300,51 +271,37 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
|||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
public void startImplementByTradeTime(String startTime, String endTime) {
|
||||
public void startImplementByTradeTime(String startTime, String endTime) throws Exception {
|
||||
long startMillis = System.currentTimeMillis();
|
||||
String threadNameStrStart = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{}", startTime, endTime);
|
||||
logger.info(threadNameStrStart);
|
||||
|
||||
Thread thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Assert.notNull(startTime, "startTime不能为空");
|
||||
Assert.notNull(endTime, "endTime不能为空");
|
||||
//生成一个时间范围
|
||||
Assert.notNull(startTime, "startTime不能为空");
|
||||
Assert.notNull(endTime, "endTime不能为空");
|
||||
//生成一个时间范围
|
||||
// StartAndEndVo startAndEndVo = offsetTimeTime.offsetTime();
|
||||
//2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性
|
||||
String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||
//2024年8月19日 15:47:51 查询出U8C里标记的店铺TOB属性
|
||||
String tocShop = shopTobOrToCUtil.getCommaShop("TOC");
|
||||
|
||||
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setRefundedAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setRefundedAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tocShop);
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
|
||||
queryOfsSoSaleOutVo.setRefundStatus("900");
|
||||
List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
|
||||
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
queryOfsSoSaleOutVo.setRefundedAt_start(startTime);
|
||||
queryOfsSoSaleOutVo.setRefundedAt_end(endTime);
|
||||
queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
queryOfsSoSaleOutVo.setPageSize(50L);
|
||||
queryOfsSoSaleOutVo.setStoreCode(tocShop);
|
||||
queryOfsSoSaleOutVo.setInternalInstructionType("RETURN");
|
||||
queryOfsSoSaleOutVo.setRefundStatus("900");
|
||||
// queryOfsSoSaleOutVo.setCode("LETS-RE2024081900000001");
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
getSetTran(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("startImplementByTradeTime-方法抛出异常", e);
|
||||
}
|
||||
}
|
||||
}, threadNameStrStart);
|
||||
thread.start();
|
||||
try {
|
||||
thread.join();
|
||||
} catch (Exception e) {
|
||||
logger.error("thread.join()异常", e);
|
||||
ofsStandardUtil.queryOfsReturnGoods(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.receipt.search");
|
||||
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
|
||||
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
|
||||
getSetTran(returnGoodHeaderDetailsDataDtoArrayList);
|
||||
} else {
|
||||
logger.info("没有查询到任何数据!不需要同步");
|
||||
}
|
||||
|
||||
long endMillis = System.currentTimeMillis();
|
||||
String threadNameStrEnd = StrUtil.format("OFS售后入库(TOB)同步U8C销售订单(库存同步) 开始时间:{} 结束时间:{} 耗时:{}", startTime, endTime, (endMillis - startMillis));
|
||||
logger.info(threadNameStrEnd);
|
||||
|
|
|
@ -78,7 +78,9 @@ class SoSaleOutPluginInitializerToCTest {
|
|||
// soSaleOutPluginInitializerToC.splitDateAndPush(computingTime, "tran");
|
||||
|
||||
|
||||
String s = "LETS-SH2024073100000004";
|
||||
soSaleOutPluginInitializerToC.startImplementStockByCode(s, "stock");
|
||||
// String s = "LETS-SH2024073100000004";
|
||||
// soSaleOutPluginInitializerToC.startImplementStockByCode(s, "stock");
|
||||
|
||||
soSaleOutPluginInitializerToC.startImplementStockByTime("2024-09-24 16:35:43","2024-09-24 16:35:45");
|
||||
}
|
||||
}
|
|
@ -36,7 +36,9 @@ public class SoSaleReturnPluginInitializerToBTest {
|
|||
// 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) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -28,15 +28,14 @@ public class SoSaleReturnPluginInitializerToCTest {
|
|||
@Test
|
||||
public void startImplement() {
|
||||
// soSaleReturnPluginInitializerToC.startImplement(null, null);
|
||||
// try {
|
||||
// String code = "LETS-RE2024091400000001";
|
||||
// soSaleReturnPluginInitializerToC.startImplementByCode(code, "tran");
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
try {
|
||||
String code = "LETS-RE2024091400000001";
|
||||
soSaleReturnPluginInitializerToC.startImplementByCode(code, "stock");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
List<StartAndEndVo> startAndEndVos = soSaleReturnPluginInitializerToC.calculateCalculateEntireDayPeriod(null);
|
||||
soSaleReturnPluginInitializerToC.startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||
// List<StartAndEndVo> startAndEndVos = soSaleReturnPluginInitializerToC.calculateCalculateEntireDayPeriod(null);
|
||||
// soSaleReturnPluginInitializerToC.startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||
}
|
||||
}
|
|
@ -77,6 +77,7 @@ public class BeanUtil {
|
|||
try {
|
||||
// 忽略 null
|
||||
if (field.get(source) != null) {
|
||||
logger.info("xxx:{}", field.getName());
|
||||
if ("java.lang.Long".equals(it.getType().getName())) {
|
||||
it.set(target, Long.valueOf(field.get(source) + ""));
|
||||
} else {
|
||||
|
|
|
@ -11,7 +11,6 @@ import lombok.Data;
|
|||
*/
|
||||
@Data
|
||||
public class TocofsReturngoodsDetailedEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 81159
|
||||
*/
|
||||
|
|
|
@ -176,10 +176,10 @@
|
|||
<if test="returncarrier != null and returncarrier != ''"> and returnCarrier = #{returncarrier} </if>
|
||||
<if test="refundedat != null and refundedat != ''"> and refundedAt = #{refundedat} </if>
|
||||
<if test="refundstatus != null and refundstatus != ''"> and refundStatus = #{refundstatus} </if>
|
||||
and sts='Y'
|
||||
-- and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
<!-- <if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>-->
|
||||
<!-- <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>-->
|
||||
</select>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
|
|
|
@ -33,11 +33,11 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
|
|||
/**
|
||||
* 22814582 主键
|
||||
*/
|
||||
private Long reforderid;
|
||||
private String reforderid;
|
||||
/**
|
||||
* 54604811
|
||||
*/
|
||||
private Long reforderdetailid;
|
||||
private String reforderdetailid;
|
||||
/**
|
||||
* LETS-SO2024031900000002
|
||||
*/
|
||||
|
@ -45,7 +45,7 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
|
|||
/**
|
||||
* 30766
|
||||
*/
|
||||
private Long allocinvid;
|
||||
private String allocinvid;
|
||||
/**
|
||||
* 6973391732215
|
||||
*/
|
||||
|
@ -66,15 +66,15 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
|
|||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long isgift;
|
||||
private String isgift;
|
||||
/**
|
||||
* 10
|
||||
*/
|
||||
private Long requestqty;
|
||||
private String requestqty;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long shipqty;
|
||||
private String shipqty;
|
||||
private String shipat;
|
||||
/**
|
||||
* EA
|
||||
|
@ -83,27 +83,27 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
|
|||
/**
|
||||
* 64
|
||||
*/
|
||||
private Long listprice;
|
||||
private String listprice;
|
||||
/**
|
||||
* 640
|
||||
*/
|
||||
private Long itemtotalamount;
|
||||
private String itemtotalamount;
|
||||
/**
|
||||
* 640
|
||||
*/
|
||||
private Long totalpayamount;
|
||||
private String totalpayamount;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalweight;
|
||||
private String totalweight;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalvolume;
|
||||
private String totalvolume;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalvolumeweight;
|
||||
private String totalvolumeweight;
|
||||
/**
|
||||
* G
|
||||
*/
|
||||
|
|
|
@ -290,31 +290,31 @@
|
|||
,b.code headCode
|
||||
from tocofs_saleout_detailed a left join tocofs_saleout b on a.mainTableId = b.id
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null"> and a.id = #{id} </if>
|
||||
<if test="id != null and id!=''"> and a.id = #{id} </if>
|
||||
<if test="clientcode != null and clientcode != ''"> and a.clientCode = #{clientcode} </if>
|
||||
<if test="companycode != null and companycode != ''"> and a.companyCode = #{companycode} </if>
|
||||
<if test="facilitycode != null and facilitycode != ''"> and a.facilityCode = #{facilitycode} </if>
|
||||
<if test="shipmentcode != null and shipmentcode != ''"> and a.shipmentCode = #{shipmentcode} </if>
|
||||
<if test="reforderid != null"> and a.refOrderId = #{reforderid} </if>
|
||||
<if test="reforderdetailid != null"> and a.refOrderDetailId = #{reforderdetailid} </if>
|
||||
<if test="reforderid != null and reforderid!=null"> and a.refOrderId = #{reforderid} </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="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="skuname != null and skuname != ''"> and a.skuName = #{skuname} </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="inventorysts != null and inventorysts != ''"> and a.inventorySts = #{inventorysts} </if>
|
||||
<if test="isgift != null"> and a.isGift = #{isgift} </if>
|
||||
<if test="requestqty != null"> and a.requestQty = #{requestqty} </if>
|
||||
<if test="shipqty != null"> and a.shipQty = #{shipqty} </if>
|
||||
<if test="isgift != null and isgift!=''"> and a.isGift = #{isgift} </if>
|
||||
<if test="requestqty != null and requestqty!=''"> and a.requestQty = #{requestqty} </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="quantityum != null and quantityum != ''"> and a.quantityUM = #{quantityum} </if>
|
||||
<if test="listprice != null"> and a.listPrice = #{listprice} </if>
|
||||
<if test="itemtotalamount != null"> and a.itemTotalAmount = #{itemtotalamount} </if>
|
||||
<if test="totalpayamount != null"> and a.totalPayAmount = #{totalpayamount} </if>
|
||||
<if test="totalweight != null"> and a.totalWeight = #{totalweight} </if>
|
||||
<if test="totalvolume != null"> and a.totalVolume = #{totalvolume} </if>
|
||||
<if test="totalvolumeweight != null"> and a.totalVolumeWeight = #{totalvolumeweight} </if>
|
||||
<if test="listprice != null and listprice!=''"> and a.listPrice = #{listprice} </if>
|
||||
<if test="itemtotalamount != null and itemtotalamount!=''"> and a.itemTotalAmount = #{itemtotalamount} </if>
|
||||
<if test="totalpayamount != null and totalpayamount!=''"> and a.totalPayAmount = #{totalpayamount} </if>
|
||||
<if test="totalweight != null and totalweight!=''"> and a.totalWeight = #{totalweight} </if>
|
||||
<if test="totalvolume != null and totalvolume!=''"> and a.totalVolume = #{totalvolume} </if>
|
||||
<if test="totalvolumeweight != null and totalvolumeweight!=''"> and a.totalVolumeWeight = #{totalvolumeweight} </if>
|
||||
<if test="weightum != null and weightum != ''"> and a.weightUM = #{weightum} </if>
|
||||
<if test="volumeum != null and volumeum != ''"> and a.volumeUM = #{volumeum} </if>
|
||||
<if test="created != null and created != ''"> and a.created = #{created} </if>
|
||||
|
|
|
@ -34,7 +34,7 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 22814582
|
||||
*/
|
||||
private Long reforderid;
|
||||
private String reforderid;
|
||||
/**
|
||||
* LETS-SO2024031900000002
|
||||
*/
|
||||
|
@ -46,11 +46,11 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 510
|
||||
*/
|
||||
private Long status;
|
||||
private String status;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long consolidated;
|
||||
private String consolidated;
|
||||
/**
|
||||
* SALES
|
||||
*/
|
||||
|
@ -70,7 +70,7 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long sourceorderid;
|
||||
private String sourceorderid;
|
||||
/**
|
||||
* LETS-SO2024031900000002
|
||||
*/
|
||||
|
@ -110,31 +110,31 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 1
|
||||
*/
|
||||
private Long totallines;
|
||||
private String totallines;
|
||||
/**
|
||||
* 10
|
||||
*/
|
||||
private Long totalqty;
|
||||
private String totalqty;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalcontainers;
|
||||
private String totalcontainers;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalcases;
|
||||
private String totalcases;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalweight;
|
||||
private String totalweight;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalvolume;
|
||||
private String totalvolume;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long totalvolumeweight;
|
||||
private String totalvolumeweight;
|
||||
/**
|
||||
* G
|
||||
*/
|
||||
|
@ -146,19 +146,19 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 640
|
||||
*/
|
||||
private Long totalamount;
|
||||
private String totalamount;
|
||||
/**
|
||||
* 640
|
||||
*/
|
||||
private Long totalpayamount;
|
||||
private String totalpayamount;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long postageamount;
|
||||
private String postageamount;
|
||||
/**
|
||||
* 640
|
||||
*/
|
||||
private Long itemtotalamount;
|
||||
private String itemtotalamount;
|
||||
private String totalfulfillqty;
|
||||
private String totalfulfillweight;
|
||||
private String totalfulfillvolume;
|
||||
|
@ -175,7 +175,7 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 1
|
||||
*/
|
||||
private Long paymentstatus;
|
||||
private String paymentstatus;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
|
@ -214,15 +214,15 @@ public class TocofsSaleoutEntity extends BaseEntity {
|
|||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long codamount;
|
||||
private String codamount;
|
||||
/**
|
||||
* 0
|
||||
*/
|
||||
private Long tax;
|
||||
private String tax;
|
||||
/**
|
||||
* 1
|
||||
*/
|
||||
private Long taxpaid;
|
||||
private String taxpaid;
|
||||
/**
|
||||
* 交易成功时间
|
||||
*/
|
||||
|
|
|
@ -230,22 +230,22 @@
|
|||
<include refid="TocofsSaleoutEntity_Base_Column_List" />
|
||||
from tocofs_saleout
|
||||
<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="companycode != null and companycode != ''"> and companyCode = #{companycode} </if>
|
||||
<if test="storecode != null and storecode != ''"> and storeCode = #{storecode} </if>
|
||||
<if test="facilitycode != null and facilitycode != ''"> and facilityCode = #{facilitycode} </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="refordertype != null and refordertype != ''"> and refOrderType = #{refordertype} </if>
|
||||
<if test="status != null"> and status = #{status} </if>
|
||||
<if test="consolidated != null"> and consolidated = #{consolidated} </if>
|
||||
<if test="status != null and status!=''"> and status = #{status} </if>
|
||||
<if test="consolidated != null and consolidated!=''"> and consolidated = #{consolidated} </if>
|
||||
<if test="internalinstructiontype != null and internalinstructiontype != ''"> and internalInstructionType = #{internalinstructiontype} </if>
|
||||
<if test="bizchannel != null and bizchannel != ''"> and bizChannel = #{bizchannel} </if>
|
||||
<if test="sourceplatformcode != null and sourceplatformcode != ''"> and sourcePlatformCode = #{sourceplatformcode} </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="shiptoattentionto != null and shiptoattentionto != ''"> and shipToAttentionTo = #{shiptoattentionto} </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="shiptodistrict != null and shiptodistrict != ''"> and shipToDistrict = #{shiptodistrict} </if>
|
||||
<if test="shiptomobile != null and shiptomobile != ''"> and shipToMobile = #{shiptomobile} </if>
|
||||
<if test="totallines != null"> and totalLines = #{totallines} </if>
|
||||
<if test="totalqty != null"> and totalQty = #{totalqty} </if>
|
||||
<if test="totalcontainers != null"> and totalContainers = #{totalcontainers} </if>
|
||||
<if test="totalcases != null"> and totalCases = #{totalcases} </if>
|
||||
<if test="totalweight != null"> and totalWeight = #{totalweight} </if>
|
||||
<if test="totalvolume != null"> and totalVolume = #{totalvolume} </if>
|
||||
<if test="totalvolumeweight != null"> and totalVolumeWeight = #{totalvolumeweight} </if>
|
||||
<if test="totallines != null and totallines!=''"> and totalLines = #{totallines} </if>
|
||||
<if test="totalqty != null and totalqty!=''"> and totalQty = #{totalqty} </if>
|
||||
<if test="totalcontainers != null and totalcontainers!=''"> and totalContainers = #{totalcontainers} </if>
|
||||
<if test="totalcases != null and totalcases!=''"> and totalCases = #{totalcases} </if>
|
||||
<if test="totalweight != null and totalweight!=''"> and totalWeight = #{totalweight} </if>
|
||||
<if test="totalvolume != null and totalvolume!=''"> and totalVolume = #{totalvolume} </if>
|
||||
<if test="totalvolumeweight != null and totalvolumeweight!=''"> and totalVolumeWeight = #{totalvolumeweight} </if>
|
||||
<if test="weightum != null and weightum != ''"> and weightUM = #{weightum} </if>
|
||||
<if test="volumeum != null and volumeum != ''"> and volumeUM = #{volumeum} </if>
|
||||
<if test="totalamount != null"> and totalAmount = #{totalamount} </if>
|
||||
<if test="totalpayamount != null"> and totalPayAmount = #{totalpayamount} </if>
|
||||
<if test="postageamount != null"> and postageAmount = #{postageamount} </if>
|
||||
<if test="itemtotalamount != null"> and itemTotalAmount = #{itemtotalamount} </if>
|
||||
<if test="totalamount != null and totalamount!=''"> and totalAmount = #{totalamount} </if>
|
||||
<if test="totalpayamount != null and totalpayamount!=''"> and totalPayAmount = #{totalpayamount} </if>
|
||||
<if test="postageamount != null and postageamount!=''"> and postageAmount = #{postageamount} </if>
|
||||
<if test="itemtotalamount != null and itemtotalamount!=''"> and itemTotalAmount = #{itemtotalamount} </if>
|
||||
<if test="totalfulfillqty != null and totalfulfillqty != ''"> and totalFulfillQty = #{totalfulfillqty} </if>
|
||||
<if test="totalfulfillweight != null and totalfulfillweight != ''"> and totalFulfillWeight = #{totalfulfillweight} </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="carriercode != null and carriercode != ''"> and carrierCode = #{carriercode} </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="invoicerequired != null and invoicerequired != ''"> and invoiceRequired = #{invoicerequired} </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="shipfromfax != null and shipfromfax != ''"> and shipFromFax = #{shipfromfax} </if>
|
||||
<if test="shipfromemail != null and shipfromemail != ''"> and shipFromEmail = #{shipfromemail} </if>
|
||||
<if test="codamount != null"> and codAmount = #{codamount} </if>
|
||||
<if test="tax != null"> and tax = #{tax} </if>
|
||||
<if test="taxpaid != null"> and taxPaid = #{taxpaid} </if>
|
||||
<if test="codamount != null and codamount!=''"> and codAmount = #{codamount} </if>
|
||||
<if test="tax != null and tax!=''"> and tax = #{tax} </if>
|
||||
<if test="taxpaid != null and taxpaid!=''"> and taxPaid = #{taxpaid} </if>
|
||||
<if test="tradesuccessat != null and tradesuccessat != ''"> and tradeSuccessAt = #{tradesuccessat} </if>
|
||||
<if test="sourceorderstatus != null and sourceorderstatus != ''"> and sourceOrderStatus = #{sourceorderstatus} </if>
|
||||
<if test="shiptostatename != null and shiptostatename != ''"> and shipToStateName = #{shiptostatename} </if>
|
||||
|
|
Loading…
Reference in New Issue