|
|
@ -265,4 +265,53 @@ public class OdsWhiteEmbryoServiceImpl implements IOdsWhiteEmbryoService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public String WhiteBilletReturnConfir(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn) {
|
|
|
|
|
|
|
|
//退货的--在生产线上退下来的--托盘号,库位,物料号,物料描述,退货数量
|
|
|
|
|
|
|
|
String result="成功";
|
|
|
|
|
|
|
|
WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn1=new WmsOdsEmStorageNewsSn();
|
|
|
|
|
|
|
|
wmsOdsEmStorageNewsSn1.setAmount(wmsOdsEmStorageNewsSn.getAmount());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNewsSn1.setWlCode(wmsOdsEmStorageNewsSn.getWlCode());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNewsSn1.setMaterialCode(wmsOdsEmStorageNewsSn.getMaterialCode());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNewsSn1.setMaterialDesc(wmsOdsEmStorageNewsSn.getMaterialDesc());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNewsSn1.setSn(wmsOdsEmStorageNewsSn.getSn());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNewsSn1.setCreateBy(wmsOdsEmStorageNewsSn.getCreateBy());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNewsSn1.setGmtCreate(new Date());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNewsSn1.setActiveFlag("1");
|
|
|
|
|
|
|
|
wmsOdsEmStorageNewsSn1.setFactoryCode(wmsOdsEmStorageNewsSn.getFactoryCode());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNewsSnMapper.insertWmsOdsEmStorageNewsSn(wmsOdsEmStorageNewsSn1);
|
|
|
|
|
|
|
|
WmsOdsEmStorageNews wmsOdsEmStorageNews1=new WmsOdsEmStorageNews();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wmsOdsEmStorageNews1.setWlCode(wmsOdsEmStorageNewsSn.gettOwlCode());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNews1.setMaterialCode(wmsOdsEmStorageNewsSn.getMaterialCode());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNews1.setMaterialDesc(wmsOdsEmStorageNewsSn.getMaterialDesc());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNews1.setUserDefined1(wmsOdsEmStorageNewsSn.getUserDefined1());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNews1.setFactoryCode(wmsOdsEmStorageNewsSn.getFactoryCode());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNews1.setActiveFlag("1");
|
|
|
|
|
|
|
|
List<WmsOdsEmStorageNews> wmsOdsEmStorageNewsList= wmsOdsEmStorageNewsMapper.selectWmsOdsEmStorageNewsList(wmsOdsEmStorageNews1);
|
|
|
|
|
|
|
|
if (wmsOdsEmStorageNewsList.size()>0){
|
|
|
|
|
|
|
|
WmsOdsEmStorageNews wmsOdsEmStorageNews2= wmsOdsEmStorageNewsList.get(0);
|
|
|
|
|
|
|
|
BigDecimal newAmount= wmsOdsEmStorageNews2.getAmount();
|
|
|
|
|
|
|
|
wmsOdsEmStorageNews2.setAmount(newAmount.add(wmsOdsEmStorageNewsSn.getAmount()));
|
|
|
|
|
|
|
|
wmsOdsEmStorageNewsMapper.updateWmsOdsEmStorageNews(wmsOdsEmStorageNews2);
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
wmsOdsEmStorageNews1.setStorageId(IdUtils.fastSimpleUUID());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNews1.setCreateBy(wmsOdsEmStorageNewsSn.getCreateBy());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNews1.setGmtCreate(new Date());
|
|
|
|
|
|
|
|
wmsOdsEmStorageNewsMapper.insertWmsOdsEmStorageNews(wmsOdsEmStorageNews1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public WmsOdsEmStorageNews queryMaterialInfor(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn) {
|
|
|
|
|
|
|
|
DynamicDataSourceContextHolder.push("ds_" + wmsOdsEmStorageNewsSn.getFactoryCode());
|
|
|
|
|
|
|
|
WmsOdsEmStorageNews wmsOdsEmStorageNew=new WmsOdsEmStorageNews();
|
|
|
|
|
|
|
|
List<WmsOdsEmStorageNews> wmsOdsEmStorageNews= wmsOdsEmStorageNewsMapper.selectWmsOdsEmStorageNewsByMaterialCode(wmsOdsEmStorageNewsSn);
|
|
|
|
|
|
|
|
if (wmsOdsEmStorageNews.size()>0){
|
|
|
|
|
|
|
|
wmsOdsEmStorageNew=wmsOdsEmStorageNews.get(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return wmsOdsEmStorageNew;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|