三表一册

This commit is contained in:
方亮 2025-09-29 16:21:39 +08:00
parent 8a1a57dfa8
commit f59020eae2
15 changed files with 158 additions and 53 deletions

View File

@ -1,9 +1,5 @@
package com.bonus.common.security.interceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.AsyncHandlerInterceptor;
import com.bonus.common.core.constant.SecurityConstants;
import com.bonus.common.core.context.SecurityContextHolder;
import com.bonus.common.core.utils.ServletUtils;
@ -11,6 +7,11 @@ import com.bonus.common.core.utils.StringUtils;
import com.bonus.common.security.auth.AuthUtil;
import com.bonus.common.security.utils.SecurityUtils;
import com.bonus.system.api.model.LoginUser;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.AsyncHandlerInterceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* 自定义请求头拦截器将Header数据封装到线程变量中方便获取
@ -27,17 +28,19 @@ public class HeaderInterceptor implements AsyncHandlerInterceptor
{
return true;
}
String userId=ServletUtils.getHeader(request, SecurityConstants.DETAILS_USER_ID);
SecurityContextHolder.setUserId(ServletUtils.getHeader(request, SecurityConstants.DETAILS_USER_ID));
SecurityContextHolder.setUserName(ServletUtils.getHeader(request, SecurityConstants.DETAILS_USERNAME));
SecurityContextHolder.setUserKey(ServletUtils.getHeader(request, SecurityConstants.USER_KEY));
String token = SecurityUtils.getToken();
if (StringUtils.isNotEmpty(token))
{
if (StringUtils.isNotEmpty(token)) {
LoginUser loginUser = AuthUtil.getLoginUser(token);
if (StringUtils.isNotNull(loginUser))
{
SecurityContextHolder.setUserId(loginUser.getUserid().toString());
AuthUtil.verifyLoginUserExpire(loginUser);
SecurityContextHolder.set(SecurityConstants.LOGIN_USER, loginUser);
}

View File

@ -162,7 +162,7 @@ public class PmProjectController extends BaseController {
*/
/*@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("pm:company:del"))*/
@PostMapping("/getPeoNum")
@SysLog(title = "标段工程", businessType = OperaType.UPDATE, module = "标段工程->获取班组人员出入场信息")
@SysLog(title = "标段工程", businessType = OperaType.QUERY, module = "标段工程->获取班组人员出入场信息")
public AjaxResult getPeoNum(@Validated @RequestBody BmSubContract bmSubContract) {
try {
Map<String, Object> res = pmProjectService.getPeoNum(bmSubContract);
@ -178,7 +178,7 @@ public class PmProjectController extends BaseController {
*/
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("pro:month:list"))
@GetMapping("/getThreeForms")
@SysLog(title = "三表一册", businessType = OperaType.UPDATE, module = "三表一册->三表一册列表")
@SysLog(title = "三表一册", businessType = OperaType.QUERY, module = "三表一册->三表一册列表")
public TableDataInfo getThreeForms(ProMonthTable proMonthTable) {
try {
startPage();
@ -195,7 +195,7 @@ public class PmProjectController extends BaseController {
*/
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("pro:month:list"))
@GetMapping("/getProMonthTableList")
@SysLog(title = "三表一册", businessType = OperaType.UPDATE, module = "三表一册->每月数据")
@SysLog(title = "三表一册", businessType = OperaType.QUERY, module = "三表一册->每月数据")
public TableDataInfo getProMonthTableList(BmSubContract bmSubContract) {
try {
startPage();
@ -212,7 +212,7 @@ public class PmProjectController extends BaseController {
*/
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("pro:month:list"))
@GetMapping("/getProjectById")
@SysLog(title = "三表一册", businessType = OperaType.UPDATE, module = "三表一册->获取项目详情")
@SysLog(title = "三表一册", businessType = OperaType.QUERY, module = "三表一册->获取项目详情")
public AjaxResult getProjectById(BmSubContract bmSubContract) {
try {
PmProjectVo res = pmProjectService.getProjectById(bmSubContract);
@ -228,7 +228,7 @@ public class PmProjectController extends BaseController {
*/
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("pro:month:list"))
@GetMapping("/getProMonthTableRosterList")
@SysLog(title = "三表一册", businessType = OperaType.UPDATE, module = "三表一册->农民工花名册")
@SysLog(title = "三表一册", businessType = OperaType.QUERY, module = "三表一册->农民工花名册")
public AjaxResult getProMonthTableRosterList(ProMonthTableRosterVo proMonthTableRosterVo) {
try {
List<ProMonthTableRosterVo> res = pmProjectService.getProMonthTableRosterList(proMonthTableRosterVo);
@ -244,7 +244,7 @@ public class PmProjectController extends BaseController {
*/
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("pro:month:list"))
@GetMapping("/getUserSalaryApprovalList")
@SysLog(title = "三表一册", businessType = OperaType.UPDATE, module = "三表一册->农民工实名制工资信息报审")
@SysLog(title = "三表一册", businessType = OperaType.QUERY, module = "三表一册->农民工实名制工资信息报审")
public AjaxResult getUserSalaryApprovalList(UserSalaryApprovalVo userSalaryApprovalVo) {
try {
List<UserSalaryApprovalVo> res = pmProjectService.getUserSalaryApprovalList(userSalaryApprovalVo);
@ -277,7 +277,7 @@ public class PmProjectController extends BaseController {
*/
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("pro:month:list"))
@GetMapping("/getUserWagePayList")
@SysLog(title = "三表一册", businessType = OperaType.UPDATE, module = "三表一册->农民工工资支付表")
@SysLog(title = "三表一册", businessType = OperaType.QUERY, module = "三表一册->农民工工资支付表")
public AjaxResult getUserWagePayList(UserWagePayVo userWagePayVo) {
try {
List<UserWagePayVo> res = pmProjectService.getUserWagePayList(userWagePayVo);
@ -288,11 +288,28 @@ public class PmProjectController extends BaseController {
return error("系统异常,请联系管理员");
}
/**
* 代扣代缴
*/
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("pro:month:list"))
@PostMapping("/updateSalary")
@SysLog(title = "三表一册", businessType = OperaType.UPDATE, module = "三表一册->封档")
public AjaxResult updateSalary(@Validated @RequestBody List<UserWagePayVo> userWagePay) {
try {
int res = pmProjectService.updateSalary(userWagePay);
return toAjax(res);
} catch (Exception e) {
logger.error(e.toString(), e);
}
return error("系统异常,请联系管理员");
}
/**
* 封档
*/
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("pro:month:list"))
@GetMapping("/updateProMonthTable")
@PostMapping("/updateProMonthTable")
@SysLog(title = "三表一册", businessType = OperaType.UPDATE, module = "三表一册->封档")
public AjaxResult updateProMonthTable(@Validated @RequestBody ProMonthTable proMonthTable) {
try {
@ -324,12 +341,24 @@ public class PmProjectController extends BaseController {
return error("系统异常,请联系管理员");
}
@PostMapping("/updateRefundFileById/{id}")
@SysLog(title = "三表一册", businessType = OperaType.DELETE, module = "三表一册->封档")
public AjaxResult updateRefundFileById(@PathVariable Long id) {
try {
return pmProjectService.updateRefundFileById(id);
} catch (Exception e) {
logger.error(e.toString(), e);
}
return error("系统异常,请联系管理员");
}
/**
* 月度数据详情
*/
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("pro:month:list"))
@GetMapping("/getProMonthTableById")
@SysLog(title = "三表一册", businessType = OperaType.UPDATE, module = "三表一册->月度数据详情")
@SysLog(title = "三表一册", businessType = OperaType.QUERY, module = "三表一册->月度数据详情")
public AjaxResult getProMonthTableById(ProMonthTable proMonthTable) {
try {
ProMonthTable res = pmProjectService.getProMonthTableById(proMonthTable);

View File

@ -11,12 +11,16 @@ import com.bonus.common.security.annotation.InnerAuth;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static com.bonus.bmw.utils.OwnPermissionUtil.dealWithPermission;
/**
* 分公司
@ -39,6 +43,11 @@ public class PmSubComController extends BaseController {
@SysLog(title = "分公司管理", businessType = OperaType.QUERY, logType = 0, module = "分公司管理->分公司列表")
public TableDataInfo list(PmSubCompany pmSubCompany) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
BeanUtils.populate(pmSubCompany, map);
}
startPage();
List<PmSubCompany> list = pmSubComService.selectSubCompanyList(pmSubCompany);
return getDataTable(list);
@ -96,6 +105,11 @@ public class PmSubComController extends BaseController {
@SysLog(title = "分公司管理", businessType = OperaType.QUERY, logType = 0, module = "分公司管理->获取分公司和项目部列表")
public TableDataInfo listAll(PmSubCompany pmSubCompany) {
try {
Map<String,String> map = dealWithPermission();
if(!map.isEmpty()){
// 3. map 中的值复制到 o 对象中
BeanUtils.populate(pmSubCompany, map);
}
List<PmSubCompany> list = pmSubComService.selectSubCompanyListAll(pmSubCompany);
return getDataTable(list);
} catch (Exception e) {

View File

@ -24,6 +24,8 @@ public class PmSubCompany {
*/
private Integer comId;
private Integer subComId;
/**
* 公司名
*/

View File

@ -4,7 +4,6 @@ import com.bonus.system.api.model.UploadFileVo;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
@ -82,7 +81,7 @@ public class ProMonthTable {
/**
* 封单时间
*/
private Date blockTime;
private String blockTime;
/**
* 回传单上传状态 0未上传 1已上传
@ -99,6 +98,11 @@ public class ProMonthTable {
*/
private Integer refundUser;
/**
* 上传人
*/
private String refundUserName;
/**
* 上传时间
*/

View File

@ -45,13 +45,13 @@ public class UserSalaryApprovalVo {
/**
* 班组名称
*/
@Excel(name = "所在班组",sort = 2)
@Excel(name = "所在班组", sort = 2)
private String teamName;
/**
* 姓名
*/
@Excel(name = "姓名",sort = 1)
@Excel(name = "姓名", sort = 1)
private String userName;
/**
@ -62,13 +62,13 @@ public class UserSalaryApprovalVo {
/**
* 身份证号码
*/
@Excel(name = "身份证号",sort = 3)
@Excel(name = "身份证号", sort = 3)
private String idCard;
/**
* 联系方式
*/
@Excel(name = "联系方式",sort = 10)
@Excel(name = "联系方式", sort = 10)
private String phone;
/**
@ -84,19 +84,19 @@ public class UserSalaryApprovalVo {
/**
* 开户银行
*/
@Excel(name = "开户银行",sort = 4)
@Excel(name = "开户银行", sort = 4)
private String bankName;
/**
* 银行卡号
*/
@Excel(name = "银行卡号",sort = 6)
@Excel(name = "银行卡号", sort = 6)
private String bankCode;
/**
* 收款银行联行号
*/
@Excel(name = "收款银行联行号",sort = 5)
@Excel(name = "收款银行联行号", sort = 5)
private String bankNum;
/**
@ -107,24 +107,25 @@ public class UserSalaryApprovalVo {
/**
* 工资标准
*/
@Excel(name = "工资标准(元/日)",sort = 7)
@Excel(name = "工资标准(元/日)", sort = 7)
private BigDecimal priceWage;
/**
* 支付周期
*/
@Excel(name = "支付周期",sort = 8)
@Excel(name = "支付周期", sort = 8)
private String payment;
/**
* 支付日期
*/
@Excel(name = "支付日期",sort = 9)
@Excel(name = "支付日期", sort = 9)
private String payDay;
/**
* 备注
*/
@Excel(name = "备注",sort = 11)
@Excel(name = "备注", sort = 11)
private String remark;
private String bankNumber;
}

View File

@ -118,4 +118,6 @@ public interface PmProjectMapper {
* 月度数据详情
*/
ProMonthTable getProMonthTableById(ProMonthTable proMonthTable);
int updateSalary(List<UserWagePayVo> userWagePay);
}

View File

@ -4,6 +4,7 @@ import com.bonus.bmw.domain.dto.FileBasicMsgDto;
import com.bonus.bmw.domain.po.BmSubContract;
import com.bonus.bmw.domain.po.PmProject;
import com.bonus.bmw.domain.vo.*;
import com.bonus.common.core.web.domain.AjaxResult;
import java.util.List;
import java.util.Map;
@ -94,4 +95,8 @@ public interface PmProjectService {
* 月度数据详情
*/
ProMonthTable getProMonthTableById(ProMonthTable proMonthTable);
int updateSalary(List<UserWagePayVo> userWagePay);
AjaxResult updateRefundFileById(Long id);
}

View File

@ -1,5 +1,6 @@
package com.bonus.bmw.service.impl;
import cn.hutool.core.date.DateUtil;
import com.bonus.bmw.domain.dto.FileBasicMsgDto;
import com.bonus.bmw.domain.dto.WebFileDto;
import com.bonus.bmw.domain.po.BmSubContract;
@ -11,6 +12,7 @@ import com.bonus.bmw.mapper.PmProjectMapper;
import com.bonus.bmw.service.PmProjectService;
import com.bonus.common.core.constant.Constants;
import com.bonus.common.core.utils.StringUtils;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.security.utils.SecurityUtils;
import com.bonus.system.api.domain.SysUser;
import com.bonus.system.api.model.UploadFileVo;
@ -220,7 +222,7 @@ public class PmProjectServiceImpl implements PmProjectService {
*/
@Override
public int updateProMonthTable(ProMonthTable proMonthTable) {
proMonthTable.setBlockTime(new Date());
proMonthTable.setBlockTime(DateUtil.now());
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
proMonthTable.setUpdateUser(sysUser.getUserId().intValue());
return pmProjectMapper.updateProMonthTable(proMonthTable);
@ -233,7 +235,10 @@ public class PmProjectServiceImpl implements PmProjectService {
@Transactional
public int updateProMonthTableRefund(ProMonthTable proMonthTable, FileBasicMsgDto fileBasicMsgDto) {
proMonthTable.setRefundStatus("1");
int res = pmProjectMapper.updateProMonthTable(proMonthTable);
proMonthTable.setRefundTime(DateUtil.now());
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
proMonthTable.setRefundUser(sysUser.getUserId().intValue());
int res = pmProjectMapper.updateProMonthTable(proMonthTable);
//添加到文件库和minio上
if(res > 0 && StringUtils.isNotNull(fileBasicMsgDto.getFiles())){
//存文件
@ -242,6 +247,7 @@ public class PmProjectServiceImpl implements PmProjectService {
for (int i = 0; i < fileMsg.size(); i++) {
type[i] = fileMsg.get(i).getType();
}
String userId = SecurityUtils.getUserId().toString();
List<UploadFileVo> uploadFileVos = fileUploadUtils.uploadFile(fileBasicMsgDto.getFiles(), Constants.TB_PRO_MONTH_TABLE, proMonthTable.getId().toString(), type,"", "");
}
return res;
@ -257,4 +263,15 @@ public class PmProjectServiceImpl implements PmProjectService {
res.setContractFile(contractFile);
return res;
}
@Override
public int updateSalary(List<UserWagePayVo> userWagePay) {
return pmProjectMapper.updateSalary(userWagePay);
}
@Override
public AjaxResult updateRefundFileById(Long id) {
fileUploadUtils.delFileListById(id.toString(),"", "", "");
return AjaxResult.success();
}
}

View File

@ -34,8 +34,7 @@ public class PmSubComServiceImpl implements PmSubComService {
*/
@Override
public List<PmSubCompany> selectSubCompanyList(PmSubCompany pmSubCompany) {
List<PmSubCompany> pmSubCompanyList = pmSubComMapper.selectSubCompanyList(pmSubCompany);
return pmSubCompanyList;
return pmSubComMapper.selectSubCompanyList(pmSubCompany);
}
/**

View File

@ -78,6 +78,15 @@
<if test="blockTime!= null " >
block_time = #{blockTime},
</if>
<if test="refundUser!= null " >
refund_user = #{refundUser},
</if>
<if test="refundTime!= null " >
refund_time = #{refundTime},
</if>
<if test="status!= null " >
status = #{status},
</if>
<if test="refundStatus!= null " >
refund_status = #{refundStatus},
</if>
@ -222,10 +231,13 @@
from pm_project where id = #{proId}
</select>
<select id="getProMonthTableList" resultType="com.bonus.bmw.domain.vo.ProMonthTable">
select id,pro_id,table_month,roster_num,attendance_num,repair_num,salary_num,sub_num,
gross_salary,net_salary,status,block_time,refund_status,team_num,refund_user,
refund_time,is_update,pay_num
from tb_pro_month_table where pro_id = #{proId}
select tpmt.id,tpmt.pro_id,tpmt.table_month,tpmt.roster_num,tpmt.attendance_num,tpmt.repair_num,tpmt.salary_num,tpmt.sub_num,
tpmt.gross_salary,tpmt.net_salary,tpmt.status,tpmt.block_time,tpmt.refund_status,tpmt.team_num,su.user_name as refund_user_name,
tpmt.refund_time,tpmt.is_update,tpmt.pay_num
from tb_pro_month_table tpmt
left join sys_user su on su.user_id = tpmt.refund_user
where pro_id = #{proId}
</select>
<select id="getProMonthTableRosterList" resultType="com.bonus.bmw.domain.vo.ProMonthTableRosterVo">
select id,pro_id,`month` as proMonth,month_id,sub_id,sub_name,team_id,team_name,user_id,user_name,sex,
@ -249,7 +261,7 @@
</select>
<select id="getUserSalaryApprovalList" resultType="com.bonus.bmw.domain.vo.UserSalaryApprovalVo">
select id,pro_id,`month`,team_id,team_name,user_name,user_id,id_card,phone,sub_id,
sub_name,bank_name,bank_card_code as bankCode,bank_identifier_code as bank_num,contract_id as cons_id,price_wage,payment,pay_day,remark
sub_name,bank_name,bank_card_code as bankCode,bank_identifier_code as bank_num,bank_number,contract_id as cons_id,price_wage,payment,pay_day,remark
from tb_pro_month_table_roster where month_id = #{monthId}
<if test="bankCode != null">
and bank_card_code LIKE CONCAT('%', #{bankCode}, '%')
@ -274,7 +286,7 @@
</select>
<select id="getUserWagePayList" resultType="com.bonus.bmw.domain.vo.UserWagePayVo">
select id,pro_id,`month`,user_id,month_id,user_name,id_card,team_id,team_name,work_name,
attendance_num,pay_money,deduct_money,actual_money,bank_name,bank_card_code bank_num,bank_identifier_code as bank_code,is_accord,
attendance_num,pay_money,deduct_money,actual_money,bank_name,bank_card_code as bank_code,bank_identifier_code as bank_num,is_accord,
signature,remark,pay_day,bank_number,create_time,update_time,update_user
from tb_pro_month_table_roster where month_id = #{monthId}
<if test="bankCode != null">
@ -293,4 +305,10 @@
refund_time,is_update,pay_num
from tb_pro_month_table where id = #{id}
</select>
<update id="updateSalary">
<foreach collection="list" item="item" separator=";">
update tb_pro_month_table_roster set deduct_money = #{item.deductMoney}, actual_money = #{item.actualMoney} where id = #{item.id}
</foreach>
</update>
</mapper>

View File

@ -46,6 +46,9 @@
<if test="comId!=null and comId!=''">
and psc.com_id = #{comId}
</if>
<if test="subComId!=null">
and psc.id = #{subComId}
</if>
</select>
<select id="getSubCompanyByCompanyName" resultType="com.bonus.bmw.domain.po.PmSubCompany">
select psc.id as id,
@ -74,6 +77,9 @@
from pm_sub_company psc
left join pm_company pc on psc.com_id = pc.id
where psc.is_active = '1' and psc.is_enable='1'
<if test="subComId!=null">
and psc.id = #{subComId}
</if>
</select>
</mapper>

View File

@ -1,15 +1,10 @@
package com.bonus.file.controller;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.ObjectUtil;
import com.bonus.common.core.domain.R;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.file.service.impl.FileUtilsServiceImpl;
import com.bonus.system.api.domain.FileVo;
import com.bonus.system.api.domain.SysFile;
import com.bonus.system.api.model.UploadFileVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@ -193,7 +188,7 @@ public class FileUtilController {
try {
if (ObjectUtil.isEmpty(id)) {
if (ObjectUtil.isEmpty(sourceId)) {
return R.fail("资源表id不能为空");
return R.fail("资源表id不能为空");
}
}
Integer num= service.delFileListById( id,sourceId,sourceTable,sourceType);

View File

@ -8,6 +8,8 @@ import com.bonus.file.mapper.FileUtilMapper;
import com.bonus.file.utils.MinioUtil;
import com.bonus.system.api.model.UploadFileVo;
import org.hibernate.validator.internal.util.StringHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
@ -25,6 +27,8 @@ public class FileUtilsServiceImpl {
public static String floor="relname";
private static final Logger logger = LoggerFactory.getLogger(FileUtilsServiceImpl.class);
@Autowired
private MinioUtil minioUtils;
@ -267,13 +271,16 @@ public class FileUtilsServiceImpl {
*/
public List<UploadFileVo> getFileList(String id, String sourceId, String sourceTable, String sourceType) throws Exception {
List<UploadFileVo> list=mapper.getFileList(id,sourceId,sourceTable,sourceType);
for (UploadFileVo vo:list){
String url=minioUtils.getFileUrl(vo.getBucketName(),vo.getFilePath(),60*60*12);
String lsUrl=url.replace(minioConfig.getEndpoint(),minioConfig.getUrl());
vo.setUrl(minioConfig.getUrl()+vo.getPath());
vo.setLsUrl(lsUrl);
logger.error("查询文件数据:{}", list != null ? list.size() : "没有数据");
if (list != null) {
for (UploadFileVo vo:list){
String url=minioUtils.getFileUrl(vo.getBucketName(),vo.getFilePath(),60*60*12);
String lsUrl=url.replace(minioConfig.getEndpoint(),minioConfig.getUrl());
vo.setUrl(minioConfig.getUrl()+vo.getPath());
vo.setLsUrl(lsUrl);
}
}
return list;
return list;
}

View File

@ -94,7 +94,7 @@ public class ThreeTableOneRosterTask {
// 遍历listRoster填充数据
listRoster.forEach(roster -> {
String key = roster.getWorkerId() + "_" + roster.getProId();
roster.setIsOnJob(roster.getLastExitTime() != null && !roster.getLastExitTime().isEmpty() ? "1" : "0");
roster.setIsOnJob(roster.getLastExitTime() != null && !roster.getLastExitTime().isEmpty() ? "0" : "1");
roster.setMonthDay(daysInLastMonth);
// 从listApply中查找匹配的数据
ThreeTableOneRosterPo applyData = applyMap.get(key);
@ -225,7 +225,6 @@ public class ThreeTableOneRosterTask {
List<ThreeTableOneRosterPo> attendanceRecords, List<MapBeanVo> daysOfMonth) {
List<WorkerAttDayVo> result = new ArrayList<>();
// 将该员工的考勤记录按日期分组便于快速查找
// 将该员工的考勤记录按日期分组便于快速查找
Map<String, ThreeTableOneRosterPo> einByDate = attendanceRecords.stream()
.collect(Collectors.toMap(
ThreeTableOneRosterPo::getEinDay,
@ -245,10 +244,14 @@ public class ThreeTableOneRosterTask {
// 检查是否有打卡记录
if (einForDate.getAttDay() != null) {
dayRecord.setIsAtt("1"); // 打卡
}else{
dayRecord.setIsAtt("0");
}
// 检查是否有补卡记录
if ("1".equals(einForDate.getIsRepair())) {
dayRecord.setIsRepair("1"); // 补卡
}else {
dayRecord.setIsRepair("0");
}
} else {
// 无考勤记录