md
This commit is contained in:
parent
99684ab180
commit
36c395138b
@ -362,15 +362,7 @@ public class EmisWaybillController extends EmisBaseController
|
|||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
// return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
// return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
||||||
}
|
}
|
||||||
catch (Exception ex){
|
|
||||||
ex.printStackTrace();
|
|
||||||
// 返回子定义异常
|
|
||||||
// if(ex instanceof EmisBizError){
|
|
||||||
// return AjaxResult.error(ex.getMessage(),((EmisBizError)ex).getErrorCode());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return AjaxResult.error("服务器异常,联系客服");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log(title = "运单实时下单", businessType = BusinessType.INSERT)
|
@Log(title = "运单实时下单", businessType = BusinessType.INSERT)
|
||||||
@ -399,20 +391,6 @@ public class EmisWaybillController extends EmisBaseController
|
|||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
// catch (DuplicateKeyException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// return AjaxResult.error("运单号重复!");
|
|
||||||
// }
|
|
||||||
// catch (Exception ex){
|
|
||||||
// ex.printStackTrace();
|
|
||||||
// // 返回子定义异常
|
|
||||||
// if(ex instanceof EmisBizError){
|
|
||||||
// return AjaxResult.error(ex.getMessage(),((EmisBizError)ex).getErrorCode());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return AjaxResult.error("服务器异常,联系客服");
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -429,15 +407,7 @@ public class EmisWaybillController extends EmisBaseController
|
|||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
||||||
}
|
}
|
||||||
catch (Exception ex){
|
|
||||||
ex.printStackTrace();
|
|
||||||
// 返回子定义异常
|
|
||||||
if(ex instanceof EmisBizError){
|
|
||||||
return AjaxResult.error(ex.getMessage(),((EmisBizError)ex).getErrorCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
return AjaxResult.error("服务器异常,联系客服");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log(title = "计算运费", businessType = BusinessType.OTHER)
|
@Log(title = "计算运费", businessType = BusinessType.OTHER)
|
||||||
@ -461,15 +431,7 @@ public class EmisWaybillController extends EmisBaseController
|
|||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
||||||
}
|
}
|
||||||
catch (Exception ex){
|
|
||||||
ex.printStackTrace();
|
|
||||||
// 返回子定义异常
|
|
||||||
if(ex instanceof EmisBizError){
|
|
||||||
return AjaxResult.error(ex.getMessage(),((EmisBizError)ex).getErrorCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
return AjaxResult.error("服务器异常,联系客服");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log(title = "计算结算重量", businessType = BusinessType.OTHER)
|
@Log(title = "计算结算重量", businessType = BusinessType.OTHER)
|
||||||
@ -486,14 +448,9 @@ public class EmisWaybillController extends EmisBaseController
|
|||||||
jObjRst.put("volumeWeight", emisWaybillSave.getVolumeWeight());
|
jObjRst.put("volumeWeight", emisWaybillSave.getVolumeWeight());
|
||||||
return AjaxResult.success("计算成功", jObjRst);
|
return AjaxResult.success("计算成功", jObjRst);
|
||||||
}
|
}
|
||||||
catch (Exception ex){
|
catch(EmisBizError ex){
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
// 返回子定义异常
|
return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
||||||
if(ex instanceof EmisBizError){
|
|
||||||
return AjaxResult.error(ex.getMessage(),((EmisBizError)ex).getErrorCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
return AjaxResult.error("服务器异常,联系客服");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -511,14 +468,9 @@ public class EmisWaybillController extends EmisBaseController
|
|||||||
jObjRst.put("volumeWeight", emisWaybillSave.getVolumeWeight());
|
jObjRst.put("volumeWeight", emisWaybillSave.getVolumeWeight());
|
||||||
return AjaxResult.success("计算成功", jObjRst);
|
return AjaxResult.success("计算成功", jObjRst);
|
||||||
}
|
}
|
||||||
catch (Exception ex){
|
catch(EmisBizError ex){
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
// 返回子定义异常
|
return AjaxResult.error("("+ex.getErrorCode()+")"+ex.getMessage());
|
||||||
if(ex instanceof EmisBizError){
|
|
||||||
return AjaxResult.error(ex.getMessage(),((EmisBizError)ex).getErrorCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
return AjaxResult.error("服务器异常,联系客服");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -996,73 +948,6 @@ public class EmisWaybillController extends EmisBaseController
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @GetMapping("/realGetWaybillPrintData")
|
|
||||||
// public AjaxResult realGetWaybillPrintData(String billCode, String billCodeRange, String lang,String tplCode, String printType,String printManCode,String isNeedPdf)
|
|
||||||
// {
|
|
||||||
// /*
|
|
||||||
// , HttpServletRequest request, HttpServletResponse response
|
|
||||||
// [
|
|
||||||
// {
|
|
||||||
// "billCode":"T123213",
|
|
||||||
// "pdfInfo":"1231232112",
|
|
||||||
// "billDetail":"1231232",
|
|
||||||
// "isEncrpt":"false",
|
|
||||||
// "printCount":"1",
|
|
||||||
// "printDate":"",
|
|
||||||
// "result":"success",
|
|
||||||
// "message":"",
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// */
|
|
||||||
//
|
|
||||||
// if(!StringUtils.isEmpty(billCode)){
|
|
||||||
// try {
|
|
||||||
// JSONArray jArr = new JSONArray();
|
|
||||||
// String[] billCodeArr = billCode.split(",");
|
|
||||||
//
|
|
||||||
// for(String billCodeItem:billCodeArr) {
|
|
||||||
// Map<String, Object> order = emisBaseService.getWaybillPrintOrder(billCode, billCodeRange, tplCode,lang, printType,printManCode);
|
|
||||||
// JSONObject printItem = new JSONObject();
|
|
||||||
// printItem.put("billCode",billCodeItem);
|
|
||||||
// printItem.put("billDetail",Base64.getEncoder().encodeToString(JSONObject.toJSONString(order).getBytes(Charset.forName("UTF-8"))));
|
|
||||||
// printItem.put("isEncrpt",false);
|
|
||||||
// printItem.put("printCount",1);
|
|
||||||
// printItem.put("printDate", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,new Date()));
|
|
||||||
//
|
|
||||||
// if(order!=null) {
|
|
||||||
//
|
|
||||||
// if("T".equals(isNeedPdf)) {
|
|
||||||
// ByteArrayOutputStream os = new ByteArrayOutputStream();
|
|
||||||
// IXddTplPrint tplPrint = new TanexTplPrintImpl();
|
|
||||||
// tplPrint.genPDF(order,"",os);
|
|
||||||
// // 生成pdf base64
|
|
||||||
// byte[] pdfBytes = os.toByteArray();
|
|
||||||
// String pdfBase64Str = Base64.getEncoder().encodeToString(pdfBytes);
|
|
||||||
// System.out.println(pdfBase64Str);
|
|
||||||
// printItem.put("pdfInfo", pdfBase64Str);
|
|
||||||
// }else{
|
|
||||||
// printItem.put("pdfInfo", "");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// printItem.put("result","success");
|
|
||||||
// printItem.put("message","success");
|
|
||||||
// }else{
|
|
||||||
// printItem.put("result","fail");
|
|
||||||
// printItem.put("message","未获取到数据");
|
|
||||||
// }
|
|
||||||
// jArr.add(printItem);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return AjaxResult.success("获取成功",jArr);
|
|
||||||
// }catch (Exception ex){
|
|
||||||
// ex.printStackTrace();
|
|
||||||
// return AjaxResult.error("获取失败");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return AjaxResult.error("获取失败");
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Log(title = "APP获取面单信息", businessType = BusinessType.OTHER)
|
@Log(title = "APP获取面单信息", businessType = BusinessType.OTHER)
|
||||||
@GetMapping("/realGetPrintList")
|
@GetMapping("/realGetPrintList")
|
||||||
public AjaxResult realGetPrintList(String billCode, String subBillCodeRange,String tplCode, String lang, String printType)
|
public AjaxResult realGetPrintList(String billCode, String subBillCodeRange,String tplCode, String lang, String printType)
|
||||||
@ -1275,60 +1160,6 @@ public class EmisWaybillController extends EmisBaseController
|
|||||||
jArr.add(printItem);
|
jArr.add(printItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
// JSONArray jArr = new JSONArray();
|
|
||||||
// String[] billCodeArr = billCode.split(",");
|
|
||||||
//
|
|
||||||
// for(String billCodeItem:billCodeArr) {
|
|
||||||
// Map<String, Object> order = emisBaseService.getWaybillPrintOrder(billCodeItem, billCodeRange,tplCode,lang, printType);
|
|
||||||
// JSONObject printItem = new JSONObject();
|
|
||||||
// printItem.put("billCode",billCodeItem);
|
|
||||||
// if(order!=null) {
|
|
||||||
//
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// String fileId = UUID.fastUUID().toString();
|
|
||||||
// String fileUploadDir = PayConfig.getUploadPath()+File.separator+DateUtils.datePath();
|
|
||||||
//
|
|
||||||
// File saveDir = new File(fileUploadDir);
|
|
||||||
// if(!saveDir.exists()){
|
|
||||||
// saveDir.mkdirs();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// String saveFileName = fileUploadDir+File.separator+fileId+".png";
|
|
||||||
//
|
|
||||||
// FileOutputStream os = new FileOutputStream(saveFileName);//输出流
|
|
||||||
// IXddTplPrint tplPrint = new TanexTplPrintImpl();
|
|
||||||
// tplPrint.genPNG(order, os);
|
|
||||||
//
|
|
||||||
// JSONObject jObjRemark = new JSONObject();
|
|
||||||
// jObjRemark.put("billCode",billCodeItem);
|
|
||||||
// jObjRemark.put("billCodeRange",billCodeRange);
|
|
||||||
// jObjRemark.put("lang",lang);
|
|
||||||
// jObjRemark.put("printType",printType);
|
|
||||||
//
|
|
||||||
// SysFileInfo sysFileInfo=sysFileInfoService.ossUploadLocalFile(saveFileName,billCodeItem,jObjRemark.toJSONString());
|
|
||||||
// String imageUrl = sysFileInfo.getFileRemoteUrl();
|
|
||||||
// printItem.put("imageUrl", imageUrl);
|
|
||||||
// printItem.put("result","success");
|
|
||||||
// printItem.put("message","success");
|
|
||||||
// }
|
|
||||||
// catch (Exception e)
|
|
||||||
// {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// printItem.put("imageUrl", "");
|
|
||||||
// printItem.put("result","fail");
|
|
||||||
// printItem.put("message","生成图片异常");
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// }else{
|
|
||||||
// printItem.put("result","fail");
|
|
||||||
// printItem.put("message","未获取到数据");
|
|
||||||
// }
|
|
||||||
// jArr.add(printItem);
|
|
||||||
// }
|
|
||||||
|
|
||||||
return AjaxResult.success("获取成功",jArr);
|
return AjaxResult.success("获取成功",jArr);
|
||||||
}catch (Exception ex){
|
}catch (Exception ex){
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
@ -1547,73 +1378,6 @@ public class EmisWaybillController extends EmisBaseController
|
|||||||
return AjaxResult.success(emisBaseService.selectLatestMonthCreateOrderMapList(emisWaybill));
|
return AjaxResult.success(emisBaseService.selectLatestMonthCreateOrderMapList(emisWaybill));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * 导出运单列表列表
|
|
||||||
// */
|
|
||||||
// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:export')")
|
|
||||||
// @Log(title = "运单列表", businessType = BusinessType.EXPORT)
|
|
||||||
// @PostMapping("/export")
|
|
||||||
// public void export(HttpServletResponse response, EmisWaybill emisWaybill)
|
|
||||||
// {
|
|
||||||
// List<EmisWaybill> list = emisWaybillService.selectEmisWaybillList(emisWaybill);
|
|
||||||
// ExcelUtil<EmisWaybill> util = new ExcelUtil<EmisWaybill>(EmisWaybill.class);
|
|
||||||
// util.exportExcel(response, list, "运单列表数据");
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取运单列表详细信息
|
|
||||||
*/
|
|
||||||
// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:query')")
|
|
||||||
// @GetMapping("/getInfoByBillCode")
|
|
||||||
// public AjaxResult getInfoByBillCode(String billCode)
|
|
||||||
// {
|
|
||||||
// return AjaxResult.success(emisWaybillService.selectEmisWaybillByBillCode(billCode));
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取运单列表详细信息
|
|
||||||
*/
|
|
||||||
// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:query')")
|
|
||||||
// @GetMapping(value = "/{id}")
|
|
||||||
// public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
||||||
// {
|
|
||||||
// return AjaxResult.success(emisWaybillService.selectEmisWaybillById(id));
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增运单列表
|
|
||||||
*/
|
|
||||||
// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:add')")
|
|
||||||
// @Log(title = "运单列表", businessType = BusinessType.INSERT)
|
|
||||||
// @PostMapping
|
|
||||||
// public AjaxResult add(@RequestBody EmisWaybill emisWaybill)
|
|
||||||
// {
|
|
||||||
// return toAjax(emisWaybillService.insertEmisWaybill(emisWaybill));
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改运单列表
|
|
||||||
*/
|
|
||||||
// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:edit')")
|
|
||||||
// @Log(title = "运单列表", businessType = BusinessType.UPDATE)
|
|
||||||
// @PutMapping
|
|
||||||
// public AjaxResult edit(@RequestBody EmisWaybill emisWaybill)
|
|
||||||
// {
|
|
||||||
// return toAjax(emisWaybillService.updateEmisWaybill(emisWaybill));
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除运单列表
|
|
||||||
*/
|
|
||||||
// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:remove')")
|
|
||||||
// @Log(title = "运单列表", businessType = BusinessType.DELETE)
|
|
||||||
// @DeleteMapping("/{ids}")
|
|
||||||
// public AjaxResult remove(@PathVariable Long[] ids)
|
|
||||||
// {
|
|
||||||
// return toAjax(emisWaybillService.deleteEmisWaybillByIds(ids));
|
|
||||||
// }
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
String fileUploadDir = "./upload"+File.separator+DateUtils.datePath();
|
String fileUploadDir = "./upload"+File.separator+DateUtils.datePath();
|
||||||
File saveDir = new File(fileUploadDir);
|
File saveDir = new File(fileUploadDir);
|
||||||
|
|||||||
@ -116,6 +116,9 @@ public class EmisTmsCostFeeServiceImpl implements IEmisTmsCostFeeService
|
|||||||
emisTmsCostFeeRelMapper.insertEmisTmsCostFeeRel(costFeeRelItem);
|
emisTmsCostFeeRelMapper.insertEmisTmsCostFeeRel(costFeeRelItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 总票数
|
||||||
|
emisTmsCostFee.setSendPieceSum(emisTmsCostFee.getBillRelList().size());
|
||||||
|
|
||||||
emisTmsCostFeeMapper.insertEmisTmsCostFee(emisTmsCostFee);
|
emisTmsCostFeeMapper.insertEmisTmsCostFee(emisTmsCostFee);
|
||||||
// 插入关联费用,只保存费用大于0的费用
|
// 插入关联费用,只保存费用大于0的费用
|
||||||
for (EmisTmsCostFeeFeeitem feeItem:emisTmsCostFee.getFeeItemList()) {
|
for (EmisTmsCostFeeFeeitem feeItem:emisTmsCostFee.getFeeItemList()) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user