liuxm
2024-05-16 f1e6aadf01a2ac32bc1707ca43fc6a2d2587b9ac
添加 产品,质检项目,不合格原因,报废原因的 禁用启用方法;id序列化
19个文件已修改
346 ■■■■ 已修改文件
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductQualityInspectionItemsMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductScrappingReasonMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductUnqualifiedReasonMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltMaterial.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductQualityInspectionItems.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductScrappingReason.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductUnqualifiedReason.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductionLine.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltStation.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductQualityInspectionItemsMapper.xml 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductScrappingReasonMapper.xml 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductUnqualifiedReasonMapper.xml 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltStationMapper.xml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsSv.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRCtrl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRSv.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURCtrl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURSv.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
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);
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);
}
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;
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否
     */
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;
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;
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;
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;
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>
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>
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>
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>
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());
        }
    }
}
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);
    }
}
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());
        }
    }
}
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);
    }
}
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());
        }
    }
}
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);
    }
}