liuxm
2024-05-16 f1e6aadf01a2ac32bc1707ca43fc6a2d2587b9ac
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());
        }
    }
}