丽知:组装修改
This commit is contained in:
parent
a8c40684e5
commit
0feefe2a4d
|
@ -11,12 +11,16 @@ import com.hzya.frame.plugin.lets.constant.OverallConstant;
|
||||||
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
|
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
|
||||||
import com.hzya.frame.plugin.lets.dao.IBdRdclDao;
|
import com.hzya.frame.plugin.lets.dao.IBdRdclDao;
|
||||||
import com.hzya.frame.plugin.lets.dao.IBdSetpartDao;
|
import com.hzya.frame.plugin.lets.dao.IBdSetpartDao;
|
||||||
|
import com.hzya.frame.plugin.lets.entity.BdInvbasdocEntity;
|
||||||
|
import com.hzya.frame.plugin.lets.entity.BdInvmandocEntity;
|
||||||
|
import com.hzya.frame.plugin.lets.entity.BdSetpartEntity;
|
||||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsAdjustOrderRequestVO;
|
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsAdjustOrderRequestVO;
|
||||||
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO;
|
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsStockinOrderRequestVO;
|
||||||
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.ReusltStrDto;
|
import com.hzya.frame.plugin.lets.u8cdto.ReusltStrDto;
|
||||||
import com.hzya.frame.plugin.lets.u8cdto.SpecialbillVO;
|
import com.hzya.frame.plugin.lets.u8cdto.SpecialbillVO;
|
||||||
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
import com.hzya.frame.plugin.lets.util.PushDataByU8cUtil;
|
||||||
|
import com.hzya.frame.plugin.lets.util.QueryU8CEntityUtil;
|
||||||
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.Attribute;
|
||||||
import com.hzya.frame.plugin.lets.util.pushData.PushU8CByApiCode;
|
import com.hzya.frame.plugin.lets.util.pushData.PushU8CByApiCode;
|
||||||
|
@ -89,6 +93,8 @@ public class AdjustInZZPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private OfsUnifiedService ofsUnifiedService;
|
private OfsUnifiedService ofsUnifiedService;
|
||||||
|
@Autowired
|
||||||
|
private QueryU8CEntityUtil queryU8CEntityUtil;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBdRdclDao iBdRdclDao;
|
private IBdRdclDao iBdRdclDao;
|
||||||
|
@ -273,23 +279,32 @@ public class AdjustInZZPluginInitializer extends PluginBaseEntity {
|
||||||
*/
|
*/
|
||||||
public void implement(List<StockinOrderSearchResponse.StockinOrder> filterStockinOrders) {
|
public void implement(List<StockinOrderSearchResponse.StockinOrder> filterStockinOrders) {
|
||||||
for (StockinOrderSearchResponse.StockinOrder stockinOrder : filterStockinOrders) {
|
for (StockinOrderSearchResponse.StockinOrder stockinOrder : filterStockinOrders) {
|
||||||
System.out.println(stockinOrder);
|
|
||||||
String mapStr = "";
|
String mapStr = "";
|
||||||
String format = "";
|
String format = "";
|
||||||
String response = "";
|
String response = "";
|
||||||
String ofsCode = "";
|
String ofsCode = "";
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
StockinOrderSearchResponse.StockinOrder.StockinH ofsHeader = stockinOrder.getHeader();
|
||||||
|
System.out.println(ofsHeader);
|
||||||
//主表
|
//主表
|
||||||
SpecialbillVO specialbillVO = new SpecialbillVO();
|
SpecialbillVO specialbillVO = new SpecialbillVO();
|
||||||
SpecialbillVO.Parentvo parentvo = new SpecialbillVO.Parentvo();
|
SpecialbillVO.Parentvo parentvo = new SpecialbillVO.Parentvo();
|
||||||
|
|
||||||
//pk_corp 公司
|
//pk_corp 公司
|
||||||
|
parentvo.setPk_corp(ofsHeader.getCompanyCode());
|
||||||
//dbilldate 单据日期
|
//dbilldate 单据日期
|
||||||
|
format = ofsHeader.getCreated();
|
||||||
|
parentvo.setDbilldate(StringUtils.substring(format, 0, 10));
|
||||||
//coperatorid 制单人
|
//coperatorid 制单人
|
||||||
|
parentvo.setCoperatorid("tbadmin");
|
||||||
//cinwarehouseid 入库仓库(审批,3.6及上版本支持)
|
//cinwarehouseid 入库仓库(审批,3.6及上版本支持)
|
||||||
|
parentvo.setCinwarehouseid(ofsHeader.getFacilityCode());
|
||||||
|
//vnote 备注
|
||||||
|
parentvo.setVnote(ofsHeader.getNote());
|
||||||
|
|
||||||
|
|
||||||
|
queryBdSetPart(null,null);
|
||||||
|
|
||||||
//子表
|
//子表
|
||||||
List<SpecialbillVO.Childrenvo> childrenvo =new ArrayList<>();
|
List<SpecialbillVO.Childrenvo> childrenvo =new ArrayList<>();
|
||||||
|
@ -434,4 +449,36 @@ public class AdjustInZZPluginInitializer extends PluginBaseEntity {
|
||||||
List<OFSAdjustOrderSearchResponse.OFSAdjustOrder> data = ofsAdjustOrderSearchResponse.getData();
|
List<OFSAdjustOrderSearchResponse.OFSAdjustOrder> data = ofsAdjustOrderSearchResponse.getData();
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询成套件信息,因为是调整入库,只有套件信息
|
||||||
|
* @param skuCode ofs sku编码
|
||||||
|
* @param pkCorp 公司编码
|
||||||
|
* 套件 存货管理档案的主键
|
||||||
|
*/
|
||||||
|
public void queryBdSetPart(String skuCode,String pkCorp){
|
||||||
|
|
||||||
|
//查询存货基本档案
|
||||||
|
BdInvbasdocEntity bdInvbasdocEntity = queryU8CEntityUtil.queryBdInvbasdocByCode(skuCode);
|
||||||
|
if (bdInvbasdocEntity == null) {
|
||||||
|
Assert.state(false,"根据存货编码:{},查询存货基本档案失败,请检查。",skuCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询存货管理档案
|
||||||
|
BdInvmandocEntity bdInvmandocEntity = queryU8CEntityUtil.queryBdInvmandocByPkInvbasdocAndPkCorp(bdInvbasdocEntity.getPkInvbasdoc(), pkCorp);
|
||||||
|
if (bdInvmandocEntity == null) {
|
||||||
|
Assert.state(false,"根据存货编码:{},存货基本档案主键:{},公司编码:{},查询存货管理档案失败,请检查是否分配。",skuCode,bdInvbasdocEntity.getPkInvbasdoc(),pkCorp);
|
||||||
|
}
|
||||||
|
//查询配件信息
|
||||||
|
BdSetpartEntity bdSetpartEntity = new BdSetpartEntity();
|
||||||
|
bdSetpartEntity.setPkInvmandocpart(bdInvmandocEntity.getPkInvmandoc());
|
||||||
|
bdSetpartEntity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE);
|
||||||
|
List<BdSetpartEntity> query = bdSetpartDao.query(bdSetpartEntity);
|
||||||
|
if(query.size()==0){
|
||||||
|
Assert.state(false,"OFS调整入库(组装),查询");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue