丽知:调整入库,调整出库修改
This commit is contained in:
parent
a58eeba470
commit
2707259d5b
|
@ -14,9 +14,13 @@ import com.hzya.frame.plugin.lets.entity.BdRdclEntity;
|
||||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO;
|
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO;
|
||||||
import com.hzya.frame.plugin.lets.u8cdto.BillVO;
|
import com.hzya.frame.plugin.lets.u8cdto.BillVO;
|
||||||
import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4ADto;
|
import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4ADto;
|
||||||
|
import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4IDto;
|
||||||
import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
|
import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
|
||||||
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
||||||
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
|
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
|
||||||
|
import com.hzya.frame.plugin.lets.util.pushData.Attribute;
|
||||||
|
import com.hzya.frame.plugin.lets.util.pushData.PushU8CByApiCode;
|
||||||
|
import com.hzya.frame.plugin.lets.util.pushData.ZTResult;
|
||||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
||||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
|
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
|
||||||
|
@ -73,6 +77,8 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
||||||
@Autowired
|
@Autowired
|
||||||
private PushDataByU8cUtil pushDataByU8cUtil;
|
private PushDataByU8cUtil pushDataByU8cUtil;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private PushU8CByApiCode pushU8CByApiCode;
|
||||||
|
@Autowired
|
||||||
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
|
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -256,6 +262,7 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送U8C其它入库单
|
* 推送U8C其它入库单
|
||||||
|
*
|
||||||
* @param filterStockinOrders
|
* @param filterStockinOrders
|
||||||
*/
|
*/
|
||||||
public void implement(List<StockinOrderSearchResponse.StockinOrder> filterStockinOrders) {
|
public void implement(List<StockinOrderSearchResponse.StockinOrder> filterStockinOrders) {
|
||||||
|
@ -332,20 +339,26 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
||||||
mapStr = "{\"GeneralBillVO_4A\":[" + dataJson + "]}";
|
mapStr = "{\"GeneralBillVO_4A\":[" + dataJson + "]}";
|
||||||
|
|
||||||
//推送
|
//推送
|
||||||
response = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("otherinqz"), mapStr);
|
// response = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("otherinqz"), mapStr);
|
||||||
System.out.println(response);
|
ZTResult ztResult = pushU8CByApiCode.pushByCode(OverallConstant.getOverAllValue("otherinqzCode"), mapStr);
|
||||||
|
|
||||||
|
//两层判断,一层中台转发,一层u8c返回
|
||||||
|
if ("false".equals(ztResult.getFlag())) {
|
||||||
|
//转发失败
|
||||||
|
Assert.state(false, "丽知:OFS调整入库--->U8C其它入库.中台转发失败,失败原因:{}", ztResult.getMsg());
|
||||||
|
}
|
||||||
|
Attribute attribute = ztResult.getAttribute();
|
||||||
|
System.out.println(attribute);
|
||||||
|
|
||||||
boolean isSuccess = false;
|
boolean isSuccess = false;
|
||||||
String vbillcode = "";
|
String vbillcode = "";
|
||||||
if (response != null && !"".equals(response)) {
|
if ("success".equals(attribute.getStatus())) {
|
||||||
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
|
|
||||||
if ("success".equals(reusltStrDto.getStatus())) {
|
|
||||||
isSuccess = true;
|
isSuccess = true;
|
||||||
String data = reusltStrDto.getData();
|
String data = attribute.getData();
|
||||||
GeneralBillVO_4ADto resGeneralBillVO = resultDataHandle(data);
|
GeneralBillVO_4ADto resGeneralBillVO = resultDataHandle(data);
|
||||||
System.out.println(resGeneralBillVO);
|
System.out.println(resGeneralBillVO);
|
||||||
vbillcode = resGeneralBillVO.getParentvo().getVbillcode();
|
vbillcode = resGeneralBillVO.getParentvo().getVbillcode();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (!isSuccess) {
|
if (!isSuccess) {
|
||||||
Assert.state(false, "推送U8C--> 丽知:OFS调整入库--->U8C其它入库 失败 接口返回结果:{} 接口入参:{}", response, mapStr);
|
Assert.state(false, "推送U8C--> 丽知:OFS调整入库--->U8C其它入库 失败 接口返回结果:{} 接口入参:{}", response, mapStr);
|
||||||
}
|
}
|
||||||
|
@ -360,6 +373,7 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
||||||
integrationTaskLivingDetailsEntity.setRootAppPk(ofsCode);
|
integrationTaskLivingDetailsEntity.setRootAppPk(ofsCode);
|
||||||
integrationTaskLivingDetailsEntity.setRootAppBill(ofsCode);
|
integrationTaskLivingDetailsEntity.setRootAppBill(ofsCode);
|
||||||
integrationTaskLivingDetailsEntity.setRootAppBill(vbillcode);
|
integrationTaskLivingDetailsEntity.setRootAppBill(vbillcode);
|
||||||
|
integrationTaskLivingDetailsEntity.setDef1(vbillcode);
|
||||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,9 @@ import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4IDto;
|
||||||
import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
|
import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
|
||||||
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
||||||
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
|
import com.hzya.frame.plugin.lets.util.SaveOrUpdateBusinessLogUtil;
|
||||||
|
import com.hzya.frame.plugin.lets.util.pushData.Attribute;
|
||||||
|
import com.hzya.frame.plugin.lets.util.pushData.PushU8CByApiCode;
|
||||||
|
import com.hzya.frame.plugin.lets.util.pushData.ZTResult;
|
||||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
||||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
|
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
|
||||||
|
@ -81,6 +84,8 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
||||||
@Autowired
|
@Autowired
|
||||||
private PushDataByU8cUtil pushDataByU8cUtil;
|
private PushDataByU8cUtil pushDataByU8cUtil;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private PushU8CByApiCode pushU8CByApiCode;
|
||||||
|
@Autowired
|
||||||
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
|
private SaveOrUpdateBusinessLogUtil saveOrUpdateBusinessLogUtil;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -256,6 +261,7 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 丽知:OFS调整出库--->U8C其它出库
|
* 丽知:OFS调整出库--->U8C其它出库
|
||||||
|
*
|
||||||
* @param filterStockoutOrders
|
* @param filterStockoutOrders
|
||||||
*/
|
*/
|
||||||
public void implement(List<StockoutOrderSearchResponse.StockoutOrder> filterStockoutOrders) {
|
public void implement(List<StockoutOrderSearchResponse.StockoutOrder> filterStockoutOrders) {
|
||||||
|
@ -338,22 +344,28 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
||||||
generalBillVO_4I.setChildrenvo(childrenvo);
|
generalBillVO_4I.setChildrenvo(childrenvo);
|
||||||
String dataJson = JSONUtil.toJsonStr(generalBillVO_4I);
|
String dataJson = JSONUtil.toJsonStr(generalBillVO_4I);
|
||||||
mapStr = "{\"GeneralBillVO_4I\":[" + dataJson + "]}";
|
mapStr = "{\"GeneralBillVO_4I\":[" + dataJson + "]}";
|
||||||
response = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("otheroutqz"), mapStr);
|
// response = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("otheroutqz"), mapStr);
|
||||||
System.out.println(response);
|
ZTResult ztResult = pushU8CByApiCode.pushByCode(OverallConstant.getOverAllValue("otheroutqzCode"), mapStr);
|
||||||
|
|
||||||
|
//两层判断,一层中台转发,一层u8c返回
|
||||||
|
if ("false".equals(ztResult.getFlag())) {
|
||||||
|
//转发失败
|
||||||
|
Assert.state(false, "丽知:OFS调整出库--->U8C其它出库.中台转发失败,失败原因:{}", ztResult.getMsg());
|
||||||
|
}
|
||||||
|
Attribute attribute = ztResult.getAttribute();
|
||||||
|
System.out.println(attribute);
|
||||||
|
|
||||||
boolean isSuccess = false;
|
boolean isSuccess = false;
|
||||||
String vbillcode = "";
|
String vbillcode = "";
|
||||||
if (response != null && !"".equals(response)) {
|
if ("success".equals(attribute.getStatus())) {
|
||||||
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
|
|
||||||
if ("success".equals(reusltStrDto.getStatus())) {
|
|
||||||
isSuccess = true;
|
isSuccess = true;
|
||||||
String data = reusltStrDto.getData();
|
String data = attribute.getData();
|
||||||
GeneralBillVO_4IDto resGeneralBillVO = resultDataHandle(data);
|
GeneralBillVO_4IDto resGeneralBillVO = resultDataHandle(data);
|
||||||
System.out.println(resGeneralBillVO);
|
System.out.println(resGeneralBillVO);
|
||||||
vbillcode = resGeneralBillVO.getParentvo().getVbillcode();
|
vbillcode = resGeneralBillVO.getParentvo().getVbillcode();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (!isSuccess) {
|
if (!isSuccess) {
|
||||||
Assert.state(false, "推送U8C--> 丽知:OFS调整入库--->U8C其它入库 失败 接口返回结果:{} 接口入参:{}", response, mapStr);
|
Assert.state(false, "推送U8C--> 丽知:OFS调整出库--->U8C其它出库 失败 接口返回结果:{} 接口入参:{}", response, mapStr);
|
||||||
}
|
}
|
||||||
//成功
|
//成功
|
||||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||||
|
@ -363,8 +375,8 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
||||||
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
|
integrationTaskLivingDetailsEntity.setNewPushDate(new Date());
|
||||||
integrationTaskLivingDetailsEntity.setBusinessDate(format);
|
integrationTaskLivingDetailsEntity.setBusinessDate(format);
|
||||||
integrationTaskLivingDetailsEntity.setRootAppPk(ofsCode);
|
integrationTaskLivingDetailsEntity.setRootAppPk(ofsCode);
|
||||||
integrationTaskLivingDetailsEntity.setRootAppBill(ofsCode);//u8c其他出库单号
|
integrationTaskLivingDetailsEntity.setRootAppBill(ofsCode);
|
||||||
// integrationTaskLivingDetailsEntity.setRootAppBill(vbillcode);//u8c其他出库单号
|
integrationTaskLivingDetailsEntity.setDef1(vbillcode);//u8c其他出库单号
|
||||||
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
integrationTaskLivingDetailsEntity.setPluginId(getPluginId());
|
||||||
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
saveOrUpdateBusinessLogUtil.saveOrUpdate(integrationTaskLivingDetailsEntity);
|
||||||
|
|
||||||
|
@ -373,8 +385,7 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
||||||
logger.error("推送U8C,丽知:OFS调整出库--->U8C其它出库失败,失败原因:" + e);
|
logger.error("推送U8C,丽知:OFS调整出库--->U8C其它出库失败,失败原因:" + e);
|
||||||
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
|
ReusltStrDto reusltStrDto = JSON.parseObject(response, ReusltStrDto.class);
|
||||||
|
|
||||||
String ErrMessage ="推送U8C,丽知:OFS调整入库--->U8C其它入库失败,失败原因:"+ reusltStrDto.getErrormsg();
|
String ErrMessage = "推送U8C,丽知:OFS调整出库--->U8C其它出库失败,失败原因:" + reusltStrDto.getErrormsg();
|
||||||
|
|
||||||
|
|
||||||
//失败
|
//失败
|
||||||
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
IntegrationTaskLivingDetailsEntity integrationTaskLivingDetailsEntity = new IntegrationTaskLivingDetailsEntity();
|
||||||
|
@ -412,6 +423,7 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 只是命名不一样,为了方便区分,顾转换为stockout
|
* 只是命名不一样,为了方便区分,顾转换为stockout
|
||||||
|
*
|
||||||
* @param saleOutReturnMessageDto
|
* @param saleOutReturnMessageDto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue