Browse Source

Merge remote-tracking branch 'origin/dev_move_out_of' into dev_move_out_of

dev
yinzuomei 3 years ago
parent
commit
ffaf0a5567
  1. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcBirthRecordController.java
  2. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcBirthRecordExcel.java
  3. 18
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcMoveInRecordExcel.java
  4. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcBirthRecordServiceImpl.java
  5. 19
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcMoveInRecordServiceImpl.java

1
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcBirthRecordController.java

@ -110,6 +110,7 @@ public class IcBirthRecordController {
item.setIndex(i.getAndIncrement());
});
excelWriter.write(list, writeSheet);
formDTO.setPageNo(pageNo++);
} while (CollectionUtils.isNotEmpty(page.getList()) && page.getList().size() == formDTO.getPageSize());
} catch (Exception e) {
log.error("export exception", e);

7
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcBirthRecordExcel.java

@ -6,6 +6,8 @@ import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import lombok.Data;
import java.io.Serializable;
/**
* 出生管理
*
@ -14,8 +16,9 @@ import lombok.Data;
*/
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44)
@Data
public class IcBirthRecordExcel {
public class IcBirthRecordExcel implements Serializable {
private static final long serialVersionUID = 4539449621014654213L;
@ColumnWidth(10)
@ExcelProperty(value = "序号",order = 1)
private Integer index;
@ -72,4 +75,4 @@ public class IcBirthRecordExcel {
@ExcelProperty(value = "与户主关系",order = 1)
private String householderRelation;
}
}

18
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcMoveInRecordExcel.java

@ -2,10 +2,13 @@ package com.epmet.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
@ -14,11 +17,14 @@ import java.util.Date;
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-05-09
*/
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 44)
@Data
public class IcMoveInRecordExcel {
public class IcMoveInRecordExcel implements Serializable {
private static final long serialVersionUID = -12110233388005838L;
@ExcelProperty(value = "姓名")
@Excel(name = "姓名")
@ColumnWidth(20)
private String name;
@ExcelProperty(value = "所属网格")
@ -32,11 +38,11 @@ public class IcMoveInRecordExcel {
private String allName;
@ExcelProperty(value = "手机号")
@Excel(name = "手机号")
@ColumnWidth(20)
private String mobile;
@ExcelProperty(value = "身份证号")
@ColumnWidth(20)
@ColumnWidth(25)
@Excel(name = "身份证号")
private String idCard;
@ -51,7 +57,7 @@ public class IcMoveInRecordExcel {
@ExcelProperty(value = "迁入时间")
@ColumnWidth(20)
@Excel(name = "迁入时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat("yyyy-MM-dd")
private Date inTime;
@ExcelProperty(value = "迁入原因")
@ -80,4 +86,4 @@ public class IcMoveInRecordExcel {
private String householderRelationName;
}
}

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcBirthRecordServiceImpl.java

@ -70,7 +70,7 @@ public class IcBirthRecordServiceImpl extends BaseServiceImpl<IcBirthRecordDao,
throw new EpmetException("获取工作人员信息失败");
}
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage());
LambdaQueryWrapper<IcBirthRecordEntity> wrapper = getWrapper(formDTO, staffInfo);
List<IcBirthRecordEntity> entityList = baseDao.selectList(wrapper);
PageInfo<IcBirthRecordEntity> pageInfo = new PageInfo<>(entityList);
@ -283,4 +283,4 @@ public class IcBirthRecordServiceImpl extends BaseServiceImpl<IcBirthRecordDao,
icUserTransferRecordService.moveResi(transfer);
}
}
}

19
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcMoveInRecordServiceImpl.java

@ -80,17 +80,12 @@ public class IcMoveInRecordServiceImpl extends BaseServiceImpl<IcMoveInRecordDao
@Override
public IcMoveInListResultDTO list(IcMoveInListFormDTO formDTO) {
IcMoveInListResultDTO resultDTO = new IcMoveInListResultDTO();
//导出查询
if (formDTO.getIsPage()) {
List<IcMoveInListResultDTO.IcMoveInList> list = baseDao.selectMoveInList(formDTO);
resultDTO.setList(list);
} else {
//列表查询
PageInfo<IcMoveInListResultDTO.IcMoveInList> data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize())
.doSelectPageInfo(() -> baseDao.selectMoveInList(formDTO));
resultDTO.setTotal((int) data.getTotal());
resultDTO.setList(data.getList());
}
//列表/导出查询
PageInfo<IcMoveInListResultDTO.IcMoveInList> data = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage())
.doSelectPageInfo(() -> baseDao.selectMoveInList(formDTO));
resultDTO.setTotal((int) data.getTotal());
resultDTO.setList(data.getList());
//查询封装房屋信息
if (!CollectionUtils.isEmpty(resultDTO.getList())) {
Map<String, String> map = new HashMap<>();
@ -300,4 +295,4 @@ public class IcMoveInRecordServiceImpl extends BaseServiceImpl<IcMoveInRecordDao
return resultDTO;
}
}
}

Loading…
Cancel
Save