wms成品退货提单修改3

master
mengjiao 7 months ago
parent a62f1b43de
commit 6edd217e4e

@ -524,13 +524,15 @@ public class SapItemSyncImpl implements SapItemSyncService {
String LIFNR_NM=maraTable.getString("LIFNR_NM");//货运代理描述
String ZSAREA=maraTable.getString("ZSAREA");//销售大区
String BZTXT1=maraTable.getString("BZTXT1");//销售大区描述
String POSNR=maraTable.getString("POSNR");//交货项目
log.info("物料号:"+MATNR+"物料描述:"+MAKTX+"交货单:"+VBELN+"销售单:"+VBELN_VA+"销售凭证类型:"+AUART+"销售凭证类型描述:"+BEZEI+
"数量:"+MENGE+"单位:"+MEINS+"计划日期:"+TDDAT+"送达方:"+KUNNR+"送达方描述:"+KUNNR_NM+"货运代理:"+LIFNR+
"货运代理描述:"+LIFNR_NM+"销售大区:"+ZSAREA+"销售大区描述:"+BZTXT1);
"货运代理描述:"+LIFNR_NM+"销售大区:"+ZSAREA+"销售大区描述:"+BZTXT1+"交货项目:"+POSNR);
map.put("MATNR",MATNR);
map.put("MAKTX",MAKTX);
map.put("VBELN",VBELN);
map.put("VBELN_VA",VBELN_VA);
map.put("POSNR",POSNR);
map.put("AUART",AUART);
map.put("BEZEI",BEZEI);
map.put("MENGE",MENGE);

@ -21,4 +21,6 @@ public interface WmsRuturnPutEmbryoMapper {
* @return 退
*/
public List<WmsRuturnPutEmbryo> selectWmsRuturnPutEmbryoList(WmsRuturnPutEmbryo wmsRuturnPutEmbryo);
void insertWmsRuturnPutEmbryo(WmsRuturnPutEmbryo wmsRuturnPutEmbryo1);
}

@ -936,35 +936,28 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
String LIFNR_NM=stringStringMap.get("LIFNR_NM");//货运代理描述
String ZSAREA=stringStringMap.get("ZSAREA");//销售大区
String BZTXT1=stringStringMap.get("BZTXT1");//销售大区描述
WmsSellOutEmbryo wmsSellOutEmbryo1=new WmsSellOutEmbryo();
wmsSellOutEmbryo1.setId(IdUtils.fastSimpleUUID());
wmsSellOutEmbryo1.setDeliveryOrder(VBELN);//交货单号
wmsSellOutEmbryo1.setAttr1(VBELN_VA);
wmsSellOutEmbryo1.setProductCode(MATNR);
wmsSellOutEmbryo1.setProductName(MAKTX);
wmsSellOutEmbryo1.setFactoryCode(wmsRuturnPutEmbryo.getFactoryCode());
wmsSellOutEmbryo1.setOutQuantity(new BigDecimal("0"));
wmsSellOutEmbryo1.setAttr2(KUNNR);
wmsSellOutEmbryo1.setAttr3(KUNNR_NM);
wmsSellOutEmbryo1.setAttr4(LIFNR);
wmsSellOutEmbryo1.setAttr5(LIFNR_NM);
wmsSellOutEmbryo1.setAttr6(ZSAREA);
wmsSellOutEmbryo1.setAttr7(BZTXT1);
wmsSellOutEmbryo1.setAttr8(TDDAT);
wmsSellOutEmbryo1.setPlanQuantity(new BigDecimal(MENGE));
wmsSellOutEmbryo1.setUnitOfMeasure(MEINS);
wmsSellOutEmbryo1.setStatus("0");
wmsSellOutEmbryo1.setSapStatus("0");
wmsSellOutEmbryo1.setActiveFlag("1");
wmsSellOutEmbryo1.setCreateBy(wmsRuturnPutEmbryo.getCreateBy());
wmsSellOutEmbryo1.setCreateTime(new Date());
//用行项目和订单进行判断
// WmsSellOutEmbryo wmsSellOutEmbryo2= wmsRuturnPutEmbryoMapper.selectWmsRuturnPutEmbryo(VBELN,MATNR);
// if (wmsSellOutEmbryo2==null){
// wmsSellOutEmbryoMapper.insertWmsSellOutEmbryo(wmsSellOutEmbryo1);
// }else {
// results="已经存在";
// }
String POSNR=stringStringMap.get("POSNR");//交货项目
WmsRuturnPutEmbryo wmsRuturnPutEmbryo1=new WmsRuturnPutEmbryo();
wmsRuturnPutEmbryo1.setProductOrder(VBELN);
wmsRuturnPutEmbryo1.setFactoryCode(wmsRuturnPutEmbryo.getFactoryCode());
wmsRuturnPutEmbryo1.setProductCode(MATNR);
wmsRuturnPutEmbryo1.setAttr10(POSNR);
List<WmsRuturnPutEmbryo> wmsRuturnPutEmbryoList= wmsRuturnPutEmbryoMapper.selectWmsRuturnPutEmbryoList(wmsRuturnPutEmbryo1);
if ( wmsRuturnPutEmbryoList.size()==0){
wmsRuturnPutEmbryo1.setPlanQuantity(new BigDecimal(MENGE));
wmsRuturnPutEmbryo1.setStatus("0");
wmsRuturnPutEmbryo1.setUnitOfMeasure(MEINS);
wmsRuturnPutEmbryo1.setAttr9(VBELN_VA);
wmsRuturnPutEmbryo1.setCreateBy(wmsRuturnPutEmbryo.getCreateBy());
wmsRuturnPutEmbryo1.setCreateTime(new Date());
wmsRuturnPutEmbryo1.setActiveFlag("1");
wmsRuturnPutEmbryo1.setProductName(MAKTX);
wmsRuturnPutEmbryo1.setSapStatus("0");
wmsRuturnPutEmbryo1.setId(IdUtils.fastSimpleUUID());
wmsRuturnPutEmbryoMapper.insertWmsRuturnPutEmbryo(wmsRuturnPutEmbryo1);
}else {
results="已经存在";
}
}
}
return results;

@ -148,6 +148,81 @@
</trim>
where id=#{id}
</update>
<insert id="insertWmsRuturnPutEmbryo">
insert into wms_ruturn_put_embryo
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="factoryCode != null">factory_code,</if>
<if test="productOrder != null">product_order,</if>
<if test="whCode != null">wh_code,</if>
<if test="waCode != null">wa_code,</if>
<if test="wlCode != null">wl_code,</if>
<if test="productName != null">product_name,</if>
<if test="productCode != null">product_code,</if>
<if test="productSort != null">product_sort,</if>
<if test="speciFication != null">specification,</if>
<if test="unitOfMeasure != null">unit_of_measure,</if>
<if test="planQuantity != null">plan_quantity,</if>
<if test="putQuantity != null">put_quantity,</if>
<if test="status != null">status,</if>
<if test="sapStatus != null">SAP_status,</if>
<if test="sapProof != null">SAP_proof,</if>
<if test="sapMessage != null">SAP_message,</if>
<if test="putDate != null">put_date,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="attr4 != null">attr4,</if>
<if test="attr5 != null">attr5,</if>
<if test="attr6 != null">attr6,</if>
<if test="attr7 != null">attr7,</if>
<if test="attr8 != null">attr8,</if>
<if test="attr9 != null">attr9,</if>
<if test="attr10 != null">attr10,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="activeFlag != null">active_flag,</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="factoryCode != null">#{factoryCode},</if>
<if test="productOrder != null">#{productOrder},</if>
<if test="whCode != null">#{whCode},</if>
<if test="waCode != null">#{waCode},</if>
<if test="wlCode != null">#{wlCode},</if>
<if test="productName != null">#{productName},</if>
<if test="productCode != null">#{productCode},</if>
<if test="productSort != null">#{productSort},</if>
<if test="speciFication != null">#{speciFication},</if>
<if test="unitOfMeasure != null">#{unitOfMeasure},</if>
<if test="planQuantity != null">#{planQuantity},</if>
<if test="putQuantity != null">#{putQuantity},</if>
<if test="status != null">#{status},</if>
<if test="sapStatus != null">#{sapStatus},</if>
<if test="sapProof != null">#{sapProof},</if>
<if test="sapMessage != null">#{sapMessage},</if>
<if test="putDate != null">#{putDate},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="attr4 != null">#{attr4},</if>
<if test="attr5 != null">#{attr5},</if>
<if test="attr6 != null">#{attr6},</if>
<if test="attr7 != null">#{attr7},</if>
<if test="attr8 != null">#{attr8},</if>
<if test="attr9 != null">#{attr9},</if>
<if test="attr10 != null">#{attr10},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="activeFlag != null">#{activeFlag},</if>
</trim>
</insert>
<insert id="insertWmsRuturnPutEmbryoMapperRecords">
insert into wms_ruturn_put_embryo_record
<trim prefix="(" suffix=")" suffixOverrides=",">

Loading…
Cancel
Save