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