@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace= "com.ruoyi.erp.mapper.ErpInboundOrderMapper" >
<resultMap type= "ErpInboundOrder" id= "ErpInboundOrderResult" >
<result property= "id" column= "id" />
<result property= "delFlag" column= "del_flag" />
@ -12,35 +12,77 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property= "updateBy" column= "update_by" />
<result property= "updateTime" column= "update_time" />
<result property= "remark" column= "remark" />
<result property= "qualityOrderCode" column= "quality_order_code" />
<result property= "makeNo" column= "make_no" />
<result property= "qualityStatus" column= "quality_status" />
<result property= "saleNo" column= "sale_no" />
<result property= "inboundOrderNo" column= "inbound_order_no" />
<result property= "inboundStatus" column= "inbound_status" />
<result property= "inboundType" column= "inbound_type" />
<result property= "inboundNum" column= "inbound_num" />
<result property= "engineerName" column= "engineer_name" />
<result property= "orderType" column= "order_type" />
<result property= "customerId" column= "customer_id" />
<result property= "customerName" column= "customer_name" />
<result property= "salesOrderNumber" column= "sales_order_number" />
<result property= "materialTotal" column= "material_total" />
<result property= "numTotal" column= "num_total" />
<result property= "qualityQualifiedNum" column= "quality_qualified_num" />
<result property= "qualityUnqualifiedNum" column= "quality_unqualified_num" />
<result property= "storageNum" column= "storage_num" />
<result property= "processingFeeTotal" column= "processing_fee_total" />
</resultMap>
<sql id= "selectErpInboundOrderVo" >
select a.id, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.make_no, a.sale_no, a.inbound_order_no, a.inbound_status, a.inbound_type, a.inbound_num from erp_inbound_order a
select
a.id,
a.del_flag,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.remark,
a.quality_order_code,
a.make_no,
a.quality_status,
a.sale_no,
a.inbound_order_no,
a.inbound_status,
a.inbound_type,
a.inbound_num,
a.engineer_name,
a.order_type,
a.customer_id,
a.customer_name,
a.sales_order_number,
a.material_total,
a.num_total,
a.quality_qualified_num,
a.quality_unqualified_num,
a.storage_num,
a.processing_fee_total
from erp_inbound_order a
</sql>
<select id= "selectErpInboundOrderList" parameterType= "ErpInboundOrder" resultMap= "ErpInboundOrderResult" >
<include refid= "selectErpInboundOrderVo" />
<where >
<where >
<if test= "makeNo != null and makeNo != ''" > and a.make_no = #{makeNo}</if>
<if test= "saleNo != null and saleNo != ''" > and a.sale_no = #{saleNo}</if>
<if test= "inboundOrderNo != null and inboundOrderNo != ''" > and a.inbound_order_no = #{inboundOrderNo}</if>
<if test= "inboundStatus != null and inboundStatus != ''" > and a.inbound_status = #{inboundStatus}</if>
<if test= "inboundType != null and inboundType != ''" > and a.inbound_type = #{inboundType}</if>
<if test= "inboundNum != null " > and a.inbound_num = #{inboundNum}</if>
<if test= "params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''" > and a.create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>
<select id= "selectErpInboundOrderById" parameterType= "Long" resultMap= "ErpInboundOrderResult" >
<include refid= "selectErpInboundOrderVo" />
where a.id = #{id}
</select>
<insert id= "insertErpInboundOrder" parameterType= "ErpInboundOrder" useGeneratedKeys= "true" keyProperty= "id" >
insert into erp_inbound_order
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
@ -51,12 +93,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "updateTime != null" > update_time,</if>
<if test= "remark != null" > remark,</if>
<if test= "makeNo != null" > make_no,</if>
<if test= "qualityOrderCode != null" > quality_order_code,</if>
<if test= "qualityStatus != null" > quality_status,</if>
<if test= "saleNo != null" > sale_no,</if>
<if test= "inboundOrderNo != null" > inbound_order_no,</if>
<if test= "inboundStatus != null" > inbound_status,</if>
<if test= "inboundType != null" > inbound_type,</if>
<if test= "inboundNum != null" > inbound_num,</if>
</trim>
<if test= "engineerName != null" > engineer_name,</if>
<if test= "orderType != null" > order_type,</if>
<if test= "customerId != null" > customer_id,</if>
<if test= "customerName != null" > customer_name,</if>
<if test= "salesOrderNumber != null" > sales_order_number,</if>
<if test= "materialTotal != null" > material_total,</if>
<if test= "numTotal != null" > num_total,</if>
<if test= "qualityQualifiedNum != null" > quality_qualified_num,</if>
<if test= "qualityUnqualifiedNum != null" > quality_unqualified_num,</if>
<if test= "storageNum != null" > storage_num,</if>
<if test= "processingFeeTotal != null" > processing_fee_total,</if>
</trim>
<trim prefix= "values (" suffix= ")" suffixOverrides= "," >
<if test= "delFlag != null" > #{delFlag},</if>
<if test= "createBy != null" > #{createBy},</if>
@ -65,12 +120,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "updateTime != null" > #{updateTime},</if>
<if test= "remark != null" > #{remark},</if>
<if test= "makeNo != null" > #{makeNo},</if>
<if test= "qualityOrderCode != null" > #{qualityOrderCode},</if>
<if test= "qualityStatus != null" > #{qualityStatus},</if>
<if test= "saleNo != null" > #{saleNo},</if>
<if test= "inboundOrderNo != null" > #{inboundOrderNo},</if>
<if test= "inboundStatus != null" > #{inboundStatus},</if>
<if test= "inboundType != null" > #{inboundType},</if>
<if test= "inboundNum != null" > #{inboundNum},</if>
</trim>
<if test= "engineerName != null" > #{engineerName},</if>
<if test= "orderType != null" > #{orderType},</if>
<if test= "customerId != null" > #{customerId},</if>
<if test= "customerName != null" > #{customerName},</if>
<if test= "salesOrderNumber != null" > #{salesOrderNumber},</if>
<if test= "materialTotal != null" > #{materialTotal},</if>
<if test= "numTotal != null" > #{numTotal},</if>
<if test= "qualityQualifiedNum != null" > #{qualityQualifiedNum},</if>
<if test= "qualityUnqualifiedNum != null" > #{qualityUnqualifiedNum},</if>
<if test= "storageNum != null" > #{storageNum},</if>
<if test= "processingFeeTotal != null" > #{processingFeeTotal},</if>
</trim>
</insert>
<update id= "updateErpInboundOrder" parameterType= "ErpInboundOrder" >
@ -83,11 +151,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "updateTime != null" > update_time = #{updateTime},</if>
<if test= "remark != null" > remark = #{remark},</if>
<if test= "makeNo != null" > make_no = #{makeNo},</if>
<if test= "qualityOrderCode != null" > quality_order_code = #{qualityOrderCode},</if>
<if test= "qualityStatus != null" > quality_status = #{qualityStatus},</if>
<if test= "saleNo != null" > sale_no = #{saleNo},</if>
<if test= "inboundOrderNo != null" > inbound_order_no = #{inboundOrderNo},</if>
<if test= "inboundStatus != null" > inbound_status = #{inboundStatus},</if>
<if test= "inboundType != null" > inbound_type = #{inboundType},</if>
<if test= "inboundNum != null" > inbound_num = #{inboundNum},</if>
<if test= "engineerName != null" > engineer_name = #{engineerName},</if>
<if test= "orderType != null" > order_type = #{orderType},</if>
<if test= "customerId != null" > customer_id = #{customerId},</if>
<if test= "customerName != null" > customer_name = #{customerName},</if>
<if test= "salesOrderNumber != null" > sales_order_number = #{salesOrderNumber},</if>
<if test= "materialTotal != null" > material_total = #{materialTotal},</if>
<if test= "numTotal != null" > num_total = #{numTotal},</if>
<if test= "qualityQualifiedNum != null" > quality_qualified_num = #{qualityQualifiedNum},</if>
<if test= "qualityUnqualifiedNum != null" > quality_unqualified_num = #{qualityUnqualifiedNum},</if>
<if test= "storageNum != null" > storage_num = #{storageNum},</if>
<if test= "processingFeeTotal != null" > processing_fee_total = #{processingFeeTotal},</if>
</trim>
where id = #{id}
</update>
@ -97,7 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id= "deleteErpInboundOrderByIds" parameterType= "String" >
delete from erp_inbound_order where id in
delete from erp_inbound_order where id in
<foreach item= "id" collection= "array" open= "(" separator= "," close= ")" >
#{id}
</foreach>
@ -111,4 +192,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update erp_inbound_order set del_flag = '0' where id = #{id}
</update>
</mapper>
</mapper>