wms删除退货单接口

master
mengjiao 3 weeks ago
parent 55064c07d1
commit 22ab670cf2

@ -137,6 +137,17 @@ public class OdsProcureOutOrderController extends BaseController {
List<OdsProcureOutOrder> list = odsProcureOutOrderService.selectOdsProcureReturnOrderListZC(odsProcureOutOrder);
return getDataTable(list);
}
/**
* 退
*/
@PostMapping("/removeReturn")
public AjaxResult removeReturn(@RequestBody List<String>IDs) {
return toAjax(odsProcureOutOrderService.removeReturn(IDs));
}
@PostMapping("/addreturnderZC")
public AjaxResult addreturnderZC(@RequestBody List<OdsProcureOutOrder> orderList) {
String result = odsProcureOutOrderService.addreturnderZC(orderList);

@ -179,4 +179,8 @@ public interface OdsProcureOutOrderMapper {
void updateWMSOdsProcureOutOrdersapSpecialById(OdsProcureOutOrder order1);
void updateWMSOdsProcureOutOrdersapSpecialTWById(OdsProcureOutOrder order1);
String getWmsOdsProcureOutOrder(OdsProcureOutOrder order);
int removeReturn(String[] IDs);
}

@ -88,4 +88,6 @@ public interface IOdsProcureOutOrderService {
String addwmsFpStorageNewsTS(List<OdsProcureOutOrder> orderList);
List<OdsProcureOutOrder> selectOdsProcureOutOrderListZCTC(OdsProcureOutOrder odsProcureOutOrder);
public int removeReturn(List<String> iDs);
}

@ -2879,7 +2879,10 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService {
order.setCreateBy(createBy);
order.setCreateDate(new Date());
order.setSiteCode(factoryCode);
odsProcureOutOrderMapper.insertWmsRawMissionOut(order);
// odsProcureOutOrderMapper.insertWmsRawMissionOut(order);
BigDecimal returnNumber= order1.getReturnNumber();
order1.setReturnNumber(returnNumber.add(amount));//
if(order1.getPlanNumber().compareTo(order1.getReturnNumber())<=0){
@ -2891,6 +2894,31 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService {
OdsProcureOrder order2 =new OdsProcureOrder();
order2.setUserDefined6(userDefined6);
odsProcureOrderMapper.updateodsProcureOrderCard(order2);
WmsRawOrderInSn wmsRawOrderInSn = new WmsRawOrderInSn();
wmsRawOrderInSn.setRawOrderInSnId(IdUtils.fastSimpleUUID());
wmsRawOrderInSn.setUserDefined1("2");//1是收货,2是入库
wmsRawOrderInSn.setUserDefined2(order.getUserDefined7());//批次
wmsRawOrderInSn.setWhCode(odsProcureOutOrder.getWhCode());//厂库编号
wmsRawOrderInSn.setWaCode(odsProcureOutOrder.getWaCode());
wmsRawOrderInSn.setWlCode(odsProcureOutOrder.getSn());//库位设置为托盘
wmsRawOrderInSn.setPoNo(produceCode);//采购单号
// wmsRawOrderInSn.setPoLine(odsProcureOrder.getPoLine());//行项目
wmsRawOrderInSn.setMaterialCode(odsProcureOutOrder.getMaterialCode());
wmsRawOrderInSn.setMaterialDesc(odsProcureOutOrder.getMaterialDesc());
wmsRawOrderInSn.setAmount(odsProcureOutOrder.getPlanNumber());//实际输入数量
wmsRawOrderInSn.setFactoryCode(factoryCode);
wmsRawOrderInSn.setCreateBy(odsProcureOutOrder.getCreateBy());
wmsRawOrderInSn.setGmtCreate(new Date());
wmsRawOrderInSn.setActiveFlag("1");
wmsRawOrderInSn.setUserDefined4(order.getUnit());//单位
wmsRawOrderInSn.setSn(odsProcureOutOrder.getSn());//托盘号
wmsRawOrderInSn.setFactoryCode(factoryCode);
// wmsRawOrderInSn.setUserDefined3(order.getID());
wmsRawOrderInSn.setUserDefined5(produceCode);
wmsRawOrderInSn.setUserDefined6(odsProcureOutOrder.getSn());//标识码绑定
wmsRawOrderInSnMapper.insertWmsRawOrderInSn(wmsRawOrderInSn);
//库存
//收货
WmsOdsMateStorageNewsSn wmsOdsMateStorageNewsSn = new WmsOdsMateStorageNewsSn();

@ -174,6 +174,11 @@ public class OdsProcureOutOrderServiceImpl implements IOdsProcureOutOrderService
@DS("#header.poolName")
public List<OdsProcureOutOrder> selectOdsProcureReturnOrderListZC(OdsProcureOutOrder odsProcureOutOrder) {
List<OdsProcureOutOrder> orderList = odsProcureOutOrderMapper.selectOdsProcureReturnOrderListZC(odsProcureOutOrder);
for (OdsProcureOutOrder order:
orderList ) {//wms_ods_procure_out_order
String NeedDate= odsProcureOutOrderMapper.getWmsOdsProcureOutOrder(order);
order.setNeedDate(NeedDate);
}
return orderList;
}
@ -450,6 +455,7 @@ public class OdsProcureOutOrderServiceImpl implements IOdsProcureOutOrderService
}
@Override
@DS("#header.poolName")
public List<OdsProcureOutOrder> selectOdsProcureOutOrderListZCTC(OdsProcureOutOrder odsProcureOutOrder) {
odsProcureOutOrder.setUserDefined3("X");
List<OdsProcureOutOrder> orderList = odsProcureOutOrderMapper.selectOdsProcureOutOrderListZCTW(odsProcureOutOrder);
@ -467,6 +473,15 @@ public class OdsProcureOutOrderServiceImpl implements IOdsProcureOutOrderService
return orderList;
}
@Override
@DS("#header.poolName")
public int removeReturn(List<String> stringList) {
// 将列表转换为字符串数组
String[] iDs = stringList.toArray(new String[0]);
return odsProcureOutOrderMapper.removeReturn(iDs);
}
public void OutboundPostingzcSAPGYTS(List<OdsProcureOutOrder> orderList) {
//先根据出库单获取
// -- and wms_ods_procure_out_order.Order_Status='3'

@ -1477,7 +1477,7 @@
<if test="enterpriseCode != null and enterpriseCode != ''"> and Enterprise_Code = #{enterpriseCode}</if>
<if test="ID != null and ID != ''"> and ID = #{ID}</if>
</where>
ORDER BY User_Defined4 DESC
ORDER BY Produce_Code DESC
</select>
<select id="insertWmsOdsProcureReturnOrder" parameterType="OdsProcureOutOrder">
insert into wms_ods_procure_return_order
@ -2112,4 +2112,18 @@
where wms_ods_procure_return_order.Produce_Code=#{order.produceCode}
and wms_ods_procure_return_order.User_Defined10!='2'
</select>
<select id="getWmsOdsProcureOutOrder" resultType="java.lang.String">
SELECT DISTINCT
User_Defined5
FROM
wms_ods_procure_out_order
WHERE
Produce_Code = #{userDefined4}
</select>
<delete id="removeReturn" parameterType="String">
delete from wms_ods_procure_return_order where ID in
<foreach item="ID" collection="array" open="(" separator="," close=")">
#{ID}
</foreach>
</delete>
</mapper>

Loading…
Cancel
Save