Commit 33db7c9e authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.6.6' into MVP1.6.6

parents 72a94d99 70bcb1cf
......@@ -249,7 +249,8 @@ public class TEmployeeContractInfo extends BaseEntity {
private String settleDomain;
/**
* 员工类型
* 员工类型_
* 其实是:合同类型。hgw 2024-7-9 11:45:59 验证
*/
@ExcelAttribute(name = "员工类型", errorInfo = "员工类型不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.PERSONNEL_TYPE)
@TableField(exist = false)
......
......@@ -47,10 +47,10 @@ public class TCompleteMonitorController {
@Operation(description = "导出档案完整度监控管理-全量 权限:archves_tcompletemonitor_export_all")
@PostMapping("/exportAll")
//@PreAuthorize("@pms.hasPermission('archves_tcompletemonitor_export_all')")
public R<String> exportAll(HttpServletResponse response, @RequestBody TCompleteMonitorSearchVo searchVo) {
public void exportAll(HttpServletResponse response, @RequestBody TCompleteMonitorSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
return tCompleteMonitorService.exportAll(response, searchVo);
tCompleteMonitorService.exportAll(response, searchVo);
}
/**
......
......@@ -242,10 +242,10 @@ public class TPreEmpMainController {
@Operation(summary = "导出预入职-全量", description = "导出预入职-全量 hasPermission('archives_tpreempmain-export-all')")
@PostMapping("/exportAll")
//@PreAuthorize("@pms.hasPermission('archives_tpreempmain-export-all')")
public R<String> exportAll(HttpServletResponse response, @RequestBody TPreEmpMainSearchVo searchVo) {
public void exportAll(HttpServletResponse response, @RequestBody TPreEmpMainSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
return tPreEmpMainService.exportAll(response, searchVo);
tPreEmpMainService.exportAll(response, searchVo);
}
}
......@@ -61,6 +61,6 @@ public interface TCompleteMonitorService extends IService<TCompleteMonitor> {
IPage<TCompleteMonitorInfoVo> getMonitorEmpInfoListPage(Page<TCompleteMonitorInfoVo> page, String deptNo);
// 导出全量
R<String> exportAll(HttpServletResponse response, TCompleteMonitorSearchVo searchVo);
void exportAll(HttpServletResponse response, TCompleteMonitorSearchVo searchVo);
}
......@@ -75,7 +75,7 @@ public interface TPreEmpMainService extends IService<TPreEmpMain> {
// 导出
void listExport(HttpServletResponse response, TPreEmpMainSearchVo searchVo);
// 导出全量
R<String> exportAll(HttpServletResponse response, TPreEmpMainSearchVo searchVo);
void exportAll(HttpServletResponse response, TPreEmpMainSearchVo searchVo);
List<TPreEmpMain> noPageDiy(TPreEmpMainSearchVo searchVo);
......
......@@ -233,25 +233,30 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
* @return
*/
@Override
public R<String> exportAll(HttpServletResponse response, TCompleteMonitorSearchVo searchVo) {
public void exportAll(HttpServletResponse response, TCompleteMonitorSearchVo searchVo) {
String name = "档案完整度监控详情";
String fileName = name + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TMainExportAllVO> list = Lists.newArrayList();
long count = baseMapper.getTEmpMainAllCount(searchVo);
if (count > CommonConstants.EXCEL_EXPORT_LIMIT) {
return R.failed("数据超过6万条,请联系管理员后端导出!");
}
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
ExcelWriter excelWriter = null;
if (count > CommonConstants.EXCEL_EXPORT_LIMIT) {
List<List<String>> strList = new ArrayList<>();
strList.add(this.getNewArrayList(new String[]{"数据超过6万条,请联系管理员后端导出!"}));
List<List<String>> headList = Lists.newArrayList();
headList.add(this.getNewArrayList(new String[]{"提示"}));
EasyExcelFactory.write(out).head(headList).sheet("数据超限").doWrite(strList);
} else {
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
List<List<String>> headList = Lists.newArrayList();
headList.add(this.getNewArrayList(new String[]{"信息是否完整","信息是否完整"}));
headList.add(this.getNewArrayList(new String[]{"进项目时间","进项目时间"}));
headList.add(this.getNewArrayList(new String[]{"信息是否完整", "信息是否完整"}));
headList.add(this.getNewArrayList(new String[]{"进项目时间", "进项目时间"}));
String oneTitle = "员工基本信息";
headList.add(this.getNewArrayList(new String[]{oneTitle, "员工主码"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "员工类型"}));
......@@ -322,7 +327,7 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
headList.add(this.getNewArrayList(new String[]{oneTitle, "是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种"}));
oneTitle = "不良记录";
headList.add(this.getNewArrayList(new String[]{oneTitle, "不良记录描述"}));
ExcelWriter excelWriter = EasyExcelFactory.write(out).head(headList).build();
excelWriter = EasyExcelFactory.write(out).head(headList).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
......@@ -394,246 +399,11 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
return null;
}
/**
* 档案完整度监控详情
* hgw 2024-6-26 11:19:18
*/
/*@Override
public void exportAll(HttpServletResponse response, TCompleteMonitorSearchVo searchVo) {
String name = "档案完整度监控详情";
String fileName = name + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TMainExportAllVO> listAll = Lists.newArrayList();
List<TMainExportAllVO> list = Lists.newArrayList();
List<TMainExportAllVO> list1 = Lists.newArrayList();
List<TMainExportAllVO> list2 = Lists.newArrayList();
List<TMainExportAllVO> list3 = Lists.newArrayList();
long count = baseMapper.getTEmpMainAllCount(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
List<List<String>> headList = Lists.newArrayList();
headList.add(this.getNewArrayList(new String[]{"信息是否完整","信息是否完整"}));
headList.add(this.getNewArrayList(new String[]{"进项目时间","进项目时间"}));
String oneTitle = "员工基本信息";
headList.add(this.getNewArrayList(new String[]{oneTitle,"员工主码"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"员工类型"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"员工姓名"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"身份证号"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"性别"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"身份证期限"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"身份证开始日期"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"身份证截止日期"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"出生日期"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"年龄"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"婚姻状况"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"民族"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"政治面貌"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"手机号码"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"邮箱"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"户籍所在地"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"户口性质"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"档案所在地"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"档案状态"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"通信地址"}));
oneTitle = "在项信息";
headList.add(this.getNewArrayList(new String[]{oneTitle,"客户名称"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"项目名称"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"业务类型"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"合同类型"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"工时制"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"就职岗位"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"入职日期"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"试用期"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"标签"}));
oneTitle = "紧急联络人";
headList.add(this.getNewArrayList(new String[]{oneTitle,"姓名"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"与本人关系"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"联系地址"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"联系电话"}));
oneTitle = "最高教育经历";
headList.add(this.getNewArrayList(new String[]{oneTitle,"学校"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"专业"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"学历"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"是否大专及以上"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"最高学历"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"入学时间"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"毕业时间"}));
oneTitle = "主要工作经历";
headList.add(this.getNewArrayList(new String[]{oneTitle,"是否为首份工作"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"工作单位"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"工作岗位"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"开始工作日期"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"结束工作日期"}));
oneTitle = "主要家庭成员信息";
headList.add(this.getNewArrayList(new String[]{oneTitle,"成员姓名"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"与本人关系"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"手机号码"}));
oneTitle = "职业资格信息";
headList.add(this.getNewArrayList(new String[]{oneTitle,"是否有职业资格证书"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"申报年度"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"职业资格名称"}));
oneTitle = "伤残信息";
headList.add(this.getNewArrayList(new String[]{oneTitle,"是否曾被认定为工伤"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"是否有职业病"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"职业病名称"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"是否有传染性疾病"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"传染病名称"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"是否持有残疾人证明"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"伤残病名称"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"伤残等级"}));
headList.add(this.getNewArrayList(new String[]{oneTitle,"是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种"}));
oneTitle = "不良记录";
headList.add(this.getNewArrayList(new String[]{oneTitle,"不良记录描述"}));
ExcelWriter excelWriter = EasyExcelFactory.write(out).head(headList).build();
int index = 0;
if (count > 100) {
count = 100;
}
if (count > CommonConstants.ZERO_INT) {
int maxCycle = 50;
for (int i = 0; i <= count; i += maxCycle) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(maxCycle);
list = baseMapper.getTEmpMainAllList(searchVo);
if (list !=null && !list.isEmpty()) {
listAll = Lists.newArrayList();
list1 = baseMapper.getTEmpMainAllListOneWork(searchVo);
Map<String, List<TMainExportAllVO>> map1 = new HashMap<>();
Map<String, List<TMainExportAllVO>> map2 = new HashMap<>();
Map<String, List<TMainExportAllVO>> map3 = new HashMap<>();
List<TMainExportAllVO> tempList;
List<TMainExportAllVO> tempList1;
List<TMainExportAllVO> tempList2;
List<TMainExportAllVO> tempList3;
for (TMainExportAllVO vo : list1) {
tempList = map1.get(vo.getField6());
if (tempList == null || tempList.isEmpty()) {
tempList = Lists.newArrayList();
}
tempList.add(vo);
map1.put(vo.getField6(), tempList);
}
list2 = baseMapper.getTEmpMainAllListTwoFamily(searchVo);
for (TMainExportAllVO vo : list2) {
tempList = map2.get(vo.getField6());
if (tempList == null || tempList.isEmpty()) {
tempList = Lists.newArrayList();
}
tempList.add(vo);
map2.put(vo.getField6(), tempList);
}
list3 = baseMapper.getTEmpMainAllListThreeProfessional(searchVo);
for (TMainExportAllVO vo : list3) {
tempList = map3.get(vo.getField6());
if (tempList == null || tempList.isEmpty()) {
tempList = Lists.newArrayList();
}
tempList.add(vo);
map3.put(vo.getField6(), tempList);
}
TMainExportAllVO tempVo;
TMainExportAllVO saveVo;
for (TMainExportAllVO vo : list) {
tempList1 = map1.get(vo.getField6());
tempList2 = map2.get(vo.getField6());
tempList3 = map3.get(vo.getField6());
if ((tempList1 != null && tempList1.size()>1)
|| (tempList2 != null && tempList2.size()>1)
|| (tempList3 != null && tempList3.size()>1)) {
int maxSize=1;
if (tempList1 != null) {
maxSize = tempList1.size();
}
if (tempList2 != null && tempList2.size() > maxSize) {
maxSize=tempList2.size();
}
if (tempList3 != null && tempList3.size() > maxSize) {
maxSize=tempList3.size();
}
for (int k=0;k<maxSize;k++) {
if (k == 0) {
saveVo = vo;
} else {
saveVo = null;
}
if (tempList1 != null && tempList1.size()>k) {
if (saveVo == null) {
saveVo = tempList1.get(k);
} else {
tempVo = tempList1.get(k);
saveVo.setField43(tempVo.getField43());
saveVo.setField44(tempVo.getField44());
saveVo.setField45(tempVo.getField45());
saveVo.setField46(tempVo.getField46());
saveVo.setField47(tempVo.getField47());
}
}
if (tempList2 != null && tempList2.size()>k) {
if (saveVo == null) {
saveVo = tempList2.get(k);
} else {
tempVo = tempList2.get(k);
saveVo.setField48(tempVo.getField48());
saveVo.setField49(tempVo.getField49());
saveVo.setField50(tempVo.getField50());
}
}
if (tempList3 != null && tempList3.size()>k) {
if (saveVo == null) {
saveVo = tempList3.get(k);
} else {
tempVo = tempList3.get(k);
saveVo.setField51(tempVo.getField51());
saveVo.setField52(tempVo.getField52());
saveVo.setField53(tempVo.getField53());
}
}
listAll.add(saveVo);
}
}
}
}
if (Common.isNotNull(listAll)) {
WriteSheet writeSheet = EasyExcelFactory.writerSheet(name + index).build();
excelWriter.write(listAll, writeSheet);
index++;
}
if (Common.isNotNull(list)) {
list.clear();
}
}
} else {
WriteSheet writeSheet = EasyExcelFactory.writerSheet(name + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
if (excelWriter != null) {
excelWriter.finish();
}
} catch (Exception e) {
log.error("执行异常", e);
} finally {
......@@ -645,7 +415,7 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
log.error("执行异常", e);
}
}
}*/
}
/**
* @Description: 详情
......
......@@ -1850,21 +1850,26 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
* @return
*/
@Override
public R<String> exportAll(HttpServletResponse response, TPreEmpMainSearchVo searchVo) {
public void exportAll(HttpServletResponse response, TPreEmpMainSearchVo searchVo) {
String name = "预入职导出全量";
String fileName = name + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TPreMainExportAllVO> list = Lists.newArrayList();
long count = baseMapper.getTPreEmpMainAllCount(searchVo);
if (count > CommonConstants.EXCEL_EXPORT_LIMIT) {
return R.failed("数据超过6万条,请联系管理员后端导出!");
}
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
ExcelWriter excelWriter = null;
if (count > CommonConstants.EXCEL_EXPORT_LIMIT) {
List<List<String>> strList = new ArrayList<>();
strList.add(this.getNewArrayList(new String[]{"数据超过6万条,请联系管理员后端导出!!"}));
List<List<String>> headList = Lists.newArrayList();
headList.add(this.getNewArrayList(new String[]{"提示"}));
EasyExcelFactory.write(out).head(headList).sheet("数据超限").doWrite(strList);
} else {
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
List<List<String>> headList = Lists.newArrayList();
headList.add(this.getNewArrayList(new String[]{"状态", "状态"}));
......@@ -1939,7 +1944,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
headList.add(this.getNewArrayList(new String[]{oneTitle, "是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种"}));
oneTitle = "不良记录";
headList.add(this.getNewArrayList(new String[]{oneTitle, "不良记录描述"}));
ExcelWriter excelWriter = EasyExcelFactory.write(out).head(headList).build();
excelWriter = EasyExcelFactory.write(out).head(headList).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
......@@ -2013,6 +2018,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (Common.isNotNull(list)) {
list.clear();
}
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
......@@ -2026,7 +2032,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
log.error("执行异常", e);
}
}
return null;
}
}
......@@ -295,7 +295,7 @@
,concat(ifnull(pf.AREA_NAME,''),ifnull(cf.AREA_NAME,''),ifnull(tf.AREA_NAME,'')) field20 ,if(e.status=0,'草稿','已审核') field21
,e.CONTACT_ADDRESS field22,p.UNIT_NAME field23,p.DEPT_NAME field24
,concat(p.BUSINESS_PRIMARY_TYPE,'-',ifnull(p.BUSINESS_SECOND_TYPE,''),'-',ifnull(p.BUSINESS_THIRD_TYPE,'')) field25
,contractType.label field26 ,workingHours.label field27,p.POST field28,p.ENJOIN_DATE field29
,eci.contract_name field26 ,workingHours.label field27,p.POST field28,p.ENJOIN_DATE field29
,p.TRY_PERIOD field30,p.EMP_LABEL field31
,ec.EMP_NAME field32,ec.RELATION_TYPE field33,ec.ADDRESS field34,ec.TEL field35
,ee.SCHOOL field36,ee.MAJOR field37,education.label field38,if(e.IS_COLLEGE=0,'否','是') field39
......@@ -323,7 +323,7 @@
left join sys_area cf on cf.id=e.FILE_CITY
left join sys_area tf on tf.id=e.FILE_TOWN
left join t_pre_employee_project p on a.id=p.PRE_MAIN_ID
left join view_sys_dict_item contractType on contractType.value=p.CONTRACT_TYPE and contractType.type='employee_contract_type'
left join view_sys_dict_item contractType on contractType.value=p.CONTRACT_TYPE and contractType.type='personnel_type'
left join view_sys_dict_item workingHours on workingHours.value=p.WORKING_HOURS and workingHours.type='working_hours'
left join t_pre_emp_contact_info ec on a.id=ec.PRE_MAIN_ID
left join t_pre_emp_education ee on a.id=ee.PRE_MAIN_ID
......@@ -384,7 +384,7 @@
count(1)
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join t_pre_emp_work_recording ew on a.id=ew.EMP_ID
left join t_pre_emp_work_recording ew on a.id=ew.PRE_MAIN_ID
<where>
a.STATUS != '5' and ew.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_work_recording a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ew.emp_id
......@@ -400,7 +400,7 @@
,if(e.FIRST_WORK_FLAG is null,'',if(e.FIRST_WORK_FLAG=0,'是','否')) field43,ew.WORK_UNIT field44,ew.WORK_JOB field45,ew.START_DATE field46,ew.END_DATE field47
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join t_pre_emp_work_recording ew on a.id=ew.EMP_ID
left join t_pre_emp_work_recording ew on a.id=ew.PRE_MAIN_ID
<where>
a.STATUS != '5' and ew.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_work_recording a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ew.emp_id
......@@ -421,7 +421,7 @@
count(1)
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join t_pre_emp_family ef on a.id=ef.EMP_ID
left join t_pre_emp_family ef on a.id=ef.PRE_MAIN_ID
<where>
a.STATUS != '5' and ef.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_family a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ef.emp_id
......@@ -436,7 +436,7 @@
,ef.FAMILY_NAME field48,family_relation.label field49,ef.CONTRACT_TEL field50
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join t_pre_emp_family ef on a.id=ef.EMP_ID
left join t_pre_emp_family ef on a.id=ef.PRE_MAIN_ID
left join view_sys_dict_item family_relation on family_relation.value=ef.RELATIONSHIP_SELF and family_relation.type='family_relation'
<where>
a.STATUS != '5' and ef.id is not null and EXISTS (
......@@ -458,7 +458,7 @@
count(1)
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join t_pre_emp_professional_qualification ep on a.id=ep.EMP_ID
left join t_pre_emp_professional_qualification ep on a.id=ep.PRE_MAIN_ID
<where>
a.STATUS != '5' and ep.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_professional_qualification a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ep.emp_id
......@@ -473,7 +473,7 @@
,if(e.HAVE_QUALIFICATION is null,'',if(e.HAVE_QUALIFICATION=0,'是','否')) field51,ep.DECLARE_YEAR field52,qualification_type.label field53
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join t_pre_emp_professional_qualification ep on a.id=ep.EMP_ID
left join t_pre_emp_professional_qualification ep on a.id=ep.PRE_MAIN_ID
left join view_sys_dict_item qualification_type on qualification_type.value=ep.QUALIFICATION_TYPE and qualification_type.type='qualification_type'
<where>
a.STATUS != '5' and ep.id is not null and EXISTS (
......
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