| | |
| | | import com.doumee.core.tms.model.response.TmsBasePageResponse; |
| | | import com.doumee.core.tms.model.response.TmsOrderInfoResponse; |
| | | import com.doumee.core.tms.model.response.TmsOrderListResponse; |
| | | import com.doumee.core.tms.model.response.TmsOrderNoFinishListResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.model.TmsFactoryParam; |
| | |
| | | @LoginNoRequired |
| | | @ApiOperation("中心数据") |
| | | @GetMapping("/centerData") |
| | | public ApiResponse<WholeProvinceBoardVO> centerData() { |
| | | WholeProvinceBoardVO data = new WholeProvinceBoardVO(); |
| | | Random random = new Random(); |
| | | |
| | | data.setYearOutTotal(BigDecimal.valueOf(random.nextInt(200))); |
| | | data.setYearOutTotalOnYear(BigDecimal.valueOf(random.nextInt(10))); |
| | | data.setYearOutTimes(random.nextInt(200)); |
| | | data.setYearProvinceRata(BigDecimal.valueOf(random.nextInt(100)).divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_UP)); |
| | | |
| | | data.setYearInPlanTotal(BigDecimal.valueOf(random.nextInt(200))); |
| | | data.setYearInTotal(BigDecimal.valueOf(random.nextInt(data.getYearInPlanTotal().intValue()))); |
| | | data.setYearInTotalOnYear(BigDecimal.valueOf(random.nextInt(10))); |
| | | data.setYearInTimes(random.nextInt(200)); |
| | | |
| | | data.setOutPlanTotal(BigDecimal.valueOf(random.nextInt(200))); |
| | | data.setOutPlanTimes(random.nextInt(200)); |
| | | data.setOutTotal(BigDecimal.valueOf(random.nextInt(data.getOutPlanTotal().intValue()))); |
| | | data.setOutTimes(random.nextInt(data.getOutPlanTimes())); |
| | | data.setOutRata(BigDecimal.valueOf(random.nextInt(100))); |
| | | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "factoryCode", value = "查询类型厂区编码", required = false) |
| | | }) |
| | | public ApiResponse<WholeProvinceBoardVO> centerData(@RequestParam String factoryCode) { |
| | | WholeProvinceBoardVO data = boardService.centerProvinceData( factoryCode); |
| | | return ApiResponse.success(data); |
| | | } |
| | | |
| | |
| | | @LoginNoRequired |
| | | @ApiOperation("近七日到货情况") |
| | | @GetMapping("/arriveGoodsList") |
| | | public ApiResponse<List<ArriveGoodsVO>> arriveGoodsList() { |
| | | List<ArriveGoodsVO> list = new ArrayList<>(); |
| | | Random random = new Random(); |
| | | List<String> dayList = DateUtil.getBeforDays(new Date(),7); |
| | | for (String str:dayList) { |
| | | ArriveGoodsVO data = new ArriveGoodsVO(); |
| | | data.setDateStr(str); |
| | | data.setArriveNum(new BigDecimal(random.nextInt(1000))); |
| | | data.setInTransitNum(new BigDecimal(random.nextInt(1000))); |
| | | list.add(data); |
| | | |
| | | } |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "factoryCode", value = "查询类型厂区编码", required = false) |
| | | }) |
| | | public ApiResponse<List<LastSevenDaysOrderVo>> arriveGoodsList(@RequestParam String factoryCode) { |
| | | List<LastSevenDaysOrderVo> list = boardService.arriveGoodsList(factoryCode); |
| | | return ApiResponse.success(list); |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("当前运输任务") |
| | | @GetMapping("/transportTaskList") |
| | | public ApiResponse<List<TransportTaskVO>> transportTaskList() { |
| | | List<TransportTaskVO> list = new ArrayList<>(); |
| | | Random random = new Random(); |
| | | for (int i = 1; i < 11; i++) { |
| | | TransportTaskVO data = new TransportTaskVO(); |
| | | data.setCarNo("皖A8" + random.nextInt(9) + random.nextInt(9) + random.nextInt(9) + random.nextInt(9)); |
| | | data.setStatusStr("到达卸货地"); |
| | | data.setAddress("安徽合肥"); |
| | | data.setTaskDate(new Date()); |
| | | list.add(data); |
| | | } |
| | | return ApiResponse.success(list); |
| | | } |
| | | @LoginNoRequired |
| | | @ApiOperation("订单在途跟踪-累计出库量") |
| | | @GetMapping("/totalOutQtyNum") |
| | | public ApiResponse<TotalOutQtyNumVO> totalOutQtyNum() { |
| | | TotalOutQtyNumVO result = boardService.totalOutQtyNum(); |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "查询类型 0本月 1本周 2本年", required = false), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "factoryCode", value = "查询类型厂区编码", required = false) |
| | | }) |
| | | public ApiResponse<TotalOutQtyNumVO> totalOutQtyNum(@RequestParam Integer type,@RequestParam String factoryCode) { |
| | | TotalOutQtyNumVO result = boardService.totalOutQtyNum(type,factoryCode); |
| | | |
| | | return ApiResponse.success(result); |
| | | } |
| | |
| | | @LoginNoRequired |
| | | @ApiOperation("地图本月本年总出库量统计集合(按省份)") |
| | | @GetMapping("/mapYearAndMonthOutList") |
| | | public ApiResponse<List<WholeProvinceMapVO>> mapYearAndMonthOutList( ) { |
| | | List<WholeProvinceMapVO> list = boardService.mapYearAndMonthOutList(); |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "factoryCode", value = "查询类型厂区编码", required = false) |
| | | }) |
| | | public ApiResponse<List<WholeProvinceMapVO>> mapYearAndMonthOutList( @RequestParam String factoryCode) { |
| | | List<WholeProvinceMapVO> list = boardService.mapYearAndMonthOutList(factoryCode); |
| | | return ApiResponse.success(list); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("订单任务合同列表接口") |
| | | @LoginNoRequired |
| | | @PostMapping("/orderList") |
| | | public ApiResponse<TmsBasePageResponse<TmsOrderListResponse>> orderList(@RequestBody TmsOrderListRequest param ) { |
| | | if(param == null){ |
| | | param = new TmsOrderListRequest(); |
| | | } |
| | | if(param.getParameters() == null){ |
| | | param.setParameters( new TmsOrderListParamRequest()); |
| | | } |
| | | if(param.getPager() == null){ |
| | | param.setPager( new TmsOrderListPagerRequest()); |
| | | } |
| | | if(param.getPager().getPage() == null){ |
| | | param.getPager().setPage(1); |
| | | } |
| | | if(param.getPager().getRows() == null){ |
| | | param.getPager().setRows(10); |
| | | } |
| | | if(StringUtils.isBlank(param.getParameters().getPhoneNumber())){ |
| | | param.getParameters().setPhoneNumber("00000000000");//手机号必填 |
| | | } |
| | | if(param.getParameters().getContractNumbers()==null || param.getParameters().getContractNumbers().size()==0){ |
| | | param.getParameters().setContractNumbers(null); |
| | | } |
| | | return ApiResponse.success(tmsService.orderList(param)); |
| | | @GetMapping("/orderList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "factoryCode", value = "查询类型厂区编码", required = false) |
| | | }) |
| | | public ApiResponse<List<TmsOrderNoFinishListResponse>> orderNoFinishList(@RequestParam String factoryCode) { |
| | | List<TmsOrderNoFinishListResponse> list = boardService.orderNoFinishList(factoryCode); |
| | | return ApiResponse.success(list); |
| | | } |
| | | @ApiOperation("合同详情接口") |
| | | @LoginNoRequired |
| | | @PostMapping("/orderInfo") |
| | | public ApiResponse<TmsOrderInfoResponse> ordreInfo(@RequestBody TmsOrderInfoRequest request ) { |
| | | |
| | | return ApiResponse.success(tmsService.orderInfo(request)); |
| | | } |
| | | |