优化插件业务流程代码

This commit is contained in:
liuy 2024-09-03 16:31:28 +08:00
parent 7afe431e35
commit 9c110e5b8c
14 changed files with 570 additions and 83 deletions

View File

@ -211,10 +211,10 @@
<if test="qrrid != null and qrrid != ''"> and QRRID = #{qrrid} </if>
<if test="qrrq != null and qrrq != ''"> and QRRQ = #{qrrq} </if>
<if test="qrsj != null and qrsj != ''"> and QRSJ = #{qrsj} </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>
<!-- 查询符合条件的数量 -->

View File

@ -12,8 +12,11 @@ import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.queryvo.QueryIntegrationTaskLivingDetails;
import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.*;
import com.hzya.frame.split.SplitListByCountUtil;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderDetails;
@ -89,6 +92,12 @@ public class ConsignmachiningIn extends PluginBaseEntity {
@Autowired
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
@Autowired
private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao;
@Autowired
private IntegrationTaskLivingDetailsUtil integrationTaskLivingDetailsUtil;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
@ -234,14 +243,63 @@ public class ConsignmachiningIn extends PluginBaseEntity {
* @author liuyang
*/
private List<StockinOrderSearchResponse.StockinOrder> filterData(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList) {
//过滤完毕后的数据集合
List<StockinOrderSearchResponse.StockinOrder> headerDetailsDtoList1 = new ArrayList<>();
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
//TODO 出库单明细主键需要O返回目前没有已经提需求
headerDetailsDtoList1.addAll(returnGoodHeaderDetailsDataDtoArrayList);
//查询得到已经成功的日志成功或者已处理
List<IntegrationTaskLivingDetailsEntity> successIntegrationTaskLivingDetails = new ArrayList<>();
try {
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
//每100个开始拆分
List<List<StockinOrderSearchResponse.StockinOrder>> splitListByCount = SplitListByCountUtil.splitListByCount(returnGoodHeaderDetailsDataDtoArrayList, 100);
for (int i = 0; i < splitListByCount.size(); i++) {
List<StockinOrderSearchResponse.StockinOrder> stockinOrderList = splitListByCount.get(i);
String primaryKey = fieldConcaten(stockinOrderList);
List<IntegrationTaskLivingDetailsEntity> integrationTaskLivingDetailsEntities = integrationTaskLivingDetailsUtil.queryIntegrationTaskLivingDetails(primaryKey, getPluginId());
successIntegrationTaskLivingDetails.addAll(integrationTaskLivingDetailsEntities);
}
for (int i = 0; i < returnGoodHeaderDetailsDataDtoArrayList.size(); i++) {
StockinOrderSearchResponse.StockinOrder stockinOrder = returnGoodHeaderDetailsDataDtoArrayList.get(i);
StockinOrderSearchResponse.StockinOrder.StockinH header = stockinOrder.getHeader();
List<StockinOrderSearchResponse.StockinOrder.StockinB> details = stockinOrder.getDetails();
boolean isExi = false;
for (int j = 0; j < successIntegrationTaskLivingDetails.size(); j++) {
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = successIntegrationTaskLivingDetails.get(j);
if (integrationTaskLivingDetailsEntity.getRootAppPk().equals(header.getId())) {
isExi = true;
}
}
if (!isExi) {
headerDetailsDtoList1.add(stockinOrder);
}
}
}
} catch (Exception e) {
logger.error("过滤成功的数据抛出异常", e);
}
return headerDetailsDtoList1;
}
/**
* 字段拼接
*/
private String fieldConcaten(List<StockinOrderSearchResponse.StockinOrder> headerDetailsDtoList1) {
if (headerDetailsDtoList1 != null && headerDetailsDtoList1.size() > 0) {
StringBuilder result = new StringBuilder();
for (StockinOrderSearchResponse.StockinOrder obj : headerDetailsDtoList1) {
StockinOrderSearchResponse.StockinOrder.StockinH header = obj.getHeader();
if (result.length() > 0) {
result.append(",");
}
result.append("'").append(header.getId()).append("'");
}
return result.substring(0, result.length());
}
return null;
}
/**
* 执行主逻辑
*
@ -292,6 +350,7 @@ public class ConsignmachiningIn extends PluginBaseEntity {
poOrderParentDto.setCgiveinvoicevendor(bdCumandocEntity.getPkCumandoc());
poOrderParentDto.setCvendormangid(bdCumandocEntity.getPkCumandoc());
poOrderParentDto.setDorderdate(generateBusinessDate);
poOrderParentDto.setCwareid(bdCalbodyEntity.getPkCalbody());//库存组织
poOrderParentDto.setPk_defdoc3(bdRdclEntity.getPkRdcl());//收发类别
poOrderParentDto.setVdef3(bdRdclEntity.getRdname());
@ -343,25 +402,25 @@ public class ConsignmachiningIn extends PluginBaseEntity {
Map<String, List<ScorderDto>> stringStringMap = new HashMap<>();
stringStringMap.put("OrderVO", scorderDtoArrayList);
IcGeneralHResultDto icGeneralHResultDto = sendU8cScorder(JSON.toJSONString(stringStringMap));
ScOrderResultDto scOrderResultDto = sendU8cScorder(JSON.toJSONString(stringStringMap));
String cgeneralhid = null;
String vbillcode = null;
IcGeneralHResultHeadDto parentvo = icGeneralHResultDto.getParentvo();
List<IcGeneralHResultBodyDto> childrenvo = icGeneralHResultDto.getChildrenvo();
ScOrderResultHeadDto parentvo = scOrderResultDto.getParentvo();
List<ScOrderResultDetailDto> childrenvo = scOrderResultDto.getChildrenvo();
if (parentvo != null) {
cgeneralhid = parentvo.getCgeneralhid();
cgeneralhid = parentvo.getCorderid();
}
if (childrenvo != null) {
vbillcode = parentvo.getVbillcode();
if (parentvo != null) {
vbillcode = parentvo.getVordercode();
}
logger.info("推送U8C委外入库成功!委外入库单主键:{} 委外入库单编码:{}", cgeneralhid, vbillcode);
logger.info("推送U8C委外订单成功!委外订单主键:{} 委外订单编码:{}", cgeneralhid, vbillcode);
// 成功记录日志
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
integrationTaskLivingDetailsEntity.setNewState(ProfilesActiveConstant.LOG_STATUS_Y);
integrationTaskLivingDetailsEntity.setRootAppNewData(JSON.toJSONString(consignmachiningInSonDto));//原始数据json
integrationTaskLivingDetailsEntity.setNewTransmitInfo(JSON.toJSONString(icGeneralHResultDto));//返回结果
integrationTaskLivingDetailsEntity.setNewTransmitInfo(JSON.toJSONString(parentvo));//返回结果
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
integrationTaskLivingDetailsEntity.setBusinessDate(generateBusinessDate);
integrationTaskLivingDetailsEntity.setRootAppPk(consignmachiningInSonDto.getId());
@ -738,7 +797,7 @@ public class ConsignmachiningIn extends PluginBaseEntity {
* @param param 原数据json
* @author liuyang
*/
public IcGeneralHResultDto sendU8cScorder(String param) throws Exception {
public ScOrderResultDto sendU8cScorder(String param) throws Exception {
long startLong = System.currentTimeMillis();
logger.info("U8C委外订单推送开始推送参数" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
@ -760,18 +819,18 @@ public class ConsignmachiningIn extends PluginBaseEntity {
result = String.valueOf(jsonObject.get("attribute"));
boolean isSuccess = false;
IcGeneralHResultDto icGeneralHResultDto = null;
ScOrderResultDto scOrderResultDto = null;
if (result != null && !"".equals(result)) {
ReusltStrDto reusltStrDto = JSON.parseObject(result, ReusltStrDto.class);
if ("success".equals(reusltStrDto.getStatus())) {
icGeneralHResultDto = resultDataHandle(reusltStrDto.getData());
scOrderResultDto = resultDataHandle(reusltStrDto.getData());
isSuccess = true;
}
}
if (!isSuccess) {
Assert.state(false, "O采购入库业务推送U8C委外入库失败 接口返回结果:{}", result);
Assert.state(false, "O采购入库业务(委外入库)推送U8C委外订单失败 接口返回结果:{}", result);
}
return icGeneralHResultDto;
return scOrderResultDto;
}
/**
@ -779,13 +838,13 @@ public class ConsignmachiningIn extends PluginBaseEntity {
*
* @author liuyang
*/
private IcGeneralHResultDto resultDataHandle(String resultData) {
private ScOrderResultDto resultDataHandle(String resultData) {
try {
if (resultData != null && !"".equals(resultData)) {
if (resultData.contains("[")) {
resultData = resultData.substring(1, resultData.length() - 1);
}
return JSON.parseObject(resultData, IcGeneralHResultDto.class);
return JSON.parseObject(resultData, ScOrderResultDto.class);
}
} catch (Exception e) {
logger.error("resultDataHandle方法解析返回参数失败的错误", e);

View File

@ -12,8 +12,10 @@ import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.queryvo.QueryIntegrationTaskLivingDetails;
import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.*;
import com.hzya.frame.split.SplitListByCountUtil;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderDetails;
@ -89,6 +91,9 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
@Autowired
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
@Autowired
private IntegrationTaskLivingDetailsUtil integrationTaskLivingDetailsUtil;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
@ -235,14 +240,63 @@ public class ConsignmachiningInReturn extends PluginBaseEntity {
* @author liuyang
*/
private List<HeaderDetailsDto> filterData(List<HeaderDetailsDto> returnGoodHeaderDetailsDataDtoArrayList) {
//过滤完毕后的数据集合
List<HeaderDetailsDto> headerDetailsDtoList1 = new ArrayList<>();
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
//TODO 出库单明细主键需要O返回目前没有已经提需求
headerDetailsDtoList1.addAll(returnGoodHeaderDetailsDataDtoArrayList);
//查询得到已经成功的日志成功或者已处理
List<IntegrationTaskLivingDetailsEntity> successIntegrationTaskLivingDetails = new ArrayList<>();
try {
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
//每100个开始拆分
List<List<HeaderDetailsDto>> headerDetailsDtoList = SplitListByCountUtil.splitListByCount(returnGoodHeaderDetailsDataDtoArrayList, 100);
for (int i = 0; i < headerDetailsDtoList.size(); i++) {
List<HeaderDetailsDto> headerDetailsDtos = headerDetailsDtoList.get(i);
String primaryKey = fieldConcaten(headerDetailsDtos);
List<IntegrationTaskLivingDetailsEntity> integrationTaskLivingDetailsEntities = integrationTaskLivingDetailsUtil.queryIntegrationTaskLivingDetails(primaryKey, getPluginId());
successIntegrationTaskLivingDetails.addAll(integrationTaskLivingDetailsEntities);
}
for (int i = 0; i < returnGoodHeaderDetailsDataDtoArrayList.size(); i++) {
HeaderDetailsDto headerDetailsDto = returnGoodHeaderDetailsDataDtoArrayList.get(i);
HeaderDto header = headerDetailsDto.getHeader();
List<DetailsDto> details = headerDetailsDto.getDetails();
boolean isExi = false;
for (int j = 0; j < successIntegrationTaskLivingDetails.size(); j++) {
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = successIntegrationTaskLivingDetails.get(j);
if (integrationTaskLivingDetailsEntity.getRootAppPk().equals(header.getId())) {
isExi = true;
}
}
if (!isExi) {
headerDetailsDtoList1.add(headerDetailsDto);
}
}
}
} catch (Exception e) {
logger.error("过滤成功的数据抛出异常", e);
}
return headerDetailsDtoList1;
}
/**
* 字段拼接
*/
private String fieldConcaten(List<HeaderDetailsDto> headerDetailsDtos) {
if (headerDetailsDtos != null && headerDetailsDtos.size() > 0) {
StringBuilder result = new StringBuilder();
for (HeaderDetailsDto obj : headerDetailsDtos) {
HeaderDto header = obj.getHeader();
if (result.length() > 0) {
result.append(",");
}
result.append("'").append(header.getId()).append("'");
}
return result.substring(0, result.length() - 1);
}
return null;
}
/**
* 执行主逻辑
*

View File

@ -14,6 +14,7 @@ import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.*;
import com.hzya.frame.split.SplitListByCountUtil;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderBean;
@ -24,6 +25,7 @@ import com.hzya.frame.ttxofs.dto.ofspurchasereturnorder.PurchaseReturnOrderHeade
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
@ -89,6 +91,9 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
@Autowired
private OnlyImplementProxyOrderUtil onlyImplementProxyOrder;
@Autowired
private IntegrationTaskLivingDetailsUtil integrationTaskLivingDetailsUtil;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
@ -263,14 +268,65 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
* @author liuyang
*/
private List<HeaderDetailsDto> filterData(List<HeaderDetailsDto> returnGoodHeaderDetailsDataDtoArrayList) {
//过滤成功后的数据
List<HeaderDetailsDto> headerDetailsDtoList1 = new ArrayList<>();
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
//TODO 出库单明细主键需要O返回目前没有已经提需求
headerDetailsDtoList1.addAll(returnGoodHeaderDetailsDataDtoArrayList);
//查询得到已经成功的日志成功或者已处理
List<IntegrationTaskLivingDetailsEntity> successIntegrationTaskLivingDetails = new ArrayList<>();
try {
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
//每100个开始拆分
List<List<HeaderDetailsDto>> lists = SplitListByCountUtil.splitListByCount(returnGoodHeaderDetailsDataDtoArrayList, 100);
for (int i = 0; i < lists.size(); i++) {
List<HeaderDetailsDto> headerDetailsDtoList = lists.get(i);
String primaryKey = fieldConcaten(headerDetailsDtoList);
List<IntegrationTaskLivingDetailsEntity> integrationTaskLivingDetailsEntities = integrationTaskLivingDetailsUtil.queryIntegrationTaskLivingDetails(primaryKey, getPluginId());
successIntegrationTaskLivingDetails.addAll(integrationTaskLivingDetailsEntities);
}
for (int i = 0; i < returnGoodHeaderDetailsDataDtoArrayList.size(); i++) {
HeaderDetailsDto headerDetailsDto = returnGoodHeaderDetailsDataDtoArrayList.get(i);
HeaderDto header = headerDetailsDto.getHeader();
List<DetailsDto> details = headerDetailsDto.getDetails();
boolean isExi = false;
for (int j = 0; j < successIntegrationTaskLivingDetails.size(); j++) {
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = successIntegrationTaskLivingDetails.get(i);
if (integrationTaskLivingDetailsEntity.getRootAppPk().equals(header.getId())) {
isExi = true;
}
}
if (!isExi) {
headerDetailsDtoList1.add(headerDetailsDto);
}
}
}
} catch (Exception e) {
logger.error("过滤成功的数据抛出异常", e);
}
return headerDetailsDtoList1;
}
/**
* 字段拼接
*
* @author liuyang
*/
private String fieldConcaten(List<HeaderDetailsDto> headerDetailsDtoList) {
if (headerDetailsDtoList != null && headerDetailsDtoList.size() > 0) {
StringBuilder result = new StringBuilder();
for (HeaderDetailsDto obj : headerDetailsDtoList) {
HeaderDto header = obj.getHeader();
if (result.length() > 0) {
result.append(",");
}
result.append("'").append(header.getId()).append("'");
}
return result.substring(0, result.length() - 1);
}
return null;
}
/**
* 执行主逻辑
*

View File

@ -14,12 +14,15 @@ import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.*;
import com.hzya.frame.split.SplitListByCountUtil;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderBean;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderDetails;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderHeader;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
import com.hzya.frame.web.entity.JsonResultEntity;
@ -86,6 +89,9 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
@Autowired
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
@Autowired
private IntegrationTaskLivingDetailsUtil integrationTaskLivingDetailsUtil;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
@ -258,13 +264,61 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
*/
private List<StockinOrderSearchResponse.StockinOrder> filterData(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList) {
List<StockinOrderSearchResponse.StockinOrder> headerDetailsDtoList1 = new ArrayList<>();
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
//TODO 出库单明细主键需要O返回目前没有已经提需求
headerDetailsDtoList1.addAll(returnGoodHeaderDetailsDataDtoArrayList);
//查询得到已经成功的日志成功或者已处理
List<IntegrationTaskLivingDetailsEntity> successIntegrationTaskLivingDetails = new ArrayList<>();
try {
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
//每100个开始拆分
List<List<StockinOrderSearchResponse.StockinOrder>> splitListByCount = SplitListByCountUtil.splitListByCount(returnGoodHeaderDetailsDataDtoArrayList, 100);
for (int i = 0; i < splitListByCount.size(); i++) {
List<StockinOrderSearchResponse.StockinOrder> stockinOrderList = splitListByCount.get(i);
String primaryKey = fieldConcaten(stockinOrderList);
List<IntegrationTaskLivingDetailsEntity> integrationTaskLivingDetailsEntities = integrationTaskLivingDetailsUtil.queryIntegrationTaskLivingDetails(primaryKey, getPluginId());
successIntegrationTaskLivingDetails.addAll(integrationTaskLivingDetailsEntities);
}
for (int i = 0; i < returnGoodHeaderDetailsDataDtoArrayList.size(); i++) {
StockinOrderSearchResponse.StockinOrder stockinOrder = returnGoodHeaderDetailsDataDtoArrayList.get(i);
StockinOrderSearchResponse.StockinOrder.StockinH header = stockinOrder.getHeader();
List<StockinOrderSearchResponse.StockinOrder.StockinB> details = stockinOrder.getDetails();
boolean isExi = false;
for (int j = 0; j < successIntegrationTaskLivingDetails.size(); j++) {
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = successIntegrationTaskLivingDetails.get(j);
if (integrationTaskLivingDetailsEntity.getRootAppPk().equals(header.getId())) {
isExi = true;
}
}
if (!isExi) {
headerDetailsDtoList1.add(stockinOrder);
}
}
}
} catch (Exception e) {
logger.error("过滤成功的数据抛出异常", e);
}
return headerDetailsDtoList1;
}
/**
* 字段拼接
*/
private String fieldConcaten(List<StockinOrderSearchResponse.StockinOrder> stockinOrderList) {
if (stockinOrderList != null && stockinOrderList.size() > 0) {
StringBuilder result = new StringBuilder();
for (StockinOrderSearchResponse.StockinOrder obj : stockinOrderList) {
StockinOrderSearchResponse.StockinOrder.StockinH header = obj.getHeader();
if (result.length() > 0) {
result.append(",");
}
result.append("'").append(header.getId()).append("'");
}
return result.substring(0, result.length() - 1);
}
return null;
}
/**
* 执行主逻辑
*

View File

@ -711,7 +711,7 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
String facilityCode = header.getFacilityCode();
//SKU
String skuCode = sonDetailsDto.getSkuCode();
//出库类型
//出库类型内购
String refOrderType = header.getRefOrderType();
StringBuffer summaryDimensionStr = new StringBuffer();

View File

@ -0,0 +1,33 @@
package com.hzya.frame.plugin.lets.queryvo;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.queryvo
* @ProjectkangarooDataCenterV3
* @nameQueryIntegrationTaskLivingDetails
* @Date2024/9/3 13:52
* @FilenameQueryIntegrationTaskLivingDetails
*/
public class QueryIntegrationTaskLivingDetails extends IntegrationTaskLivingDetailsEntity {
private String root_app_pk_s;
private String param_new_state;
public String getRoot_app_pk_s() {
return root_app_pk_s;
}
public void setRoot_app_pk_s(String root_app_pk_s) {
this.root_app_pk_s = root_app_pk_s;
}
public String getParam_new_state() {
return param_new_state;
}
public void setParam_new_state(String param_new_state) {
this.param_new_state = param_new_state;
}
}

View File

@ -0,0 +1,48 @@
package com.hzya.frame.plugin.lets.u8cdto;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.u8cdto
* @ProjectkangarooDataCenterV3
* @nameScOrderResultDto
* @Date2024/9/3 16:02
* @FilenameScOrderResultDto
*/
@Data
public class ScOrderResultDetailDto {
private String cmangid;
private String mang_code;
private String mang_name;
private String corder_bid;
private String corderid;
private String cbaseid;
private String nordernum;
private String ccurrencytypeid;
private String currencytype_code;
private String currencytype_name;
private String noriginalcurprice;
private String norgtaxprice;
private String ndiscountrate;
private String noriginalnetprice;
private String noriginalcurmny;
private String idiscounttaxtype;
private String ntaxrate;
private String noriginaltaxmny;
private String norgnettaxprice;
private String noriginalsummny;
private String nexchangeotobrate;
private String ntaxmny;
private String nmoney;
private String nsummny;
private String naccumstorenum;
private String dplanarrvdate;
private String cwarehouseid;
private String warehouse_code;
private String warehouse_name;
private String forderrowstatus;
private String bisactive;
private String crowno;
private String bomversion;
}

View File

@ -0,0 +1,19 @@
package com.hzya.frame.plugin.lets.u8cdto;
import lombok.Data;
import java.util.List;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.u8cdto
* @ProjectkangarooDataCenterV3
* @nameScOrderResultDto
* @Date2024/9/3 16:05
* @FilenameScOrderResultDto
*/
@Data
public class ScOrderResultDto {
private ScOrderResultHeadDto parentvo;
private List<ScOrderResultDetailDto> childrenvo;
}

View File

@ -0,0 +1,50 @@
package com.hzya.frame.plugin.lets.u8cdto;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.u8cdto
* @ProjectkangarooDataCenterV3
* @nameScOrderResultHeadDto
* @Date2024/9/3 16:04
* @FilenameScOrderResultHeadDto
*/
@Data
public class ScOrderResultHeadDto {
private String coperator;
private String operator_code;
private String operator_name;
private String cgiveinvoicevendor;
private String invoicevendor_code;
private String invoicevendor_name;
private String cpurorganization;
private String purorg_code;
private String purorg_name;
private String cwareid;
private String ware_code;
private String ware_name;
private String pk_corp;
private String corp_code;
private String corp_name;
private String vordercode;
private String dorderdate;
private String caccountyear;
private String ibillstatus;
private String iprintcount;
private String corderid;
private String pk_defdoc3;
private String vdef3;
private String vdef17;
private String vdef19;
private String vdef20;
private String tlastmaketime;
private String tmaketime;
private String ts;
private String cbiztype;
private String biztype_code;
private String biztype_name;
private String cvendormangid;
private String vendor_code;
private String vendor_name;
}

View File

@ -0,0 +1,38 @@
package com.hzya.frame.plugin.lets.util;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.queryvo.QueryIntegrationTaskLivingDetails;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.util
* @ProjectkangarooDataCenterV3
* @nameIntegrationTaskLivingDetailsUtil
* @Date2024/9/3 14:16
* @FilenameIntegrationTaskLivingDetailsUtil
*/
@Component
public class IntegrationTaskLivingDetailsUtil {
@Autowired
private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao;
/**
* 批量查询日志明细
*
* @author liuyang
*/
public List<IntegrationTaskLivingDetailsEntity> queryIntegrationTaskLivingDetails(String primaryKey, String pluginId) throws Exception {
QueryIntegrationTaskLivingDetails queryIntegrationTaskLivingDetails = new QueryIntegrationTaskLivingDetails();
queryIntegrationTaskLivingDetails.setRoot_app_pk_s(primaryKey);
queryIntegrationTaskLivingDetails.setParam_new_state(ProfilesActiveConstant.LOG_STATUS_Y_H);
queryIntegrationTaskLivingDetails.setPluginId(pluginId);
return (List<IntegrationTaskLivingDetailsEntity>) iIntegrationTaskLivingDetailsDao.query(queryIntegrationTaskLivingDetails);
}
}

View File

@ -26,7 +26,8 @@ public class ConsignmachiningInTest {
@Test
public void startImplement() {
String code = "LETS-RE2024082300000007";
// String code = "LETS-RE2024082300000007";
String code = "LETS-RE2024090300000001";
consignmachiningIn.startImplement(code);
}
}

View File

@ -1,6 +1,7 @@
package com.hzya.frame.sysnew.integtationTaskLivingDetails.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
import lombok.Data;
@ -10,60 +11,127 @@ import lombok.Data;
* @author makejava
* @since 2024-05-15 14:06:41
*/
@Data
public class IntegrationTaskLivingDetailsEntity extends BaseEntity {
/**
* 集成任务-实例_id
*/
private String taskLinvingId;
/**
* 返回结果
*/
private String result;
/**
* 原始查询条件
*/
private String queryCondition;
/**
* 源系统主键
*/
private String rootAppPk;
/**
* 原系统单据
*/
private String rootAppBill;
/**
* 最新源系统数据详情
*/
private String rootAppNewData;
/**
* 最新传输信息
*/
private String newTransmitInfo;
/**
* 最新推送时间
*/
private Date newPushDate;
/**
* 是否补推(Y是N不是)
*/
private String repairPust;
/**
* 场景id
*/
private String senceId;
/**
* 最新推送状态
*/
private String newState;
/**
* 单据业务日期
*/
private String businessDate;
/**
* 插件id
*/
private String pluginId;
/**
* 处理时间
*/
private Date processingTime;
/**
* 处理备注
*/
private String processingRemarks;
/**
* 处理名称
*/
private String processorName;
/**
* 处理
*/
private String processor;
/**
* 下游系统单号
*/
private String newSystemNumber;
/**
* 下游系统主键
*/
private String newSystemPrimary;
/**
* 备注
*/
private String remark;
/**
* 扩展1
*/
private String def1;
/**
* 扩展2
*/
private String def2;
/**
* 扩展3
*/
private String def3;
/**
* 扩展4
*/
private String def4;
/**
* 扩展5
*/
private String def5;
/** 集成任务-实例_id */
private String taskLinvingId;
/** 返回结果 */
private String result;
/** 原始查询条件 */
private String queryCondition;
/** 源系统主键 */
private String rootAppPk;
/** 原系统单据 */
private String rootAppBill;
/** 最新源系统数据详情 */
private String rootAppNewData;
/** 最新传输信息 */
private String newTransmitInfo;
/** 最新推送时间 */
private Date newPushDate;
/** 是否补推(Y是N不是) */
private String repairPust;
/** 场景id */
private String senceId;
/** 最新推送状态 */
private String newState;
/** 单据业务日期 */
private String businessDate;
/** 插件id */
private String pluginId;
/** 处理时间 */
private Date processingTime;
/** 处理备注 */
private String processingRemarks;
/** 处理⼈名称 */
private String processorName;
/** 处理⼈ */
private String processor;
/** 下游系统单号 */
private String newSystemNumber;
/** 下游系统主键 */
private String newSystemPrimary;
/** 备注 */
private String remark;
/** 扩展1 */
private String def1;
/** 扩展2 */
private String def2;
/** 扩展3 */
private String def3;
/** 扩展4 */
private String def4;
/** 扩展5 */
private String def5;
private String root_app_pk_s;
private String param_new_state;
public String getRoot_app_pk_s() {
return root_app_pk_s;
}
public void setRoot_app_pk_s(String root_app_pk_s) {
this.root_app_pk_s = root_app_pk_s;
}
public String getParam_new_state() {
return param_new_state;
}
public void setParam_new_state(String param_new_state) {
this.param_new_state = param_new_state;
}
public String getTaskLinvingId() {
return taskLinvingId;
@ -88,6 +156,7 @@ public class IntegrationTaskLivingDetailsEntity extends BaseEntity {
public void setQueryCondition(String queryCondition) {
this.queryCondition = queryCondition;
}
public String getRootAppPk() {
return rootAppPk;
}

View File

@ -117,6 +117,12 @@
<if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
<if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
<if test="def5 != null and def5 != ''"> and def5 = #{def5} </if>
<if test="root_app_pk_s!=null and root_app_pk_s!=''">
and root_app_pk in (${root_app_pk_s})
</if>
<if test="param_new_state!=null and param_new_state!=''">
and new_state in (${param_new_state})
</if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>