3.14优化
This commit is contained in:
		| @ -225,6 +225,16 @@ | |||||||
| 			return AjaxResult.success(iWgzLeaveService.userCancelLeave(req)); | 			return AjaxResult.success(iWgzLeaveService.userCancelLeave(req)); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | 		/** | ||||||
|  | 		 * 【我的】【请假】 请假详情 | ||||||
|  | 		 */ | ||||||
|  | 		@ApiOperation("【我的】【请假】 请假详情") | ||||||
|  | 		//@PreAuthorize("@ss.hasPermi('wgzApp:user:userLeaveDetails')") | ||||||
|  | 		@GetMapping("/WgzAppUserLeaveDetails/{id}") | ||||||
|  | 		public AjaxResult<WgzAppUserLeaveDetailsRes> userLeaveDetails(@NotNull(message = "主键不能为空") @PathVariable("id") Long id) { | ||||||
|  | 			return AjaxResult.success(iWgzLeaveService.userLeaveDetails(id)); | ||||||
|  | 		} | ||||||
|  |  | ||||||
| 		/** | 		/** | ||||||
| 		 * 【日报】日报日历 | 		 * 【日报】日报日历 | ||||||
| 		 */ | 		 */ | ||||||
| @ -632,7 +642,8 @@ | |||||||
| 			return AjaxResult.success(new WgzAppUserGetTheApproverRes(). | 			return AjaxResult.success(new WgzAppUserGetTheApproverRes(). | ||||||
| 				setUserId(byId.getUserId()). | 				setUserId(byId.getUserId()). | ||||||
| 				setUsername(byId.getUsername()). | 				setUsername(byId.getUsername()). | ||||||
| 				setAvatarName(byId.getAvatarName()) | 				setAvatarName(byId.getAvatarName()). | ||||||
|  | 				setRecruitName(appById.getRecruitName()) | ||||||
| 			); | 			); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | |||||||
| @ -254,11 +254,21 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr | |||||||
| 		pe.setCurrent(req.getPageNum()); | 		pe.setCurrent(req.getPageNum()); | ||||||
| 		pe.setSize(req.getPageSize()); | 		pe.setSize(req.getPageSize()); | ||||||
| 		TableDataInfo<WgzAppRegisteredProjectRes> wgzAppRegisteredProjectResTableDataInfo = PageUtils.buildDataInfo(baseMapper.userRegisteredProject(pe, userId)); | 		TableDataInfo<WgzAppRegisteredProjectRes> wgzAppRegisteredProjectResTableDataInfo = PageUtils.buildDataInfo(baseMapper.userRegisteredProject(pe, userId)); | ||||||
| //		wgzAppRegisteredProjectResTableDataInfo.getRows().forEach(registeredProjectRes -> { | 		wgzAppRegisteredProjectResTableDataInfo.getRows().forEach(registeredProjectRes -> { | ||||||
| //			//1、获取当前用户的满员、失效、同意、拒绝、报名状态 | 			//4、根据招工申请ID获取到消息 | ||||||
| //			//1、获取当前项目下的成员 | 			WgzMessage one = iWgzMessageService.getOne( | ||||||
| //			List<WgzAppCancelRegistrationProjectDetailsTwo> wgzUser = baseMapper.GetsTheMembersUnderTheCurrentProject(registeredProjectRes.getId()); | 				Wrappers.<WgzMessage>lambdaQuery() | ||||||
| //		}); | 					.in(WgzMessage::getSenderType, USERTYPE_BGT) | ||||||
|  | 					.in(WgzMessage::getSenderId, registeredProjectRes.getUserId()) | ||||||
|  | 					.in(WgzMessage::getRecipientType, USERTYPE_WGZ) | ||||||
|  | 					.in(WgzMessage::getRecipientId, userId) | ||||||
|  | 					.in(WgzMessage::getTableId, registeredProjectRes.getRecruitApplyId()) | ||||||
|  | 					.in(WgzMessage::getTableName, SqlHelper.table(BgtProjectRecruitApply.class).getTableName()) | ||||||
|  | 			); | ||||||
|  | 			if (one !=null){ | ||||||
|  | 				registeredProjectRes.setMessageId(one.getId()); | ||||||
|  | 			} | ||||||
|  | 		}); | ||||||
| 		return wgzAppRegisteredProjectResTableDataInfo; | 		return wgzAppRegisteredProjectResTableDataInfo; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | |||||||
| @ -66,6 +66,9 @@ public class WgzAndBgtMessageConstant { | |||||||
| 	//【日报补卡】19-20 | 	//【日报补卡】19-20 | ||||||
| 	public static final String WGZ_SYSTEM_HEADLINE_DAILY = "您成功发送【%s】日的日报补卡!"; | 	public static final String WGZ_SYSTEM_HEADLINE_DAILY = "您成功发送【%s】日的日报补卡!"; | ||||||
| 	public static final String WGZ_SYSTEM_SUBHEADING_DAILY = "您在【%s】日的日报补卡已成功发起!"; | 	public static final String WGZ_SYSTEM_SUBHEADING_DAILY = "您在【%s】日的日报补卡已成功发起!"; | ||||||
|  | 	//【请假】21-22 | ||||||
|  | 	public static final String WGZ_SYSTEM_HEADLINE_Leave = "您已成功发起申请的【%s】的请假申请!"; | ||||||
|  | 	public static final String WGZ_SYSTEM_SUBHEADING_Leave = "您在【%s】~【%s】的请假申请已送达到~"; | ||||||
| 	/** | 	/** | ||||||
| 	 * 务工者给包工头提示 | 	 * 务工者给包工头提示 | ||||||
| 	 */ | 	 */ | ||||||
| @ -87,6 +90,9 @@ public class WgzAndBgtMessageConstant { | |||||||
| 	//【日报补卡】11-12 | 	//【日报补卡】11-12 | ||||||
| 	public static final String WGZ_HEADLINE_DAILY = "务工者【%s】正在向你发起【%s】日的日报补卡!"; | 	public static final String WGZ_HEADLINE_DAILY = "务工者【%s】正在向你发起【%s】日的日报补卡!"; | ||||||
| 	public static final String WGZ__SUBHEADING_DAILY = "务工者【%s】向你发起【%s】日的日报补卡,请注意查收处理!"; | 	public static final String WGZ__SUBHEADING_DAILY = "务工者【%s】向你发起【%s】日的日报补卡,请注意查收处理!"; | ||||||
|  | 	//【日报补卡】11-12 | ||||||
|  | 	public static final String WGZ_HEADLINE_DAILY_Leave = "务工者【%s】正在向你发起【%s】日的请假申请!"; | ||||||
|  | 	public static final String WGZ__SUBHEADING_DAILY_Leave = "务工者【%s】向你发起【%s】~【%s】日的请假申请,请注意查收处理!"; | ||||||
|  |  | ||||||
| 	//务工者消息返回 | 	//务工者消息返回 | ||||||
| 	public static String wgzMessage(Map<String, String> mp, String type) { | 	public static String wgzMessage(Map<String, String> mp, String type) { | ||||||
| @ -137,6 +143,10 @@ public class WgzAndBgtMessageConstant { | |||||||
| 				return String.format(WGZ_SYSTEM_HEADLINE_DAILY,mp.get("data")); | 				return String.format(WGZ_SYSTEM_HEADLINE_DAILY,mp.get("data")); | ||||||
| 			case "120": | 			case "120": | ||||||
| 				return String.format(WGZ_SYSTEM_SUBHEADING_DAILY, mp.get("data")); | 				return String.format(WGZ_SYSTEM_SUBHEADING_DAILY, mp.get("data")); | ||||||
|  | 			case "121": | ||||||
|  | 				return String.format(WGZ_SYSTEM_HEADLINE_Leave,mp.get("data")); | ||||||
|  | 			case "122": | ||||||
|  | 				return String.format(WGZ_SYSTEM_SUBHEADING_Leave, mp.get("sData"),mp.get("eData")); | ||||||
| 			//务工者向包工头申请报名 | 			//务工者向包工头申请报名 | ||||||
| 			case "201": | 			case "201": | ||||||
| 				return String.format(WGZ_HEADLINE_APPLY, mp.get("userName"), mp.get("post")); | 				return String.format(WGZ_HEADLINE_APPLY, mp.get("userName"), mp.get("post")); | ||||||
| @ -167,6 +177,11 @@ public class WgzAndBgtMessageConstant { | |||||||
| 				return String.format(WGZ_HEADLINE_DAILY, mp.get("userName"),mp.get("data")); | 				return String.format(WGZ_HEADLINE_DAILY, mp.get("userName"),mp.get("data")); | ||||||
| 			case "212": | 			case "212": | ||||||
| 				return String.format(WGZ__SUBHEADING_DAILY, mp.get("userName"),mp.get("data")); | 				return String.format(WGZ__SUBHEADING_DAILY, mp.get("userName"),mp.get("data")); | ||||||
|  | 			//务工者向包工头发起请假 | ||||||
|  | 			case "213": | ||||||
|  | 				return String.format(WGZ_HEADLINE_DAILY_Leave, mp.get("userName"),mp.get("data")); | ||||||
|  | 			case "214": | ||||||
|  | 				return String.format(WGZ__SUBHEADING_DAILY_Leave, mp.get("userName"),mp.get("sData"),mp.get("eData")); | ||||||
| 			default: | 			default: | ||||||
| 				return "未知类型"; | 				return "未知类型"; | ||||||
| 		} | 		} | ||||||
|  | |||||||
| @ -75,4 +75,9 @@ public class WgzAppRegisteredProjectRes implements Serializable { | |||||||
| 	private String statusApply; | 	private String statusApply; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工创建人") | ||||||
|  | 	private String userId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("消息主键ID") | ||||||
|  | 	private Long messageId; | ||||||
| } | } | ||||||
|  | |||||||
| @ -14,18 +14,16 @@ import java.io.Serializable; | |||||||
| @Accessors(chain = true) | @Accessors(chain = true) | ||||||
| @ApiModel("通用审批人信息返回") | @ApiModel("通用审批人信息返回") | ||||||
| public class WgzAppUserGetTheApproverRes implements Serializable { | public class WgzAppUserGetTheApproverRes implements Serializable { | ||||||
| 	/** 唯一标识 */ |  | ||||||
| 	@Excel(name = "唯一标识") |  | ||||||
| 	@ApiModelProperty("唯一标识") | 	@ApiModelProperty("唯一标识") | ||||||
| 	private Long userId; | 	private Long userId; | ||||||
|  |  | ||||||
| 	/** 姓名 */ |  | ||||||
| 	@Excel(name = "姓名") |  | ||||||
| 	@ApiModelProperty("姓名") | 	@ApiModelProperty("姓名") | ||||||
| 	private String username; | 	private String username; | ||||||
|  |  | ||||||
| 	/** 头像地址 */ |  | ||||||
| 	@Excel(name = "头像地址") |  | ||||||
| 	@ApiModelProperty("头像地址") | 	@ApiModelProperty("头像地址") | ||||||
| 	private String avatarName; | 	private String avatarName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工主题") | ||||||
|  | 	private String recruitName; | ||||||
| } | } | ||||||
|  | |||||||
| @ -0,0 +1,95 @@ | |||||||
|  | package com.ruoyi.wgz.bo.res; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.FieldFill; | ||||||
|  | import com.baomidou.mybatisplus.annotation.IdType; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableField; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.ruoyi.common.annotation.Excel; | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.NoArgsConstructor; | ||||||
|  | import lombok.experimental.Accessors; | ||||||
|  |  | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import java.time.LocalTime; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @NoArgsConstructor | ||||||
|  | @Accessors(chain = true) | ||||||
|  | @ApiModel("请假详情返回") | ||||||
|  | public class WgzAppUserLeaveDetailsRes implements Serializable { | ||||||
|  | 	@TableId(value = "id", type = IdType.AUTO) | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("请假人") | ||||||
|  | 	private Long userId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("请假人名称") | ||||||
|  | 	private String username; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("请假人头像") | ||||||
|  | 	private String avatarName; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工主题") | ||||||
|  | 	private String subject; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("请假类型(字典)") | ||||||
|  | 	private String leaveType; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("开始时间") | ||||||
|  | 	private LocalDateTime startTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("结束时间") | ||||||
|  | 	private LocalDateTime endTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("请假事由") | ||||||
|  | 	private String reason; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("审核人ID") | ||||||
|  | 	private Long auditorUserId; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("审核人名称") | ||||||
|  | 	private String auditorname; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("审核人头像") | ||||||
|  | 	private String auditorHead; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("审核状态(0待审核 1审核中 2已同意 3已拒绝 4=已取消)") | ||||||
|  | 	private String auditorType; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("审核意见") | ||||||
|  | 	private String auditorOpinion; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("同意|拒绝时间") | ||||||
|  | 	private LocalDateTime auditorTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("上班时间") | ||||||
|  | 	private LocalTime workingTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("下班时间") | ||||||
|  | 	private LocalTime closingTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("取消请假") | ||||||
|  | 	private LocalDateTime cancelLeave; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("删除标志(0代表存在 2代表删除)") | ||||||
|  | 	private String delFlag; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("创建者") | ||||||
|  | 	private String createBy; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("创建时间") | ||||||
|  | 	private LocalDateTime createTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("更新者") | ||||||
|  | 	private String updateBy; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("更新时间") | ||||||
|  | 	private LocalDateTime updateTime; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("备注") | ||||||
|  | 	private String remark; | ||||||
|  | } | ||||||
| @ -4,11 +4,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage; | |||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
| import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq; | import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq; | ||||||
| import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes; | import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes; | ||||||
|  | import com.ruoyi.wgz.bo.res.WgzAppUserLeaveDetailsRes; | ||||||
| import com.ruoyi.wgz.domain.WgzLeave; | import com.ruoyi.wgz.domain.WgzLeave; | ||||||
| import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; | import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; | ||||||
| import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache; | import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache; | ||||||
| import org.apache.ibatis.annotations.CacheNamespace; | import org.apache.ibatis.annotations.CacheNamespace; | ||||||
| import org.apache.ibatis.annotations.Param; | import org.apache.ibatis.annotations.Param; | ||||||
|  | import org.apache.ibatis.annotations.Select; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 请假Mapper接口 |  * 请假Mapper接口 | ||||||
| @ -27,4 +29,22 @@ public interface WgzLeaveMapper extends BaseMapperPlus<WgzLeave> { | |||||||
|      */ |      */ | ||||||
|     Page<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(@Param("page") Page<WgzAppLeaveHistoryListPageReq> page); |     Page<WgzAppLeaveHistoryListPageRes> userLeaveHistoryListPage(@Param("page") Page<WgzAppLeaveHistoryListPageReq> page); | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@Select("SELECT\n" + | ||||||
|  | 		"  a.*,\n" + | ||||||
|  | 		"  b.username AS username,\n" + | ||||||
|  | 		"  b.avatar_name AS avatarName,\n" + | ||||||
|  | 		"  c.username AS auditorname,\n" + | ||||||
|  | 		"  c.avatar_name AS auditorHead \n" + | ||||||
|  | 		"FROM\n" + | ||||||
|  | 		"  wgz_leave a\n" + | ||||||
|  | 		"  LEFT JOIN wgz_user b ON ( a.user_id = b.user_id) \n" + | ||||||
|  | 		"  LEFT JOIN bgt_user c ON ( a.auditor_user_id = c.user_id) \n" + | ||||||
|  | 		"WHERE\n" + | ||||||
|  | 		"  a.id = #{id} and \n" + | ||||||
|  | 		"  a.del_flag = 0 \n" + | ||||||
|  | 		"ORDER BY\n" + | ||||||
|  | 		"  a.id DESC") | ||||||
|  | 	WgzAppUserLeaveDetailsRes userLeaveDetails(@Param("id") Long id); | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,6 +1,7 @@ | |||||||
| package com.ruoyi.wgz.service; | package com.ruoyi.wgz.service; | ||||||
|  |  | ||||||
| import com.ruoyi.bgt.domain.dto.BgtLeaveUpdateDTO; | import com.ruoyi.bgt.domain.dto.BgtLeaveUpdateDTO; | ||||||
|  | import com.ruoyi.common.core.domain.AjaxResult; | ||||||
| import com.ruoyi.common.core.mybatisplus.core.IServicePlus; | import com.ruoyi.common.core.mybatisplus.core.IServicePlus; | ||||||
| import com.ruoyi.common.core.page.TableDataInfo; | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
| import com.ruoyi.wgz.bo.WgzLeaveQueryBo; | import com.ruoyi.wgz.bo.WgzLeaveQueryBo; | ||||||
| @ -8,10 +9,14 @@ import com.ruoyi.wgz.bo.req.WgzAppCancelLeaveReq; | |||||||
| import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq; | import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq; | ||||||
| import com.ruoyi.wgz.bo.req.WgzAppSubmitLeaveReq; | import com.ruoyi.wgz.bo.req.WgzAppSubmitLeaveReq; | ||||||
| import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes; | import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes; | ||||||
|  | import com.ruoyi.wgz.bo.res.WgzAppUserLeaveDetailsRes; | ||||||
|  | import com.ruoyi.wgz.bo.res.WgzAppUserReplacementCardRecordDetailsRes; | ||||||
| import com.ruoyi.wgz.domain.WgzLeave; | import com.ruoyi.wgz.domain.WgzLeave; | ||||||
| import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.springframework.web.bind.annotation.PathVariable; | ||||||
| import org.springframework.web.bind.annotation.RequestBody; | import org.springframework.web.bind.annotation.RequestBody; | ||||||
|  |  | ||||||
|  | import javax.validation.constraints.NotNull; | ||||||
| import java.time.LocalDate; | import java.time.LocalDate; | ||||||
| import java.util.Collection; | import java.util.Collection; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| @ -85,6 +90,11 @@ public interface IWgzLeaveService extends IServicePlus<WgzLeave> { | |||||||
|      */ |      */ | ||||||
|     Boolean userCancelLeave(@Validated @RequestBody WgzAppCancelLeaveReq req); |     Boolean userCancelLeave(@Validated @RequestBody WgzAppCancelLeaveReq req); | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * 查看请假详情 | ||||||
|  | 	 */ | ||||||
|  | 	WgzAppUserLeaveDetailsRes userLeaveDetails(@NotNull(message = "主键不能为空") @PathVariable("id") Long id); | ||||||
|  |  | ||||||
|     /* |     /* | ||||||
|      * 查看指定人、指定项目、指定月是否请假(只传递年月) |      * 查看指定人、指定项目、指定月是否请假(只传递年月) | ||||||
|      */ |      */ | ||||||
|  | |||||||
| @ -7,11 +7,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
| import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; | import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; | ||||||
|  | import com.ruoyi.bgt.domain.BgtMessage; | ||||||
| import com.ruoyi.bgt.domain.BgtProjectRecruit; | import com.ruoyi.bgt.domain.BgtProjectRecruit; | ||||||
| import com.ruoyi.bgt.domain.BgtProjectRecruitApply; | import com.ruoyi.bgt.domain.BgtProjectRecruitApply; | ||||||
| import com.ruoyi.bgt.domain.dto.BgtLeaveUpdateDTO; | import com.ruoyi.bgt.domain.dto.BgtLeaveUpdateDTO; | ||||||
|  | import com.ruoyi.bgt.service.IBgtMessageService; | ||||||
| import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService; | import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService; | ||||||
| import com.ruoyi.bgt.service.IBgtProjectRecruitService; | import com.ruoyi.bgt.service.IBgtProjectRecruitService; | ||||||
|  | import com.ruoyi.common.core.domain.entity.SysUser; | ||||||
| import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; | ||||||
| import com.ruoyi.common.core.page.TableDataInfo; | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
| import com.ruoyi.common.enums.AuditStatus; | import com.ruoyi.common.enums.AuditStatus; | ||||||
| @ -23,6 +26,8 @@ import com.ruoyi.wgz.bo.req.WgzAppCancelLeaveReq; | |||||||
| import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq; | import com.ruoyi.wgz.bo.req.WgzAppLeaveHistoryListPageReq; | ||||||
| import com.ruoyi.wgz.bo.req.WgzAppSubmitLeaveReq; | import com.ruoyi.wgz.bo.req.WgzAppSubmitLeaveReq; | ||||||
| import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes; | import com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes; | ||||||
|  | import com.ruoyi.wgz.bo.res.WgzAppUserLeaveDetailsRes; | ||||||
|  | import com.ruoyi.wgz.bo.res.WgzAppUserReplacementCardRecordDetailsRes; | ||||||
| import com.ruoyi.wgz.domain.WgzAttendance; | import com.ruoyi.wgz.domain.WgzAttendance; | ||||||
| import com.ruoyi.wgz.domain.WgzLeave; | import com.ruoyi.wgz.domain.WgzLeave; | ||||||
| import com.ruoyi.wgz.domain.WgzMessage; | import com.ruoyi.wgz.domain.WgzMessage; | ||||||
| @ -31,15 +36,13 @@ import com.ruoyi.wgz.service.IWgzAttendanceService; | |||||||
| import com.ruoyi.wgz.service.IWgzLeaveService; | import com.ruoyi.wgz.service.IWgzLeaveService; | ||||||
| import com.ruoyi.wgz.service.IWgzMessageService; | import com.ruoyi.wgz.service.IWgzMessageService; | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.context.annotation.Lazy; | ||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
| import org.springframework.transaction.annotation.Transactional; | import org.springframework.transaction.annotation.Transactional; | ||||||
|  |  | ||||||
| import java.time.LocalDate; | import java.time.LocalDate; | ||||||
| import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||||
| import java.util.Collection; | import java.util.*; | ||||||
| import java.util.HashMap; |  | ||||||
| import java.util.List; |  | ||||||
| import java.util.Map; |  | ||||||
|  |  | ||||||
| import static com.ruoyi.common.constants.BgtMessageConstant.*; | import static com.ruoyi.common.constants.BgtMessageConstant.*; | ||||||
| import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*; | import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*; | ||||||
| @ -59,10 +62,14 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav | |||||||
| 	private IBgtProjectRecruitService iBgtProjectRecruitService; | 	private IBgtProjectRecruitService iBgtProjectRecruitService; | ||||||
|  |  | ||||||
| 	@Autowired | 	@Autowired | ||||||
| 	private IWgzMessageService wgzMessageService; | 	private IWgzAttendanceService attendanceService; | ||||||
|  |  | ||||||
| 	@Autowired | 	@Autowired | ||||||
| 	private IWgzAttendanceService attendanceService; | 	@Lazy | ||||||
|  | 	private IWgzMessageService iWgzMessageService; | ||||||
|  |  | ||||||
|  | 	@Autowired | ||||||
|  | 	private IBgtMessageService iBgtMessageService; | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public WgzLeave queryById(Long id){ |     public WgzLeave queryById(Long id){ | ||||||
| @ -140,14 +147,33 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav | |||||||
| 	@Transactional | 	@Transactional | ||||||
| 	public Boolean userSubmitLeave(WgzAppSubmitLeaveReq req) { | 	public Boolean userSubmitLeave(WgzAppSubmitLeaveReq req) { | ||||||
| 		//1、现获取用户的唯一标识 | 		//1、现获取用户的唯一标识 | ||||||
| 		Long appUserId = SecurityUtils.getAppUserId(); | 		SysUser user = SecurityUtils.getLoginUser().getUser(); | ||||||
|  | 		Long appUserId = user.getUserId(); | ||||||
| 		//2、根据唯一标识获取到当前用户的招工 | 		//2、根据唯一标识获取到当前用户的招工 | ||||||
| 		BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId); | 		BgtProjectRecruitApply by = iBgtProjectRecruitApplyService.selectByUserIdProjectRecruitApplyId(appUserId); | ||||||
| 		//3、根据招工id获取到具体招工信息 | 		//3、根据招工id获取到具体招工信息 | ||||||
| 		BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getId()); | 		BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId()); | ||||||
|  | 		//4、查看当前用户、当前招工、当前请假时间段是否有重复的请假 | ||||||
|  | 		LocalDate startDate = req.getStartTime().toLocalDate(); | ||||||
|  | 		LocalDate endDate = req.getEndTime().toLocalDate(); | ||||||
|  | 		List<LocalDate> rqList = new ArrayList<>(); | ||||||
|  | 		for (LocalDate date = startDate; !date.isAfter(endDate); date = date.plusDays(1)) { | ||||||
|  | 			rqList.add(date); | ||||||
|  | 		} | ||||||
|  | 		Integer num = baseMapper.selectCount(Wrappers.<WgzLeave>lambdaQuery(). | ||||||
|  | 			eq(WgzLeave::getRecruitId, by.getRecruitId()). | ||||||
|  | 			eq(WgzLeave::getUserId, appUserId). | ||||||
|  | 			and( | ||||||
|  | 					inner -> inner.in(WgzLeave::getStartTime, rqList).or().in(WgzLeave::getEndTime, rqList) | ||||||
|  | 			). | ||||||
|  | 			ne(WgzLeave::getAuditorType, "4") | ||||||
|  | 		); | ||||||
|  | 		if (num > 0) { | ||||||
|  | 			throw new RuntimeException("当前时间段已存在请假!"); | ||||||
|  | 		} | ||||||
| 		//6、组装请假对象数据 并插入 | 		//6、组装请假对象数据 并插入 | ||||||
| 		WgzLeave wgzLeave = new WgzLeave(). | 		WgzLeave wgzLeave = new WgzLeave(). | ||||||
| 			setRecruitId(by.getId()). | 			setRecruitId(by.getRecruitId()). | ||||||
| 			setSubject(appById.getRecruitName()). | 			setSubject(appById.getRecruitName()). | ||||||
| 			setUserId(appUserId). | 			setUserId(appUserId). | ||||||
| 			setLeaveType(req.getLeaveType()). | 			setLeaveType(req.getLeaveType()). | ||||||
| @ -157,7 +183,43 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav | |||||||
| 			setAuditorUserId(appById.getUserId()). | 			setAuditorUserId(appById.getUserId()). | ||||||
| 			setWorkingTime(appById.getBeginWorkTime()). | 			setWorkingTime(appById.getBeginWorkTime()). | ||||||
| 			setClosingTime(appById.getEndWorkTime()); | 			setClosingTime(appById.getEndWorkTime()); | ||||||
| 		return baseMapper.insert(wgzLeave)>0; | 		int insert = baseMapper.insert(wgzLeave); | ||||||
|  | 		if (insert > 0) { | ||||||
|  | 			Map<String, String> mp = new HashMap<>(); | ||||||
|  | 			mp.put("userName",user.getUserName()); | ||||||
|  | 			mp.put("data",wgzLeave.getStartTime().toLocalDate().toString()); | ||||||
|  | 			mp.put("sData",wgzLeave.getStartTime().toLocalDate().toString()); | ||||||
|  | 			mp.put("eData",wgzLeave.getEndTime().toLocalDate().toString()); | ||||||
|  |  | ||||||
|  | 			WgzMessage wgzMessage = new WgzMessage(). | ||||||
|  | 				setSenderType(USERTYPE_SYSTEM). | ||||||
|  | 				setRecipientType(USERTYPE_WGZ). | ||||||
|  | 				setRecipientId(appUserId). | ||||||
|  | 				setHeadline(wgzMessage(mp, "121")). | ||||||
|  | 				setSubheading(wgzMessage(mp, "122")). | ||||||
|  | 				setTableId(wgzLeave.getId()). | ||||||
|  | 				setTableName(SqlHelper.table(WgzLeave.class).getTableName()). | ||||||
|  | 				setMessageLargeType(LARGE_OTHER). | ||||||
|  | 				setMessageSmallType(SMALL_LEAVE); | ||||||
|  | 			if (!iWgzMessageService.sendAMessage(wgzMessage)) { | ||||||
|  | 				throw new RuntimeException("系统消息请假申请发送失败!"); | ||||||
|  | 			} | ||||||
|  | 			BgtMessage bgtMessage = new BgtMessage(). | ||||||
|  | 				setSenderType(USERTYPE_WGZ). | ||||||
|  | 				setSenderId(appUserId). | ||||||
|  | 				setRecipientType(USERTYPE_BGT). | ||||||
|  | 				setRecipientId(appById.getUserId()). | ||||||
|  | 				setHeadline(wgzMessage(mp, "213")). | ||||||
|  | 				setSubheading(wgzMessage(mp, "214")). | ||||||
|  | 				setTableId(wgzLeave.getId()). | ||||||
|  | 				setTableName(SqlHelper.table(WgzLeave.class).getTableName()). | ||||||
|  | 				setMessageLargeType(BGT_LARGE_OTHER). | ||||||
|  | 				setMessageSmallType(BGT_SMALL_LEAVE); | ||||||
|  | 			if (!iBgtMessageService.sendAMessage(bgtMessage)) { | ||||||
|  | 				throw new RuntimeException("发送请假申请消息失败!"); | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 		return true; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
| @ -178,6 +240,11 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav | |||||||
| 		return  baseMapper.updateById(wgzLeave)>0; | 		return  baseMapper.updateById(wgzLeave)>0; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	@Override | ||||||
|  | 	public WgzAppUserLeaveDetailsRes userLeaveDetails(Long id) { | ||||||
|  | 		return baseMapper.userLeaveDetails(id); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
| 	public Map<LocalDate, LocalDate> selectByUserCancelLeave(String yearMonth) { | 	public Map<LocalDate, LocalDate> selectByUserCancelLeave(String yearMonth) { | ||||||
| 		Map<LocalDate, LocalDate> ld = new HashMap<>(); | 		Map<LocalDate, LocalDate> ld = new HashMap<>(); | ||||||
| @ -237,7 +304,7 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav | |||||||
| 			.setTableName(SqlHelper.table(WgzLeave.class).getTableName()) | 			.setTableName(SqlHelper.table(WgzLeave.class).getTableName()) | ||||||
| 			.setMessageLargeType(LARGE_OTHER) | 			.setMessageLargeType(LARGE_OTHER) | ||||||
| 			.setMessageSmallType(SMALL_LEAVE); | 			.setMessageSmallType(SMALL_LEAVE); | ||||||
| 		wgzMessageService.sendAMessage(wgzMessage); | 		iWgzMessageService.sendAMessage(wgzMessage); | ||||||
|  |  | ||||||
| 		//考勤信息 | 		//考勤信息 | ||||||
| 		List<WgzAttendance> list = attendanceService.list(Wrappers.<WgzAttendance>lambdaQuery() | 		List<WgzAttendance> list = attendanceService.list(Wrappers.<WgzAttendance>lambdaQuery() | ||||||
|  | |||||||
| @ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
| import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; | import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; | ||||||
|  | import com.ruoyi.bgt.domain.BgtMessage; | ||||||
| import com.ruoyi.bgt.domain.BgtProjectRecruit; | import com.ruoyi.bgt.domain.BgtProjectRecruit; | ||||||
| import com.ruoyi.bgt.domain.BgtProjectRecruitApply; | import com.ruoyi.bgt.domain.BgtProjectRecruitApply; | ||||||
| import com.ruoyi.bgt.domain.dto.BgtApplyForWgzPayAddDTO; | import com.ruoyi.bgt.domain.dto.BgtApplyForWgzPayAddDTO; | ||||||
| @ -16,9 +17,11 @@ import com.ruoyi.bgt.domain.dto.BgtPayCalculationUpdateDTO; | |||||||
| import com.ruoyi.bgt.domain.vo.BgtApplyForWgzPayAddInfoVO; | import com.ruoyi.bgt.domain.vo.BgtApplyForWgzPayAddInfoVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtPayCalculationDetailBaseVO; | import com.ruoyi.bgt.domain.vo.BgtPayCalculationDetailBaseVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtPayCalculationDetailListVO; | import com.ruoyi.bgt.domain.vo.BgtPayCalculationDetailListVO; | ||||||
|  | import com.ruoyi.bgt.service.IBgtMessageService; | ||||||
| import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService; | import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService; | ||||||
| import com.ruoyi.bgt.service.IBgtProjectRecruitService; | import com.ruoyi.bgt.service.IBgtProjectRecruitService; | ||||||
| import com.ruoyi.common.constant.Constants; | import com.ruoyi.common.constant.Constants; | ||||||
|  | import com.ruoyi.common.constants.WgzAndBgtMessageConstant; | ||||||
| import com.ruoyi.common.core.domain.entity.SysUser; | import com.ruoyi.common.core.domain.entity.SysUser; | ||||||
| import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; | ||||||
| import com.ruoyi.common.core.page.TableDataInfo; | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
| @ -84,6 +87,12 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat | |||||||
| 	@Autowired | 	@Autowired | ||||||
| 	private IWgzPayCalculationMiddleService iWgzPayCalculationMiddleService; | 	private IWgzPayCalculationMiddleService iWgzPayCalculationMiddleService; | ||||||
|  |  | ||||||
|  | 	@Autowired | ||||||
|  | 	private IWgzMessageService iWgzMessageService; | ||||||
|  |  | ||||||
|  | 	@Autowired | ||||||
|  | 	private IBgtMessageService iBgtMessageService; | ||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
|     public WgzPayCalculation queryById(Long id){ |     public WgzPayCalculation queryById(Long id){ | ||||||
|         return getById(id); |         return getById(id); | ||||||
| @ -188,29 +197,29 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat | |||||||
| 		//3、把需要结算的数据标记为已结算 | 		//3、把需要结算的数据标记为已结算 | ||||||
| 		List<WgzAttendance> objects = new ArrayList<>(); | 		List<WgzAttendance> objects = new ArrayList<>(); | ||||||
| 		for (WgzAttendance data : attList) { | 		for (WgzAttendance data : attList) { | ||||||
| //			WgzPayCalculationMiddle middle = new WgzPayCalculationMiddle() |  | ||||||
| //				.setCalculationId(data.getId()) |  | ||||||
| //				.setAttendanceId(data.getId()); |  | ||||||
| 			objects.add(new WgzAttendance() | 			objects.add(new WgzAttendance() | ||||||
| 				.setId(data.getId()) | 				.setId(data.getId()) | ||||||
| 				.setSettlement(1) | 				.setSettlement(1) | ||||||
| 			); | 			); | ||||||
| 		} | 		} | ||||||
| 		//4、修改标识符,新增结算数据 |  | ||||||
| 		boolean b = iWgzAttendanceService.updateBatchById(objects); | 		boolean b = iWgzAttendanceService.updateBatchById(objects); | ||||||
| 		if (!b) { | 		if (!b) { | ||||||
| 			throw new RuntimeException("标识符修改失败!"); | 			throw new RuntimeException("标识符修改失败!"); | ||||||
| 		} | 		} | ||||||
|  | 		//4、新增结算数据及结算附件 | ||||||
| 		WgzPayCalculation wgzPayCalculation = new WgzPayCalculation(); | 		WgzPayCalculation wgzPayCalculation = new WgzPayCalculation(); | ||||||
| 		BeanUtils.copyProperties(req,wgzPayCalculation); | 		BeanUtils.copyProperties(req,wgzPayCalculation); | ||||||
| 		wgzPayCalculation. | 		wgzPayCalculation. | ||||||
| 			setUserId(user.getUserId()). | 			setUserId(user.getUserId()). | ||||||
| 			setUserName(user.getUserName()). | 			setUserName(user.getUserName()). | ||||||
| 			setAuditorUserId(recruit.getUserId()); | 			setAuditorUserId(recruit.getUserId()); | ||||||
| 		iWgzPayCalculationFilesService.saveBatch(req.getPayCalculation()); | 		boolean fjSave = iWgzPayCalculationFilesService.saveBatch(req.getPayCalculation()); | ||||||
|  | 		if (!fjSave) { | ||||||
|  | 			throw new RuntimeException("附件新增失败!"); | ||||||
|  | 		} | ||||||
| 		boolean save = save(wgzPayCalculation); | 		boolean save = save(wgzPayCalculation); | ||||||
| 		if (!save) { | 		if (!save) { | ||||||
| 			throw new RuntimeException("新增结算失败!"); | 			throw new RuntimeException("结算新增失败!"); | ||||||
| 		} | 		} | ||||||
| 		//5、将修改标识符的数据存放到中间表 | 		//5、将修改标识符的数据存放到中间表 | ||||||
| 		List<WgzPayCalculationMiddle> listMiddle = new ArrayList<>(); | 		List<WgzPayCalculationMiddle> listMiddle = new ArrayList<>(); | ||||||
| @ -220,9 +229,43 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat | |||||||
| 				.setAttendanceId(data.getId()); | 				.setAttendanceId(data.getId()); | ||||||
| 			listMiddle.add(middle); | 			listMiddle.add(middle); | ||||||
| 		} | 		} | ||||||
| 		iWgzPayCalculationMiddleService.saveBatch(listMiddle); | 		boolean middleSave = iWgzPayCalculationMiddleService.saveBatch(listMiddle); | ||||||
|  | 		if (!middleSave){ | ||||||
|  | 			throw new RuntimeException("中间数据存储失败!"); | ||||||
|  | 		} | ||||||
|  | 		//6、消息通知 | ||||||
|  | 		WgzUser byId = wgzUserService.findByUserId(user.getUserId()); | ||||||
|  | 		Map<String, String> mp = new HashMap<>(); | ||||||
|  | 		mp.put("projectName", recruit.getRecruitName()); | ||||||
|  | 		mp.put("userName", byId.getUsername()); | ||||||
|  | 		mp.put("num", String.valueOf(wgzPayCalculation.getNum())); | ||||||
|  | 		mp.put("money", String.valueOf(new BigDecimal(wgzPayCalculation.getNum()).multiply(wgzPayCalculation.getRecruitAmount()))); | ||||||
|  | 		WgzMessage wgzMessage = new WgzMessage(). | ||||||
|  | 			setSenderType(USERTYPE_SYSTEM). | ||||||
|  | 			setRecipientType(USERTYPE_WGZ). | ||||||
|  | 			setRecipientId(user.getUserId()). | ||||||
|  | 			setHeadline(WgzAndBgtMessageConstant.wgzMessage(mp,"111")). | ||||||
|  | 			setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"112")). | ||||||
|  | 			setTableId(wgzPayCalculation.getId()). | ||||||
|  | 			setTableName(SqlHelper.table(WgzPayCalculation.class).getTableName()). | ||||||
|  | 			setMessageLargeType(LARGE_SALARY); | ||||||
|  | 		if (!iWgzMessageService.sendAMessage(wgzMessage)){ | ||||||
|  | 			throw new RuntimeException("系统工资结算消息发送失败!"); | ||||||
|  | 		} | ||||||
|  | 		BgtMessage bgtMessage = new BgtMessage(). | ||||||
|  | 			setSenderType(USERTYPE_WGZ). | ||||||
|  | 			setSenderId(user.getUserId()). | ||||||
|  | 			setRecipientType(USERTYPE_BGT). | ||||||
|  | 			setRecipientId(recruit.getUserId()). | ||||||
|  | 			setHeadline(WgzAndBgtMessageConstant.wgzMessage(mp,"209")). | ||||||
|  | 			setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"210")). | ||||||
|  | 			setTableId(wgzPayCalculation.getId()). | ||||||
|  | 			setTableName(SqlHelper.table(WgzPayCalculation.class).getTableName()). | ||||||
|  | 			setMessageLargeType(BGT_LARGE_OTHER). | ||||||
|  | 			setMessageSmallType(BGT_SMALL_PAY); | ||||||
|  | 		if (!iBgtMessageService.sendAMessage(bgtMessage)){ | ||||||
|  | 			throw new RuntimeException("发送补卡消息失败!"); | ||||||
|  | 		} | ||||||
| 		return true; | 		return true; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | |||||||
| @ -37,7 +37,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||||
|             b.avatar_name, |             b.avatar_name, | ||||||
|             a.dily_time, |             a.dily_time, | ||||||
|             a.finish_today, |             a.finish_today, | ||||||
|             a.auditor_type |             a.auditor_type, | ||||||
|  |             a.status | ||||||
|         FROM |         FROM | ||||||
|             wgz_daily_clock a |             wgz_daily_clock a | ||||||
|                 LEFT JOIN wgz_user b ON (a.user_id = b.user_id and b.del_flag = 0) |                 LEFT JOIN wgz_user b ON (a.user_id = b.user_id and b.del_flag = 0) | ||||||
|  | |||||||
| @ -29,8 +29,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||||
|     <select id="userLeaveHistoryListPage" resultType="com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes"> |     <select id="userLeaveHistoryListPage" resultType="com.ruoyi.wgz.bo.res.WgzAppLeaveHistoryListPageRes"> | ||||||
|         SELECT |         SELECT | ||||||
|             a.*, |             a.*, | ||||||
|             b.username, |             b.username as auditorname, | ||||||
|             b.avatar_name |             b.avatar_name as auditorHead | ||||||
|         FROM |         FROM | ||||||
|             wgz_leave a |             wgz_leave a | ||||||
|                 LEFT JOIN bgt_user b ON (a.auditor_user_id = b.user_id and b.del_flag = 0) |                 LEFT JOIN bgt_user b ON (a.auditor_user_id = b.user_id and b.del_flag = 0) | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user