成品扫标识卡获取生产订单

master
mengjiao 5 months ago
parent 682699cb20
commit fb4349d950

@ -320,6 +320,8 @@ public class OdsProcureOrderController extends BaseController {
odsProcureOrderService.OutboundPostingSAPfc(orderList);
return success();
}
@PostMapping("/listCKT")
public AjaxResult listCKT(BaseWarehouse baseWarehouse) {

@ -300,7 +300,14 @@ public class WmsToWCSmissionController {
public AjaxResult WmsProductPutByWorkOrderquery(@RequestBody WmsProductPut wmsProductPut) {
return AjaxResult.success(wmsProductPutService.WmsProductPutByWorkOrderquery(wmsProductPut));
}
/**
*
* ---
*/
@PostMapping("/WmsProductPutByWorkOrderqueryBS")
public AjaxResult WmsProductPutByWorkOrderqueryBS(@RequestBody WmsProductPut wmsProductPut) {
return AjaxResult.success(wmsProductPutService.WmsProductPutByWorkOrderqueryBS(wmsProductPut));
}
/**
*
*

@ -217,6 +217,43 @@ public class WmsProductPut extends BaseEntity {
List<WmsProductPut> wmsProductPut;
private String sn;
private String pallet;//标识卡
public String getPallet() {
return pallet;
}
private String attribute1 ;
private String attribute2;
private String attribute3;
public String getAttribute1() {
return attribute1;
}
public void setAttribute1(String attribute1) {
this.attribute1 = attribute1;
}
public String getAttribute2() {
return attribute2;
}
public void setAttribute2(String attribute2) {
this.attribute2 = attribute2;
}
public String getAttribute3() {
return attribute3;
}
public void setAttribute3(String attribute3) {
this.attribute3 = attribute3;
}
public void setPallet(String pallet) {
this.pallet = pallet;
}
public String getSn() {
return sn;
}

@ -77,6 +77,7 @@ public interface WmsProductPutMapper {
void updateWmsProductPutByIds(@Param("wmsProductPut") WmsProductPut wmsProductPut4, @Param("list") List<WmsProductPut> wmsProductPut2);
WmsProductPut WmsProductPutByWorkOrderqueryBS(WmsProductPut wmsProductPut);
// String selectWmsProductPutNum(wmsReportWork wmsReportWork);

@ -138,4 +138,6 @@ public interface IWmsProductPutService {
Integer finishedProductProductionRecords(ProOrderWorkorder proOrderWorkorder);
List<WmsProductProductionRecords> selectProductProductionRecords(WmsProductProductionRecords wmsProductProductionRecords);
WmsProductPut WmsProductPutByWorkOrderqueryBS(WmsProductPut wmsProductPut);
}

@ -854,7 +854,7 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService {
if (ruslt.getCode()==200){//成功
odsProcureOrderMapper.updateOdsProcureOrderAddOperationNumber(odsProcureOrder);
}else {
result="操作失败";
result="操作失败:"+ruslt.getMsg();
}
return result;
}

@ -1028,6 +1028,22 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
return records;
}
@Override
public WmsProductPut WmsProductPutByWorkOrderqueryBS(WmsProductPut wmsProductPut) {
// 使用 split 方法根据 '-' 分割字符串,结果是一个字符串数组
DynamicDataSourceContextHolder.push("ds_" + wmsProductPut.getFactoryCode());
String[] attributes = wmsProductPut.getPallet().split("-");
// 通过索引访问分割后的数组,获取所需的三个属性
String attribute1 = attributes[0]; // 获取第一个属性
String attribute2 = attributes[1]; // 获取第二个属性
String attribute3 = attributes[2]; // 获取第三个属性
wmsProductPut.setAttribute1(attribute1);
wmsProductPut.setAttribute2(attribute2);
wmsProductPut.setAttribute3(attribute3);
WmsProductPut wmsProductPut1 = wmsProductPutMapper.WmsProductPutByWorkOrderqueryBS(wmsProductPut);
return wmsProductPut1;
}
@Override
public List<WmsRuturnPutEmbryo> FinishedProductSalesReturn(WmsRuturnPutEmbryo wmsRuturnPutEmbryo) {
DynamicDataSourceContextHolder.push("ds_" + wmsRuturnPutEmbryo.getFactoryCode());

@ -384,5 +384,35 @@
#{item.id}
</foreach>
</update>
<select id="WmsProductPutByWorkOrderqueryBS" resultMap="WmsProductPutResult">
SELECT
mes_report_work.report_code work_order,
pro_order_workorder.workorder_code_sap product_order,
mes_report_work.product_code,
mes_report_work.product_name,
mes_report_work.unit unit_of_measure,
mes_report_work.batch batch_number,
mes_report_work.quantity plan_quantity,
( mes_report_work.quantity- put.put_quantity ) attr3
FROM
pro_order_workorder
LEFT JOIN mes_report_work ON pro_order_workorder.workorder_code = mes_report_work.workorder_code
LEFT JOIN (
SELECT SUM
( wms_product_put.put_quantity ) AS put_quantity,
wms_product_put.work_order AS work_order,
wms_product_put.product_code AS product_code
FROM
wms_product_put
GROUP BY
wms_product_put.work_order,
wms_product_put.product_code
) put ON put.work_order= mes_report_work.report_code
AND put.product_code= pro_order_workorder.workorder_code_sap
WHERE
pro_order_workorder.workorder_code_sap=#{attribute1}
AND mes_report_work.batch=#{attribute2}
AND mes_report_work.parent_order = '0'
</select>
</mapper>

Loading…
Cancel
Save