diff --git a/modules/bmw/src/main/java/com/bonus/bmw/holiday/controller/SpecialHolidayController.java b/modules/bmw/src/main/java/com/bonus/bmw/holiday/controller/SpecialHolidayController.java index 6d6d5ec..fe8dd04 100644 --- a/modules/bmw/src/main/java/com/bonus/bmw/holiday/controller/SpecialHolidayController.java +++ b/modules/bmw/src/main/java/com/bonus/bmw/holiday/controller/SpecialHolidayController.java @@ -62,11 +62,16 @@ public class SpecialHolidayController { public R addSpecialHoliday(@RequestBody Holiday bean) { R ar = null; try{ - int i = service.addSpecialHoliday(bean); - if(i>0){ - ar = R.ok(); + int k = service.getSpecialHolidayByName(bean); + if(k>0){ + ar = R.fail("重复的名字"); }else{ - ar = R.fail(Constants.INSERT_FAIL); + int i = service.addSpecialHoliday(bean); + if(i>0){ + ar = R.ok(); + }else{ + ar = R.fail(Constants.INSERT_FAIL); + } } }catch (Exception e) { e.printStackTrace(); diff --git a/modules/bmw/src/main/resources/mapper/basic/UserMapper.xml b/modules/bmw/src/main/resources/mapper/basic/UserMapper.xml index 9c32fba..84c4ed0 100644 --- a/modules/bmw/src/main/resources/mapper/basic/UserMapper.xml +++ b/modules/bmw/src/main/resources/mapper/basic/UserMapper.xml @@ -21,7 +21,7 @@ LEFT JOIN ( SELECT id_number, project_id, is_furlough_person FROM bm_worker_ein_history WHERE ( is_furlough_person = '1' OR exit_status != 1 ) AND is_active = '1' limit 1) bweh ON bweh.id_number = t.id_number LEFT JOIN bm_project bp2 ON bp2.id = bweh.project_id - t.is_active = '1' and t.id != '1' and t.username is not null + t.is_active = '1' and t.id != '1' and t.username is not null AND sr.id !='5' and sr.id !='36' and t.username like concat('%', #{params.userName}, '%') @@ -81,7 +81,7 @@ LEFT JOIN ( SELECT id_number, project_id, is_furlough_person FROM bm_worker_ein_history WHERE ( is_furlough_person = '1' OR exit_status != 1 ) AND is_active = '1' limit 1) bweh ON bweh.id_number = t.id_number LEFT JOIN bm_project bp2 ON bp2.id = bweh.project_id - t.is_active = '1' and t.id != '1' and t.username is not null + t.is_active = '1' and t.id != '1' and t.username is not null AND sr.id !='5' and sr.id !='36' and t.username like concat('%', #{params.userName}, '%') @@ -102,6 +102,7 @@ ) + ORDER BY sr.id, t.id desc limit #{offset}, #{limit} diff --git a/modules/bmw/src/main/resources/mapper/holiday/SpecialHolidayMapper.xml b/modules/bmw/src/main/resources/mapper/holiday/SpecialHolidayMapper.xml index 56bd6e6..30a34d4 100644 --- a/modules/bmw/src/main/resources/mapper/holiday/SpecialHolidayMapper.xml +++ b/modules/bmw/src/main/resources/mapper/holiday/SpecialHolidayMapper.xml @@ -76,6 +76,9 @@ @@ -154,6 +155,7 @@ ) GROUP BY bw.id_number + ORDER BY bnstp.id_number desc limit #{offset}, #{limit} diff --git a/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/personEntryFrom.js b/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/personEntryFrom.js index e5d5bbc..a237e9a 100644 --- a/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/personEntryFrom.js +++ b/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/personEntryFrom.js @@ -1470,7 +1470,7 @@ function uploadFileProve(number) { }, choose: function (obj) { if(Object.keys(files).length>=number){ - layer.msg("最多上传"+number+"张图片",); + layer.msg("最多上传"+number+"张",); return false; }else{ tk = layer.msg('社保文件上传中...',{ icon:16,shade:0.8,time: 0}); @@ -1575,7 +1575,7 @@ function uploadFileWageCard(number) { }, choose: function (obj) { if(Object.keys(WageCardFiles).length>=number){ - layer.msg("最多上传"+number+"张图片", { time: 2000, icon: 2 }); + layer.msg("最多上传"+number+"张", { time: 2000, icon: 2 }); return false; } flag = false; diff --git a/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/personEntryUpd.js b/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/personEntryUpd.js index 3cf7b35..ac79c8b 100644 --- a/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/personEntryUpd.js +++ b/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/personEntryUpd.js @@ -20,6 +20,7 @@ let teamExamFiles = {} let socialSecurityFiles ={} var deleteContractPath ="", deleteWageCardPath = ""; +var contractNum = 0, wageCardNum = 0; var tk; layui.use(['form', 'laydate', 'upload', 'element'], function () { @@ -1055,6 +1056,7 @@ function uploadFileWageCard(number) { size: 1024 * 30, //最大文件大小,单位k bindAction: "#hideUploadWageCard", //绑定的按钮 field: "file", //传到后台的字段名,默认file + timeout: 60000, text: { // 自定义提示文本 "data-format-error": "上传失败,请重新上传", // 数据格式错误的提示 @@ -1066,7 +1068,7 @@ function uploadFileWageCard(number) { "cross-domain": "", // IE 下跨域的提示 }, choose: function (obj) { - if(Object.keys(WageCardFiles).length>=number){ + if(Object.keys(WageCardFiles).length + wageCardNum >=number){ layer.msg("最多上传"+number+"张图片", { time: 2000, icon: 2 }); return false; } @@ -1116,7 +1118,6 @@ function uploadFileWageCard(number) { this.data = { fileType: "工资卡文件", idNumber: $("#idNumber").val(), - isEdit:1 }; if ($("[name='brand']").val() == "") { return false; @@ -1491,6 +1492,7 @@ function uploadFileContract(number) { size: 1024 * 30, //最大文件大小,单位k bindAction: "#hideUploadContract", //绑定的按钮 field: "file", //传到后台的字段名,默认file + timeout: 60000, text: { // 自定义提示文本 "data-format-error": "上传失败,请重新上传", // 数据格式错误的提示 @@ -1502,6 +1504,11 @@ function uploadFileContract(number) { "cross-domain": "", // IE 下跨域的提示 }, choose: function (obj) { + debugger; + if(Object.keys(ContractFiles).length + contractNum >=number){ + layer.msg("最多上传"+number+"张", { time: 2000, icon: 2 }); + return false; + } flag = false; var suffixType = ""; //后缀类型 uploadcom.config.elem.next()[0].value = ""; @@ -1549,7 +1556,6 @@ function uploadFileContract(number) { fileType: "合同文件", contractId, idNumber: $("#idNumber").val(), - isEdit:1 }; if ($("[name='brand']").val() == "") { return false; @@ -1857,7 +1863,9 @@ function setData(data) { fileSrc + '" alt="" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">'; // htmlCardPath += '
' + (socialSecurityUnit[i].length > 8 ? (socialSecurityUnit[i].substr(0, 8) + "..") : socialSecurityUnit[i]) + '
' + htmlCardPath += "
已上传的工资卡
"; htmlCardPath += ""; + wageCardNum ++; } } $("#demoWageCard").append(htmlCardPath); @@ -1900,7 +1908,9 @@ function setData(data) { ''; + htmlContract += "
已上传的合同
"; htmlContract += ""; + contractNum ++; } } $("#demoContract").append(htmlContract); @@ -2040,18 +2050,6 @@ function setData(data) { img.src = fileUrl + "/" + data.facePhoto; $("#facePath").val(data.facePhoto); - // bindImageDeleteEvent("#previewProve", socialSecurityFiles, () => socialSecurityPath = ""); - - // bindImageDeleteEvent("#demoWageCard", WageCardFiles, () => { - // // 清除工资卡文件路径 - // wageCardPath = []; - // }); - - // bindImageDeleteEvent("#demoContract", ContractFiles, () => { - // // 清除合同文件路径 - // contractPath = []; - // }); - bindImageDeleteEvent("#checkupProve", CheckupFiles , () => checkupFilePath = ""); bindImageDeleteEvent("#companyExamDemoProve", companyExamFiles, () => companyExamFilePath = ""); @@ -2568,10 +2566,12 @@ function uploadSpecial(number) { function deleteContract(id,path){ $('#' + id).remove(); deleteContractPath += path + ','; + contractNum -- } //删除合同见证照片 function deleteWageCard(id,path){ $('#' + id).remove(); deleteWageCardPath += path + ','; + wageCardNum -- } \ No newline at end of file