| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.aps.core.mapper.ApsWeldSeamMapper"> |
| | | |
| | | <resultMap type="ApsWeldSeam" id="ApsWeldSeamResult"> |
| | | <resultMap type="com.aps.core.domain.ApsWeldSeam" id="ApsWeldSeamResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="workOrderType" column="work_order_type" /> |
| | | <result property="materialCode" column="material_code" /> |
| | |
| | | select id, work_order_type, material_code, customer_drawing_number, organize_number, production_base, classification, produce_year, produce_month, production_quantity, customer, single_weld_seam, total_weld_seam, this_feedback_day, materials_requirement_day, sale_order_no, sale_order_line, main_work_order_no, superior_work_order_no, work_order_no, plant from aps_weld_seam |
| | | </sql> |
| | | |
| | | <select id="selectApsWeldSeamList" parameterType="ApsWeldSeam" resultMap="ApsWeldSeamResult"> |
| | | <select id="selectApsWeldSeamList" parameterType="com.aps.core.domain.ApsWeldSeam" resultMap="ApsWeldSeamResult"> |
| | | <include refid="selectApsWeldSeamVo"/> |
| | | <where> |
| | | <if test="workOrderType != null and workOrderType != ''"> and work_order_type = #{workOrderType}</if> |
| | |
| | | <include refid="selectApsWeldSeamVo"/> |
| | | where work_order_no = #{workOrderNo} |
| | | </select> |
| | | <insert id="insertApsWeldSeam" parameterType="ApsWeldSeam"> |
| | | <insert id="insertApsWeldSeam" parameterType="com.aps.core.domain.ApsWeldSeam"> |
| | | insert into aps_weld_seam |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateApsWeldSeam" parameterType="ApsWeldSeam"> |
| | | <update id="updateApsWeldSeam" parameterType="com.aps.core.domain.ApsWeldSeam"> |
| | | update aps_weld_seam |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="workOrderType != null">work_order_type = #{workOrderType},</if> |
| | |
| | | work_order_type as workOrderType, |
| | | classification, |
| | | sum(total_weld_seam) as total |
| | | FROM aps_weld_seam |
| | | FROM aps_weld_seam where del_flag='0' |
| | | GROUP BY produce_year, produce_month, production_base, work_order_type, classification |
| | | </select> |
| | | <update id="removeLastBatch" parameterType="String"> |
| | | update aps_weld_seam set del_flag='1' where del_flag='0' |
| | | </update> |
| | | |
| | | <select id="weldSeamEcharts" parameterType="java.util.List" resultType="map"> |
| | | |
| | |
| | | LEFT JOIN sys_dict_data classification ON seam.classification = classification.dict_value |
| | | AND classification.dict_type = 'aps_weld_classification' |
| | | <where> |
| | | <if test="produceYears != null "> and produce_year in |
| | | <foreach item="produceYear" collection="produceYears" open="(" separator="," close=")"> |
| | | #{produceYear} |
| | | </foreach> |
| | | </if> |
| | | <if test="produceMonths != null "> and produce_month in |
| | | <foreach item="produceMonth" collection="produceMonths" open="(" separator="," close=")"> |
| | | #{produceMonth} |
| | | </foreach> |
| | | </if> |
| | | seam.del_flag = '0' |
| | | <foreach item="item" index="index" collection="list" separator=" OR " open="and (" close=") "> |
| | | produce_year = #{item.produceYear} and produce_month = #{item.produceMonth} |
| | | </foreach> |
| | | </where> |
| | | GROUP BY |
| | | seam.produce_year, |