From f1e6aadf01a2ac32bc1707ca43fc6a2d2587b9ac Mon Sep 17 00:00:00 2001
From: liuxm <liuxm@fescotech.com>
Date: 星期四, 16 五月 2024 15:07:14 +0800
Subject: [PATCH] 添加 产品,质检项目,不合格原因,报废原因的 禁用启用方法;id序列化

---
 pms-parent/pms-global/src/main/resources/mapper/PltProductQualityInspectionItemsMapper.xml              |   45 ++-----
 pms-parent/pms-global/src/main/resources/mapper/PltProductScrappingReasonMapper.xml                     |   60 +++------
 pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURSv.java                         |    8 +
 pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductionLine.java                     |    3 
 pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductQualityInspectionItems.java      |    7 +
 pms-parent/pms-global/src/main/resources/mapper/PltStationMapper.xml                                    |   15 +-
 pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsSv.java                   |    9 +
 pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRCtrl.java                       |   19 +++
 pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRSv.java                         |    8 +
 pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURCtrl.java                       |   19 +++
 pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductQualityInspectionItemsMapper.java |    7 -
 pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltStation.java                            |    7 +
 pms-parent/pms-global/src/main/resources/mapper/PltProductUnqualifiedReasonMapper.xml                   |   69 ++---------
 pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java                 |   19 +++
 pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltMaterial.java                           |    2 
 pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductUnqualifiedReasonMapper.java      |    7 -
 pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductScrappingReasonMapper.java        |    5 
 pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductScrappingReason.java             |   19 +--
 pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductUnqualifiedReason.java           |   18 +-
 19 files changed, 170 insertions(+), 176 deletions(-)

diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductQualityInspectionItemsMapper.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductQualityInspectionItemsMapper.java
index 443b9ab..0b87346 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductQualityInspectionItemsMapper.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductQualityInspectionItemsMapper.java
@@ -14,18 +14,11 @@
 */
 @Mapper
 public interface PltProductQualityInspectionItemsMapper {
-
-    int deleteByPrimaryKey(Long id);
-
-    int insert(PltProductQualityInspectionItems record);
-
     int insertSelective(PltProductQualityInspectionItems record);
 
     PltProductQualityInspectionItems selectByPrimaryKey(Long id);
 
     int updateByPrimaryKeySelective(PltProductQualityInspectionItems record);
-
-    int updateByPrimaryKey(PltProductQualityInspectionItems record);
 
     Long selectSomeCount(Map<String,Object> params);
 
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductScrappingReasonMapper.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductScrappingReasonMapper.java
index d7223c6..73f6beb 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductScrappingReasonMapper.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductScrappingReasonMapper.java
@@ -15,17 +15,12 @@
 @Mapper
 public interface PltProductScrappingReasonMapper {
 
-    int deleteByPrimaryKey(Long id);
-
-    int insert(PltProductScrappingReason record);
-
     int insertSelective(PltProductScrappingReason record);
 
     PltProductScrappingReason selectByPrimaryKey(Long id);
 
     int updateByPrimaryKeySelective(PltProductScrappingReason record);
 
-    int updateByPrimaryKey(PltProductScrappingReason record);
 
     Long selectSomeCount(Map<String,Object> params);
 
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductUnqualifiedReasonMapper.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductUnqualifiedReasonMapper.java
index dcab343..2fbf311 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductUnqualifiedReasonMapper.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductUnqualifiedReasonMapper.java
@@ -15,22 +15,15 @@
 @Mapper
 public interface PltProductUnqualifiedReasonMapper {
 
-    int deleteByPrimaryKey(Long id);
-
-    int insert(PltProductUnqualifiedReason record);
-
     int insertSelective(PltProductUnqualifiedReason record);
 
     PltProductUnqualifiedReason selectByPrimaryKey(Long id);
 
     int updateByPrimaryKeySelective(PltProductUnqualifiedReason record);
 
-    int updateByPrimaryKey(PltProductUnqualifiedReason record);
-
     Long selectSomeCount(Map<String,Object> params);
 
     List<PltProductUnqualifiedReason> selectSome(Map<String,Object> params);
 
     int deleteLogicById(Long id);
-
 }
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltMaterial.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltMaterial.java
index 636152c..ad2f9cd 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltMaterial.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltMaterial.java
@@ -1,6 +1,7 @@
 package com.dy.pmsGlobal.pojoPlt;
 
 import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
@@ -18,6 +19,7 @@
     /**
      * 缂栧彿
      */
+    @JSONField(serializeUsing= ObjectWriterImplToString.class)
     @TableId(type = IdType.AUTO)
     public Integer id;
 
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductQualityInspectionItems.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductQualityInspectionItems.java
index e56d55c..49d7f3c 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductQualityInspectionItems.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductQualityInspectionItems.java
@@ -1,6 +1,7 @@
 package com.dy.pmsGlobal.pojoPlt;
 
 import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -25,6 +26,7 @@
     /**
      * 
      */
+    @JSONField(serializeUsing= ObjectWriterImplToString.class)
     @TableId(type = IdType.AUTO)
     public Long id;
 
@@ -42,7 +44,10 @@
      */
     @NotEmpty(message = "鍝佹椤圭洰涓嶈兘涓虹┖")
     public String item;
-
+    /**
+     * 鏄惁绂佺敤锛�1鏄紝0鍚�
+     */
+    public Boolean disabled;
     /**
      * 鏄惁鍒犻櫎锛�1鏄紝0鍚�
      */
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductScrappingReason.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductScrappingReason.java
index 6e11118..6e2346d 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductScrappingReason.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductScrappingReason.java
@@ -1,5 +1,7 @@
 package com.dy.pmsGlobal.pojoPlt;
 
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -22,20 +24,9 @@
     /**
      * 
      */
+    @JSONField(serializeUsing= ObjectWriterImplToString.class)
     @TableId(type = IdType.AUTO)
     public Long id;
-
-    /**
-     * 浜у搧瀹炰綋缂栧彿
-     */
-//    @NotNull(message = "浜у搧瀹炰綋缂栧彿涓嶈兘涓虹┖")
-    public Long proId;
-
-    /**
-     * 浜у搧鍚嶇О
-     */
-    @TableField(exist = false)
-    public String proName;
 
     /**
      * 鎶ュ簾鍘熷洜
@@ -44,6 +35,10 @@
     public String reason;
 
     /**
+     * 鏄惁绂佺敤锛�1鏄紝0鍚�
+     */
+    public Boolean disabled;
+    /**
      * 鏄惁鍒犻櫎锛�1鏄紝0鍚�
      */
     public Boolean deleted;
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductUnqualifiedReason.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductUnqualifiedReason.java
index b6bd429..aa5e07d 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductUnqualifiedReason.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductUnqualifiedReason.java
@@ -1,5 +1,7 @@
 package com.dy.pmsGlobal.pojoPlt;
 
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -22,19 +24,9 @@
     /**
      * 
      */
+    @JSONField(serializeUsing= ObjectWriterImplToString.class)
     @TableId(type = IdType.AUTO)
     public Long id;
-
-    /**
-     * 浜у搧瀹炰綋缂栧彿
-     */
-//    @NotNull(message = "浜у搧瀹炰綋缂栧彿涓嶈兘涓虹┖")
-    public Long proId;
-    /**
-     * 浜у搧鍚嶇О
-     */
-    @TableField(exist = false)
-    public String proName;
 
     /**
      * 涓嶅悎鏍煎師鍥�
@@ -43,6 +35,10 @@
     public String reason;
 
     /**
+     * 鏄惁绂佺敤锛�1鏄紝0鍚�
+     */
+    public Boolean disabled;
+    /**
      * 鏄惁鍒犻櫎锛�1鏄紝0鍚�
      */
     public Boolean deleted;
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductionLine.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductionLine.java
index 38e7db4..f54d0c8 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductionLine.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductionLine.java
@@ -1,5 +1,7 @@
 package com.dy.pmsGlobal.pojoPlt;
 
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
@@ -24,6 +26,7 @@
     /**
      * 
      */
+    @JSONField(serializeUsing= ObjectWriterImplToString.class)
     @TableId(type = IdType.AUTO)
     public Long id;
 
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltStation.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltStation.java
index 781f504..b4bc548 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltStation.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltStation.java
@@ -1,5 +1,7 @@
 package com.dy.pmsGlobal.pojoPlt;
 
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
 import com.baomidou.mybatisplus.annotation.*;
 import com.dy.common.po.BaseEntity;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -23,6 +25,7 @@
     /**
      * 
      */
+    @JSONField(serializeUsing= ObjectWriterImplToString.class)
     @TableId(type = IdType.AUTO)
     public Long id;
 
@@ -52,6 +55,10 @@
     public Date dt;
 
     /**
+     * 鏄惁绂佺敤锛�1鏄紝0鍚�
+     */
+    public Boolean disabled;
+    /**
      * 鏄惁鍒犻櫎锛�1鏄紝0鍚�
      */
     public Boolean deleted;
diff --git a/pms-parent/pms-global/src/main/resources/mapper/PltProductQualityInspectionItemsMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/PltProductQualityInspectionItemsMapper.xml
index 5f127d2..85197a9 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PltProductQualityInspectionItemsMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PltProductQualityInspectionItemsMapper.xml
@@ -8,19 +8,21 @@
         <id property="id" column="id" jdbcType="BIGINT"/>
         <result property="proId" column="pro_id" jdbcType="BIGINT"/>
         <result property="item" column="item" jdbcType="VARCHAR"/>
-        <result property="deleted" column="deleted" jdbcType="TINYINT"/>
+        <result column="disabled" property="disabled" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
+        <result property="deleted" column="deleted" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
         <association property="proName" column="pro_id" javaType="java.lang.Long"
                      select="selectProNameById" fetchType="eager" />
     </resultMap>
 
     <sql id="Base_Column_List">
-        id,pro_id,item,
+        id,pro_id,item,disabled,
         deleted
     </sql>
     <sql id="part_Column_List">
         ${alias}.id,
         ${alias}.pro_id,
         ${alias}.item,
+        ${alias}.disabled,
         ${alias}.deleted
     </sql>
     <select id="selectProNameById" parameterType="java.lang.Long" resultType="java.lang.String">
@@ -33,53 +35,36 @@
         where  id = #{id,jdbcType=BIGINT} 
     </select>
 
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
-        delete from plt_product_quality_inspection_items
-        where  id = #{id,jdbcType=BIGINT} 
-    </delete>
-    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductQualityInspectionItems" useGeneratedKeys="true">
-        insert into plt_product_quality_inspection_items
-        ( id,pro_id,item
-        ,deleted)
-        values (#{id,jdbcType=BIGINT},#{proId,jdbcType=BIGINT},#{item,jdbcType=VARCHAR}
-        ,#{deleted,jdbcType=TINYINT})
-    </insert>
     <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductQualityInspectionItems" useGeneratedKeys="true">
         insert into plt_product_quality_inspection_items
         <trim prefix="(" suffix=")" suffixOverrides=",">
                 <if test="id != null">id,</if>
                 <if test="proId != null">pro_id,</if>
                 <if test="item != null">item,</if>
+                <if test="disabled != null">disabled,</if>
                 <if test="deleted != null">deleted,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
                 <if test="id != null">#{id,jdbcType=BIGINT},</if>
                 <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
                 <if test="item != null">#{item,jdbcType=VARCHAR},</if>
+                <if test="disabled != null">#{disabled,jdbcType=TINYINT},</if>
                 <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
         </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductQualityInspectionItems">
         update plt_product_quality_inspection_items
         <set>
-                <if test="proId != null">
-                    pro_id = #{proId,jdbcType=BIGINT},
-                </if>
-                <if test="item != null">
-                    item = #{item,jdbcType=VARCHAR},
-                </if>
-                <if test="deleted != null">
-                    deleted = #{deleted,jdbcType=TINYINT},
-                </if>
+            <if test="proId != null">
+                pro_id = #{proId,jdbcType=BIGINT},
+            </if>
+            <if test="disabled != null">
+                disabled = #{disabled,jdbcType=BIGINT},
+            </if>
+            <if test="item != null">
+                item = #{item,jdbcType=VARCHAR},
+            </if>
         </set>
-        where   id = #{id,jdbcType=BIGINT} 
-    </update>
-    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductQualityInspectionItems">
-        update plt_product_quality_inspection_items
-        set 
-            pro_id =  #{proId,jdbcType=BIGINT},
-            item =  #{item,jdbcType=VARCHAR},
-            deleted =  #{deleted,jdbcType=TINYINT}
         where   id = #{id,jdbcType=BIGINT} 
     </update>
 
diff --git a/pms-parent/pms-global/src/main/resources/mapper/PltProductScrappingReasonMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/PltProductScrappingReasonMapper.xml
index 3b196b6..8a0dbca 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PltProductScrappingReasonMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PltProductScrappingReasonMapper.xml
@@ -6,26 +6,22 @@
 
     <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPlt.PltProductScrappingReason">
         <id property="id" column="id" jdbcType="BIGINT"/>
-        <result property="proId" column="pro_id" jdbcType="BIGINT"/>
         <result property="reason" column="reason" jdbcType="VARCHAR"/>
-        <result property="deleted" column="deleted" jdbcType="TINYINT"/>
-        <association property="proName" column="pro_id" javaType="java.lang.Long"
-                     select="selectProNameById" fetchType="eager" />
+        <result column="disabled" property="disabled" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
+        <result property="deleted" column="deleted" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
     </resultMap>
 
     <sql id="Base_Column_List">
-        id,pro_id,reason,
+        id,reason,disabled,
         deleted
     </sql>
     <sql id="part_Column_List">
         ${alias}.id,
-        ${alias}.pro_id,
         ${alias}.reason,
-        ${alias}.deleted
+        ${alias}.deleted,
+        ${alias}.disabled
     </sql>
-    <select id="selectProNameById" parameterType="java.lang.Long" resultType="java.lang.String">
-        select name proName from plt_product where id=#{id}
-    </select>
+
     <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
         select
         <include refid="Base_Column_List" />
@@ -48,13 +44,11 @@
         insert into plt_product_scrapping_reason
         <trim prefix="(" suffix=")" suffixOverrides=",">
                 <if test="id != null">id,</if>
-                <if test="proId != null">pro_id,</if>
                 <if test="reason != null">reason,</if>
                 <if test="deleted != null">deleted,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
                 <if test="id != null">#{id,jdbcType=BIGINT},</if>
-                <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
                 <if test="reason != null">#{reason,jdbcType=VARCHAR},</if>
                 <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
         </trim>
@@ -62,26 +56,26 @@
     <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductScrappingReason">
         update plt_product_scrapping_reason
         <set>
-                <if test="proId != null">
-                    pro_id = #{proId,jdbcType=BIGINT},
-                </if>
-                <if test="reason != null">
-                    reason = #{reason,jdbcType=VARCHAR},
-                </if>
-                <if test="deleted != null">
-                    deleted = #{deleted,jdbcType=TINYINT},
-                </if>
+            <if test="reason != null">
+                reason = #{reason,jdbcType=VARCHAR},
+            </if>
+            <if test="disabled != null">
+                disabled = #{disabled,jdbcType=TINYINT},
+            </if>
+            <if test="deleted != null">
+                deleted = #{deleted,jdbcType=TINYINT},
+            </if>
         </set>
         where   id = #{id,jdbcType=BIGINT} 
     </update>
-    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductScrappingReason">
-        update plt_product_scrapping_reason
-        set 
-            pro_id =  #{proId,jdbcType=BIGINT},
-            reason =  #{reason,jdbcType=VARCHAR},
-            deleted =  #{deleted,jdbcType=TINYINT}
-        where   id = #{id,jdbcType=BIGINT} 
-    </update>
+<!--    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductScrappingReason">-->
+<!--        update plt_product_scrapping_reason-->
+<!--        set -->
+<!--            pro_id =  #{proId,jdbcType=BIGINT},-->
+<!--            reason =  #{reason,jdbcType=VARCHAR},-->
+<!--            deleted =  #{deleted,jdbcType=TINYINT}-->
+<!--        where   id = #{id,jdbcType=BIGINT} -->
+<!--    </update>-->
 
     <select id="selectSome" resultMap="BaseResultMap">
         select
@@ -89,12 +83,8 @@
             <property name="alias" value="t"/>
         </include>
         from plt_product_scrapping_reason t
-        inner join plt_product p on t.pro_id = p.id
         where t.deleted!=1
         <trim prefix="and" suffixOverrides="and">
-            <if test="proName != null and proName != ''">
-                p.name like concat('%', #{proName}, '%') and
-            </if>
             <if test="reason != null  and reason != ''">
                 t.reason like concat('%', #{reason}, '%') and
             </if>
@@ -110,12 +100,8 @@
     <select id="selectSomeCount" resultType="java.lang.Long">
         select count(1)
         from plt_product_scrapping_reason t
-        inner join plt_product p on t.pro_id = p.id
         where t.deleted!=1
         <trim prefix="and" suffixOverrides="and">
-            <if test="proName != null and proName != ''">
-                p.name like concat('%', #{proName}, '%') and
-            </if>
             <if test="reason != null  and reason != ''">
                 t.reason like concat('%', #{reason}, '%') and
             </if>
diff --git a/pms-parent/pms-global/src/main/resources/mapper/PltProductUnqualifiedReasonMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/PltProductUnqualifiedReasonMapper.xml
index 7f5b4b2..701bc19 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PltProductUnqualifiedReasonMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PltProductUnqualifiedReasonMapper.xml
@@ -6,26 +6,15 @@
 
     <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPlt.PltProductUnqualifiedReason">
         <id property="id" column="id" jdbcType="BIGINT"/>
-        <result property="proId" column="pro_id" jdbcType="BIGINT"/>
         <result property="reason" column="reason" jdbcType="VARCHAR"/>
-        <result property="deleted" column="deleted" jdbcType="TINYINT"/>
-        <association property="proName" column="pro_id" javaType="java.lang.Long"
-                     select="selectProNameById" fetchType="eager" />
+        <result column="disabled" property="disabled" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
+        <result property="deleted" column="deleted" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
     </resultMap>
 
     <sql id="Base_Column_List">
-        id,pro_id,reason,
+        id,pro_id,reason,disabled,
         deleted
     </sql>
-    <sql id="part_Column_List">
-        ${alias}.id,
-        ${alias}.pro_id,
-        ${alias}.reason,
-        ${alias}.deleted
-    </sql>
-    <select id="selectProNameById" parameterType="java.lang.Long" resultType="java.lang.String">
-        select name proName from plt_product where id=#{id}
-    </select>
     <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
         select
         <include refid="Base_Column_List" />
@@ -33,28 +22,15 @@
         where  id = #{id,jdbcType=BIGINT} 
     </select>
 
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
-        delete from plt_product_unqualified_reason
-        where  id = #{id,jdbcType=BIGINT} 
-    </delete>
-    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductUnqualifiedReason" useGeneratedKeys="true">
-        insert into plt_product_unqualified_reason
-        ( id,pro_id,reason
-        ,deleted)
-        values (#{id,jdbcType=BIGINT},#{proId,jdbcType=BIGINT},#{reason,jdbcType=VARCHAR}
-        ,#{deleted,jdbcType=TINYINT})
-    </insert>
     <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductUnqualifiedReason" useGeneratedKeys="true">
         insert into plt_product_unqualified_reason
         <trim prefix="(" suffix=")" suffixOverrides=",">
                 <if test="id != null">id,</if>
-                <if test="proId != null">pro_id,</if>
                 <if test="reason != null">reason,</if>
                 <if test="deleted != null">deleted,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
                 <if test="id != null">#{id,jdbcType=BIGINT},</if>
-                <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
                 <if test="reason != null">#{reason,jdbcType=VARCHAR},</if>
                 <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
         </trim>
@@ -62,39 +38,24 @@
     <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductUnqualifiedReason">
         update plt_product_unqualified_reason
         <set>
-                <if test="proId != null">
-                    pro_id = #{proId,jdbcType=BIGINT},
-                </if>
-                <if test="reason != null">
-                    reason = #{reason,jdbcType=VARCHAR},
-                </if>
-                <if test="deleted != null">
-                    deleted = #{deleted,jdbcType=TINYINT},
-                </if>
+            <if test="disabled != null">
+                disabled = #{disabled,jdbcType=TINYINT},
+            </if>
+            <if test="reason != null">
+                reason = #{reason,jdbcType=VARCHAR},
+            </if>
+            <if test="deleted != null">
+                deleted = #{deleted,jdbcType=TINYINT},
+            </if>
         </set>
-        where   id = #{id,jdbcType=BIGINT} 
-    </update>
-    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductUnqualifiedReason">
-        update plt_product_unqualified_reason
-        set 
-            pro_id =  #{proId,jdbcType=BIGINT},
-            reason =  #{reason,jdbcType=VARCHAR},
-            deleted =  #{deleted,jdbcType=TINYINT}
         where   id = #{id,jdbcType=BIGINT} 
     </update>
 
     <select id="selectSome" resultMap="BaseResultMap">
-        select
-        <include refid="part_Column_List" >
-            <property name="alias" value="t"/>
-        </include>
+        select <include refid="Base_Column_List" />
         from plt_product_unqualified_reason t
-        inner join plt_product p on t.pro_id = p.id
         where t.deleted!=1
         <trim prefix="and" suffixOverrides="and">
-            <if test="proName != null and proName != ''">
-                p.name like concat('%', #{proName}, '%') and
-            </if>
             <if test="reason != null  and reason != ''">
                 t.reason like concat('%', #{reason}, '%') and
             </if>
@@ -110,12 +71,8 @@
     <select id="selectSomeCount" resultType="java.lang.Long">
         select count(1)
         from plt_product_unqualified_reason t
-        inner join plt_product p on t.pro_id = p.id
         where t.deleted!=1
         <trim prefix="and" suffixOverrides="and">
-            <if test="proName != null and proName != ''">
-                p.name like concat('%', #{proName}, '%') and
-            </if>
             <if test="reason != null  and reason != ''">
                 t.reason like concat('%', #{reason}, '%') and
             </if>
diff --git a/pms-parent/pms-global/src/main/resources/mapper/PltStationMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/PltStationMapper.xml
index c922b71..4240ac2 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PltStationMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PltStationMapper.xml
@@ -5,16 +5,17 @@
 <mapper namespace="com.dy.pmsGlobal.daoPlt.PltStationMapper">
 
     <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPlt.PltStation">
-            <id property="id" column="id" jdbcType="BIGINT"/>
-            <result property="code" column="code" jdbcType="VARCHAR"/>
-            <result property="name" column="name" jdbcType="VARCHAR"/>
-            <result property="remark" column="remark" jdbcType="VARCHAR"/>
-            <result property="dt" column="dt" jdbcType="TIMESTAMP"/>
-            <result property="deleted" column="deleted" jdbcType="TINYINT"/>
+        <id property="id" column="id" jdbcType="BIGINT"/>
+        <result property="code" column="code" jdbcType="VARCHAR"/>
+        <result property="name" column="name" jdbcType="VARCHAR"/>
+        <result property="remark" column="remark" jdbcType="VARCHAR"/>
+        <result property="dt" column="dt" jdbcType="TIMESTAMP"/>
+        <result column="disabled" property="disabled" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
+        <result property="deleted" column="deleted" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
     </resultMap>
 
     <sql id="Base_Column_List">
-        id,code,name,
+        id,code,name,disabled,
         remark,dt,deleted
     </sql>
 
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java
index ef11a70..ffd39ed 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java
@@ -6,8 +6,10 @@
 import com.dy.common.webUtil.BaseResponseUtils;
 import com.dy.common.webUtil.QueryResultVo;
 import com.dy.pmsGlobal.aop.Log;
+import com.dy.pmsGlobal.pojoBa.BaRole;
 import com.dy.pmsGlobal.pojoPlt.PltProductParams;
 import com.dy.pmsGlobal.pojoPlt.PltProductQualityInspectionItems;
+import com.dy.pmsGlobal.pojoPlt.PltProductUnqualifiedReason;
 import jakarta.validation.Valid;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -46,6 +48,7 @@
                 return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
             }
             item.deleted = false;
+            item.disabled = false;
             return BaseResponseUtils.buildSuccess(sv.save(item));
         }catch (Exception e){
             log.error("淇濆瓨浜у搧鍝佽川妫�鏌ラ」鐩紓甯�", e);
@@ -128,6 +131,22 @@
             return BaseResponseUtils.buildException(e.getMessage());
         }
     }
+    /**
+     * 绂佺敤鎴栧惎鐢�
+     * @param reason
+     * @return
+     */
+    @PostMapping(path="disabled")
+    @SsoPowerAop(power = "10100011")
+    @Log("绂佺敤鎴栧惎鐢ㄨ川妫�椤圭洰")
+    public BaseResponse<BaRole> disabled(@RequestBody PltProductUnqualifiedReason reason){
+        try {
+            return BaseResponseUtils.buildSuccess(sv.disabled(reason.id,reason.disabled));
+        }catch (Exception e){
+            log.error("绂佺敤鎴栧惎鐢ㄨ川妫�椤圭洰寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage());
+        }
+    }
 
 }
 
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsSv.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsSv.java
index 58edb31..0662956 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsSv.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsSv.java
@@ -22,7 +22,7 @@
 
     @Transactional
     public int save(PltProductQualityInspectionItems item) {
-        int count = dao.insert(item);
+        int count = dao.insertSelective(item);
         return count;
     }
 
@@ -66,4 +66,11 @@
         rsVo.obj = this.dao.selectSome(params) ;
         return rsVo ;
     }
+
+    public Object disabled(Long id, Boolean disabled) {
+        PltProductQualityInspectionItems item = new PltProductQualityInspectionItems();
+        item.setId(id);
+        item.setDisabled(disabled);
+        return dao.updateByPrimaryKeySelective(item);
+    }
 }
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRCtrl.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRCtrl.java
index df860b6..ef71459 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRCtrl.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRCtrl.java
@@ -6,7 +6,9 @@
 import com.dy.common.webUtil.BaseResponseUtils;
 import com.dy.common.webUtil.QueryResultVo;
 import com.dy.pmsGlobal.aop.Log;
+import com.dy.pmsGlobal.pojoBa.BaRole;
 import com.dy.pmsGlobal.pojoPlt.PltProductScrappingReason;
+import com.dy.pmsGlobal.pojoPlt.PltProductUnqualifiedReason;
 import jakarta.validation.Valid;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -128,5 +130,22 @@
         }
     }
 
+    /**
+     * 绂佺敤鎴栧惎鐢�
+     * @param reason
+     * @return
+     */
+    @PostMapping(path="disabled")
+    @SsoPowerAop(power = "10100011")
+    @Log("绂佺敤鎴栧惎鐢ㄦ姤搴熷師鍥�")
+    public BaseResponse<BaRole> disabled(@RequestBody PltProductUnqualifiedReason reason){
+        try {
+            return BaseResponseUtils.buildSuccess(sv.disabled(reason.id,reason.disabled));
+        }catch (Exception e){
+            log.error("绂佺敤鎴栧惎鐢ㄦ姤搴熷師鍥犲紓甯�", e);
+            return BaseResponseUtils.buildException(e.getMessage());
+        }
+    }
+
 }
 
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRSv.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRSv.java
index a034582..7b3ac1e 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRSv.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRSv.java
@@ -25,7 +25,7 @@
 
     @Transactional
     public int save(PltProductScrappingReason reason) {
-        int count = dao.insert(reason);
+        int count = dao.insertSelective(reason);
         return count;
     }
 
@@ -70,5 +70,11 @@
         return rsVo ;
     }
 
+    public Object disabled(Long id, Boolean disabled) {
+        PltProductScrappingReason reason = new PltProductScrappingReason();
+        reason.setId(id);
+        reason.setDisabled(disabled);
+        return dao.updateByPrimaryKeySelective(reason);
+    }
 }
 
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURCtrl.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURCtrl.java
index 57493fa..f534ddc 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURCtrl.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURCtrl.java
@@ -6,6 +6,7 @@
 import com.dy.common.webUtil.BaseResponseUtils;
 import com.dy.common.webUtil.QueryResultVo;
 import com.dy.pmsGlobal.aop.Log;
+import com.dy.pmsGlobal.pojoBa.BaRole;
 import com.dy.pmsGlobal.pojoPlt.PltProductParams;
 import com.dy.pmsGlobal.pojoPlt.PltProductUnqualifiedReason;
 import jakarta.validation.Valid;
@@ -46,6 +47,7 @@
                 return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
             }
             reason.deleted = false;
+            reason.disabled = false;
             return BaseResponseUtils.buildSuccess(sv.save(reason));
         }catch (Exception e){
             log.error("淇濆瓨浜у搧鐢熶骇涓嶅悎鏍煎師鍥犲紓甯�", e);
@@ -129,5 +131,22 @@
         }
     }
 
+    /**
+     * 绂佺敤鎴栧惎鐢�
+     * @param reason
+     * @return
+     */
+    @PostMapping(path="disabled")
+    @SsoPowerAop(power = "10100011")
+    @Log("绂佺敤鎴栧惎鐢ㄤ笉鍚堟牸鍘熷洜")
+    public BaseResponse<BaRole> disabled(@RequestBody PltProductUnqualifiedReason reason){
+        try {
+            return BaseResponseUtils.buildSuccess(sv.disabled(reason.id,reason.disabled));
+        }catch (Exception e){
+            log.error("绂佺敤鎴栧惎鐢ㄤ笉鍚堟牸鍘熷洜寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage());
+        }
+    }
+
 }
 
diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURSv.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURSv.java
index b522f12..d80b107 100644
--- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURSv.java
+++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURSv.java
@@ -25,7 +25,7 @@
 
     @Transactional
     public int save(PltProductUnqualifiedReason reason) {
-        int count = dao.insert(reason);
+        int count = dao.insertSelective(reason);
         return count;
     }
 
@@ -70,5 +70,11 @@
         return rsVo ;
     }
 
+    public Object disabled(Long id, Boolean disabled) {
+        PltProductUnqualifiedReason reason = new PltProductUnqualifiedReason();
+        reason.setId(id);
+        reason.setDisabled(disabled);
+        return dao.updateByPrimaryKeySelective(reason);
+    }
 }
 

--
Gitblit v1.8.0