md
This commit is contained in:
parent
779c82948a
commit
2eb08ebb77
@ -701,17 +701,43 @@ public class EmisWaybillController extends EmisBaseController
|
|||||||
if(billCodeArr.length>0){
|
if(billCodeArr.length>0){
|
||||||
IXddTplPrint xtp = new TanexSubBillPrintImpl();
|
IXddTplPrint xtp = new TanexSubBillPrintImpl();
|
||||||
for (String billCodeItem:billCodeArr) {
|
for (String billCodeItem:billCodeArr) {
|
||||||
// EmisWaybill emisWaybill= emisBaseService.getWaybillByBillCode(billCodeItem);
|
// 查询主单信息
|
||||||
// billSubCodeAllStr=billSubCodeAllStr+emisWaybill.getBillCodeSub()+",";
|
EmisWaybill emisWaybill = emisBaseService.getWaybillByBillCode(billCodeItem);
|
||||||
|
|
||||||
Map<String, Object> order = emisBaseService.getWaybillPrintOrder(billCodeItem, billCodeRange,tpCodeItem, "zh", "",printManCode);
|
// 获取所有子单号
|
||||||
String pdfBase64Data=xtp.genPDFBase64(order);
|
if(StringUtils.isEmpty(billCodeRange)) {
|
||||||
JSONObject jObj=new JSONObject();
|
billSubCodeAllStr = emisWaybill.getBillCodeSub() ;
|
||||||
jObj.put("result","success");
|
}else{
|
||||||
jObj.put("billCodeItem",billCodeItem);
|
String [] subRange=billCodeRange.split(",");
|
||||||
jObj.put("file",pdfBase64Data);
|
int start=Integer.valueOf(subRange[0]);
|
||||||
|
int end=emisWaybill.getParcelQty();
|
||||||
|
int len=subRange.length;
|
||||||
|
if(len>1){
|
||||||
|
end=Integer.valueOf(subRange[1]);
|
||||||
|
}
|
||||||
|
|
||||||
fileArrAll.add(jObj);
|
while (start<=end){
|
||||||
|
billSubCodeAllStr=billSubCodeAllStr+""+emisWaybill.getBillCode()+""+StringUtils.leftPad(start,4,'0')+",";
|
||||||
|
start++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// 循环子单
|
||||||
|
if(!StringUtils.isEmpty(billSubCodeAllStr)) {
|
||||||
|
String[] subCodArr=billSubCodeAllStr.split(",");
|
||||||
|
for (String item:subCodArr) {
|
||||||
|
if(!StringUtils.isEmpty(item)) {
|
||||||
|
Map<String, Object> order = emisBaseService.getWaybillPrintOrder(billCodeItem, billCodeRange, tpCodeItem, "zh", "", printManCode);
|
||||||
|
String pdfBase64Data = xtp.genPDFBase64(order);
|
||||||
|
JSONObject jObj = new JSONObject();
|
||||||
|
jObj.put("result", "success");
|
||||||
|
jObj.put("billCodeItem", item);
|
||||||
|
jObj.put("file", pdfBase64Data);
|
||||||
|
|
||||||
|
fileArrAll.add(jObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user