|  |  | 
 |  |  | import com.dy.common.webUtil.BaseResponseUtils; | 
 |  |  | import com.dy.common.webUtil.QueryResultVo; | 
 |  |  | import com.dy.pmsGlobal.aop.Log; | 
 |  |  | import com.dy.pmsGlobal.pojoPlt.PltProduct; | 
 |  |  | import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan; | 
 |  |  | import com.dy.pmsGlobal.pojoPr.PrOrder; | 
 |  |  | import com.dy.pmsProduct.taskPlan.QueryVo; | 
 |  |  | import com.dy.pmsProduct.order.QueryVo; | 
 |  |  | import jakarta.validation.Valid; | 
 |  |  | import lombok.extern.slf4j.Slf4j; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | 
 |  |  |  */ | 
 |  |  | @Slf4j | 
 |  |  | @RestController | 
 |  |  | @RequestMapping(path="order") | 
 |  |  | @RequestMapping(path = "order") | 
 |  |  | public class OrderCtrl { | 
 |  |  |     private OrderSv sv; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     public void setAssemblySv(OrderSv orderSv) { | 
 |  |  |         this.sv = orderSv; | 
 |  |  |     } | 
 |  |  |     @PostMapping(path="save") | 
 |  |  |     @SsoPowerAop(power = "10200001") | 
 |  |  |  | 
 |  |  |     @PostMapping(path = "save") | 
 |  |  |     @SsoPowerAop(power = "10200007") | 
 |  |  |     @Log("保存订单信息") | 
 |  |  |     public BaseResponse<Boolean> save(@RequestBody @Valid PrOrder order){ | 
 |  |  |         order.id = null; | 
 |  |  |         order.setDeleted(false); | 
 |  |  |     public BaseResponse<Boolean> save(@RequestBody @Valid PrOrder order) { | 
 |  |  |         int count = sv.save(order); | 
 |  |  |         if (count <= 0) { | 
 |  |  |             return BaseResponseUtils.buildFail("数据库存储失败"); | 
 |  |  | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 更新 | 
 |  |  |      * | 
 |  |  |      * @param order | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @PostMapping(path="update") | 
 |  |  |     @SsoPowerAop(power = "10200001") | 
 |  |  |     @PostMapping(path = "update") | 
 |  |  |     @SsoPowerAop(power = "10200007") | 
 |  |  |     @Log("修改订单信息") | 
 |  |  |     public BaseResponse<Boolean> update(@RequestBody @Valid PrOrder order){ | 
 |  |  |     public BaseResponse<Boolean> update(@RequestBody @Valid PrOrder order) { | 
 |  |  |         int count = sv.update(order); | 
 |  |  |         if (count <= 0) { | 
 |  |  |             return BaseResponseUtils.buildFail("数据库存储失败"); | 
 |  |  | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 删除订单信息 | 
 |  |  |      * | 
 |  |  |      * @param id | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @GetMapping(path="delete") | 
 |  |  |     @SsoPowerAop(power = "10300001") | 
 |  |  |     @GetMapping(path = "delete") | 
 |  |  |     @SsoPowerAop(power = "10200007") | 
 |  |  |     @Log("删除订单信息") | 
 |  |  |     public BaseResponse<Boolean> delete(String id){ | 
 |  |  |     public BaseResponse<Boolean> delete(String id) { | 
 |  |  |         int count = sv.delete(Long.parseLong(id)); | 
 |  |  |         if (count <= 0) { | 
 |  |  |             return BaseResponseUtils.buildFail("数据库存储失败"); | 
 |  |  | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 根据ID查询 | 
 |  |  |      * | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @GetMapping(path="one") | 
 |  |  |     @SsoPowerAop(power = "10200000") | 
 |  |  |     @GetMapping(path = "one") | 
 |  |  |     @SsoPowerAop(power = "10200006") | 
 |  |  |     @Log("根据ID查询订单信息") | 
 |  |  |     public BaseResponse<PrOrder> one(String id){ | 
 |  |  |         PrOrder plan=sv.selectById(id); | 
 |  |  |     public BaseResponse<PrOrder> one(String id) { | 
 |  |  |         PrOrder plan = sv.selectById(id); | 
 |  |  |         return BaseResponseUtils.buildSuccess(plan); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 分页查询 | 
 |  |  |      * | 
 |  |  |      * @param vo | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @PostMapping(path="some") | 
 |  |  |     @SsoPowerAop(power = "10200000") | 
 |  |  |     @PostMapping(path = "some") | 
 |  |  |     @SsoPowerAop(power = "10200006") | 
 |  |  |     @Log("分页查询订单信息") | 
 |  |  |     public BaseResponse<QueryResultVo<List<PrOrder>>> some(@RequestBody QueryVo vo){ | 
 |  |  |         QueryResultVo<List<PrOrder>> list = sv.selectSome(vo) ; | 
 |  |  |     public BaseResponse<QueryResultVo<List<PrOrder>>> some(@RequestBody QueryVo vo) { | 
 |  |  |         QueryResultVo<List<PrOrder>> list = sv.selectSome(vo); | 
 |  |  |         return BaseResponseUtils.buildSuccess(list); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @PostMapping(path="updateStatus") | 
 |  |  |     @SsoPowerAop(power = "10200001") | 
 |  |  |     @Log("更新任务计划状态") | 
 |  |  |     public BaseResponse<Boolean> updateStatus(@RequestBody PrAssemblyPlan plan){ | 
 |  |  |         int count = sv.updateStatus(plan); | 
 |  |  |     /** | 
 |  |  |      * 查询所有订单 | 
 |  |  |      * | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @GetMapping(path = "all") | 
 |  |  |     @SsoPowerAop(power = "10200006") | 
 |  |  |     @Log("查询所有产品") | 
 |  |  |     public BaseResponse<List<PrOrder>> all() { | 
 |  |  |         QueryVo vo = new QueryVo(); | 
 |  |  |         return BaseResponseUtils.buildSuccess(sv.selectAll(vo)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @PostMapping(path = "updateStatus") | 
 |  |  |     @SsoPowerAop(power = "10200007") | 
 |  |  |     @Log("更新订单状态") | 
 |  |  |     public BaseResponse<Boolean> updateStatus(@RequestBody PrOrder order) { | 
 |  |  |         int count = sv.updateStatus(order); | 
 |  |  |         if (count <= 0) { | 
 |  |  |             return BaseResponseUtils.buildFail("数据库存储失败"); | 
 |  |  |         } else { |