bug修复
This commit is contained in:
parent
226610ff13
commit
64473dcf2c
|
|
@ -944,7 +944,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getBasePersonLists" resultType="com.bonus.bmw.person.entity.PersonComprehensiveBean">
|
<select id="getBasePersonLists" resultType="com.bonus.bmw.person.entity.PersonComprehensiveBean">
|
||||||
select
|
/*select
|
||||||
bw.name as name,bw.id_number as idNumber,bw.phone as phone,
|
bw.name as name,bw.id_number as idNumber,bw.phone as phone,
|
||||||
td.value as postName,bp.name as proName,bw.is_furlough_person as isFurloughPerson,
|
td.value as postName,bp.name as proName,bw.is_furlough_person as isFurloughPerson,
|
||||||
CASE
|
CASE
|
||||||
|
|
@ -994,7 +994,109 @@
|
||||||
AND bp.is_active = '1'
|
AND bp.is_active = '1'
|
||||||
LEFT JOIN bm_worker_checkup checkup ON checkup.ID_NUMBER = bw.id_number
|
LEFT JOIN bm_worker_checkup checkup ON checkup.ID_NUMBER = bw.id_number
|
||||||
AND checkup.IS_ACTIVE = '1'
|
AND checkup.IS_ACTIVE = '1'
|
||||||
where bw.is_active='1'
|
where bw.is_active='1'*/
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
bw.name as name,bw.id_number as idNumber,bw.phone as phone,
|
||||||
|
td.value as postName,bp.name as proName,bw.is_furlough_person as isFurloughPerson,
|
||||||
|
CASE
|
||||||
|
bw.employment_type
|
||||||
|
WHEN '0' THEN
|
||||||
|
'固定用工'
|
||||||
|
WHEN '1' THEN
|
||||||
|
'临时用工'
|
||||||
|
WHEN '2' THEN
|
||||||
|
'分包管理人员'
|
||||||
|
END employmentType,
|
||||||
|
CASE
|
||||||
|
bw.light_status
|
||||||
|
WHEN '0' THEN
|
||||||
|
'红灯'
|
||||||
|
WHEN '1' THEN
|
||||||
|
'黄灯'
|
||||||
|
WHEN '2' THEN
|
||||||
|
'绿灯'
|
||||||
|
END lightStatus,
|
||||||
|
CASE
|
||||||
|
WHEN bweh.exit_status = '-1' AND bw.is_furlough_person = '0' THEN
|
||||||
|
'未出场'
|
||||||
|
WHEN bweh.exit_status = '-1' AND bw.is_furlough_person = '1' THEN
|
||||||
|
'临时离场'
|
||||||
|
WHEN bweh.exit_status = '1' THEN
|
||||||
|
'出场审核通过'
|
||||||
|
WHEN bweh.exit_status = '0' THEN
|
||||||
|
'出场未审核'
|
||||||
|
WHEN bweh.exit_status = '2' THEN
|
||||||
|
'出场审核不通过'
|
||||||
|
ELSE
|
||||||
|
'未入场'
|
||||||
|
END AS exitStatus,
|
||||||
|
bw.checkup_date as checkupDate,
|
||||||
|
checkup.PHOTO_PATH as checkupFilePath,
|
||||||
|
CASE
|
||||||
|
WHEN STR_TO_DATE(bw.checkup_date, '%Y-%m-%d') < DATE_SUB(CURDATE(), INTERVAL 1 YEAR) THEN '过期'
|
||||||
|
ELSE '有效'
|
||||||
|
END AS checkupState
|
||||||
|
FROM
|
||||||
|
bm_worker bw
|
||||||
|
LEFT JOIN bm_worker_photo face ON face.ID_NUMBER = bw.id_number
|
||||||
|
AND face.PHOTO_TYPE = 3
|
||||||
|
AND face.IS_ACTIVE = 1
|
||||||
|
LEFT JOIN bm_worker_checkup checkup ON checkup.ID_NUMBER = bw.id_number
|
||||||
|
AND checkup.IS_ACTIVE = 1
|
||||||
|
LEFT JOIN bm_worker_photo aoto ON aoto.ID_NUMBER = bw.id_number
|
||||||
|
AND aoto.PHOTO_TYPE = 5
|
||||||
|
AND aoto.IS_ACTIVE = 1
|
||||||
|
LEFT JOIN bm_worker_bank bwb ON bwb.ID_NUMBER = bw.id_number
|
||||||
|
AND bwb.is_active = '1'
|
||||||
|
LEFT JOIN bm_worker_contract bwc ON bwc.idCard = bw.id_number
|
||||||
|
AND bwc.is_active = '1'
|
||||||
|
LEFT JOIN bm_worker_contract_details bwcd ON bwcd.id_card = bw.id_number
|
||||||
|
AND bwcd.is_active = '1'
|
||||||
|
left join bm_worker_ein_history bweh on bweh.id_number = bw.id_number
|
||||||
|
and bweh.is_active = '1'
|
||||||
|
LEFT JOIN bm_sub_team bst ON bst.id = bweh.team_id
|
||||||
|
AND bst.is_active = '1'
|
||||||
|
LEFT JOIN bm_project bp ON bp.id = bweh.project_id
|
||||||
|
AND bp.is_active = '1'
|
||||||
|
LEFT JOIN t_dict td ON td.id = bw.post_id
|
||||||
|
AND td.is_active = '1'
|
||||||
|
LEFT JOIN sys_user su ON su.id_number = bw.id_number
|
||||||
|
AND su.is_active = '1'
|
||||||
|
LEFT JOIN sys_role_user sru ON sru.userId = su.id
|
||||||
|
AND sru.is_active = '1'
|
||||||
|
LEFT JOIN sys_role sr ON sr.id = sru.roleId
|
||||||
|
AND sr.is_active = '1'
|
||||||
|
WHERE
|
||||||
|
bw.IS_ACTIVE = 1
|
||||||
|
<if test="params.name != null and params.name != ''">
|
||||||
|
and locate (#{params.name},bw.name)
|
||||||
|
</if>
|
||||||
|
<if test="params.idNumber != null and params.idNumber != ''">
|
||||||
|
and locate (#{params.idNumber},bw.id_number)
|
||||||
|
</if>
|
||||||
|
<if test="params.proName != null and params.proName != ''">
|
||||||
|
and locate (#{params.proName},bp.name)
|
||||||
|
</if>
|
||||||
|
<if test="params.teamName != null and params.teamName != ''">
|
||||||
|
and locate (#{params.teamName},bst.team_name)
|
||||||
|
</if>
|
||||||
|
<if test="params.employmentType != null and params.employmentType != ''">
|
||||||
|
and locate (#{params.employmentType},bw.worker_type)
|
||||||
|
</if>
|
||||||
|
<if test="params.lightStatus != null and params.lightStatus != ''">
|
||||||
|
and locate (#{params.lightStatus},bw.light_status)
|
||||||
|
</if>
|
||||||
|
<if test="params.einStatus != null and params.einStatus != ''">
|
||||||
|
<if test='params.einStatus == "-2"'>
|
||||||
|
and bw.ein_status = 0
|
||||||
|
</if>
|
||||||
|
<if test="params.einStatus != '-2'">
|
||||||
|
and bweh.exit_status in (${params.einStatus})
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
GROUP BY
|
||||||
|
bw.id_number
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -382,16 +382,19 @@ function downloadCheckup(idNumber, checkupFilePath) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function importData(){
|
function importData(){
|
||||||
|
var formData = new FormData($('form')[0]);
|
||||||
|
var name = $("#basePersonFile").val();
|
||||||
|
if (name == null || name == "") {
|
||||||
|
layer.msg("请上传文件!");
|
||||||
|
return false; // 阻止表单提交
|
||||||
|
}
|
||||||
|
|
||||||
var idx = layer.msg('正在提交数据,请稍等...', {
|
var idx = layer.msg('正在提交数据,请稍等...', {
|
||||||
icon: 16
|
icon: 16
|
||||||
, shade: 0.01
|
, shade: 0.01
|
||||||
, time: '-1'
|
, time: '-1'
|
||||||
});
|
});
|
||||||
var formData = new FormData($('form')[0]);
|
|
||||||
var name = $("#basePersonFile").val();
|
|
||||||
if (name == null || name == "") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!(name.endsWith(".xls") || name.endsWith(".xlsx") || name.endsWith(".xlsm"))) {
|
if (!(name.endsWith(".xls") || name.endsWith(".xlsx") || name.endsWith(".xlsm"))) {
|
||||||
layer.msg("请上传正确的Excel表格!");
|
layer.msg("请上传正确的Excel表格!");
|
||||||
$("#basePersonFile").val("");
|
$("#basePersonFile").val("");
|
||||||
|
|
@ -489,42 +492,22 @@ function checkViewEn(idNumber) {
|
||||||
|
|
||||||
//导出excel表格
|
//导出excel表格
|
||||||
function exportPersonnelOnSite() {
|
function exportPersonnelOnSite() {
|
||||||
var name = $("#mame").val();
|
var name = $("#name").val();
|
||||||
var idNumber = $("#idNumber").val();
|
|
||||||
var phone = $("#phone").val();
|
|
||||||
var postName = $("#postName").val();
|
|
||||||
var proName = $("#proName").val();
|
var proName = $("#proName").val();
|
||||||
|
var idNumber = $("#idNumber").val();
|
||||||
var employmentType = $("#employmentType").val();
|
var employmentType = $("#employmentType").val();
|
||||||
|
var einStatus = $("#einStatus").val();
|
||||||
var lightStatus = $("#lightStatus").val();
|
var lightStatus = $("#lightStatus").val();
|
||||||
var exitStatus = $("#exitStatus").val();
|
var keyWord = $("#keyWord").val();
|
||||||
var checkupState = $("#checkupState").val();
|
|
||||||
|
|
||||||
|
|
||||||
window.location.href = ctxPath + "/personComprehensive/exportBtnOut?token=" + token
|
window.location.href = ctxPath + "/personComprehensive/exportBtnOut?token=" + token
|
||||||
+ "&name=" + name
|
+ "&name=" + name
|
||||||
+ "&idNumber=" + idNumber
|
|
||||||
+ "&phone=" + phone
|
|
||||||
+ "&postName=" + postName
|
|
||||||
+ "&proName=" + proName
|
+ "&proName=" + proName
|
||||||
|
+ "&idNumber=" + idNumber
|
||||||
+ "&employmentType=" + employmentType
|
+ "&employmentType=" + employmentType
|
||||||
|
+ "&einStatus=" + einStatus
|
||||||
+ "&lightStatus=" + lightStatus
|
+ "&lightStatus=" + lightStatus
|
||||||
+ "&exitStatus=" + exitStatus
|
+ "&keyWord=" + keyWord;
|
||||||
+ "&checkupState=" + checkupState;
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.open("get", url, true);
|
|
||||||
xhr.responseType = "blob"; // 转换流
|
|
||||||
xhr.onload = function () {
|
|
||||||
layer.close(loadingMsg);
|
|
||||||
if (this.status === 200) {
|
|
||||||
var blob = this.response;
|
|
||||||
var a = document.createElement("a");
|
|
||||||
var url = window.URL.createObjectURL(blob);
|
|
||||||
a.href = url;
|
|
||||||
a.download = "入场人员信息.xlsx"; // 文件名
|
|
||||||
}else {
|
|
||||||
layer.msg('发生异常,请稍后重试', {icon: 16, scrollbar: false, time: 2000});
|
|
||||||
}
|
|
||||||
a.click()
|
|
||||||
window.URL.revokeObjectURL(url)
|
|
||||||
};
|
|
||||||
xhr.send();
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue