Commit 34a023c7 authored by zhangwanglin's avatar zhangwanglin

导出条件查询

parent 98760722
...@@ -144,20 +144,20 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService { ...@@ -144,20 +144,20 @@ public class SrvOrganEmpServiceImpl implements SrvOrganEmpService {
List<Long> organIds = organService.getOrganIds(organId, isInvolveChild); List<Long> organIds = organService.getOrganIds(organId, isInvolveChild);
List<SrvOrganEmpExportVo> srvOrganEmpExportList = chSrvOrganEmpMapper.getSrvOrganEmpExportList(organIds,srvOrganId, empName, srvOrganName, certifNum, isLock, empType); List<SrvOrganEmpExportVo> srvOrganEmpExportList = chSrvOrganEmpMapper.getSrvOrganEmpExportList(organIds,srvOrganId, empName, srvOrganName, certifNum, isLock, empType);
for (SrvOrganEmpExportVo record : srvOrganEmpExportList) { // for (SrvOrganEmpExportVo record : srvOrganEmpExportList) {
StringBuilder stringBuilder = new StringBuilder(); // StringBuilder stringBuilder = new StringBuilder();
if(record == null){ // if(record == null){
break; // break;
} // }
if(StringUtils.isEmpty(record.getProvincial())){ // if(StringUtils.isEmpty(record.getProvincial())){
stringBuilder.append("--"); // stringBuilder.append("--");
}else if( record.getProvincial().equals(record.getCity())){ // }else if( record.getProvincial().equals(record.getCity())){
stringBuilder.append(record.getProvincial()); // stringBuilder.append(record.getProvincial());
}else { // }else {
stringBuilder.append(record.getProvincial()).append(record.getCity()); // stringBuilder.append(record.getProvincial()).append(record.getCity());
} // }
record.setProvinCialcityArea(stringBuilder.toString()); // record.setProvinCialcityArea(stringBuilder.toString());
} // }
ExportParams exportParams = new ExportParams(); ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF); // 对应xlsx exportParams.setType(ExcelType.XSSF); // 对应xlsx
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, SrvOrganEmpExportVo.class, srvOrganEmpExportList); Workbook workbook = ExcelExportUtil.exportExcel(exportParams, SrvOrganEmpExportVo.class, srvOrganEmpExportList);
......
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
T5.ORGAN_NAME organName, T5.ORGAN_NAME organName,
T4.UNIFIED_SOCIAL_CREDIT_CODE unifiedSocialCreditCode, T4.UNIFIED_SOCIAL_CREDIT_CODE unifiedSocialCreditCode,
T1.EMP_NAME empName, T1.EMP_NAME empName,
T1.GENDER gender, DECODE(T1.gender, 'M','男','F', '女','N', '不确定') gender,
T1.AGE age, T1.AGE age,
T1.CERTIF_TYPE certifType, T1.CERTIF_TYPE certifType,
T1.CERTIF_NUM certifNum, T1.CERTIF_NUM certifNum,
......
...@@ -692,14 +692,14 @@ public class TaskController { ...@@ -692,14 +692,14 @@ public class TaskController {
* @param city 失能人员所在市 * @param city 失能人员所在市
* @param area 失能人员所在区 * @param area 失能人员所在区
* @param organName 评定机构名称 * @param organName 评定机构名称
* @param name 评定人员姓名 * @param realName 评定人员姓名
* @param tel 评定人员手机号码 * @param tel 评定人员手机号码
* @param groupLeader 是否组长0组长,1非组长 * @param groupLeader 是否组长0组长,1非组长
*/ */
@GetMapping("/aprEmpExport") @GetMapping("/aprEmpExport")
public void aprEmpExport(String provincial, String city, String area, String organName, String name, String tel, String groupLeader,HttpServletResponse response){ public void aprEmpExport(String provincial, String city, String area, String organName, String realName, String tel, String certiCode,String isLock,String empType,String groupLeader,HttpServletResponse response){
Workbook workbook = taskService.aprEmpExport(provincial, city, area, organName, name, Workbook workbook = taskService.aprEmpExport(provincial, city, area, organName, realName,
tel, groupLeader); tel,certiCode,isLock,empType, groupLeader);
// 命名表格 // 命名表格
String fileName = "aprEmp.xlsx"; String fileName = "aprEmp.xlsx";
FileUtils.exportResponse(workbook,fileName,response); FileUtils.exportResponse(workbook,fileName,response);
......
...@@ -75,7 +75,7 @@ public interface TaskMapper extends BaseMapper<ChAprTask> { ...@@ -75,7 +75,7 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
Page<TaskGroupInfoByPageVO> taskGroupInfoListByPage(String aprEmpId, String appointStartTime, String appointEndTime, String queryBeginDate, String queryEndDate, String groupNo, Integer pageNo, Integer pageSize); Page<TaskGroupInfoByPageVO> taskGroupInfoListByPage(String aprEmpId, String appointStartTime, String appointEndTime, String queryBeginDate, String queryEndDate, String groupNo, Integer pageNo, Integer pageSize);
List<AprEmpExportVO> aprEmpExportList(String provincial, String city, String area, String organName, String name, String tel, String groupLeader); List<AprEmpExportVO> aprEmpExportList(String provincial, String city, String area, String organName, String name, String tel, String certiCode,String isLock,String empType, String groupLeader);
int insertSrvSend(Integer disableInfoId); int insertSrvSend(Integer disableInfoId);
} }
...@@ -88,7 +88,7 @@ public interface TaskService { ...@@ -88,7 +88,7 @@ public interface TaskService {
Map taskReportFractionDtlQueryList(); Map taskReportFractionDtlQueryList();
Workbook aprEmpExport(String provincial, String city, String area, String organName, String name, String tel, String groupLeader); Workbook aprEmpExport(String provincial, String city, String area, String organName, String name, String tel, String certiCode,String isLock,String empType, String groupLeader);
void assessAccount(ReportDetailVO reportDetailVo); void assessAccount(ReportDetailVO reportDetailVo);
......
...@@ -826,8 +826,8 @@ public class TaskServiceImpl implements TaskService { ...@@ -826,8 +826,8 @@ public class TaskServiceImpl implements TaskService {
} }
@Override @Override
public Workbook aprEmpExport(String provincial, String city, String area, String organName, String name, String tel, String groupLeader) { public Workbook aprEmpExport(String provincial, String city, String area, String organName, String name, String tel, String certiCode,String isLock,String empType, String groupLeader) {
List<AprEmpExportVO> aprEmpExportList = taskMapper.aprEmpExportList(provincial, city, area, organName, name, tel, groupLeader); List<AprEmpExportVO> aprEmpExportList = taskMapper.aprEmpExportList(provincial, city, area, organName, name, tel,certiCode, isLock,empType, groupLeader);
for (AprEmpExportVO record : aprEmpExportList) { for (AprEmpExportVO record : aprEmpExportList) {
StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder = new StringBuilder();
if(org.springframework.util.StringUtils.isEmpty(record.getDistrictProvincial())){ if(org.springframework.util.StringUtils.isEmpty(record.getDistrictProvincial())){
......
...@@ -495,7 +495,9 @@ ...@@ -495,7 +495,9 @@
emp.AGE age, emp.AGE age,
emp.certi_code certiCode, emp.certi_code certiCode,
emp.tel tel, emp.tel tel,
DECODE(emp.Group_leader, '0','组长','1', '非组长') groupLeader DECODE(emp.EMP_TYPE, '0','评定人员','1', '管理人员','2','医生','3','护士') empType,
DECODE(emp.Group_leader, '0','组长','1', '非组长') groupLeader,
DECODE(emp.IS_LOCK, '0','有效','1', '失效') isLock
FROM ch_apr_emp emp FROM ch_apr_emp emp
LEFT JOIN ch_apr_organ organ ON emp.apr_organ_id = organ.apr_organ_id LEFT JOIN ch_apr_organ organ ON emp.apr_organ_id = organ.apr_organ_id
LEFT JOIN ch_srv_organ srvOrgan ON organ.organ_id = srvOrgan.srv_organ_id LEFT JOIN ch_srv_organ srvOrgan ON organ.organ_id = srvOrgan.srv_organ_id
...@@ -516,12 +518,21 @@ ...@@ -516,12 +518,21 @@
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and emp.real_name like CONCAT(CONCAT('%',#{name}) ,'%') and emp.real_name like CONCAT(CONCAT('%',#{name}) ,'%')
</if> </if>
<if test="certiCode != null and certiCode != ''">
and emp.certi_code = #{certiCode}
</if>
<if test="tel != null and tel != ''"> <if test="tel != null and tel != ''">
and emp.tel = #{tel} and emp.tel = #{tel}
</if> </if>
<if test="groupLeader != null and groupLeader != ''"> <if test="groupLeader != null and groupLeader != ''">
and emp.group_leader = #{groupLeader} and emp.group_leader = #{groupLeader}
</if> </if>
<if test="empType != null and empType != ''">
and emp.emp_type = #{empType}
</if>
<if test="isLock != null and isLock != ''">
and emp.is_lock = #{isLock}
</if>
</where> </where>
</select> </select>
......
...@@ -41,9 +41,15 @@ public class AprEmpExportVO { ...@@ -41,9 +41,15 @@ public class AprEmpExportVO {
@Excel(name = "评定人员手机号码",width = 20) @Excel(name = "评定人员手机号码",width = 20)
private String tel; private String tel;
@Excel(name = "人员类型",width = 20)
private String empType;
@Excel(name = "是否组长") @Excel(name = "是否组长")
private String groupLeader; private String groupLeader;
@Excel(name = "状态")
private String isLock;
private String districtCity; private String districtCity;
} }
...@@ -15,8 +15,10 @@ public class SrvOrganEmpExportVo { ...@@ -15,8 +15,10 @@ public class SrvOrganEmpExportVo {
@Excel(name = "适用机构名称",width = 20) @Excel(name = "适用机构名称",width = 20)
private String organName; private String organName;
/*
@Excel(name = "机构地址",width = 20) @Excel(name = "机构地址",width = 20)
private String provinCialcityArea; private String provinCialcityArea;
*/
@Excel(name = "护理机构名称",width = 20) @Excel(name = "护理机构名称",width = 20)
private String srvOrganName; private String srvOrganName;
...@@ -24,8 +26,24 @@ public class SrvOrganEmpExportVo { ...@@ -24,8 +26,24 @@ public class SrvOrganEmpExportVo {
@Excel(name = "统一社会信用代码",width = 20) @Excel(name = "统一社会信用代码",width = 20)
private String unifiedSocialCreditCode; private String unifiedSocialCreditCode;
@Excel(name = "联系人姓名",width = 20)
private String linkName; @Excel(name = "护理人员姓名",width = 20)
private String empName;
@Excel(name = "护理人员性别")
private String gender;
@Excel(name = "护理人员年龄")
private String age;
@Excel(name = "护理人员证件号码",width = 20)
private String certifNum;
@Excel(name = "护理人员手机号码" ,width = 20)
private String mobilePhone;
/* @Excel(name = "联系人姓名",width = 20)
private String linkName;*/
@Excel(name = "联系人电话",width = 20) @Excel(name = "联系人电话",width = 20)
......
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