md
This commit is contained in:
parent
779c82948a
commit
2eb08ebb77
@ -701,17 +701,43 @@ public class EmisWaybillController extends EmisBaseController
|
||||
if(billCodeArr.length>0){
|
||||
IXddTplPrint xtp = new TanexSubBillPrintImpl();
|
||||
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);
|
||||
JSONObject jObj=new JSONObject();
|
||||
jObj.put("result","success");
|
||||
jObj.put("billCodeItem",billCodeItem);
|
||||
jObj.put("file",pdfBase64Data);
|
||||
// 获取所有子单号
|
||||
if(StringUtils.isEmpty(billCodeRange)) {
|
||||
billSubCodeAllStr = emisWaybill.getBillCodeSub() ;
|
||||
}else{
|
||||
String [] subRange=billCodeRange.split(",");
|
||||
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