| | |
| | | @ApiOperation(value = "下单按钮") |
| | | @PostMapping("/addInsOrder") |
| | | @Log(title = "检验下单", businessType = BusinessType.INSERT) |
| | | 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)); |
| | | 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 = "查询检验下单内容详情") |
| | | @GetMapping("/getInsOrder") |
| | | @Log(title = "检验下单", businessType = BusinessType.OTHER) |
| | | public Result<?> getInsOrder(Integer orderId) { |
| | | return Result.success(insOrderService.getInsOrder(orderId)); |
| | | } |
| | |
| | | |
| | | @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)); |
| | | } |
| | | } |
| | | } |