| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.config.TenantContext; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.modules.dry.service.IDryOrderTrendService; |
| | | import org.jeecg.modules.dry.vo.DryOrderTrendVo; |
| | | import org.jeecg.modules.dry.vo.DryOrderVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | public class DryOrderController extends JeecgController<DryOrder, IDryOrderService> { |
| | | @Autowired |
| | | private IDryOrderService dryOrderService; |
| | | |
| | | @Autowired |
| | | private IDryOrderTrendService dryOrderTrendService; |
| | | |
| | | /** |
| | | * 分页列表查询 |
| | |
| | | return Result.OK("批量删除成功!"); |
| | | } |
| | | |
| | | /** |
| | | /** |
| | | * 批量下发工单 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "干燥工单-批量下发") |
| | | @ApiOperation(value="干燥工单-批量下发", notes="干燥工单-批量下发") |
| | | @RequiresPermissions("dry:dry_order:edit") |
| | | @PostMapping(value = "/sendBatch") |
| | | public Result<String> sendBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.dryOrderService.sendByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("批量下发成功!"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过id查询 |
| | | * |
| | | * @param id |
| | |
| | | return Result.OK(dryOrder); |
| | | } |
| | | |
| | | @ApiOperation(value="干燥工单-查询过程趋势数据", notes="查询过程趋势数据") |
| | | @GetMapping(value = "/queryOrderTrendById") |
| | | public Result<DryOrderVo> queryOrderTrendById(@RequestParam(name="id",required=true) String id) { |
| | | DryOrder dryOrder = dryOrderService.getById(id); |
| | | DryOrderVo orderVo; |
| | | if(dryOrder ==null) { |
| | | return Result.error("未找到对应数据"); |
| | | } |
| | | orderVo = BeanUtil.toBean(dryOrder, DryOrderVo.class); |
| | | List<DryOrderTrendVo> trendVos = dryOrderTrendService.listByOrderId(orderVo.getId()); |
| | | orderVo.setDetailList(trendVos); |
| | | return Result.OK(orderVo); |
| | | } |
| | | |
| | | /** |
| | | * 导出excel |
| | | * |