|
|
|
@ -1,15 +1,18 @@
|
|
|
|
|
<?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">
|
|
|
|
|
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 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 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);
|
|
|
|
@ -43,12 +46,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
load_amount,
|
|
|
|
|
material_code
|
|
|
|
|
FROM wms_psm_in_load
|
|
|
|
|
WHERE tooling_barcode = #{code} AND store_place_code IS NULL
|
|
|
|
|
WHERE tooling_barcode = #{code}
|
|
|
|
|
AND store_place_code IS NULL
|
|
|
|
|
|
|
|
|
|
ORDER BY create_time DESC
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
<insert id="insertInStockDetail" >
|
|
|
|
|
<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=",">
|
|
|
|
@ -61,7 +65,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
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.createBy}, #{item.materialId}, #{item.materialSpe},
|
|
|
|
|
#{item.tyreNo},#{item.checkGradeCode},#{data.storeName},
|
|
|
|
|
#{data.storePlaceCode},#{data.toolingBarcode})
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
|
@ -70,8 +75,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<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 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"/>
|
|
|
|
@ -79,10 +85,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<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 warehouse_id, warehouse_code, warehouse_name, material_categories
|
|
|
|
|
from wms_base_warehouse;
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectSemiStore" resultMap="storeMap">
|
|
|
|
|
select obj_id as warehouse_id,store_code as warehouse_code,store_name as warehouse_name from wms_hpp_store;
|
|
|
|
|
select obj_id as warehouse_id, store_code as warehouse_code, store_name as warehouse_name
|
|
|
|
|
from wms_hpp_store;
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<resultMap id="locationMap" type="org.dromara.wms.domain.vo.WmsBaseLocationVo">
|
|
|
|
@ -90,14 +98,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result column="store_place_code" property="locationCode"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<select id="selectRawCheckLocationList" resultMap="locationMap">
|
|
|
|
|
select location_code from wms_inventory where store_id=#{storeId} group by location_code
|
|
|
|
|
select location_code
|
|
|
|
|
from wms_inventory
|
|
|
|
|
where store_id = #{storeId}
|
|
|
|
|
group by location_code
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectSemiCheckLocationList" resultMap="locationMap">
|
|
|
|
|
select whsd.store_place_code
|
|
|
|
|
from wms_hpp_storage_detail whsd
|
|
|
|
|
left join wms_hpp_store_place wsp on wsp.store_place_code = whsd.store_place_code
|
|
|
|
|
where wsp.store_id=#{storeId} group by whsd.store_place_code
|
|
|
|
|
where wsp.store_id = #{storeId}
|
|
|
|
|
group by whsd.store_place_code
|
|
|
|
|
</select>
|
|
|
|
|
<resultMap id="baseMachineMap" type="org.dromara.wms.domain.BaseMachineInfo">
|
|
|
|
|
|
|
|
|
@ -109,4 +121,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
from prod_base_machine_info
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="baseToolInfoMap" type="org.dromara.wms.domain.BaseToolingInfo">
|
|
|
|
|
<result property="toolingId" column="tooling_id"/>
|
|
|
|
|
<result property="toolingCode" column="tooling_code"/>
|
|
|
|
|
<result property="toolingName" column="tooling_name"/>
|
|
|
|
|
<result property="toolingBarcode" column="tooling_barcode"/>
|
|
|
|
|
<result property="toolingRfidBarcode" column="tooling_rfid_barcode"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<select id="productBindSelectVehicle" resultMap="baseToolInfoMap">
|
|
|
|
|
select top 1 tooling_id,
|
|
|
|
|
tooling_code,
|
|
|
|
|
tooling_name,
|
|
|
|
|
tooling_barcode,
|
|
|
|
|
tooling_rfid_barcode
|
|
|
|
|
from base_tooling_info
|
|
|
|
|
where del_flag = '0'
|
|
|
|
|
AND tooling_type_id = 301
|
|
|
|
|
AND active_flag = '1'
|
|
|
|
|
AND tooling_barcode = #{code}
|
|
|
|
|
</select>
|
|
|
|
|
<resultMap id="tyreInfoMap" type="org.dromara.wms.domain.TyreInfo">
|
|
|
|
|
<result column="material_id" property="materialId"/>
|
|
|
|
|
<result column="return_barcode" property="returnBarcode"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<select id="productBindSelectTyreCode" resultMap="tyreInfoMap">
|
|
|
|
|
select material_id,return_barcode from prod_product_plan_detail_4 where return_barcode =#{code}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|