wms部分修改2

master
mengjiao 6 months ago
parent 1872a8d7ba
commit 818d395e3d

@ -46,7 +46,16 @@ public class WmsSellOutEmbryoController extends BaseController {
List<WmsSellOutEmbryo> list = wmsSellOutEmbryoService.selectWmsSellOutEmbryoList(wmsSellOutEmbryo);
return getDataTable(list);
}
/**
*
*/
@GetMapping("/listRE")
public TableDataInfo listRE(WmsSellOutEmbryo wmsSellOutEmbryo) {
startPage();
List<WmsSellOutEmbryo> list = wmsSellOutEmbryoService.selectWmsSellOutEmbryoREList(wmsSellOutEmbryo);
return getDataTable(list);
}
/**
*
*/

@ -54,6 +54,16 @@ public class WmsSellOutEmbryo extends BaseEntity {
@Excel(name = "库区编码")
private String waCode;
private String stockOrder;
public String getStockOrder() {
return stockOrder;
}
public void setStockOrder(String stockOrder) {
this.stockOrder = stockOrder;
}
/**
*
*/

@ -91,4 +91,6 @@ public interface WmsFpStorageNewsSnMapper {
public List<WmsFpStorageNewsSn> selectBSKList(WmsFpStorageNewsSn proOrderWorkorder);
List<WmsFpStorageNewsSn> selectWmsFpStorageNewsSnSTList(WmsFpStorageNewsSn wmsFpStorageNewsSn);
public void insertWmsFpStorageNewsSnRecords(WmsFpStorageNewsSn wmsFpStorageNewsSn3);
}

@ -85,4 +85,6 @@ public interface WmsSellOutEmbryoMapper {
void updateWmsAllocationOutEmbryo(WmsAllocationOutEmbryo wmsAllocationOutEmbryo);
void updateWmsSellOutEmbryotwo(WmsSellOutEmbryo wmsSellOutEmbryoUpdate);
List<WmsSellOutEmbryo> selectWmsSellOutEmbryoREList(WmsSellOutEmbryo wmsSellOutEmbryo);
}

@ -857,6 +857,24 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
wmsFpStorageNewsSn1.setProductCode(wmsSellOutEmbryo1.getProductCode());
wmsFpStorageNewsSnMapper.updateWmsFpStorageNewsSnOut(wmsFpStorageNewsSn1);
WmsFpStorageNewsSn wmsFpStorageNewsSn2= wmsFpStorageNewsSnMapper.selectWmsFpStorageNewsSnByStorageId(wmsFpStorageNewsSn.getStorageId());
WmsFpStorageNewsSn wmsFpStorageNewsSn3=new WmsFpStorageNewsSn();
wmsFpStorageNewsSn3.setStorageId(IdUtils.fastSimpleUUID());
wmsFpStorageNewsSn3.setWhCode(wmsFpStorageNewsSn2.getWhCode());
wmsFpStorageNewsSn3.setWaCode(wmsFpStorageNewsSn2.getWaCode());
wmsFpStorageNewsSn3.setWlCode(wmsFpStorageNewsSn2.getWlCode());
wmsFpStorageNewsSn3.setOrderNo(wmsFpStorageNewsSn2.getOrderNo());
wmsFpStorageNewsSn3.setProductCode(wmsFpStorageNewsSn2.getProductCode());
wmsFpStorageNewsSn3.setProductName(wmsFpStorageNewsSn2.getProductName());
wmsFpStorageNewsSn3.setSn(wmsFpStorageNewsSn2.getSn());
wmsFpStorageNewsSn3.setBatchNumber(wmsFpStorageNewsSn2.getBatchNumber());
wmsFpStorageNewsSn3.setUserDefined3(wmsFpStorageNewsSn2.getUserDefined3());
wmsFpStorageNewsSn3.setCreateTime(new Date());
wmsFpStorageNewsSn3.setCreateBy(wmsFpStorageNewsSn2.getCreateBy());
wmsFpStorageNewsSn3.setActiveFlag(wmsFpStorageNewsSn2.getActiveFlag());
wmsFpStorageNewsSn3.setAmount(wmsFpStorageNewsSn.getAmount());
wmsFpStorageNewsSn3.setBarCode(wmsSellOutEmbryo.getId());
wmsFpStorageNewsSn3.setFactoryCode(wmsSellOutEmbryo.getFactoryCode());
wmsFpStorageNewsSnMapper.insertWmsFpStorageNewsSnRecords(wmsFpStorageNewsSn3);
WmsFpStorageNews wmsFpStorageNews=new WmsFpStorageNews();
wmsFpStorageNews.setActiveFlag("1");
wmsFpStorageNews.setWlCode(wmsFpStorageNewsSn2.getWlCode());

@ -155,7 +155,11 @@ public class WmsSellOutEmbryoServiceImpl implements IWmsSellOutEmbryoService {
List<WmsSellOutEmbryo> wmsSellOutEmbryoList= dayin();
}
@Override
@DS("#header.poolName")
public List<WmsSellOutEmbryo> selectWmsSellOutEmbryoREList(WmsSellOutEmbryo wmsSellOutEmbryo) {
return wmsSellOutEmbryoMapper.selectWmsSellOutEmbryoREList(wmsSellOutEmbryo);
}
public List<WmsSellOutEmbryo> dayin( ) {

@ -268,7 +268,67 @@
<if test="sapFactoryCode != null">#{sapFactoryCode},</if>
</trim>
</insert>
<insert id="insertWmsFpStorageNewsSnRecords" parameterType="WmsFpStorageNewsSn">
insert into wms_fp_storage_news_sn_records
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="storageId != null">storage_id,</if>
<if test="whCode != null">wh_code,</if>
<if test="waCode != null">wa_code,</if>
<if test="wlCode != null">wl_code,</if>
<if test="orderNo != null">order_no,</if>
<if test="productName != null">product_name,</if>
<if test="productCode != null">product_code,</if>
<if test="sn != null">sn,</if>
<if test="barCode != null">bar_code,</if>
<if test="amount != null">amount,</if>
<if test="batchNumber != null">batch_number,</if>
<if test="userDefined2 != null">user_defined2,</if>
<if test="userDefined3 != null">user_defined3,</if>
<if test="userDefined4 != null">user_defined4,</if>
<if test="userDefined5 != null">user_defined5,</if>
<if test="userDefined6 != null">user_defined6,</if>
<if test="userDefined7 != null">user_defined7,</if>
<if test="userDefined8 != null">user_defined8,</if>
<if test="userDefined9 != null">user_defined9,</if>
<if test="userDefined10 != null">user_defined10,</if>
<if test="createBy != null">create_by,</if>
<if test="gmtCreate != null">gmt_create,</if>
<if test="lastModifiedBy != null">last_modified_by,</if>
<if test="gmtModified != null">gmt_modified,</if>
<if test="activeFlag != null">active_flag,</if>
<if test="factoryCode != null">factory_code,</if>
<if test="sapFactoryCode != null">sap_factory_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="storageId != null">#{storageId},</if>
<if test="whCode != null">#{whCode},</if>
<if test="waCode != null">#{waCode},</if>
<if test="wlCode != null">#{wlCode},</if>
<if test="orderNo != null">#{orderNo},</if>
<if test="productName != null">#{productName},</if>
<if test="productCode != null">#{productCode},</if>
<if test="sn != null">#{sn},</if>
<if test="barCode != null">#{barCode},</if>
<if test="amount != null">#{amount},</if>
<if test="batchNumber != null">#{batchNumber},</if>
<if test="userDefined2 != null">#{userDefined2},</if>
<if test="userDefined3 != null">#{userDefined3},</if>
<if test="userDefined4 != null">#{userDefined4},</if>
<if test="userDefined5 != null">#{userDefined5},</if>
<if test="userDefined6 != null">#{userDefined6},</if>
<if test="userDefined7 != null">#{userDefined7},</if>
<if test="userDefined8 != null">#{userDefined8},</if>
<if test="userDefined9 != null">#{userDefined9},</if>
<if test="userDefined10 != null">#{userDefined10},</if>
<if test="createBy != null">#{createBy},</if>
<if test="gmtCreate != null">#{gmtCreate},</if>
<if test="lastModifiedBy != null">#{lastModifiedBy},</if>
<if test="gmtModified != null">#{gmtModified},</if>
<if test="activeFlag != null">#{activeFlag},</if>
<if test="factoryCode != null">#{factoryCode},</if>
<if test="sapFactoryCode != null">#{sapFactoryCode},</if>
</trim>
</insert>
<update id="updateWmsFpStorageNewsSn" parameterType="WmsFpStorageNewsSn">
update wms_fp_storage_news_sn
<trim prefix="SET" suffixOverrides=",">
@ -313,9 +373,10 @@
</foreach>
</delete>
<update id="updateWmsFpStorageNewsSnOut">
update wms_fp_storage_news_sn
set user_defined2 =user_defined2+ #{userDefined2}
where storage_id=#{storageId} and active_flag='1'
UPDATE wms_fp_storage_news_sn
SET user_defined2 = COALESCE(user_defined2, 0) + #{userDefined2} -- 如果user_defined2为NULL则先将其设置为0再进行加法
WHERE storage_id = #{storageId}
AND active_flag = '1';
</update>
<select id="selectwmsFpStorageNews" resultType="java.lang.String">
select DISTINCT user_defined1 from wms_fp_storage_news where product_code=#{productCode} and active_flag='1'
@ -449,7 +510,7 @@
product_code,
sn,
bar_code,
amount,
COALESCE(amount, 0) ,
batch_number,
COALESCE(user_defined1, 0) AS user_defined1, -- 如果为空则返回0
COALESCE(user_defined2, 0) AS user_defined2, -- 如果为空则返回0

@ -42,6 +42,7 @@
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
<result property="activeFlag" column="active_flag"/>
<result property="stockOrder" column="stockOrder"/>
</resultMap>
<resultMap type="WmsAllocationOutEmbryo" id="WmsAllocationOutEmbryoResult">
@ -126,7 +127,89 @@
</where>
ORDER BY create_time DESC
</select>
<select id="selectWmsSellOutEmbryoREList" parameterType="WmsSellOutEmbryo" resultMap="WmsSellOutEmbryoResult">
SELECT
id,
delivery_order,
Item_number,
active_flag,
factory_code,
wh_code,
wa_code,
wl_code,
delivery_place,
product_name,
product_code,
product_sort,
specification,
unit_of_measure,
lot_number,
plan_quantity,
out_quantity,
status,
SAP_status,
SAP_proof,
SAP_message,
out_date,
attr1,
attr2,
attr3,
attr4,
attr5,
attr6,
attr7,
attr8,
attr9,
attr10,
create_by,
create_time,
update_by,
update_time,
stock_order stockOrder,
remark
FROM
wms_sell_out_embryo_order
<where>
<if test="deliveryOrder != null and deliveryOrder != ''">and delivery_order like concat('%',#{deliveryOrder},
'%') </if>
<if test="stockOrder != null and stockOrder != ''">and stock_order like concat('%',#{stockOrder},
'%') </if>
<if test="itemNumber != null and itemNumber != ''">and Item_number = #{itemNumber}</if>
<if test="factoryCode != null and factoryCode != ''">and factory_code = #{factoryCode}</if>
<if test="whCode != null and whCode != ''">and wh_code = #{whCode}</if>
<if test="waCode != null and waCode != ''">and wa_code = #{waCode}</if>
<if test="wlCode != null and wlCode != ''">and wl_code = #{wlCode}</if>
<if test="deliveryPlace != null and deliveryPlace != ''">and delivery_place = #{deliveryPlace}</if>
<if test="productName != null and productName != ''">and product_name like concat('%', #{productName},
'%')
</if>
<if test="productCode != null and productCode != ''">and product_code like concat('%',#{productCode},
'%') </if>
<if test="productSort != null and productSort != ''">and product_sort = #{productSort}</if>
<if test="specification != null and specification != ''">and specification = #{specification}</if>
<if test="unitOfMeasure != null and unitOfMeasure != ''">and unit_of_measure = #{unitOfMeasure}</if>
<if test="lotNumber != null and lotNumber != ''">and lot_number = #{lotNumber}</if>
<if test="planQuantity != null ">and plan_quantity = #{planQuantity}</if>
<if test="outQuantity != null ">and out_quantity = #{outQuantity}</if>
<if test="status != null and status != ''">and status = #{status}</if>
<if test="sapStatus != null and sapStatus != ''">and SAP_status = #{sapStatus}</if>
<if test="sapProof != null and sapProof != ''">and SAP_proof = #{sapProof}</if>
<if test="sapMessage != null and sapMessage != ''">and SAP_message = #{sapMessage}</if>
<if test="outDate != null ">and out_date = #{outDate}</if>
<if test="activeFlag != null and activeFlag != ''">and active_flag = #{activeFlag}</if>
<if test="attr1 != null and attr1 != ''">and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''">and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''">and attr3 = #{attr3}</if>
<if test="attr4 != null and attr4 != ''">and attr4 = #{attr4}</if>
<if test="attr5 != null and attr5 != ''">and attr5 = #{attr5}</if>
<if test="attr6 != null and attr6 != ''">and attr6 = #{attr6}</if>
<if test="attr7 != null and attr7 != ''">and attr7 = #{attr7}</if>
<if test="attr8 != null and attr8 != ''">and attr8 = #{attr8}</if>
<if test="attr9 != null and attr9 != ''">and attr9 = #{attr9}</if>
<if test="attr10 != null and attr10 != ''">and attr10 = #{attr10}</if>
</where>
ORDER BY create_time DESC
</select>
<select id="selectWmsSellOutEmbryoById" parameterType="String" resultMap="WmsSellOutEmbryoResult">
<include refid="selectWmsSellOutEmbryoVo"/>
where id = #{id}

Loading…
Cancel
Save