修改出库完成PMS请求的参数
This commit is contained in:
parent
e2b5d35687
commit
bcdd994fcb
|
|
@ -1,17 +1,19 @@
|
|||
package com.ruoyi.quartz.domain.app;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* PMS 出库反馈接口
|
||||
*/
|
||||
public class PmsOutFeedBack {
|
||||
|
||||
private PmsOutFeedBackRecordList recordList;
|
||||
private List<PmsOutFeedBackRecordList> recordList;
|
||||
|
||||
public PmsOutFeedBackRecordList getRecordList() {
|
||||
public List<PmsOutFeedBackRecordList> getRecordList() {
|
||||
return recordList;
|
||||
}
|
||||
|
||||
public void setRecordList(PmsOutFeedBackRecordList recordList) {
|
||||
public void setRecordList(List<PmsOutFeedBackRecordList> recordList) {
|
||||
this.recordList = recordList;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,7 +202,8 @@ public class TaskExecutor {
|
|||
for (AppPendingStorage pendingStorage : appPendingStorages) {
|
||||
// 插入库存
|
||||
AppStock appStock = new AppStock();
|
||||
appStock.setStockId(pendingStorage.getListId());
|
||||
appStock.setStockId(IdUtils.fastSimpleUUID());
|
||||
appStock.setListId(pendingStorage.getListId());
|
||||
appStock.setVehicleId(pendingStorage.getVehicleNo());
|
||||
appStock.setLocationId(task.getDestination());
|
||||
appStock.setGoodsId(pendingStorage.getGoodsId());
|
||||
|
|
@ -231,10 +232,10 @@ public class TaskExecutor {
|
|||
PmsInComplete pmsInComplete = new PmsInComplete();
|
||||
pmsInComplete.setCrmOrder(pendingStorage.getListId());
|
||||
pmsInComplete.setSapCode("2290");
|
||||
pmsInComplete.setInArea("");
|
||||
pmsInComplete.setInLocation("");
|
||||
pmsInComplete.setOutArea("");
|
||||
pmsInComplete.setOutLocation("");
|
||||
pmsInComplete.setInArea("TPLK");
|
||||
pmsInComplete.setInLocation("6001");
|
||||
pmsInComplete.setOutArea("TPHC");
|
||||
pmsInComplete.setOutLocation("6001");
|
||||
pmsInFeedBack.setHeaderInfo(pmsInComplete);
|
||||
List<PmsInCompleteDetail> pmsInCompleteDetails = new ArrayList<>();
|
||||
PmsInCompleteDetail pmsInCompleteDetail = new PmsInCompleteDetail();
|
||||
|
|
@ -306,16 +307,19 @@ public class TaskExecutor {
|
|||
}
|
||||
// 调用 pms 接口
|
||||
PmsOutFeedBack pmsOutFeedBack = new PmsOutFeedBack();
|
||||
PmsOutFeedBackRecordList recordList = new PmsOutFeedBackRecordList();
|
||||
recordList.setAmount(task.getOpNum().intValue());
|
||||
recordList.setBusinessOrder(task.getOrderId());
|
||||
recordList.setMaterialsNo(task.getGoodsId());
|
||||
PmsOutFeedBackRecordList recordListItem = new PmsOutFeedBackRecordList();
|
||||
recordListItem.setAmount(task.getOpNum().intValue());
|
||||
recordListItem.setBusinessOrder(task.getOrderId());
|
||||
recordListItem.setMaterialsNo(task.getGoodsId());
|
||||
List<PmsOutFeedBackRecordList> recordList = new ArrayList<>();
|
||||
recordList.add(recordListItem);
|
||||
pmsOutFeedBack.setRecordList(recordList);
|
||||
String url = sysConfigService.selectConfigByKey("pms.outComplete");
|
||||
if (StringUtils.isEmpty(url)) {
|
||||
continue;
|
||||
}
|
||||
PmsCommonRes pmsCommonRes = JSON.parseObject(HttpUtils.sendHttpPostWithoutToken(url, JSON.toJSONString(recordList)), PmsCommonRes.class);
|
||||
logger.info("pms出库反馈请求信息:{},结果:{}", JSON.toJSONString(recordList), JSON.toJSONString(pmsCommonRes));
|
||||
PmsCommonRes pmsCommonRes = JSON.parseObject(HttpUtils.sendHttpPostWithoutToken(url, JSON.toJSONString(pmsOutFeedBack)), PmsCommonRes.class);
|
||||
logger.info("pms出库反馈请求信息:{},结果:{}", JSON.toJSONString(pmsOutFeedBack), JSON.toJSONString(pmsCommonRes));
|
||||
}
|
||||
AppStock appStockCheck = new AppStock();
|
||||
appStockCheck.setLocationId(task.getOrigin());
|
||||
|
|
|
|||
|
|
@ -21,6 +21,16 @@ public class AppStock extends BaseEntity
|
|||
/** 物料编号 */
|
||||
private String stockId;
|
||||
|
||||
private String listId;
|
||||
|
||||
public String getListId() {
|
||||
return listId;
|
||||
}
|
||||
|
||||
public void setListId(String listId) {
|
||||
this.listId = listId;
|
||||
}
|
||||
|
||||
/** 载具号 */
|
||||
@Excel(name = "载具号")
|
||||
private String vehicleId;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
<resultMap type="AppStock" id="AppStockResult">
|
||||
<result property="stockId" column="stock_id" />
|
||||
<result property="listId" column="list_id" />
|
||||
<result property="vehicleId" column="vehicle_id" />
|
||||
<result property="locationId" column="location_id" />
|
||||
<result property="goodsId" column="goods_id" />
|
||||
|
|
@ -35,13 +36,14 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectAppStockVo">
|
||||
select stock_id, vehicle_id, location_id, goods_id, goods_name, goods_unit, provider_id, provider_name, remain_num, origin_num, batch_no, inv_age, goods_status, stock_status, create_time, create_user, last_update_time, last_update_user, remark ,
|
||||
select stock_id, list_id, vehicle_id, location_id, goods_id, goods_name, goods_unit, provider_id, provider_name, remain_num, origin_num, batch_no, inv_age, goods_status, stock_status, create_time, create_user, last_update_time, last_update_user, remark ,
|
||||
ware_date, storage_mode,storage_id, area_id, goods_type_id, occupy_num, packing_num, production_date from app_stock
|
||||
</sql>
|
||||
|
||||
<select id="selectAppStockList" parameterType="AppStock" resultMap="AppStockResult">
|
||||
<include refid="selectAppStockVo"/>
|
||||
<where>
|
||||
<if test="listId != null and listId != ''"> and list_id = #{listId}</if>
|
||||
<if test="vehicleId != null and vehicleId != ''"> and vehicle_id = #{vehicleId}</if>
|
||||
<if test="locationId != null and locationId != ''"> and location_id = #{locationId}</if>
|
||||
<if test="goodsId != null and goodsId != ''"> and goods_id = #{goodsId}</if>
|
||||
|
|
@ -70,6 +72,7 @@
|
|||
insert into app_stock
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockId != null">stock_id,</if>
|
||||
<if test="listId != null">list_id,</if>
|
||||
<if test="vehicleId != null and vehicleId != ''">vehicle_id,</if>
|
||||
<if test="locationId != null and locationId != ''">location_id,</if>
|
||||
<if test="goodsId != null and goodsId != ''">goods_id,</if>
|
||||
|
|
@ -99,6 +102,7 @@
|
|||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockId != null">#{stockId},</if>
|
||||
<if test="listId != null">#{listId},</if>
|
||||
<if test="vehicleId != null and vehicleId != ''">#{vehicleId},</if>
|
||||
<if test="locationId != null and locationId != ''">#{locationId},</if>
|
||||
<if test="goodsId != null and goodsId != ''">#{goodsId},</if>
|
||||
|
|
@ -131,7 +135,9 @@
|
|||
<update id="updateAppStock" parameterType="AppStock">
|
||||
update app_stock
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
|
||||
<if test="vehicleId != null and vehicleId != ''">vehicle_id = #{vehicleId},</if>
|
||||
<if test="listId != null">list_id = #{listId},</if>
|
||||
<if test="locationId != null and locationId != ''">location_id = #{locationId},</if>
|
||||
<if test="goodsId != null and goodsId != ''">goods_id = #{goodsId},</if>
|
||||
<if test="goodsName != null">goods_name = #{goodsName},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user