项目初始化
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
<?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="com.ruoyi.bas.containerDetails.mapper.BasContainerDetailsMapper">
|
||||
|
||||
<resultMap type="BasContainerDetails" id="BasContainerDetailsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="containerId" column="container_id" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasContainerDetailsVo">
|
||||
select id, container_id, product_id, product_name, quantity, unit, spare1, spare2, spare3 from bas_container_details
|
||||
</sql>
|
||||
|
||||
<select id="selectBasContainerDetailsList" parameterType="BasContainerDetails" resultMap="BasContainerDetailsResult">
|
||||
<include refid="selectBasContainerDetailsVo"/>
|
||||
<where>
|
||||
<if test="containerId != null and containerId != ''"> and container_id = #{containerId}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasContainerDetailsById" parameterType="Long" resultMap="BasContainerDetailsResult">
|
||||
<include refid="selectBasContainerDetailsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasContainerDetails" parameterType="BasContainerDetails">
|
||||
insert into bas_container_details
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="containerId != null">container_id,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="containerId != null">#{containerId},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasContainerDetails" parameterType="BasContainerDetails">
|
||||
update bas_container_details
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="containerId != null">container_id = #{containerId},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasContainerDetailsById" parameterType="Long">
|
||||
delete from bas_container_details where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasContainerDetailsByIds" parameterType="String">
|
||||
delete from bas_container_details where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
105
ruoyi-admin/src/main/resources/mapper/bas/BasContainerMapper.xml
Normal file
105
ruoyi-admin/src/main/resources/mapper/bas/BasContainerMapper.xml
Normal file
@@ -0,0 +1,105 @@
|
||||
<?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="com.ruoyi.bas.container.mapper.BasContainerMapper">
|
||||
|
||||
<resultMap type="BasContainer" id="BasContainerResult">
|
||||
<result property="containerId" column="container_id" />
|
||||
<result property="portName" column="port_name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="productTypeQuantity" column="product_type_quantity" />
|
||||
<result property="capacity" column="capacity" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="operationMan" column="operation_man" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasContainerVo">
|
||||
select container_id, port_name, status, product_type_quantity, capacity, create_time, update_time, operation_man, spare1, spare2, spare3 from bas_container
|
||||
</sql>
|
||||
|
||||
<select id="selectBasContainerList" parameterType="BasContainer" resultMap="BasContainerResult">
|
||||
<include refid="selectBasContainerVo"/>
|
||||
<where>
|
||||
<if test="containerId != null and containerId != ''"> and container_id like concat('%', #{containerId}, '%')</if>
|
||||
<if test="portName != null and portName != ''"> and port_name = #{portName}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="productTypeQuantity != null "> and product_type_quantity = #{productTypeQuantity}</if>
|
||||
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime}</if>
|
||||
<if test="operationMan != null and operationMan != ''"> and operation_man = #{operationMan}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasContainerByContainerId" parameterType="String" resultMap="BasContainerResult">
|
||||
<include refid="selectBasContainerVo"/>
|
||||
where container_id = #{containerId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasContainer" parameterType="BasContainer">
|
||||
insert into bas_container
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="containerId != null">container_id,</if>
|
||||
<if test="portName != null">port_name,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="productTypeQuantity != null">product_type_quantity,</if>
|
||||
<if test="capacity != null">capacity,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<!-- <if test="updateTime != null">update_time,</if>-->
|
||||
update_time,
|
||||
<if test="operationMan != null">operation_man,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="containerId != null">#{containerId},</if>
|
||||
<if test="portName != null">#{portName},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="productTypeQuantity != null">#{productTypeQuantity},</if>
|
||||
<if test="capacity != null">#{capacity},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<!-- <if test="updateTime != null">#{updateTime},</if>-->
|
||||
GETDATE(),
|
||||
<if test="operationMan != null">#{operationMan},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasContainer" parameterType="BasContainer">
|
||||
update bas_container
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="portName != null">port_name = #{portName},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="productTypeQuantity != null">product_type_quantity = #{productTypeQuantity},</if>
|
||||
<if test="capacity != null">capacity = #{capacity},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = GETDATE(),</if>
|
||||
<if test="operationMan != null">operation_man = #{operationMan},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
</trim>
|
||||
where container_id = #{containerId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasContainerByContainerId" parameterType="String">
|
||||
delete from bas_container where container_id = #{containerId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasContainerByContainerIds" parameterType="String">
|
||||
delete from bas_container where container_id in
|
||||
<foreach item="containerId" collection="array" open="(" separator="," close=")">
|
||||
#{containerId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectPortNames" resultType="string">
|
||||
SELECT DISTINCT port_name FROM bas_product_port WHERE port_name != null or port_name != ''
|
||||
</select>
|
||||
</mapper>
|
||||
153
ruoyi-admin/src/main/resources/mapper/bas/BasCustomerMapper.xml
Normal file
153
ruoyi-admin/src/main/resources/mapper/bas/BasCustomerMapper.xml
Normal file
@@ -0,0 +1,153 @@
|
||||
<?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="com.ruoyi.bas.BasCustomer.mapper.BasCustomerMapper">
|
||||
|
||||
<resultMap type="BasCustomer" id="BasCustomerResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="customerNo" column="customer_no" />
|
||||
<result property="customerGroupNo" column="customer_group_no" />
|
||||
<result property="customerName" column="customer_name" />
|
||||
<result property="simpleName" column="simple_name" />
|
||||
<result property="useable" column="useable" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="businessDepartment" column="business_department" />
|
||||
<result property="salesman" column="salesman" />
|
||||
<result property="mnemonicCode" column="mnemonic_code" />
|
||||
<result property="type" column="type" />
|
||||
<result property="taxpayerRegistrationNumber" column="taxpayer_registration_number" />
|
||||
<result property="organization" column="organization" />
|
||||
<result property="supCustomer" column="sup_customer" />
|
||||
<result property="retailInvestor" column="retail_investor" />
|
||||
<result property="country" column="country" />
|
||||
<result property="timeZone" column="time_zone" />
|
||||
<result property="dataFormat" column="data_format" />
|
||||
<result property="contactName" column="contact_name" />
|
||||
<result property="shipment" column="shipment" />
|
||||
<result property="taxCategory" column="tax_category" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasCustomerVo">
|
||||
select id, customer_no, customer_group_no, customer_name, simple_name, useable, remark, business_department, salesman, mnemonic_code, type, taxpayer_registration_number, organization, sup_customer, retail_investor, country, time_zone, data_format, contact_name, shipment, tax_category from bas_customer
|
||||
</sql>
|
||||
|
||||
<select id="selectBasCustomerList" parameterType="BasCustomer" resultMap="BasCustomerResult">
|
||||
<include refid="selectBasCustomerVo"/>
|
||||
<where>
|
||||
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
|
||||
<if test="customerGroupNo != null and customerGroupNo != ''"> and customer_group_no like concat('%', #{customerGroupNo}, '%')</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="simpleName != null and simpleName != ''"> and simple_name like concat('%', #{simpleName}, '%')</if>
|
||||
<if test="useable != null and useable != ''"> and useable = #{useable}</if>
|
||||
<if test="businessDepartment != null and businessDepartment != ''"> and business_department like concat('%', #{businessDepartment}, '%')</if>
|
||||
<if test="salesman != null and salesman != ''"> and salesman like concat('%', #{salesman}, '%')</if>
|
||||
<if test="mnemonicCode != null and mnemonicCode != ''"> and mnemonic_code like concat('%', #{mnemonicCode}, '%')</if>
|
||||
<if test="type != null and type != ''"> and type like concat('%', #{type}, '%')</if>
|
||||
<if test="taxpayerRegistrationNumber != null and taxpayerRegistrationNumber != ''"> and taxpayer_registration_number like concat('%', #{taxpayerRegistrationNumber}, '%')</if>
|
||||
<if test="organization != null and organization != ''"> and organization like concat('%', #{organization}, '%')</if>
|
||||
<if test="supCustomer != null and supCustomer != ''"> and sup_customer like concat('%', #{supCustomer}, '%')</if>
|
||||
<if test="retailInvestor != null and retailInvestor != ''"> and retail_investor like concat('%', #{retailInvestor}, '%')</if>
|
||||
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
|
||||
<if test="timeZone != null and timeZone != ''"> and time_zone like concat('%', #{timeZone}, '%')</if>
|
||||
<if test="dataFormat != null and dataFormat != ''"> and data_format like concat('%', #{dataFormat}, '%')</if>
|
||||
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
|
||||
<if test="shipment != null and shipment != ''"> and shipment like concat('%', #{shipment}, '%')</if>
|
||||
<if test="taxCategory != null and taxCategory != ''"> and tax_category like concat('%', #{taxCategory}, '%')</if>
|
||||
<if test="updateId != null and updateId != ''"> and id != #{updateId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasCustomerById" parameterType="String" resultMap="BasCustomerResult">
|
||||
<include refid="selectBasCustomerVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasCustomer" parameterType="BasCustomer">
|
||||
insert into bas_customer
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="customerNo != null and customerNo != ''">customer_no,</if>
|
||||
<if test="customerGroupNo != null">customer_group_no,</if>
|
||||
<if test="customerName != null">customer_name,</if>
|
||||
<if test="simpleName != null">simple_name,</if>
|
||||
<if test="useable != null">useable,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="businessDepartment != null">business_department,</if>
|
||||
<if test="salesman != null">salesman,</if>
|
||||
<if test="mnemonicCode != null">mnemonic_code,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="taxpayerRegistrationNumber != null">taxpayer_registration_number,</if>
|
||||
<if test="organization != null">organization,</if>
|
||||
<if test="supCustomer != null">sup_customer,</if>
|
||||
<if test="retailInvestor != null">retail_investor,</if>
|
||||
<if test="country != null">country,</if>
|
||||
<if test="timeZone != null">time_zone,</if>
|
||||
<if test="dataFormat != null">data_format,</if>
|
||||
<if test="contactName != null">contact_name,</if>
|
||||
<if test="shipment != null">shipment,</if>
|
||||
<if test="taxCategory != null">tax_category,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="customerNo != null and customerNo != ''">#{customerNo},</if>
|
||||
<if test="customerGroupNo != null">#{customerGroupNo},</if>
|
||||
<if test="customerName != null">#{customerName},</if>
|
||||
<if test="simpleName != null">#{simpleName},</if>
|
||||
<if test="useable != null">#{useable},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="businessDepartment != null">#{businessDepartment},</if>
|
||||
<if test="salesman != null">#{salesman},</if>
|
||||
<if test="mnemonicCode != null">#{mnemonicCode},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="taxpayerRegistrationNumber != null">#{taxpayerRegistrationNumber},</if>
|
||||
<if test="organization != null">#{organization},</if>
|
||||
<if test="supCustomer != null">#{supCustomer},</if>
|
||||
<if test="retailInvestor != null">#{retailInvestor},</if>
|
||||
<if test="country != null">#{country},</if>
|
||||
<if test="timeZone != null">#{timeZone},</if>
|
||||
<if test="dataFormat != null">#{dataFormat},</if>
|
||||
<if test="contactName != null">#{contactName},</if>
|
||||
<if test="shipment != null">#{shipment},</if>
|
||||
<if test="taxCategory != null">#{taxCategory},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasCustomer" parameterType="BasCustomer">
|
||||
update bas_customer
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="customerNo != null and customerNo != ''">customer_no = #{customerNo},</if>
|
||||
<if test="customerGroupNo != null">customer_group_no = #{customerGroupNo},</if>
|
||||
<if test="customerName != null">customer_name = #{customerName},</if>
|
||||
<if test="simpleName != null">simple_name = #{simpleName},</if>
|
||||
<if test="useable != null">useable = #{useable},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="businessDepartment != null">business_department = #{businessDepartment},</if>
|
||||
<if test="salesman != null">salesman = #{salesman},</if>
|
||||
<if test="mnemonicCode != null">mnemonic_code = #{mnemonicCode},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="taxpayerRegistrationNumber != null">taxpayer_registration_number = #{taxpayerRegistrationNumber},</if>
|
||||
<if test="organization != null">organization = #{organization},</if>
|
||||
<if test="supCustomer != null">sup_customer = #{supCustomer},</if>
|
||||
<if test="retailInvestor != null">retail_investor = #{retailInvestor},</if>
|
||||
<if test="country != null">country = #{country},</if>
|
||||
<if test="timeZone != null">time_zone = #{timeZone},</if>
|
||||
<if test="dataFormat != null">data_format = #{dataFormat},</if>
|
||||
<if test="contactName != null">contact_name = #{contactName},</if>
|
||||
<if test="shipment != null">shipment = #{shipment},</if>
|
||||
<if test="taxCategory != null">tax_category = #{taxCategory},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasCustomerById" parameterType="String">
|
||||
delete from bas_customer where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasCustomerByIds" parameterType="String">
|
||||
delete from bas_customer where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
164
ruoyi-admin/src/main/resources/mapper/bas/BasJobIdMapper.xml
Normal file
164
ruoyi-admin/src/main/resources/mapper/bas/BasJobIdMapper.xml
Normal file
@@ -0,0 +1,164 @@
|
||||
<?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="com.ruoyi.bas.basJobId.mapper.BasJobIdMapper">
|
||||
|
||||
<resultMap type="BasJobId" id="BasJobIdResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="type" column="type" />
|
||||
<result property="jobId" column="job_id" />
|
||||
<result property="jobDetail" column="job_detail" />
|
||||
<result property="stockId" column="stock_id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="exorderId" column="Exorder_id" />
|
||||
<result property="jobIdR" column="job_id_R" />
|
||||
<result property="jobDetailR" column="job_detail_R" />
|
||||
<result property="jobIdC" column="job_id_C" />
|
||||
<result property="jobDetailC" column="job_detail_C" />
|
||||
<result property="tempOrderId" column="temp_order_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="stockinId" column="stockin_id" />
|
||||
<result property="stockinDetailId" column="stockin_detail_id" />
|
||||
<result property="stockoutId" column="stockout_id" />
|
||||
<result property="stockoutDetailId" column="stockout_detail_id" />
|
||||
<result property="planId" column="plan_id" />
|
||||
<result property="jobIdY" column="job_id_y" />
|
||||
<result property="jobIdS" column="job_id_s" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasJobIdVo">
|
||||
select id, type, job_id, job_detail, stock_id, order_id, Exorder_id, job_id_R, job_detail_R, job_id_C, job_detail_C, temp_order_id, lot_no, stockin_id, stockin_detail_id, stockout_id, stockout_detail_id, plan_id, job_id_y, job_id_s from bas_job_id
|
||||
</sql>
|
||||
|
||||
<select id="selectBasJobIdList" parameterType="BasJobId" resultMap="BasJobIdResult">
|
||||
<include refid="selectBasJobIdVo"/>
|
||||
<where>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
||||
<if test="jobDetail != null and jobDetail != ''"> and job_detail = #{jobDetail}</if>
|
||||
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
|
||||
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
||||
<if test="exorderId != null and exorderId != ''"> and Exorder_id = #{exorderId}</if>
|
||||
<if test="jobIdR != null and jobIdR != ''"> and job_id_R = #{jobIdR}</if>
|
||||
<if test="jobDetailR != null and jobDetailR != ''"> and job_detail_R = #{jobDetailR}</if>
|
||||
<if test="jobIdC != null and jobIdC != ''"> and job_id_C = #{jobIdC}</if>
|
||||
<if test="jobDetailC != null and jobDetailC != ''"> and job_detail_C = #{jobDetailC}</if>
|
||||
<if test="tempOrderId != null and tempOrderId != ''"> and temp_order_id = #{tempOrderId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
|
||||
<if test="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id = #{stockinDetailId}</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''"> and stockout_detail_id = #{stockoutDetailId}</if>
|
||||
<if test="planId != null and planId != ''"> and plan_id = #{planId}</if>
|
||||
<if test="jobIdY != null and jobIdY != ''"> and job_id_y = #{jobIdY}</if>
|
||||
<if test="jobIdS != null and jobIdS != ''"> and job_id_s = #{jobIdS}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasJobIdById" parameterType="String" resultMap="BasJobIdResult">
|
||||
<include refid="selectBasJobIdVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasJobId" parameterType="BasJobId">
|
||||
insert into bas_job_id
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="jobId != null">job_id,</if>
|
||||
<if test="jobDetail != null">job_detail,</if>
|
||||
<if test="stockId != null">stock_id,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="exorderId != null">Exorder_id,</if>
|
||||
<if test="jobIdR != null">job_id_R,</if>
|
||||
<if test="jobDetailR != null">job_detail_R,</if>
|
||||
<if test="jobIdC != null">job_id_C,</if>
|
||||
<if test="jobDetailC != null">job_detail_C,</if>
|
||||
<if test="tempOrderId != null">temp_order_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="stockinId != null">stockin_id,</if>
|
||||
<if test="stockinDetailId != null">stockin_detail_id,</if>
|
||||
<if test="stockoutId != null">stockout_id,</if>
|
||||
<if test="stockoutDetailId != null">stockout_detail_id,</if>
|
||||
<if test="planId != null">plan_id,</if>
|
||||
<if test="jobIdY != null">job_id_y,</if>
|
||||
<if test="jobIdS != null">job_id_s,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="jobId != null">#{jobId},</if>
|
||||
<if test="jobDetail != null">#{jobDetail},</if>
|
||||
<if test="stockId != null">#{stockId},</if>
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="exorderId != null">#{exorderId},</if>
|
||||
<if test="jobIdR != null">#{jobIdR},</if>
|
||||
<if test="jobDetailR != null">#{jobDetailR},</if>
|
||||
<if test="jobIdC != null">#{jobIdC},</if>
|
||||
<if test="jobDetailC != null">#{jobDetailC},</if>
|
||||
<if test="tempOrderId != null">#{tempOrderId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="stockinId != null">#{stockinId},</if>
|
||||
<if test="stockinDetailId != null">#{stockinDetailId},</if>
|
||||
<if test="stockoutId != null">#{stockoutId},</if>
|
||||
<if test="stockoutDetailId != null">#{stockoutDetailId},</if>
|
||||
<if test="planId != null">#{planId},</if>
|
||||
<if test="jobIdY != null">#{jobIdY},</if>
|
||||
<if test="jobIdS != null">#{jobIdS},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasJobId" parameterType="BasJobId">
|
||||
update bas_job_id
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
|
||||
<if test="jobId != null">job_id = #{jobId},</if>
|
||||
<if test="jobDetail != null">job_detail = #{jobDetail},</if>
|
||||
<if test="stockId != null">stock_id = #{stockId},</if>
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="exorderId != null">Exorder_id = #{exorderId},</if>
|
||||
<if test="jobIdR != null">job_id_R = #{jobIdR},</if>
|
||||
<if test="jobDetailR != null">job_detail_R = #{jobDetailR},</if>
|
||||
<if test="jobIdC != null">job_id_C = #{jobIdC},</if>
|
||||
<if test="jobDetailC != null">job_detail_C = #{jobDetailC},</if>
|
||||
<if test="tempOrderId != null">temp_order_id = #{tempOrderId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="stockinId != null">stockin_id = #{stockinId},</if>
|
||||
<if test="stockinDetailId != null">stockin_detail_id = #{stockinDetailId},</if>
|
||||
<if test="stockoutId != null">stockout_id = #{stockoutId},</if>
|
||||
<if test="stockoutDetailId != null">stockout_detail_id = #{stockoutDetailId},</if>
|
||||
<if test="planId != null">plan_id = #{planId},</if>
|
||||
<if test="jobIdY != null">job_id_y = #{jobIdY},</if>
|
||||
<if test="jobIdS != null">job_id_s = #{jobIdS},</if>
|
||||
</trim>
|
||||
where type = #{type}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasJobIdById" parameterType="String">
|
||||
delete from bas_job_id where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasJobIdByIds" parameterType="String">
|
||||
delete from bas_job_id where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getoutStockIdByDate" parameterType="String" resultType="Integer">
|
||||
select count(*) from bas_job_id where type='CK' and job_id like CONCAT('%', #{date}, '%')
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="getIdByDate" parameterType="BasJobId" resultType="Integer">
|
||||
select count(*) from bas_job_id where type = #{type} and stock_id like CONCAT('%', #{stockId}, '%')
|
||||
</select>
|
||||
|
||||
<select id="getIdByType" resultType="String" parameterType="String">
|
||||
select job_id from bas_job_id where type=#{type}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,132 @@
|
||||
<?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="com.ruoyi.bas.BasProductCode.mapper.BasProductCodeMapper">
|
||||
|
||||
<resultMap type="BasProductCode" id="BasProductCodeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="model" column="model" />
|
||||
<result property="color" column="color" />
|
||||
<result property="serial" column="serial" />
|
||||
<result property="v" column="v" />
|
||||
<result property="hz" column="hz" />
|
||||
<result property="ph" column="ph" />
|
||||
<result property="nW" column="n_w" />
|
||||
<result property="gW" column="g_w" />
|
||||
<result property="type" column="type" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasProductCodeVo">
|
||||
select id, model, color, serial, v, hz, ph, n_w, g_w, type, spare1, spare2, spare3, create_time, spare4, spare5, spare6 from bas_product_code
|
||||
</sql>
|
||||
|
||||
<select id="selectBasProductCodeList" parameterType="BasProductCode" resultMap="BasProductCodeResult">
|
||||
<include refid="selectBasProductCodeVo"/>
|
||||
<where>
|
||||
<if test="model != null and model != ''"> and model = #{model}</if>
|
||||
<if test="color != null and color != ''"> and color like concat('%', #{color}, '%')</if>
|
||||
<if test="serial != null and serial != ''"> and serial like concat('%', #{serial}, '%')</if>
|
||||
<if test="v != null and v != ''"> and v like concat('%', #{v}, '%')</if>
|
||||
<if test="hz != null and hz != ''"> and hz like concat('%', #{hz}, '%')</if>
|
||||
<if test="ph != null and ph != ''"> and ph like concat('%', #{ph}, '%')</if>
|
||||
<if test="nW != null and nW != ''"> and n_w like concat('%', #{nW}, '%')</if>
|
||||
<if test="gW != null and gW != ''"> and g_w like concat('%', #{gW}, '%')</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasProductCodeById" parameterType="Long" resultMap="BasProductCodeResult">
|
||||
<include refid="selectBasProductCodeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasProductCode" parameterType="BasProductCode">
|
||||
insert into bas_product_code
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="model != null and model != ''">model,</if>
|
||||
<if test="color != null and color != ''">color,</if>
|
||||
<if test="serial != null and serial != ''">serial,</if>
|
||||
<if test="v != null and v != ''">v,</if>
|
||||
<if test="hz != null and hz != ''">hz,</if>
|
||||
<if test="ph != null and ph != ''">ph,</if>
|
||||
<if test="nW != null and nW != ''">n_w,</if>
|
||||
<if test="gW != null and gW != ''">g_w,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare6 != null">spare6,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="model != null and model != ''">#{model},</if>
|
||||
<if test="color != null and color != ''">#{color},</if>
|
||||
<if test="serial != null and serial != ''">#{serial},</if>
|
||||
<if test="v != null and v != ''">#{v},</if>
|
||||
<if test="hz != null and hz != ''">#{hz},</if>
|
||||
<if test="ph != null and ph != ''">#{ph},</if>
|
||||
<if test="nW != null and nW != ''">#{nW},</if>
|
||||
<if test="gW != null and gW != ''">#{gW},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare6 != null">#{spare6},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasProductCode" parameterType="BasProductCode">
|
||||
update bas_product_code
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="model != null and model != ''">model = #{model},</if>
|
||||
<if test="color != null and color != ''">color = #{color},</if>
|
||||
<if test="serial != null and serial != ''">serial = #{serial},</if>
|
||||
<if test="v != null and v != ''">v = #{v},</if>
|
||||
<if test="hz != null and hz != ''">hz = #{hz},</if>
|
||||
<if test="ph != null and ph != ''">ph = #{ph},</if>
|
||||
<if test="nW != null and nW != ''">n_w = #{nW},</if>
|
||||
<if test="gW != null and gW != ''">g_w = #{gW},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare6 != null">spare6 = #{spare6},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasProductCodeById" parameterType="Long">
|
||||
delete from bas_product_code where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasProductCodeByIds" parameterType="String">
|
||||
delete from bas_product_code where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
291
ruoyi-admin/src/main/resources/mapper/bas/BasProductMapper.xml
Normal file
291
ruoyi-admin/src/main/resources/mapper/bas/BasProductMapper.xml
Normal file
@@ -0,0 +1,291 @@
|
||||
<?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="com.ruoyi.bas.BasProduct.mapper.BasProductMapper">
|
||||
|
||||
<resultMap type="BasProduct" id="BasProductResult">
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="price" column="price" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="spare7" column="spare7" />
|
||||
<result property="spare8" column="spare8" />
|
||||
<result property="spare9" column="spare9" />
|
||||
<result property="spare10" column="spare10" />
|
||||
<result property="spare11" column="spare11" />
|
||||
<result property="spare12" column="spare12" />
|
||||
<result property="spare13" column="spare13" />
|
||||
<result property="spare14" column="spare14" />
|
||||
<result property="spare15" column="spare15" />
|
||||
<result property="spare16" column="spare16" />
|
||||
<result property="spare17" column="spare17" />
|
||||
<result property="spare18" column="spare18" />
|
||||
<result property="spare19" column="spare19" />
|
||||
<result property="spare20" column="spare20" />
|
||||
<result property="spare21" column="spare21" />
|
||||
<result property="spare22" column="spare22" />
|
||||
<result property="spare23" column="spare23" />
|
||||
<result property="spare24" column="spare24" />
|
||||
<result property="spare25" column="spare25" />
|
||||
<result property="spare26" column="spare26" />
|
||||
<result property="spare27" column="spare27" />
|
||||
<result property="spare28" column="spare28" />
|
||||
<result property="spare29" column="spare29" />
|
||||
<result property="spare30" column="spare30" />
|
||||
<result property="spare31" column="spare31" />
|
||||
<result property="spare32" column="spare32" />
|
||||
<result property="spare33" column="spare33" />
|
||||
<result property="spare34" column="spare34" />
|
||||
<result property="spare35" column="spare35" />
|
||||
<result property="spare36" column="spare36" />
|
||||
<result property="spare37" column="spare37" />
|
||||
<result property="spare38" column="spare38" />
|
||||
<result property="spare39" column="spare39" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasProductVo">
|
||||
select product_guid, product_id, parent_id, price, cargo_no, unit, spec, remark, spare1, spare2, spare3, spare4, spare5, spare6, product_name, spare7, spare8, spare9, spare10, spare11, spare12, spare13, spare14, spare15, spare16, spare17, spare18, spare19, spare20, spare21, spare22, spare23, spare24, spare25, spare26, spare27, spare28, spare29, spare30, spare31, spare32, spare33, spare34, spare35, spare36, spare37, spare38, spare39 from bas_product
|
||||
</sql>
|
||||
|
||||
<select id="selectBasProductList" parameterType="BasProduct" resultMap="BasProductResult">
|
||||
<include refid="selectBasProductVo"/>
|
||||
<where>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="parentId != null and parentId != ''"> and parent_id like concat('%', #{parentId}, '%')</if>
|
||||
<if test="price != null and price != ''"> and price like concat('%', #{price}, '%')</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and cargo_no like concat('%', #{cargoNo}, '%')</if>
|
||||
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
|
||||
<if test="spec != null and spec != ''"> and spec like concat('%', #{spec}, '%')</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 like concat('%', #{spare4}, '%')</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
|
||||
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
|
||||
<if test="spare9 != null and spare9 != ''"> and spare9 like concat('%', #{spare9}, '%')</if>
|
||||
<if test="spare10 != null and spare10 != ''"> and spare10 like concat('%', #{spare10}, '%')</if>
|
||||
<if test="spare11 != null and spare11 != ''"> and spare11 like concat('%', #{spare11}, '%')</if>
|
||||
<if test="spare12 != null and spare12 != ''"> and spare12 like concat('%', #{spare12}, '%')</if>
|
||||
<if test="spare13 != null and spare13 != ''"> and spare13 like concat('%', #{spare13}, '%')</if>
|
||||
<if test="spare14 != null and spare14 != ''"> and spare14 like concat('%', #{spare14}, '%')</if>
|
||||
<if test="spare15 != null and spare15 != ''"> and spare15 like concat('%', #{spare15}, '%')</if>
|
||||
<if test="spare16 != null and spare16 != ''"> and spare16 like concat('%', #{spare16}, '%')</if>
|
||||
<if test="spare17 != null and spare17 != ''"> and spare17 like concat('%', #{spare17}, '%')</if>
|
||||
<if test="spare18 != null and spare18 != ''"> and spare18 like concat('%', #{spare18}, '%')</if>
|
||||
<if test="spare19 != null and spare19 != ''"> and spare19 like concat('%', #{spare19}, '%')</if>
|
||||
<if test="spare20 != null and spare20 != ''"> and spare20 like concat('%', #{spare20}, '%')</if>
|
||||
<if test="spare21 != null and spare21 != ''"> and spare21 like concat('%', #{spare21}, '%')</if>
|
||||
<if test="spare22 != null and spare22 != ''"> and spare22 like concat('%', #{spare22}, '%')</if>
|
||||
<if test="spare23 != null and spare23 != ''"> and spare23 like concat('%', #{spare23}, '%')</if>
|
||||
<if test="spare24 != null and spare24 != ''"> and spare24 like concat('%', #{spare24}, '%')</if>
|
||||
<if test="spare25 != null and spare25 != ''"> and spare25 like concat('%', #{spare25}, '%')</if>
|
||||
<if test="spare26 != null and spare26 != ''"> and spare26 like concat('%', #{spare26}, '%')</if>
|
||||
<if test="spare27 != null and spare27 != ''"> and spare27 like concat('%', #{spare27}, '%')</if>
|
||||
<if test="spare28 != null and spare28 != ''"> and spare28 like concat('%', #{spare28}, '%')</if>
|
||||
<if test="spare29 != null and spare29 != ''"> and spare29 like concat('%', #{spare29}, '%')</if>
|
||||
<if test="spare30 != null and spare30 != ''"> and spare30 like concat('%', #{spare30}, '%')</if>
|
||||
<if test="spare31 != null and spare31 != ''"> and spare31 like concat('%', #{spare31}, '%')</if>
|
||||
<if test="spare32 != null and spare32 != ''"> and spare32 like concat('%', #{spare32}, '%')</if>
|
||||
<if test="spare33 != null and spare33 != ''"> and spare33 like concat('%', #{spare33}, '%')</if>
|
||||
<if test="spare34 != null and spare34 != ''"> and spare34 like concat('%', #{spare34}, '%')</if>
|
||||
<if test="spare35 != null and spare35 != ''"> and spare35 like concat('%', #{spare35}, '%')</if>
|
||||
<if test="spare36 != null and spare36 != ''"> and spare36 like concat('%', #{spare36}, '%')</if>
|
||||
<if test="spare37 != null and spare37 != ''"> and spare37 like concat('%', #{spare37}, '%')</if>
|
||||
<if test="spare38 != null and spare38 != ''"> and spare38 like concat('%', #{spare38}, '%')</if>
|
||||
<if test="spare39 != null and spare39 != ''"> and spare39 like concat('%', #{spare39}, '%')</if>
|
||||
<if test="updateId != null and updateId != ''"> and product_guid != #{updateId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasProductByProductGuid" parameterType="String" resultMap="BasProductResult">
|
||||
<include refid="selectBasProductVo"/>
|
||||
where product_guid = #{productGuid}
|
||||
</select>
|
||||
<select id="selectBasProductByProductId" parameterType="String" resultMap="BasProductResult">
|
||||
<include refid="selectBasProductVo"/>
|
||||
where product_id = #{productId}
|
||||
</select>
|
||||
<insert id="insertBasProduct" parameterType="BasProduct">
|
||||
insert into bas_product
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null and productId != ''">product_id,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="cargoNo != null">cargo_no,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare6 != null">spare6,</if>
|
||||
<if test="productName != null and productName != ''">product_name,</if>
|
||||
<if test="spare7 != null">spare7,</if>
|
||||
<if test="spare8 != null">spare8,</if>
|
||||
<if test="spare9 != null">spare9,</if>
|
||||
<if test="spare10 != null">spare10,</if>
|
||||
<if test="spare11 != null">spare11,</if>
|
||||
<if test="spare12 != null">spare12,</if>
|
||||
<if test="spare13 != null">spare13,</if>
|
||||
<if test="spare14 != null">spare14,</if>
|
||||
<if test="spare15 != null">spare15,</if>
|
||||
<if test="spare16 != null">spare16,</if>
|
||||
<if test="spare17 != null">spare17,</if>
|
||||
<if test="spare18 != null">spare18,</if>
|
||||
<if test="spare19 != null">spare19,</if>
|
||||
<if test="spare20 != null">spare20,</if>
|
||||
<if test="spare21 != null">spare21,</if>
|
||||
<if test="spare22 != null">spare22,</if>
|
||||
<if test="spare23 != null">spare23,</if>
|
||||
<if test="spare24 != null">spare24,</if>
|
||||
<if test="spare25 != null">spare25,</if>
|
||||
<if test="spare26 != null">spare26,</if>
|
||||
<if test="spare27 != null">spare27,</if>
|
||||
<if test="spare28 != null">spare28,</if>
|
||||
<if test="spare29 != null">spare29,</if>
|
||||
<if test="spare30 != null">spare30,</if>
|
||||
<if test="spare31 != null">spare31,</if>
|
||||
<if test="spare32 != null">spare32,</if>
|
||||
<if test="spare33 != null">spare33,</if>
|
||||
<if test="spare34 != null">spare34,</if>
|
||||
<if test="spare35 != null">spare35,</if>
|
||||
<if test="spare36 != null">spare36,</if>
|
||||
<if test="spare37 != null">spare37,</if>
|
||||
<if test="spare38 != null">spare38,</if>
|
||||
<if test="spare39 != null">spare39,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null and productId != ''">#{productId},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="cargoNo != null">#{cargoNo},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare6 != null">#{spare6},</if>
|
||||
<if test="productName != null and productName != ''">#{productName},</if>
|
||||
<if test="spare7 != null">#{spare7},</if>
|
||||
<if test="spare8 != null">#{spare8},</if>
|
||||
<if test="spare9 != null">#{spare9},</if>
|
||||
<if test="spare10 != null">#{spare10},</if>
|
||||
<if test="spare11 != null">#{spare11},</if>
|
||||
<if test="spare12 != null">#{spare12},</if>
|
||||
<if test="spare13 != null">#{spare13},</if>
|
||||
<if test="spare14 != null">#{spare14},</if>
|
||||
<if test="spare15 != null">#{spare15},</if>
|
||||
<if test="spare16 != null">#{spare16},</if>
|
||||
<if test="spare17 != null">#{spare17},</if>
|
||||
<if test="spare18 != null">#{spare18},</if>
|
||||
<if test="spare19 != null">#{spare19},</if>
|
||||
<if test="spare20 != null">#{spare20},</if>
|
||||
<if test="spare21 != null">#{spare21},</if>
|
||||
<if test="spare22 != null">#{spare22},</if>
|
||||
<if test="spare23 != null">#{spare23},</if>
|
||||
<if test="spare24 != null">#{spare24},</if>
|
||||
<if test="spare25 != null">#{spare25},</if>
|
||||
<if test="spare26 != null">#{spare26},</if>
|
||||
<if test="spare27 != null">#{spare27},</if>
|
||||
<if test="spare28 != null">#{spare28},</if>
|
||||
<if test="spare29 != null">#{spare29},</if>
|
||||
<if test="spare30 != null">#{spare30},</if>
|
||||
<if test="spare31 != null">#{spare31},</if>
|
||||
<if test="spare32 != null">#{spare32},</if>
|
||||
<if test="spare33 != null">#{spare33},</if>
|
||||
<if test="spare34 != null">#{spare34},</if>
|
||||
<if test="spare35 != null">#{spare35},</if>
|
||||
<if test="spare36 != null">#{spare36},</if>
|
||||
<if test="spare37 != null">#{spare37},</if>
|
||||
<if test="spare38 != null">#{spare38},</if>
|
||||
<if test="spare39 != null">#{spare39},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasProduct" parameterType="BasProduct">
|
||||
update bas_product
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productId != null and productId != ''">product_id = #{productId},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spec != null">spec = #{spec},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare6 != null">spare6 = #{spare6},</if>
|
||||
<if test="productName != null and productName != ''">product_name = #{productName},</if>
|
||||
<if test="spare7 != null">spare7 = #{spare7},</if>
|
||||
<if test="spare8 != null">spare8 = #{spare8},</if>
|
||||
<if test="spare9 != null">spare9 = #{spare9},</if>
|
||||
<if test="spare10 != null">spare10 = #{spare10},</if>
|
||||
<if test="spare11 != null">spare11 = #{spare11},</if>
|
||||
<if test="spare12 != null">spare12 = #{spare12},</if>
|
||||
<if test="spare13 != null">spare13 = #{spare13},</if>
|
||||
<if test="spare14 != null">spare14 = #{spare14},</if>
|
||||
<if test="spare15 != null">spare15 = #{spare15},</if>
|
||||
<if test="spare16 != null">spare16 = #{spare16},</if>
|
||||
<if test="spare17 != null">spare17 = #{spare17},</if>
|
||||
<if test="spare18 != null">spare18 = #{spare18},</if>
|
||||
<if test="spare19 != null">spare19 = #{spare19},</if>
|
||||
<if test="spare20 != null">spare20 = #{spare20},</if>
|
||||
<if test="spare21 != null">spare21 = #{spare21},</if>
|
||||
<if test="spare22 != null">spare22 = #{spare22},</if>
|
||||
<if test="spare23 != null">spare23 = #{spare23},</if>
|
||||
<if test="spare24 != null">spare24 = #{spare24},</if>
|
||||
<if test="spare25 != null">spare25 = #{spare25},</if>
|
||||
<if test="spare26 != null">spare26 = #{spare26},</if>
|
||||
<if test="spare27 != null">spare27 = #{spare27},</if>
|
||||
<if test="spare28 != null">spare28 = #{spare28},</if>
|
||||
<if test="spare29 != null">spare29 = #{spare29},</if>
|
||||
<if test="spare30 != null">spare30 = #{spare30},</if>
|
||||
<if test="spare31 != null">spare31 = #{spare31},</if>
|
||||
<if test="spare32 != null">spare32 = #{spare32},</if>
|
||||
<if test="spare33 != null">spare33 = #{spare33},</if>
|
||||
<if test="spare34 != null">spare34 = #{spare34},</if>
|
||||
<if test="spare35 != null">spare35 = #{spare35},</if>
|
||||
<if test="spare36 != null">spare36 = #{spare36},</if>
|
||||
<if test="spare37 != null">spare37 = #{spare37},</if>
|
||||
<if test="spare38 != null">spare38 = #{spare38},</if>
|
||||
<if test="spare39 != null">spare39 = #{spare39},</if>
|
||||
</trim>
|
||||
where product_guid = #{productGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasProductByProductGuid" parameterType="String">
|
||||
delete from bas_product where product_guid = #{productGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasProductByProductGuids" parameterType="String">
|
||||
delete from bas_product where product_guid in
|
||||
<foreach item="productGuid" collection="array" open="(" separator="," close=")">
|
||||
#{productGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?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="com.ruoyi.bas.port.mapper.BasProductPortMapper">
|
||||
|
||||
<resultMap type="BasProductPort" id="BasProductPortResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="portName" column="port_name" />
|
||||
<result property="portType" column="port_type" />
|
||||
<result property="portDesc" column="port_desc" />
|
||||
<result property="createMan" column="create_man" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasProductPortVo">
|
||||
select id, port_name, port_type, port_desc, create_man, create_time from bas_product_port
|
||||
</sql>
|
||||
|
||||
<select id="selectBasProductPortList" parameterType="BasProductPort" resultMap="BasProductPortResult">
|
||||
<include refid="selectBasProductPortVo"/>
|
||||
<where>
|
||||
<if test="portName != null and portName != ''"> and port_name like concat('%', #{portName}, '%')</if>
|
||||
<if test="portType != null and portType != ''"> and port_type = #{portType}</if>
|
||||
<if test="portDesc != null and portDesc != ''"> and port_desc = #{portDesc}</if>
|
||||
<if test="createMan != null and createMan != ''"> and create_man = #{createMan}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasProductPortById" parameterType="String" resultMap="BasProductPortResult">
|
||||
<include refid="selectBasProductPortVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasProductPort" parameterType="BasProductPort">
|
||||
insert into bas_product_port
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="portName != null">port_name,</if>
|
||||
<if test="portType != null">port_type,</if>
|
||||
<if test="portDesc != null">port_desc,</if>
|
||||
<if test="createMan != null">create_man,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="portName != null">#{portName},</if>
|
||||
<if test="portType != null">#{portType},</if>
|
||||
<if test="portDesc != null">#{portDesc},</if>
|
||||
<if test="createMan != null">#{createMan},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasProductPort" parameterType="BasProductPort">
|
||||
update bas_product_port
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="portName != null">port_name = #{portName},</if>
|
||||
<if test="portType != null">port_type = #{portType},</if>
|
||||
<if test="portDesc != null">port_desc = #{portDesc},</if>
|
||||
<if test="createMan != null">create_man = #{createMan},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasProductPortById" parameterType="String">
|
||||
delete from bas_product_port where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasProductPortByIds" parameterType="String">
|
||||
delete from bas_product_port where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,114 @@
|
||||
<?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="com.ruoyi.bas.portrel.mapper.BasProductPortRelMapper">
|
||||
|
||||
<resultMap type="BasProductPortRel" id="BasProductPortRelResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="portId" column="port_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasProductPortRelVo">
|
||||
select id, product_guid, product_id, port_id from bas_product_port_rel
|
||||
</sql>
|
||||
|
||||
<resultMap type="BasProduct" id="BasProductResult">
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="price" column="price" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
<result property="spare7" column="spare7" />
|
||||
<result property="spare8" column="spare8" />
|
||||
<result property="spare9" column="spare9" />
|
||||
<result property="productName" column="product_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasProductVo">
|
||||
select product_guid, product_id, parent_id, price, cargo_no, unit, spec, remark, spare1, spare2, spare3, spare4, spare5, spare6, product_name from bas_product
|
||||
</sql>
|
||||
|
||||
<select id="selectBasProductPortRelList" parameterType="BasProductPortRel" resultMap="BasProductPortRelResult">
|
||||
<include refid="selectBasProductPortRelVo"/>
|
||||
<where>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="portId != null and portId != ''"> and port_id = #{portId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasProductPortRelById" parameterType="Long" resultMap="BasProductPortRelResult">
|
||||
<include refid="selectBasProductPortRelVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectNotBindProduct" resultMap="BasProductResult">
|
||||
select product_guid, product_id, parent_id, price, cargo_no, unit, spec, remark, spare1, spare2, spare3, spare4, spare5, spare6, product_name, spare7, spare8, spare9
|
||||
from bas_product bp
|
||||
<where>
|
||||
<if test="bindStatus =='1'.toString()">
|
||||
and product_id in (select product_id from bas_product_port_rel where port_id=#{portId})
|
||||
</if>
|
||||
<if test="bindStatus =='0'.toString()">
|
||||
and product_id not in (select product_id from bas_product_port_rel where port_id=#{portId})
|
||||
</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<insert id="insertBasProductPortRel" parameterType="BasProductPortRel">
|
||||
insert into bas_product_port_rel
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="portId != null">port_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="portId != null">#{portId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasProductPortRel" parameterType="BasProductPortRel">
|
||||
update bas_product_port_rel
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="portId != null">port_id = #{portId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasProductPortRelById" parameterType="Long">
|
||||
delete from bas_product_port_rel where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasProductPortRelByIds" parameterType="String">
|
||||
delete from bas_product_port_rel where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteBasProductPortRel">
|
||||
delete from bas_product_port_rel where port_id=#{portId} and product_id in
|
||||
<foreach item="productId" collection="productIds" open="(" separator="," close=")">
|
||||
#{productId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
100
ruoyi-admin/src/main/resources/mapper/bas/BasRoadwayMapper.xml
Normal file
100
ruoyi-admin/src/main/resources/mapper/bas/BasRoadwayMapper.xml
Normal file
@@ -0,0 +1,100 @@
|
||||
<?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="com.ruoyi.bas.roadway.mapper.BasRoadwayMapper">
|
||||
|
||||
<resultMap type="BasRoadway" id="BasRoadwayResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="roadwayId" column="roadway_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="roadwayName" column="roadway_name" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="inLocked" column="in_locked" />
|
||||
<result property="outLocked" column="out_locked" />
|
||||
<result property="inLocked2" column="in_locked2" />
|
||||
<result property="outLocked2" column="out_locked2" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasRoadwayVo">
|
||||
select id, roadway_id, warehouse_id, roadway_name, device_id, in_locked, out_locked, in_locked2, out_locked2 from bas_roadway
|
||||
</sql>
|
||||
|
||||
<select id="selectBasRoadwayList" parameterType="BasRoadway" resultMap="BasRoadwayResult">
|
||||
<include refid="selectBasRoadwayVo"/>
|
||||
<where>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="roadwayName != null and roadwayName != ''"> and roadway_name like concat('%', #{roadwayName}, '%')</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
<if test="inLocked != null and inLocked != ''"> and in_locked = #{inLocked}</if>
|
||||
<if test="outLocked != null and outLocked != ''"> and out_locked = #{outLocked}</if>
|
||||
<if test="inLocked2 != null and inLocked2 != ''"> and in_locked2 = #{inLocked2}</if>
|
||||
<if test="outLocked2 != null and outLocked2 != ''"> and out_locked2 = #{outLocked2}</if>
|
||||
<if test="updateId != null and updateId != ''"> and id != #{updateId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasRoadwayById" parameterType="String" resultMap="BasRoadwayResult">
|
||||
<include refid="selectBasRoadwayVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectBasRoadwayByRoadwayId" parameterType="String" resultMap="BasRoadwayResult">
|
||||
<include refid="selectBasRoadwayVo"/>
|
||||
where roadway_id = #{roadwayId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasRoadway" parameterType="BasRoadway">
|
||||
insert into bas_roadway
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="roadwayId != null and roadwayId != ''">roadway_id,</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id,</if>
|
||||
<if test="roadwayName != null">roadway_name,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="inLocked != null and inLocked != ''">in_locked,</if>
|
||||
<if test="outLocked != null and outLocked != ''">out_locked,</if>
|
||||
<if test="inLocked2 != null and inLocked2 != ''">in_locked2,</if>
|
||||
<if test="outLocked2 != null and outLocked2 != ''">out_locked2,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="roadwayId != null and roadwayId != ''">#{roadwayId},</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">#{warehouseId},</if>
|
||||
<if test="roadwayName != null">#{roadwayName},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="inLocked != null and inLocked != ''">#{inLocked},</if>
|
||||
<if test="outLocked != null and outLocked != ''">#{outLocked},</if>
|
||||
<if test="inLocked2 != null and inLocked2 != ''">#{inLocked2},</if>
|
||||
<if test="outLocked2 != null and outLocked2 != ''">#{outLocked2},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasRoadway" parameterType="BasRoadway">
|
||||
update bas_roadway
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="roadwayId != null and roadwayId != ''">roadway_id = #{roadwayId},</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id = #{warehouseId},</if>
|
||||
<if test="roadwayName != null">roadway_name = #{roadwayName},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="inLocked != null and inLocked != ''">in_locked = #{inLocked},</if>
|
||||
<if test="outLocked != null and outLocked != ''">out_locked = #{outLocked},</if>
|
||||
<if test="inLocked2 != null and inLocked2 != ''">in_locked2 = #{inLocked2},</if>
|
||||
<if test="outLocked2 != null and outLocked2 != ''">out_locked2 = #{outLocked2},</if>
|
||||
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasRoadwayById" parameterType="String">
|
||||
delete from bas_roadway where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasRoadwayByIds" parameterType="String">
|
||||
delete from bas_roadway where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
144
ruoyi-admin/src/main/resources/mapper/bas/BasSupplierMapper.xml
Normal file
144
ruoyi-admin/src/main/resources/mapper/bas/BasSupplierMapper.xml
Normal file
@@ -0,0 +1,144 @@
|
||||
<?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="com.ruoyi.bas.BasSupplier.mapper.BasSupplierMapper">
|
||||
|
||||
<resultMap type="BasSupplier" id="BasSupplierResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="supplierNo" column="supplier_no" />
|
||||
<result property="supplierGroupNo" column="supplier_group_no" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
<result property="simpleName" column="simple_name" />
|
||||
<result property="useable" column="useable" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="supplierArae" column="supplier_arae" />
|
||||
<result property="taxpayerRegistrationNumber" column="taxpayer_registration_number" />
|
||||
<result property="country" column="country" />
|
||||
<result property="timeZone" column="time_zone" />
|
||||
<result property="dataFormat" column="data_format" />
|
||||
<result property="receivingCountry" column="receiving_country" />
|
||||
<result property="taxCategory" column="tax_category" />
|
||||
<result property="legalPerson" column="legal_person" />
|
||||
<result property="registeredCapital" column="registered_capital" />
|
||||
<result property="address" column="address" />
|
||||
<result property="contactName" column="contact_name" />
|
||||
<result property="contactNumber" column="contact_number" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasSupplierVo">
|
||||
select id, supplier_no, supplier_group_no, supplier_name, simple_name, useable, remark, supplier_arae, taxpayer_registration_number, country, time_zone, data_format, receiving_country, tax_category, legal_person, registered_capital, address, contact_name, contact_number from bas_supplier
|
||||
</sql>
|
||||
|
||||
<select id="selectBasSupplierList" parameterType="BasSupplier" resultMap="BasSupplierResult">
|
||||
<include refid="selectBasSupplierVo"/>
|
||||
<where>
|
||||
<if test="supplierNo != null and supplierNo != ''"> and supplier_no = #{supplierNo}</if>
|
||||
<if test="supplierGroupNo != null and supplierGroupNo != ''"> and supplier_group_no like concat('%', #{supplierGroupNo}, '%')</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
<if test="simpleName != null and simpleName != ''"> and simple_name like concat('%', #{simpleName}, '%')</if>
|
||||
<if test="useable != null and useable != ''"> and useable = #{useable}</if>
|
||||
<if test="supplierArae != null and supplierArae != ''"> and supplier_arae like concat('%', #{supplierArae}, '%')</if>
|
||||
<if test="taxpayerRegistrationNumber != null and taxpayerRegistrationNumber != ''"> and taxpayer_registration_number like concat('%', #{taxpayerRegistrationNumber}, '%')</if>
|
||||
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
|
||||
<if test="timeZone != null and timeZone != ''"> and time_zone like concat('%', #{timeZone}, '%')</if>
|
||||
<if test="dataFormat != null and dataFormat != ''"> and data_format like concat('%', #{dataFormat}, '%')</if>
|
||||
<if test="receivingCountry != null and receivingCountry != ''"> and receiving_country like concat('%', #{receivingCountry}, '%')</if>
|
||||
<if test="taxCategory != null and taxCategory != ''"> and tax_category like concat('%', #{taxCategory}, '%')</if>
|
||||
<if test="legalPerson != null and legalPerson != ''"> and legal_person like concat('%', #{legalPerson}, '%')</if>
|
||||
<if test="registeredCapital != null and registeredCapital != ''"> and registered_capital like concat('%', #{registeredCapital}, '%')</if>
|
||||
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
|
||||
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
|
||||
<if test="contactNumber != null and contactNumber != ''"> and contact_number = like concat('%',#{contactNumber}, '%')</if>
|
||||
<if test="updateId != null and updateId != ''"> and id != #{updateId} </if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectBasSupplierById" parameterType="String" resultMap="BasSupplierResult">
|
||||
<include refid="selectBasSupplierVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasSupplier" parameterType="BasSupplier">
|
||||
insert into bas_supplier
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="supplierNo != null">supplier_no,</if>
|
||||
<if test="supplierGroupNo != null">supplier_group_no,</if>
|
||||
<if test="supplierName != null">supplier_name,</if>
|
||||
<if test="simpleName != null">simple_name,</if>
|
||||
<if test="useable != null and useable != ''">useable,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="supplierArae != null">supplier_arae,</if>
|
||||
<if test="taxpayerRegistrationNumber != null">taxpayer_registration_number,</if>
|
||||
<if test="country != null">country,</if>
|
||||
<if test="timeZone != null">time_zone,</if>
|
||||
<if test="dataFormat != null">data_format,</if>
|
||||
<if test="receivingCountry != null">receiving_country,</if>
|
||||
<if test="taxCategory != null">tax_category,</if>
|
||||
<if test="legalPerson != null">legal_person,</if>
|
||||
<if test="registeredCapital != null">registered_capital,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="contactName != null">contact_name,</if>
|
||||
<if test="contactNumber != null">contact_number,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="supplierNo != null">#{supplierNo},</if>
|
||||
<if test="supplierGroupNo != null">#{supplierGroupNo},</if>
|
||||
<if test="supplierName != null">#{supplierName},</if>
|
||||
<if test="simpleName != null">#{simpleName},</if>
|
||||
<if test="useable != null and useable != ''">#{useable},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="supplierArae != null">#{supplierArae},</if>
|
||||
<if test="taxpayerRegistrationNumber != null">#{taxpayerRegistrationNumber},</if>
|
||||
<if test="country != null">#{country},</if>
|
||||
<if test="timeZone != null">#{timeZone},</if>
|
||||
<if test="dataFormat != null">#{dataFormat},</if>
|
||||
<if test="receivingCountry != null">#{receivingCountry},</if>
|
||||
<if test="taxCategory != null">#{taxCategory},</if>
|
||||
<if test="legalPerson != null">#{legalPerson},</if>
|
||||
<if test="registeredCapital != null">#{registeredCapital},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="contactName != null">#{contactName},</if>
|
||||
<if test="contactNumber != null">#{contactNumber},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasSupplier" parameterType="BasSupplier">
|
||||
update bas_supplier
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="supplierNo != null">supplier_no = #{supplierNo},</if>
|
||||
<if test="supplierGroupNo != null">supplier_group_no = #{supplierGroupNo},</if>
|
||||
<if test="supplierName != null">supplier_name = #{supplierName},</if>
|
||||
<if test="simpleName != null">simple_name = #{simpleName},</if>
|
||||
<if test="useable != null and useable != ''">useable = #{useable},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="supplierArae != null">supplier_arae = #{supplierArae},</if>
|
||||
<if test="taxpayerRegistrationNumber != null">taxpayer_registration_number = #{taxpayerRegistrationNumber},</if>
|
||||
<if test="country != null">country = #{country},</if>
|
||||
<if test="timeZone != null">time_zone = #{timeZone},</if>
|
||||
<if test="dataFormat != null">data_format = #{dataFormat},</if>
|
||||
<if test="receivingCountry != null">receiving_country = #{receivingCountry},</if>
|
||||
<if test="taxCategory != null">tax_category = #{taxCategory},</if>
|
||||
<if test="legalPerson != null">legal_person = #{legalPerson},</if>
|
||||
<if test="registeredCapital != null">registered_capital = #{registeredCapital},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="contactName != null">contact_name = #{contactName},</if>
|
||||
<if test="contactNumber != null">contact_number = #{contactNumber},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasSupplierById" parameterType="String">
|
||||
delete from bas_supplier where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasSupplierByIds" parameterType="String">
|
||||
delete from bas_supplier where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
95
ruoyi-admin/src/main/resources/mapper/bas/BasTagMapper.xml
Normal file
95
ruoyi-admin/src/main/resources/mapper/bas/BasTagMapper.xml
Normal file
@@ -0,0 +1,95 @@
|
||||
<?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="com.ruoyi.bas.tag.mapper.BasTagMapper">
|
||||
|
||||
<resultMap type="BasTag" id="BasTagResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="ip" column="ip" />
|
||||
<result property="pickAdd" column="pick_add" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="curNum" column="cur_num" />
|
||||
<result property="sendCompleted" column="send_completed" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasTagVo">
|
||||
select id, ip, pick_add, tray_code, cur_num, send_completed, spare1, spare2, spare3 from bas_tag
|
||||
</sql>
|
||||
|
||||
<select id="selectBasTagList" parameterType="BasTag" resultMap="BasTagResult">
|
||||
<include refid="selectBasTagVo"/>
|
||||
<where>
|
||||
<if test="ip != null and ip != ''"> and ip = #{ip}</if>
|
||||
<if test="pickAdd != null and pickAdd != ''"> and pick_add = #{pickAdd}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="curNum != null and curNum != ''"> and cur_num = #{curNum}</if>
|
||||
<if test="sendCompleted != null and sendCompleted != ''"> and send_completed = #{sendCompleted}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasTagById" parameterType="Long" resultMap="BasTagResult">
|
||||
<include refid="selectBasTagVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectBasTagByTrayCode" resultMap="BasTagResult">
|
||||
<include refid="selectBasTagVo"/>
|
||||
where tray_code = #{trayCode}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasTag" parameterType="BasTag" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bas_tag
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="ip != null">ip,</if>
|
||||
<if test="pickAdd != null">pick_add,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="curNum != null">cur_num,</if>
|
||||
<if test="sendCompleted != null">send_completed,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="ip != null">#{ip},</if>
|
||||
<if test="pickAdd != null">#{pickAdd},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="curNum != null">#{curNum},</if>
|
||||
<if test="sendCompleted != null">#{sendCompleted},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasTag" parameterType="BasTag">
|
||||
update bas_tag
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="ip != null">ip = #{ip},</if>
|
||||
<if test="pickAdd != null">pick_add = #{pickAdd},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="curNum != null">cur_num = #{curNum},</if>
|
||||
<if test="sendCompleted != null">send_completed = #{sendCompleted},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasTagById" parameterType="Long">
|
||||
delete from bas_tag where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasTagByIds" parameterType="String">
|
||||
delete from bas_tag where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?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="com.ruoyi.bas.taskNo.mapper.BasTaskNoMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.bas.taskNo.domain.BasTaskNo" id="BasTaskNoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="taskType" column="task_type"/>
|
||||
<result property="typeName" column="type_name"/>
|
||||
<result property="taskNo" column="task_no"/>
|
||||
<result property="minNo" column="min_no"/>
|
||||
<result property="maxNo" column="max_no"/>
|
||||
</resultMap>
|
||||
<sql id="selectBasTaskNoVo">
|
||||
select id, task_type, type_name, task_no, min_no, max_no
|
||||
from bas_task_no
|
||||
</sql>
|
||||
<select id="selectBasTaskNoById" parameterType="String" resultMap="BasTaskNoResult">
|
||||
<include refid="selectBasTaskNoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<update id="updateBasTaskNo" parameterType="com.ruoyi.bas.taskNo.domain.BasTaskNo">
|
||||
update bas_task_no
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskType != null">task_type = #{taskType},</if>
|
||||
<if test="typeName != null">type_name = #{typeName},</if>
|
||||
<if test="taskNo != null">task_no = #{taskNo},</if>
|
||||
<if test="minNo != null">min_no = #{minNo},</if>
|
||||
<if test="maxNo != null">max_no = #{maxNo},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getTaskNo" resultMap="BasTaskNoResult" parameterType="String">
|
||||
select *
|
||||
from bas_task_no
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<update id="updateTaskNo" parameterType="com.ruoyi.bas.taskNo.domain.BasTaskNo">
|
||||
update bas_task_no
|
||||
set task_no=#{taskNo}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,106 @@
|
||||
<?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="com.ruoyi.bas.traycodeformat.mapper.BasTraycodeFormatMapper">
|
||||
|
||||
<resultMap type="BasTraycodeFormat" id="BasTraycodeFormatResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="barcodeFormat" column="barcode_format" />
|
||||
<result property="serialRule" column="serial_rule" />
|
||||
<result property="serialExample" column="serial_example" />
|
||||
<result property="remarks" column="remarks" />
|
||||
<result property="minNum" column="min_num" />
|
||||
<result property="maxNum" column="max_num" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasTraycodeFormatVo">
|
||||
select id, barcode_format, serial_rule, serial_example, remarks, min_num, max_num, create_time, update_time, spare1, spare2, spare3 from bas_traycode_format
|
||||
</sql>
|
||||
|
||||
<select id="selectBasTraycodeFormatList" parameterType="BasTraycodeFormat" resultMap="BasTraycodeFormatResult">
|
||||
<include refid="selectBasTraycodeFormatVo"/>
|
||||
<where>
|
||||
<if test="barcodeFormat != null and barcodeFormat != ''"> and barcode_format like concat('%', #{barcodeFormat}, '%')</if>
|
||||
<if test="serialRule != null and serialRule != ''"> and serial_rule like concat('%',#{serialRule}, '%')</if>
|
||||
<if test="serialExample != null and serialExample != ''"> and serial_example like concat('%',#{serialExample}, '%')</if>
|
||||
<if test="remarks != null and remarks != ''"> and remarks like concat('%',#{remarks}, '%')</if>
|
||||
<if test="minNum != null "> and min_num like concat('%',#{minNum}, '%')</if>
|
||||
<if test="maxNum != null "> and max_num like concat('%',#{maxNum}, '%')</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasTraycodeFormatById" parameterType="Long" resultMap="BasTraycodeFormatResult">
|
||||
<include refid="selectBasTraycodeFormatVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasTraycodeFormat" parameterType="BasTraycodeFormat">
|
||||
insert into bas_traycode_format
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="barcodeFormat != null">barcode_format,</if>
|
||||
<if test="serialRule != null">serial_rule,</if>
|
||||
<if test="serialExample != null">serial_example,</if>
|
||||
<if test="remarks != null">remarks,</if>
|
||||
<if test="minNum != null">min_num,</if>
|
||||
<if test="maxNum != null">max_num,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="barcodeFormat != null">#{barcodeFormat},</if>
|
||||
<if test="serialRule != null">#{serialRule},</if>
|
||||
<if test="serialExample != null">#{serialExample},</if>
|
||||
<if test="remarks != null">#{remarks},</if>
|
||||
<if test="minNum != null">#{minNum},</if>
|
||||
<if test="maxNum != null">#{maxNum},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasTraycodeFormat" parameterType="BasTraycodeFormat">
|
||||
update bas_traycode_format
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="barcodeFormat != null">barcode_format = #{barcodeFormat},</if>
|
||||
<if test="serialRule != null">serial_rule = #{serialRule},</if>
|
||||
<if test="serialExample != null">serial_example = #{serialExample},</if>
|
||||
<if test="remarks != null">remarks = #{remarks},</if>
|
||||
<if test="minNum != null">min_num = #{minNum},</if>
|
||||
<if test="maxNum != null">max_num = #{maxNum},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasTraycodeFormatById" parameterType="Long">
|
||||
delete from bas_traycode_format where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasTraycodeFormatByIds" parameterType="String">
|
||||
delete from bas_traycode_format where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
104
ruoyi-admin/src/main/resources/mapper/bas/BasTraycodeMapper.xml
Normal file
104
ruoyi-admin/src/main/resources/mapper/bas/BasTraycodeMapper.xml
Normal file
@@ -0,0 +1,104 @@
|
||||
<?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="com.ruoyi.bas.traycode.mapper.BasTraycodeMapper">
|
||||
|
||||
<resultMap type="BasTraycode" id="BasTraycodeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="formatId" column="format_id" />
|
||||
<result property="formatName" column="format_name" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasTraycodeVo">
|
||||
select bt.id, bt.format_id, bt.tray_code, bt.create_time, bt.update_time, bt.spare1, bt.spare2, bt.spare3,btf.remarks as format_name
|
||||
from bas_traycode bt
|
||||
left join bas_traycode_format btf on btf.id = bt.format_id
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectBasTraycodeList" parameterType="BasTraycode" resultMap="BasTraycodeResult">
|
||||
<include refid="selectBasTraycodeVo"/>
|
||||
<where>
|
||||
<if test="formatId != null "> and bt.format_id = #{formatId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bt.tray_code like concat('%',#{trayCode}, '%')</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and bt.spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and bt.spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and bt.spare3 = #{spare3}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasTraycodeById" parameterType="Long" resultMap="BasTraycodeResult">
|
||||
<include refid="selectBasTraycodeVo"/>
|
||||
where bt.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasTraycode" parameterType="BasTraycode">
|
||||
insert into bas_traycode
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="formatId != null">format_id,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="formatId != null">#{formatId},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertBasTraycodeList">
|
||||
insert into bas_traycode( format_id, tray_code) values
|
||||
<foreach item="item" collection="list" separator=",">
|
||||
(
|
||||
|
||||
<if test="item.formatId != null">#{item.formatId},</if>
|
||||
<if test="item.trayCode != null">#{item.trayCode}</if>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasTraycode" parameterType="BasTraycode">
|
||||
update bas_traycode
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="formatId != null">format_id = #{formatId},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasTraycodeById" parameterType="Long">
|
||||
delete from bas_traycode where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasTraycodeByIds" parameterType="String">
|
||||
delete from bas_traycode where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectBasTrayCodeMax" resultType="Integer">
|
||||
select max(cast(tray_code as int)) from bas_traycode
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?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="com.ruoyi.bas.warehousePort.mapper.BasWarehousePortMapper">
|
||||
|
||||
<resultMap type="BasWarehousePort" id="BasWarehousePortResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="portCode" column="port_code" />
|
||||
<result property="portName" column="port_name" />
|
||||
<result property="portType" column="port_type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasWarehousePortVo">
|
||||
select id, warehouse_id, port_code, port_name, port_type from bas_warehouse_port
|
||||
</sql>
|
||||
|
||||
<select id="selectBasWarehousePortList" parameterType="BasWarehousePort" resultMap="BasWarehousePortResult">
|
||||
<include refid="selectBasWarehousePortVo"/>
|
||||
<where>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="portCode != null and portCode != ''"> and port_code = #{portCode}</if>
|
||||
<if test="portName != null and portName != ''"> and port_name like concat('%', #{portName}, '%')</if>
|
||||
<if test="portType != null and portType != ''"> and port_type = #{portType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasWarehousePortById" parameterType="Long" resultMap="BasWarehousePortResult">
|
||||
<include refid="selectBasWarehousePortVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasWarehousePort" parameterType="BasWarehousePort">
|
||||
insert into bas_warehouse_port
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="portCode != null">port_code,</if>
|
||||
<if test="portName != null">port_name,</if>
|
||||
<if test="portType != null">port_type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="portCode != null">#{portCode},</if>
|
||||
<if test="portName != null">#{portName},</if>
|
||||
<if test="portType != null">#{portType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasWarehousePort" parameterType="BasWarehousePort">
|
||||
update bas_warehouse_port
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="portCode != null">port_code = #{portCode},</if>
|
||||
<if test="portName != null">port_name = #{portName},</if>
|
||||
<if test="portType != null">port_type = #{portType},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasWarehousePortById" parameterType="Long">
|
||||
delete from bas_warehouse_port where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasWarehousePortByIds" parameterType="String">
|
||||
delete from bas_warehouse_port where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,224 @@
|
||||
<?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="com.ruoyi.bas.cargoSpace.mapper.BasCargoSpaceMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.bas.cargoSpace.domain.BasCargoSpace" id="BasCargoSpaceResult">
|
||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="roadwayId" column="roadway_id" />
|
||||
<result property="cargoAreaId" column="cargo_area_id" />
|
||||
<result property="theType" column="the_type" />
|
||||
<result property="theTypeName" column="the_type_name" />
|
||||
<result property="cargoSpaceName" column="cargo_space_name" />
|
||||
<result property="thePlatoon" column="the_platoon" />
|
||||
<result property="theColumn" column="the_column" />
|
||||
<result property="theFloor" column="the_floor" />
|
||||
<result property="status" column="status" />
|
||||
<result property="locked" column="locked" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="cargoHight" column="cargo_hight" />
|
||||
<result property="issDouble" column="iss_double" />
|
||||
<result property="groupCodingNo" column="group_coding_no" />
|
||||
<result property="groupCoding" column="group_coding" />
|
||||
<result property="cargoSpaceLogo" column="cargo_space_logo" />
|
||||
<result property="thisCargoArea" column="this_cargo_area" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasCargoSpaceVo">
|
||||
select
|
||||
bcs.cargo_space_id,
|
||||
bcs.warehouse_id,
|
||||
bcs.roadway_id,
|
||||
bcs.cargo_area_id,
|
||||
bcs.the_type,
|
||||
bcs.the_type_name,
|
||||
bcs.cargo_space_name,
|
||||
bcs.the_platoon,
|
||||
bcs.the_column,
|
||||
bcs.the_floor,
|
||||
bcs.status,
|
||||
bcs.locked,
|
||||
bcs.tray_code,
|
||||
bcs.cargo_hight,
|
||||
bcs.iss_double,
|
||||
bcs.group_coding_no,
|
||||
bcs.group_coding,
|
||||
bcs.cargo_space_logo,
|
||||
bcs.this_cargo_area,
|
||||
bw.warehouse_name
|
||||
from bas_cargo_space bcs
|
||||
left join bas_warehouse bw on bcs.warehouse_id = bw.warehouse_id
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectBasCargoSpaceList" resultMap="BasCargoSpaceResult">
|
||||
<include refid="selectBasCargoSpaceVo"/>
|
||||
<where>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bcs.cargo_space_id like concat('%', #{cargoSpaceId}, '%')</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and bcs.warehouse_id = #{warehouseId}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoAreaId != null and cargoAreaId != ''"> and bcs.cargo_area_id = #{cargoAreaId}</if>
|
||||
<if test="theType != null and theType != ''"> and bcs.the_type = #{theType}</if>
|
||||
<if test="theTypeName != null and theTypeName != ''"> and bcs.the_type_name like concat('%', #{theTypeName}, '%')</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="thePlatoon != null "> and bcs.the_platoon = #{thePlatoon}</if>
|
||||
<if test="theColumn != null "> and bcs.the_column = #{theColumn}</if>
|
||||
<if test="theFloor != null "> and bcs.the_floor = #{theFloor}</if>
|
||||
<if test="status != null and status != ''"> and bcs.status = #{status}</if>
|
||||
<if test="locked != null and locked != ''"> and bcs.locked = #{locked}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bcs.tray_code like concat('%', #{trayCode}, '%')</if>
|
||||
<if test="cargoHight != null and cargoHight != ''"> and bcs.cargo_hight = #{cargoHight}</if>
|
||||
<if test="issDouble != null and issDouble != ''"> and bcs.iss_double = #{issDouble}</if>
|
||||
<if test="groupCodingNo != null and groupCodingNo != ''"> and bcs.group_coding_no = #{groupCodingNo}</if>
|
||||
<if test="groupCoding != null and groupCoding != ''"> and bcs.group_coding = #{groupCoding}</if>
|
||||
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and bcs.cargo_space_logo = #{cargoSpaceLogo}</if>
|
||||
<if test="thisCargoArea != null and thisCargoArea != ''"> and bcs.this_cargo_area = #{thisCargoArea}</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
</where>
|
||||
order by the_platoon,the_floor,the_column
|
||||
</select>
|
||||
|
||||
<select id="selectBasCargoSpaceByCargoSpaceId" parameterType="String" resultMap="BasCargoSpaceResult">
|
||||
<include refid="selectBasCargoSpaceVo"/>
|
||||
where cargo_space_id = #{cargoSpaceId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasCargoSpace" parameterType="BasCargoSpace">
|
||||
insert into bas_cargo_space
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id,</if>
|
||||
<if test="roadwayId != null">roadway_id,</if>
|
||||
<if test="cargoAreaId != null">cargo_area_id,</if>
|
||||
<if test="theType != null">the_type,</if>
|
||||
<if test="theTypeName != null">the_type_name,</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''">cargo_space_name,</if>
|
||||
<if test="thePlatoon != null">the_platoon,</if>
|
||||
<if test="theColumn != null">the_column,</if>
|
||||
<if test="theFloor != null">the_floor,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="locked != null and locked != ''">locked,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="cargoHight != null">cargo_hight,</if>
|
||||
<if test="issDouble != null">iss_double,</if>
|
||||
<if test="groupCodingNo != null">group_coding_no,</if>
|
||||
<if test="groupCoding != null">group_coding,</if>
|
||||
<if test="cargoSpaceLogo != null">cargo_space_logo,</if>
|
||||
<if test="thisCargoArea != null">this_cargo_area,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">#{warehouseId},</if>
|
||||
<if test="roadwayId != null">#{roadwayId},</if>
|
||||
<if test="cargoAreaId != null">#{cargoAreaId},</if>
|
||||
<if test="theType != null">#{theType},</if>
|
||||
<if test="theTypeName != null">#{theTypeName},</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''">#{cargoSpaceName},</if>
|
||||
<if test="thePlatoon != null">#{thePlatoon},</if>
|
||||
<if test="theColumn != null">#{theColumn},</if>
|
||||
<if test="theFloor != null">#{theFloor},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="locked != null and locked != ''">#{locked},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="cargoHight != null">#{cargoHight},</if>
|
||||
<if test="issDouble != null">#{issDouble},</if>
|
||||
<if test="groupCodingNo != null">#{groupCodingNo},</if>
|
||||
<if test="groupCoding != null">#{groupCoding},</if>
|
||||
<if test="cargoSpaceLogo != null">#{cargoSpaceLogo},</if>
|
||||
<if test="thisCargoArea != null">#{thisCargoArea},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasCargoSpace" parameterType="BasCargoSpace">
|
||||
update bas_cargo_space
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id = #{warehouseId},</if>
|
||||
<if test="roadwayId != null">roadway_id = #{roadwayId},</if>
|
||||
<if test="cargoAreaId != null">cargo_area_id = #{cargoAreaId},</if>
|
||||
<if test="theType != null">the_type = #{theType},</if>
|
||||
<if test="theTypeName != null">the_type_name = #{theTypeName},</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''">cargo_space_name = #{cargoSpaceName},</if>
|
||||
<if test="thePlatoon != null">the_platoon = #{thePlatoon},</if>
|
||||
<if test="theColumn != null">the_column = #{theColumn},</if>
|
||||
<if test="theFloor != null">the_floor = #{theFloor},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="locked != null and locked != ''">locked = #{locked},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="cargoHight != null">cargo_hight = #{cargoHight},</if>
|
||||
<if test="issDouble != null">iss_double = #{issDouble},</if>
|
||||
<if test="groupCodingNo != null">group_coding_no = #{groupCodingNo},</if>
|
||||
<if test="groupCoding != null">group_coding = #{groupCoding},</if>
|
||||
<if test="cargoSpaceLogo != null">cargo_space_logo = #{cargoSpaceLogo},</if>
|
||||
<if test="thisCargoArea != null">this_cargo_area = #{thisCargoArea},</if>
|
||||
</trim>
|
||||
where cargo_space_id = #{cargoSpaceId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasCargoSpaceByCargoSpaceId" parameterType="String">
|
||||
delete from bas_cargo_space where cargo_space_id = #{cargoSpaceId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasCargoSpaceByCargoSpaceIds" parameterType="String">
|
||||
delete from bas_cargo_space where cargo_space_id in
|
||||
<foreach item="cargoSpaceId" collection="array" open="(" separator="," close=")">
|
||||
#{cargoSpaceId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectStatusCount" resultType="java.util.Map">
|
||||
SELECT
|
||||
status,
|
||||
COUNT(*) as count
|
||||
FROM bas_cargo_space
|
||||
GROUP BY status
|
||||
</select>
|
||||
<select id="selectEmptyCargoSpaceByWarehouseId" resultType="com.ruoyi.bas.cargoSpace.domain.BasCargoSpace">
|
||||
SELECT TOP 1 cargo_space_id as cargoSpaceId
|
||||
FROM bas_cargo_space
|
||||
WHERE status = '1'
|
||||
and locked = 'N'
|
||||
<if test="warehouseId != null">
|
||||
and warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="roadwayId != null">
|
||||
and roadway_id = #{roadwayId}
|
||||
</if>
|
||||
ORDER BY the_platoon, the_floor,the_column
|
||||
</select>
|
||||
<select id="selectBasCargoSpaceListByRoadway" parameterType="BasCargoSpace" resultMap="BasCargoSpaceResult">
|
||||
select bcs.cargo_space_id, bcs.warehouse_id, bw.warehouse_name, bcs.roadway_id, bcs.cargo_area_id, bcs.the_type,
|
||||
bcs.the_type_name, bcs.cargo_space_name, bcs.the_platoon, bcs.the_column, bcs.the_floor, bcs.status, bcs.locked,
|
||||
bcs.tray_code, bcs.cargo_hight, bcs.iss_double, bcs.group_coding_no, bcs.group_coding, bcs.cargo_space_logo,
|
||||
bcs.this_cargo_area
|
||||
from bas_cargo_space bcs
|
||||
left join bas_warehouse bw on bw.warehouse_id = bcs.warehouse_id
|
||||
left join bas_roadway br on br.roadway_id = bcs.roadway_id
|
||||
left join bas_stock bs on bs.cargo_space_id = bcs.cargo_space_id
|
||||
left join bas_product bp on bp.product_id = bs.product_id
|
||||
where br.out_locked = 'N'
|
||||
<if test="warehouseId != null and warehouseId != ''"> and bcs.warehouse_id = #{warehouseId}</if>
|
||||
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id = #{roadwayId}</if>
|
||||
<if test="cargoAreaId != null and cargoAreaId != ''"> and bcs.cargo_area_id = #{cargoAreaId}</if>
|
||||
<if test="theType != null and theType != ''"> and bcs.the_type = #{theType}</if>
|
||||
<if test="theTypeName != null and theTypeName != ''"> and bcs.the_type_name like concat('%', #{theTypeName}, '%')</if>
|
||||
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
|
||||
<if test="thePlatoon != null "> and bcs.the_platoon = #{thePlatoon}</if>
|
||||
<if test="theColumn != null "> and bcs.the_column = #{theColumn}</if>
|
||||
<if test="theFloor != null "> and bcs.the_floor = #{theFloor}</if>
|
||||
<if test="status != null and status != ''"> and bcs.status = #{status}</if>
|
||||
<if test="locked != null and locked != ''"> and bcs.locked = #{locked}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and bcs.tray_code like concat('%', #{trayCode}, '%')</if>
|
||||
<if test="cargoHight != null and cargoHight != ''"> and bcs.cargo_hight = #{cargoHight}</if>
|
||||
<if test="issDouble != null and issDouble != ''"> and bcs.iss_double = #{issDouble}</if>
|
||||
<if test="groupCodingNo != null and groupCodingNo != ''"> and bcs.group_coding_no = #{groupCodingNo}</if>
|
||||
<if test="groupCoding != null and groupCoding != ''"> and bcs.group_coding = #{groupCoding}</if>
|
||||
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and bcs.cargo_space_logo = #{cargoSpaceLogo}</if>
|
||||
<if test="spare7 != null and spare7 != ''"> and bs.spare7 = #{spare7}</if>
|
||||
<if test="stockStatus != null and stockStatus != ''"> and bs.stock_status = #{stockStatus}</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,116 @@
|
||||
<?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="com.ruoyi.bas.warehouse.mapper.BasWarehouseMapper">
|
||||
|
||||
<resultMap type="BasWarehouse" id="BasWarehouseResult">
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseNo" column="warehouse_no" />
|
||||
<result property="projectNo" column="project_no" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="address" column="address" />
|
||||
<result property="cDesc" column="c_desc" />
|
||||
<result property="warehouseKind" column="warehouse_kind" />
|
||||
<result property="warehouseType" column="warehouse_type" />
|
||||
<result property="isCurrent" column="is_current" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasWarehouseVo">
|
||||
select warehouse_id, warehouse_no, project_no, warehouse_name, address, c_desc, warehouse_kind, warehouse_type, is_current from bas_warehouse
|
||||
</sql>
|
||||
|
||||
<select id="selectBasWarehouseList" parameterType="BasWarehouse" resultMap="BasWarehouseResult">
|
||||
<include refid="selectBasWarehouseVo"/>
|
||||
<where>
|
||||
<if test="warehouseId != null and warehouseId != ''">and warehouse_id like concat('%',#{warehouseId}, '%')</if>
|
||||
<if test="warehouseNo != null and warehouseNo != ''">and warehouse_no like concat('%',#{warehouseNo}, '%')</if>
|
||||
<if test="projectNo != null and projectNo != ''">and project_no like concat('%',#{projectNo}, '%')</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">and warehouse_name like concat('%',
|
||||
#{warehouseName}, '%')
|
||||
</if>
|
||||
<if test="address != null and address != ''">and address = #{address}</if>
|
||||
<if test="cDesc != null and cDesc != ''">and c_desc = #{cDesc}</if>
|
||||
<if test="warehouseKind != null and warehouseKind != ''">and warehouse_kind = #{warehouseKind}</if>
|
||||
<if test="warehouseType != null and warehouseType != ''">and warehouse_type = #{warehouseType}</if>
|
||||
<if test="isCurrent != null and isCurrent != ''">and is_current = #{isCurrent}</if>
|
||||
<if test="dataScope !=null and dataScope.size()>0">
|
||||
and warehouse_id in
|
||||
<foreach item="item" index="index" collection="dataScope" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="typeData != null and typeData.size()>0">
|
||||
and warehouse_type in
|
||||
<foreach item="item" index="index" collection="typeData" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
|
||||
${params.warehouseDataScope}
|
||||
</if>
|
||||
<if test="updateId != null and updateId != ''">
|
||||
and warehouse_id != #{updateId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasWarehouseByWarehouseId" parameterType="String" resultMap="BasWarehouseResult">
|
||||
<include refid="selectBasWarehouseVo"/>
|
||||
where warehouse_id = #{warehouseId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasWarehouse" parameterType="BasWarehouse">
|
||||
insert into bas_warehouse
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null and warehouseId != ''">warehouse_id,</if>
|
||||
<if test="warehouseNo != null and warehouseNo != ''">warehouse_no,</if>
|
||||
<if test="projectNo != null">project_no,</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="cDesc != null">c_desc,</if>
|
||||
<if test="warehouseKind != null">warehouse_kind,</if>
|
||||
<if test="warehouseType != null">warehouse_type,</if>
|
||||
<if test="isCurrent != null and isCurrent != ''">is_current,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null and warehouseId != ''">#{warehouseId},</if>
|
||||
<if test="warehouseNo != null and warehouseNo != ''">#{warehouseNo},</if>
|
||||
<if test="projectNo != null">#{projectNo},</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">#{warehouseName},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="cDesc != null">#{cDesc},</if>
|
||||
<if test="warehouseKind != null">#{warehouseKind},</if>
|
||||
<if test="warehouseType != null">#{warehouseType},</if>
|
||||
<if test="isCurrent != null and isCurrent != ''">#{isCurrent},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasWarehouse" parameterType="BasWarehouse">
|
||||
update bas_warehouse
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="warehouseNo != null and warehouseNo != ''">warehouse_no = #{warehouseNo},</if>
|
||||
<if test="projectNo != null">project_no = #{projectNo},</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">warehouse_name = #{warehouseName},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="cDesc != null">c_desc = #{cDesc},</if>
|
||||
<if test="warehouseKind != null">warehouse_kind = #{warehouseKind},</if>
|
||||
<if test="warehouseType != null">warehouse_type = #{warehouseType},</if>
|
||||
<if test="isCurrent != null and isCurrent != ''">is_current = #{isCurrent},</if>
|
||||
</trim>
|
||||
where warehouse_id = #{warehouseId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasWarehouseByWarehouseId" parameterType="String">
|
||||
delete from bas_warehouse where warehouse_id = #{warehouseId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasWarehouseByWarehouseIds" parameterType="String">
|
||||
delete from bas_warehouse where warehouse_id in
|
||||
<foreach item="warehouseId" collection="array" open="(" separator="," close=")">
|
||||
#{warehouseId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user