wms成品装运单相同的是要生成相同的备货单

master
mengjiao 2 months ago
parent dfe5847d6f
commit 91bf322f6b

@ -92,7 +92,7 @@ public interface WmsProductPutMapper {
public List<WmsProductPut> selectWmsProductPutSAPByIds(@Param("id")String id); public List<WmsProductPut> selectWmsProductPutSAPByIds(@Param("id")String id);
public WmsProductPut selectWmsProductPutByIdANDStatus(String id); public WmsProductPut selectWmsProductPutByIdANDStatus(@Param("id")String id);
// String selectProOrderWorkorder(WmsProductPut wmsProductPut1); // String selectProOrderWorkorder(WmsProductPut wmsProductPut1);

@ -1298,25 +1298,28 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
String result="操作成功"; String result="操作成功";
for (WmsProductPut wmsProductPut: wmsProductPutList){ for (WmsProductPut wmsProductPut: wmsProductPutList){
WmsProductPut wmsProductPut1= wmsProductPutMapper.selectWmsProductPutByIdANDStatus(wmsProductPut.getId()); // WmsProductPut wmsProductPut1= wmsProductPutMapper.selectWmsProductPutByIdANDStatus(wmsProductPut.getId());
// //LFBJA 参考凭证会计年度 // //LFBJA
// //LFBNR 参考凭证的凭证号 // //LFBNR
// //LFPOS 参考凭证项目 // //LFPOS
// //EBELN 采购凭证号 // //EBELN
// //EBELP 采购凭证的项目编号 // //EBELP
// //MATNR 物料号 // //MATNR
// //QUANTITY 数量 // //QUANTITY
// //WERKS 工厂 // //WERKS
// //LGORT 库存地点 // //LGORT
// //这个地方 // //这个地方
// Map paramMap=new HashMap<>(); // Map paramMap=new HashMap<>();
// List<Map> mapList = new ArrayList<>(); // List<Map> mapList = new ArrayList<>();
// paramMap.put("S_MBLNR",wmsRawOrderIn.getUserDefined1()); // paramMap.put("LFBJA",wmsProductPut1.getAttr10());//参考凭证会计年度
// paramMap.put("S_MJAHR",wmsRawOrderIn.getUserDefined2()); // paramMap.put("LFBNR",wmsProductPut1.getSapProof());//参考凭证的凭证号
// paramMap.put("S_MATNR",wmsRawOrderIn.getMaterialCode()); // //paramMap.put("LFPOS",wmsProductPut1.get());//参考凭证项目
// paramMap.put("incomeBatchNo",wmsRawOrderIn.getIncomeBatchNo()); //批次 // paramMap.put("EBELN",wmsProductPut1.getProductCode());//采购凭证号
// paramMap.put("ebelp",wmsRawOrderIn.getPoLine()); // paramMap.put("EBELP",wmsProductPut1.getPoLine());//采购凭证的项目编号
// paramMap.put("poNo",wmsRawOrderIn.getPoNo()); // paramMap.put("MATNR",wmsProductPut1.getPoNo());//物料号
// paramMap.put("QUANTITY",wmsProductPut1.getPoNo());//数量
// paramMap.put("WERKS",wmsProductPut1.getPoNo());//工厂
// paramMap.put("LGORT",wmsProductPut1.getPoNo());//库存地点
// mapList.add(paramMap); // mapList.add(paramMap);
// R result2 = remoteSapService.handleUpdateSAP102(mapList); // R result2 = remoteSapService.handleUpdateSAP102(mapList);
// if (result2.getCode()==200){ // if (result2.getCode()==200){

@ -178,13 +178,13 @@ public class WmsSellOutEmbryoServiceImpl implements IWmsSellOutEmbryoService {
BigDecimal planQuantity = wmsSellOutEmbryo1.getPlanQuantity(); BigDecimal planQuantity = wmsSellOutEmbryo1.getPlanQuantity();
List<WmsFpStorageNewsSn> wmsFpStorageNewsSns= wmsFpStorageNewsSnMapper.selectwmsFpStorageNewsGroupWaCode(productCode); List<WmsFpStorageNewsSn> wmsFpStorageNewsSns= wmsFpStorageNewsSnMapper.selectwmsFpStorageNewsGroupWaCode(productCode);
if (wmsFpStorageNewsSns.size()<1){ if (wmsFpStorageNewsSns.size()<1){
return "无库存"; return productCode+"无库存";
} }
String stock= wmsSellOutEmbryoMapper.selectwmsFpStorageNewsTS(formattedDate);
//区分大小planQuantity //区分大小planQuantity
for ( WmsFpStorageNewsSn wmsFpStorageNewsSn: wmsFpStorageNewsSns){ for ( WmsFpStorageNewsSn wmsFpStorageNewsSn: wmsFpStorageNewsSns){
BigDecimal tem= wmsFpStorageNewsSn.getAmount();//数量 BigDecimal tem= wmsFpStorageNewsSn.getAmount();//数量
//planQuantity看成总数量 //planQuantity看成总数量
String stock= wmsSellOutEmbryoMapper.selectwmsFpStorageNewsTS(formattedDate);
if(planQuantity.compareTo(tem)<=0){ if(planQuantity.compareTo(tem)<=0){
//生成一个 //生成一个
wmsSellOutEmbryo1.setStockOrder("BH"+stock); wmsSellOutEmbryo1.setStockOrder("BH"+stock);

@ -521,6 +521,6 @@
<select id="selectWmsProductPutByIdANDStatus" parameterType="String" resultMap="WmsProductPutResult"> <select id="selectWmsProductPutByIdANDStatus" parameterType="String" resultMap="WmsProductPutResult">
<include refid="selectWmsProductPutVo"/> <include refid="selectWmsProductPutVo"/>
where id = #{id} where id = #{id}
and status='1' and SAP_status='1'
</select> </select>
</mapper> </mapper>

@ -286,7 +286,7 @@
<if test="attr9 != null and attr9 != ''">and attr9 = #{attr9}</if> <if test="attr9 != null and attr9 != ''">and attr9 = #{attr9}</if>
<if test="attr10 != null and attr10 != ''">and attr10 = #{attr10}</if> <if test="attr10 != null and attr10 != ''">and attr10 = #{attr10}</if>
</where> </where>
ORDER BY create_time DESC ORDER BY stock_order DESC
</select> </select>
<select id="selectWmsSellOutEmbryoById" parameterType="String" resultMap="WmsSellOutEmbryoResult"> <select id="selectWmsSellOutEmbryoById" parameterType="String" resultMap="WmsSellOutEmbryoResult">
<include refid="selectWmsSellOutEmbryoVo"/> <include refid="selectWmsSellOutEmbryoVo"/>

Loading…
Cancel
Save