diff --git a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java index 2b0d82b..8493fb0 100644 --- a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java +++ b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java @@ -14,7 +14,7 @@ import java.util.Collections; public class GeneratorCodeKingbaseConfig { private static final String PATH_LXX = "/Users/liuxinxin/IdeaProjects/project-management/pmapi/src/main/java"; - private static final String PATH_YYD = "/Users/wendy/code project/java/project-management/pmapi/src/main/java"; + private static final String PATH_YYD = "/Users/wendy/coding/java/project-management/pmapi/src/main/java"; private static final String PATH_LS = ""; private static final String PATH_ZPF = "D:\\ningda\\project-management\\pmapi\\src\\main\\java"; private static final String PATH_CMM = "D:\\work\\project-management\\project-management\\pmapi\\src\\main\\java"; @@ -57,7 +57,7 @@ public class GeneratorCodeKingbaseConfig { public static void main(String[] args) { //generate("Liuxinxin", "expert", PATH_LXX, "expert_gov_business_strip"); - generate("CMM", "test", PATH_CMM, "nd_performance_appraisal_app_indicator"); + generate("CMM", "meeting", PATH_YYD, "meeting_expert_judge"); } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingExpertJudgeController.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingExpertJudgeController.java new file mode 100644 index 0000000..5aaed94 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingExpertJudgeController.java @@ -0,0 +1,41 @@ +package com.ningdatech.pmapi.meeting.controller; + + +import com.ningdatech.pmapi.meeting.entity.req.MeetingExpertJudgeReq; +import com.ningdatech.pmapi.meeting.manage.MeetingExpertJudgeManage; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; + +/** + *
+ * 前端控制器 + *
+ * + * @author WendyYang + * @since 2023-07-31 + */ +@Api(tags = "履职评价管理") +@AllArgsConstructor +@RestController +@RequestMapping("/api/v1/meeting/expert-judge") +public class MeetingExpertJudgeController { + + private final MeetingExpertJudgeManage expertJudgeManage; + + @ApiOperation("保存履职评价") + @PostMapping("/submit") + public void saveExpertJudge(@Valid @RequestBody MeetingExpertJudgeReq req) { + expertJudgeManage.saveExpertJudge(req); + } + + @ApiOperation("查看履职评价") + @GetMapping("/detail/{meetingExpertId}") + public MeetingExpertJudgeReq expertJudgeDetail(@PathVariable Long meetingExpertId) { + return expertJudgeManage.expertJudgeDetail(meetingExpertId); + } + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingExpertJudge.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingExpertJudge.java new file mode 100644 index 0000000..8eeb308 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/domain/MeetingExpertJudge.java @@ -0,0 +1,63 @@ +package com.ningdatech.pmapi.meeting.entity.domain; + +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *+ * 会议专家履职评价表 + *
+ * + * @author WendyYang + * @since 2023-07-31 + */ +@Data +@TableName("meeting_expert_judge") +@ApiModel(value = "MeetingExpertJudge对象") +public class MeetingExpertJudge implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(type = IdType.AUTO) + private Long id; + + @ApiModelProperty("会议ID") + private Long meetingId; + + @ApiModelProperty("会议专家ID") + private Long meetingExpertId; + + @ApiModelProperty("评分(1~10)") + private Integer score; + + @ApiModelProperty("是否参加:1 准时、2 迟到、3 缺席") + private Integer attended; + + @ApiModelProperty("参与程度:1 积极、2 消极") + private Integer performance; + + @ApiModelProperty("是否提出建议:true 是、false 否") + private Boolean advised; + + @ApiModelProperty("是否早退:true 早退、false 未早退") + private Boolean leaveEarly; + + @ApiModelProperty("是否违规:true 是、false 否") + private Boolean brokeRule; + + @ApiModelProperty("违规内容") + private String brokeRuleContent; + + @TableField(fill = FieldFill.INSERT) + private Long createBy; + + @TableField(fill = FieldFill.INSERT) + private LocalDateTime createOn; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingAndAttendStatusDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingAndAttendStatusDTO.java index 9991234..bf2fca7 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingAndAttendStatusDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingAndAttendStatusDTO.java @@ -15,6 +15,10 @@ public class MeetingAndAttendStatusDTO { private Long meetingId; + private Long meetingExpertId; + + private Long expertId; + private Integer status; private Boolean attended; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingExpertJudgeReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingExpertJudgeReq.java new file mode 100644 index 0000000..7cf802c --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/req/MeetingExpertJudgeReq.java @@ -0,0 +1,61 @@ +package com.ningdatech.pmapi.meeting.entity.req; + +import com.alibaba.fastjson.annotation.JSONField; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.time.LocalDateTime; + +/** + *+ * MeetingExpertJudgeReq + *
+ * + * @author WendyYang + * @since 2023/7/31 + **/ +@Data +public class MeetingExpertJudgeReq { + + private Long id; + + @NotNull(message = "会议ID不能为空") + private Long meetingId; + + @NotNull(message = "会议专家ID不能为空") + private Long meetingExpertId; + + @ApiModelProperty("评分(1~10)") + @NotNull(message = "评分不能为空") + private Integer score; + + @ApiModelProperty("是否参加:1 准时、2 迟到、3 缺席") + @NotNull(message = "是否参加不能为空") + private Integer attended; + + @ApiModelProperty("参与程度:1 积极、2 消极") + @NotNull(message = "参与度不能为空") + private Integer performance; + + @ApiModelProperty("是否提出建议:true 是、false 否") + @NotNull(message = "是否提出建议不能为空") + private Boolean advised; + + @ApiModelProperty("是否早退:true 早退、false 未早退") + @NotNull(message = "是否早退不能为空") + private Boolean leaveEarly; + + @ApiModelProperty("是否违规:true 是、false 否") + @NotNull(message = "是否违规不能为空") + private Boolean brokeRule; + + @ApiModelProperty("违规内容") + private String brokeRuleContent; + + @JSONField(format = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createOn; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingByManagerVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingByManagerVO.java index 5c6e43a..c502c6e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingByManagerVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/vo/MeetingByManagerVO.java @@ -29,6 +29,9 @@ public class MeetingByManagerVO { @ApiModelProperty("会议ID") private Long meetingId; + @ApiModelProperty("会议专家ID") + private Long meetingExpertId; + @ApiModelProperty("会议开始时间") @JSONField(format = "yyyy-MM-dd HH:mm") private LocalDateTime startTime; @@ -70,4 +73,7 @@ public class MeetingByManagerVO { @ApiModelProperty("联系方式") private String contact; + @ApiModelProperty("是否评价") + private Boolean hasJudge; + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingExpertJudgeManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingExpertJudgeManage.java new file mode 100644 index 0000000..323eda3 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingExpertJudgeManage.java @@ -0,0 +1,80 @@ +package com.ningdatech.pmapi.meeting.manage; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.ningdatech.basic.exception.BizException; +import com.ningdatech.cache.lock.DistributedLock; +import com.ningdatech.pmapi.meeting.entity.domain.Meeting; +import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert; +import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpertJudge; +import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum; +import com.ningdatech.pmapi.meeting.entity.enumeration.MeetingStatusEnum; +import com.ningdatech.pmapi.meeting.entity.req.MeetingExpertJudgeReq; +import com.ningdatech.pmapi.meeting.service.IMeetingExpertJudgeService; +import com.ningdatech.pmapi.meeting.service.IMeetingExpertService; +import com.ningdatech.pmapi.meeting.service.IMeetingService; +import lombok.AllArgsConstructor; +import org.springframework.stereotype.Component; + +/** + *+ * MeetingExpertJudgeManage + *
+ * + * @author WendyYang + * @since 2023/7/31 + **/ +@Component +@AllArgsConstructor +public class MeetingExpertJudgeManage { + + private final IMeetingExpertJudgeService expertJudgeService; + private final IMeetingExpertService meetingExpertService; + private final IMeetingService meetingService; + private final DistributedLock distributedLock; + + private MeetingExpertJudge getMeetingExpertJudge(Long meetingExpertId) { + LambdaQueryWrapper+ * Mapper 接口 + *
+ * + * @author CMM + * @since 2023-07-31 + */ +public interface MeetingExpertJudgeMapper extends BaseMapper