From a080d67b9964cd632f52c481c0f20ef2e3e7073a Mon Sep 17 00:00:00 2001
From: sfd <sun.sunshine@163.com>
Date: 星期五, 09 五月 2025 10:19:07 +0800
Subject: [PATCH] 放开权限
---
aps-modules/aps-core/src/main/resources/mapper/core/ApsPartPlanMapper.xml | 103 +++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 99 insertions(+), 4 deletions(-)
diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPartPlanMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPartPlanMapper.xml
index 3fa4b0e..4db91eb 100644
--- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPartPlanMapper.xml
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPartPlanMapper.xml
@@ -40,10 +40,27 @@
<result property="isStockComplete" column="is_stock_complete" />
<result property="hasTurnback" column="has_turnback" />
<result property="hasRisk" column="has_risk" />
+ <result property="stdOp" column="std_op" />
+ <result property="opStatus" column="op_status" />
+ <result property="nextOpName" column="next_op_name" />
+ <result property="plant" column="plant" />
+ <result property="unmatchedQuantity" column="unmatched_quantity" />
+ <result property="professionalAffiliation" column="professional_affiliation" />
+ <result property="requireId" column="require_id" />
+ <result property="version" column="version" />
+
</resultMap>
<sql id="selectApsPartPlanVo">
- select id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer, business_type, document_number, requirement_type, document_status, item_number, drawing_no, version_number, production_quantity, good_products_quantity, process_number, work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, has_turnback, has_risk from aps_part_plan
+ select id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number,
+ customer, business_type, document_number, requirement_type, document_status, item_number,
+ drawing_no, version_number, production_quantity, good_products_quantity, process_number,
+ work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock,
+ next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials,
+ advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete,
+ has_turnback, has_risk, std_op, op_status, next_op_name ,
+ plant, unmatched_quantity, professional_affiliation, require_id, version, unmatchedQuantity
+ from aps_part_plan
</sql>
<select id="selectApsPartPlanList" parameterType="com.aps.core.domain.ApsPartPlan" resultMap="ApsPartPlanResult">
@@ -54,10 +71,9 @@
<if test="weekCycle != null and weekCycle != ''"> and week_cycle = #{weekCycle}</if>
<if test="mainPartNumber != null and mainPartNumber != ''"> and main_part_number = #{mainPartNumber}</if>
<if test="mainPartDrawingNumber != null and mainPartDrawingNumber != ''"> and main_part_drawing_number = #{mainPartDrawingNumber}</if>
- <if test="customer != null and customer != ''"> and customer like concat('%', #{customer}, '%')</if>
+ <if test="customer != null and customer != ''"> and customer like '%' || #{customer} || '%' </if>
<if test="businessType != null and businessType != ''"> and business_type = #{businessType}</if>
- <if test="documentNumber != null and documentNumber != ''"> and document_number = #{documentNumber}</if>
- <if test="requirementType != null and requirementType != ''"> and requirement_type = #{requirementType}</if>
+ <if test="documentNumber != null and documentNumber != ''"> and document_number like '%' || #{documentNumber} || '%'</if> <if test="requirementType != null and requirementType != ''"> and requirement_type = #{requirementType}</if>
<if test="documentStatus != null and documentStatus != ''"> and document_status = #{documentStatus}</if>
<if test="itemNumber != null and itemNumber != ''"> and item_number = #{itemNumber}</if>
<if test="drawingNo != null and drawingNo != ''"> and drawing_no = #{drawingNo}</if>
@@ -83,6 +99,10 @@
<if test="isStockComplete != null "> and is_stock_complete = #{isStockComplete}</if>
<if test="hasTurnback != null "> and has_turnback = #{hasTurnback}</if>
<if test="hasRisk != null "> and has_risk = #{hasRisk}</if>
+ <if test="stdOp != null "> and std_op = #{stdOp}</if>
+ <if test="opStatus != null and opStatus != ''"> and op_status = #{opStatus}</if>
+ <if test="nextOpName != null and nextOpName != ''"> and next_op_name = #{nextOpName}</if>
+ and del_flag='0'
</where>
</select>
@@ -129,6 +149,9 @@
<if test="isStockComplete != null">is_stock_complete,</if>
<if test="hasTurnback != null">has_turnback,</if>
<if test="hasRisk != null">has_risk,</if>
+ <if test="stdOp != null">std_op,</if>
+ <if test="opStatus != null">op_status,</if>
+ <if test="nextOpName != null">next_op_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
@@ -166,6 +189,9 @@
<if test="isStockComplete != null">#{isStockComplete},</if>
<if test="hasTurnback != null">#{hasTurnback},</if>
<if test="hasRisk != null">#{hasRisk},</if>
+ <if test="stdOp != null">#{stdOp},</if>
+ <if test="opStatus != null">#{opStatus},</if>
+ <if test="nextOpName != null">#{nextOpName},</if>
</trim>
</insert>
@@ -206,6 +232,9 @@
<if test="isStockComplete != null">is_stock_complete = #{isStockComplete},</if>
<if test="hasTurnback != null">has_turnback = #{hasTurnback},</if>
<if test="hasRisk != null">has_risk = #{hasRisk},</if>
+ <if test="stdOp != null">std_op = #{stdOp},</if>
+ <if test="opStatus != null"> op_status= #{opStatus},</if>
+ <if test="nextOpName != null"> next_op_name= #{nextOpName},</if>
</trim>
where id = #{id}
</update>
@@ -220,4 +249,70 @@
#{id}
</foreach>
</delete>
+ <insert id="insertBatch" parameterType="java.util.List">
+ insert into aps_part_plan (
+ id,
+ master_planner,
+ week_day,
+ week_cycle,
+ main_part_number,
+ main_part_drawing_number,
+ customer,
+ business_type,
+ document_number,
+ requirement_type,
+ document_status,
+ item_number,
+ drawing_no,
+ version_number,
+ production_quantity,
+ good_products_quantity,
+ process_number,
+ work_center,
+ department,
+ plan_start_day,
+ plan_end_day,
+ standby_number,
+ standby_name,
+ standby_stock,
+ next_process_deparment,
+ is_suspended,
+ is_outsourcing,
+ account,
+ advanced_materials,
+ advanced_document_number,
+ advanced_requirement_day,
+ is_plan_complete,
+ is_stock_complete,
+ has_turnback,
+ has_risk,
+ plant,
+ std_op,
+ op_status,
+ next_op_name
+ ) values
+ <foreach item="item" index="index" collection="list" separator=",">
+ (#{item.id},#{item.masterPlanner},#{item.weekDay},#{item.weekCycle}
+ ,#{item.mainPartNumber},#{item.mainPartDrawingNumber},#{item.customer}
+ ,#{item.businessType},#{item.documentNumber},#{item.requirementType}
+ ,#{item.documentStatus},#{item.itemNumber},#{item.drawingNo},#{item.versionNumber}
+ ,#{item.productionQuantity},#{item.goodProductsQuantity},#{item.processNumber}
+ ,#{item.workCenter},#{item.department},#{item.planStartDay},#{item.planEndDay}
+ ,#{item.standbyNumber},#{item.standbyName},#{item.standbyStock},#{item.nextProcessDeparment}
+ ,#{item.isSuspended},#{item.isOutsourcing},#{item.account},#{item.advancedMaterials}
+ ,#{item.advancedDocumentNumber},#{item.advancedRequirementDay},#{item.isPlanComplete}
+ ,#{item.isStockComplete},#{item.hasTurnback},#{item.hasRisk},#{item.plant},#{item.stdOp},#{item.opStatus},#{item.nextOpName})
+ </foreach>
+ </insert>
+
+ <update id="selectPartPlanListByDocumentNumbers" parameterType="String" >
+ select id from aps_part_plan where documentNumber in
+ <foreach item="id" collection="array" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </update>
+
+ <update id="removeAllPartPlans" parameterType="String">
+ update aps_part_plan set del_flag='1' where del_flag ='0'
+ </update>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3