| | |
| | | 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; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 禁用或启用 |
| | | * @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()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |