wms成品加质检状态

master
mengjiao 1 month ago
parent 27944c72c2
commit ae07d60a0f

@ -135,7 +135,11 @@ public class WmsProductPut extends BaseEntity {
*/
@Excel(name = "过账SAP状态")
private String sapStatus;
/**
*
*/
@Excel(name = "质检状态")
private String ZJStatus;
/**
* SAP
*/
@ -546,5 +550,11 @@ public class WmsProductPut extends BaseEntity {
'}';
}
public String getZJStatus() {
return ZJStatus;
}
public void setZJStatus(String ZJStatus) {
this.ZJStatus = ZJStatus;
}
}

@ -94,6 +94,8 @@ public interface WmsProductPutMapper {
public WmsProductPut selectWmsProductPutByIdANDStatus(@Param("id")String id);
String selectQcCheckTask(@Param("wmsProductPut")WmsProductPut wmsProductPut1);
// String selectProOrderWorkorder(WmsProductPut wmsProductPut1);

@ -453,14 +453,48 @@ public class OdsProcureOutOrderServiceImpl implements IOdsProcureOutOrderService
public void OutboundPostingzcSAPGYTS(List<OdsProcureOutOrder> orderList) {
//先根据出库单获取
// * 退料的移动类型为 262
// * 领料的移动类型为 261-- and wms_ods_procure_out_order.Order_Status='3'
//
// -- and wms_ods_procure_out_order.Order_Status='3'
//我把过账状态-- and wms_ods_procure_out_order.User_Defined10!='2'去掉了
List<OdsProcureOutOrder> orderList1 = odsProcureOutOrderMapper.selectWmsOdsProcureOutOrderSpecialByIDs(orderList);
for (OdsProcureOutOrder order:
orderList1 ) {
if ("成本中心".equals(orderList1.get(0).getUserDefined6())){//区分出来内部订单
Map paramMap=new HashMap<>();
List<Map> mapList = new ArrayList<>();
paramMap.put("COSTCENTER", order.getUserDefined3());//成本中心
paramMap.put("PLANT", order.getSiteCode());//工厂
paramMap.put("LGORT", order.getLocCode());//库存地点
paramMap.put("MATNR", order.getMaterialCode());//物料号
paramMap.put("QUANTITY", order.getPlanNumber());//数量
paramMap.put("MEINS", order.getUnit());//条目单位
paramMap.put("BATCH", order.getUserDefined1());//批号
paramMap.put("PROD_DATE", order.getPlanDate());//生产日期
paramMap.put("EXPIRYDATE", order.getUserDefined5());//货架寿命到期日
mapList.add(paramMap);
R result2 = remoteSapService.sapProductOutboundCostCenter(mapList);
int code = result2.getCode();
OdsProcureOutOrder order1 = new OdsProcureOutOrder();
String msg = result2.getMsg();
order.setUserDefined11(msg);
if (code== 200){
//过账成功
Map map = new HashMap();
map = (Map) result2.getData();
String userDefined9 = (String) map.get("MATERIALDOCUMENT");
order.setUserDefined9(userDefined9);
order.setUserDefined10("2");//成功
// for (OdsProcureOutOrder order2:
// orderList2 ) {
// BigDecimal sapNumber= order1.getSapNumber();
// order1.setSapNumber(sapNumber.add(order1.getOutNumber()));//成功..这个是否的outNumber是用已出库减去已经过账的数量
// odsProcureOutOrderMapper.updateWMSOdsProcureOutOrdersapById(order1);
// }
}
//这个地方需要对
}else {
//内部订单
Map paramMap=new HashMap<>();
List<Map> mapList = new ArrayList<>();
paramMap.put("COSTCENTER", order.getUserDefined3());//
@ -473,10 +507,7 @@ public class OdsProcureOutOrderServiceImpl implements IOdsProcureOutOrderService
paramMap.put("PROD_DATE", order.getPlanDate());//生产日期
paramMap.put("EXPIRYDATE", order.getUserDefined5());//货架寿命到期日
mapList.add(paramMap);
R result2 = remoteSapService.sapProductOutboundCostCenter(mapList);
}else {
//内部订单
// R result2 = remoteSapService.sapProductOutboundCostTWO(mapList);
}
}

@ -89,11 +89,11 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
@DS("#header.poolName")
public List<WmsProductPut> selectWmsProductPutList(WmsProductPut wmsProductPut) {
List<WmsProductPut> wmsProductPutList= wmsProductPutMapper.selectWmsProductPutList(wmsProductPut);
// for (WmsProductPut wmsProductPut1:
// wmsProductPutList) {
// String qcResult= wmsProductPutMapper.selectProOrderWorkorder(wmsProductPut1);
// wmsProductPut1.setQcResult(qcResult);
// }
for (WmsProductPut wmsProductPut1:
wmsProductPutList) {
String qcResult= wmsProductPutMapper.selectQcCheckTask(wmsProductPut1);
wmsProductPut1.setZJStatus(qcResult);
}
return wmsProductPutList;
}

@ -523,4 +523,18 @@
where id = #{id}
and SAP_status='1'
</select>
<select id="selectQcCheckTask" resultType="java.lang.String">
SELECT DISTINCT
qc.check_result
FROM
mes_report_work AS mw
LEFT JOIN qc_check_task AS qc ON qc.order_no = mw.workorder_code
AND qc.check_type = 'checkTypeCP'
WHERE
mw.report_code = #{wmsProductPut.workOrder}
AND mw.product_code = #{wmsProductPut.productCode}
AND mw.batch = #{wmsProductPut.batchNumber}
AND qc.check_result IS NOT NULL
<![CDATA[ AND qc.check_result <> '']]>
</select>
</mapper>

Loading…
Cancel
Save