md
This commit is contained in:
parent
651dc3c1ec
commit
e37be5e87b
@ -65,54 +65,5 @@ public class EmisCommonController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取电子运单信息
|
|
||||||
*/
|
|
||||||
@PostMapping(value = "/getWaybillDetail")
|
|
||||||
public AjaxResult getWaybillDetail(@RequestParam("billCode")String billCode,@RequestParam("orderSn")String orderSn )
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
// String waybillNo = emisElectronicPagService.realMatchWaybill();
|
|
||||||
|
|
||||||
EmisWaybill emisWaybill=null;
|
|
||||||
|
|
||||||
if(StringUtils.isEmpty(billCode) && StringUtils.isEmpty(orderSn) ){
|
|
||||||
return AjaxResult.error("参数错误");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!StringUtils.isEmpty(billCode) ){
|
|
||||||
emisWaybill = emisWaybillService.selectEmisWaybillByBillCode(billCode);
|
|
||||||
if(emisWaybill==null){
|
|
||||||
return AjaxResult.error("未找到该运单");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!StringUtils.isEmpty(orderSn) ) {
|
|
||||||
emisWaybill = emisWaybillService.selectEmisWaybillByOrderSn(orderSn);
|
|
||||||
if(emisWaybill==null){
|
|
||||||
return AjaxResult.error("未找到该运单");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
WaybillOrder waybillOrder = new WaybillOrder();
|
|
||||||
waybillOrder.setBillCode(emisWaybill.getBillCode());
|
|
||||||
|
|
||||||
// 收件人
|
|
||||||
Reciever reciever = new Reciever();
|
|
||||||
reciever.setName(emisWaybill.getReceiveName());
|
|
||||||
|
|
||||||
waybillOrder.setReciever(reciever);
|
|
||||||
// 发件人
|
|
||||||
Sender sender = new Sender();
|
|
||||||
sender.setName(emisWaybill.getSendName());
|
|
||||||
waybillOrder.setSender(sender);
|
|
||||||
|
|
||||||
waybillOrder.setBillCode("1232");
|
|
||||||
|
|
||||||
return AjaxResult.success("获取成功",waybillOrder);
|
|
||||||
}catch (Exception ex){
|
|
||||||
ex.printStackTrace();
|
|
||||||
return AjaxResult.error(ex.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,19 +18,14 @@ import cn.hutool.core.lang.Singleton;
|
|||||||
import cn.hutool.core.lang.Snowflake;
|
import cn.hutool.core.lang.Snowflake;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.xdadan.erp.common.utils.DBUtil;
|
import com.xdadan.erp.common.utils.DBUtil;
|
||||||
|
import com.xdadan.erp.emis.domain.vo.Reciever;
|
||||||
|
import com.xdadan.erp.emis.domain.vo.Sender;
|
||||||
import com.xdadan.erp.emis.domain.vo.WaybillOrder;
|
import com.xdadan.erp.emis.domain.vo.WaybillOrder;
|
||||||
import com.xdadan.erp.emis.service.IEmisElectronicPagService;
|
import com.xdadan.erp.emis.service.IEmisElectronicPagService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import com.xdadan.erp.common.annotation.Log;
|
import com.xdadan.erp.common.annotation.Log;
|
||||||
import com.xdadan.erp.common.core.controller.BaseController;
|
import com.xdadan.erp.common.core.controller.BaseController;
|
||||||
@ -58,6 +53,58 @@ public class EmisWaybillController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IEmisElectronicPagService emisElectronicPagService;
|
private IEmisElectronicPagService emisElectronicPagService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电子运单信息
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/getWaybillDetail")
|
||||||
|
public AjaxResult getWaybillDetail(@RequestParam("billCode")String billCode, @RequestParam("orderSn")String orderSn )
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
// String waybillNo = emisElectronicPagService.realMatchWaybill();
|
||||||
|
|
||||||
|
EmisWaybill emisWaybill=null;
|
||||||
|
|
||||||
|
if(com.xdadan.erp.common.utils.StringUtils.isEmpty(billCode) && com.xdadan.erp.common.utils.StringUtils.isEmpty(orderSn) ){
|
||||||
|
return AjaxResult.error("参数错误");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!com.xdadan.erp.common.utils.StringUtils.isEmpty(billCode) ){
|
||||||
|
emisWaybill = emisWaybillService.selectEmisWaybillByBillCode(billCode);
|
||||||
|
if(emisWaybill==null){
|
||||||
|
return AjaxResult.error("未找到该运单");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!com.xdadan.erp.common.utils.StringUtils.isEmpty(orderSn) ) {
|
||||||
|
emisWaybill = emisWaybillService.selectEmisWaybillByOrderSn(orderSn);
|
||||||
|
if(emisWaybill==null){
|
||||||
|
return AjaxResult.error("未找到该运单");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
WaybillOrder waybillOrder = new WaybillOrder();
|
||||||
|
waybillOrder.setBillCode(emisWaybill.getBillCode());
|
||||||
|
|
||||||
|
// 收件人
|
||||||
|
Reciever reciever = new Reciever();
|
||||||
|
reciever.setName(emisWaybill.getReceiveName());
|
||||||
|
|
||||||
|
waybillOrder.setReciever(reciever);
|
||||||
|
// 发件人
|
||||||
|
Sender sender = new Sender();
|
||||||
|
sender.setName(emisWaybill.getSendName());
|
||||||
|
waybillOrder.setSender(sender);
|
||||||
|
|
||||||
|
waybillOrder.setBillCode("1232");
|
||||||
|
|
||||||
|
return AjaxResult.success("获取成功",waybillOrder);
|
||||||
|
}catch (Exception ex){
|
||||||
|
ex.printStackTrace();
|
||||||
|
return AjaxResult.error(ex.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:add')")
|
// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:add')")
|
||||||
@Log(title = "运单下单", businessType = BusinessType.INSERT)
|
@Log(title = "运单下单", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user