|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.api.controller.erp; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.R; | 
|---|
|  |  |  | import com.vincent.rsf.framework.exception.CoolException; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.controller.erp.params.ReportParams; | 
|---|
|  |  |  | import com.vincent.rsf.server.api.service.ReportMsgService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.controller.BaseController; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.PostMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestBody; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RestController; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Objects; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @author Ryan | 
|---|
|  |  |  | 
|---|
|  |  |  | @Api(tags = "上报信息接口管理器") | 
|---|
|  |  |  | public class ReportMsgController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ReportMsgService reportMsgService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("完成订单上报") | 
|---|
|  |  |  | @PostMapping("/complete/orders") | 
|---|
|  |  |  | public R reportOrder(@RequestBody ReportParams params) { | 
|---|
|  |  |  | if (Objects.isNull(params)) { | 
|---|
|  |  |  | return R.error("参数不能为空!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Objects.isNull(params.getOrderType())) { | 
|---|
|  |  |  | return R.error("订单类型不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Objects.isNull(params.getAction()) || params.getAction().isEmpty()) { | 
|---|
|  |  |  | return R.error("上报明细不能为空!!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return reportMsgService.reportOrders(params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|