项目初始化

This commit is contained in:
liuhanqing
2025-09-11 11:19:00 +08:00
parent 13df9e0355
commit d53f41223b
1194 changed files with 245831 additions and 34 deletions

View File

@@ -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>

View 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>

View File

@@ -0,0 +1,152 @@
<?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 like concat('%', #{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>
</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>

View 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>

View File

@@ -0,0 +1,156 @@
<?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="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, spare7, spare8, spare9 from bas_product
</sql>
<select id="selectBasProductList" parameterType="BasProduct" resultMap="BasProductResult">
<include refid="selectBasProductVo"/>
<where>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{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="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</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="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="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
</where>
</select>
<select id="selectBasProductByProductGuid" parameterType="String" resultMap="BasProductResult">
<include refid="selectBasProductVo"/>
where product_guid = #{productGuid}
</select>
<select id="selectBasProductListByProductGuids" resultMap="BasProductResult">
<include refid="selectBasProductVo"/>
where product_guid in
<foreach collection="productGuids" item="productGuid" open="(" separator="," close=")">
#{productGuid}
</foreach>
</select>
<select id="selectBasProductByProductId" resultType="com.ruoyi.bas.BasProduct.domain.BasProduct">
<include refid="selectBasProductVo"/>
where product_id = #{productId}
</select>
<select id="selectBasProductListByProductIds" resultType="com.ruoyi.bas.BasProduct.domain.BasProduct">
<include refid="selectBasProductVo"/>
where product_id in
<foreach collection="productIds" item="productId" open="(" separator="," close=")">
#{productId}
</foreach>
</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 and parentId != ''">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="spare7 != null">spare7,</if>
<if test="spare8 != null">spare8,</if>
<if test="spare9 != null">spare9,</if>
<if test="productName != null and productName != ''">product_name,</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 and parentId != ''">#{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="spare7 != null">#{spare7},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="spare9 != null">#{spare9},</if>
<if test="productName != null and productName != ''">#{productName},</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 and parentId != ''">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="spare7 != null">spare7 = #{spare7},</if>
<if test="spare8 != null">spare8 = #{spare8},</if>
<if test="spare9 != null">spare9 = #{spare9},</if>
<if test="productName != null and productName != ''">product_name = #{productName},</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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -0,0 +1,142 @@
<?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 like concat('%', #{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>
</where>
</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>

View 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>

View File

@@ -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>

View File

@@ -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>

View 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.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>
</mapper>

View File

@@ -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>

View File

@@ -0,0 +1,188 @@
<?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 warehouse_id = #{warehouseId}
AND status = '1'
ORDER BY the_platoon, the_column, the_floor
</select>
</mapper>

View File

@@ -0,0 +1,113 @@
<?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>
</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>