记得上下班打卡 | git大法好,push需谨慎

Commit c9d23f8a authored by jiangxiulong's avatar jiangxiulong

批量打印更改

parent 371371a2
......@@ -135,21 +135,21 @@
return str
}
function printExpressData(dataInfo, jContact, jAddress, jTel) {
function printExpressData(dataInfo, jContact, jAddress, jTel, index, listLen) {
var LODOP = getLodop();
LODOP.PRINT_INIT("运单打印");
// LODOP.SET_PRINT_PAGESIZE(1, 0, 0, "100mm*148mm");
// LODOP.ADD_PRINT_TEXT(22, 115, 200, 20, "打印时间:" + getNowFormatDate());
// LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
// LODOP.SET_PRINT_STYLEA(0, "FontSize", 5);
LODOP.ADD_PRINT_TEXT(22, 115, 200, 20, "打印时间:" + getNowFormatDate());
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
LODOP.SET_PRINT_STYLEA(0, "FontSize", 5);
// LODOP.ADD_PRINT_TEXT(32, 115, 200, 20, "第1次打印");
// LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
// LODOP.SET_PRINT_STYLEA(0, "FontSize", 5);
// LODOP.ADD_PRINT_TEXT(98, 55, 42, 20, "1/1");
// LODOP.ADD_PRINT_TEXT(98, 55, 42, 20, index + "/" + listLen); //子母单
LODOP.ADD_PRINT_TEXT(60, 20, 100, 20, "FQ");
// LODOP.ADD_PRINT_TEXT(32, 190, 200, 20, "序号1");
// LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
// LODOP.SET_PRINT_STYLEA(0, "FontSize", 5);
LODOP.ADD_PRINT_TEXT(32, 190, 200, 20, "第" + index + "/" + listLen + "个");
LODOP.SET_PRINT_STYLEA(0, "FontName", "黑体");
LODOP.SET_PRINT_STYLEA(0, "FontSize", 5);
LODOP.ADD_PRINT_BARCODE(45, 55, "80mm", "13mm", "128Auto", dataInfo.mailno);
LODOP.SET_PRINT_STYLEA(0, "ShowBarText", 0);
LODOP.ADD_PRINT_TEXT(98, 95, 500, 15, "运单号 " + substrMailno(dataInfo.mailno));
......@@ -302,7 +302,7 @@
var jTel = result.data.jtel;
if (listLen > 0) {
$.each(expressList, function (index, value) {
printExpressData(value, jContact, jAddress, jTel);
printExpressData(value, jContact, jAddress, jTel, index+1, listLen);
});
}
$.modal.closeLoading();
......
......@@ -23,6 +23,7 @@ import com.liquidnet.service.kylin.entity.*;
import com.liquidnet.service.kylin.mapper.*;
import com.liquidnet.service.kylin.service.IKylinOrderExpress;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
......@@ -633,33 +634,31 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
}
public KylinOrderExpressPrintVo batchPrintExpress(String performanceId) {
List<OrderExpressListDao> newList = new ArrayList<>();
int count = 0;
int limitNum = 20;
int limitNum = 1;
int mid = 0;
do {
/*List<KylinOrderRefunds> list = kylinOrderExpressMapper.selectPrintList(whereType, refundBatchId, whereStatus, mid, limitNum);
List<OrderExpressListDao> list = kylinOrderExpressMapper.selectPrintListOfPerformanceId(performanceId, mid, limitNum);
List<String> ids = performanceExpressSearchAdminParam.getIds();
if (!CollectionUtil.isEmpty(list)) {
newList.addAll(list);
List<OrderExpressListDao> list = kylinOrderExpressMapper.selectPrintList(ids);
count = list.size();
OrderExpressListDao lastInfo = list.get(count - 1);
mid = lastInfo.getMid();
} else {
count = 0;
}
} while (count >= limitNum);
KylinOrderExpressPrintVo kylinOrderExpressPrintVo = new KylinOrderExpressPrintVo();
kylinOrderExpressPrintVo.setExpressList(list);
kylinOrderExpressPrintVo.setExpressList(newList);
kylinOrderExpressPrintVo.setJContact(jContact);
kylinOrderExpressPrintVo.setJAddress(jAddress);
kylinOrderExpressPrintVo.setJTel(jTel);
return kylinOrderExpressPrintVo;
count = refundList.size();
if (count > 0) {
KylinOrderRefunds lastInfo = refundList.get(count - 1);
if (lastInfo != null) {
mid = lastInfo.getMid();
}
}*/
} while (count >= limitNum);
return null;
}
}
......@@ -7,6 +7,7 @@ import java.math.BigDecimal;
@Data
public class OrderExpressListDao implements Serializable {
private Integer mid;
private String orderExpressId;
private String orderTicketsId;
private String orderExpressCode;
......
......@@ -19,4 +19,9 @@ public interface KylinOrderExpressMapper extends BaseMapper<KylinOrderExpress> {
List<OrderExpressListDao> selectPrintList(@Param("ids") List<String> ids);
List<OrderExpressListDao> selectPrintListOfPerformanceId(
@Param("performanceId") String performanceId,
@Param("mid") Integer mid,
@Param("limitNum") Integer limitNum
);
}
......@@ -18,6 +18,24 @@
${orderExpressId}
</foreach>
</where>
ORDER BY mid DESC
ORDER BY a.mid DESC
</select>
<select id="selectPrintListOfPerformanceId" resultType="com.liquidnet.service.kylin.dao.OrderExpressListDao">
SELECT a.*,
b.express_contacts, b.express_address, b.express_phone, b.province, b.city, b.county, b.number,
d.use_start, d.title AS time_title, d.type AS time_type,
e.title AS tickets_title, e.type AS tickets_type
FROM kylin_order_express a
INNER JOIN kylin_order_tickets b ON a.order_tickets_id = b.order_tickets_id
INNER JOIN kylin_order_ticket_relations c ON b.order_tickets_id = c.order_id
INNER JOIN kylin_ticket_times d ON c.time_id = d.ticket_times_id
INNER JOIN kylin_tickets e ON c.ticket_id = e.tickets_id
<where>
a.express_status = 2
AND a.performances_id = #{performanceId}
AND a.mid > ${mid}
</where>
ORDER BY a.mid ASC
LIMIT ${limitNum}
</select>
</mapper>
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