liurunyu
2024-05-16 4d7775ecb9d52da2558cef3f19bd5fab1746afae
Merge branch 'master' of http://8.140.179.55:20000/r/pms-SV
18个文件已修改
475 ■■■■■ 已修改文件
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltStationMapper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltStation.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltStationMapper.xml 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/privileges-config.xml 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/log/LogCtrl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/privilege/PrivilegeCtrl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleCtrl.java 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/user/UserCtrl.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsSv.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proLine/ProLineCtrl.java 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRCtrl.java 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRSv.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURCtrl.java 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURSv.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductCtrl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationSv.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltStationMapper.java
@@ -15,10 +15,6 @@
@Mapper
public interface PltStationMapper {
    int deleteByPrimaryKey(Long id);
    int insert(PltStation record);
    int insertSelective(PltStation record);
    PltStation selectByPrimaryKey(Long id);
@@ -26,8 +22,6 @@
    long selectByCodeId(Long id,String code);
    int updateByPrimaryKeySelective(PltStation record);
    int updateByPrimaryKey(PltStation record);
    Long selectSomeCount(Map<String,Object> params);
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltStation.java
@@ -30,6 +30,15 @@
    public Long id;
    /**
     * 生产线id
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long lineId;
    @TableField(exist = false)
    public String lineName;
    /**
     * 编号
     */
    @NotEmpty(message = "编号不能为空")
pms-parent/pms-global/src/main/resources/mapper/PltStationMapper.xml
@@ -6,19 +6,24 @@
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPlt.PltStation">
        <id property="id" column="id" jdbcType="BIGINT"/>
        <result property="lineId" column="line_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"/>
        <association property="lineName" column="line_id" javaType="java.lang.Long"
                     select="selectLineNameById" fetchType="eager" />
    </resultMap>
    <sql id="Base_Column_List">
        id,code,name,disabled,
        id,line_id,code,name,disabled,
        remark,dt,deleted
    </sql>
    <select id="selectLineNameById" parameterType="java.lang.Long" resultType="String">
        select name from plt_production_line where id = #{lineId}
    </select>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
@@ -26,61 +31,46 @@
        where  id = #{id,jdbcType=BIGINT} 
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from plt_station
        where  id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPlt.PltStation" useGeneratedKeys="true">
        insert into plt_station
        ( id,code,name
        ,remark,deleted
        )
        values (#{id,jdbcType=BIGINT},#{code,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR}
        ,#{remark,jdbcType=VARCHAR},#{deleted,jdbcType=TINYINT}
        )
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPlt.PltStation" useGeneratedKeys="true">
        insert into plt_station
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="lineId != null">line_id,</if>
                <if test="code != null">code,</if>
                <if test="name != null">name,</if>
                <if test="remark != null">remark,</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="lineId != null">#{lineId,jdbcType=VARCHAR},</if>
                <if test="code != null">#{code,jdbcType=VARCHAR},</if>
                <if test="name != null">#{name,jdbcType=VARCHAR},</if>
                <if test="remark != null">#{remark,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.PltStation">
        update plt_station
        <set>
                <if test="code != null">
                    code = #{code,jdbcType=VARCHAR},
                </if>
                <if test="name != null">
                    name = #{name,jdbcType=VARCHAR},
                </if>
                <if test="remark != null">
                    remark = #{remark,jdbcType=VARCHAR},
                </if>
                <if test="deleted != null">
                    deleted = #{deleted,jdbcType=TINYINT},
                </if>
            <if test="code != null">
                code = #{code,jdbcType=VARCHAR},
            </if>
            <if test="name != null">
                name = #{name,jdbcType=VARCHAR},
            </if>
            <if test="remark != null">
                remark = #{remark,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.PltStation">
        update plt_station
        set
            code =  #{code,jdbcType=VARCHAR},
            name =  #{name,jdbcType=VARCHAR},
            remark =  #{remark,jdbcType=VARCHAR},
            deleted =  #{deleted,jdbcType=TINYINT}
        where   id = #{id,jdbcType=BIGINT} 
    </update>
pms-parent/pms-global/src/main/resources/privileges-config.xml
@@ -6,18 +6,32 @@
type:类型,长度为4位,是编码的前4位
 -->
    <privileges>
        <!-- 基础权 -->
        <privilege num="10100010" name="系统查询" type="1010" typeName="基础权"></privilege>
        <privilege num="10100011" name="系统管理" type="1010" typeName="基础权"></privilege>
        <!-- 系统管理 -->
        <privilege num="10100000" name="用户查询" type="1010" typeName="系统管理"></privilege>
        <privilege num="10100001" name="用户管理" type="1010" typeName="系统管理"></privilege>
        <privilege num="10100002" name="角色查询" type="1010" typeName="系统管理"></privilege>
        <privilege num="10100003" name="角色管理" type="1010" typeName="系统管理"></privilege>
        <privilege num="10100004" name="权限查询" type="1010" typeName="系统管理"></privilege>
        <privilege num="10100006" name="日志查询" type="1010" typeName="系统管理"></privilege>
        <privilege num="10100007" name="编码查询" type="1010" typeName="系统管理"></privilege>
        <!-- 生产管理 -->
        <privilege num="10200000" name="产品查询" type="1020" typeName="生产管理"></privilege>
        <privilege num="10200001" name="产品管理" type="1020" typeName="生产管理"></privilege>
        <privilege num="10200000" name="生产查询" type="1020" typeName="生产管理"></privilege>
        <privilege num="10200001" name="生产管理" type="1020" typeName="生产管理"></privilege>
        <!-- 平台信息 -->
        <privilege num="10300000" name="平台查询" type="1030" typeName="平台信息"></privilege>
        <privilege num="10300001" name="平台管理" type="1030" typeName="平台信息"></privilege>
        <privilege num="10300000" name="产品查询" type="1030" typeName="平台信息"></privilege>
        <privilege num="10300001" name="产品管理" type="1030" typeName="平台信息"></privilege>
        <privilege num="10300002" name="质检项目查询" type="1030" typeName="平台信息"></privilege>
        <privilege num="10300003" name="质检项目管理" type="1030" typeName="平台信息"></privilege>
        <privilege num="10300004" name="生产线查询" type="1030" typeName="平台信息"></privilege>
        <privilege num="10300005" name="生产线管理" type="1030" typeName="平台信息"></privilege>
        <privilege num="10300006" name="工站查询" type="1030" typeName="平台信息"></privilege>
        <privilege num="10300007" name="工站管理" type="1030" typeName="平台信息"></privilege>
        <privilege num="10300008" name="不合格原因查询" type="1030" typeName="平台信息"></privilege>
        <privilege num="10300009" name="不合格原因管理" type="1030" typeName="平台信息"></privilege>
        <privilege num="10300010" name="报废原因查询" type="1030" typeName="平台信息"></privilege>
        <privilege num="10300011" name="报废原因管理" type="1030" typeName="平台信息"></privilege>
    </privileges>
</config>
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/log/LogCtrl.java
@@ -30,7 +30,7 @@
     * @return
     */
    @GetMapping(path = "one")
    @SsoPowerAop(power = "10100010") //登录与权限同时验证
    @SsoPowerAop(power = "10100006") //登录与权限同时验证
    @Log("查询单条日志")
    public BaseResponse<BaLog> one(String id){
        try {
@@ -46,7 +46,7 @@
     * @return
     */
    @PostMapping(path = "some", consumes = MediaType.APPLICATION_JSON_VALUE)
    @SsoPowerAop(power = "10100010") //登录与权限同时验证
    @SsoPowerAop(power = "10100006") //登录与权限同时验证
    @Log("查询日志")
    public BaseResponse<QueryResultVo<List<BaLog>>> some(@RequestBody QueryVo vo){
        try {
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/privilege/PrivilegeCtrl.java
@@ -36,7 +36,7 @@
     * @return
     */
    @GetMapping(path="getByType")
    @SsoPowerAop(power = "10100010")
    @SsoPowerAop(power = "10100004")
    public BaseResponse<List<Map<String, Object>>> getByType(){
       try {
           return BaseResponseUtils.buildSuccess(sv.selectByType());
@@ -52,7 +52,7 @@
     * @return
     */
    @RequestMapping(path="some")
    @SsoPowerAop(power = "10100010")
    @SsoPowerAop(power = "10100004")
    @Log("查询权限信息")
    public BaseResponse<QueryResultVo<List<BaPrivilege>>> some(@RequestBody QueryVo vo){
        try {
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleCtrl.java
@@ -14,6 +14,7 @@
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Objects;
/**
 * 角色管理
@@ -36,16 +37,25 @@
     * @return
     */
    @PostMapping(path="save")
    @SsoPowerAop(power = "10100011")
    @SsoPowerAop(power = "10100003")
    @Log("保存角色信息")
    public BaseResponse<BaRole> save(@RequestBody @Valid BaRole role,BindingResult bindingResult){
    public BaseResponse<Boolean> save(@RequestBody @Valid BaRole role,BindingResult bindingResult){
        int count;
        try {
            if (bindingResult != null && bindingResult.hasErrors()) {
                return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            }
            role.setDeleted(false);
            role.setDisabled(false);
            return BaseResponseUtils.buildSuccess(roleSv.save(role));
            count = roleSv.save(role);
        }catch (Exception e){
            log.error("保存角色异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -57,14 +67,23 @@
     * @return
     */
    @PostMapping(path="update")
    @SsoPowerAop(power = "10100011")
    @SsoPowerAop(power = "10100003")
    @Log("更新角色信息")
    public BaseResponse<BaRole> update(@RequestBody @Valid BaRole role,BindingResult bindingResult){
        int count;
        try {
            return BaseResponseUtils.buildSuccess(roleSv.update(role));
            if (bindingResult != null && bindingResult.hasErrors()) {
                return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            }
            count = roleSv.update(role);
        }catch (Exception e){
            log.error("更新角色异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -74,14 +93,20 @@
     * @return
     */
    @GetMapping(path="delete")
    @SsoPowerAop(power = "10100011")
    @SsoPowerAop(power = "10100003")
    @Log("删除角色信息")
    public BaseResponse<BaRole> delete(String id){
    public BaseResponse<Boolean> delete(String id){
        int count;
        try {
            return BaseResponseUtils.buildSuccess(roleSv.delete(Long.parseLong(id)));
            count = roleSv.delete(Long.parseLong(id));
        }catch (Exception e){
            log.error("删除角色异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -91,14 +116,20 @@
     * @return
     */
    @PostMapping(path="disabled")
    @SsoPowerAop(power = "10100011")
    @SsoPowerAop(power = "10100003")
    @Log("禁用或启用角色信息")
    public BaseResponse<BaRole> disabled(@RequestBody BaRole role){
    public BaseResponse<Boolean> disabled(@RequestBody BaRole role){
        int count;
        try {
            return BaseResponseUtils.buildSuccess(roleSv.disabled(role.id,role.disabled));
            count = roleSv.disabled(role.id,role.disabled);
        }catch (Exception e){
            log.error("禁用角色异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -108,7 +139,7 @@
     * @return
     */
    @GetMapping(path="one")
    @SsoPowerAop(power = "10100010") //登录与权限同时验证
    @SsoPowerAop(power = "10100004") //登录与权限同时验证
    @Log("根据ID查询角色信息")
    public BaseResponse<BaRole> one(String id){
        try{
@@ -125,7 +156,7 @@
     * @return
     */
    @GetMapping(path="all")
    @SsoPowerAop(power = "10100010") //登录与权限同时验证
    @SsoPowerAop(power = "10100004") //登录与权限同时验证
    @Log("查询所有角色")
    public BaseResponse<List<BaRole>> all(String id){
        try{
@@ -143,7 +174,7 @@
     * @return
     */
    @PostMapping(path="some")
    @SsoPowerAop(power = "10100010")
    @SsoPowerAop(power = "10100004")
    @Log("查询角色信息")
    public BaseResponse<QueryResultVo<List<BaRole>>> some(@RequestBody QueryVo vo){
        try {
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/user/UserCtrl.java
@@ -61,7 +61,7 @@
     */
    @PostMapping(path = "some", consumes = MediaType.APPLICATION_JSON_VALUE)
    //@SsoAop() //只有登录验证,没有权限验证
    @SsoPowerAop(power = "10100010") //登录与权限同时验证
    @SsoPowerAop(power = "10100000") //登录与权限同时验证
    @Log("查询用户")
    public BaseResponse<QueryResultVo<List<BaUser>>> some(@RequestBody QueryVo vo) {
        try {
@@ -80,7 +80,7 @@
    //@GetMapping(path = "one", consumes = MediaType.TEXT_PLAIN_VALUE)//指前端向后传的参数类型
    @GetMapping(path = "one")
    //@SsoAop() //只有登录验证,没有权限验证
    @SsoPowerAop(power = "10100010") //登录与权限同时验证
    @SsoPowerAop(power = "10100000") //登录与权限同时验证
    @Log("查询单个用户")
    public BaseResponse<BaUser> one(String id) {
        try {
@@ -99,7 +99,7 @@
     */
    @PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE)
    //@SsoAop() //只有登录验证,没有权限验证
    @SsoPowerAop(power = "10100011") //登录与权限同时验证
    @SsoPowerAop(power = "10100001") //登录与权限同时验证
    @Log("保存用户信息")
    public BaseResponse<Boolean> save(@RequestBody @Valid BaUser po, BindingResult bindingResult) {
        if (bindingResult != null && bindingResult.hasErrors()) {
@@ -140,7 +140,7 @@
     */
    @PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE)
    //@SsoAop() //只有登录验证,没有权限验证
    @SsoPowerAop(power = "10100011") //登录与权限同时验证
    @SsoPowerAop(power = "10100001") //登录与权限同时验证
    @Log("更新用户信息")
    public BaseResponse<Boolean> update(@RequestBody @Validated BaUser po, BindingResult bindingResult) {
        int count;
@@ -172,7 +172,7 @@
     * @return
     */
    @PostMapping(path="disabled")
    @SsoPowerAop(power = "10100011")
    @SsoPowerAop(power = "10100001")
    @Log("禁用或启用用户信息")
    public BaseResponse<BaRole> disabled(@RequestBody BaUser po){
        try {
@@ -189,7 +189,7 @@
     * @return
     */
    @GetMapping(path = "delete")
    @SsoPowerAop(power = "10100011") //登录与权限同时验证
    @SsoPowerAop(power = "10100001") //登录与权限同时验证
    @Log("删除用户")
    public BaseResponse<Boolean> delete(Long id) {
        int count;
@@ -269,7 +269,7 @@
     */
    @PostMapping(path = "resetPassword", consumes = MediaType.APPLICATION_JSON_VALUE)
    //@SsoAop() //只有登录验证,没有权限验证
    @SsoPowerAop(power = "10100011") //登录与权限同时验证
    @SsoPowerAop(power = "10100001") //登录与权限同时验证
    @Log("重置密码")
    public BaseResponse<Boolean> resetPassword(@RequestBody @Validated ResetPasswordVo vo, BindingResult bindingResult) {
        int count;
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsCtrl.java
@@ -40,19 +40,25 @@
     * @return
     */
    @PostMapping(path="save")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300003")
    @Log("保存产品品质检查项目信息")
    public BaseResponse<PltProductParams> save(@RequestBody @Valid PltProductQualityInspectionItems item, BindingResult bindingResult){
    public BaseResponse<Boolean> save(@RequestBody @Valid PltProductQualityInspectionItems item, BindingResult bindingResult){
        int count = 0;
        try {
            if (bindingResult != null && bindingResult.hasErrors()) {
                return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            }
            item.deleted = false;
            item.disabled = false;
            return BaseResponseUtils.buildSuccess(sv.save(item));
            count =sv.save(item);
        }catch (Exception e){
            log.error("保存产品品质检查项目异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -64,17 +70,23 @@
     * @return
     */
    @PostMapping(path="update")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300003")
    @Log("更新产品品质检查项目信息")
    public BaseResponse<PltProductParams> update(@RequestBody @Valid PltProductQualityInspectionItems item,BindingResult bindingResult){
    public BaseResponse<Boolean> update(@RequestBody @Valid PltProductQualityInspectionItems item,BindingResult bindingResult){
        int count ;
        try {
            if (bindingResult != null && bindingResult.hasErrors()) {
                return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            }
            return BaseResponseUtils.buildSuccess(sv.update(item));
            count = sv.update(item);
        }catch (Exception e){
            log.error("更新产品品质检查项目异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -84,14 +96,20 @@
     * @return
     */
    @GetMapping(path="delete")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300003")
    @Log("删除产品品质检查项目信息")
    public BaseResponse<PltProductQualityInspectionItems> delete(String id){
    public BaseResponse<Boolean> delete(String id){
        int count;
        try {
            return BaseResponseUtils.buildSuccess(sv.delete(Long.parseLong(id)));
            count = sv.delete(Long.parseLong(id));
        }catch (Exception e){
            log.error("删除产品品质检查项目异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -102,7 +120,7 @@
     * @return
     */
    @GetMapping(path="one")
    @SsoPowerAop(power = "10300000") //登录与权限同时验证
    @SsoPowerAop(power = "10300002") //登录与权限同时验证
    @Log("根据ID查询产品品质检查项目信息")
    public BaseResponse<PltProductQualityInspectionItems> one(String id){
        try{
@@ -120,7 +138,7 @@
     * @return
     */
    @PostMapping(path="some")
    @SsoPowerAop(power = "10300000")
    @SsoPowerAop(power = "10300002")
    @Log("查询产品品质检查项目信息")
    public BaseResponse<QueryResultVo<List<PltProductQualityInspectionItems>>> some(@RequestBody QueryVo vo){
        try {
@@ -139,13 +157,19 @@
    @PostMapping(path="disabled")
    @SsoPowerAop(power = "10100011")
    @Log("禁用或启用质检项目")
    public BaseResponse<BaRole> disabled(@RequestBody PltProductUnqualifiedReason reason){
    public BaseResponse<Boolean> disabled(@RequestBody PltProductUnqualifiedReason reason){
        int count;
        try {
            return BaseResponseUtils.buildSuccess(sv.disabled(reason.id,reason.disabled));
            count = sv.disabled(reason.id,reason.disabled);
        }catch (Exception e){
            log.error("禁用或启用质检项目异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
}
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proItems/ProItemsSv.java
@@ -67,7 +67,7 @@
        return rsVo ;
    }
    public Object disabled(Long id, Boolean disabled) {
    public int disabled(Long id, Boolean disabled) {
        PltProductQualityInspectionItems item = new PltProductQualityInspectionItems();
        item.setId(id);
        item.setDisabled(disabled);
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proLine/ProLineCtrl.java
@@ -37,18 +37,25 @@
     * @return
     */
    @PostMapping(path="save")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300005")
    @Log("保存生产线")
    public BaseResponse<PltProductionLine> save(@RequestBody @Valid PltProductionLine line,BindingResult bindingResult){
    public BaseResponse<Boolean> save(@RequestBody @Valid PltProductionLine line,BindingResult bindingResult){
        int count;
        try {
            if (bindingResult != null && bindingResult.hasErrors()) {
                return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            }
            line.disabled = false;
            line.deleted = false;
            return BaseResponseUtils.buildSuccess(sv.save(line));
            count = sv.save(line);
        }catch (Exception e){
            log.error("保存生产线异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -60,17 +67,23 @@
     * @return
     */
    @PostMapping(path="update")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300005")
    @Log("更新生产线")
    public BaseResponse<PltProductionLine> update(@RequestBody @Valid PltProductionLine line,BindingResult bindingResult){
    public BaseResponse<Boolean> update(@RequestBody @Valid PltProductionLine line,BindingResult bindingResult){
        int count;
        try {
            if (bindingResult != null && bindingResult.hasErrors()) {
                return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            }
            return BaseResponseUtils.buildSuccess(sv.update(line));
            count = sv.update(line);
        }catch (Exception e){
            log.error("更新生产线异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -80,14 +93,20 @@
     * @return
     */
    @GetMapping(path="delete")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300005")
    @Log("删除生产线")
    public BaseResponse<PltProductionLine> delete(String id){
    public BaseResponse<Boolean> delete(String id){
        int count;
        try {
            return BaseResponseUtils.buildSuccess(sv.delete(Long.parseLong(id)));
            count = sv.delete(Long.parseLong(id));
        }catch (Exception e){
            log.error("删除生产线异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -98,7 +117,7 @@
     * @return
     */
    @GetMapping(path="one")
    @SsoPowerAop(power = "10300000") //登录与权限同时验证
    @SsoPowerAop(power = "10300004") //登录与权限同时验证
    @Log("根据ID查询生产线")
    public BaseResponse<PltProductionLine> one(String id){
        try{
@@ -116,7 +135,7 @@
     * @return
     */
    @PostMapping(path="some")
    @SsoPowerAop(power = "10300000")
    @SsoPowerAop(power = "10300004")
    @Log("分页查询生产线")
    public BaseResponse<QueryResultVo<List<PltProductionLine>>> some(@RequestBody QueryVo vo){
        try {
@@ -133,7 +152,7 @@
     * @return
     */
    @GetMapping(path="all")
    @SsoPowerAop(power = "10300000")
    @SsoPowerAop(power = "10300004")
    @Log("查询所有生产线")
    public BaseResponse<List<PltProductionLine>> all(){
        try {
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRCtrl.java
@@ -39,18 +39,25 @@
     * @return
     */
    @PostMapping(path="save")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300011")
    @Log("保存产品设备报废原因")
    public BaseResponse<PltProductScrappingReason> save(@RequestBody @Valid PltProductScrappingReason reason,BindingResult bindingResult){
    public BaseResponse<Boolean> save(@RequestBody @Valid PltProductScrappingReason reason,BindingResult bindingResult){
        int count;
        try {
            if (bindingResult != null && bindingResult.hasErrors()) {
                return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            }
            reason.disabled = false;
            reason.deleted = false;
            return BaseResponseUtils.buildSuccess(sv.save(reason));
            count = sv.save(reason);
        }catch (Exception e){
            log.error("保存产品设备报废原因异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -62,17 +69,23 @@
     * @return
     */
    @PostMapping(path="update")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300011")
    @Log("更新产品设备报废原因")
    public BaseResponse<PltProductScrappingReason> update(@RequestBody @Valid PltProductScrappingReason reason,BindingResult bindingResult){
    public BaseResponse<Boolean> update(@RequestBody @Valid PltProductScrappingReason reason,BindingResult bindingResult){
        int count;
        try {
            if (bindingResult != null && bindingResult.hasErrors()) {
                return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            }
            return BaseResponseUtils.buildSuccess(sv.update(reason));
            count = sv.update(reason);
        }catch (Exception e){
            log.error("更新产品设备报废原因异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -82,14 +95,20 @@
     * @return
     */
    @GetMapping(path="delete")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300011")
    @Log("删除产品设备报废原因")
    public BaseResponse<PltProductScrappingReason> delete(String id){
    public BaseResponse<Boolean> delete(String id){
        int count;
        try {
            return BaseResponseUtils.buildSuccess(sv.delete(Long.parseLong(id)));
            count = sv.delete(Long.parseLong(id));
        }catch (Exception e){
            log.error("删除产品设备报废原因异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -100,7 +119,7 @@
     * @return
     */
    @GetMapping(path="one")
    @SsoPowerAop(power = "10300000") //登录与权限同时验证
    @SsoPowerAop(power = "10300010") //登录与权限同时验证
    @Log("根据ID查询产品设备报废原因")
    public BaseResponse<PltProductScrappingReason> one(String id){
        try{
@@ -118,7 +137,7 @@
     * @return
     */
    @PostMapping(path="some")
    @SsoPowerAop(power = "10300000")
    @SsoPowerAop(power = "10300010")
    @Log("查询产品设备报废原因")
    public BaseResponse<QueryResultVo<List<PltProductScrappingReason>>> some(@RequestBody QueryVo vo){
        try {
@@ -138,13 +157,19 @@
    @PostMapping(path="disabled")
    @SsoPowerAop(power = "10100011")
    @Log("禁用或启用报废原因")
    public BaseResponse<BaRole> disabled(@RequestBody PltProductUnqualifiedReason reason){
    public BaseResponse<Boolean> disabled(@RequestBody PltProductUnqualifiedReason reason){
        int count;
        try {
            return BaseResponseUtils.buildSuccess(sv.disabled(reason.id,reason.disabled));
            count = sv.disabled(reason.id,reason.disabled);
        }catch (Exception e){
            log.error("禁用或启用报废原因异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
}
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/ProSRSv.java
@@ -70,7 +70,7 @@
        return rsVo ;
    }
    public Object disabled(Long id, Boolean disabled) {
    public int disabled(Long id, Boolean disabled) {
        PltProductScrappingReason reason = new PltProductScrappingReason();
        reason.setId(id);
        reason.setDisabled(disabled);
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURCtrl.java
@@ -6,8 +6,6 @@
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;
import lombok.extern.slf4j.Slf4j;
@@ -39,19 +37,25 @@
     * @return
     */
    @PostMapping(path="save")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300009")
    @Log("保存产品生产不合格原因")
    public BaseResponse<PltProductParams> save(@RequestBody @Valid PltProductUnqualifiedReason reason,BindingResult bindingResult){
    public BaseResponse<Boolean> save(@RequestBody @Valid PltProductUnqualifiedReason reason,BindingResult bindingResult){
        int count;
        try {
            if (bindingResult != null && bindingResult.hasErrors()) {
                return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            }
            reason.deleted = false;
            reason.disabled = false;
            return BaseResponseUtils.buildSuccess(sv.save(reason));
            count = sv.save(reason);
        }catch (Exception e){
            log.error("保存产品生产不合格原因异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -63,17 +67,23 @@
     * @return
     */
    @PostMapping(path="update")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300009")
    @Log("更新产品生产不合格原因")
    public BaseResponse<PltProductUnqualifiedReason> update(@RequestBody @Valid PltProductUnqualifiedReason reason,BindingResult bindingResult){
    public BaseResponse<Boolean> update(@RequestBody @Valid PltProductUnqualifiedReason reason,BindingResult bindingResult){
        int count;
        try {
            if (bindingResult != null && bindingResult.hasErrors()) {
                return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            }
            return BaseResponseUtils.buildSuccess(sv.update(reason));
            count = sv.update(reason);
        }catch (Exception e){
            log.error("更新产品生产不合格原因异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -83,14 +93,20 @@
     * @return
     */
    @GetMapping(path="delete")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300009")
    @Log("删除产品生产不合格原因")
    public BaseResponse<PltProductUnqualifiedReason> delete(String id){
    public BaseResponse<Boolean> delete(String id){
        int count;
        try {
            return BaseResponseUtils.buildSuccess(sv.delete(Long.parseLong(id)));
            count = sv.delete(Long.parseLong(id));
        }catch (Exception e){
            log.error("删除产品生产不合格原因异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -101,7 +117,7 @@
     * @return
     */
    @GetMapping(path="one")
    @SsoPowerAop(power = "10300000") //登录与权限同时验证
    @SsoPowerAop(power = "10300008") //登录与权限同时验证
    @Log("根据ID查询产品生产不合格原因")
    public BaseResponse<PltProductUnqualifiedReason> one(String id){
        try{
@@ -119,7 +135,7 @@
     * @return
     */
    @PostMapping(path="some")
    @SsoPowerAop(power = "10300000")
    @SsoPowerAop(power = "10300008")
    @Log("查询产品生产不合格原因")
    public BaseResponse<QueryResultVo<List<PltProductUnqualifiedReason>>> some(@RequestBody QueryVo vo){
        try {
@@ -137,15 +153,21 @@
     * @return
     */
    @PostMapping(path="disabled")
    @SsoPowerAop(power = "10100011")
    @SsoPowerAop(power = "10300009")
    @Log("禁用或启用不合格原因")
    public BaseResponse<BaRole> disabled(@RequestBody PltProductUnqualifiedReason reason){
    public BaseResponse<Boolean> disabled(@RequestBody PltProductUnqualifiedReason reason){
        int count;
        try {
            return BaseResponseUtils.buildSuccess(sv.disabled(reason.id,reason.disabled));
            count = sv.disabled(reason.id,reason.disabled);
        }catch (Exception e){
            log.error("禁用或启用不合格原因异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
}
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/ProURSv.java
@@ -70,7 +70,7 @@
        return rsVo ;
    }
    public Object disabled(Long id, Boolean disabled) {
    public int disabled(Long id, Boolean disabled) {
        PltProductUnqualifiedReason reason = new PltProductUnqualifiedReason();
        reason.setId(id);
        reason.setDisabled(disabled);
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductCtrl.java
@@ -100,13 +100,19 @@
    @GetMapping(path="delete")
    @SsoPowerAop(power = "10300001")
    @Log("删除产品信息")
    public BaseResponse<PltProduct> delete(String id){
    public BaseResponse<Boolean> delete(String id){
        int count;
        try {
            return BaseResponseUtils.buildSuccess(proSv.delete(Long.parseLong(id)));
            count = proSv.delete(Long.parseLong(id));
        }catch (Exception e){
            log.error("删除产品异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java
@@ -37,18 +37,25 @@
     * @return
     */
    @PostMapping(path="save")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300007")
    @Log("保存工站")
    public BaseResponse<PltStation> save(@RequestBody @Valid PltStation station,BindingResult bindingResult){
    public BaseResponse<Boolean> save(@RequestBody @Valid PltStation station,BindingResult bindingResult){
        if (bindingResult != null && bindingResult.hasErrors()) {
            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
        }
        int count;
        try {
            if (bindingResult != null && bindingResult.hasErrors()) {
                return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            }
            station.deleted = false;
            return BaseResponseUtils.buildSuccess(sv.save(station));
            count = sv.save(station);
        }catch (Exception e){
            log.error("保存工站异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -60,17 +67,23 @@
     * @return
     */
    @PostMapping(path="update")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300007")
    @Log("更新工站")
    public BaseResponse<PltStation> update(@RequestBody @Valid PltStation station,BindingResult bindingResult){
    public BaseResponse<Boolean> update(@RequestBody @Valid PltStation station,BindingResult bindingResult){
        int count;
        try {
            if (bindingResult != null && bindingResult.hasErrors()) {
                return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            }
            return BaseResponseUtils.buildSuccess(sv.update(station));
            count = sv.update(station);
        }catch (Exception e){
            log.error("更新工站异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
@@ -80,25 +93,28 @@
     * @return
     */
    @GetMapping(path="delete")
    @SsoPowerAop(power = "10300001")
    @SsoPowerAop(power = "10300007")
    @Log("删除工站")
    public BaseResponse<PltStation> delete(String id){
    public BaseResponse<Boolean> delete(String id){
       int count;
        try {
            return BaseResponseUtils.buildSuccess(sv.delete(Long.parseLong(id)));
            count = sv.delete(Long.parseLong(id));
        }catch (Exception e){
            log.error("删除工站异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * 根据ID查询
     * @return
     */
    @GetMapping(path="one")
    @SsoPowerAop(power = "10300000") //登录与权限同时验证
    @SsoPowerAop(power = "10300006") //登录与权限同时验证
    @Log("根据ID查询工站")
    public BaseResponse<PltStation> one(String id){
        try{
@@ -116,7 +132,7 @@
     * @return
     */
    @PostMapping(path="some")
    @SsoPowerAop(power = "10300000")
    @SsoPowerAop(power = "10300006")
    @Log("分页查询工站")
    public BaseResponse<QueryResultVo<List<PltStation>>> some(@RequestBody QueryVo vo){
        try {
@@ -128,5 +144,22 @@
        }
    }
    @PostMapping(path="disabled")
    @SsoPowerAop(power = "10100011")
    @Log("禁用或启用工站")
    public BaseResponse<Boolean> disabled(@RequestBody PltStation station){
        int count;
        try {
            count = sv.disabled(station.id,station.disabled);
        }catch (Exception e){
            log.error("禁用或启用工站异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
}
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationSv.java
@@ -76,5 +76,11 @@
        return rsVo ;
    }
    public int disabled(Long id, Boolean disabled) {
        PltStation station = new PltStation();
        station.setId(id);
        station.setDisabled(disabled);
        return dao.updateByPrimaryKeySelective(station);
    }
}