提交代码

dev-discount
胡锐 2 years ago
parent 0db0a88679
commit 0bdbf61225
  1. 6
      hai-service/src/main/java/com/hai/config/SpPrinterTemplate.java
  2. 4
      hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java
  3. 27
      hai-service/src/main/java/com/hai/dao/HighGasClassGroupTaskMapperExt.java

@ -30,14 +30,14 @@ public class SpPrinterTemplate {
"退款升数汇总:" + dataCount.getRefundLiters() + "升<BR>" +
"<BR>" +
"--------------收款-------------<BR>" +
"油号 金额 升数 笔数<BR>";
"油号 金额(元) 升数 笔数<BR>";
String oilCountStr = "";
for (GasClassGroupTaskOilCount oilCount : dataCount.getGroupTaskOilCountList()) {
oilCountStr += oilCount.getOilNo() + "# " + oilCount.getRefuelPrice() + " " + oilCount.getRefuelLiters() + " " + oilCount.getRefuelNum() + "<BR>";
oilCountStr += oilCount.getOilNo() + "# " + oilCount.getRefuelPrice() + " " + oilCount.getRefuelLiters() + " " + oilCount.getRefuelNum() + "<BR>";
}
str += oilCountStr +
"==============================<BR>" +
"================================<BR>" +
"<C>" + DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss") +"</C> <BR>";
return str;
}

@ -59,11 +59,11 @@ public class ZkcPrinterTemplate {
stream.write("--------------收款--------------".getBytes("UTF-8"));
stream.write(0x0A);
stream.write("油号 金额 升数 笔数".getBytes("UTF-8"));
stream.write("油号 金额(元) 升数 笔数".getBytes("UTF-8"));
stream.write(0x0A);
for (GasClassGroupTaskOilCount oilCount : dataCount.getGroupTaskOilCountList()) {
stream.write((oilCount.getOilNo() + "# " + oilCount.getRefuelPrice() + " " + oilCount.getRefuelNum() + " " + oilCount.getRefuelLiters() + "笔").getBytes("UTF-8"));
stream.write((oilCount.getOilNo() + "# " + oilCount.getRefuelPrice() + " " + oilCount.getRefuelLiters() + " " + oilCount.getRefuelNum()).getBytes("UTF-8"));
stream.write(0x0A);
}
stream.write("================================".getBytes("UTF-8"));

@ -17,21 +17,23 @@ public interface HighGasClassGroupTaskMapperExt {
" COUNT(1) refuelNum," +
" case when SUM(a.gas_oil_liters) is not null then SUM(a.gas_oil_liters) else 0 end refuelLiters" +
" from high_child_order a" +
" where goods_type = 3 " +
" and gas_class_group_task_id = #{gasClassGroupTaskId} " +
" and child_orde_status in (2,3)" +
" LEFT JOIN high_order b on b.id = a.order_id" +
" where a.goods_type = 3 " +
" and a.gas_class_group_task_id = #{gasClassGroupTaskId} " +
" and b.order_status in (2,3)" +
"</script>")
Map<String, Object> countRefuelData(@Param("gasClassGroupTaskId") Long gasClassGroupTaskId);
@Select("<script>" +
" select " +
" case when SUM(a.total_price) is not null then SUM(a.total_price) else 0 end refundPrice," +
" COUNT(1) refundNum," +
" case when SUM(a.gas_oil_liters) is not null then SUM(a.gas_oil_liters) else 0 end refundLiters" +
" from high_child_order a" +
" where goods_type = 3 " +
" and gas_class_group_task_id = #{gasClassGroupTaskId} " +
" and child_orde_status in (4)" +
" select" +
" case when SUM(a.total_price) is not null then SUM(a.total_price) else 0 end refundPrice," +
" COUNT(1) refundNum," +
" case when SUM(a.gas_oil_liters) is not null then SUM(a.gas_oil_liters) else 0 end refundLiters" +
" from high_child_order a" +
" LEFT JOIN high_order b on b.id = a.order_id" +
" where a.goods_type = 3 " +
" and a.gas_class_group_task_id = #{gasClassGroupTaskId}" +
" and b.order_status in (4)" +
"</script>")
Map<String, Object> countRefundData(@Param("gasClassGroupTaskId") Long gasClassGroupTaskId);
@ -48,7 +50,8 @@ public interface HighGasClassGroupTaskMapperExt {
" COUNT(1) refuelNum," +
" case when SUM(a.gas_oil_liters) is not null then SUM(a.gas_oil_liters) else 0 end refuelLiters" +
" from high_child_order a" +
" where gas_class_group_task_id = #{gasClassGroupTaskId} and goods_type = 3 and child_orde_status in (2,3)" +
" LEFT JOIN high_order b on b.id = a.order_id" +
" where a.gas_class_group_task_id = #{gasClassGroupTaskId} and a.goods_type = 3 and b.order_status in (2,3)" +
" GROUP BY a.gas_oil_no) b on b.gas_oil_no = a.oil_no" +
" WHERE a.merchant_store_id = #{gasId} and <![CDATA[ `status` <> 0 ]]> " +
"</script>")

Loading…
Cancel
Save