| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | 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()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |