wms包材收货修改---一个物料一个物料登记,记录登记数量

master
mengjiao 8 months ago
parent 97ab482d44
commit 5d46e8fd43

@ -133,6 +133,22 @@ public class WmsToWCSmissionController {
String result = odsProcureOrderService.ArrivalRegistration(odsProcureOrder);
return success(result);
}
/**
* --,,--
* @param odsProcureOrder
* @return
*/
@PostMapping("/selectArrivalRegistration")
public AjaxResult selectArrivalRegistration(@RequestBody OdsProcureOrder odsProcureOrder) {
// odsProcureOrderService.PurchaseOrderdeliPdas(odsProcureOrder);
// return success();
OdsProcureOrder order = odsProcureOrderService.selectArrivalRegistration(odsProcureOrder);
return success(order);
}
/**
*
*/
@ -573,4 +589,7 @@ public class WmsToWCSmissionController {
return success(odsProductEmbryoInventoryCorrelationList);
}
}

@ -27,6 +27,28 @@ public class OdsProcureOrder extends BaseEntity {
@Excel(name = "工厂编码")
private String factoryCode;
List<OdsProcureOrder> list;
/**
*
*/
private BigDecimal operationNumber;
private BigDecimal czNumber;
public BigDecimal getCzNumber() {
return czNumber;
}
public void setCzNumber(BigDecimal czNumber) {
this.czNumber = czNumber;
}
public BigDecimal getOperationNumber() {
return operationNumber;
}
public void setOperationNumber(BigDecimal operationNumber) {
this.operationNumber = operationNumber;
}
public List<OdsProcureOrder> getList() {
return list;

@ -64,4 +64,6 @@ public interface OdsProcureOrderMapper {
String selectBaseSupplier(OdsProcureOrder odsProcureOrder);
List<OdsProcureOrder> selectOdsProcureOrderAlreadyList(OdsProcureOrder odsProcureOrder);
void updateOdsProcureOrderAddOperationNumber(OdsProcureOrder odsProcureOrder);
}

@ -99,4 +99,6 @@ public interface IOdsProcureOrderService {
String PurchaseOrderdeliPdaConfirm(OdsProcureOrder odsProcureOrder);
String ArrivalRegistration(OdsProcureOrder odsProcureOrder);
OdsProcureOrder selectArrivalRegistration(OdsProcureOrder odsProcureOrder);
}

@ -733,32 +733,44 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService {
OdsProcureOrder order=new OdsProcureOrder();
order.setProcureCode(odsProcureOrder.getProcureCode());
order.setActive("1");
List<OdsProcureOrder> orderList= odsProcureOrderMapper.selectOdsProcureOrderList(order);
for (OdsProcureOrder order1:orderList){
//查询这次收货信息----生成质检任务------- //插入检验集计划
QcCheckTaskIncomeDTO qcCheckTaskIncomeDTO = new QcCheckTaskIncomeDTO();
qcCheckTaskIncomeDTO.setCheckLoc("mjtest");
qcCheckTaskIncomeDTO.setCheckType("checkTypeLL");
OdsProcureOrder order1= odsProcureOrderMapper.selectOdsProcureOrderByID(odsProcureOrder.getID());
//查询这次收货信息----生成质检任务------- //插入检验集计划
QcCheckTaskIncomeDTO qcCheckTaskIncomeDTO = new QcCheckTaskIncomeDTO();
qcCheckTaskIncomeDTO.setCheckLoc("mjtest");
qcCheckTaskIncomeDTO.setCheckType("checkTypeLL");
// qcCheckTaskIncomeDTO.setCheckManCode("mobile");
// qcCheckTaskIncomeDTO.setCheckManName("手持测试用户");
qcCheckTaskIncomeDTO.setSupplierCode(order1.getSupplierCode());
String name = odsProcureOrderMapper.selectBaseSupplier(order1);
qcCheckTaskIncomeDTO.setSupplierName(name);
qcCheckTaskIncomeDTO.setOrderType("8040");//包材固定码
qcCheckTaskIncomeDTO.setUnit(order1.getUnit());
qcCheckTaskIncomeDTO.setFactoryCode(odsProcureOrder.getFactoryCode());
qcCheckTaskIncomeDTO.setQuality(order1.getPlanNumber());
qcCheckTaskIncomeDTO.setMaterialCode(order1.getMaterialCode());
qcCheckTaskIncomeDTO.setMaterialName(order1.getMaterialDesc());
// qcCheckTaskIncomeDTO.setIncomeBatchNo(order.getUserDefined2());
qcCheckTaskIncomeDTO.setOrderNo(order1.getProcureCode());
qcCheckTaskIncomeDTO.setIncomeTime(new Date());
remoteQualityService.createIncomeTask(qcCheckTaskIncomeDTO);
qcCheckTaskIncomeDTO.setSupplierCode(order1.getSupplierCode());
String name = odsProcureOrderMapper.selectBaseSupplier(order1);
qcCheckTaskIncomeDTO.setSupplierName(name);
qcCheckTaskIncomeDTO.setOrderType("8040");//包材固定码
qcCheckTaskIncomeDTO.setUnit(order1.getUnit());
qcCheckTaskIncomeDTO.setFactoryCode(odsProcureOrder.getFactoryCode());
qcCheckTaskIncomeDTO.setQuality(odsProcureOrder.getCzNumber());//操作数量
qcCheckTaskIncomeDTO.setMaterialCode(order1.getMaterialCode());
qcCheckTaskIncomeDTO.setMaterialName(order1.getMaterialDesc());
// qcCheckTaskIncomeDTO.setIncomeBatchNo(order.getUserDefined2());
qcCheckTaskIncomeDTO.setOrderNo(order1.getProcureCode());
qcCheckTaskIncomeDTO.setIncomeTime(new Date());
R ruslt= remoteQualityService.createIncomeTask(qcCheckTaskIncomeDTO);
// 成功后修改--
if (ruslt.getCode()==200){//成功
odsProcureOrderMapper.updateOdsProcureOrderAddOperationNumber(odsProcureOrder);
}else {
result="操作失败";
}
//
return result;
}
@Override
public OdsProcureOrder selectArrivalRegistration(OdsProcureOrder odsProcureOrder) {
//采购单,物料,行项目
DynamicDataSourceContextHolder.push("ds_" + odsProcureOrder.getFactoryCode());
OdsProcureOrder order= odsProcureOrderMapper.selectOdsProcureOrderByID(odsProcureOrder.getID());
return order;
}
public String DesignatedPalletOutboundWCS(WMSDesignatedPalle wmsDesignatedPalle) {
// 定义请求的URL地址
String url = "http://192.168.202.37:9001/api/v1/ReceiveMesMsg/packingMaterialsOutBoundByPallet";

@ -36,10 +36,11 @@
<result property="Active" column="Active"/>
<result property="enterpriseId" column="Enterprise_Id"/>
<result property="enterpriseCode" column="Enterprise_Code"/>
<result property="operationNumber" column="Operation_Number"/>
</resultMap>
<sql id="selectOdsProcureOrderVo">
select Site_code, ID, Procure_Code, Material_Code, Material_Desc, Plan_Date, Plan_Number, Unit,COALESCE(Reality_Number, 0) Reality_Number, Order_Status, User_Defined1, User_Defined2, User_Defined3, User_Defined4, User_Defined5, User_Defined6, User_Defined7, User_Defined8, User_Defined9, User_Defined10, User_Defined11, Supplier_Code, Supplier_Name, Remark, Create_By, Create_Date, Last_Update_By, Last_Update_Date, Active, Enterprise_Id, Enterprise_Code from ods_procure_order
select Site_code, ID, Procure_Code, Material_Code, Material_Desc, Plan_Date, Plan_Number, Unit,COALESCE(Reality_Number, 0) Reality_Number, Order_Status, User_Defined1, User_Defined2, User_Defined3, User_Defined4, User_Defined5, User_Defined6, User_Defined7, User_Defined8, User_Defined9, User_Defined10, User_Defined11, Supplier_Code, Supplier_Name, Remark, Create_By, Create_Date, Last_Update_By, Last_Update_Date, Active, Enterprise_Id, Enterprise_Code, COALESCE(Operation_Number, 0) Operation_Number from ods_procure_order
</sql>
<select id="selectOdsProcureOrderList" parameterType="OdsProcureOrder" resultMap="OdsProcureOrderResult">
@ -216,4 +217,11 @@
<include refid="selectOdsProcureOrderVo"/>
<![CDATA[ where Procure_Code = #{procureCode} and Active='1' AND Order_Status <> 0 ]]>
</select>
<update id="updateOdsProcureOrderAddOperationNumber" parameterType="OdsProcureOrder">
update ods_procure_order
SET Operation_Number = COALESCE(Operation_Number, 0) + #{czNumber},
Last_Update_By = #{lastUpdateBy},
Last_Update_Date = now()
where ID = #{ID}
</update>
</mapper>

Loading…
Cancel
Save