| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.JackSonUtil; |
| | | import com.ruoyi.inspect.dto.*; |
| | | import com.ruoyi.inspect.pojo.InsOrder; |
| | |
| | | return Result.success(insOrderService.selectInsOrderParameter(page, sampleOrderDto)); |
| | | } |
| | | |
| | | |
| | | |
| | | //用于检验下单区别查看所有订单和只查看同一个委托单位的订单 |
| | | @ApiOperation(value = "判断当前客户紧急额度是否用完") |
| | | @GetMapping("/hasSendUrgentOrder") |
| | |
| | | |
| | | @ApiOperation(value = "分配按钮") |
| | | @PostMapping("/upInsOrder") |
| | | @Log(title = "检验下单", businessType = BusinessType.UPDATE) |
| | | public Result<?> upInsOrder(@RequestBody UpInsOrderDTO upInsOrderDTO) { |
| | | return Result.success(insOrderService.upInsOrder(upInsOrderDTO)); |
| | | } |
| | | |
| | | @ApiOperation(value = "下单按钮") |
| | | @PostMapping("/addInsOrder") |
| | | public Result<?> addInsOrder(String str) { |
| | | Map<String, Object> map = JSON.parseObject(str, Map.class); |
| | | JSONArray jsonArray = JSON.parseArray(map.get("list")+""); |
| | | List<SampleProductDto> list = jsonArray.toJavaList(SampleProductDto.class); |
| | | InsOrder insOrder = JSON.parseObject(JSON.toJSONString(map.get("insOrder")), InsOrder.class); |
| | | List<List<Integer>> pairing = JSON.parseArray(map.get("pairing")+""); |
| | | List<List<Integer>> fiberPairing = JSON.parseArray(map.get("fiberPairing")+"");//光纤配置里的熔接配对 |
| | | return Result.success(insOrderService.addInsOrder(list, insOrder, pairing,fiberPairing)); |
| | | @Log(title = "检验下单", businessType = BusinessType.INSERT) |
| | | public Result<?> addInsOrder(@RequestBody AddInsOrderDTO addInsOrderDTO) { |
| | | return Result.success(insOrderService.addInsOrder( |
| | | addInsOrderDTO.getList(), |
| | | addInsOrderDTO.getInsOrder(), |
| | | addInsOrderDTO.getPairing(), |
| | | addInsOrderDTO.getFiberPairing())); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询订单最长预计时间") |
| | | @GetMapping("/selectOrderManDay") |
| | | public Result<?> selectOrderManDay(Integer id) { |
| | | int day = insProductService.selectOrderManDay(id); |
| | | return Result.success("成功", LocalDateTime.now().plusHours(day).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | return Result.success(LocalDateTime.now().plusHours(day).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")),"成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询检验下单内容详情") |
| | |
| | | @ApiImplicitParam(name = "state", value = "审核结果 1:通过 2:不通过", dataTypeClass = Integer.class) |
| | | }) |
| | | @PostMapping("/upInsOrderOfState") |
| | | @Log(title = "检验下单", businessType = BusinessType.UPDATE) |
| | | public Result<?> upInsOrderOfState(@RequestBody InsOrder insOrder) { |
| | | return Result.success(insOrderService.upInsOrderOfState(insOrder)); |
| | | } |
| | | |
| | | @ApiOperation(value = "保存检验模板按钮") |
| | | @PostMapping("/addInsOrderTemplate") |
| | | @Log(title = "检验下单", businessType = BusinessType.INSERT) |
| | | public Result<?> addInsOrderTemplate(@RequestBody InsOrderTemplate insOrderTemplate) { |
| | | return Result.success(insOrderTemplateService.addInsOrderTemplate(insOrderTemplate)); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除检验模板按钮") |
| | | @PostMapping("/delInsOrderTemplate") |
| | | @Log(title = "检验下单", businessType = BusinessType.DELETE) |
| | | public Result<?> delInsOrderTemplate(Integer id) { |
| | | return Result.success(insOrderTemplateService.delInsOrderTemplate(id)); |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "通过检验单查询检验数据(数据查看)") |
| | | @GetMapping("/selectSampleAndProductByOrderId") |
| | | public Result<?> selectSampleAndProductByOrderId(@RequestBody Map<String, Object> data) throws Exception { |
| | | SampleProductDto2 sampleProductDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), SampleProductDto2.class); |
| | | public Result<?> selectSampleAndProductByOrderId(SampleProductDto2 sampleProductDto) { |
| | | return Result.success(insOrderService.selectSampleAndProductByOrderId(sampleProductDto)); |
| | | } |
| | | //数据查看下的查看详情(单根垂直燃烧和松套管 |
| | |
| | | |
| | | @ApiOperation(value = "导出已检委托单") |
| | | @PostMapping("/exportChecked") |
| | | @Log(title = "检验下单", businessType = BusinessType.EXPORT) |
| | | public void exportChecked(@RequestBody Map<String, Object> data, HttpServletResponse response) { |
| | | insOrderService.exportChecked(data,response); |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "撤销按钮") |
| | | @PutMapping("/updateStatus") |
| | | @Log(title = "检验下单", businessType = BusinessType.UPDATE) |
| | | public Result<?> updateStatus(Integer id) { |
| | | insOrderService.updateStatus(id); |
| | | return Result.success(); |
| | |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @Log(title = "检验下单", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/revoke") |
| | | public Result<?> revoke(@RequestBody Map<String, Object> data) { |
| | | insProductService.revoke(data); |
| | |
| | | return Result.success(insProductService.revokeReviewProduct(orderId,sampleId)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 撤销审核通过 |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @Log(title = "检验下单", businessType = BusinessType.UPDATE) |
| | | @GetMapping("/revocationPassed") |
| | | public Result<?> revocationPassed(Integer orderId){ |
| | | insProductService.revocationPassed(orderId); |
| | |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @Log(title = "检验下单", businessType = BusinessType.UPDATE) |
| | | @GetMapping("/revocationCancel") |
| | | public Result<?> revocationCancel(Integer orderId){ |
| | | insProductService.revocationCancel(orderId); |
| | |
| | | |
| | | @ApiOperation(value = "待检的撤销") |
| | | @PutMapping("/updateInspected") |
| | | @Log(title = "检验下单", businessType = BusinessType.UPDATE) |
| | | public Result<?> updateInspected(Integer orderId,String ids){ |
| | | insProductService.updateInspected(orderId,ids); |
| | | return Result.success(); |
| | |
| | | |
| | | @ApiOperation(value = "撤销审核按钮") |
| | | @PostMapping("/checkUpdate") |
| | | @Log(title = "检验下单", businessType = BusinessType.UPDATE) |
| | | public Result<?> checkUpdate(Integer orderId,Integer state){ |
| | | insProductService.checkUpdate(orderId,state); |
| | | return Result.success(); |
| | |
| | | |
| | | @ApiOperation(value = "查看费用统计列表") |
| | | @GetMapping("/costStatistics") |
| | | public Result<?> costStatistics(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | CostStatisticsDto costStatisticsDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), CostStatisticsDto.class); |
| | | public Result<?> costStatistics(Page page,CostStatisticsDto costStatisticsDto) throws Exception { |
| | | return Result.success(insOrderService.costStatistics(page, costStatisticsDto)); |
| | | } |
| | | |
| | |
| | | public Result permute(Integer num, Boolean isValue) { |
| | | return Result.success(insOrderService.permute(num,isValue)); |
| | | } |
| | | } |
| | | } |