|
|
@@ -8,6 +8,7 @@ import com.sckw.core.web.response.HttpResult;
|
|
|
import com.sckw.excel.utils.ExcelUtil;
|
|
|
import com.sckw.transport.model.dto.OrderFinishDTO;
|
|
|
import com.sckw.transport.model.param.LogisticsConsignmentParam;
|
|
|
+import com.sckw.transport.model.param.OrderQuery;
|
|
|
import com.sckw.transport.model.vo.PurchaseLogisticOrderExcelVo;
|
|
|
import com.sckw.transport.model.vo.SellLogisticOrderExcelVo;
|
|
|
import com.sckw.transport.service.LogisticsConsignmentService;
|
|
|
@@ -15,7 +16,6 @@ import io.seata.spring.annotation.GlobalTransactional;
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
import jakarta.validation.Valid;
|
|
|
import jakarta.validation.constraints.NotBlank;
|
|
|
-import jakarta.validation.constraints.NotNull;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -64,13 +64,11 @@ public class LogisticsConsignmentController {
|
|
|
* @param ids 销售订单id
|
|
|
* @return
|
|
|
*/
|
|
|
- @RequestMapping(value = "/purchaseLogisticsOrder", method = RequestMethod.GET)
|
|
|
- public HttpResult purchaseLogisticsOrder(@RequestParam("ids") @NotBlank(message = "单据id不能为空") String ids,
|
|
|
- @RequestParam("page") @NotNull(message = "当前页不能为空") int page,
|
|
|
- @RequestParam("pageSize") @NotNull(message = "每页条数不能为空") int pageSize) {
|
|
|
- log.info("采购订单-托运订单列表 传递参数信息:{}", ids);
|
|
|
+ @RequestMapping(value = "/purchaseLogisticsOrder", method = RequestMethod.POST)
|
|
|
+ public HttpResult purchaseLogisticsOrder(@RequestBody @Valid OrderQuery orderQuery) {
|
|
|
+ log.info("采购订单-托运订单列表 传递参数信息:{}", JSONObject.toJSONString(orderQuery));
|
|
|
try {
|
|
|
- return logisticsConsignmentService.logisticsOrder(ids, page, pageSize, "1");
|
|
|
+ return logisticsConsignmentService.logisticsOrder(orderQuery.getIds(), orderQuery.getPage(), orderQuery.getPageSize(), "1");
|
|
|
} catch (Exception e) {
|
|
|
log.error("采购订单-托运订单列表 error :{}", e.getMessage(), e);
|
|
|
return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, e.getMessage());
|
|
|
@@ -115,21 +113,16 @@ public class LogisticsConsignmentController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 采购订单-车辆信息-销售订单ids
|
|
|
- *
|
|
|
- * @param ids 销售订单ids
|
|
|
- * @param page
|
|
|
- * @param pageSize
|
|
|
+ * 购订单-车辆信息-销售订单ids
|
|
|
+ * @param orderQuery
|
|
|
* @return
|
|
|
*/
|
|
|
@Validated
|
|
|
- @RequestMapping(value = "/purchaseLogisticsCar", method = RequestMethod.GET)
|
|
|
- public HttpResult purchaseLogisticsCar(@RequestParam("ids") @NotBlank(message = "单据id不能为空") String ids,
|
|
|
- @RequestParam("page") @NotNull(message = "当前页不能为空") int page,
|
|
|
- @RequestParam("pageSize") @NotNull(message = "每页条数不能为空") int pageSize) {
|
|
|
- log.info("采购订单-车辆详情 传递参数信息:{}", ids);
|
|
|
+ @RequestMapping(value = "/purchaseLogisticsCar", method = RequestMethod.POST)
|
|
|
+ public HttpResult purchaseLogisticsCar(@Valid @RequestBody OrderQuery orderQuery) {
|
|
|
+ log.info("采购订单-车辆详情 传递参数信息:{}", JSONObject.toJSONString(orderQuery));
|
|
|
try {
|
|
|
- return logisticsConsignmentService.purchaseLogisticsCar(ids, page, pageSize);
|
|
|
+ return logisticsConsignmentService.purchaseLogisticsCar(orderQuery.getIds(), orderQuery.getPage(), orderQuery.getPageSize());
|
|
|
} catch (Exception e) {
|
|
|
log.error("采购订单-车辆详情 error :{}", e.getMessage(), e);
|
|
|
return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, e.getMessage());
|
|
|
@@ -196,13 +189,11 @@ public class LogisticsConsignmentController {
|
|
|
* @param ids 销售订单id
|
|
|
* @return
|
|
|
*/
|
|
|
- @RequestMapping(value = "/sellLogisticsOrder", method = RequestMethod.GET)
|
|
|
- public HttpResult sellLogisticsOrder(@RequestParam("ids") @NotBlank(message = "单据id不能为空") String ids,
|
|
|
- @RequestParam("page") @NotNull(message = "当前页不能为空") int page,
|
|
|
- @RequestParam("pageSize") @NotNull(message = "每页条数不能为空") int pageSize) {
|
|
|
- log.info("销售订单-托运订单列表 传递参数信息:{}", ids);
|
|
|
+ @RequestMapping(value = "/sellLogisticsOrder", method = RequestMethod.POST)
|
|
|
+ public HttpResult sellLogisticsOrder(@Valid @RequestBody OrderQuery query ) {
|
|
|
+ log.info("销售订单-托运订单列表 传递参数信息:{}", JSONObject.toJSONString(query));
|
|
|
try {
|
|
|
- return logisticsConsignmentService.logisticsOrder(ids, page, pageSize, "2");
|
|
|
+ return logisticsConsignmentService.logisticsOrder(query.getIds(), query.getPage(), query.getPageSize(), "2");
|
|
|
} catch (Exception e) {
|
|
|
log.error("销售订单-托运订单列表 error :{}", e.getMessage(), e);
|
|
|
return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, e.getMessage());
|
|
|
@@ -233,13 +224,11 @@ public class LogisticsConsignmentController {
|
|
|
* @param ids 销售订单ids
|
|
|
* @return
|
|
|
*/
|
|
|
- @RequestMapping(value = "/sellLogisticsCar", method = RequestMethod.GET)
|
|
|
- public HttpResult sellLogisticsCar(@RequestParam("ids") @NotBlank(message = "单据id不能为空") String ids,
|
|
|
- @RequestParam("page") @NotNull(message = "当前页不能为空") int page,
|
|
|
- @RequestParam("pageSize") @NotNull(message = "每页条数不能为空") int pageSize) {
|
|
|
- log.info("销售订单-车辆列表 传递参数信息:{}", ids);
|
|
|
+ @RequestMapping(value = "/sellLogisticsCar", method = RequestMethod.POST)
|
|
|
+ public HttpResult sellLogisticsCar(@Valid @RequestBody OrderQuery orderQuery) {
|
|
|
+ log.info("销售订单-车辆列表 传递参数信息:{}", JSONObject.toJSONString(orderQuery));
|
|
|
try {
|
|
|
- return logisticsConsignmentService.sellLogisticsCar(ids, page, pageSize);
|
|
|
+ return logisticsConsignmentService.sellLogisticsCar(orderQuery.getIds(), orderQuery.getPage(), orderQuery.getPageSize());
|
|
|
} catch (Exception e) {
|
|
|
log.error("销售订单-车辆列表 error :{}", e.getMessage(), e);
|
|
|
return HttpResult.error(HttpStatus.GLOBAL_EXCEPTION_CODE, e.getMessage());
|