优化
This commit is contained in:
		| @ -0,0 +1,52 @@ | |||||||
|  | package com.ruoyi.web.controller.bgt; | ||||||
|  |  | ||||||
|  | import com.ruoyi.bgt.domain.dto.BgtLeaveUpdateDTO; | ||||||
|  | import com.ruoyi.common.annotation.Log; | ||||||
|  | import com.ruoyi.common.annotation.RepeatSubmit; | ||||||
|  | import com.ruoyi.common.core.controller.BaseController; | ||||||
|  | import com.ruoyi.common.core.domain.AjaxResult; | ||||||
|  | import com.ruoyi.common.enums.BusinessType; | ||||||
|  | import com.ruoyi.wgz.domain.WgzLeave; | ||||||
|  | import com.ruoyi.wgz.service.IWgzLeaveService; | ||||||
|  | import io.swagger.annotations.Api; | ||||||
|  | import io.swagger.annotations.ApiOperation; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  |  | ||||||
|  | import javax.validation.constraints.NotNull; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 请假Controller | ||||||
|  |  * | ||||||
|  |  * @author ruoyi | ||||||
|  |  * @date 2025-02-19 | ||||||
|  |  */ | ||||||
|  | @Api(value = "App包工头请假控制器", tags = {"App包工头请假管理"}) | ||||||
|  | @RequiredArgsConstructor(onConstructor_ = @Autowired) | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/app/bgt/leave") | ||||||
|  | public class AppBgtLeaveController extends BaseController { | ||||||
|  |  | ||||||
|  |     private final IWgzLeaveService iWgzLeaveService; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 获取请假详细信息 | ||||||
|  |      */ | ||||||
|  |     @ApiOperation("获取请假详细信息") | ||||||
|  |     @GetMapping("/{id}") | ||||||
|  |     public AjaxResult<WgzLeave> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                                   @PathVariable("id") Long id) { | ||||||
|  |         return AjaxResult.success(iWgzLeaveService.queryById(id)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @ApiOperation("请假审核") | ||||||
|  |     @Log(title = "请假审核", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit | ||||||
|  |     @PutMapping() | ||||||
|  |     public AjaxResult<Boolean> edit(@Validated @RequestBody BgtLeaveUpdateDTO dto) { | ||||||
|  |         return AjaxResult.success(iWgzLeaveService.bgtAudit(dto)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -3,9 +3,9 @@ package com.ruoyi.web.controller.bgt; | |||||||
| import com.ruoyi.bgt.bo.BgtMessageQueryBo; | import com.ruoyi.bgt.bo.BgtMessageQueryBo; | ||||||
| import com.ruoyi.bgt.domain.BgtMessage; | import com.ruoyi.bgt.domain.BgtMessage; | ||||||
| import com.ruoyi.bgt.domain.dto.BgtMessageMyListDTO; | import com.ruoyi.bgt.domain.dto.BgtMessageMyListDTO; | ||||||
| import com.ruoyi.bgt.domain.dto.BgtMessageOtherDTO; | import com.ruoyi.bgt.domain.dto.BgtMessageDetailDTO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtMessageCountVO; | import com.ruoyi.bgt.domain.vo.BgtMessageCountVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtMessageOtherVO; | import com.ruoyi.bgt.domain.vo.BgtMessageDetailVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtMessageVO; | import com.ruoyi.bgt.domain.vo.BgtMessageVO; | ||||||
| import com.ruoyi.bgt.service.IBgtMessageService; | import com.ruoyi.bgt.service.IBgtMessageService; | ||||||
| import com.ruoyi.common.annotation.Log; | import com.ruoyi.common.annotation.Log; | ||||||
| @ -54,10 +54,10 @@ public class AppBgtMessageController extends BaseController { | |||||||
| 		return iBgtMessageService.queryMyPageList(dto); | 		return iBgtMessageService.queryMyPageList(dto); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	@ApiOperation("其他消息列表") | 	@ApiOperation("消息详情列表") | ||||||
| 	@GetMapping("/otherList") | 	@GetMapping("/detailList") | ||||||
| 	public TableDataInfo<BgtMessageOtherVO> otherList(BgtMessageOtherDTO dto) { | 	public TableDataInfo<BgtMessageDetailVO> otherList(BgtMessageDetailDTO dto) { | ||||||
| 		return iBgtMessageService.queryOtherPageList(dto); | 		return iBgtMessageService.queryDetailPageList(dto); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  |  | ||||||
|  | |||||||
| @ -47,7 +47,8 @@ public class AppBgtProjectRecruitApplyController extends BaseController { | |||||||
| 	 * | 	 * | ||||||
| 	 * | 	 * | ||||||
| 	 */ | 	 */ | ||||||
| 	@ApiOperation("App务工者列表(分页)") | 	@ApiOperation(value = "App务工者列表(分页)" | ||||||
|  | 		,notes = "务工者申请列表 状态 为报名-未选择(0)和通过-已选择(1)") | ||||||
| 	@GetMapping("/list") | 	@GetMapping("/list") | ||||||
| 	public TableDataInfo<BgtProjectRecruitApplyVO> listPage(@Validated BgtProjectRecruitApplyQueryDTO dto) { | 	public TableDataInfo<BgtProjectRecruitApplyVO> listPage(@Validated BgtProjectRecruitApplyQueryDTO dto) { | ||||||
| 		return iBgtProjectRecruitApplyService.appQueryPageList(dto); | 		return iBgtProjectRecruitApplyService.appQueryPageList(dto); | ||||||
|  | |||||||
| @ -3,6 +3,7 @@ package com.ruoyi.web.controller.bgt; | |||||||
| import com.ruoyi.bgt.domain.BgtProjectRecruit; | import com.ruoyi.bgt.domain.BgtProjectRecruit; | ||||||
| import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO; | import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtProjectRecruitDetailVO; | import com.ruoyi.bgt.domain.vo.BgtProjectRecruitDetailVO; | ||||||
|  | import com.ruoyi.bgt.domain.vo.BgtProjectRecruitDetailWgzListVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO; | import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO; | ||||||
| import com.ruoyi.bgt.service.IBgtProjectRecruitService; | import com.ruoyi.bgt.service.IBgtProjectRecruitService; | ||||||
| import com.ruoyi.common.annotation.Log; | import com.ruoyi.common.annotation.Log; | ||||||
| @ -37,7 +38,7 @@ public class AppBgtProjectRecruitController extends BaseController { | |||||||
|     /** |     /** | ||||||
|      * 查询包工头招工列表 状态为通过和报名 |      * 查询包工头招工列表 状态为通过和报名 | ||||||
|      */ |      */ | ||||||
|     @ApiOperation("我的招工") |     @ApiOperation(value = "我的招工",notes = "1.查询包工头招工列表 状态为通过(1)和报名(0)") | ||||||
|     @GetMapping("/list") |     @GetMapping("/list") | ||||||
|     public TableDataInfo<BgtProjectRecruitVO> list(@Validated BgtProjectRecruitQueryDTO dto) { |     public TableDataInfo<BgtProjectRecruitVO> list(@Validated BgtProjectRecruitQueryDTO dto) { | ||||||
|         return iBgtProjectRecruitService.appQueryPageList(dto); |         return iBgtProjectRecruitService.appQueryPageList(dto); | ||||||
| @ -53,6 +54,22 @@ public class AppBgtProjectRecruitController extends BaseController { | |||||||
|         return AjaxResult.success(iBgtProjectRecruitService.appQueryById(id)); |         return AjaxResult.success(iBgtProjectRecruitService.appQueryById(id)); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | 	@ApiOperation("我的招工任务详情-务工者申请列表") | ||||||
|  | 	@GetMapping("/wgzList/{id}") | ||||||
|  | 	public AjaxResult<BgtProjectRecruitDetailWgzListVO> wgzList(@NotNull(message = "主键不能为空") | ||||||
|  | 														 @PathVariable("id") Long id) { | ||||||
|  | 		return AjaxResult.success(iBgtProjectRecruitService.wgzList(id)); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	@ApiOperation("务工者申请列表数量统计") | ||||||
|  | 	@GetMapping("/wgzCount/{id}") | ||||||
|  | 	public AjaxResult<BgtProjectRecruitDetailWgzListVO> wgzCount(@NotNull(message = "主键不能为空") | ||||||
|  | 																@PathVariable("id") Long id) { | ||||||
|  | 		BgtProjectRecruitDetailWgzListVO bgtProjectRecruitDetailWgzListVO = iBgtProjectRecruitService.wgzList(id); | ||||||
|  | 		bgtProjectRecruitDetailWgzListVO.setApplyList(null); | ||||||
|  | 		return AjaxResult.success(bgtProjectRecruitDetailWgzListVO); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 新增包工头招工 |      * 新增包工头招工 | ||||||
|      */ |      */ | ||||||
|  | |||||||
| @ -61,8 +61,8 @@ public class AppBgtProjectTaskProgressController extends BaseController { | |||||||
|     @Log(title = "App上传任务进度", businessType = BusinessType.INSERT) |     @Log(title = "App上传任务进度", businessType = BusinessType.INSERT) | ||||||
|     @RepeatSubmit |     @RepeatSubmit | ||||||
|     @PostMapping() |     @PostMapping() | ||||||
|     public AjaxResult<Void> add(@Validated @RequestBody BgtProjectTaskProgress bo) { |     public AjaxResult<Boolean> add(@Validated @RequestBody BgtProjectTaskProgress bo) { | ||||||
|         return toAjax(iBgtProjectTaskProgressService.insert(bo) ? 1 : 0); |         return AjaxResult.success(iBgtProjectTaskProgressService.insert(bo)); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -38,7 +38,9 @@ public class AppFbsProjectTaskController extends BaseController { | |||||||
| 	 * 我的任务列表 任务状态 申请(0) 进行(1) 完成(2)  是否我的任务 true | 	 * 我的任务列表 任务状态 申请(0) 进行(1) 完成(2)  是否我的任务 true | ||||||
| 	 * | 	 * | ||||||
| 	 */ | 	 */ | ||||||
|     @ApiOperation("App包工头任务列表/我的任务") |     @ApiOperation(value = "App包工头任务列表/我的任务" | ||||||
|  | 		,notes = "1.首页任务列表 任务状态(status) 申请(0)  是否我的任务(myTask) false\n"+ | ||||||
|  | 				 "2.我的任务列表 任务状态(status) 申请(0) 进行(1) 完成(2)  是否我的任务(myTask) true") | ||||||
|     @GetMapping("/list") |     @GetMapping("/list") | ||||||
|     public TableDataInfo<AppTaskVO> list(@Validated AppTaskDTO dto) { |     public TableDataInfo<AppTaskVO> list(@Validated AppTaskDTO dto) { | ||||||
|         return iFbsProjectTaskService.appQueryPageList(dto); |         return iFbsProjectTaskService.appQueryPageList(dto); | ||||||
|  | |||||||
| @ -0,0 +1,33 @@ | |||||||
|  | package com.ruoyi.bgt.domain.dto; | ||||||
|  |  | ||||||
|  | import io.swagger.annotations.ApiModel; | ||||||
|  | import io.swagger.annotations.ApiModelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.NoArgsConstructor; | ||||||
|  | import lombok.experimental.Accessors; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 工资结算分页查询对象 wgz_pay_calculation | ||||||
|  |  * | ||||||
|  |  * @author ruoyi | ||||||
|  |  * @date 2025-02-21 | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | @Data | ||||||
|  | @NoArgsConstructor | ||||||
|  | @Accessors(chain = true) | ||||||
|  | @ApiModel("包工头请假审核对象") | ||||||
|  | public class BgtLeaveUpdateDTO { | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("主键自增ID") | ||||||
|  | 	private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("审核状态(0待审核 1审核中 2已同意 3已拒绝 4=已取消)") | ||||||
|  | 	private String auditorType; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("审核意见") | ||||||
|  | 	private String auditorOpinion; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -8,7 +8,7 @@ import lombok.NoArgsConstructor; | |||||||
| import lombok.experimental.Accessors; | import lombok.experimental.Accessors; | ||||||
| 
 | 
 | ||||||
| import java.io.Serializable; | import java.io.Serializable; | ||||||
| import java.time.LocalDateTime; | import java.time.LocalDate; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * 消息对象 bgt_message |  * 消息对象 bgt_message | ||||||
| @ -20,7 +20,7 @@ import java.time.LocalDateTime; | |||||||
| @NoArgsConstructor | @NoArgsConstructor | ||||||
| @Accessors(chain = true) | @Accessors(chain = true) | ||||||
| @ApiModel("其他消息查询对象") | @ApiModel("其他消息查询对象") | ||||||
| public class BgtMessageOtherDTO implements Serializable { | public class BgtMessageDetailDTO implements Serializable { | ||||||
| 
 | 
 | ||||||
|     private static final long serialVersionUID=1L; |     private static final long serialVersionUID=1L; | ||||||
| 
 | 
 | ||||||
| @ -32,8 +32,11 @@ public class BgtMessageOtherDTO implements Serializable { | |||||||
| 	private Integer pageNum; | 	private Integer pageNum; | ||||||
| 
 | 
 | ||||||
| 	@ApiModelProperty("日期") | 	@ApiModelProperty("日期") | ||||||
| 	@JsonFormat(pattern = "yyyy-MM-dd hh", timezone = "GMT+8") | 	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") | ||||||
| 	private LocalDateTime date; | 	private LocalDate date; | ||||||
|  | 
 | ||||||
|  | 	@ApiModelProperty("大类型(字典bgt_message_large_type)") | ||||||
|  | 	private String messageLargeType; | ||||||
| 
 | 
 | ||||||
| 	@ApiModelProperty("小类型(字典bgt_message_small_type)") | 	@ApiModelProperty("小类型(字典bgt_message_small_type)") | ||||||
| 	private String messageSmallType; | 	private String messageSmallType; | ||||||
| @ -20,7 +20,7 @@ import java.time.LocalDateTime; | |||||||
| @NoArgsConstructor | @NoArgsConstructor | ||||||
| @Accessors(chain = true) | @Accessors(chain = true) | ||||||
| @ApiModel("其他消息列表视图对象") | @ApiModel("其他消息列表视图对象") | ||||||
| public class BgtMessageOtherVO implements Serializable { | public class BgtMessageDetailVO implements Serializable { | ||||||
| 
 | 
 | ||||||
|     private static final long serialVersionUID=1L; |     private static final long serialVersionUID=1L; | ||||||
| 
 | 
 | ||||||
| @ -46,6 +46,7 @@ public class BgtMessageOtherVO implements Serializable { | |||||||
|     private String readStatus; |     private String readStatus; | ||||||
| 
 | 
 | ||||||
|     @ApiModelProperty("创建时间") |     @ApiModelProperty("创建时间") | ||||||
|  | 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm") | ||||||
|     private LocalDateTime createTime; |     private LocalDateTime createTime; | ||||||
| 
 | 
 | ||||||
| 	//补卡 | 	//补卡 | ||||||
| @ -50,6 +50,9 @@ public class BgtProjectRecruitApplyVO implements Serializable { | |||||||
| 	@ApiModelProperty("工种") | 	@ApiModelProperty("工种") | ||||||
| 	private String typeOfWork; | 	private String typeOfWork; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("招工ID") | ||||||
|  | 	private Long recruitId; | ||||||
|  |  | ||||||
| 	@ApiModelProperty("招工主题") | 	@ApiModelProperty("招工主题") | ||||||
| 	private String recruitName; | 	private String recruitName; | ||||||
|  |  | ||||||
|  | |||||||
| @ -107,7 +107,7 @@ public class BgtProjectRecruitDetailVO implements Serializable { | |||||||
| 	private LocalTime endWorkTime; | 	private LocalTime endWorkTime; | ||||||
|  |  | ||||||
| 	@ApiModelProperty("申请者列表") | 	@ApiModelProperty("申请者列表") | ||||||
| 	List<BgtProjectRecruitApplyVO> applylist; | 	List<BgtProjectRecruitApplyVO> applyList; | ||||||
|  |  | ||||||
| 	@ApiModelProperty("总人数") | 	@ApiModelProperty("总人数") | ||||||
| 	private Integer totalNum; | 	private Integer totalNum; | ||||||
|  | |||||||
| @ -0,0 +1,41 @@ | |||||||
|  | package com.ruoyi.bgt.domain.vo; | ||||||
|  |  | ||||||
|  | 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.util.List; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 包工头招工对象 bgt_project_recruit | ||||||
|  |  * | ||||||
|  |  * @author ruoyi | ||||||
|  |  * @date 2025-02-17 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @NoArgsConstructor | ||||||
|  | @Accessors(chain = true) | ||||||
|  | @ApiModel("App包工头招工详情-务工者申请列表对象") | ||||||
|  | public class BgtProjectRecruitDetailWgzListVO implements Serializable { | ||||||
|  |  | ||||||
|  |     private static final long serialVersionUID=1L; | ||||||
|  |  | ||||||
|  |     /** 主键ID */ | ||||||
|  |     @ApiModelProperty("主键ID") | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("申请者列表") | ||||||
|  | 	List<BgtProjectRecruitApplyVO> applyList; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("总人数") | ||||||
|  | 	private Integer totalNum; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("同意人数") | ||||||
|  | 	private Integer passNum; | ||||||
|  |  | ||||||
|  | 	@ApiModelProperty("未选择人数") | ||||||
|  | 	private Integer notSelectNum; | ||||||
|  | } | ||||||
| @ -55,6 +55,6 @@ public class BgtProjectRecruitVO implements Serializable { | |||||||
| 	private String typeOfWork; | 	private String typeOfWork; | ||||||
|  |  | ||||||
| 	@ApiModelProperty("申请者列表") | 	@ApiModelProperty("申请者列表") | ||||||
| 	List<BgtProjectRecruitApplyVO> applylist; | 	List<BgtProjectRecruitApplyVO> applyList; | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -2,8 +2,8 @@ package com.ruoyi.bgt.mapper; | |||||||
|  |  | ||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
| import com.ruoyi.bgt.domain.BgtMessage; | import com.ruoyi.bgt.domain.BgtMessage; | ||||||
| import com.ruoyi.bgt.domain.dto.BgtMessageOtherDTO; | import com.ruoyi.bgt.domain.dto.BgtMessageDetailDTO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtMessageOtherVO; | import com.ruoyi.bgt.domain.vo.BgtMessageDetailVO; | ||||||
| import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache; | import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache; | ||||||
| import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; | import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; | ||||||
| import org.apache.ibatis.annotations.CacheNamespace; | import org.apache.ibatis.annotations.CacheNamespace; | ||||||
| @ -19,5 +19,5 @@ import org.apache.ibatis.annotations.Param; | |||||||
| @CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class) | @CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class) | ||||||
| public interface BgtMessageMapper extends BaseMapperPlus<BgtMessage> { | public interface BgtMessageMapper extends BaseMapperPlus<BgtMessage> { | ||||||
|  |  | ||||||
| 	Page<BgtMessageOtherVO> queryOtherPageList(@Param("page")Page<BgtMessageOtherDTO> page,@Param("dto") BgtMessageOtherDTO dto); | 	Page<BgtMessageDetailVO> queryOtherPageList(@Param("page")Page<BgtMessageDetailDTO> page, @Param("dto") BgtMessageDetailDTO dto); | ||||||
| } | } | ||||||
|  | |||||||
| @ -3,9 +3,9 @@ package com.ruoyi.bgt.service; | |||||||
| import com.ruoyi.bgt.bo.BgtMessageQueryBo; | import com.ruoyi.bgt.bo.BgtMessageQueryBo; | ||||||
| import com.ruoyi.bgt.domain.BgtMessage; | import com.ruoyi.bgt.domain.BgtMessage; | ||||||
| import com.ruoyi.bgt.domain.dto.BgtMessageMyListDTO; | import com.ruoyi.bgt.domain.dto.BgtMessageMyListDTO; | ||||||
| import com.ruoyi.bgt.domain.dto.BgtMessageOtherDTO; | import com.ruoyi.bgt.domain.dto.BgtMessageDetailDTO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtMessageCountVO; | import com.ruoyi.bgt.domain.vo.BgtMessageCountVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtMessageOtherVO; | import com.ruoyi.bgt.domain.vo.BgtMessageDetailVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtMessageVO; | import com.ruoyi.bgt.domain.vo.BgtMessageVO; | ||||||
| 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; | ||||||
| @ -81,7 +81,7 @@ public interface IBgtMessageService extends IServicePlus<BgtMessage> { | |||||||
| 	TableDataInfo<BgtMessageVO> queryMyPageList(BgtMessageMyListDTO dto); | 	TableDataInfo<BgtMessageVO> queryMyPageList(BgtMessageMyListDTO dto); | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * 其他消息列表 | 	 * 消息详情列表 | ||||||
| 	 */ | 	 */ | ||||||
| 	TableDataInfo<BgtMessageOtherVO> queryOtherPageList(BgtMessageOtherDTO dto); | 	TableDataInfo<BgtMessageDetailVO> queryDetailPageList(BgtMessageDetailDTO dto); | ||||||
| } | } | ||||||
|  | |||||||
| @ -10,8 +10,6 @@ import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO; | |||||||
| 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.req.WgzAppConfirmRegistrationReq; | import com.ruoyi.wgz.bo.req.WgzAppConfirmRegistrationReq; | ||||||
| import org.springframework.validation.annotation.Validated; |  | ||||||
| import org.springframework.web.bind.annotation.RequestBody; |  | ||||||
| import com.ruoyi.wgz.bo.req.WgzAppUnderwayReq; | import com.ruoyi.wgz.bo.req.WgzAppUnderwayReq; | ||||||
| import com.ruoyi.wgz.bo.res.WgzAppUnderwayRes; | import com.ruoyi.wgz.bo.res.WgzAppUnderwayRes; | ||||||
| import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||||
| @ -107,6 +105,11 @@ public interface IBgtProjectRecruitApplyService extends IServicePlus<BgtProjectR | |||||||
| 	 */ | 	 */ | ||||||
| 	Boolean quit(Long id); | 	Boolean quit(Long id); | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * 批量退场 | ||||||
|  | 	 */ | ||||||
|  | 	void quitBatch(Long taskId); | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * 评分 | 	 * 评分 | ||||||
| 	 */ | 	 */ | ||||||
|  | |||||||
| @ -4,6 +4,7 @@ import com.ruoyi.bgt.bo.BgtProjectRecruitQueryBo; | |||||||
| import com.ruoyi.bgt.domain.BgtProjectRecruit; | import com.ruoyi.bgt.domain.BgtProjectRecruit; | ||||||
| import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO; | import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtProjectRecruitDetailVO; | import com.ruoyi.bgt.domain.vo.BgtProjectRecruitDetailVO; | ||||||
|  | import com.ruoyi.bgt.domain.vo.BgtProjectRecruitDetailWgzListVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO; | import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO; | ||||||
| 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; | ||||||
| @ -17,6 +18,7 @@ import org.springframework.validation.annotation.Validated; | |||||||
|  |  | ||||||
| import java.util.Collection; | import java.util.Collection; | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 包工头招工Service接口 |  * 包工头招工Service接口 | ||||||
| @ -73,12 +75,22 @@ public interface IBgtProjectRecruitService extends IServicePlus<BgtProjectRecrui | |||||||
| 	 */ | 	 */ | ||||||
| 	BgtProjectRecruitDetailVO appQueryById(Long id); | 	BgtProjectRecruitDetailVO appQueryById(Long id); | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * 务工者统计 | ||||||
|  | 	 */ | ||||||
|  | 	BgtProjectRecruitDetailWgzListVO wgzList(Long id); | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * 获取任务下的所有招工Id | 	 * 获取任务下的所有招工Id | ||||||
| 	 */ | 	 */ | ||||||
| 	List<Long> getRecruitIdsByTaskId(Long taskId); | 	List<Long> getRecruitIdsByTaskId(Long taskId); | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * 获取任务下的所有招工Id和招工名称 | ||||||
|  | 	 */ | ||||||
|  | 	Map<Long,String> getRecruitIdAndNameByTaskId(Long taskId); | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * LC-APP相关 | 	 * LC-APP相关 | ||||||
| 	 * ================================================================================================================= | 	 * ================================================================================================================= | ||||||
|  | |||||||
| @ -7,28 +7,41 @@ 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.ruoyi.bgt.bo.BgtMessageQueryBo; | import com.ruoyi.bgt.bo.BgtMessageQueryBo; | ||||||
| import com.ruoyi.bgt.domain.BgtMessage; | import com.ruoyi.bgt.domain.BgtMessage; | ||||||
|  | import com.ruoyi.bgt.domain.BgtProjectRecruit; | ||||||
|  | import com.ruoyi.bgt.domain.BgtProjectRecruitApply; | ||||||
|  | import com.ruoyi.bgt.domain.dto.BgtMessageDetailDTO; | ||||||
| import com.ruoyi.bgt.domain.dto.BgtMessageMyListDTO; | import com.ruoyi.bgt.domain.dto.BgtMessageMyListDTO; | ||||||
| import com.ruoyi.bgt.domain.dto.BgtMessageOtherDTO; |  | ||||||
| import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyQueryDTO; |  | ||||||
| import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO; |  | ||||||
| import com.ruoyi.bgt.domain.vo.BgtMessageCountVO; | import com.ruoyi.bgt.domain.vo.BgtMessageCountVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtMessageOtherVO; | import com.ruoyi.bgt.domain.vo.BgtMessageDetailVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtMessageVO; | import com.ruoyi.bgt.domain.vo.BgtMessageVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO; |  | ||||||
| import com.ruoyi.bgt.mapper.BgtMessageMapper; | import com.ruoyi.bgt.mapper.BgtMessageMapper; | ||||||
| import com.ruoyi.bgt.service.IBgtMessageService; | import com.ruoyi.bgt.service.IBgtMessageService; | ||||||
|  | import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService; | ||||||
|  | import com.ruoyi.bgt.service.IBgtProjectRecruitService; | ||||||
| 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.BgtMessageType; | import com.ruoyi.common.enums.BgtMessageType; | ||||||
| import com.ruoyi.common.utils.PageUtils; | import com.ruoyi.common.utils.PageUtils; | ||||||
| import com.ruoyi.common.utils.SecurityUtils; | import com.ruoyi.common.utils.SecurityUtils; | ||||||
|  | import com.ruoyi.wgz.domain.WgzLeave; | ||||||
|  | import com.ruoyi.wgz.domain.WgzPayCalculation; | ||||||
|  | import com.ruoyi.wgz.domain.WgzReissueacard; | ||||||
|  | import com.ruoyi.wgz.service.IWgzLeaveService; | ||||||
|  | import com.ruoyi.wgz.service.IWgzPayCalculationService; | ||||||
|  | import com.ruoyi.wgz.service.IWgzReissueacardService; | ||||||
|  | import com.ruoyi.wgz.service.IWgzUserService; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import java.time.LocalTime; | ||||||
|  | import java.util.ArrayList; | ||||||
| import java.util.Collection; | import java.util.Collection; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
| import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||||
|  |  | ||||||
|  | import static com.ruoyi.common.constants.BgtMessageConstant.*; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 消息Service业务层处理 |  * 消息Service业务层处理 | ||||||
|  * |  * | ||||||
| @ -38,8 +51,26 @@ import java.util.stream.Collectors; | |||||||
| @Service | @Service | ||||||
| public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, BgtMessage> implements IBgtMessageService { | public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, BgtMessage> implements IBgtMessageService { | ||||||
|  |  | ||||||
|  | 	@Autowired | ||||||
|  | 	private IBgtProjectRecruitApplyService recruitApplyService; | ||||||
|  |  | ||||||
|  | 	@Autowired | ||||||
|  | 	private IBgtProjectRecruitService recruitService; | ||||||
|  |  | ||||||
|  | 	@Autowired | ||||||
|  | 	private IWgzPayCalculationService payCalculationService; | ||||||
|  |  | ||||||
|  | 	@Autowired | ||||||
|  | 	private IWgzLeaveService leaveService; | ||||||
|  |  | ||||||
|  | 	@Autowired | ||||||
|  | 	private IWgzUserService wgzUserService; | ||||||
|  |  | ||||||
|  | 	@Autowired | ||||||
|  | 	private IWgzReissueacardService reissueacardService; | ||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
|     public BgtMessage queryById(Long id){ | 	public BgtMessage queryById(Long id) { | ||||||
| 		return getById(id); | 		return getById(id); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| @ -90,13 +121,13 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt | |||||||
| 	 * | 	 * | ||||||
| 	 * @param entity 实体类数据 | 	 * @param entity 实体类数据 | ||||||
| 	 */ | 	 */ | ||||||
|     private void validEntityBeforeSave(BgtMessage entity){ | 	private void validEntityBeforeSave(BgtMessage entity) { | ||||||
| 		//TODO 做一些数据校验,如唯一约束 | 		//TODO 做一些数据校验,如唯一约束 | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
| 	public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | 	public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
|         if(isValid){ | 		if (isValid) { | ||||||
| 			//TODO 做一些业务上的校验,判断是否需要校验 | 			//TODO 做一些业务上的校验,判断是否需要校验 | ||||||
| 		} | 		} | ||||||
| 		return removeByIds(ids); | 		return removeByIds(ids); | ||||||
| @ -122,9 +153,9 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt | |||||||
| 		Map<String, Long> map = bgtMessages.stream().collect(Collectors.groupingBy(BgtMessage::getMessageLargeType, Collectors.counting())); | 		Map<String, Long> map = bgtMessages.stream().collect(Collectors.groupingBy(BgtMessage::getMessageLargeType, Collectors.counting())); | ||||||
|  |  | ||||||
| 		BgtMessageCountVO bgtMessageCountVO = new BgtMessageCountVO(); | 		BgtMessageCountVO bgtMessageCountVO = new BgtMessageCountVO(); | ||||||
| 		bgtMessageCountVO.setTaskMessageCount(map.getOrDefault(BgtMessageType.TASK.getCode(),0L).intValue()); | 		bgtMessageCountVO.setTaskMessageCount(map.getOrDefault(BgtMessageType.TASK.getCode(), 0L).intValue()); | ||||||
| 		bgtMessageCountVO.setSettlementMessageCount(map.getOrDefault(BgtMessageType.SETTLEMENT.getCode(),0L).intValue()); | 		bgtMessageCountVO.setSettlementMessageCount(map.getOrDefault(BgtMessageType.SETTLEMENT.getCode(), 0L).intValue()); | ||||||
| 		bgtMessageCountVO.setOtherMessageCount(map.getOrDefault(BgtMessageType.OTHER.getCode(),0L).intValue()); | 		bgtMessageCountVO.setOtherMessageCount(map.getOrDefault(BgtMessageType.OTHER.getCode(), 0L).intValue()); | ||||||
| 		return bgtMessageCountVO; | 		return bgtMessageCountVO; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| @ -135,16 +166,62 @@ public class BgtMessageServiceImpl extends ServicePlusImpl<BgtMessageMapper, Bgt | |||||||
| 		Page<BgtMessage> result = page(PageUtils.buildPage(), wrapper); | 		Page<BgtMessage> result = page(PageUtils.buildPage(), wrapper); | ||||||
| 		Page<BgtMessageVO> bgtMessageVOPage = new Page<>(); | 		Page<BgtMessageVO> bgtMessageVOPage = new Page<>(); | ||||||
| 		bgtMessageVOPage.setTotal(result.getTotal()); | 		bgtMessageVOPage.setTotal(result.getTotal()); | ||||||
| 		bgtMessageVOPage.setRecords(BeanUtil.copyToList(result.getRecords(),BgtMessageVO.class)); | 		bgtMessageVOPage.setRecords(BeanUtil.copyToList(result.getRecords(), BgtMessageVO.class)); | ||||||
| 		return PageUtils.buildDataInfo(bgtMessageVOPage); | 		return PageUtils.buildDataInfo(bgtMessageVOPage); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
| 	public TableDataInfo<BgtMessageOtherVO> queryOtherPageList(BgtMessageOtherDTO dto) { | 	public TableDataInfo<BgtMessageDetailVO> queryDetailPageList(BgtMessageDetailDTO dto) { | ||||||
| 		Page<BgtMessageOtherDTO> queryDTOPage = new Page<>(); | 		LambdaQueryWrapper<BgtMessage> wrapper = new LambdaQueryWrapper<>(); | ||||||
| 		queryDTOPage.setCurrent(dto.getPageNum()); | 		wrapper.eq(BgtMessage::getRecipientId, SecurityUtils.getAppUserId()); | ||||||
| 		queryDTOPage.setSize(dto.getPageSize()); | 		wrapper.eq(StrUtil.isNotBlank(dto.getMessageLargeType()), BgtMessage::getMessageLargeType, dto.getMessageLargeType()); | ||||||
| 		Page<BgtMessageOtherVO> queryVOPage = baseMapper.queryOtherPageList(queryDTOPage, dto); | 		wrapper.eq(StrUtil.isNotBlank(dto.getMessageSmallType()), BgtMessage::getMessageSmallType, dto.getMessageSmallType()); | ||||||
| 		return PageUtils.buildDataInfo(queryVOPage); | 		wrapper.between(dto.getDate() != null, BgtMessage::getCreateTime, dto.getDate().atStartOfDay(), dto.getDate().atStartOfDay().with(LocalTime.MAX)); | ||||||
|  | 		Page<BgtMessage> result = page(PageUtils.buildPage(), wrapper); | ||||||
|  | 		Page<BgtMessageDetailVO> bgtMessageVOPage = new Page<>(); | ||||||
|  | 		bgtMessageVOPage.setTotal(result.getTotal()); | ||||||
|  |  | ||||||
|  | 		ArrayList<BgtMessageDetailVO> bgtMessageVOS = new ArrayList<>(); | ||||||
|  |  | ||||||
|  | 		for (BgtMessage message : result.getRecords()) { | ||||||
|  | 			BgtMessageDetailVO bgtMessageDetailVO = BeanUtil.copyProperties(message, BgtMessageDetailVO.class); | ||||||
|  | 			if (BGT_LARGE_TASK.equals(message.getMessageLargeType())) { | ||||||
|  | 				// todo | ||||||
|  | 			} else if (BGT_LARGE_SETTLEMENT.equals(message.getMessageLargeType())) { | ||||||
|  | 				// todo | ||||||
|  | 			} else if (BGT_LARGE_OTHER.equals(message.getMessageLargeType())) { | ||||||
|  |  | ||||||
|  | 				switch (message.getMessageSmallType()) { | ||||||
|  | 					case BGT_SMALL_SIGN_UP: | ||||||
|  | 						BgtProjectRecruitApply recruitApply = recruitApplyService.getById(message.getTableId()); | ||||||
|  | 						BgtProjectRecruit recruit = recruitService.getById(recruitApply.getRecruitId()); | ||||||
|  | 						bgtMessageDetailVO.setRecruitName(recruit.getRecruitName()); | ||||||
|  | 						break; | ||||||
|  | 					case BGT_SMALL_PAY: | ||||||
|  | 						WgzPayCalculation payCalculation = payCalculationService.getById(message.getTableId()); | ||||||
|  | 						BgtProjectRecruit recruitPay = recruitService.getById(payCalculation.getRecruitId()); | ||||||
|  | 						bgtMessageDetailVO.setRecruitName(recruitPay.getRecruitName()); | ||||||
|  | 						break; | ||||||
|  | 					case BGT_SMALL_LEAVE: | ||||||
|  | 						WgzLeave wgzLeave = leaveService.getById(message.getTableId()); | ||||||
|  | 						bgtMessageDetailVO.setReason(wgzLeave.getReason()); | ||||||
|  | 						bgtMessageDetailVO.setUsername(wgzUserService.getById(wgzLeave.getUserId()).getUsername()); | ||||||
|  | 						bgtMessageDetailVO.setStartTime(wgzLeave.getStartTime()); | ||||||
|  | 						bgtMessageDetailVO.setEndTime(wgzLeave.getEndTime()); | ||||||
|  | 						break; | ||||||
|  | 					case BGT_SMALL_MAKE_UP: | ||||||
|  | 						WgzReissueacard reissueacard = reissueacardService.getById(message.getTableId()); | ||||||
|  | 						bgtMessageDetailVO.setReason(reissueacard.getReason()); | ||||||
|  | 						bgtMessageDetailVO.setUsername(wgzUserService.getById(reissueacard.getUserId()).getUsername()); | ||||||
|  | 						bgtMessageDetailVO.setNowTime(reissueacard.getNowTime()); | ||||||
|  | 						break; | ||||||
|  | 					default: | ||||||
|  | 						break; | ||||||
|  | 				} | ||||||
|  | 				bgtMessageVOS.add(bgtMessageDetailVO); | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 		bgtMessageVOPage.setRecords(bgtMessageVOS); | ||||||
|  | 		return PageUtils.buildDataInfo(bgtMessageVOPage); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  | |||||||
| @ -3,6 +3,7 @@ package com.ruoyi.bgt.service.impl; | |||||||
| import cn.hutool.core.bean.BeanUtil; | import cn.hutool.core.bean.BeanUtil; | ||||||
| import cn.hutool.core.collection.CollectionUtil; | import cn.hutool.core.collection.CollectionUtil; | ||||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | ||||||
| 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; | ||||||
| @ -10,13 +11,15 @@ import com.ruoyi.bgt.bo.BgtProjectRecruitApplyQueryBo; | |||||||
| import com.ruoyi.bgt.domain.BgtMessage; | 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.*; | import com.ruoyi.bgt.domain.dto.BgtAttendanceDayDTO; | ||||||
|  | import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyConsentDTO; | ||||||
|  | import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyQueryDTO; | ||||||
|  | import com.ruoyi.bgt.domain.dto.BgtScoreDTO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO; | import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO; | ||||||
| import com.ruoyi.bgt.mapper.BgtProjectRecruitApplyMapper; | import com.ruoyi.bgt.mapper.BgtProjectRecruitApplyMapper; | ||||||
| import com.ruoyi.bgt.service.IBgtMessageService; | 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.constants.WgzAndBgtMessageConstant; |  | ||||||
| import com.ruoyi.common.core.domain.entity.SysDictData; | import com.ruoyi.common.core.domain.entity.SysDictData; | ||||||
| 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; | ||||||
| @ -37,6 +40,8 @@ import com.ruoyi.wgz.service.IWgzMessageService; | |||||||
| import com.ruoyi.wgz.service.IWgzScoreRecordService; | import com.ruoyi.wgz.service.IWgzScoreRecordService; | ||||||
| import com.ruoyi.wgz.service.IWgzUserService; | import com.ruoyi.wgz.service.IWgzUserService; | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.context.annotation.Lazy; | ||||||
|  | import org.springframework.scheduling.annotation.Async; | ||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
| import org.springframework.transaction.annotation.Transactional; | import org.springframework.transaction.annotation.Transactional; | ||||||
|  |  | ||||||
| @ -44,6 +49,7 @@ import java.text.DecimalFormat; | |||||||
| import java.time.LocalDate; | import java.time.LocalDate; | ||||||
| import java.util.*; | import java.util.*; | ||||||
|  |  | ||||||
|  | import static com.ruoyi.common.constants.BgtMessageConstant.*; | ||||||
| import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*; | import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @ -62,18 +68,19 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 	@Autowired | 	@Autowired | ||||||
| 	private IWgzUserService wgzUserService; | 	private IWgzUserService wgzUserService; | ||||||
| 	@Autowired | 	@Autowired | ||||||
|  | 	@Lazy | ||||||
| 	private IBgtProjectRecruitService iBgtProjectRecruitService; | 	private IBgtProjectRecruitService iBgtProjectRecruitService; | ||||||
| 	@Autowired | 	@Autowired | ||||||
|  | 	@Lazy | ||||||
| 	private IWgzMessageService iWgzMessageService; | 	private IWgzMessageService iWgzMessageService; | ||||||
| 	@Autowired | 	@Autowired | ||||||
|  | 	@Lazy | ||||||
| 	private IBgtMessageService iBgtMessageService; | 	private IBgtMessageService iBgtMessageService; | ||||||
| 	@Autowired | 	@Autowired | ||||||
| 	private IWgzMessageService wgzMessageService; |  | ||||||
| 	@Autowired |  | ||||||
| 	private ISysDictTypeService dictTypeService; | 	private ISysDictTypeService dictTypeService; | ||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
|     public BgtProjectRecruitApply queryById(Long id){ | 	public BgtProjectRecruitApply queryById(Long id) { | ||||||
| 		return getById(id); | 		return getById(id); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| @ -115,13 +122,13 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 	 * | 	 * | ||||||
| 	 * @param entity 实体类数据 | 	 * @param entity 实体类数据 | ||||||
| 	 */ | 	 */ | ||||||
|     private void validEntityBeforeSave(BgtProjectRecruitApply entity){ | 	private void validEntityBeforeSave(BgtProjectRecruitApply entity) { | ||||||
| 		//TODO 做一些数据校验,如唯一约束 | 		//TODO 做一些数据校验,如唯一约束 | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
| 	public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | 	public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
|         if(isValid){ | 		if (isValid) { | ||||||
| 			//TODO 做一些业务上的校验,判断是否需要校验 | 			//TODO 做一些业务上的校验,判断是否需要校验 | ||||||
| 		} | 		} | ||||||
| 		return removeByIds(ids); | 		return removeByIds(ids); | ||||||
| @ -129,11 +136,11 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
| 	public TableDataInfo<BgtProjectRecruitApplyVO> appQueryPageList(BgtProjectRecruitApplyQueryDTO dto) { | 	public TableDataInfo<BgtProjectRecruitApplyVO> appQueryPageList(BgtProjectRecruitApplyQueryDTO dto) { | ||||||
| 		if(dto.getTaskId()!=null){ | 		if (dto.getTaskId() != null) { | ||||||
| 			List<Long> recruitIdsByTaskId = iBgtProjectRecruitService.getRecruitIdsByTaskId(dto.getTaskId()); | 			List<Long> recruitIdsByTaskId = iBgtProjectRecruitService.getRecruitIdsByTaskId(dto.getTaskId()); | ||||||
| 			if(dto.getRecruitIds()==null){ | 			if (dto.getRecruitIds() == null) { | ||||||
| 				dto.setRecruitIds(recruitIdsByTaskId); | 				dto.setRecruitIds(recruitIdsByTaskId); | ||||||
| 			}else { | 			} else { | ||||||
| 				dto.getRecruitIds().addAll(recruitIdsByTaskId); | 				dto.getRecruitIds().addAll(recruitIdsByTaskId); | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| @ -147,6 +154,14 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
| 	public List<BgtProjectRecruitApplyVO> appQueryList(BgtProjectRecruitApplyQueryDTO dto) { | 	public List<BgtProjectRecruitApplyVO> appQueryList(BgtProjectRecruitApplyQueryDTO dto) { | ||||||
|  | 		if (dto.getTaskId() != null) { | ||||||
|  | 			List<Long> recruitIdsByTaskId = iBgtProjectRecruitService.getRecruitIdsByTaskId(dto.getTaskId()); | ||||||
|  | 			if (dto.getRecruitIds() == null) { | ||||||
|  | 				dto.setRecruitIds(recruitIdsByTaskId); | ||||||
|  | 			} else { | ||||||
|  | 				dto.getRecruitIds().addAll(recruitIdsByTaskId); | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
| 		return baseMapper.appQueryList(dto); | 		return baseMapper.appQueryList(dto); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| @ -160,7 +175,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 			.in(BgtProjectRecruitApply::getStatus, Arrays.asList(RecruitApplyStatus.WGZ_PASS.getCode(), RecruitApplyStatus.WORKING.getCode())) | 			.in(BgtProjectRecruitApply::getStatus, Arrays.asList(RecruitApplyStatus.WGZ_PASS.getCode(), RecruitApplyStatus.WORKING.getCode())) | ||||||
| 			.isNotNull(BgtProjectRecruitApply::getLeaveTime)); | 			.isNotNull(BgtProjectRecruitApply::getLeaveTime)); | ||||||
|  |  | ||||||
| 		if(CollectionUtil.isNotEmpty(list)){ | 		if (CollectionUtil.isNotEmpty(list)) { | ||||||
| 			throw new BaseException("该务工者已进入其他工地"); | 			throw new BaseException("该务工者已进入其他工地"); | ||||||
| 		} | 		} | ||||||
| 		recruitApply.setEntryTime(dto.getEntryTime()); | 		recruitApply.setEntryTime(dto.getEntryTime()); | ||||||
| @ -172,8 +187,8 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 		annexService.insertBatch(dto.getEntryMaterials()); | 		annexService.insertBatch(dto.getEntryMaterials()); | ||||||
| 		//发消息 | 		//发消息 | ||||||
| 		HashMap<String, String> mp = new HashMap<>(); | 		HashMap<String, String> mp = new HashMap<>(); | ||||||
| 		mp.put("projectName",iBgtProjectRecruitService.getById(recruitApply.getRecruitId()).getRecruitName()); | 		mp.put("projectName", iBgtProjectRecruitService.getById(recruitApply.getRecruitId()).getRecruitName()); | ||||||
| 		mp.put("auditor",SecurityUtils.getUsername()); | 		mp.put("auditor", SecurityUtils.getUsername()); | ||||||
| 		Map<String, String> map = bgtMessage(mp, BGT_TYPE_SIGN_UP, true); | 		Map<String, String> map = bgtMessage(mp, BGT_TYPE_SIGN_UP, true); | ||||||
| 		WgzMessage wgzMessage = new WgzMessage() | 		WgzMessage wgzMessage = new WgzMessage() | ||||||
| 			.setSenderType(USERTYPE_BGT) | 			.setSenderType(USERTYPE_BGT) | ||||||
| @ -185,13 +200,11 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 			.setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()) | 			.setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()) | ||||||
| 			.setMessageLargeType(LARGE_APPLY) | 			.setMessageLargeType(LARGE_APPLY) | ||||||
| 			.setMessageSmallType(SMALL_SYSTEM); | 			.setMessageSmallType(SMALL_SYSTEM); | ||||||
| 		wgzMessageService.sendAMessage(wgzMessage); | 		iWgzMessageService.sendAMessage(wgzMessage); | ||||||
| 		return updateById(recruitApply); | 		return updateById(recruitApply); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * LC-APP相关 | 	 * LC-APP相关 | ||||||
| 	 * ================================================================================================================= | 	 * ================================================================================================================= | ||||||
| @ -204,15 +217,15 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 	 */ | 	 */ | ||||||
| 	@Override | 	@Override | ||||||
| 	public BgtProjectRecruitApply selectByUserIdProjectRecruitApplyId(Long id) { | 	public BgtProjectRecruitApply selectByUserIdProjectRecruitApplyId(Long id) { | ||||||
| 		String[] strings = {"3","5"}; | 		String[] strings = {"3", "5"}; | ||||||
| 		LambdaQueryWrapper<BgtProjectRecruitApply> lqw = Wrappers.lambdaQuery(); | 		LambdaQueryWrapper<BgtProjectRecruitApply> lqw = Wrappers.lambdaQuery(); | ||||||
| 		lqw.eq(BgtProjectRecruitApply::getUserId, id). | 		lqw.eq(BgtProjectRecruitApply::getUserId, id). | ||||||
| 			in(BgtProjectRecruitApply::getStatus, strings); //包工头+务工者同意 or 进场 才算进场ok | 			in(BgtProjectRecruitApply::getStatus, strings); //包工头+务工者同意 or 进场 才算进场ok | ||||||
| 		List<BgtProjectRecruitApply> bgtProjectRecruitApplies = baseMapper.selectList(lqw); | 		List<BgtProjectRecruitApply> bgtProjectRecruitApplies = baseMapper.selectList(lqw); | ||||||
| 		if (bgtProjectRecruitApplies.isEmpty()){ | 		if (bgtProjectRecruitApplies.isEmpty()) { | ||||||
| 			throw new RuntimeException("异常,还未查询到您进入了工地!"); | 			throw new RuntimeException("异常,还未查询到您进入了工地!"); | ||||||
| 		} | 		} | ||||||
| 		if (bgtProjectRecruitApplies.size()>1){ | 		if (bgtProjectRecruitApplies.size() > 1) { | ||||||
| 			throw new RuntimeException("异常,查询到用户同时在多个工地务工!"); | 			throw new RuntimeException("异常,查询到用户同时在多个工地务工!"); | ||||||
| 		} | 		} | ||||||
| 		return bgtProjectRecruitApplies.get(0); | 		return bgtProjectRecruitApplies.get(0); | ||||||
| @ -229,13 +242,13 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 		Integer i = baseMapper.selectCount( | 		Integer i = baseMapper.selectCount( | ||||||
| 			new LambdaQueryWrapper<BgtProjectRecruitApply>(). | 			new LambdaQueryWrapper<BgtProjectRecruitApply>(). | ||||||
| 				eq(BgtProjectRecruitApply::getUserId, appUserId). | 				eq(BgtProjectRecruitApply::getUserId, appUserId). | ||||||
| 			in(BgtProjectRecruitApply::getStatus, "3","5") | 				in(BgtProjectRecruitApply::getStatus, "3", "5") | ||||||
| 		); | 		); | ||||||
| 		if (i>0){ | 		if (i > 0) { | ||||||
| 			throw new RuntimeException("已有工地!不可再次申请!"); | 			throw new RuntimeException("已有工地!不可再次申请!"); | ||||||
| 		} | 		} | ||||||
| 		WgzUser byId = wgzUserService.findByUserId(appUserId); | 		WgzUser byId = wgzUserService.findByUserId(appUserId); | ||||||
| 		if (!Objects.equals(appById.getTypeOfWork(), byId.getTypeOfWork())){ | 		if (!Objects.equals(appById.getTypeOfWork(), byId.getTypeOfWork())) { | ||||||
| 			throw new RuntimeException("工种不匹配!"); | 			throw new RuntimeException("工种不匹配!"); | ||||||
| 		} | 		} | ||||||
| 		//4、判断当前用户是否已经申请过了,如果已经申请过了,就不能再次申请了 | 		//4、判断当前用户是否已经申请过了,如果已经申请过了,就不能再次申请了 | ||||||
| @ -244,7 +257,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 				eq(BgtProjectRecruitApply::getUserId, appUserId). | 				eq(BgtProjectRecruitApply::getUserId, appUserId). | ||||||
| 				eq(BgtProjectRecruitApply::getRecruitId, id) | 				eq(BgtProjectRecruitApply::getRecruitId, id) | ||||||
| 		); | 		); | ||||||
| 		if (integer>0){ | 		if (integer > 0) { | ||||||
| 			throw new RuntimeException("已申请过了!不可再次申请!"); | 			throw new RuntimeException("已申请过了!不可再次申请!"); | ||||||
| 		} | 		} | ||||||
| 		//3、插入数据 | 		//3、插入数据 | ||||||
| @ -253,24 +266,24 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 		bgtProjectRecruitApply.setUserId(appUserId); | 		bgtProjectRecruitApply.setUserId(appUserId); | ||||||
| 		int insert = baseMapper.insert(bgtProjectRecruitApply); | 		int insert = baseMapper.insert(bgtProjectRecruitApply); | ||||||
| 		//4、发送消息 | 		//4、发送消息 | ||||||
| 		if (insert>0){ | 		if (insert > 0) { | ||||||
| 			SysDictData typeOfWork = dictTypeService.selectDictDataByTypeAndData("type_of_work", byId.getTypeOfWork()); | 			SysDictData typeOfWork = dictTypeService.selectDictDataByTypeAndData("type_of_work", byId.getTypeOfWork()); | ||||||
| 			Map<String, String> mp = new HashMap<>(); | 			Map<String, String> mp = new HashMap<>(); | ||||||
| 			mp.put("projectName",appById.getRecruitName()); | 			mp.put("projectName", appById.getRecruitName()); | ||||||
| 			mp.put("userName",byId.getUsername()); | 			mp.put("userName", byId.getUsername()); | ||||||
| 			mp.put("post",typeOfWork.getDictLabel()); | 			mp.put("post", typeOfWork.getDictLabel()); | ||||||
| 			//4-1、系统发送消息给当前用户 | 			//4-1、系统发送消息给当前用户 | ||||||
| 			WgzMessage wgzMessage = new WgzMessage(). | 			WgzMessage wgzMessage = new WgzMessage(). | ||||||
| 				setSenderType(USERTYPE_SYSTEM). | 				setSenderType(USERTYPE_SYSTEM). | ||||||
| 				setRecipientType(USERTYPE_WGZ). | 				setRecipientType(USERTYPE_WGZ). | ||||||
| 				setRecipientId(appUserId). | 				setRecipientId(appUserId). | ||||||
| 				setHeadline(WgzAndBgtMessageConstant.wgzMessage(mp,"101")). | 				setHeadline(wgzMessage(mp, "101")). | ||||||
| 				setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"102")). | 				setSubheading(wgzMessage(mp, "102")). | ||||||
| 				setTableId(bgtProjectRecruitApply.getId()). | 				setTableId(bgtProjectRecruitApply.getId()). | ||||||
| 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | ||||||
| 				setMessageLargeType(LARGE_OTHER). | 				setMessageLargeType(LARGE_OTHER). | ||||||
| 				setMessageSmallType(SMALL_SYSTEM); | 				setMessageSmallType(SMALL_SYSTEM); | ||||||
| 			if (!iWgzMessageService.sendAMessage(wgzMessage)){ | 			if (!iWgzMessageService.sendAMessage(wgzMessage)) { | ||||||
| 				throw new RuntimeException("系统消息发送失败!"); | 				throw new RuntimeException("系统消息发送失败!"); | ||||||
| 			} | 			} | ||||||
| 			//4-2、当前用户发送消息给包工头 | 			//4-2、当前用户发送消息给包工头 | ||||||
| @ -279,29 +292,90 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 				setSenderId(appUserId). | 				setSenderId(appUserId). | ||||||
| 				setRecipientType(USERTYPE_BGT). | 				setRecipientType(USERTYPE_BGT). | ||||||
| 				setRecipientId(appById.getUserId()). | 				setRecipientId(appById.getUserId()). | ||||||
| 				setHeadline(WgzAndBgtMessageConstant.wgzMessage(mp,"201")). | 				setHeadline(wgzMessage(mp, "201")). | ||||||
| 				setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"202")). | 				setSubheading(wgzMessage(mp, "202")). | ||||||
| 				setTableId(bgtProjectRecruitApply.getId()). | 				setTableId(bgtProjectRecruitApply.getId()). | ||||||
| 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | ||||||
| 				setMessageLargeType(BGT_LARGE). | 				setMessageLargeType(BGT_LARGE_OTHER). | ||||||
| 				setMessageSmallType(BGT_TYPE_SIGN_UP); | 				setMessageSmallType(BGT_TYPE_SIGN_UP); | ||||||
| 			if (!iBgtMessageService.sendAMessage(bgtMessage)){ | 			if (!iBgtMessageService.sendAMessage(bgtMessage)) { | ||||||
| 				throw new RuntimeException("发送消息失败!"); | 				throw new RuntimeException("发送消息失败!"); | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		return false; | 		return false; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	public List<BgtProjectRecruitApplyVO> todayAttendanceList(BgtAttendanceDayDTO dto){ | 	public List<BgtProjectRecruitApplyVO> todayAttendanceList(BgtAttendanceDayDTO dto) { | ||||||
| 		return baseMapper.todayAttendanceList(dto); | 		return baseMapper.todayAttendanceList(dto); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
|  | 	@Transactional(rollbackFor = Exception.class) | ||||||
| 	public Boolean quit(Long id) { | 	public Boolean quit(Long id) { | ||||||
| 		return super.lambdaUpdate().eq(BgtProjectRecruitApply::getId, id) | 		BgtProjectRecruitApply recruitApply = getById(id); | ||||||
|  | 		BgtProjectRecruit recruit = iBgtProjectRecruitService.getById(recruitApply.getRecruitId()); | ||||||
|  |  | ||||||
|  | 		//发消息 | ||||||
|  | 		HashMap<String, String> mp = new HashMap<>(); | ||||||
|  | 		mp.put("projectName", recruit.getRecruitName()); | ||||||
|  | 		mp.put("auditor", SecurityUtils.getUsername()); | ||||||
|  | 		Map<String, String> map = bgtMessage(mp, BGT_TYPE_EXIT, true); | ||||||
|  | 		WgzMessage wgzMessage = new WgzMessage() | ||||||
|  | 			.setSenderType(USERTYPE_BGT) | ||||||
|  | 			.setRecipientType(USERTYPE_WGZ) | ||||||
|  | 			.setRecipientId(recruitApply.getUserId()) | ||||||
|  | 			.setHeadline(map.get(HEADLINE)) | ||||||
|  | 			.setSubheading(map.get(SUBHEADING)) | ||||||
|  | 			.setTableId(recruitApply.getId()) | ||||||
|  | 			.setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()) | ||||||
|  | 			.setMessageLargeType(LARGE_OTHER) | ||||||
|  | 			.setMessageSmallType(SMALL_EXIT); | ||||||
|  | 		iWgzMessageService.sendAMessage(wgzMessage); | ||||||
|  |  | ||||||
|  | 		recruitApply.setStatus(RecruitApplyStatus.OUT_WORK.getCode()); | ||||||
|  | 		recruitApply.setLeaveTime(LocalDate.now()); | ||||||
|  |  | ||||||
|  | 		return updateById(recruitApply); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	@Async | ||||||
|  | 	@Override | ||||||
|  | 	public void quitBatch(Long taskId) { | ||||||
|  | 		BgtProjectRecruitApplyQueryDTO dto = new BgtProjectRecruitApplyQueryDTO(); | ||||||
|  | 		dto.setTaskId(taskId); | ||||||
|  | 		dto.setStatus(Collections.singletonList(RecruitApplyStatus.WORKING.getCode())); | ||||||
|  | 		List<BgtProjectRecruitApplyVO> bgtProjectRecruitApplyVOS = appQueryList(dto); | ||||||
|  |  | ||||||
|  | 		if (CollectionUtil.isNotEmpty(bgtProjectRecruitApplyVOS)) { | ||||||
|  | 			//发消息 | ||||||
|  | 			List<WgzMessage> wgzMessages = new ArrayList<>(); | ||||||
|  | 			List<Long> ids = new ArrayList<>(); | ||||||
|  | 			for (BgtProjectRecruitApplyVO vo : bgtProjectRecruitApplyVOS) { | ||||||
|  | 				ids.add(vo.getId()); | ||||||
|  | 				HashMap<String, String> mp = new HashMap<>(); | ||||||
|  | 				mp.put("projectName", vo.getRecruitName()); | ||||||
|  | 				mp.put("auditor", "系统"); | ||||||
|  | 				Map<String, String> map = bgtMessage(mp, BGT_TYPE_EXIT, false); | ||||||
|  | 				WgzMessage wgzMessage = new WgzMessage() | ||||||
|  | 					.setSenderType(USERTYPE_BGT) | ||||||
|  | 					.setRecipientType(USERTYPE_WGZ) | ||||||
|  | 					.setRecipientId(vo.getUserId()) | ||||||
|  | 					.setHeadline(map.get(HEADLINE)) | ||||||
|  | 					.setSubheading(map.get(SUBHEADING)) | ||||||
|  | 					.setTableId(vo.getRecruitId()) | ||||||
|  | 					.setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()) | ||||||
|  | 					.setMessageLargeType(LARGE_OTHER) | ||||||
|  | 					.setMessageSmallType(SMALL_EXIT); | ||||||
|  | 				wgzMessages.add(wgzMessage); | ||||||
|  | 			} | ||||||
|  | 			iWgzMessageService.saveBatch(wgzMessages); | ||||||
|  | 			LambdaUpdateWrapper<BgtProjectRecruitApply> wrapper = new LambdaUpdateWrapper<>(); | ||||||
|  | 			wrapper.in(BgtProjectRecruitApply::getId, ids) | ||||||
| 				.set(BgtProjectRecruitApply::getLeaveTime, LocalDate.now()) | 				.set(BgtProjectRecruitApply::getLeaveTime, LocalDate.now()) | ||||||
| 			.set(BgtProjectRecruitApply::getStatus, RecruitApplyStatus.OUT_WORK.getCode()) | 				.set(BgtProjectRecruitApply::getStatus, RecruitApplyStatus.OUT_WORK.getCode()); | ||||||
| 			.update(); | 			update(wrapper); | ||||||
|  | 		} | ||||||
|  |  | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
| @ -330,24 +404,24 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 		BgtProjectRecruitApply bgtProjectRecruitApply = new BgtProjectRecruitApply(); | 		BgtProjectRecruitApply bgtProjectRecruitApply = new BgtProjectRecruitApply(); | ||||||
| 		bgtProjectRecruitApply.setId(recruitApplyId); | 		bgtProjectRecruitApply.setId(recruitApplyId); | ||||||
| 		bgtProjectRecruitApply.setStatus("7"); | 		bgtProjectRecruitApply.setStatus("7"); | ||||||
| 		if(baseMapper.updateById(bgtProjectRecruitApply) >0){ | 		if (baseMapper.updateById(bgtProjectRecruitApply) > 0) { | ||||||
| 			Long appUserId = SecurityUtils.getAppUserId(); | 			Long appUserId = SecurityUtils.getAppUserId(); | ||||||
| 			BgtProjectRecruitApply by = selectByUserIdProjectRecruitApplyId(appUserId); | 			BgtProjectRecruitApply by = selectByUserIdProjectRecruitApplyId(appUserId); | ||||||
| 			BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getUserId()); | 			BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getUserId()); | ||||||
| 			Map<String, String> mp = new HashMap<>(); | 			Map<String, String> mp = new HashMap<>(); | ||||||
| 			mp.put("projectName",appById.getRecruitName()); | 			mp.put("projectName", appById.getRecruitName()); | ||||||
| 			//发送取消报名的系统消息 | 			//发送取消报名的系统消息 | ||||||
| 			WgzMessage wgzMessage = new WgzMessage(). | 			WgzMessage wgzMessage = new WgzMessage(). | ||||||
| 				setSenderType(USERTYPE_SYSTEM). | 				setSenderType(USERTYPE_SYSTEM). | ||||||
| 				setRecipientType(USERTYPE_WGZ). | 				setRecipientType(USERTYPE_WGZ). | ||||||
| 				setRecipientId(appUserId). | 				setRecipientId(appUserId). | ||||||
| 				setHeadline(WgzAndBgtMessageConstant.wgzMessage(mp,"103")). | 				setHeadline(wgzMessage(mp, "103")). | ||||||
| 				setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"104")). | 				setSubheading(wgzMessage(mp, "104")). | ||||||
| 				setTableId(bgtProjectRecruitApply.getId()). | 				setTableId(bgtProjectRecruitApply.getId()). | ||||||
| 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | ||||||
| 				setMessageLargeType(LARGE_OTHER). | 				setMessageLargeType(LARGE_OTHER). | ||||||
| 				setMessageSmallType(SMALL_SYSTEM); | 				setMessageSmallType(SMALL_SYSTEM); | ||||||
| 			if (!iWgzMessageService.sendAMessage(wgzMessage)){ | 			if (!iWgzMessageService.sendAMessage(wgzMessage)) { | ||||||
| 				throw new RuntimeException("系统消息发送失败!"); | 				throw new RuntimeException("系统消息发送失败!"); | ||||||
| 			} | 			} | ||||||
| 			return true; | 			return true; | ||||||
| @ -361,7 +435,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 		Page<WgzAppUnderwayReq> pe = new Page<>(); | 		Page<WgzAppUnderwayReq> pe = new Page<>(); | ||||||
| 		pe.setCurrent(req.getPageNum()); | 		pe.setCurrent(req.getPageNum()); | ||||||
| 		pe.setSize(req.getPageSize()); | 		pe.setSize(req.getPageSize()); | ||||||
| 		return PageUtils.buildDataInfo(baseMapper.underwayPage(pe,req)); | 		return PageUtils.buildDataInfo(baseMapper.underwayPage(pe, req)); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
| @ -376,26 +450,26 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 		apply.setId(req.getRecruitApplyId()); | 		apply.setId(req.getRecruitApplyId()); | ||||||
| 		apply.setStatus(req.getStatus()); | 		apply.setStatus(req.getStatus()); | ||||||
| 		int insert = baseMapper.insert(apply); | 		int insert = baseMapper.insert(apply); | ||||||
| 		if (insert == 0){ | 		if (insert == 0) { | ||||||
| 			throw new RuntimeException("插入数据失败!"); | 			throw new RuntimeException("插入数据失败!"); | ||||||
| 		} | 		} | ||||||
| 		//4系统拒绝消息 | 		//4系统拒绝消息 | ||||||
| 		SysDictData typeOfWork = dictTypeService.selectDictDataByTypeAndData("type_of_work", recruit.getTypeOfWork()); | 		SysDictData typeOfWork = dictTypeService.selectDictDataByTypeAndData("type_of_work", recruit.getTypeOfWork()); | ||||||
| 		Map<String, String> mp = new HashMap<>(); | 		Map<String, String> mp = new HashMap<>(); | ||||||
| 		mp.put("projectName",recruit.getRecruitName()); | 		mp.put("projectName", recruit.getRecruitName()); | ||||||
| 		mp.put("userName",byUserId.getUsername()); | 		mp.put("userName", byUserId.getUsername()); | ||||||
| 		mp.put("post",typeOfWork.getDictLabel()); | 		mp.put("post", typeOfWork.getDictLabel()); | ||||||
| 		if (req.getStatus().equals("3")){ | 		if (req.getStatus().equals("3")) { | ||||||
| 			WgzMessage wgzMessage = new WgzMessage(). | 			WgzMessage wgzMessage = new WgzMessage(). | ||||||
| 				setSenderType(USERTYPE_SYSTEM). | 				setSenderType(USERTYPE_SYSTEM). | ||||||
| 				setRecipientType(USERTYPE_WGZ). | 				setRecipientType(USERTYPE_WGZ). | ||||||
| 				setRecipientId(byUserId.getUserId()). | 				setRecipientId(byUserId.getUserId()). | ||||||
| 				setHeadline(WgzAndBgtMessageConstant.wgzMessage(mp,"105")). | 				setHeadline(wgzMessage(mp, "105")). | ||||||
| 				setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"106")). | 				setSubheading(wgzMessage(mp, "106")). | ||||||
| 				setTableId(apply.getId()). | 				setTableId(apply.getId()). | ||||||
| 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | ||||||
| 				setMessageLargeType(LARGE_APPLY); | 				setMessageLargeType(LARGE_APPLY); | ||||||
| 			if (!iWgzMessageService.sendAMessage(wgzMessage)){ | 			if (!iWgzMessageService.sendAMessage(wgzMessage)) { | ||||||
| 				throw new RuntimeException("系统消息报名拒绝发送失败!"); | 				throw new RuntimeException("系统消息报名拒绝发送失败!"); | ||||||
| 			} | 			} | ||||||
| 			BgtMessage bgtMessage = new BgtMessage(). | 			BgtMessage bgtMessage = new BgtMessage(). | ||||||
| @ -403,29 +477,29 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 				setSenderId(byUserId.getUserId()). | 				setSenderId(byUserId.getUserId()). | ||||||
| 				setRecipientType(USERTYPE_BGT). | 				setRecipientType(USERTYPE_BGT). | ||||||
| 				setRecipientId(apply.getUserId()). | 				setRecipientId(apply.getUserId()). | ||||||
| 				setHeadline(WgzAndBgtMessageConstant.wgzMessage(mp,"203")). | 				setHeadline(wgzMessage(mp, "203")). | ||||||
| 				setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"204")). | 				setSubheading(wgzMessage(mp, "204")). | ||||||
| 				setTableId(apply.getId()). | 				setTableId(apply.getId()). | ||||||
| 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | ||||||
| 				setMessageLargeType(BGT_LARGE). | 				setMessageLargeType(BGT_LARGE_OTHER). | ||||||
| 				setMessageSmallType(BGT_TYPE_SIGN_UP); | 				setMessageSmallType(BGT_TYPE_SIGN_UP); | ||||||
| 			if (!iBgtMessageService.sendAMessage(bgtMessage)){ | 			if (!iBgtMessageService.sendAMessage(bgtMessage)) { | ||||||
| 				throw new RuntimeException("发送报名拒绝消息失败!"); | 				throw new RuntimeException("发送报名拒绝消息失败!"); | ||||||
| 			} | 			} | ||||||
| 			return true; | 			return true; | ||||||
| 		} | 		} | ||||||
| 		//系统同意消息 | 		//系统同意消息 | ||||||
| 		if (req.getStatus().equals("4")){ | 		if (req.getStatus().equals("4")) { | ||||||
| 			WgzMessage wgzMessage = new WgzMessage(). | 			WgzMessage wgzMessage = new WgzMessage(). | ||||||
| 				setSenderType(USERTYPE_SYSTEM). | 				setSenderType(USERTYPE_SYSTEM). | ||||||
| 				setRecipientType(USERTYPE_WGZ). | 				setRecipientType(USERTYPE_WGZ). | ||||||
| 				setRecipientId(byUserId.getUserId()). | 				setRecipientId(byUserId.getUserId()). | ||||||
| 				setHeadline(WgzAndBgtMessageConstant.wgzMessage(mp,"107")). | 				setHeadline(wgzMessage(mp, "107")). | ||||||
| 				setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"108")). | 				setSubheading(wgzMessage(mp, "108")). | ||||||
| 				setTableId(apply.getId()). | 				setTableId(apply.getId()). | ||||||
| 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | ||||||
| 				setMessageLargeType(LARGE_APPLY); | 				setMessageLargeType(LARGE_APPLY); | ||||||
| 			if (!iWgzMessageService.sendAMessage(wgzMessage)){ | 			if (!iWgzMessageService.sendAMessage(wgzMessage)) { | ||||||
| 				throw new RuntimeException("系统消息报名同意发送失败!"); | 				throw new RuntimeException("系统消息报名同意发送失败!"); | ||||||
| 			} | 			} | ||||||
| 			BgtMessage bgtMessage = new BgtMessage(). | 			BgtMessage bgtMessage = new BgtMessage(). | ||||||
| @ -433,13 +507,13 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 				setSenderId(byUserId.getUserId()). | 				setSenderId(byUserId.getUserId()). | ||||||
| 				setRecipientType(USERTYPE_BGT). | 				setRecipientType(USERTYPE_BGT). | ||||||
| 				setRecipientId(apply.getUserId()). | 				setRecipientId(apply.getUserId()). | ||||||
| 				setHeadline(WgzAndBgtMessageConstant.wgzMessage(mp,"205")). | 				setHeadline(wgzMessage(mp, "205")). | ||||||
| 				setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"206")). | 				setSubheading(wgzMessage(mp, "206")). | ||||||
| 				setTableId(apply.getId()). | 				setTableId(apply.getId()). | ||||||
| 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | ||||||
| 				setMessageLargeType(BGT_LARGE). | 				setMessageLargeType(BGT_LARGE_OTHER). | ||||||
| 				setMessageSmallType(BGT_TYPE_SIGN_UP); | 				setMessageSmallType(BGT_TYPE_SIGN_UP); | ||||||
| 			if (!iBgtMessageService.sendAMessage(bgtMessage)){ | 			if (!iBgtMessageService.sendAMessage(bgtMessage)) { | ||||||
| 				throw new RuntimeException("发送报名同意消息失败!"); | 				throw new RuntimeException("发送报名同意消息失败!"); | ||||||
| 			} | 			} | ||||||
| 			return true; | 			return true; | ||||||
|  | |||||||
| @ -11,6 +11,7 @@ import com.ruoyi.bgt.domain.dto.BgtProjectRecruitApplyQueryDTO; | |||||||
| import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO; | import com.ruoyi.bgt.domain.dto.BgtProjectRecruitQueryDTO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO; | import com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtProjectRecruitDetailVO; | import com.ruoyi.bgt.domain.vo.BgtProjectRecruitDetailVO; | ||||||
|  | import com.ruoyi.bgt.domain.vo.BgtProjectRecruitDetailWgzListVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO; | import com.ruoyi.bgt.domain.vo.BgtProjectRecruitVO; | ||||||
| import com.ruoyi.bgt.mapper.BgtProjectRecruitMapper; | import com.ruoyi.bgt.mapper.BgtProjectRecruitMapper; | ||||||
| import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService; | import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService; | ||||||
| @ -22,7 +23,6 @@ import com.ruoyi.common.utils.PageUtils; | |||||||
| import com.ruoyi.common.utils.SecurityUtils; | import com.ruoyi.common.utils.SecurityUtils; | ||||||
| import com.ruoyi.fbs.domain.FbsProjectTask; | import com.ruoyi.fbs.domain.FbsProjectTask; | ||||||
| import com.ruoyi.fbs.service.IFbsProjectTaskService; | import com.ruoyi.fbs.service.IFbsProjectTaskService; | ||||||
| import com.ruoyi.wgz.bo.req.WgzAppDailyRecordReq; |  | ||||||
| import com.ruoyi.wgz.bo.req.WgzAppJobListingReq; | import com.ruoyi.wgz.bo.req.WgzAppJobListingReq; | ||||||
| import com.ruoyi.wgz.bo.req.WgzAppRegisteredProjectReq; | import com.ruoyi.wgz.bo.req.WgzAppRegisteredProjectReq; | ||||||
| import com.ruoyi.wgz.bo.res.WgzAppCancelRegistrationProjectDetailsRes; | import com.ruoyi.wgz.bo.res.WgzAppCancelRegistrationProjectDetailsRes; | ||||||
| @ -134,7 +134,7 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr | |||||||
| 			BgtProjectRecruitApplyQueryDTO bgtProjectRecruitApplyQueryDTO = new BgtProjectRecruitApplyQueryDTO(); | 			BgtProjectRecruitApplyQueryDTO bgtProjectRecruitApplyQueryDTO = new BgtProjectRecruitApplyQueryDTO(); | ||||||
| 			bgtProjectRecruitApplyQueryDTO.setRecruitIds(Collections.singletonList(vo.getId())); | 			bgtProjectRecruitApplyQueryDTO.setRecruitIds(Collections.singletonList(vo.getId())); | ||||||
| 			bgtProjectRecruitApplyQueryDTO.setStatus(applyStatus); | 			bgtProjectRecruitApplyQueryDTO.setStatus(applyStatus); | ||||||
| 			vo.setApplylist(bgtProjectRecruitApplyService.appQueryList(bgtProjectRecruitApplyQueryDTO)); | 			vo.setApplyList(bgtProjectRecruitApplyService.appQueryList(bgtProjectRecruitApplyQueryDTO)); | ||||||
| 		} | 		} | ||||||
| 		return PageUtils.buildDataInfo(queryVOPage); | 		return PageUtils.buildDataInfo(queryVOPage); | ||||||
| 	} | 	} | ||||||
| @ -145,14 +145,21 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr | |||||||
| 		BgtProjectRecruitDetailVO vo = BeanUtil.toBean(recruit, BgtProjectRecruitDetailVO.class); | 		BgtProjectRecruitDetailVO vo = BeanUtil.toBean(recruit, BgtProjectRecruitDetailVO.class); | ||||||
| 		FbsProjectTask task = fbsProjectTaskService.getById(vo.getTaskId()); | 		FbsProjectTask task = fbsProjectTaskService.getById(vo.getTaskId()); | ||||||
| 		vo.setTaskName(task.getTaskName()); | 		vo.setTaskName(task.getTaskName()); | ||||||
|  | 		return vo; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	@Override | ||||||
|  | 	public BgtProjectRecruitDetailWgzListVO wgzList(Long id) { | ||||||
|  | 		BgtProjectRecruitDetailWgzListVO vo = new BgtProjectRecruitDetailWgzListVO(); | ||||||
| 		BgtProjectRecruitApplyQueryDTO bgtProjectRecruitApplyQueryDTO = new BgtProjectRecruitApplyQueryDTO(); | 		BgtProjectRecruitApplyQueryDTO bgtProjectRecruitApplyQueryDTO = new BgtProjectRecruitApplyQueryDTO(); | ||||||
| 		bgtProjectRecruitApplyQueryDTO.setRecruitIds(Collections.singletonList(vo.getId())); | 		bgtProjectRecruitApplyQueryDTO.setRecruitIds(Collections.singletonList(id)); | ||||||
| 		bgtProjectRecruitApplyQueryDTO.setStatus(applyStatus); | 		bgtProjectRecruitApplyQueryDTO.setStatus(applyStatus); | ||||||
| 		List<BgtProjectRecruitApplyVO> bgtProjectRecruitApplyVOS = bgtProjectRecruitApplyService.appQueryList(bgtProjectRecruitApplyQueryDTO); | 		List<BgtProjectRecruitApplyVO> bgtProjectRecruitApplyVOS = bgtProjectRecruitApplyService.appQueryList(bgtProjectRecruitApplyQueryDTO); | ||||||
| 		vo.setTotalNum(bgtProjectRecruitApplyVOS.size()); | 		vo.setTotalNum(bgtProjectRecruitApplyVOS.size()); | ||||||
| 		int count = (int)bgtProjectRecruitApplyVOS.stream().filter(apply -> apply.getStatus().equals(RecruitApplyStatus.BGT_PASS.getCode())).count(); | 		int count = (int)bgtProjectRecruitApplyVOS.stream().filter(apply -> apply.getStatus().equals(RecruitApplyStatus.BGT_PASS.getCode())).count(); | ||||||
| 		vo.setPassNum(count); | 		vo.setPassNum(count); | ||||||
| 		vo.setApplylist(bgtProjectRecruitApplyVOS.subList(0, Math.min(count, 3))); | 		vo.setNotSelectNum(vo.getTotalNum()-vo.getPassNum()); | ||||||
|  | 		vo.setApplyList(bgtProjectRecruitApplyVOS.subList(0, Math.min(count, 3))); | ||||||
| 		return vo; | 		return vo; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| @ -163,6 +170,14 @@ public class BgtProjectRecruitServiceImpl extends ServicePlusImpl<BgtProjectRecr | |||||||
| 		return baseMapper.selectList(wrapper).stream().map(BgtProjectRecruit::getId).collect(Collectors.toList()); | 		return baseMapper.selectList(wrapper).stream().map(BgtProjectRecruit::getId).collect(Collectors.toList()); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	@Override | ||||||
|  | 	public Map<Long, String> getRecruitIdAndNameByTaskId(Long taskId) { | ||||||
|  | 		LambdaQueryWrapper<BgtProjectRecruit> wrapper = new LambdaQueryWrapper<>(); | ||||||
|  | 		wrapper.eq(BgtProjectRecruit::getTaskId, taskId); | ||||||
|  | 		List<BgtProjectRecruit> bgtProjectRecruits = baseMapper.selectList(wrapper); | ||||||
|  | 		return bgtProjectRecruits.stream().collect(Collectors.toMap(BgtProjectRecruit::getId,BgtProjectRecruit::getRecruitName)); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * LC-APP相关 | 	 * LC-APP相关 | ||||||
| 	 * ================================================================================================================= | 	 * ================================================================================================================= | ||||||
|  | |||||||
| @ -12,11 +12,14 @@ import com.ruoyi.bgt.domain.dto.BgtProjectTaskProgressQueryDTO; | |||||||
| import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressDetailVO; | import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressDetailVO; | ||||||
| import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressVO; | import com.ruoyi.bgt.domain.vo.BgtProjectTaskProgressVO; | ||||||
| import com.ruoyi.bgt.mapper.BgtProjectTaskProgressMapper; | import com.ruoyi.bgt.mapper.BgtProjectTaskProgressMapper; | ||||||
|  | import com.ruoyi.bgt.service.IBgtProjectRecruitApplyService; | ||||||
| import com.ruoyi.bgt.service.IBgtProjectTaskProgressService; | import com.ruoyi.bgt.service.IBgtProjectTaskProgressService; | ||||||
| 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.ProjectTaskStatus; | ||||||
| import com.ruoyi.common.utils.PageUtils; | import com.ruoyi.common.utils.PageUtils; | ||||||
| import com.ruoyi.common.utils.SecurityUtils; | import com.ruoyi.common.utils.SecurityUtils; | ||||||
|  | import com.ruoyi.fbs.domain.FbsProjectTask; | ||||||
| import com.ruoyi.fbs.service.IFbsProjectTaskService; | import com.ruoyi.fbs.service.IFbsProjectTaskService; | ||||||
| import com.ruoyi.zbf.service.IZbfProjectService; | import com.ruoyi.zbf.service.IZbfProjectService; | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
| @ -41,6 +44,9 @@ public class BgtProjectTaskProgressServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
| 	@Autowired | 	@Autowired | ||||||
| 	private IFbsProjectTaskService fbsProjectTaskService; | 	private IFbsProjectTaskService fbsProjectTaskService; | ||||||
|  |  | ||||||
|  | 	@Autowired | ||||||
|  | 	private IBgtProjectRecruitApplyService recruitApplyService; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
| @ -81,6 +87,13 @@ public class BgtProjectTaskProgressServiceImpl extends ServicePlusImpl<BgtProjec | |||||||
|     public Boolean insert(BgtProjectTaskProgress bo) { |     public Boolean insert(BgtProjectTaskProgress bo) { | ||||||
|         BgtProjectTaskProgress add = BeanUtil.toBean(bo, BgtProjectTaskProgress.class); |         BgtProjectTaskProgress add = BeanUtil.toBean(bo, BgtProjectTaskProgress.class); | ||||||
|         validEntityBeforeSave(add); |         validEntityBeforeSave(add); | ||||||
|  | 		if(add.getProgress() == 100){ | ||||||
|  | 			//更改任务状态 | ||||||
|  | 			fbsProjectTaskService.lambdaUpdate().set(FbsProjectTask::getStatus, ProjectTaskStatus.COMPLETE.getCode()) | ||||||
|  | 				.eq(FbsProjectTask::getId, add.getTaskId()).update(); | ||||||
|  | 			//批量退场 | ||||||
|  | 			recruitApplyService.quitBatch(add.getTaskId()); | ||||||
|  | 		} | ||||||
|         return save(add); |         return save(add); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | |||||||
| @ -0,0 +1,88 @@ | |||||||
|  | package com.ruoyi.common.constants; | ||||||
|  |  | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | public class BgtMessageConstant { | ||||||
|  | 	// 公共常量 | ||||||
|  |  | ||||||
|  | 	public static final String BGT_LARGE_TASK = "1";           //大类型-任务 | ||||||
|  | 	public static final String BGT_LARGE_SETTLEMENT = "2";     //大类型-结算 | ||||||
|  | 	public static final String BGT_LARGE_OTHER = "3";      //大类型-其它 | ||||||
|  |  | ||||||
|  | 	public static final String BGT_SMALL_SIGN_UP = "1";        //小类型-务工者报名 | ||||||
|  | 	public static final String BGT_SMALL_PAY = "2";            //小类型-付款 | ||||||
|  | 	public static final String BGT_SMALL_LEAVE = "3";          //小类型-请假 | ||||||
|  | 	public static final String BGT_SMALL_MAKE_UP = "4";        //小类型-补卡 | ||||||
|  | 	public static final String BGT_SMALL_SYSTEM = "5";         //小类型-系统 | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * ============================================包工头->务工者================================================== | ||||||
|  | 	 * ============================================包工头->务工者================================================== | ||||||
|  | 	 * ============================================包工头->务工者================================================== | ||||||
|  | 	 */ | ||||||
|  |  | ||||||
|  | 	//模板 | ||||||
|  | 	public static final String BGT_SIGN_UP_APPLY_HEADLINE = "您申请的【%s】项目,已得到回复!"; | ||||||
|  | 	public static final String BGT_SIGN_UP_APPLY_SUBHEADING = "您申请的【%s】项目,审核人【%s】已%s!"; | ||||||
|  | 	public static final String BGT_PAY_APPLY_HEADLINE = "您【%s】项目工资申请已审批!"; | ||||||
|  | 	public static final String BGT_PAY_APPLY_SUBHEADING = "您申请的【%s】项目工资,审核人【%s】已%s!"; | ||||||
|  | 	public static final String BGT_LEAVE_APPLY_HEADLINE = "您【%s】项目的请假申请已审批!"; | ||||||
|  | 	public static final String BGT_LEAVE_APPLY_SUBHEADING = "您【%s】项目的请假申请,审核人【%s】已%s!"; | ||||||
|  | 	public static final String BGT_LEAVE_MAKE_UP_HEADLINE = "您【%s】项目的补卡申请已审批!"; | ||||||
|  | 	public static final String BGT_LEAVE_MAKE_UP_SUBHEADING = "您【%s】项目的补卡申请,审核人【%s】已%s!"; | ||||||
|  | 	public static final String BGT_LEAVE_EXIT_HEADLINE = "您已从【%s】项目退场!"; | ||||||
|  | 	public static final String BGT_LEAVE_EXIT_SUBHEADING_ONE = "您已被【%s】指定从【%s】项目退场!"; | ||||||
|  | 	public static final String BGT_LEAVE_EXIT_SUBHEADING_TWO = "【%s】项目已完结,自动退场!"; | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 	//主副标志 | ||||||
|  | 	public static final String HEADLINE = "headline";          //主标题 | ||||||
|  | 	public static final String SUBHEADING = "subheading";      //副标题 | ||||||
|  |  | ||||||
|  | 	//消息类型 | ||||||
|  | 	public static final String BGT_TYPE_SIGN_UP = "1";    //务工者报名 | ||||||
|  | 	public static final String BGT_TYPE_PAY = "2";        //付款 | ||||||
|  | 	public static final String BGT_TYPE_LEAVE = "3";      //请假 | ||||||
|  | 	public static final String BGT_TYPE_MAKE_UP = "4";    //补卡 | ||||||
|  | 	public static final String BGT_TYPE_EXIT = "5";       //退场 | ||||||
|  |  | ||||||
|  | 	//包工头消息返回 | ||||||
|  | 	public static Map<String, String> bgtMessage(Map<String, String> mp, String type, Boolean isPass) { | ||||||
|  | 		Map<String, String> map = new HashMap<>(); | ||||||
|  | 		String pass = isPass ? "通过" : "拒绝"; | ||||||
|  | 		String projectName = mp.get("projectName"); | ||||||
|  | 		String auditor = mp.get("auditor"); | ||||||
|  | 		switch (type) { | ||||||
|  | 			case "1": | ||||||
|  | 				map.put(HEADLINE, String.format(BGT_SIGN_UP_APPLY_HEADLINE, projectName)); | ||||||
|  | 				map.put(SUBHEADING, String.format(BGT_SIGN_UP_APPLY_SUBHEADING, projectName, auditor, pass)); | ||||||
|  | 				break; | ||||||
|  | 			case "2": | ||||||
|  | 				map.put(HEADLINE, String.format(BGT_PAY_APPLY_HEADLINE, projectName)); | ||||||
|  | 				map.put(SUBHEADING, String.format(BGT_PAY_APPLY_SUBHEADING, projectName, auditor, pass)); | ||||||
|  | 				break; | ||||||
|  | 			case "3": | ||||||
|  | 				map.put(HEADLINE, String.format(BGT_LEAVE_APPLY_HEADLINE, projectName)); | ||||||
|  | 				map.put(SUBHEADING, String.format(BGT_LEAVE_APPLY_SUBHEADING, projectName, auditor, pass)); | ||||||
|  | 				break; | ||||||
|  | 			case "4": | ||||||
|  | 				map.put(HEADLINE, String.format(BGT_LEAVE_MAKE_UP_HEADLINE, projectName)); | ||||||
|  | 				map.put(SUBHEADING, String.format(BGT_LEAVE_MAKE_UP_SUBHEADING, projectName, auditor, pass)); | ||||||
|  | 				break; | ||||||
|  | 			case "5": | ||||||
|  | 				map.put(HEADLINE, String.format(BGT_LEAVE_EXIT_HEADLINE, projectName)); | ||||||
|  | 				if (isPass) { | ||||||
|  | 					map.put(SUBHEADING, String.format(BGT_LEAVE_EXIT_SUBHEADING_ONE, auditor, projectName)); | ||||||
|  | 				} else { | ||||||
|  | 					map.put(SUBHEADING, String.format(BGT_LEAVE_EXIT_SUBHEADING_TWO, projectName)); | ||||||
|  | 				} | ||||||
|  | 				break; | ||||||
|  | 			default: | ||||||
|  | 				break; | ||||||
|  | 		} | ||||||
|  | 		return map; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -1,6 +1,5 @@ | |||||||
| package com.ruoyi.common.constants; | package com.ruoyi.common.constants; | ||||||
|  |  | ||||||
| import java.util.HashMap; |  | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
|  |  | ||||||
| public class WgzAndBgtMessageConstant { | public class WgzAndBgtMessageConstant { | ||||||
| @ -8,6 +7,7 @@ public class WgzAndBgtMessageConstant { | |||||||
| 	public static final  String USERTYPE_SYSTEM = "0"; //系统 | 	public static final  String USERTYPE_SYSTEM = "0"; //系统 | ||||||
| 	public static final  String USERTYPE_WGZ = "1"; //务工者 | 	public static final  String USERTYPE_WGZ = "1"; //务工者 | ||||||
| 	public static final  String USERTYPE_BGT = "2";	//包工头 | 	public static final  String USERTYPE_BGT = "2";	//包工头 | ||||||
|  | 	public static final String USERTYPE_FBS = "3"; //分包商 | ||||||
|  |  | ||||||
| 	public static final  String LARGE_APPLY = "0"; //大类型-报名 | 	public static final  String LARGE_APPLY = "0"; //大类型-报名 | ||||||
| 	public static final  String LARGE_SALARY = "1"; //大类型-工资 | 	public static final  String LARGE_SALARY = "1"; //大类型-工资 | ||||||
| @ -15,6 +15,7 @@ public class WgzAndBgtMessageConstant { | |||||||
| 	public static final  String SMALL_CARD = "0"; //小类型-补卡 | 	public static final  String SMALL_CARD = "0"; //小类型-补卡 | ||||||
| 	public static final  String SMALL_SYSTEM = "1"; //小类型-系统 | 	public static final  String SMALL_SYSTEM = "1"; //小类型-系统 | ||||||
| 	public static final  String SMALL_EXIT = "2"; //小类型-退场 | 	public static final  String SMALL_EXIT = "2"; //小类型-退场 | ||||||
|  | 	public static final  String SMALL_LEAVE = "3"; //小类型-请假 | ||||||
|  |  | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @ -148,67 +149,6 @@ public class WgzAndBgtMessageConstant { | |||||||
| 	 * =====================================================包工头===================================================== | 	 * =====================================================包工头===================================================== | ||||||
| 	 */ | 	 */ | ||||||
|  |  | ||||||
| 	//模板 |  | ||||||
| 	public static final String BGT_SIGN_UP_APPLY_HEADLINE = "您申请的【%s】项目,已得到回复!"; |  | ||||||
| 	public static final String BGT_SIGN_UP_APPLY_SUBHEADING = "您申请的【%s】项目,审核人【%s】已%s!"; |  | ||||||
| 	public static final String BGT_PAY_APPLY_HEADLINE = "您【%s】项目工资申请已审批!"; |  | ||||||
| 	public static final String BGT_PAY_APPLY_SUBHEADING = "您申请的【%s】项目工资,审核人【%s】已%s!"; |  | ||||||
| 	public static final String BGT_LEAVE_APPLY_HEADLINE = "您【%s】项目的请假申请已审批!"; |  | ||||||
| 	public static final String BGT_LEAVE_APPLY_SUBHEADING = "您【%s】项目的请假申请,审核人【%s】已%s!"; |  | ||||||
| 	public static final String BGT_LEAVE_MAKE_UP_HEADLINE = "您【%s】项目的补卡申请已审批!"; |  | ||||||
| 	public static final String BGT_LEAVE_MAKE_UP_SUBHEADING = "您【%s】项目的补卡申请,审核人【%s】已%s!"; |  | ||||||
| 	public static final String BGT_LEAVE_EXIT_HEADLINE = "您已从【%s】项目退场!"; |  | ||||||
| 	public static final String BGT_LEAVE_EXIT_SUBHEADING_ONE = "您已被【%s】指定从【%s】项目退场!"; |  | ||||||
| 	public static final String BGT_LEAVE_EXIT_SUBHEADING_TWO = "【%s】项目已完结,自动退场!"; |  | ||||||
|  |  | ||||||
| 	//主副标志 |  | ||||||
| 	public static final String HEADLINE = "headline";          //主标题 |  | ||||||
| 	public static final String SUBHEADING = "subheading";      //副标题 |  | ||||||
|  |  | ||||||
| 	//消息类型 |  | ||||||
| 	public static final String BGT_LARGE = "3";    //大类型固定为3 |  | ||||||
| 	public static final String BGT_TYPE_SIGN_UP = "1";    //务工者报名 |  | ||||||
| 	public static final String BGT_TYPE_PAY = "2";        //付款 |  | ||||||
| 	public static final String BGT_TYPE_LEAVE = "3";      //请假 |  | ||||||
| 	public static final String BGT_TYPE_MAKE_UP = "4";    //补卡 |  | ||||||
| 	public static final String BGT_TYPE_EXIT = "5";       //退场 |  | ||||||
|  |  | ||||||
| 	//包工头消息返回 |  | ||||||
| 	public static Map<String,String> bgtMessage(Map<String, String> mp, String type,Boolean isPass) { |  | ||||||
| 		Map<String, String> map = new HashMap<>(); |  | ||||||
| 		String pass = isPass ? "通过" : "拒绝"; |  | ||||||
| 		String projectName = mp.get("projectName"); |  | ||||||
| 		String auditor = mp.get("auditor"); |  | ||||||
| 		switch (type){ |  | ||||||
| 			case "1": |  | ||||||
| 				map.put(HEADLINE, String.format(BGT_SIGN_UP_APPLY_HEADLINE, projectName)); |  | ||||||
| 				map.put(SUBHEADING, String.format(BGT_SIGN_UP_APPLY_SUBHEADING, projectName,auditor,pass)); |  | ||||||
| 				break; |  | ||||||
| 			case "2": |  | ||||||
| 				map.put(HEADLINE, String.format(BGT_PAY_APPLY_HEADLINE, projectName)); |  | ||||||
| 				map.put(SUBHEADING, String.format(BGT_PAY_APPLY_SUBHEADING, projectName,auditor,pass)); |  | ||||||
| 				break; |  | ||||||
| 			case "3": |  | ||||||
| 				map.put(HEADLINE, String.format(BGT_LEAVE_APPLY_HEADLINE, projectName)); |  | ||||||
| 				map.put(SUBHEADING, String.format(BGT_LEAVE_APPLY_SUBHEADING, projectName,auditor,pass)); |  | ||||||
| 				break; |  | ||||||
| 			case "4": |  | ||||||
| 				map.put(HEADLINE, String.format(BGT_LEAVE_MAKE_UP_HEADLINE, projectName)); |  | ||||||
| 				map.put(SUBHEADING, String.format(BGT_LEAVE_MAKE_UP_SUBHEADING, projectName,auditor,pass)); |  | ||||||
| 				break; |  | ||||||
| 			case "5": |  | ||||||
| 				map.put(HEADLINE, String.format(BGT_LEAVE_EXIT_HEADLINE, projectName)); |  | ||||||
| 				if(isPass){ |  | ||||||
| 					map.put(SUBHEADING, String.format(BGT_LEAVE_EXIT_SUBHEADING_ONE, auditor,projectName)); |  | ||||||
| 				}else { |  | ||||||
| 					map.put(SUBHEADING, String.format(BGT_LEAVE_EXIT_SUBHEADING_TWO, projectName)); |  | ||||||
| 				} |  | ||||||
| 				break; |  | ||||||
| 			default: |  | ||||||
| 				break; |  | ||||||
| 		} |  | ||||||
| 		return map; |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | |||||||
| @ -1,13 +1,14 @@ | |||||||
| package com.ruoyi.wgz.service; | package com.ruoyi.wgz.service; | ||||||
|  |  | ||||||
|  | import com.ruoyi.bgt.domain.dto.BgtLeaveUpdateDTO; | ||||||
|  | import com.ruoyi.common.core.mybatisplus.core.IServicePlus; | ||||||
|  | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
|  | import com.ruoyi.wgz.bo.WgzLeaveQueryBo; | ||||||
| import com.ruoyi.wgz.bo.req.WgzAppCancelLeaveReq; | 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.domain.WgzLeave; | import com.ruoyi.wgz.domain.WgzLeave; | ||||||
| import com.ruoyi.wgz.bo.WgzLeaveQueryBo; |  | ||||||
| import com.ruoyi.common.core.mybatisplus.core.IServicePlus; |  | ||||||
| import com.ruoyi.common.core.page.TableDataInfo; |  | ||||||
| import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||||
| import org.springframework.web.bind.annotation.RequestBody; | import org.springframework.web.bind.annotation.RequestBody; | ||||||
|  |  | ||||||
| @ -93,4 +94,10 @@ public interface IWgzLeaveService extends IServicePlus<WgzLeave> { | |||||||
| 	 * 查看指定人、指定项目、指定日期是否请假 | 	 * 查看指定人、指定项目、指定日期是否请假 | ||||||
| 	 */ | 	 */ | ||||||
| 	WgzLeave FindAskForLeaveOrNotInfo(Long appUserId, Long recruitId, String date); | 	WgzLeave FindAskForLeaveOrNotInfo(Long appUserId, Long recruitId, String date); | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * 包工头审核 | ||||||
|  | 	 */ | ||||||
|  | 	Boolean bgtAudit(BgtLeaveUpdateDTO dto); | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,40 +1,47 @@ | |||||||
| package com.ruoyi.wgz.service.impl; | package com.ruoyi.wgz.service.impl; | ||||||
|  |  | ||||||
| import cn.hutool.core.bean.BeanUtil; | import cn.hutool.core.bean.BeanUtil; | ||||||
|  | import cn.hutool.core.collection.CollectionUtil; | ||||||
| import cn.hutool.core.util.StrUtil; | import cn.hutool.core.util.StrUtil; | ||||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
| import com.baomidou.mybatisplus.core.metadata.IPage; | 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.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.BgtProjectTaskProgressQueryDTO; | import com.ruoyi.bgt.domain.dto.BgtLeaveUpdateDTO; | ||||||
| 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.utils.PageUtils; | 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.utils.PageUtils; | ||||||
| import com.ruoyi.common.utils.SecurityUtils; | import com.ruoyi.common.utils.SecurityUtils; | ||||||
|  | import com.ruoyi.wgz.bo.WgzLeaveQueryBo; | ||||||
| import com.ruoyi.wgz.bo.req.WgzAppCancelLeaveReq; | 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.domain.WgzDailyClock; | import com.ruoyi.wgz.domain.WgzAttendance; | ||||||
| import org.springframework.beans.BeanUtils; | import com.ruoyi.wgz.domain.WgzLeave; | ||||||
|  | import com.ruoyi.wgz.domain.WgzMessage; | ||||||
|  | import com.ruoyi.wgz.mapper.WgzLeaveMapper; | ||||||
|  | import com.ruoyi.wgz.service.IWgzAttendanceService; | ||||||
|  | import com.ruoyi.wgz.service.IWgzLeaveService; | ||||||
|  | import com.ruoyi.wgz.service.IWgzMessageService; | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
| import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |  | ||||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |  | ||||||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; |  | ||||||
| import com.ruoyi.wgz.bo.WgzLeaveQueryBo; |  | ||||||
| import com.ruoyi.wgz.domain.WgzLeave; |  | ||||||
| import com.ruoyi.wgz.mapper.WgzLeaveMapper; |  | ||||||
| import com.ruoyi.wgz.service.IWgzLeaveService; |  | ||||||
| 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.time.LocalTime; | import java.util.Collection; | ||||||
| import java.time.format.DateTimeFormatter; | import java.util.HashMap; | ||||||
| import java.util.*; | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  |  | ||||||
|  | import static com.ruoyi.common.constants.BgtMessageConstant.*; | ||||||
|  | import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 请假Service业务层处理 |  * 请假Service业务层处理 | ||||||
| @ -50,6 +57,12 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav | |||||||
| 	@Autowired | 	@Autowired | ||||||
| 	private IBgtProjectRecruitService iBgtProjectRecruitService; | 	private IBgtProjectRecruitService iBgtProjectRecruitService; | ||||||
|  |  | ||||||
|  | 	@Autowired | ||||||
|  | 	private IWgzMessageService wgzMessageService; | ||||||
|  |  | ||||||
|  | 	@Autowired | ||||||
|  | 	private IWgzAttendanceService attendanceService; | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public WgzLeave queryById(Long id){ |     public WgzLeave queryById(Long id){ | ||||||
|         return getById(id); |         return getById(id); | ||||||
| @ -195,4 +208,52 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav | |||||||
| 			.apply("date_format(start_time,'%Y-%m-%d') = {0}", date); | 			.apply("date_format(start_time,'%Y-%m-%d') = {0}", date); | ||||||
| 		return baseMapper.selectOne(apply); | 		return baseMapper.selectOne(apply); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	@Override | ||||||
|  | 	@Transactional(rollbackFor = Exception.class) | ||||||
|  | 	public Boolean bgtAudit(BgtLeaveUpdateDTO dto) { | ||||||
|  | 		WgzLeave wgzLeave = getById(dto.getId()); | ||||||
|  | 		BeanUtil.copyProperties(dto, wgzLeave); | ||||||
|  | 		wgzLeave.setAuditorTime(LocalDateTime.now()); | ||||||
|  | 		BgtProjectRecruit recruit = iBgtProjectRecruitService.getById(wgzLeave.getRecruitId()); | ||||||
|  |  | ||||||
|  | 		//发消息 | ||||||
|  | 		HashMap<String, String> mp = new HashMap<>(); | ||||||
|  | 		mp.put("projectName",recruit.getRecruitName()); | ||||||
|  | 		mp.put("auditor",SecurityUtils.getUsername()); | ||||||
|  | 		Map<String, String> map = bgtMessage(mp, BGT_TYPE_LEAVE, AuditStatus.PASS.getCode().equals(dto.getAuditorType())); | ||||||
|  | 		WgzMessage wgzMessage = new WgzMessage() | ||||||
|  | 			.setSenderType(USERTYPE_BGT) | ||||||
|  | 			.setRecipientType(USERTYPE_WGZ) | ||||||
|  | 			.setRecipientId(wgzLeave.getUserId()) | ||||||
|  | 			.setHeadline(map.get(HEADLINE)) | ||||||
|  | 			.setSubheading(map.get(SUBHEADING)) | ||||||
|  | 			.setTableId(wgzLeave.getId()) | ||||||
|  | 			.setTableName(SqlHelper.table(WgzLeave.class).getTableName()) | ||||||
|  | 			.setMessageLargeType(LARGE_OTHER) | ||||||
|  | 			.setMessageSmallType(SMALL_LEAVE); | ||||||
|  | 		wgzMessageService.sendAMessage(wgzMessage); | ||||||
|  |  | ||||||
|  | 		//考勤信息 | ||||||
|  | 		List<WgzAttendance> list = attendanceService.list(Wrappers.<WgzAttendance>lambdaQuery() | ||||||
|  | 			.eq(WgzAttendance::getRecruitId, recruit.getId()) | ||||||
|  | 			.eq(WgzAttendance::getUserId, wgzLeave.getUserId()) | ||||||
|  | 			.eq(WgzAttendance::getDate, wgzLeave.getStartTime().toLocalDate())); | ||||||
|  | 		if(CollectionUtil.isNotEmpty(list)){ | ||||||
|  | 			WgzAttendance wgzAttendance = list.get(0); | ||||||
|  | 			wgzAttendance.setLeaveMarkId(wgzLeave.getId()); | ||||||
|  | 			wgzAttendance.setExceptionType("7"); | ||||||
|  | 			attendanceService.updateById(wgzAttendance); | ||||||
|  | 		}else { | ||||||
|  | 			WgzAttendance wgzAttendance = new WgzAttendance(); | ||||||
|  | 			wgzAttendance.setRecruitId(recruit.getId()); | ||||||
|  | 			wgzAttendance.setUserId(wgzLeave.getUserId()); | ||||||
|  | 			wgzAttendance.setLeaveMarkId(wgzLeave.getId()); | ||||||
|  | 			wgzAttendance.setDailyWage(recruit.getRecruitAmount()); | ||||||
|  | 			wgzAttendance.setDate(wgzLeave.getStartTime().toLocalDate()); | ||||||
|  | 			wgzAttendance.setExceptionType("7"); | ||||||
|  | 			attendanceService.save(wgzAttendance); | ||||||
|  | 		} | ||||||
|  | 		return updateById(wgzLeave); | ||||||
|  | 	} | ||||||
| } | } | ||||||
|  | |||||||
| @ -6,7 +6,6 @@ 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.baomidou.mybatisplus.extension.toolkit.SqlHelper; |  | ||||||
| import com.ruoyi.bgt.domain.BgtMessage; | 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; | ||||||
| @ -34,7 +33,6 @@ import com.ruoyi.wgz.domain.WgzMessage; | |||||||
| import com.ruoyi.wgz.domain.WgzPayCalculation; | import com.ruoyi.wgz.domain.WgzPayCalculation; | ||||||
| import com.ruoyi.wgz.domain.WgzPayCalculationFiles; | import com.ruoyi.wgz.domain.WgzPayCalculationFiles; | ||||||
| import com.ruoyi.wgz.domain.WgzUser; | import com.ruoyi.wgz.domain.WgzUser; | ||||||
| import com.ruoyi.wgz.domain.*; |  | ||||||
| import com.ruoyi.wgz.mapper.WgzPayCalculationMapper; | import com.ruoyi.wgz.mapper.WgzPayCalculationMapper; | ||||||
| import com.ruoyi.wgz.service.*; | import com.ruoyi.wgz.service.*; | ||||||
| import org.springframework.beans.BeanUtils; | import org.springframework.beans.BeanUtils; | ||||||
| @ -49,11 +47,9 @@ import java.util.HashMap; | |||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
|  |  | ||||||
|  | import static com.ruoyi.common.constants.BgtMessageConstant.*; | ||||||
| import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*; | import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*; | ||||||
|  |  | ||||||
| import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*; |  | ||||||
| import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.SMALL_SYSTEM; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 工资结算Service业务层处理 |  * 工资结算Service业务层处理 | ||||||
|  * |  * | ||||||
| @ -214,8 +210,8 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat | |||||||
| 				setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"210")). | 				setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"210")). | ||||||
| 				setTableId(wgzPayCalculation.getId()). | 				setTableId(wgzPayCalculation.getId()). | ||||||
| 				setTableName(SqlHelper.table(WgzPayCalculation.class).getTableName()). | 				setTableName(SqlHelper.table(WgzPayCalculation.class).getTableName()). | ||||||
| 				setMessageLargeType(BGT_LARGE). | 				setMessageLargeType(BGT_LARGE_OTHER). | ||||||
| 				setMessageSmallType(BGT_TYPE_PAY); | 				setMessageSmallType(BGT_SMALL_PAY); | ||||||
| 			if (!iBgtMessageService.sendAMessage(bgtMessage)){ | 			if (!iBgtMessageService.sendAMessage(bgtMessage)){ | ||||||
| 				throw new RuntimeException("发送补卡消息失败!"); | 				throw new RuntimeException("发送补卡消息失败!"); | ||||||
| 			} | 			} | ||||||
| @ -261,10 +257,10 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat | |||||||
|  |  | ||||||
| 	@Override | 	@Override | ||||||
| 	public Boolean appUpdate(BgtPayCalculationUpdateDTO dto) { | 	public Boolean appUpdate(BgtPayCalculationUpdateDTO dto) { | ||||||
| 		WgzPayCalculation payCalculation = BeanUtil.copyProperties(dto, WgzPayCalculation.class); | 		WgzPayCalculation payCalculation = getById(dto.getId()); | ||||||
|  | 		BeanUtil.copyProperties(dto, payCalculation); | ||||||
| 		payCalculation.setAuditorTime(LocalDateTime.now()); | 		payCalculation.setAuditorTime(LocalDateTime.now()); | ||||||
|  |  | ||||||
| 		//发消息 |  | ||||||
| 		//发消息 | 		//发消息 | ||||||
| 		HashMap<String, String> mp = new HashMap<>(); | 		HashMap<String, String> mp = new HashMap<>(); | ||||||
| 		mp.put("projectName",iBgtProjectRecruitService.getById(payCalculation.getRecruitId()).getRecruitName()); | 		mp.put("projectName",iBgtProjectRecruitService.getById(payCalculation.getRecruitId()).getRecruitName()); | ||||||
|  | |||||||
| @ -6,7 +6,6 @@ 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.baomidou.mybatisplus.extension.toolkit.SqlHelper; |  | ||||||
| import com.ruoyi.bgt.domain.BgtMessage; | 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; | ||||||
| @ -37,10 +36,10 @@ import org.springframework.beans.factory.annotation.Autowired; | |||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
| import org.springframework.transaction.annotation.Transactional; | import org.springframework.transaction.annotation.Transactional; | ||||||
|  |  | ||||||
| import java.math.BigDecimal; |  | ||||||
| import java.time.format.DateTimeFormatter; | import java.time.format.DateTimeFormatter; | ||||||
| import java.util.*; | import java.util.*; | ||||||
|  |  | ||||||
|  | import static com.ruoyi.common.constants.BgtMessageConstant.*; | ||||||
| import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*; | import static com.ruoyi.common.constants.WgzAndBgtMessageConstant.*; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @ -207,8 +206,8 @@ public class WgzReissueacardServiceImpl extends ServicePlusImpl<WgzReissueacardM | |||||||
| 				setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"208")). | 				setSubheading(WgzAndBgtMessageConstant.wgzMessage(mp,"208")). | ||||||
| 				setTableId(wgzReissueacard.getId()). | 				setTableId(wgzReissueacard.getId()). | ||||||
| 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | 				setTableName(SqlHelper.table(BgtProjectRecruitApply.class).getTableName()). | ||||||
| 				setMessageLargeType(BGT_LARGE). | 				setMessageLargeType(BGT_TYPE_SIGN_UP). | ||||||
| 				setMessageSmallType(BGT_TYPE_MAKE_UP); | 				setMessageSmallType(BGT_SMALL_MAKE_UP); | ||||||
| 			if (!iBgtMessageService.sendAMessage(bgtMessage)){ | 			if (!iBgtMessageService.sendAMessage(bgtMessage)){ | ||||||
| 				throw new RuntimeException("发送补卡消息失败!"); | 				throw new RuntimeException("发送补卡消息失败!"); | ||||||
| 			} | 			} | ||||||
|  | |||||||
| @ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||||
|         <result property="remark" column="remark"/> |         <result property="remark" column="remark"/> | ||||||
|     </resultMap> |     </resultMap> | ||||||
|  |  | ||||||
|     <select id="queryOtherPageList" resultType="com.ruoyi.bgt.domain.vo.BgtMessageOtherVO"> |     <select id="queryOtherPageList" resultType="com.ruoyi.bgt.domain.vo.BgtMessageDetailVO"> | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | |||||||
| @ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||||
|     <select id="appQueryList" resultType="com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO"> |     <select id="appQueryList" resultType="com.ruoyi.bgt.domain.vo.BgtProjectRecruitApplyVO"> | ||||||
|         select  bpra.id, |         select  bpra.id, | ||||||
|                 bpra.entry_time, |                 bpra.entry_time, | ||||||
|  |                 bpra.recruit_id, | ||||||
|                 wu.user_id, |                 wu.user_id, | ||||||
|                 wu.phone, |                 wu.phone, | ||||||
|                 wu.score, |                 wu.score, | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 zt
					zt