Commit 4950d20a authored by zhengyi's avatar zhengyi

线路价格导出的bug修复

parent eb03dd14
......@@ -287,17 +287,26 @@
<if test="params.startCityId != null">
and ew_start.shi = #{params.startCityId}
</if>
<if test="params.destCityId != null">
and ew_dest.shi = #{params.destCityId}
<if test="params.destCityId != null and params.destCityId.size()>0 ">
and ew_dest.`shi` in
<foreach item='destCity' index='index' collection='params.destCityId' open='(' separator=',' close=')'>
#{destCity}
</foreach>
</if>
<!--目的国-->
<if test="params.destCountryId != null">
and ew_dest.guojia=#{params.destCountryId}
<if test="params.destCountryId != null and params.destCountryId.size()>0 ">
and ew_dest.`guojia` in
<foreach item='destCountry' index='index' collection='params.destCountryId' open='(' separator=',' close=')'>
#{destCountry}
</foreach>
</if>
<!--目的仓-->
<if test="params.destWarehouseId != null">
and ew_dest.id=#{params.destWarehouseId}
<if test="params.destWarehouseId != null and params.destWarehouseId.size()>0 ">
and ew_dest.`id` in
<foreach item='destWarehouse' index='index' collection='params.destWarehouseId' open='(' separator=',' close=')'>
#{destWarehouse}
</foreach>
</if>
<if test="params.blacklist != null">
......@@ -416,17 +425,26 @@
<if test="params.startCityId != null">
and ew_start.shi = #{params.startCityId}
</if>
<if test="params.destCityId != null">
and ew_dest.shi = #{params.destCityId}
<if test="params.destCityId != null and params.destCityId.size()>0 ">
and ew_dest.`shi` in
<foreach item='destCity' index='index' collection='params.destCityId' open='(' separator=',' close=')'>
#{destCity}
</foreach>
</if>
<!--目的国-->
<if test="params.destCountryId != null">
and ew_dest.guojia=#{params.destCountryId}
<if test="params.destCountryId != null and params.destCountryId.size()>0 ">
and ew_dest.`guojia` in
<foreach item='destCountry' index='index' collection='params.destCountryId' open='(' separator=',' close=')'>
#{destCountry}
</foreach>
</if>
<!--目的仓-->
<if test="params.destWarehouseId != null">
and ew_dest.id=#{params.destWarehouseId}
<if test="params.destWarehouseId != null and params.destWarehouseId.size()>0 ">
and ew_dest.`id` in
<foreach item='destWarehouse' index='index' collection='params.destWarehouseId' open='(' separator=',' close=')'>
#{destWarehouse}
</foreach>
</if>
<if test="params.blacklist != null">
......
......@@ -126,11 +126,9 @@ public class ShipmentReceivableExcelExportListener2 {
} else {
if (warehouseLineDO.getTzName().equals("广州市捷道国际货运代理有限公司")) {
sTemName = "/nrlyReceivable2.xlsx";
}
else if (warehouseLineDO.getTzName().equals("广州市捷佳国际货运代理有限公司")) {
} else if (warehouseLineDO.getTzName().equals("广州市捷佳国际货运代理有限公司")) {
sTemName = "/nrlyReceivable3.xlsx";
}
else if (warehouseLineDO.getTzName().equals("义乌市捷道国际货运代理有限公司")) {
} else if (warehouseLineDO.getTzName().equals("义乌市捷道国际货运代理有限公司")) {
sTemName = "/nrlyReceivable4.xlsx";
} else {
sTemName = "/nrlyReceivable2.xlsx";
......@@ -299,11 +297,11 @@ public class ShipmentReceivableExcelExportListener2 {
Long orderId = entry.getKey();
OrderBackInfoDto orderInfo = orderQueryService.info(orderId);
Map<String, Object> map = new HashMap<>();
map.put("consigneeName", Objects.nonNull(orderInfo.getConsigneeVO())? orderInfo.getConsigneeVO().getName():"");
map.put("consigneeName", Objects.nonNull(orderInfo.getConsigneeVO()) ? orderInfo.getConsigneeVO().getName() : "");
map.put("mark", orderInfo.getMarks());
map.put("orderNo", orderInfo.getOrderNo());
map.put("tidanNo", orderInfo.getTidanNo());
map.put("consigneePhone", Objects.nonNull(orderInfo.getConsigneeVO())? ("+".concat(orderInfo.getConsigneeVO().getCountryCode()).concat(orderInfo.getConsigneeVO().getPhone())): "");
map.put("consigneePhone", Objects.nonNull(orderInfo.getConsigneeVO()) ? ("+".concat(orderInfo.getConsigneeVO().getCountryCode()).concat(orderInfo.getConsigneeVO().getPhone())) : "");
//todo 计算应收明细的核销比例,待测试,未减优惠金额
List<ReceivableOrderPayedFeeTypeVO> payedFeeTypeVOList = receivableService.getPayedMoneyByFeeType(orderId);
//应收运费
......@@ -537,8 +535,8 @@ public class ShipmentReceivableExcelExportListener2 {
stringBuffer.append(currencyMap.get(otherMainCurrency)).append(":").append(sum4).append(" ").append(currencyMap.get(otherAssisCurrency)).append(":").append(sum5);
}
headMap.put("otherFee", stringBuffer.toString());
headMap.put("otherFeeMain", currencyMap.get(otherMainCurrency)+":"+sum4);
headMap.put("otherFeeAssis", currencyMap.get(otherAssisCurrency)+":"+sum5);
headMap.put("otherFeeMain", currencyMap.get(otherMainCurrency) + ":" + sum4);
headMap.put("otherFeeAssis", currencyMap.get(otherAssisCurrency) + ":" + sum5);
File fileDir = new File(dir);
if (!fileDir.exists()) {
// 不存在则创建一个目录
......@@ -583,7 +581,7 @@ public class ShipmentReceivableExcelExportListener2 {
//业务数据从12行开始,22列为是否控货
Font font = workbook.createFont();
font.setColor(Font.COLOR_RED); //红色
CellStyle cellStyle=workbook.createCellStyle();
CellStyle cellStyle = workbook.createCellStyle();
cellStyle.setFont(font);
cellStyle.setAlignment(HorizontalAlignment.CENTER);
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
......@@ -592,9 +590,9 @@ public class ShipmentReceivableExcelExportListener2 {
cellStyle.setBorderRight(BorderStyle.THIN);
cellStyle.setBorderTop(BorderStyle.THIN);
for (int i = 0; i < list.size(); i++) {
if (poiSheet.getRow(i+12).getCell(22).getStringCellValue().equals("YES")) {
if (poiSheet.getRow(i + 12).getCell(22).getStringCellValue().equals("YES")) {
for (int i1 = 0; i1 < 29; i1++) {
poiSheet.getRow(i+12).getCell(i1).setCellStyle(cellStyle);
poiSheet.getRow(i + 12).getCell(i1).setCellStyle(cellStyle);
}
}
}
......@@ -620,8 +618,7 @@ public class ShipmentReceivableExcelExportListener2 {
event.setFileId(fileDO.getId());
} catch (Exception e) {
e.printStackTrace();
event.setResult(e.getMessage());
event.setResult(e + "");
}
} else {
event.setResult("param fail");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment