|
@@ -5,6 +5,7 @@ import java.util.List;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
+import com.ruoyi.common.core.exception.ServiceException;
|
|
|
import com.ruoyi.common.datascope.annotation.DataScope;
|
|
import com.ruoyi.common.datascope.annotation.DataScope;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -80,10 +81,16 @@ public class BizWaybillOrderController extends BaseController
|
|
|
@RequiresPermissions("system:order:add")
|
|
@RequiresPermissions("system:order:add")
|
|
|
@Log(title = "运单管理", businessType = BusinessType.INSERT)
|
|
@Log(title = "运单管理", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
@PostMapping
|
|
|
- public AjaxResult add(@RequestBody BizWaybillOrder bizWaybillOrder) throws UnsupportedEncodingException {
|
|
|
|
|
|
|
+ public AjaxResult add(@RequestBody BizWaybillOrder bizWaybillOrder) {
|
|
|
|
|
+ try{
|
|
|
|
|
+ return toAjax(bizWaybillOrderService.insertBizWaybillOrder(bizWaybillOrder));
|
|
|
|
|
+ }
|
|
|
|
|
+ catch(ServiceException e){
|
|
|
|
|
+ return AjaxResult.error("下单失败! 原因:"+e.getMessage());
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ throw new RuntimeException(e);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- return toAjax(bizWaybillOrderService.insertBizWaybillOrder(bizWaybillOrder));
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|