md
This commit is contained in:
parent
bc1b816f30
commit
e6373e6ed0
@ -510,10 +510,6 @@ public class EmisWaybillController extends BaseController
|
|||||||
// 忽略错误
|
// 忽略错误
|
||||||
}
|
}
|
||||||
|
|
||||||
// String[] billCodeArr = billCode.split(",");
|
|
||||||
// for(String billCodeItemStr:billCodeArr) {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}catch (Exception ex){
|
}catch (Exception ex){
|
||||||
@ -524,6 +520,51 @@ public class EmisWaybillController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/getPrintDataByPrinter")
|
||||||
|
public AjaxResult getPrintDataByPrinter(HttpServletRequest request, HttpServletResponse response,String billCode, String billCodeRange, String lang, String printType)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(StringUtils.isEmpty(billCode)){
|
||||||
|
return AjaxResult.error("参数错误");
|
||||||
|
}
|
||||||
|
|
||||||
|
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, lang, printType);
|
||||||
|
JSONObject printItem = new JSONObject();
|
||||||
|
printItem.put("billCode",billCodeItem);
|
||||||
|
|
||||||
|
if(order!=null) {
|
||||||
|
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()));
|
||||||
|
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("获取失败");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void responseJson(HttpServletResponse response,String text){
|
private void responseJson(HttpServletResponse response,String text){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user