修改 工装接口

master
wanghao 1 month ago
parent 63a8860bc9
commit ea97788f5a

@ -52,8 +52,6 @@ public class PdaApiController {
@GetMapping("/getDefectDetail") @GetMapping("/getDefectDetail")
public R< List<RemoteDefectVo>> getDefectDetail(@NotBlank(message = "{defect.type.not.blank}") String defectType) { public R< List<RemoteDefectVo>> getDefectDetail(@NotBlank(message = "{defect.type.not.blank}") String defectType) {
List<RemoteDefectVo> defectDetail = iPdaApiService.getDefectDetail(defectType); List<RemoteDefectVo> defectDetail = iPdaApiService.getDefectDetail(defectType);
if (defectDetail == null) { if (defectDetail == null) {
return R.fail(); return R.fail();

@ -107,6 +107,25 @@ public class WmsPdaApiController extends BaseController {
return result ? R.ok() : R.fail(); return result ? R.ok() : R.fail();
} }
@PostMapping("/product/selectVehicle")
public R<BaseToolingInfo> productBindSelectVehicle(String code) {
BaseToolingInfo baseToolingInfo = apiService.productBindSelectVehicle(code);
if (baseToolingInfo == null) {
return R.fail("查询失败,工装不正确");
}
return R.ok(baseToolingInfo);
}
@PostMapping("/product/selectTyreCode")
public R<TyreInfo> productBindSelectTyreCode(String code) {
TyreInfo tyreInfo = apiService.productBindSelectTyreCode(code);
if (tyreInfo == null) {
return R.fail("查询失败,工装不正确");
}
return R.ok("查询成功",tyreInfo);
}
/** /**
* *
* *

@ -0,0 +1,56 @@
package org.dromara.wms.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.tenant.core.TenantEntity;
import java.io.Serial;
import java.math.BigDecimal;
/**
* base_tooling_info
*
* @author zangch
* @date 2025-01-08
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class BaseToolingInfo extends TenantEntity {
@Serial
private static final long serialVersionUID = 1L;
private Long toolingId;
/**
*
*/
private String toolingCode;
/**
*
*/
private String toolingName;
/**
*
*/
private String toolingBarcode;
/**
* RFID
*/
private String toolingRfidBarcode;
/**
*
*/
private String materialCode;
}

@ -0,0 +1,12 @@
package org.dromara.wms.domain;
import lombok.Data;
@Data
public class TyreInfo {
private String returnBarcode;
private Long materialId;
private String materialName;
}

@ -49,4 +49,8 @@ public interface WmsPdaApiMapper {
List<BaseMachineInfo> slectMachineInfo(); List<BaseMachineInfo> slectMachineInfo();
BaseToolingInfo productBindSelectVehicle(@Param("code") String code);
TyreInfo productBindSelectTyreCode(@Param("code") String code);
} }

@ -58,4 +58,8 @@ public interface IWmsPdaApiService {
Boolean seimMoveSubmit(Long id, String placeId); Boolean seimMoveSubmit(Long id, String placeId);
List<BaseMachineInfo> slectMachineInfo(); List<BaseMachineInfo> slectMachineInfo();
BaseToolingInfo productBindSelectVehicle(String code);
TyreInfo productBindSelectTyreCode(String code);
} }

@ -373,4 +373,14 @@ public class WmsPdaApiServiceImpl implements IWmsPdaApiService {
public List<BaseMachineInfo> slectMachineInfo() { public List<BaseMachineInfo> slectMachineInfo() {
return apiMapper.slectMachineInfo(); return apiMapper.slectMachineInfo();
} }
@Override
public BaseToolingInfo productBindSelectVehicle(String code) {
return apiMapper.productBindSelectVehicle(code);
}
@Override
public TyreInfo productBindSelectTyreCode(String code) {
return apiMapper.productBindSelectTyreCode(code);
}
} }

@ -1,24 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.wms.mapper.WmsPdaApiMapper"> <mapper namespace="org.dromara.wms.mapper.WmsPdaApiMapper">
<update id="rawReturnSubmitUpdateStateById"> <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> </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, INSERT INTO wms_psm_in_load (tooling_barcode, material_id, material_spe, check_grade_code,
load_amount, material_code) load_amount, material_code)
VALUES (#{wmsPsmInLoad.toolingBarcode}, null, null, null, #{wmsPsmInLoad.loadAmount}, null); VALUES (#{wmsPsmInLoad.toolingBarcode}, null, null, null, #{wmsPsmInLoad.loadAmount}, null);
</insert> </insert>
<insert id="bindVehicleSubmitInsertInLoadDetail"> <insert id="bindVehicleSubmitInsertInLoadDetail">
INSERT INTO wms_psm_in_load_detail (in_load_id, material_id, INSERT INTO wms_psm_in_load_detail (in_load_id, material_id,
material_spe, tyre_no, check_grade_code) material_spe, tyre_no, check_grade_code)
VALUES VALUES
<foreach item="item" index="index" collection="list" separator=","> <foreach item="item" index="index" collection="list" separator=",">
( #{id}, null, null,#{item}, null) ( #{id}, null, null,#{item}, null)
@ -43,26 +46,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
load_amount, load_amount,
material_code material_code
FROM wms_psm_in_load 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 ORDER BY create_time DESC
</select> </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) INSERT INTO wms_psm_in_stock_detail (in_stock_id, material_id, material_spe, tyre_no, check_grade_code)
VALUES VALUES
<foreach collection="list" item="item" index="index" separator=","> <foreach collection="list" item="item" index="index" separator=",">
(#{id}, #{item.materialId}, #{item.materialSpe}, #{item.tyreNo},#{item.checkGradeCode} ) (#{id}, #{item.materialId}, #{item.materialSpe}, #{item.tyreNo},#{item.checkGradeCode} )
</foreach> </foreach>
</insert> </insert>
<insert id="insertPsmStorage"> <insert id="insertPsmStorage">
INSERT INTO wms_psm_storage (create_by, material_id, material_spe, tyre_no, check_grade_code, store_name, INSERT INTO wms_psm_storage (create_by, material_id, material_spe, tyre_no, check_grade_code, store_name,
store_place_code, tooling_barcode) store_place_code, tooling_barcode)
VALUES VALUES
<foreach collection="list" item="item" index="index" separator=","> <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},
#{data.storePlaceCode},#{data.toolingBarcode}) #{item.tyreNo},#{item.checkGradeCode},#{data.storeName},
#{data.storePlaceCode},#{data.toolingBarcode})
</foreach> </foreach>
@ -70,8 +75,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="shiftChangeSubmit" parameterType="org.dromara.wms.domain.ShiftChange"> <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) INSERT INTO prod_shift_change (shift_id, class_team_id, user_id, user_name, shift_change_time, create_by,
VALUES (#{shiftId}, #{classTeamId}, #{userId}, #{userName},getdate(), #{userId},getdate()); create_time)
VALUES (#{shiftId}, #{classTeamId}, #{userId}, #{userName}, getdate(), #{userId}, getdate());
</insert> </insert>
<resultMap id="storeMap" type="org.dromara.wms.domain.vo.StoreInfoVo"> <resultMap id="storeMap" type="org.dromara.wms.domain.vo.StoreInfoVo">
<result column="warehouse_id" property="id"/> <result column="warehouse_id" property="id"/>
@ -79,10 +85,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result column="warehouse_name" property="name"/> <result column="warehouse_name" property="name"/>
</resultMap> </resultMap>
<select id="selectRawStore" resultMap="storeMap"> <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>
<select id="selectSemiStore" resultMap="storeMap"> <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> </select>
<resultMap id="locationMap" type="org.dromara.wms.domain.vo.WmsBaseLocationVo"> <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"/> <result column="store_place_code" property="locationCode"/>
</resultMap> </resultMap>
<select id="selectRawCheckLocationList" resultMap="locationMap"> <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>
<select id="selectSemiCheckLocationList" resultMap="locationMap"> <select id="selectSemiCheckLocationList" resultMap="locationMap">
select whsd.store_place_code select whsd.store_place_code
from wms_hpp_storage_detail whsd from wms_hpp_storage_detail whsd
left join wms_hpp_store_place wsp on wsp.store_place_code = whsd.store_place_code 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> </select>
<resultMap id="baseMachineMap" type="org.dromara.wms.domain.BaseMachineInfo"> <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 from prod_base_machine_info
</select> </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> </mapper>

Loading…
Cancel
Save