Merge remote-tracking branch 'origin/lets' into lets
This commit is contained in:
commit
8e6cceb2c8
|
@ -11,6 +11,7 @@ import com.hzya.frame.plugin.lets.constant.OverallConstant;
|
|||
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
|
||||
import com.hzya.frame.plugin.lets.dao.IBdRdclDao;
|
||||
import com.hzya.frame.plugin.lets.entity.BdRdclEntity;
|
||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsAdjustOrderRequestVO;
|
||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO;
|
||||
import com.hzya.frame.plugin.lets.u8cdto.BillVO;
|
||||
import com.hzya.frame.plugin.lets.u8cdto.GeneralBillVO_4ADto;
|
||||
|
@ -24,6 +25,7 @@ import com.hzya.frame.plugin.lets.util.pushData.ZTResult;
|
|||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
|
||||
import com.hzya.frame.ttxofs.dto.ofsTransferOrderSearch.OFSAdjustOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
|
||||
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
@ -301,17 +303,22 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
|||
//审核时间dauditdate
|
||||
parentvo.setDauditdate(StringUtils.substring(format, 0, 10));
|
||||
|
||||
//cdispatcherid--收发类别,ofs过来的写死,20240813(妮姐+万万),就是调整出库,调整入库
|
||||
BdRdclEntity bdRdclEntity = new BdRdclEntity();
|
||||
bdRdclEntity.setRdname("调整入库");
|
||||
bdRdclEntity.setDr(0);
|
||||
bdRdclEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||
List<BdRdclEntity> BdRdclEntityList = iBdRdclDao.query(bdRdclEntity);
|
||||
if (BdRdclEntityList.size() == 0) {
|
||||
Assert.state(false, "查询U8C收发类型:调整入库失败。未查询到U8C收发类型。");
|
||||
//cdispatcherid--收发类别
|
||||
List<OFSAdjustOrderSearchResponse.OFSAdjustOrder> ofsAdjustOrders = queryOfsAdjustOrders(ofsHeader.getRefOrderCode());
|
||||
if(ofsAdjustOrders.size()!=1){
|
||||
Assert.state(false,"根据调整入库单号:{},查询调整单:{},失败。不存在或不唯一。",ofsCode,ofsHeader.getRefOrderCode());
|
||||
}
|
||||
String RdclCode = BdRdclEntityList.get(0).getRdcode();//收发类别编码
|
||||
parentvo.setCdispatcherid(RdclCode);
|
||||
String u8ReceiptType = ofsAdjustOrders.get(0).getHeader().getU8ReceiptType();
|
||||
// BdRdclEntity bdRdclEntity = new BdRdclEntity();
|
||||
// bdRdclEntity.setRdname("调整入库");
|
||||
// bdRdclEntity.setDr(0);
|
||||
// bdRdclEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||
// List<BdRdclEntity> BdRdclEntityList = iBdRdclDao.query(bdRdclEntity);
|
||||
// if (BdRdclEntityList.size() == 0) {
|
||||
// Assert.state(false, "查询U8C收发类型:调整入库失败。未查询到U8C收发类型。");
|
||||
// }
|
||||
// String RdclCode = BdRdclEntityList.get(0).getRdcode();//收发类别编码
|
||||
parentvo.setCdispatcherid(u8ReceiptType);
|
||||
|
||||
//子表
|
||||
List<GeneralBillVO_4ADto.Childrenvo> childrenvo = new ArrayList<>();
|
||||
|
@ -339,13 +346,13 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
|||
mapStr = "{\"GeneralBillVO_4A\":[" + dataJson + "]}";
|
||||
|
||||
//推送
|
||||
// response = pushDataByU8cUtil.pushU8CByCode(OverallConstant.getOverAllValue("otherinqz"), mapStr);
|
||||
ZTResult ztResult = pushU8CByApiCode.pushByCode(OverallConstant.getOverAllValue("otherinqzCode"), mapStr);
|
||||
|
||||
//两层判断,一层中台转发,一层u8c返回
|
||||
if ("false".equals(ztResult.getFlag())) {
|
||||
//转发失败
|
||||
Assert.state(false, "丽知:OFS调整入库--->U8C其它入库.中台转发失败,失败原因:{}", ztResult.getMsg());
|
||||
response=JSONUtil.toJsonStr(ztResult.getAttribute());
|
||||
Assert.state(false, "丽知:OFS调整入库--->U8C其它入库.中台转发失败,失败原因:{}", ztResult.getAttribute());
|
||||
}
|
||||
Attribute attribute = ztResult.getAttribute();
|
||||
System.out.println(attribute);
|
||||
|
@ -430,4 +437,24 @@ public class AdjustInPluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* ofs调整单查询
|
||||
* ofs. adjustOrder.search
|
||||
*/
|
||||
public List<OFSAdjustOrderSearchResponse.OFSAdjustOrder> queryOfsAdjustOrders(String ofsAdjustCode) throws Exception {
|
||||
QueryOfsAdjustOrderRequestVO queryOfsAdjustOrderRequestVO = new QueryOfsAdjustOrderRequestVO();
|
||||
queryOfsAdjustOrderRequestVO.setClientCode("LETS");
|
||||
queryOfsAdjustOrderRequestVO.setCode(ofsAdjustCode);
|
||||
queryOfsAdjustOrderRequestVO.setPageNo(1L);
|
||||
queryOfsAdjustOrderRequestVO.setPageSize(500L);
|
||||
|
||||
InterfaceParamDto interfaceParamDto = new InterfaceParamDto();
|
||||
interfaceParamDto.setApi("ofs.adjustOrder.search");
|
||||
interfaceParamDto.setData(JSON.toJSONString(queryOfsAdjustOrderRequestVO));
|
||||
OFSAdjustOrderSearchResponse ofsAdjustOrderSearchResponse =(OFSAdjustOrderSearchResponse) ofsUnifiedService.unified(interfaceParamDto);
|
||||
System.out.println(ofsAdjustOrderSearchResponse);
|
||||
List<OFSAdjustOrderSearchResponse.OFSAdjustOrder> data = ofsAdjustOrderSearchResponse.getData();
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -306,17 +306,24 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
|||
//审核时间dauditdate
|
||||
parentvo.setDauditdate(StringUtils.substring(format, 0, 10));
|
||||
|
||||
//cdispatcherid--收发类别,ofs过来的写死,20240813(妮姐+万万),就是调整出库,调整入库
|
||||
BdRdclEntity bdRdclEntity = new BdRdclEntity();
|
||||
bdRdclEntity.setRdname("调整出库");
|
||||
bdRdclEntity.setDr(0);
|
||||
bdRdclEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||
List<BdRdclEntity> BdRdclEntityList = iBdRdclDao.query(bdRdclEntity);
|
||||
if (BdRdclEntityList.size() == 0) {
|
||||
Assert.state(false, "查询U8C收发类型:调整出库失败。未查询到U8C收发类型。");
|
||||
//cdispatcherid--收发类别
|
||||
List<OFSAdjustOrderSearchResponse.OFSAdjustOrder> ofsAdjustOrders = queryOfsAdjustOrders(ofsHeader.getRefOrderCode());
|
||||
if(ofsAdjustOrders.size()!=1){
|
||||
Assert.state(false,"根据调整出库单号:{},查询调整单:{},失败。不存在或不唯一。",ofsCode,ofsHeader.getRefOrderCode());
|
||||
}
|
||||
String RdclCode = BdRdclEntityList.get(0).getRdcode();//收发类别编码
|
||||
parentvo.setCdispatcherid(RdclCode);
|
||||
String u8ShipmentType = ofsAdjustOrders.get(0).getHeader().getU8ShipmentType();//出库类型
|
||||
|
||||
// BdRdclEntity bdRdclEntity = new BdRdclEntity();
|
||||
//// bdRdclEntity.setRdname("调整出库");
|
||||
// bdRdclEntity.setRdcode(u8ShipmentType);
|
||||
// bdRdclEntity.setDr(0);
|
||||
// bdRdclEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||
// List<BdRdclEntity> BdRdclEntityList = iBdRdclDao.query(bdRdclEntity);
|
||||
// if (BdRdclEntityList.size() == 0) {
|
||||
// Assert.state(false, "查询U8C收发类型:调整出库失败。未查询到U8C收发类型。");
|
||||
// }
|
||||
// String RdclCode = BdRdclEntityList.get(0).getRdcode();//收发类别编码
|
||||
parentvo.setCdispatcherid(u8ShipmentType);
|
||||
|
||||
//设置自动拣货
|
||||
// parentvo.setIsautopick("Y");
|
||||
|
@ -353,7 +360,8 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
|||
//两层判断,一层中台转发,一层u8c返回
|
||||
if ("false".equals(ztResult.getFlag())) {
|
||||
//转发失败
|
||||
Assert.state(false, "丽知:OFS调整出库--->U8C其它出库.中台转发失败,失败原因:{}", ztResult.getMsg());
|
||||
response=JSONUtil.toJsonStr(ztResult.getAttribute());
|
||||
Assert.state(false, "丽知:OFS调整出库--->U8C其它出库.中台转发失败,失败原因:{}", ztResult.getAttribute());
|
||||
}
|
||||
Attribute attribute = ztResult.getAttribute();
|
||||
System.out.println(attribute);
|
||||
|
@ -482,7 +490,7 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
|||
* ofs调整单查询
|
||||
* ofs. adjustOrder.search
|
||||
*/
|
||||
public void queryOfsAdjustOrders(String ofsAdjustCode) throws Exception {
|
||||
public List<OFSAdjustOrderSearchResponse.OFSAdjustOrder> queryOfsAdjustOrders(String ofsAdjustCode) throws Exception {
|
||||
QueryOfsAdjustOrderRequestVO queryOfsAdjustOrderRequestVO = new QueryOfsAdjustOrderRequestVO();
|
||||
queryOfsAdjustOrderRequestVO.setClientCode("LETS");
|
||||
queryOfsAdjustOrderRequestVO.setCode(ofsAdjustCode);
|
||||
|
@ -494,7 +502,7 @@ public class AdjustOutPluginInitializer extends PluginBaseEntity {
|
|||
interfaceParamDto.setData(JSON.toJSONString(queryOfsAdjustOrderRequestVO));
|
||||
OFSAdjustOrderSearchResponse ofsAdjustOrderSearchResponse =(OFSAdjustOrderSearchResponse) ofsUnifiedService.unified(interfaceParamDto);
|
||||
System.out.println(ofsAdjustOrderSearchResponse);
|
||||
|
||||
|
||||
List<OFSAdjustOrderSearchResponse.OFSAdjustOrder> data = ofsAdjustOrderSearchResponse.getData();
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public class TransferTest {
|
|||
}
|
||||
@Test
|
||||
public void t31(){
|
||||
adjustInPluginInitializer.start("LETS-RE2024081900000003");
|
||||
adjustInPluginInitializer.start("LETS-RE2024082700000002");
|
||||
}
|
||||
@Test
|
||||
public void t32(){
|
||||
|
@ -82,7 +82,7 @@ public class TransferTest {
|
|||
}
|
||||
@Test
|
||||
public void t41(){
|
||||
adjustOutPluginInitializer.start("LETS-SH2024082200000008");
|
||||
adjustOutPluginInitializer.start("LETS-SH2024082700000001");
|
||||
}
|
||||
@Test
|
||||
public void t42(){
|
||||
|
|
|
@ -41,6 +41,14 @@ public class OFSAdjustOrderSearchResponse extends ReturnMessageBasics {
|
|||
private String lastUpdatedBy;
|
||||
private String remark;
|
||||
private String sourcePlatformCode;
|
||||
/**
|
||||
* 出库单类型 0201材料领用 0202销售出库 0203其他出库 0204盘盈出库 0205调拨出库
|
||||
*/
|
||||
private String u8ShipmentType;
|
||||
/**
|
||||
* 入库单类型 0101采购入库 0102生产入库 0103其他入库 0104盘盈入库 0105调拨入库
|
||||
*/
|
||||
private String u8ReceiptType;
|
||||
}
|
||||
@Data
|
||||
public class OFSAdjustB{
|
||||
|
|
Loading…
Reference in New Issue