Commit a0c03fec authored by 周健威's avatar 周健威

修改保险

parent c639ac78
......@@ -61,11 +61,11 @@ public class CommonBaseController {
}
}
public void export(Logger log, Map<String, Object> headerAlias, Supplier<List<Map>> function, String title) throws Exception {
public void export(Logger log, Map<String, Object> headerAlias, Supplier<List<Map>> function, String fileName) throws Exception {
HttpServletResponse httpServletResponse = getResponse();
ExcelWriter writer = ExcelUtil.getWriter(true);
if(StrUtil.isBlank(title)) {
title = System.currentTimeMillis()+ "";
if(StrUtil.isBlank(fileName)) {
fileName = System.currentTimeMillis()+ "";
}
try {
......@@ -89,7 +89,7 @@ public class CommonBaseController {
log.info("list: {} ", JSONUtil.toJsonStr(list));
writer.write(list);
httpServletResponse.setContentType("application/octet-stream;charset=utf-8");
httpServletResponse.setHeader("Content-Disposition","attachment;filename="+ URLEncoder.encode(title+ ".xlsx","utf-8"));
httpServletResponse.setHeader("Content-Disposition","attachment;filename="+ URLEncoder.encode(fileName+ ".xlsx","utf-8"));
writer.flush(httpServletResponse.getOutputStream());
}catch (Exception ex) {
log.error(ex.getMessage(), ex);
......@@ -99,10 +99,10 @@ public class CommonBaseController {
}
}
public <T>void exportBean(Logger log, T headerAlias, Supplier<List<Map>> function, String title) throws Exception {
public <T>void exportBean(Logger log, T headerAlias, Supplier<List<Map>> function, String fileName) throws Exception {
export(log, BeanUtil.beanToMap(headerAlias), ()->
function.get()
, title);
, fileName);
}
}
......@@ -68,6 +68,7 @@ public class PgOrderPersonInsuranceController extends BaseController<OrderPerson
List<OrderPersonInsurance> bgList = baseBiz.selectInsuranceInfo(dto);
List<Map> list = CollUtil.newArrayList();
bgList.forEach(vo -> {
//OrderNo Name IdCard
PageExportDTO ped = BeanUtil.toBean(vo, PageExportDTO.class);
switch (vo.getStatus()) {
case OrderPersonInsurance.STATUS_PAY:
......
......@@ -21,12 +21,20 @@
<select id="selectOrderInfo" resultType="com.xxfc.platform.order.pojo.personinsurance.BgPageVO">
select distinct ob.no, ob.insure_pic
<include refid="commonFromWhere"></include>
order by
ob.no desc
</select>
<select id="selectInsuranceInfo" resultType="com.xxfc.platform.order.entity.OrderPersonInsurance">
select opi.*
<include refid="commonFromWhere"></include>
order by
ob.no desc
</select>
<sql id="commonFromWhere">
......
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