|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="org.dromara.wms.mapper.WmsPdaApiMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<update id="rawReturnSubmitUpdateStateById">
|
|
|
|
update wms_outstock_record set return_flag= '1' where outstock_record_id=#{warehouseId}
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<insert id="bindVehicleSubmitInsertInLoad" parameterType="org.dromara.wms.domain.WmsPsmInLoad" useGeneratedKeys="true" keyProperty="inLoadId">
|
|
|
|
INSERT INTO wms_psm_in_load (tooling_barcode, material_id, material_spe, check_grade_code,
|
|
|
|
load_amount, material_code)
|
|
|
|
VALUES (#{wmsPsmInLoad.toolingBarcode}, null, null, null, #{wmsPsmInLoad.loadAmount}, null);
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<insert id="bindVehicleSubmitInsertInLoadDetail">
|
|
|
|
INSERT INTO wms_psm_in_load_detail (in_load_id, material_id,
|
|
|
|
material_spe, tyre_no, check_grade_code)
|
|
|
|
VALUES
|
|
|
|
<foreach item="item" index="index" collection="list" separator=",">
|
|
|
|
( #{id}, null, null,#{item}, null)
|
|
|
|
</foreach>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<resultMap id="WmsPsmInLoadVoResultMap" type="org.dromara.wms.domain.vo.WmsPsmInLoadVo">
|
|
|
|
<result column="in_load_id" property="inLoadId"/>
|
|
|
|
<result column="tooling_barcode" property="toolingBarcode"/>
|
|
|
|
<result column="material_id" property="materialId"/>
|
|
|
|
<result column="material_code" property="materialCode"/>
|
|
|
|
<result column="check_grade_code" property="checkGradeCode"/>
|
|
|
|
<result column="material_spe" property="materialSpe"/>
|
|
|
|
<result column="load_amount" property="loadAmount"/>
|
|
|
|
</resultMap>
|
|
|
|
<select id="productSelectVehicleInfo" resultMap="WmsPsmInLoadVoResultMap">
|
|
|
|
SELECT top 1 in_load_id,
|
|
|
|
tooling_barcode,
|
|
|
|
material_id,
|
|
|
|
material_spe,
|
|
|
|
check_grade_code,
|
|
|
|
load_amount,
|
|
|
|
material_code
|
|
|
|
FROM wms_psm_in_load
|
|
|
|
WHERE tooling_barcode = #{code} AND store_place_code IS NULL
|
|
|
|
|
|
|
|
ORDER BY create_time DESC
|
|
|
|
|
|
|
|
</select>
|
|
|
|
<insert id="insertInStockDetail" >
|
|
|
|
INSERT INTO wms_psm_in_stock_detail (in_stock_id, material_id, material_spe, tyre_no, check_grade_code)
|
|
|
|
VALUES
|
|
|
|
<foreach collection="list" item="item" index="index" separator=",">
|
|
|
|
(#{id}, #{item.materialId}, #{item.materialSpe}, #{item.tyreNo},#{item.checkGradeCode} )
|
|
|
|
</foreach>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<insert id="insertPsmStorage">
|
|
|
|
INSERT INTO wms_psm_storage (create_by, material_id, material_spe, tyre_no, check_grade_code, store_name,
|
|
|
|
store_place_code, tooling_barcode)
|
|
|
|
VALUES
|
|
|
|
<foreach collection="list" item="item" index="index" separator=",">
|
|
|
|
(#{data.createBy}, #{item.materialId}, #{item.materialSpe}, #{item.tyreNo},#{item.checkGradeCode},#{data.storeName},
|
|
|
|
#{data.storePlaceCode},#{data.toolingBarcode})
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="shiftChangeSubmit" parameterType="org.dromara.wms.domain.ShiftChange">
|
|
|
|
INSERT INTO prod_shift_change (shift_id, class_team_id, user_id, user_name,shift_change_time,create_by,create_time)
|
|
|
|
VALUES (#{shiftId}, #{classTeamId}, #{userId}, #{userName},getdate(), #{userId},getdate());
|
|
|
|
</insert>
|
|
|
|
<resultMap id="storeMap" type="org.dromara.wms.domain.vo.StoreInfoVo">
|
|
|
|
<result column="warehouse_id" property="id"/>
|
|
|
|
<result column="warehouse_code" property="code"/>
|
|
|
|
<result column="warehouse_name" property="name"/>
|
|
|
|
</resultMap>
|
|
|
|
<select id="selectRawStore" resultMap="storeMap">
|
|
|
|
select warehouse_id,warehouse_code,warehouse_name,material_categories from wms_base_warehouse;
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<resultMap id="locationMap" type="org.dromara.wms.domain.vo.WmsBaseLocationVo">
|
|
|
|
<result column="location_code" property="locationCode"/>
|
|
|
|
</resultMap>
|
|
|
|
<select id="selectRawCheckLocationList" resultMap="locationMap">
|
|
|
|
select location_code from wms_inventory where store_id=#{storeId} group by location_code
|
|
|
|
</select>
|
|
|
|
</mapper>
|