| | |
| | | import jakarta.annotation.Resource; |
| | | import jakarta.validation.Valid; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| | |
| | | |
| | | @PostMapping("/predict-material") |
| | | @Operation(summary = "AI 物料短缺预测") |
| | | @PreAuthorize("@ss.hasPermission('mes:pro-work-order:query')") |
| | | public CommonResult<MesProAiMaterialPredictRespVO> predictMaterial(@Valid @RequestBody MesProAiMaterialPredictReqVO reqVO) { |
| | | return success(proAiService.predictMaterial(reqVO)); |
| | | } |
| | | |
| | | @PostMapping("/predict-duration") |
| | | @Operation(summary = "AI 生产计划时长预测") |
| | | @PreAuthorize("@ss.hasPermission('mes:pro-work-order:query')") |
| | | public CommonResult<MesProAiDurationPredictRespVO> predictDuration(@Valid @RequestBody MesProAiDurationPredictReqVO reqVO) { |
| | | return success(proAiService.predictDuration(reqVO)); |
| | | } |
| | | |
| | | @PostMapping("/predict-risk") |
| | | @Operation(summary = "AI 生产风险预测") |
| | | @PreAuthorize("@ss.hasPermission('mes:pro-work-order:query')") |
| | | public CommonResult<MesProAiRiskPredictRespVO> predictRisk(@Valid @RequestBody MesProAiRiskPredictReqVO reqVO) { |
| | | return success(proAiService.predictRisk(reqVO)); |
| | | } |
| | | |
| | | @PostMapping("/predict-delivery") |
| | | @Operation(summary = "AI 是否能按时交付") |
| | | @PreAuthorize("@ss.hasPermission('mes:pro-work-order:query')") |
| | | public CommonResult<MesProAiDeliveryPredictRespVO> predictDelivery(@Valid @RequestBody MesProAiDeliveryPredictReqVO reqVO) { |
| | | return success(proAiService.predictDelivery(reqVO)); |
| | | } |