禅道bug修改

This commit is contained in:
lSun 2024-12-06 19:58:39 +08:00
parent c7d1f0a6d3
commit a4bb4895f1
33 changed files with 102 additions and 61 deletions

View File

@ -32,7 +32,7 @@ public interface OwnerDao {
/*** 根据id查询信息* */
OwnerBean getOwnerById(String id);
int getOwnerByName(@Param("name") String name,@Param("ownerName") String ownerName);
int getOwnerByName(@Param("name") String name,@Param("ownerName") String ownerName,@Param("ownerPhone") String ownerPhone);
Integer importData(@Param("list") List<OwnerBean> list);

View File

@ -32,7 +32,7 @@ public class OwnerServiceImpl implements OwnerService {
if (StringUtils.isEmpty(bean.getName())){
return R.fail(null,"添加失败,缺少业主单位名称");
}else{
int dis = dao.getOwnerByName(bean.getName(),bean.getOwnerName());
int dis = dao.getOwnerByName(bean.getName(),bean.getOwnerName(),bean.getOwnerPhone());
if (dis > 0){
System.out.println("添加失败,已存在重复的业主单位");
return R.fail(null,"添加失败,已存在重复的业主单位");
@ -49,7 +49,7 @@ public class OwnerServiceImpl implements OwnerService {
if (StringUtils.isEmpty(bean.getName())){
return R.fail(null,"修改失败,缺少业主单位名称");
}else{
int dis = dao.getOwnerByName(bean.getName(),bean.getOwnerName());
int dis = dao.getOwnerByName(bean.getName(),bean.getOwnerName(),bean.getOwnerPhone());
if (dis >= 1){
System.out.println("修改失败,已存在重复的业主单位");
return R.fail(null,"修改失败,已存在重复的业主单位");
@ -83,6 +83,10 @@ public class OwnerServiceImpl implements OwnerService {
}else if(bean.getOwnerPhone()==null || bean.getOwnerPhone().length()<1){
return "" + (i+1) + "行联系方式为空,导入失败";
}
int dis = dao.getOwnerByName(bean.getName(),bean.getOwnerName(),bean.getOwnerPhone());
if (dis > 0){
return "" + (i+1) + "行添加失败,已存在重复的业主单位,导入失败";
}
}
Integer result = dao.importData(list);
if (result != null && result > 0){

View File

@ -246,4 +246,7 @@ public class BasePersonBean {
private List<BasePersonBean> idNumberList;
@Excel(name = "务工类型 * ",required = true)
private String employmentTypes;//关键信息 务工类型
}

View File

@ -223,6 +223,14 @@ public class BasePersonServiceImp implements BasePersonService{
if (u != null || b != null) {
throw new IllegalArgumentException(c.getIdNumber() + "已存在或为黑名单");
}
if(c.getEmploymentTypes().equals("本地务工(兰坪)")){
c.setEmploymentTypes("0");
}else if(c.getEmploymentTypes().equals("外地务工")){
c.setEmploymentTypes("1");
}else{
throw new IllegalArgumentException(c.getEmploymentTypes()+"务工类型无法正确匹配,请正确填写!");
}
});
return list;
}

View File

@ -460,8 +460,12 @@ public class SalaryStatServiceImpl implements SalaryStatService{
str[1], "1"));
});
list.forEach(c->{
c.setAttNum(String.valueOf(personSubContractList.stream().filter(k -> c.getSubContractId().equals(k.getContractId())).
mapToDouble(k -> Double.parseDouble(k.getAttDayNum())).sum()));
if(c.getPayMonth().equals("无发放")){
c.setAttNum("0");
}else{
c.setAttNum(String.valueOf(personSubContractList.stream().filter(k -> c.getSubContractId().equals(k.getContractId())).
mapToDouble(k -> Double.parseDouble(k.getAttDayNum())).sum()));
}
int grantSalaryNum = personSubContractList.stream().filter(k -> c.getSubContractId().equals(k.getContractId())).
mapToInt(k -> salaryStatDao.selectSalaryByIdNumber(k.getIdNumber(), (String) request.getParams().get("startMonth"))).sum();
c.setGrantSalaryNum(grantSalaryNum + "");

View File

@ -249,9 +249,15 @@ public class IntegratedQueryServiceImpl implements IntegratedQueryService{
//计算考勤率
//1.0计算入场考勤率
if (punchCardBean.getEinPersonNum() > 0) {
double result = HighPrecisionUtil.divide(punchCardBean.getAttPersonNum(),punchCardBean.getEinPersonNum(),4);
String inPlaceAttRate = HighPrecisionUtil.multiply(result, 100,4)+"%";
punchCardBean.setInPlaceAttRate(inPlaceAttRate);
if(punchCardBean.getAttPersonNum().equals(0)){
punchCardBean.setInPlaceAttRate("0.00%");
}else if(punchCardBean.getEinPersonNum().equals(0)){
punchCardBean.setInPlaceAttRate("0.00%");
}else{
double result = HighPrecisionUtil.divide(punchCardBean.getAttPersonNum(),punchCardBean.getEinPersonNum(),4);
String inPlaceAttRate = HighPrecisionUtil.multiply(result, 100,4)+"%";
punchCardBean.setInPlaceAttRate(inPlaceAttRate);
}
}
//2.0计算日计划考勤率
if (punchCardBean.getPlanPersonNum() > 0) {

View File

@ -232,7 +232,7 @@ public class ViolationBlackListServiceImpl implements ViolationBlackListService
}
// 导出标题
ExcelWriter writer = ExcelUtil.getWriter(true);
writer.merge(8, "违章黑名单");
writer.merge(7, "违章黑名单");
writer.write(rows, true);
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
try {

View File

@ -48,6 +48,7 @@
owner_phone like concat('%', #{params.keyWord}, '%') or
`name` like concat('%', #{params.keyWord}, '%'))
</if>
GROUP BY update_time desc
limit #{offset},#{limit}
</select>
@ -71,5 +72,6 @@
where is_active = '1'
and `name` = #{name}
and owner_name = #{ownerName}
and owner_phone = #{ownerPhone}
</select>
</mapper>

View File

@ -10,7 +10,7 @@
`sign_date`, `expiry_date`, `phone`,
`cultrue`, `political_outlook`, `address_phone`,
`post_id`, `person_type`, `worker_skill`,
`important_person`, `urgent_person`, `urgent_person_phone`)
`important_person`, `urgent_person`, `urgent_person_phone`,employment_type)
values
<foreach item="params" collection="list" separator=",">
(#{params.idNumber},#{params.name},#{params.sex},#{params.ethnic},
@ -18,7 +18,7 @@
#{params.signDate},#{params.expiryDate},#{params.phone},
#{params.cultrue},#{params.politicalOutlook},#{params.addressPhone},
#{params.postId}, #{params.personType},#{params.workerSkill},#{params.importantPerson},
#{params.urgentPerson},#{params.urgentPersonPhone})
#{params.urgentPerson},#{params.urgentPersonPhone},#{params.employmentTypes})
</foreach>
</insert>

View File

@ -267,6 +267,7 @@
sbud.remark
FROM salary_book_upload_details AS sbud
WHERE sbud.salary_id = #{params.id}
and sbud.bank_number is not null AND sbud.bank_number!="" and sbud.bank_name is not null AND sbud.bank_name !=""
<if test="params.keyWord != null and params.keyWord != ''">
and sbud.`name` like concat('%', #{params.keyWord}, '%')
</if>
@ -277,6 +278,7 @@
SELECT count(*)
FROM salary_book_upload_details AS sbud
WHERE sbud.salary_id = #{params.id}
and sbud.bank_number is not null AND sbud.bank_number!="" and sbud.bank_name is not null AND sbud.bank_name !=""
<if test="params.keyWord != null and params.keyWord != ''">
and sbud.`name` like concat('%', #{params.keyWord}, '%')
</if>

View File

@ -537,7 +537,7 @@ html {
background-color: #FDECD9;
}
#proInformationLevel{
width: 40%;
width: 35%;
}
#proInformationLevel > .layui-row{
margin-top: 28px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -158,7 +158,7 @@ function view(id) {
//新增
function addPorject() {
var height = '350px';
var width = '450px';
var width = '480px';
var index = layer.open({
title: ['新增', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
type: 2,
@ -193,7 +193,7 @@ function edit(id) {
dataType: 'json',
success: function (data) {
var height = '350px';
var width = '450px';
var width = '480px';
var index = layer.open({
title: ['修改', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
type: 2,

View File

@ -63,6 +63,7 @@ function addProject(formData) {
if (data.msg.indexOf("成功") != -1) {
top.layer.close(addLoadingMsg); //再执行关闭
parent.layer.msg('保存成功', {icon: 1, time: 2000});
setTimeout("reloading()", 2100);
// parent.layer.closeAll();
} else if (data.msg.indexOf("失败") != -1) {
top.layer.close(addLoadingMsg); //再执行关闭
@ -71,7 +72,7 @@ function addProject(formData) {
} else {
top.layer.close(addLoadingMsg); //再执行关闭
parent.layer.msg(data.msg, {icon: 2, time: 2000});
parent.layer.closeAll();
// parent.layer.closeAll();
}
},
error: function (XMLHttpRequest, textStatus, e) {

View File

@ -25,27 +25,22 @@ $(function () {
}
// 验证成功后才会执行下面的操作
form.on('submit(formDemo)', function (data) {
var subId = $("#subId").val();
if (subId == '' || subId == null){
layer.msg('请选择分包名称', {icon: 2, time: 1500})
return false;
}
var id = $("#id").val();
if (id == '' || id == null) {
if (!$('#path')[0].files[0]) {
layer.msg("请上传文件!");
return false; // 阻止表单提交
}else{
// 加载提示
addLoadingMsg = top.layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
uploadFile();
addProject(data); // 新增
}
// 加载提示
addLoadingMsg = top.layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
uploadFile();
addProject(data); // 新增
}else {
if(filePath === null || filePath === ''){
layer.msg("请上传文件!");
return false; // 阻止表单提交
}else{
// 加载提示
addLoadingMsg = top.layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
uploadFile();
updateInfo(data);
}
// 加载提示
addLoadingMsg = top.layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
uploadFile();
updateInfo(data);
}
});

View File

@ -112,9 +112,11 @@ function init() {
var html = "";
if (path != null && path.indexOf("http") != -1){
html = "<a style='color: #1E9FFF' target='_blank' href='"+path+"'>查看</a>"
}else{
}else if(path != null){
let rePath = fileUrl + "/" + path;
html = "<a style='color: #1E9FFF' target='_blank' href='"+rePath+"'>查看</a>"
}else{
html = "<span style='color: #FF5722'>未上传</span>"
}
return html;
}

View File

@ -19,6 +19,12 @@ $(function () {
//批量-导入
function addInfo(formData) {
var fileInput = document.getElementById('file');
if (fileInput.files.length === 0) {
// 如果没有选择文件,则弹出提示框
layer.msg('请选择要上传的文件', {icon: 5});
return false;
}
var fileData = new FormData();
fileData.append('file', $('#file')[0].files[0]);
// 加载提示

View File

@ -186,7 +186,7 @@ function buttonDel(id, permission, pers) {
// 导入
function fileImport(){
var height = '150px';
var height = '180px';
var width = '350px';
var index = layer.open({
title: ['导入', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],

View File

@ -47,6 +47,9 @@ function addProject(formData) {
layer.alert(data.msg,{icon:1},()=>{
reloading();
})
setTimeout(function () {
reloading();
}, 2000);
}else{
layer.alert(data.msg,{icon:2})
}
@ -77,6 +80,9 @@ function updateInfo(formData) {
layer.alert(data.msg,{icon: 1},()=>{
reloading()
})
setTimeout(function () {
reloading();
}, 2000);
}else{
layer.alert(data.msg,{icon: 2})
}

View File

@ -129,8 +129,6 @@ function init() {
html += "<span>无</span>";
}
return html;
return html;
}, width: "8%"
},
{

View File

@ -118,7 +118,7 @@
</div>
</div>
<div class="layui-input-inline" style="width: 42%">
<!--<div class="layui-input-inline" style="width: 42%">
<label class="layui-form-label" style="width: 110px">
<i class="tip-required" style="color: red;font-size: 20px">*</i>人脸照片</label>
<div class="layui-input-block">
@ -131,7 +131,7 @@
<input type="hidden" id="facePath">
<button id="hideUploadFaceProve" style="" hidden></button>
</div>
</div>
</div>-->
</div>
</div>
@ -337,8 +337,7 @@
</div>
<div class="layui-input-inline" style="width: 42%">
<label class="layui-form-label" style="width: 110px"><i class="tip-required"
style="color: red;font-size: 20px">*</i>特殊节假日</label>
<label class="layui-form-label" style="width: 110px">特殊节假日</label>
<div class="layui-input-block">
<div id="holidays"></div>
</div>

View File

@ -549,9 +549,9 @@ function baseInformationRequired(){
success: function (data) {
if(data.code != '200'){
layer.alert(data.msg,{icon: 0});
if(data.msg === idNumber + '已存在'){
updateView(idNumber);
}
// if(data.msg === idNumber + '已存在'){
// updateView(idNumber);
// }
state = false;
}
}
@ -1517,6 +1517,7 @@ function addPerson(data, loadingMsg) {
setTimeout(function() {
layer.close(loadingMsg); // 关闭提示层
parent.layer.closeAll();
window.parent.location.reload();
}, 5000);
} else {
layer.alert(data.msg);
@ -1553,7 +1554,7 @@ function getHoliday(value){
for (let i = 0; i < resultObj.length; i++) {
let obj = {
name : resultObj[i],
value : -1,
value : resultObj[i],
selected : true
};
values.push(obj);

View File

@ -102,7 +102,7 @@
</div>
</div>
<div class="layui-input-inline" style="width: 42%">
<!--<div class="layui-input-inline" style="width: 42%">
<label class="layui-form-label" style="width: 110px">
<i class="tip-required" style="color: red;font-size: 20px">*</i>人脸照片</label>
<div class="layui-input-block">
@ -115,7 +115,7 @@
<input type="hidden" id="facePath">
<button id="hideUploadFaceProve" style="" hidden></button>
</div>
</div>
</div>-->
</div>
</div>
@ -311,8 +311,7 @@
</div>
<div class="layui-input-inline" style="width: 42%">
<label class="layui-form-label" style="width: 110px"><i class="tip-required"
style="color: red;font-size: 20px">*</i>特殊节假日</label>
<label class="layui-form-label" style="width: 110px">特殊节假日</label>
<div class="layui-input-block">
<div id="holidays"></div>
</div>

View File

@ -1394,6 +1394,7 @@ function addPerson(data, loadingMsg) {
setTimeout(function() {
layer.close(loadingMsg); // 关闭提示层
parent.layer.closeAll();
window.parent.location.reload();
}, 5000);
// parent.layer.closeAll();
} else {
@ -1645,7 +1646,7 @@ function getHoliday(value){
for (let i = 0; i < resultObj.length; i++) {
let obj = {
name : resultObj[i],
value : -1,
value : resultObj[i],
selected : true
};
values.push(obj);

View File

@ -295,8 +295,7 @@
</div>
<div class="layui-input-inline" style="width: 42%">
<label class="layui-form-label" style="width: 110px"><i class="tip-required"
style="color: red;font-size: 20px">*</i>特殊节假日</label>
<label class="layui-form-label" style="width: 110px">特殊节假日</label>
<div class="layui-input-block">
<div id="holidays"></div>
</div>

View File

@ -374,7 +374,7 @@ function getHoliday(value){
for (let i = 0; i < resultObj.length; i++) {
let obj = {
name : resultObj[i],
value : -1,
value : resultObj[i],
selected : true
};
values.push(obj);

View File

@ -54,7 +54,7 @@
<div class="layui-inline">
<label class="layui-form-label"><i class="tip-required" style="color: red;font-size: 20px">*</i>业主单位名称:</label>
<div class="layui-input-inline">
<input type="text" name="name" style="width: 90.5%" id="name" maxlength="122" lay-verify="required|username" class="layui-input">
<input type="text" name="name" id="name" maxlength="122" lay-verify="required|username" class="layui-input">
</div>
</div>

View File

@ -48,7 +48,7 @@
<div class="layui-inline">
<label class="layui-form-label "><i class="tip-required" style="color: red;font-size: 20px">*</i>分包名称:</label>
<div class="layui-input-inline" style="border: 0.5px solid #E6E6E6;height: 37px;text-indent: 10px;">
<select id="subId" name="subId" lay-verify="subId" class="layui-select">
<select id="subId" name="subId" lay-verify="subId" class="layui-select" >
</select>
</div>
@ -72,7 +72,7 @@
</div>
<div class="layui-inline">
<label class="layui-form-label"><i class="tip-required" style="color: red;font-size: 20px">*</i>附件:</label>
<label class="layui-form-label">附件:</label>
<div class="layui-input-inline">
<input type="file" name="path" id="path" >
</div>

View File

@ -66,12 +66,12 @@
</div>
<div class="layui-inline">
<label class="layui-form-label"><i class="tip-required" style="color: red;font-size: 20px">*</i>事件:</label>
<label class="layui-form-label">事件:</label>
<textarea class="layui-textarea layui-input-inline" id="event" name="event"></textarea>
</div>
<div class="layui-inline">
<label class="layui-form-label"><i class="tip-required" style="color: red;font-size: 20px">*</i>附件:</label>
<label class="layui-form-label">附件:</label>
<button type="button" class="layui-btn" id="test1">
<i class="layui-icon">&#xe67c;</i>选择附件
</button>

View File

@ -17,7 +17,7 @@
<div id="dataDiv">
<div class="layui-form">
<form action="" method="post" enctype="multipart/form-data" >
<input style="margin-left: 30px;margin-top: 10px;" type="file" id="file" name="file">
<input style="margin-left: 30px;margin-top: 10px;" type="file" id="file" name="file" accept=".xlsx,.xls">
<div class="layui-form-item" style="display: none;">
<div class="layui-input-block">

View File

@ -267,6 +267,11 @@
<div class="grid-demo grid-demo-bg1" id="subNum4"></div>
</div>
</div>
<div style="text-align: center">
<img src='../../../img/fileIcon/overlap.png' width="25" height="15">
项目参建单位项目数量排名TOP5
</div>
</div>
<div id="proInformationType"></div>
</div>

View File

@ -59,7 +59,7 @@ public class AttachmentService {
if(os.toLowerCase().startsWith("win")){
//windows的目录
imageFiles="D://yn/real_name/" + photoType + "/";
imageFiles="E://yn/real_name/" + photoType + "/";
}
String year = DateUtils.getNowYear();
String month = DateUtils.getNowMonths();
@ -112,7 +112,7 @@ public class AttachmentService {
String os = System.getProperty("os.name");
if(os.toLowerCase().startsWith("win")){
//windows的目录
imageFiles="D://yn/real_name/" + photoType + "/";
imageFiles="E://yn/real_name/" + photoType + "/";
}
String year = DateUtils.getNowYear();
String month = DateUtils.getNowMonths();