Compare commits

..

No commits in common. "1d69b537d6ca19abf230e7607e4dde3df0e89d32" and "cd2a5ab799daeb41c5f487b3ebc27ed17b4dc558" have entirely different histories.

11 changed files with 9 additions and 340 deletions

View File

@ -1,8 +1,10 @@
package com.bonus.bmw.controller;
import com.bonus.bmw.domain.vo.*;
import com.bonus.bmw.domain.vo.BmWorkerBlack;
import com.bonus.bmw.domain.vo.BmWorkerContract;
import com.bonus.bmw.domain.vo.BmWorkerLight;
import com.bonus.bmw.domain.vo.PmWorker;
import com.bonus.bmw.service.BmWorkerBlackService;
import com.bonus.bmw.service.impl.BmWorkerBlackServiceImpl;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.web.page.TableDataInfo;
@ -15,7 +17,6 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
@ -89,21 +90,4 @@ public class BmWorkerBlackController extends BaseController {
}
/**
* 失信人员导出
*/
// @RequiresPermissions("system:user:export")
@PostMapping("/workerBlackExport")
@SysLog(title = "失信人员导出", businessType = OperaType.EXPORT, logType = 0, module = "施工人员->红绿灯管理->失信人员管理", details = "失信人员导出")
public void export(HttpServletResponse response, BmWorkerBlack o) {
try {
List<BmWorkerBlack> list = service.getWorkerBlackList(o);
ExcelUtil<BmWorkerBlack> util = new ExcelUtil<>(BmWorkerBlack.class);
util.exportExcel(response, list, "失信人员导出");
} catch (Exception e) {
logger.error(e.toString(), e);
}
}
}

View File

@ -6,7 +6,6 @@ import com.bonus.bmw.domain.vo.BmWorkerContract;
import com.bonus.bmw.domain.vo.BmWorkerWageCard;
import com.bonus.bmw.service.BmWorkerWageCardService;
import com.bonus.common.core.utils.json.FastJsonHelper;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.web.page.TableDataInfo;
@ -18,7 +17,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
@ -123,21 +121,5 @@ public class BmWorkerWageCardController extends BaseController {
}
}
/**
* 工资卡导出
*/
// @RequiresPermissions("system:user:export")
@PostMapping("/wageCardExport")
@SysLog(title = "工资卡导出", businessType = OperaType.EXPORT, logType = 0, module = "施工人员->红绿灯管理->合同管理", details = "工资卡导出")
public void export(HttpServletResponse response, BmWorkerWageCard o) {
try {
List<BmWorkerWageCard> list = service.selectWageCardList(o);
ExcelUtil<BmWorkerWageCard> util = new ExcelUtil<>(BmWorkerWageCard.class);
util.exportExcel(response, list, "工资卡导出");
} catch (Exception e) {
logger.error(e.toString(), e);
}
}
}

View File

@ -10,7 +10,6 @@ import com.bonus.bmw.service.impl.PmWorkerServiceImpl;
import com.bonus.common.core.utils.face.ArcFaceHelper;
import com.bonus.common.core.utils.face.FaceResult;
import com.bonus.common.core.utils.json.FastJsonHelper;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.web.page.TableDataInfo;
@ -24,7 +23,6 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
@ -176,21 +174,5 @@ public class PmWorkerController extends BaseController {
}
}
/**
* 人员信息导出
*/
// @RequiresPermissions("system:user:export")
@PostMapping("/workerEinExport")
@SysLog(title = "人员信息导出", businessType = OperaType.EXPORT, logType = 0, module = "施工人员->红绿灯管理->入场管理", details = "人员信息导出")
public void export(HttpServletResponse response, PmWorkerDto o) {
try {
List<PmWorker> list = service.selectWorkList(o);
ExcelUtil<PmWorker> util = new ExcelUtil<>(PmWorker.class);
util.exportExcel(response, list, "人员入场信息导出");
} catch (Exception e) {
logger.error(e.toString(), e);
}
}
}

View File

@ -4,11 +4,9 @@ import com.bonus.bmw.domain.dto.PmWorkerDto;
import com.bonus.bmw.domain.dto.WebFileDto;
import com.bonus.bmw.domain.vo.BmWorkerWageCard;
import com.bonus.bmw.domain.vo.PmWorker;
import com.bonus.bmw.domain.vo.PmWorkerExitExport;
import com.bonus.bmw.service.PmWorkerExitService;
import com.bonus.bmw.service.impl.PmWorkerServiceImpl;
import com.bonus.common.core.utils.json.FastJsonHelper;
import com.bonus.common.core.utils.poi.ExcelUtil;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.web.page.TableDataInfo;
@ -16,16 +14,13 @@ import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.log.enums.OperaType;
import com.bonus.common.security.annotation.InnerAuth;
import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 人员基础信息表(pm_worker)表控制层
@ -152,28 +147,4 @@ public class PmWorkerExitController extends BaseController {
return getDataTableError(new ArrayList<>());
}
/**
* 人员离场信息导出
*/
// @RequiresPermissions("system:user:export")
@PostMapping("/workerExitExport")
@SysLog(title = "人员离场信息导出", businessType = OperaType.EXPORT, logType = 0, module = "施工人员->红绿灯管理->离场管理", details = "人员离场信息导出")
public void export(HttpServletResponse response, PmWorkerDto o) {
try {
List<PmWorker> list = service.selectWorkList(o);
List<PmWorkerExitExport> exportList = list.stream()
.map(worker -> {
PmWorkerExitExport export = new PmWorkerExitExport();
BeanUtils.copyProperties(export, worker);
return export;
})
.collect(Collectors.toList());
ExcelUtil<PmWorkerExitExport> util = new ExcelUtil<>(PmWorkerExitExport.class);
util.exportExcel(response, exportList, "人员出场信息导出");
} catch (Exception e) {
logger.error(e.toString(), e);
}
}
}

View File

@ -1,6 +1,5 @@
package com.bonus.bmw.domain.vo;
import com.bonus.common.core.annotation.Excel;
import lombok.Data;
/**
@ -8,11 +7,6 @@ import lombok.Data;
*/
@Data
public class BmWorkerBlack {
//用于excel导出的序号一列,不需要业务逻辑处理
@Excel(name = "序号", isSequence = true, type = Excel.Type.EXPORT,sort = 1)
int sequence;
/**
* 编号
*/
@ -26,55 +20,46 @@ public class BmWorkerBlack {
/**
* 身份证
*/
@Excel(name = "身份证号码", type = Excel.Type.EXPORT, sort = 3)
private String idNumber;
/**
* 姓名
*/
@Excel(name = "姓名", type = Excel.Type.EXPORT, sort = 2)
private String name;
/**
* 岗位
*/
@Excel(name = "岗位", type = Excel.Type.EXPORT, sort = 4)
private String postName;
/**
* 工程
*/
@Excel(name = "工程", type = Excel.Type.EXPORT, sort = 5)
private String proName;
/**
* 分包
*/
@Excel(name = "分包", type = Excel.Type.EXPORT, sort = 6)
private String subName;
/**
* 理由
*/
@Excel(name = "事件", type = Excel.Type.EXPORT, sort = 7)
private String reason;
/**
* 开始时间
*/
@Excel(name = "开始时间", type = Excel.Type.EXPORT, sort = 8)
private String startTime;
/**
* 结束时间
*/
@Excel(name = "结束时间", type = Excel.Type.EXPORT, sort = 9)
private String endTime;
/**
* 是否解除 0 未解除 1 已解除
*/
@Excel(name = "是否解除", type = Excel.Type.EXPORT, sort = 10,readConverterExp = "执行中=0,已解除=1,已到解除时间=2")
private Integer isRemove;
/**

View File

@ -1,6 +1,5 @@
package com.bonus.bmw.domain.vo;
import com.bonus.common.core.annotation.Excel;
import com.bonus.system.api.model.UploadFileVo;
import lombok.Data;
@ -11,11 +10,6 @@ import java.util.List;
*/
@Data
public class BmWorkerWageCard {
//用于excel导出的序号一列,不需要业务逻辑处理
@Excel(name = "序号", isSequence = true, type = Excel.Type.EXPORT,sort = 1)
int sequence;
/**
* 编号
*/
@ -29,19 +23,16 @@ public class BmWorkerWageCard {
/**
* 银行卡号
*/
@Excel(name = "银行卡号", type = Excel.Type.EXPORT, sort = 4)
private String bankCardCode;
/**
* 银行名称
*/
@Excel(name = "银行名称", type = Excel.Type.EXPORT, sort = 5)
private String bankName;
/**
* 银行支行名称
*/
@Excel(name = "银行支行名称", type = Excel.Type.EXPORT, sort = 6)
private String bankBranchName;
/**
@ -57,19 +48,16 @@ public class BmWorkerWageCard {
/**
* 更新时间
*/
@Excel(name = "更新时间", type = Excel.Type.EXPORT, sort = 7)
private String updateTime;
/**
* 名字
*/
@Excel(name = "姓名", type = Excel.Type.EXPORT, sort = 2)
private String name;
/**
* 身份证
*/
@Excel(name = "身份证号码", type = Excel.Type.EXPORT, sort = 3)
private String idNumber;
/**

View File

@ -2,7 +2,6 @@ package com.bonus.bmw.domain.vo;
import java.util.Date;
import com.bonus.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
@ -11,11 +10,6 @@ import lombok.Data;
*/
@Data
public class PmWorker {
//用于excel导出的序号一列,不需要业务逻辑处理
@Excel(name = "序号", isSequence = true, type = Excel.Type.EXPORT,sort = 1)
int sequence;
/**
* 编号
*/
@ -24,13 +18,11 @@ public class PmWorker {
/**
* 姓名
*/
@Excel(name = "姓名", type = Excel.Type.EXPORT, sort = 2)
private String name;
/**
* 身份证
*/
@Excel(name = "身份证", type = Excel.Type.EXPORT, sort = 3)
private String idNumber;
/**
@ -88,7 +80,6 @@ public class PmWorker {
/**
* 入场状态 0未入场 1 已入场
*/
@Excel(name = "入场状态", type = Excel.Type.EXPORT, sort = 8,readConverterExp = "入场=1,未入场=0")
private Integer einStatus;
/**
@ -108,23 +99,19 @@ public class PmWorker {
/**
* 项目名称
*/
@Excel(name = "项目名称", type = Excel.Type.EXPORT, sort = 5)
private String proName;
/**
* 分包名称
*/
@Excel(name = "分包名称", type = Excel.Type.EXPORT, sort = 6)
private String subName;
/**
* 班组名称
*/
@Excel(name = "班组名称", type = Excel.Type.EXPORT, sort = 7)
private String teamName;
/**
* 岗位名称
*/
@Excel(name = "岗位名称", type = Excel.Type.EXPORT, sort = 4)
private String postName;
/**
@ -148,7 +135,6 @@ public class PmWorker {
/**
* 入场时间
*/
@Excel(name = "入场时间", type = Excel.Type.EXPORT, sort = 9)
private String einTime;
/**
@ -169,14 +155,4 @@ public class PmWorker {
private String workerId;
private String exitTime;
/**
* 是否上传离职文件 0未上传 1已上传
*/
private String isUploadFile;
/**
* 离职时间间隔
*/
private String daysSinceExit;
}

View File

@ -1,181 +0,0 @@
package com.bonus.bmw.domain.vo;
import com.bonus.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* 人员导出基础信息表
*/
@Data
public class PmWorkerExitExport {
//用于excel导出的序号一列,不需要业务逻辑处理
@Excel(name = "序号", isSequence = true, type = Excel.Type.EXPORT,sort = 1)
int sequence;
/**
* 编号
*/
private Integer id;
/**
* 姓名
*/
@Excel(name = "姓名", type = Excel.Type.EXPORT, sort = 2)
private String name;
/**
* 身份证
*/
@Excel(name = "身份证", type = Excel.Type.EXPORT, sort = 3)
private String idNumber;
/**
* 性别
*/
private String sex;
/**
* 年龄
*/
private Integer age;
/**
* 手机号
*/
private String phone;
/**
* 出生日期 生日
*/
private String birthday;
/**
* 民族
*/
private String nation;
/**
* 签发机关
*/
private String issuingAuthority;
/**
* 有效期开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startTime;
/**
* 有效期结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
/**
* 家庭住址
*/
private String address;
/**
* 人脸照片
*/
private String facePhoto;
/**
* 入场状态 0未入场 1 已入场
*/
@Excel(name = "入场状态", type = Excel.Type.EXPORT, sort = 7,readConverterExp = "入场=1,未入场=0")
private Integer einStatus;
/**
* 0 默认 1 黄灯 2 绿灯 3 失信人员
*/
private Integer lightStatus;
/**
* 创建人
*/
private String createUser;
/**
* 修改人
*/
private String updateUser;
/**
* 项目名称
*/
@Excel(name = "项目名称", type = Excel.Type.EXPORT, sort = 4)
private String proName;
/**
* 分包名称
*/
@Excel(name = "分包名称", type = Excel.Type.EXPORT, sort = 5)
private String subName;
/**
* 班组名称
*/
@Excel(name = "班组名称", type = Excel.Type.EXPORT, sort = 6)
private String teamName;
/**
* 岗位名称
*/
private String postName;
/**
* 项目名称
*/
private String proId;
/**
* 分包名称
*/
private String subId;
/**
* 班组名称
*/
private String teamId;
/**
* 岗位名称
*/
private String postId;
/**
* 入场时间
*/
@Excel(name = "入场时间", type = Excel.Type.EXPORT, sort = 8)
private String einTime;
/**
* 出场时间
*/
@Excel(name = "出场时间", type = Excel.Type.EXPORT, sort = 9)
private String exitTime;
/**
* 是否上传文件 0未上传 1 已上传
*/
@Excel(name = "是否上传离职文件", type = Excel.Type.EXPORT, sort = 10,readConverterExp = "未上传=0,已上传=1")
private String isUploadFile;
/**
* 创建时间
*/
private Integer contractId;
/**
* 合同信息
*/
private BmWorkerContract bmWorkerContract;
/**
* 工资卡信息
*/
private BmWorkerWageCard bmWorkerWageCard;
private String workerId;
}

View File

@ -32,7 +32,7 @@ public interface PmWorkerExitMapper {
* @param einStatus
* @return
*/
int updateEinProRecordStatus(@Param("workerId") Integer id,@Param("einStatus") Integer einStatus,@Param("isUploadFile") Integer isUploadFile);
int updateEinProRecordStatus(@Param("workerId") Integer id,@Param("einStatus") Integer einStatus);
List<PmWorker> selectWorkListByWorkerId(PmWorkerDto o);
}

View File

@ -40,9 +40,7 @@ public class PmWorkerExitServiceImpl implements PmWorkerExitService {
int n = mapper.deleteEinMsgByWorkerId(record.getWorkerId());
//修改在场记录表状态
int einStatus = 2;
//是否上传文件
int isUploadFile = 1;
int k = mapper.updateEinProRecordStatus(record.getId(),einStatus,isUploadFile);
int k = mapper.updateEinProRecordStatus(record.getId(),einStatus);
//组装数据
MultipartFile[] workerFiles = new MultipartFile[listFile.size()];
String[] type = new String[listFile.size()];
@ -63,9 +61,7 @@ public class PmWorkerExitServiceImpl implements PmWorkerExitService {
//删除实时在场
int j = mapper.deleteEinMsgByWorkerId(bean.getWorkerId());
int einStatus = 2;
//是否上传文件
int isUploadFile = 0;
int k = mapper.updateEinProRecordStatus(bean.getId(),einStatus,isUploadFile);
int k = mapper.updateEinProRecordStatus(bean.getId(),einStatus);
count += k;
}
return count==list.size()?1:0;
@ -93,10 +89,6 @@ public class PmWorkerExitServiceImpl implements PmWorkerExitService {
type[i] = listFile.get(i).getType();
}
List<UploadFileVo> uploadFileVos = fileUploadUtils.uploadFile(workerFiles, Constants.FILE_UPLOAD_WORKER_EXIT, o.getId().toString(), type,"", "");
int einStatus = 0;
//是否上传文件
int isUploadFile = 0;
int k = mapper.updateEinProRecordStatus(o.getId(),einStatus,isUploadFile);
return !uploadFileVos.isEmpty() ?1:0;
}

View File

@ -17,9 +17,6 @@
<result column="post_id" property="postId" />
<result column="sub_id" property="subId" />
<result column="worker_id" property="workerId" />
<result column="exit_time" property="exitTime" />
<result column="is_upload_file" property="isUploadFile" />
<result column="days_since_exit" property="daysSinceExit" />
</resultMap>
<select id="selectWorkList" resultMap="BaseResultMap">
@ -38,10 +35,7 @@
bwepr.post_id,
bwepr.post_name,
bwepr.ein_time,
bwepr.ein_status,
bwepr.is_upload_file,
if(is_upload_file=0,DATEDIFF(NOW(), exit_time),0) as days_since_exit,
bwepr.exit_time
bwepr.ein_status
FROM
pm_worker pw
LEFT JOIN bm_worker_ein_pro_record bwepr ON pw.id = bwepr.worker_id
@ -79,11 +73,7 @@
</delete>
<update id="updateEinProRecordStatus">
UPDATE bm_worker_ein_pro_record SET is_upload_file = #{isUploadFile}
<if test='einStatus != 0 '>
, ein_status = #{einStatus}
</if>
WHERE worker_id = #{workerId}
UPDATE bm_worker_ein_pro_record SET ein_status = #{einStatus} WHERE worker_id = #{workerId}
</update>
<select id="selectWorkListByWorkerId" resultMap="BaseResultMap">