|
@@ -61,8 +61,6 @@ public class OldForNewUploadLogic {
|
|
@Autowired
|
|
@Autowired
|
|
private OldForNewProductService oldForNewProductService;
|
|
private OldForNewProductService oldForNewProductService;
|
|
@Autowired
|
|
@Autowired
|
|
- private YjhxJddService yjhxJddService;
|
|
|
|
- @Autowired
|
|
|
|
private OrderBaseService orderBaseService;
|
|
private OrderBaseService orderBaseService;
|
|
@Autowired
|
|
@Autowired
|
|
private ItfTblTradeNewForOldStockInfoUploadTaskService itfTblTradeNewForOldStockInfoUploadTaskService;
|
|
private ItfTblTradeNewForOldStockInfoUploadTaskService itfTblTradeNewForOldStockInfoUploadTaskService;
|
|
@@ -82,6 +80,9 @@ public class OldForNewUploadLogic {
|
|
ItfTblTradeNewForOldRejectJddDownloadService itfTblTradeNewForOldRejectJddDownloadService;
|
|
ItfTblTradeNewForOldRejectJddDownloadService itfTblTradeNewForOldRejectJddDownloadService;
|
|
@Autowired
|
|
@Autowired
|
|
ItfTblRecycleStockBarcodeInfoUploadService barcodeInfoUploadService;
|
|
ItfTblRecycleStockBarcodeInfoUploadService barcodeInfoUploadService;
|
|
|
|
+ @Autowired
|
|
|
|
+ YjhxAppraiseService yjhxAppraiseService;
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
private ObjectMapper mapper;
|
|
private ObjectMapper mapper;
|
|
@@ -120,14 +121,16 @@ public class OldForNewUploadLogic {
|
|
Map<String, OldForNewProduct> oldForNewProductMap = CollectionUtils.isEmpty(oldForNewProductList)
|
|
Map<String, OldForNewProduct> oldForNewProductMap = CollectionUtils.isEmpty(oldForNewProductList)
|
|
? null : oldForNewProductList.stream().collect(Collectors.toMap(OldForNewProduct::getOrderBaseId, Function.identity()));
|
|
? null : oldForNewProductList.stream().collect(Collectors.toMap(OldForNewProduct::getOrderBaseId, Function.identity()));
|
|
|
|
|
|
- // 提取已采集需上传的鉴定单数据
|
|
|
|
- final List<YjhxJdd> jddList = yjhxJddService.lambdaQuery()
|
|
|
|
- .in(YjhxJdd::getOrderBaseId, uploadOrderNos)
|
|
|
|
- .eq(YjhxJdd::getCollectionStatus, 1)
|
|
|
|
- .eq(YjhxJdd::getUploadNotifyFlag, 1)
|
|
|
|
|
|
+ // 提取已采集需上传的鉴定单数据 只取状态为已采集的
|
|
|
|
+ final List<YjhxAppraise> jddList = yjhxAppraiseService.lambdaQuery()
|
|
|
|
+ .in(YjhxAppraise::getOrderBaseId, uploadOrderNos)
|
|
|
|
+ .eq(YjhxAppraise::getCollectionStatus, 1)
|
|
|
|
+ .eq(YjhxAppraise::getUploadNotifyFlag, 1)
|
|
.list();
|
|
.list();
|
|
// 这里ID做为 key
|
|
// 这里ID做为 key
|
|
- final Map<Integer, List<YjhxJdd>> jddMap = (null == jddList || jddList.isEmpty()) ? null : jddList.stream().collect(Collectors.groupingBy(YjhxJdd::getId));
|
|
|
|
|
|
+ final Map<Integer, List<YjhxAppraise>> jddMap =
|
|
|
|
+ (null == jddList || jddList.isEmpty()) ?
|
|
|
|
+ null : jddList.stream().collect(Collectors.groupingBy(YjhxAppraise::getId));
|
|
|
|
|
|
// 按单来处理 要有鉴定单
|
|
// 按单来处理 要有鉴定单
|
|
for(OutJiasmToGreeUploadnotifylist toGreeUpload : toGreeUploadList) {
|
|
for(OutJiasmToGreeUploadnotifylist toGreeUpload : toGreeUploadList) {
|
|
@@ -137,17 +140,17 @@ public class OldForNewUploadLogic {
|
|
OrderBase orderBase = orderBaseService.lambdaQuery()
|
|
OrderBase orderBase = orderBaseService.lambdaQuery()
|
|
.eq(OrderBase::getId,toGreeUpload.getOrderNo()).one();
|
|
.eq(OrderBase::getId,toGreeUpload.getOrderNo()).one();
|
|
|
|
|
|
- for(YjhxJdd jdd : jddList) {
|
|
|
|
|
|
+ for(YjhxAppraise jdd : jddList) {
|
|
// 取工单对应的鉴定单
|
|
// 取工单对应的鉴定单
|
|
if (!jdd.getOrderBaseId().equals(toGreeUpload.getOrderNo())){
|
|
if (!jdd.getOrderBaseId().equals(toGreeUpload.getOrderNo())){
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- // 广佛鉴定结果为0(不回收)、不同步总部
|
|
|
|
|
|
+ // 广佛鉴定结果 identifyResult为0(不回收)、不同步总部
|
|
if( "0".equals(jdd.getIdentifyResult()) ) {
|
|
if( "0".equals(jdd.getIdentifyResult()) ) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
- // 生成格力总部图片 图片生成失败不同步
|
|
|
|
|
|
+ // 生成格力总部图片(条码图及全景图) 图片生成失败不同步
|
|
if (setGreeImage(orderBase, jdd)) {
|
|
if (setGreeImage(orderBase, jdd)) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@@ -196,7 +199,7 @@ public class OldForNewUploadLogic {
|
|
return "";
|
|
return "";
|
|
}
|
|
}
|
|
|
|
|
|
- private boolean setGreeImage(OrderBase orderBase, YjhxJdd jdd) {
|
|
|
|
|
|
+ private boolean setGreeImage(OrderBase orderBase, YjhxAppraise jdd) {
|
|
WebsitSH websitSH = publicService.ptshwdToshshwd(jdd.getWebsitId(), orderBase.getMainId());
|
|
WebsitSH websitSH = publicService.ptshwdToshshwd(jdd.getWebsitId(), orderBase.getMainId());
|
|
Boolean upflag = Boolean.FALSE;
|
|
Boolean upflag = Boolean.FALSE;
|
|
// 图片生成 条码图片 njtm图像#wjtm图像
|
|
// 图片生成 条码图片 njtm图像#wjtm图像
|
|
@@ -234,13 +237,13 @@ public class OldForNewUploadLogic {
|
|
upflag = Boolean.TRUE;
|
|
upflag = Boolean.TRUE;
|
|
}
|
|
}
|
|
if (upflag){
|
|
if (upflag){
|
|
- yjhxJddService.updateById(jdd);
|
|
|
|
|
|
+ yjhxAppraiseService.updateById(jdd);
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
@Nullable
|
|
@Nullable
|
|
- private String getFullImage(YjhxJdd jdd, WebsitSH websitSH) {
|
|
|
|
|
|
+ private String getFullImage(YjhxAppraise jdd, WebsitSH websitSH) {
|
|
String greeImageId = "";
|
|
String greeImageId = "";
|
|
String greeImageIdN = "";
|
|
String greeImageIdN = "";
|
|
String greeImageIdW = "";
|
|
String greeImageIdW = "";
|
|
@@ -289,7 +292,7 @@ public class OldForNewUploadLogic {
|
|
}
|
|
}
|
|
|
|
|
|
@Nullable
|
|
@Nullable
|
|
- private String getBarcodeImage(YjhxJdd jdd,WebsitSH websitSH) {
|
|
|
|
|
|
+ private String getBarcodeImage(YjhxAppraise jdd,WebsitSH websitSH) {
|
|
String greeImageId = "";
|
|
String greeImageId = "";
|
|
String greeImageIdN = "";
|
|
String greeImageIdN = "";
|
|
String greeImageIdW = "";
|
|
String greeImageIdW = "";
|
|
@@ -382,7 +385,7 @@ public class OldForNewUploadLogic {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private void synData(YjhxJdd jdd, ItfTblYjhxJddUpload yjhxJddUpload, TradeNewForOldUploadBean bean) {
|
|
|
|
|
|
+ private void synData(YjhxAppraise jdd, ItfTblYjhxJddUpload yjhxJddUpload, TradeNewForOldUploadBean bean) {
|
|
final String url = webUrl + Constant.GreeWebPath.TBLYJHXJDD_COLLECTION;
|
|
final String url = webUrl + Constant.GreeWebPath.TBLYJHXJDD_COLLECTION;
|
|
try {
|
|
try {
|
|
JSONObject response = greeLogic.postPubV3(url, mapper.readValue(mapper.writeValueAsString(bean), Map.class));
|
|
JSONObject response = greeLogic.postPubV3(url, mapper.readValue(mapper.writeValueAsString(bean), Map.class));
|
|
@@ -433,7 +436,7 @@ public class OldForNewUploadLogic {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private void getFileAttUpload(YjhxJdd jdd, List<ItfTblYjhxJddFjUpload> yjhxJddFjUploadList,
|
|
|
|
|
|
+ private void getFileAttUpload(YjhxAppraise jdd, List<ItfTblYjhxJddFjUpload> yjhxJddFjUploadList,
|
|
ItfTblYjhxJddUpload yjhxJddUpload, List<TradeNewForOldUploadAttachmentBean> jddfjList) {
|
|
ItfTblYjhxJddUpload yjhxJddUpload, List<TradeNewForOldUploadAttachmentBean> jddfjList) {
|
|
// 总部图片,除了tempBarcodeImg以外的所有,#号分割,in_full_picture#out_full_picture#other_picture
|
|
// 总部图片,除了tempBarcodeImg以外的所有,#号分割,in_full_picture#out_full_picture#other_picture
|
|
String[] fullimgs = jdd.getGreeImgIdAllOther().split("#");
|
|
String[] fullimgs = jdd.getGreeImgIdAllOther().split("#");
|
|
@@ -459,7 +462,7 @@ public class OldForNewUploadLogic {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private void getOtherFileAttUpload(YjhxJdd jdd, List<ItfTblYjhxJddFjUpload> yjhxJddFjUploadList,
|
|
|
|
|
|
+ private void getOtherFileAttUpload(YjhxAppraise jdd, List<ItfTblYjhxJddFjUpload> yjhxJddFjUploadList,
|
|
ItfTblYjhxJddUpload yjhxJddUpload, List<TradeNewForOldUploadAttachmentBean> jddfjList,
|
|
ItfTblYjhxJddUpload yjhxJddUpload, List<TradeNewForOldUploadAttachmentBean> jddfjList,
|
|
List<String> greeFjguidArr, String[] fullimgs, int i, int i2, String 其他, String s) {
|
|
List<String> greeFjguidArr, String[] fullimgs, int i, int i2, String 其他, String s) {
|
|
ItfTblYjhxJddFjUpload otherFileAttUpload = new ItfTblYjhxJddFjUpload();
|
|
ItfTblYjhxJddFjUpload otherFileAttUpload = new ItfTblYjhxJddFjUpload();
|
|
@@ -481,7 +484,7 @@ public class OldForNewUploadLogic {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private void getOutFileAttUpload(YjhxJdd jdd, List<ItfTblYjhxJddFjUpload> yjhxJddFjUploadList,
|
|
|
|
|
|
+ private void getOutFileAttUpload(YjhxAppraise jdd, List<ItfTblYjhxJddFjUpload> yjhxJddFjUploadList,
|
|
ItfTblYjhxJddUpload yjhxJddUpload, List<TradeNewForOldUploadAttachmentBean> jddfjList,
|
|
ItfTblYjhxJddUpload yjhxJddUpload, List<TradeNewForOldUploadAttachmentBean> jddfjList,
|
|
List<String> greeFjguidArr, String[] fullimgs, int i, int i2,
|
|
List<String> greeFjguidArr, String[] fullimgs, int i, int i2,
|
|
String 旧机外机整机, String s) {
|
|
String 旧机外机整机, String s) {
|
|
@@ -504,7 +507,7 @@ public class OldForNewUploadLogic {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private void getInFileAttUpload(YjhxJdd jdd, List<ItfTblYjhxJddFjUpload> yjhxJddFjUploadList, ItfTblYjhxJddUpload yjhxJddUpload,
|
|
|
|
|
|
+ private void getInFileAttUpload(YjhxAppraise jdd, List<ItfTblYjhxJddFjUpload> yjhxJddFjUploadList, ItfTblYjhxJddUpload yjhxJddUpload,
|
|
List<TradeNewForOldUploadAttachmentBean> jddfjList, List<String> greeFjguidArr,
|
|
List<TradeNewForOldUploadAttachmentBean> jddfjList, List<String> greeFjguidArr,
|
|
String[] fullimgs, int i, int i2, String 旧机内机整机, String s) {
|
|
String[] fullimgs, int i, int i2, String 旧机内机整机, String s) {
|
|
ItfTblYjhxJddFjUpload inFileAttUpload = new ItfTblYjhxJddFjUpload();
|
|
ItfTblYjhxJddFjUpload inFileAttUpload = new ItfTblYjhxJddFjUpload();
|
|
@@ -527,7 +530,7 @@ public class OldForNewUploadLogic {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private boolean setOldForNewProduct(Map<String, OldForNewProduct> oldForNewProductMap, YjhxJdd jdd, TradeNewForOldUploadBean bean) {
|
|
|
|
|
|
+ private boolean setOldForNewProduct(Map<String, OldForNewProduct> oldForNewProductMap, YjhxAppraise jdd, TradeNewForOldUploadBean bean) {
|
|
// 看旧机信息大类决定是否需要上传
|
|
// 看旧机信息大类决定是否需要上传
|
|
if( !Objects.isNull(oldForNewProductMap)
|
|
if( !Objects.isNull(oldForNewProductMap)
|
|
&& oldForNewProductMap.containsKey(jdd.getOrderBaseId())
|
|
&& oldForNewProductMap.containsKey(jdd.getOrderBaseId())
|
|
@@ -548,7 +551,7 @@ public class OldForNewUploadLogic {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- private void setParame(OrderBase orderBase, YjhxJdd jdd, TradeNewForOldUploadBean bean) {
|
|
|
|
|
|
+ private void setParame(OrderBase orderBase, YjhxAppraise jdd, TradeNewForOldUploadBean bean) {
|
|
WebsitSH websitSH;
|
|
WebsitSH websitSH;
|
|
// hxjddido 为空时说明为平台自建的鉴定数据 自生成
|
|
// hxjddido 为空时说明为平台自建的鉴定数据 自生成
|
|
if (StringUtils.isEmpty(jdd.getHxjddid())){
|
|
if (StringUtils.isEmpty(jdd.getHxjddid())){
|
|
@@ -598,7 +601,7 @@ public class OldForNewUploadLogic {
|
|
bean.setAzrenyddh(worderInfo.getMobile());
|
|
bean.setAzrenyddh(worderInfo.getMobile());
|
|
}
|
|
}
|
|
|
|
|
|
- private void updateJdd(YjhxJdd jdd, TradeNewForOldUploadBean bean) {
|
|
|
|
|
|
+ private void updateJdd(YjhxAppraise jdd, TradeNewForOldUploadBean bean) {
|
|
Boolean flag = Boolean.FALSE;
|
|
Boolean flag = Boolean.FALSE;
|
|
// 来自报文请求后的id,
|
|
// 来自报文请求后的id,
|
|
if (StringUtils.isEmpty(jdd.getGreeId())){
|
|
if (StringUtils.isEmpty(jdd.getGreeId())){
|
|
@@ -626,7 +629,7 @@ public class OldForNewUploadLogic {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (flag){
|
|
if (flag){
|
|
- yjhxJddService.updateById(jdd);
|
|
|
|
|
|
+ yjhxAppraiseService.updateById(jdd);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -642,7 +645,7 @@ public class OldForNewUploadLogic {
|
|
ItfTblYjhxJddUpload yjhxJddUpload,
|
|
ItfTblYjhxJddUpload yjhxJddUpload,
|
|
List<ItfTblYjhxJddFjUpload> yjhxJddFjUploadList,
|
|
List<ItfTblYjhxJddFjUpload> yjhxJddFjUploadList,
|
|
OutJiasmToGreeUploadnotifylist toGreeUploadnotifylist
|
|
OutJiasmToGreeUploadnotifylist toGreeUploadnotifylist
|
|
- ,YjhxJdd jdd) {
|
|
|
|
|
|
+ ,YjhxAppraise jdd) {
|
|
try {
|
|
try {
|
|
Integer synStatus = -1;
|
|
Integer synStatus = -1;
|
|
String msg = "";
|
|
String msg = "";
|
|
@@ -691,7 +694,7 @@ public class OldForNewUploadLogic {
|
|
if( null != jdd) {
|
|
if( null != jdd) {
|
|
if( Constant.SynStatus.SYN.getCode().intValue() == synStatus) {
|
|
if( Constant.SynStatus.SYN.getCode().intValue() == synStatus) {
|
|
//返回成功,反写业务表 部分数据来自于格力总部要反写
|
|
//返回成功,反写业务表 部分数据来自于格力总部要反写
|
|
- yjhxJddService.saveOrUpdate(jdd);
|
|
|
|
|
|
+ yjhxAppraiseService.saveOrUpdate(jdd);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}catch(Exception e) {
|
|
}catch(Exception e) {
|
|
@@ -792,15 +795,15 @@ public class OldForNewUploadLogic {
|
|
});
|
|
});
|
|
|
|
|
|
// 提取以旧换新鉴定单数据
|
|
// 提取以旧换新鉴定单数据
|
|
- List<YjhxJdd> jddList = new ArrayList<>();
|
|
|
|
- List<YjhxJdd> newAddJddList = new ArrayList<>();
|
|
|
|
|
|
+ List<YjhxAppraise> jddList = new ArrayList<>();
|
|
|
|
+ List<YjhxAppraise> newAddJddList = new ArrayList<>();
|
|
if(!orderBaseIds.isEmpty()) {
|
|
if(!orderBaseIds.isEmpty()) {
|
|
- jddList = yjhxJddService.lambdaQuery()
|
|
|
|
- .in(YjhxJdd::getOrderBaseId, orderBaseIds).list();
|
|
|
|
|
|
+ jddList = yjhxAppraiseService.lambdaQuery()
|
|
|
|
+ .in(YjhxAppraise::getOrderBaseId, orderBaseIds).list();
|
|
}
|
|
}
|
|
|
|
|
|
- final Map<String, List<YjhxJdd>> jddMap = jddList.isEmpty() ?
|
|
|
|
- null : jddList.stream().collect(Collectors.groupingBy(YjhxJdd::getOrderBaseId));
|
|
|
|
|
|
+ final Map<String, List<YjhxAppraise>> jddMap = jddList.isEmpty() ?
|
|
|
|
+ null : jddList.stream().collect(Collectors.groupingBy(YjhxAppraise::getOrderBaseId));
|
|
|
|
|
|
for (ItfTblTradeNewForOldRejectJddDownload item:tradeNewForOldRejectJddDownloadList){
|
|
for (ItfTblTradeNewForOldRejectJddDownload item:tradeNewForOldRejectJddDownloadList){
|
|
if( null != orderBaseMap && orderBaseMap.containsKey(item.getPgguid()) &&
|
|
if( null != orderBaseMap && orderBaseMap.containsKey(item.getPgguid()) &&
|
|
@@ -812,7 +815,7 @@ public class OldForNewUploadLogic {
|
|
&& null != jddMap.get(orderBase.getId())
|
|
&& null != jddMap.get(orderBase.getId())
|
|
&& !jddMap.get(orderBase.getId()) .isEmpty()) {
|
|
&& !jddMap.get(orderBase.getId()) .isEmpty()) {
|
|
// 提取鉴定单
|
|
// 提取鉴定单
|
|
- YjhxJdd jdd = jddMap.get(orderBase.getId()) .get(0);
|
|
|
|
|
|
+ YjhxAppraise jdd = jddMap.get(orderBase.getId()) .get(0);
|
|
// 查看最后更新日期
|
|
// 查看最后更新日期
|
|
if( null != jdd.getLastModifiedDate()) {
|
|
if( null != jdd.getLastModifiedDate()) {
|
|
//广佛系统最后更新时间在总部下载的时间前才可以更新
|
|
//广佛系统最后更新时间在总部下载的时间前才可以更新
|
|
@@ -851,7 +854,7 @@ public class OldForNewUploadLogic {
|
|
}
|
|
}
|
|
|
|
|
|
if(newAddJddList.size()>0) {
|
|
if(newAddJddList.size()>0) {
|
|
- yjhxJddService.saveOrUpdateBatch(newAddJddList);
|
|
|
|
|
|
+ yjhxAppraiseService.saveOrUpdateBatch(newAddJddList);
|
|
newAddJddList.clear();
|
|
newAddJddList.clear();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -880,8 +883,8 @@ public class OldForNewUploadLogic {
|
|
}
|
|
}
|
|
|
|
|
|
//根据pgguid获取以旧换新鉴定单数据 无鉴定数据不处理
|
|
//根据pgguid获取以旧换新鉴定单数据 无鉴定数据不处理
|
|
- final List<YjhxJdd> yjhxJddList = yjhxJddService.lambdaQuery()
|
|
|
|
- .eq(YjhxJdd::getPgguid, item.getPgguid()).list();
|
|
|
|
|
|
+ final List<YjhxAppraise> yjhxJddList = yjhxAppraiseService.lambdaQuery()
|
|
|
|
+ .eq(YjhxAppraise::getPgguid, item.getPgguid()).list();
|
|
if(Collections.isEmpty(yjhxJddList)) {
|
|
if(Collections.isEmpty(yjhxJddList)) {
|
|
item.setSynStatus(Constant.SynStatus.FAIL.getCode());
|
|
item.setSynStatus(Constant.SynStatus.FAIL.getCode());
|
|
item.setSynErrMsg("没有鉴定单数据, pgguid="+item.getPgguid());
|
|
item.setSynErrMsg("没有鉴定单数据, pgguid="+item.getPgguid());
|
|
@@ -890,7 +893,7 @@ public class OldForNewUploadLogic {
|
|
}
|
|
}
|
|
|
|
|
|
//一个pgguid只对应一条YjhxJdd数据
|
|
//一个pgguid只对应一条YjhxJdd数据
|
|
- YjhxJdd yjhxJdd = yjhxJddList.get(0);
|
|
|
|
|
|
+ YjhxAppraise yjhxJdd = yjhxJddList.get(0);
|
|
OrderBase order = orderBaseService.lambdaQuery()
|
|
OrderBase order = orderBaseService.lambdaQuery()
|
|
.eq(OrderBase::getPgguid, yjhxJdd.getPgguid()).one();
|
|
.eq(OrderBase::getPgguid, yjhxJdd.getPgguid()).one();
|
|
if(Objects.isNull(order)) {
|
|
if(Objects.isNull(order)) {
|
|
@@ -918,11 +921,11 @@ public class OldForNewUploadLogic {
|
|
|
|
|
|
String taskNo = java.util.UUID.randomUUID().toString();
|
|
String taskNo = java.util.UUID.randomUUID().toString();
|
|
// 生成内机条码上传数据
|
|
// 生成内机条码上传数据
|
|
- if(!StringUtils.isEmpty(yjhxJdd.getNjtm())) {
|
|
|
|
|
|
+ if(StringUtils.isNotEmpty(yjhxJdd.getNjtm())) {
|
|
getItfTblRecycleStockBarcodeInfoUploadNjtm(tradeNewForOldStockBarcodeInfoUploadList, yjhxJdd, order, product, websitSH, worderInfo, taskNo);
|
|
getItfTblRecycleStockBarcodeInfoUploadNjtm(tradeNewForOldStockBarcodeInfoUploadList, yjhxJdd, order, product, websitSH, worderInfo, taskNo);
|
|
}
|
|
}
|
|
// 生成外机条码上传数据
|
|
// 生成外机条码上传数据
|
|
- if(!StringUtils.isEmpty(yjhxJdd.getWjtm())) {
|
|
|
|
|
|
+ if(StringUtils.isNotEmpty(yjhxJdd.getWjtm())) {
|
|
getItfTblRecycleStockBarcodeInfoUploadWjtm(tradeNewForOldStockBarcodeInfoUploadList, yjhxJdd, order, product, websitSH, worderInfo, taskNo);
|
|
getItfTblRecycleStockBarcodeInfoUploadWjtm(tradeNewForOldStockBarcodeInfoUploadList, yjhxJdd, order, product, websitSH, worderInfo, taskNo);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -963,7 +966,8 @@ public class OldForNewUploadLogic {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- private void getItfTblRecycleStockBarcodeInfoUploadWjtm(List<ItfTblRecycleStockBarcodeInfoUpload> tradeNewForOldStockBarcodeInfoUploadList, YjhxJdd yjhxJdd, OrderBase order, OldForNewProduct product, WebsitSH websitSH, WorderInfo worderInfo, String taskNo) {
|
|
|
|
|
|
+ private void getItfTblRecycleStockBarcodeInfoUploadWjtm(List<ItfTblRecycleStockBarcodeInfoUpload> tradeNewForOldStockBarcodeInfoUploadList,
|
|
|
|
+ YjhxAppraise yjhxJdd, OrderBase order, OldForNewProduct product, WebsitSH websitSH, WorderInfo worderInfo, String taskNo) {
|
|
ItfTblRecycleStockBarcodeInfoUpload barcodeInfoUpload = new ItfTblRecycleStockBarcodeInfoUpload();
|
|
ItfTblRecycleStockBarcodeInfoUpload barcodeInfoUpload = new ItfTblRecycleStockBarcodeInfoUpload();
|
|
barcodeInfoUpload.setPgguid(yjhxJdd.getPgguid());
|
|
barcodeInfoUpload.setPgguid(yjhxJdd.getPgguid());
|
|
barcodeInfoUpload.setUploadTaskNo(taskNo);
|
|
barcodeInfoUpload.setUploadTaskNo(taskNo);
|
|
@@ -997,7 +1001,8 @@ public class OldForNewUploadLogic {
|
|
tradeNewForOldStockBarcodeInfoUploadList.add(barcodeInfoUpload);
|
|
tradeNewForOldStockBarcodeInfoUploadList.add(barcodeInfoUpload);
|
|
}
|
|
}
|
|
|
|
|
|
- private void getItfTblRecycleStockBarcodeInfoUploadNjtm(List<ItfTblRecycleStockBarcodeInfoUpload> tradeNewForOldStockBarcodeInfoUploadList, YjhxJdd yjhxJdd, OrderBase order, OldForNewProduct product, WebsitSH websitSH, WorderInfo worderInfo, String taskNo) {
|
|
|
|
|
|
+ private void getItfTblRecycleStockBarcodeInfoUploadNjtm(List<ItfTblRecycleStockBarcodeInfoUpload> tradeNewForOldStockBarcodeInfoUploadList, YjhxAppraise yjhxJdd,
|
|
|
|
+ OrderBase order, OldForNewProduct product, WebsitSH websitSH, WorderInfo worderInfo, String taskNo) {
|
|
ItfTblRecycleStockBarcodeInfoUpload barcodeInfoUpload = new ItfTblRecycleStockBarcodeInfoUpload();
|
|
ItfTblRecycleStockBarcodeInfoUpload barcodeInfoUpload = new ItfTblRecycleStockBarcodeInfoUpload();
|
|
barcodeInfoUpload.setPgguid(yjhxJdd.getPgguid());
|
|
barcodeInfoUpload.setPgguid(yjhxJdd.getPgguid());
|
|
barcodeInfoUpload.setUploadTaskNo(taskNo);
|
|
barcodeInfoUpload.setUploadTaskNo(taskNo);
|
|
@@ -1086,7 +1091,6 @@ public class OldForNewUploadLogic {
|
|
// 条码数据同步
|
|
// 条码数据同步
|
|
try {
|
|
try {
|
|
GreeResponseHelper response = greeLogic.greePost(apiPath, param, 1);
|
|
GreeResponseHelper response = greeLogic.greePost(apiPath, param, 1);
|
|
-// log.info("RECYCLE_STOCK_STOCKINFOS接口请求参数: {}", JSONObject.parseObject(param.toString()));
|
|
|
|
if(200 == response.getStatus()) {
|
|
if(200 == response.getStatus()) {
|
|
synStatus = Constant.SynStatus.SYN.getCode();
|
|
synStatus = Constant.SynStatus.SYN.getCode();
|
|
for( ItfTblRecycleStockBarcodeInfoUpload tradeNewForOldStockBarcodeInfoUpload : barcodeInfoUploads) {
|
|
for( ItfTblRecycleStockBarcodeInfoUpload tradeNewForOldStockBarcodeInfoUpload : barcodeInfoUploads) {
|
|
@@ -1116,12 +1120,12 @@ public class OldForNewUploadLogic {
|
|
tradeNewForOldStockBarcodeInfoUpload.setSynTimes( Objects.isNull(tradeNewForOldStockBarcodeInfoUpload.getSynTimes()) ? 1 : tradeNewForOldStockBarcodeInfoUpload.getSynTimes() + 1 );
|
|
tradeNewForOldStockBarcodeInfoUpload.setSynTimes( Objects.isNull(tradeNewForOldStockBarcodeInfoUpload.getSynTimes()) ? 1 : tradeNewForOldStockBarcodeInfoUpload.getSynTimes() + 1 );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // 上传条码信息任务列表
|
|
|
|
|
|
+ // 上传条码信息任务列表提取状态为0的数据理论上是取不到的,因为生成上传条码表时已更新了状态为1
|
|
List<ItfTblTradeNewForOldStockInfoUploadTask> tradeNewForOldStockInfoUploadTaskList = itfTblTradeNewForOldStockInfoUploadTaskService.lambdaQuery()
|
|
List<ItfTblTradeNewForOldStockInfoUploadTask> tradeNewForOldStockInfoUploadTaskList = itfTblTradeNewForOldStockInfoUploadTaskService.lambdaQuery()
|
|
.eq(ItfTblTradeNewForOldStockInfoUploadTask::getPgguid, pgguid)
|
|
.eq(ItfTblTradeNewForOldStockInfoUploadTask::getPgguid, pgguid)
|
|
.eq(ItfTblTradeNewForOldStockInfoUploadTask::getSynStatus, Constant.SynStatus.UN_SYN.getCode())
|
|
.eq(ItfTblTradeNewForOldStockInfoUploadTask::getSynStatus, Constant.SynStatus.UN_SYN.getCode())
|
|
.orderByAsc(ItfTblTradeNewForOldStockInfoUploadTask::getSynReqId).list();
|
|
.orderByAsc(ItfTblTradeNewForOldStockInfoUploadTask::getSynReqId).list();
|
|
- if( Collections.isEmpty(tradeNewForOldStockInfoUploadTaskList) ) {
|
|
|
|
|
|
+ if(Collections.isEmpty(tradeNewForOldStockInfoUploadTaskList) ) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
//按synReqId顺序更新
|
|
//按synReqId顺序更新
|