bug修改
This commit is contained in:
parent
bc91f32da9
commit
85fe239407
|
|
@ -768,20 +768,28 @@
|
|||
WHEN bp.pro_status = 3 THEN '停工'
|
||||
WHEN bp.pro_status = 4 THEN '遗留(收尾)'
|
||||
END AS proStatusName,
|
||||
COUNT(DISTINCT CASE WHEN bweh1.IS_ACTIVE = '1' THEN bweh1.id_number END) AS currentOnSiteNum,
|
||||
COUNT(DISTINCT CASE WHEN bweh2.IS_ACTIVE = '0' THEN bweh2.id_number END) AS exitedNum,
|
||||
COUNT(DISTINCT bweh3.id_number) AS totalEntryNum,
|
||||
MIN(bweh3.ein_time) AS firstEntryTime
|
||||
-- COUNT(DISTINCT CASE WHEN bweh1.IS_ACTIVE = '1' THEN bweh1.id_number END) AS currentOnSiteNum,
|
||||
-- COUNT(DISTINCT CASE WHEN bweh2.IS_ACTIVE = '0' THEN bweh2.id_number END) AS exitedNum,
|
||||
-- COUNT(DISTINCT bweh3.id_number) AS totalEntryNum,
|
||||
COUNT(DISTINCT CASE WHEN weh.IS_ACTIVE = '1' THEN weh.id_number END) AS currentOnSiteNum,
|
||||
COUNT(DISTINCT CASE WHEN weh.IS_ACTIVE = '0' THEN weh.id_number END) AS exitedNum,
|
||||
COUNT(DISTINCT weh.id_number) AS totalEntryNum,
|
||||
MIN(weh.ein_time) AS firstEntryTime
|
||||
FROM
|
||||
bm_project_general bpg
|
||||
LEFT JOIN
|
||||
bm_project bp ON bp.project_general_id = bpg.id AND bp.is_active = '1'
|
||||
LEFT JOIN
|
||||
bm_worker_ein_history bweh1 ON bweh1.project_id = bp.id AND bweh1.IS_ACTIVE = '1'
|
||||
LEFT JOIN
|
||||
bm_worker_ein_history bweh2 ON bweh2.project_id = bp.id AND bweh2.IS_ACTIVE = '0'
|
||||
LEFT JOIN
|
||||
bm_worker_ein_history bweh3 ON bweh3.project_id = bp.id
|
||||
LEFT JOIN (
|
||||
SELECT project_id, id_number, ein_time, IS_ACTIVE
|
||||
FROM bm_worker_ein_history
|
||||
WHERE IS_ACTIVE IN ('0', '1')
|
||||
) weh ON weh.project_id = bp.id
|
||||
-- LEFT JOIN
|
||||
-- bm_worker_ein_history bweh1 ON bweh1.project_id = bp.id AND bweh1.IS_ACTIVE = '1'
|
||||
-- LEFT JOIN
|
||||
-- bm_worker_ein_history bweh2 ON bweh2.project_id = bp.id AND bweh2.IS_ACTIVE = '0'
|
||||
-- LEFT JOIN
|
||||
-- bm_worker_ein_history bweh3 ON bweh3.project_id = bp.id
|
||||
WHERE
|
||||
bpg.is_active = '1' AND bp.id is not null
|
||||
<if test="params.proGeneralName != null and params.proGeneralName != ''">
|
||||
|
|
@ -798,7 +806,113 @@
|
|||
</select>
|
||||
|
||||
<select id="getWorkerRosterProList" resultType="com.bonus.bmw.person.entity.PersonComprehensiveBean">
|
||||
SELECT t.id_number AS idNumber,
|
||||
SELECT
|
||||
bw.id_number AS idNumber,
|
||||
bw.name AS name,
|
||||
bw.sex AS sex,
|
||||
bw.birthday AS birthday,
|
||||
bw.ethnic AS ethnic,
|
||||
bw.issueauthority AS issueauthority,
|
||||
bw.address AS address,
|
||||
bw.sign_date AS signDate,
|
||||
bw.expiry_date AS expiryDate,
|
||||
bwb.BANK_NAME AS bankName,
|
||||
bwb.BANK_CARD AS bankCard,
|
||||
bwb.ROLL_BANK_NAME AS bankBranch,
|
||||
bwc.contractCode,
|
||||
bwc.laborContractType,
|
||||
bwc.contractValidDate,
|
||||
bwc.contractInvalidDate,
|
||||
bwc.wageApprovedWay,
|
||||
bwc.wageCriterion,
|
||||
latest.is_furlough_person AS isFurloughPerson,
|
||||
latest.ein_time AS einTime,
|
||||
latest.exit_time AS exitTime,
|
||||
bw.worker_type AS workerType,
|
||||
bw.person_type AS personType,
|
||||
bw.cultrue AS cultrue,
|
||||
bw.political_outlook AS politicalOutlook,
|
||||
bw.phone AS phone,
|
||||
bw.post_id AS postId,
|
||||
td.value AS postName,
|
||||
bs.sub_name AS subName,
|
||||
bst.team_name AS teamName,
|
||||
bw.urgent_person AS urgentPerson,
|
||||
bw.urgent_person_phone AS urgentPersonPhone,
|
||||
bw.light_status AS lightStatus,
|
||||
bw.is_own_person AS isOwnPerson,
|
||||
bw.social_security_number AS socialSecurityNumber,
|
||||
bw.social_security_unit AS socialSecurityUnit,
|
||||
bw.checkup_date AS checkupDate,
|
||||
latest.is_active AS isActive,
|
||||
(
|
||||
SELECT GROUP_CONCAT(
|
||||
CONCAT('入场:', bweh_sub.ein_time, ', 出场:', IFNULL(bweh_sub.exit_time, '未出场'))
|
||||
ORDER BY bweh_sub.ein_time DESC SEPARATOR ' | '
|
||||
)
|
||||
FROM bm_worker_ein_history bweh_sub
|
||||
WHERE bweh_sub.id_number = bw.id_number AND bweh_sub.project_id = #{ params.proId}
|
||||
) AS remark
|
||||
FROM bm_worker bw
|
||||
JOIN (
|
||||
SELECT bweh.id_number, bweh.ein_time, bweh.exit_time, bweh.is_furlough_person, bweh.is_active, bweh.sub_id, bweh.team_id
|
||||
FROM bm_worker_ein_history bweh
|
||||
JOIN (
|
||||
SELECT id_number, MAX(ein_time) AS latest_ein_time
|
||||
FROM bm_worker_ein_history
|
||||
WHERE project_id = #{ params.proId}
|
||||
GROUP BY id_number
|
||||
) latest ON bweh.id_number = latest.id_number AND bweh.ein_time = latest.latest_ein_time
|
||||
WHERE bweh.project_id = #{ params.proId}
|
||||
) latest ON bw.id_number = latest.id_number
|
||||
LEFT JOIN bm_worker_contract bwc ON bwc.idCard = bw.id_number AND bwc.is_active = '1'
|
||||
LEFT JOIN bm_worker_bank bwb ON bwb.ID_NUMBER = bw.id_number
|
||||
LEFT JOIN t_dict td ON td.id = bw.post_id AND td.is_active = '1'
|
||||
LEFT JOIN bm_subcontractor bs ON bs.id = latest.sub_id
|
||||
LEFT JOIN bm_sub_team bst ON bst.id = latest.team_id AND bst.is_active = '1'
|
||||
<where>
|
||||
<if test="params.name != null and params.name != ''">
|
||||
and (
|
||||
bwc.contractCode like concat('%',#{params.name},'%')
|
||||
or bw.name like concat('%',#{params.name},'%')
|
||||
or bw.phone like concat('%',#{params.name},'%')
|
||||
or bw.id_number like concat('%',#{params.name},'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="params.subName != null and params.subName != ''">
|
||||
and (
|
||||
bs.sub_name like concat('%',#{params.subName},'%')
|
||||
or bst.team_name like concat('%',#{params.subName},'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="params.bankCard != null and params.bankCard != ''">
|
||||
and locate (#{params.bankCard},bwb.BANK_CARD)
|
||||
</if>
|
||||
|
||||
<if test="params.postName != null and params.postName != ''">
|
||||
and locate (#{params.postName},td.value)
|
||||
</if>
|
||||
|
||||
<if test="params.exitStatus != null and params.exitStatus != ''">
|
||||
and locate (#{params.exitStatus},latest.is_active)
|
||||
</if>
|
||||
|
||||
<if test="params.workerType != null and params.workerType != ''">
|
||||
and locate (#{params.workerType},bw.worker_type)
|
||||
</if>
|
||||
|
||||
<if test="params.einStartDate !=null and params.einStartDate !=''">
|
||||
AND latest.ein_time BETWEEN #{params.einStartDate} AND #{params.einEndDate}
|
||||
</if>
|
||||
|
||||
<if test="params.exitStartDate !=null and params.exitStartDate !=''">
|
||||
AND latest.exit_time BETWEEN #{params.exitStartDate} AND #{params.exitEndDate}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
<!--SELECT t.id_number AS idNumber,
|
||||
t.name AS name,
|
||||
t.sex AS sex,
|
||||
t.birthday AS birthday,
|
||||
|
|
@ -941,7 +1055,7 @@
|
|||
<if test="params.exitStartDate !=null and params.exitStartDate !=''">
|
||||
AND bweh.exit_time BETWEEN #{params.exitStartDate} AND #{params.exitEndDate}
|
||||
</if>
|
||||
GROUP BY t.id_number
|
||||
GROUP BY t.id_number-->
|
||||
</select>
|
||||
|
||||
<select id="getBasePersonLists" resultType="com.bonus.bmw.person.entity.PersonComprehensiveBean">
|
||||
|
|
@ -1102,7 +1216,112 @@
|
|||
</select>
|
||||
|
||||
<select id="exportWorkerRoster" resultType="com.bonus.bmw.person.entity.PersonComprehensiveBean">
|
||||
SELECT t.id_number AS idNumber,
|
||||
SELECT
|
||||
bw.id_number AS idNumber,
|
||||
bw.name AS name,
|
||||
bw.sex AS sex,
|
||||
bw.birthday AS birthday,
|
||||
bw.ethnic AS ethnic,
|
||||
bw.issueauthority AS issueauthority,
|
||||
bw.address AS address,
|
||||
bw.sign_date AS signDate,
|
||||
bw.expiry_date AS expiryDate,
|
||||
bwb.BANK_NAME AS bankName,
|
||||
bwb.BANK_CARD AS bankCard,
|
||||
bwb.ROLL_BANK_NAME AS bankBranch,
|
||||
bwc.contractCode,
|
||||
bwc.laborContractType,
|
||||
bwc.contractValidDate,
|
||||
bwc.contractInvalidDate,
|
||||
bwc.wageApprovedWay,
|
||||
bwc.wageCriterion,
|
||||
latest.is_furlough_person AS isFurloughPerson,
|
||||
latest.ein_time AS einTime,
|
||||
latest.exit_time AS exitTime,
|
||||
bw.worker_type AS workerType,
|
||||
bw.person_type AS personType,
|
||||
bw.cultrue AS cultrue,
|
||||
bw.political_outlook AS politicalOutlook,
|
||||
bw.phone AS phone,
|
||||
bw.post_id AS postId,
|
||||
td.value AS postName,
|
||||
bs.sub_name AS subName,
|
||||
bst.team_name AS teamName,
|
||||
bw.urgent_person AS urgentPerson,
|
||||
bw.urgent_person_phone AS urgentPersonPhone,
|
||||
bw.light_status AS lightStatus,
|
||||
bw.is_own_person AS isOwnPerson,
|
||||
bw.social_security_number AS socialSecurityNumber,
|
||||
bw.social_security_unit AS socialSecurityUnit,
|
||||
bw.checkup_date AS checkupDate,
|
||||
latest.is_active AS isActive,
|
||||
(
|
||||
SELECT GROUP_CONCAT(
|
||||
CONCAT('入场:', bweh_sub.ein_time, ', 出场:', IFNULL(bweh_sub.exit_time, '未出场'))
|
||||
ORDER BY bweh_sub.ein_time DESC SEPARATOR ' | '
|
||||
)
|
||||
FROM bm_worker_ein_history bweh_sub
|
||||
WHERE bweh_sub.id_number = bw.id_number AND bweh_sub.project_id = #{ params.proId}
|
||||
) AS remark
|
||||
FROM bm_worker bw
|
||||
JOIN (
|
||||
SELECT bweh.id_number, bweh.ein_time, bweh.exit_time, bweh.is_furlough_person, bweh.is_active, bweh.sub_id, bweh.team_id
|
||||
FROM bm_worker_ein_history bweh
|
||||
JOIN (
|
||||
SELECT id_number, MAX(ein_time) AS latest_ein_time
|
||||
FROM bm_worker_ein_history
|
||||
WHERE project_id = #{ params.proId}
|
||||
GROUP BY id_number
|
||||
) latest ON bweh.id_number = latest.id_number AND bweh.ein_time = latest.latest_ein_time
|
||||
WHERE bweh.project_id = #{ params.proId}
|
||||
) latest ON bw.id_number = latest.id_number
|
||||
LEFT JOIN bm_worker_contract bwc ON bwc.idCard = bw.id_number AND bwc.is_active = '1'
|
||||
LEFT JOIN bm_worker_bank bwb ON bwb.ID_NUMBER = bw.id_number
|
||||
LEFT JOIN t_dict td ON td.id = bw.post_id AND td.is_active = '1'
|
||||
LEFT JOIN bm_subcontractor bs ON bs.id = latest.sub_id
|
||||
LEFT JOIN bm_sub_team bst ON bst.id = latest.team_id AND bst.is_active = '1'
|
||||
<where>
|
||||
<if test="params.name != null and params.name != ''">
|
||||
and (
|
||||
bwc.contractCode like concat('%',#{params.name},'%')
|
||||
or bw.name like concat('%',#{params.name},'%')
|
||||
or bw.phone like concat('%',#{params.name},'%')
|
||||
or bw.id_number like concat('%',#{params.name},'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="params.subName != null and params.subName != ''">
|
||||
and (
|
||||
bs.sub_name like concat('%',#{params.subName},'%')
|
||||
or bst.team_name like concat('%',#{params.subName},'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="params.bankCard != null and params.bankCard != ''">
|
||||
and locate (#{params.bankCard},bwb.BANK_CARD)
|
||||
</if>
|
||||
|
||||
<if test="params.postName != null and params.postName != ''">
|
||||
and locate (#{params.postName},td.value)
|
||||
</if>
|
||||
|
||||
<if test="params.exitStatus != null and params.exitStatus != ''">
|
||||
and locate (#{params.exitStatus},latest.is_active)
|
||||
</if>
|
||||
|
||||
<if test="params.workerType != null and params.workerType != ''">
|
||||
and locate (#{params.workerType},bw.worker_type)
|
||||
</if>
|
||||
|
||||
<if test="params.einStartDate !=null and params.einStartDate !=''">
|
||||
AND latest.ein_time BETWEEN #{params.einStartDate} AND #{params.einEndDate}
|
||||
</if>
|
||||
|
||||
<if test="params.exitStartDate !=null and params.exitStartDate !=''">
|
||||
AND latest.exit_time BETWEEN #{params.exitStartDate} AND #{params.exitEndDate}
|
||||
</if>
|
||||
</where>
|
||||
<!--SELECT t.id_number AS idNumber,
|
||||
t.name AS name,
|
||||
t.sex AS sex,
|
||||
t.birthday AS birthday,
|
||||
|
|
@ -1245,7 +1464,7 @@
|
|||
<if test="params.exitStartDate !=null and params.exitStartDate !=''">
|
||||
AND bweh.exit_time BETWEEN #{params.exitStartDate} AND #{params.exitEndDate}
|
||||
</if>
|
||||
GROUP BY t.id_number
|
||||
GROUP BY t.id_number-->
|
||||
</select>
|
||||
|
||||
<select id="exportWorkerRosterList" resultType="com.bonus.bmw.person.entity.PersonComprehensiveBean">
|
||||
|
|
@ -1262,20 +1481,31 @@
|
|||
WHEN bp.pro_status = 3 THEN '停工'
|
||||
WHEN bp.pro_status = 4 THEN '遗留(收尾)'
|
||||
END AS proStatusName,
|
||||
COUNT(DISTINCT CASE WHEN bweh1.IS_ACTIVE = '1' THEN bweh1.id_number END) AS currentOnSiteNum,
|
||||
COUNT(DISTINCT CASE WHEN bweh2.IS_ACTIVE = '0' THEN bweh2.id_number END) AS exitedNum,
|
||||
COUNT(DISTINCT bweh3.id_number) AS totalEntryNum,
|
||||
MIN(bweh3.ein_time) AS firstEntryTime
|
||||
-- COUNT(DISTINCT CASE WHEN bweh1.IS_ACTIVE = '1' THEN bweh1.id_number END) AS currentOnSiteNum,
|
||||
-- COUNT(DISTINCT CASE WHEN bweh2.IS_ACTIVE = '0' THEN bweh2.id_number END) AS exitedNum,
|
||||
-- COUNT(DISTINCT bweh3.id_number) AS totalEntryNum,
|
||||
-- MIN(bweh3.ein_time) AS firstEntryTime
|
||||
|
||||
COUNT(DISTINCT CASE WHEN weh.IS_ACTIVE = '1' THEN weh.id_number END) AS currentOnSiteNum,
|
||||
COUNT(DISTINCT CASE WHEN weh.IS_ACTIVE = '0' THEN weh.id_number END) AS exitedNum,
|
||||
COUNT(DISTINCT weh.id_number) AS totalEntryNum,
|
||||
MIN(weh.ein_time) AS firstEntryTime
|
||||
|
||||
FROM
|
||||
bm_project_general bpg
|
||||
LEFT JOIN
|
||||
bm_project bp ON bp.project_general_id = bpg.id AND bp.is_active = '1'
|
||||
LEFT JOIN
|
||||
bm_worker_ein_history bweh1 ON bweh1.project_id = bp.id AND bweh1.IS_ACTIVE = '1'
|
||||
LEFT JOIN
|
||||
bm_worker_ein_history bweh2 ON bweh2.project_id = bp.id AND bweh2.IS_ACTIVE = '0'
|
||||
LEFT JOIN
|
||||
bm_worker_ein_history bweh3 ON bweh3.project_id = bp.id
|
||||
LEFT JOIN (
|
||||
SELECT project_id, id_number, ein_time, IS_ACTIVE
|
||||
FROM bm_worker_ein_history
|
||||
WHERE IS_ACTIVE IN ('0', '1')
|
||||
) weh ON weh.project_id = bp.id
|
||||
-- LEFT JOIN
|
||||
-- bm_worker_ein_history bweh1 ON bweh1.project_id = bp.id AND bweh1.IS_ACTIVE = '1'
|
||||
-- LEFT JOIN
|
||||
-- bm_worker_ein_history bweh2 ON bweh2.project_id = bp.id AND bweh2.IS_ACTIVE = '0'
|
||||
-- LEFT JOIN
|
||||
-- bm_worker_ein_history bweh3 ON bweh3.project_id = bp.id
|
||||
WHERE
|
||||
bpg.is_active = '1' AND bp.id is not null
|
||||
<if test="params.proGeneralName != null and params.proGeneralName != ''">
|
||||
|
|
|
|||
|
|
@ -1619,7 +1619,8 @@ function addPerson(data, loadingMsg) {
|
|||
setTimeout(function() {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
parent.layer.closeAll();
|
||||
window.parent.location.reload();
|
||||
// window.parent.location.reload();
|
||||
window.parent.onSaveSuccess(); // 触发刷新并回到原页码
|
||||
}, 5000);
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
|
|
@ -1636,7 +1637,8 @@ function addPerson(data, loadingMsg) {
|
|||
function reloading() {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
window.parent.location.reload();
|
||||
// window.parent.location.reload();
|
||||
window.parent.onSaveSuccess(); // 触发刷新并回到原页码
|
||||
}
|
||||
|
||||
function getHoliday(value){
|
||||
|
|
@ -1726,11 +1728,11 @@ function nextClick(e){
|
|||
$('#uploadBtn').css('display','');
|
||||
},3000)
|
||||
|
||||
let facePath = $('#facePath').val();
|
||||
if(facePath === '' || facePath === null){
|
||||
layer.alert('请上传人脸照片',{icon: 0})
|
||||
return false;
|
||||
}
|
||||
// let facePath = $('#facePath').val();
|
||||
// if(facePath === '' || facePath === null){
|
||||
// layer.alert('请上传人脸照片',{icon: 0})
|
||||
// return false;
|
||||
// }
|
||||
let baseTf = baseInformationRequired();//基本信息
|
||||
if(baseTf){
|
||||
let keyTf = keyContentRequired(); //关键信息
|
||||
|
|
|
|||
|
|
@ -266,6 +266,11 @@ function photoView(filePaths) {
|
|||
function add() {
|
||||
var height = '90%';
|
||||
var width = '80%';
|
||||
|
||||
// 获取当前页码
|
||||
var table = $('#dt-table').DataTable();
|
||||
var currentPage = table.page(); // 当前页码(从0开始)
|
||||
|
||||
var index = layer.open({
|
||||
title: ['新增', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
|
|
@ -277,6 +282,10 @@ function add() {
|
|||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
myIframe.setSel(); //aaa()为子页面的方法
|
||||
},
|
||||
end: function () {
|
||||
// 可选:清除回调防止内存泄漏
|
||||
window.parent.onSaveSuccess = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -505,3 +514,12 @@ function exportPersonnelOnSite() {
|
|||
+ "&lightStatus=" + lightStatus
|
||||
+ "&keyWord=" + keyWord;
|
||||
}
|
||||
|
||||
// 全局定义 onSaveSuccess 函数
|
||||
function onSaveSuccess() {
|
||||
var table = $('#dt-table').DataTable();
|
||||
var currentPage = table.page(); // 获取当前页码
|
||||
table.ajax.reload(function () {
|
||||
table.page(currentPage).draw('page'); // 跳回原页码
|
||||
}, false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1584,7 +1584,8 @@ function addPerson(data, loadingMsg) {
|
|||
setTimeout(function () {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
parent.layer.closeAll();
|
||||
window.parent.location.reload();
|
||||
// window.parent.location.reload();
|
||||
window.parent.onSaveSuccess(); // 触发刷新并回到原页码
|
||||
}, 5000);
|
||||
// parent.layer.closeAll();
|
||||
} else {
|
||||
|
|
@ -1890,7 +1891,8 @@ function setData(data) {
|
|||
function reloading() {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
window.parent.location.reload();
|
||||
// window.parent.location.reload();
|
||||
window.parent.onSaveSuccess(); // 触发刷新并回到原页码
|
||||
}
|
||||
|
||||
function getHoliday(value) {
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ public class UploadController {
|
|||
String Files = "/data/real_name/" + mkdirsName + "/";
|
||||
String os = System.getProperty("os.name");
|
||||
if (os.toLowerCase().startsWith("win")) {
|
||||
Files = "D://yn/real_name/" + mkdirsName;
|
||||
Files = "E://yn/real_name/" + mkdirsName;
|
||||
|
||||
}
|
||||
DateTime date = DateUtil.date();
|
||||
|
|
|
|||
Loading…
Reference in New Issue