Pārlūkot izejas kodu

初版-社团预约功能

xianwait 2 gadi atpakaļ
vecāks
revīzija
059f668a04
32 mainītis faili ar 2275 papildinājumiem un 133 dzēšanām
  1. 106 0
      willalp-admin/src/main/java/com/willalp/web/controller/app/AppThreeController.java
  2. 1 1
      willalp-admin/src/main/java/com/willalp/web/controller/canteen/HsCanteenDiningPlaceController.java
  3. 104 0
      willalp-admin/src/main/java/com/willalp/web/controller/clockingin/HsActivityAppointController.java
  4. 104 0
      willalp-admin/src/main/java/com/willalp/web/controller/clockingin/HsAssociationsInfoController.java
  5. 2 1
      willalp-admin/src/main/resources/application-dev.yml
  6. 1 1
      willalp-admin/src/main/resources/application.yml
  7. 37 0
      willalp-canteen/src/main/java/com/willalp/canteen/domain/HsCanteenDiningPlace.java
  8. 7 1
      willalp-canteen/src/main/java/com/willalp/canteen/mapper/xml/HsCanteenDiningPlaceMapper.xml
  9. 150 0
      willalp-clocking-in/src/main/java/com/willalp/event/domain/HsActivityAppoint.java
  10. 116 0
      willalp-clocking-in/src/main/java/com/willalp/event/domain/HsAssociationsInfo.java
  11. 81 0
      willalp-clocking-in/src/main/java/com/willalp/event/domain/HsEvent.java
  12. 67 0
      willalp-clocking-in/src/main/java/com/willalp/event/domain/vo/AppActivityAppointRecordVo.java
  13. 65 0
      willalp-clocking-in/src/main/java/com/willalp/event/domain/vo/ClubActivityMoreVo.java
  14. 33 0
      willalp-clocking-in/src/main/java/com/willalp/event/mapper/HsActivityAppointMapper.java
  15. 32 0
      willalp-clocking-in/src/main/java/com/willalp/event/mapper/HsAssociationsInfoMapper.java
  16. 18 0
      willalp-clocking-in/src/main/java/com/willalp/event/mapper/HsEventMapper.java
  17. 72 0
      willalp-clocking-in/src/main/java/com/willalp/event/mapper/xml/HsActivityAppointMapper.xml
  18. 62 0
      willalp-clocking-in/src/main/java/com/willalp/event/mapper/xml/HsAssociationsInfoMapper.xml
  19. 50 2
      willalp-clocking-in/src/main/java/com/willalp/event/mapper/xml/HsEventMapper.xml
  20. 31 0
      willalp-clocking-in/src/main/java/com/willalp/event/service/IHsActivityAppointService.java
  21. 31 0
      willalp-clocking-in/src/main/java/com/willalp/event/service/IHsAssociationsInfoService.java
  22. 17 0
      willalp-clocking-in/src/main/java/com/willalp/event/service/IHsEventService.java
  23. 41 0
      willalp-clocking-in/src/main/java/com/willalp/event/service/impl/HsActivityAppointServiceImpl.java
  24. 41 0
      willalp-clocking-in/src/main/java/com/willalp/event/service/impl/HsAssociationsInfoServiceImpl.java
  25. 22 0
      willalp-clocking-in/src/main/java/com/willalp/event/service/impl/HsEventServiceImpl.java
  26. 53 0
      willalp-ui/src/api/event/appoint.js
  27. 53 0
      willalp-ui/src/api/event/associations.js
  28. 1 1
      willalp-ui/src/components/FileUpload/index.vue
  29. 67 61
      willalp-ui/src/views/canteen/place/index.vue
  30. 377 0
      willalp-ui/src/views/event/appoint/index.vue
  31. 290 0
      willalp-ui/src/views/event/associations/index.vue
  32. 143 65
      willalp-ui/src/views/eventConfig/event/index.vue

+ 106 - 0
willalp-admin/src/main/java/com/willalp/web/controller/app/AppThreeController.java

@@ -6,11 +6,19 @@
  */
 package com.willalp.web.controller.app;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.willalp.common.core.controller.BaseController;
 import com.willalp.common.core.domain.AjaxResult;
+import com.willalp.common.core.domain.entity.SysUser;
 import com.willalp.common.core.page.TableDataInfo;
+import com.willalp.common.utils.StringUtils;
 import com.willalp.erms.service.IHsGoodsStorageService;
 import com.willalp.erms.service.IHsGoodsTypeService;
+import com.willalp.event.domain.HsActivityAppoint;
+import com.willalp.event.domain.HsEvent;
+import com.willalp.event.service.IHsActivityAppointService;
+import com.willalp.event.service.IHsAssociationsInfoService;
+import com.willalp.event.service.IHsEventService;
 import com.willalp.files.service.IHsOrgPersonnelFilesService;
 import com.willalp.flow.service.IHsFlowCcService;
 import com.willalp.system.service.ISysDeptService;
@@ -24,6 +32,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
 
 /**
  * AppThreeController
@@ -53,6 +62,15 @@ public class AppThreeController extends BaseController {
     @Resource
     private ISysDeptService deptService;
 
+    @Resource
+    private IHsEventService eventService;
+
+    @Resource
+    private IHsAssociationsInfoService associationsInfoService;
+
+    @Resource
+    private IHsActivityAppointService activityAppointService;
+
 
     @RequestMapping("/getOpfInfo")
     public AjaxResult getOpfInfo(@RequestParam String opfUserPhone) {
@@ -92,5 +110,93 @@ public class AppThreeController extends BaseController {
     public AjaxResult getPosts() {
         return AjaxResult.success(postService.selectPostAll());
     }
+
+    @RequestMapping("/clubs")
+    public AjaxResult clubs() {
+        return AjaxResult.success(associationsInfoService.appGetClubs(getUsername()));
+    }
+
+    @RequestMapping("/events")
+    public TableDataInfo events(String associationsInfoId) {
+        startPage();
+        return getDataTable(eventService.appGetEvents(associationsInfoId));
+    }
+
+    @RequestMapping("/eventOrders")
+    public TableDataInfo eventOrders() {
+        startPage();
+        return getDataTable(activityAppointService.appGetRecord(getUsername()));
+    }
+
+    @RequestMapping("/more")
+    public AjaxResult more(String eventId) {
+        return AjaxResult.success(eventService.appGetMoreById(eventId));
+    }
+
+    @RequestMapping("/eventOrder")
+    public AjaxResult eventOrder(String eventId) {
+        if (StringUtils.isBlank(eventId)) {
+            return AjaxResult.error("预约失败");
+        }
+        HsEvent hsEvent = eventService.getById(eventId);
+        if (hsEvent == null) {
+            return AjaxResult.error("活动不存在或已经结束");
+        }
+
+        //限额验证
+        Integer count = Math.toIntExact(activityAppointService.getBaseMapper().selectCount(new QueryWrapper<HsActivityAppoint>()
+                .eq("activity_id", eventId)
+                .eq("create_by", getUsername())));
+        Integer sum = Math.toIntExact(activityAppointService.getBaseMapper().selectCount(new QueryWrapper<HsActivityAppoint>()
+                .eq("activity_id", eventId)));
+        if (count > 0) {
+            return AjaxResult.error("您已经预约过了,不能重复预约");
+        }
+        if (sum < hsEvent.getLimitNum()) {
+            HsActivityAppoint activityAppoint = new HsActivityAppoint();
+            activityAppoint.setActivityId(eventId);
+            SysUser user = getLoginUser().getUser();
+            if (user == null) {
+                return AjaxResult.error("预约失败");
+            }
+            activityAppoint.setAppointeeName(user.getNickName());
+            activityAppoint.setAppointeePhone(user.getPhonenumber());
+            activityAppoint.setCreateBy(user.getUserName());
+            activityAppoint.setAppointmentTime(new Date());
+            activityAppoint.setActivityTime(hsEvent.getEventStartTime());
+            activityAppoint.setCreateTime(new Date());
+            return AjaxResult.success(activityAppointService.save(activityAppoint));
+        } else {
+            return AjaxResult.error("名额已满");
+        }
+    }
+
+    @RequestMapping("/backEventOrder")
+    public AjaxResult backEventOrder(String id) {
+        if (StringUtils.isBlank(id)) {
+            return AjaxResult.error("取消失败");
+        }
+        HsActivityAppoint appointServiceById = activityAppointService.getById(id);
+        if (appointServiceById != null && StringUtils.isNotBlank(appointServiceById.getActivityId())) {
+            HsEvent hsEvent = eventService.getById(appointServiceById.getActivityId());
+            if (hsEvent == null) {
+                return AjaxResult.error("活动不存在或已经结束");
+            }
+            //时间验证
+            Date eventEndTime = hsEvent.getEventEndTime();
+            //禁止取消预约时限
+            Integer banCancelSubscribeTimeLimit = hsEvent.getBanCancelSubscribeTimeLimit();
+            Integer limitNum = hsEvent.getLimitNum();
+            long msTime = banCancelSubscribeTimeLimit * (1000 * 60 * 60);
+            long timeMillis = System.currentTimeMillis();
+            msTime = eventEndTime.getTime() - msTime;
+            if (timeMillis < msTime && hsEvent.getLimitNum() > 0) {
+                return toAjax(activityAppointService.removeById(id));
+            } else {
+                return AjaxResult.error("已过可退时间");
+            }
+        }
+        return AjaxResult.error("取消失败");
+    }
 }
  

+ 1 - 1
willalp-admin/src/main/java/com/willalp/web/controller/canteen/HsCanteenDiningPlaceController.java

@@ -111,7 +111,7 @@ public class HsCanteenDiningPlaceController extends BaseController
     public AjaxResult edit(@RequestBody HsCanteenDiningPlace hsCanteenDiningPlace)
     {
         hsCanteenDiningPlace.setUpdateBy(SecurityUtils.getUsername());
-        return toAjax(hsCanteenDiningPlaceService.updateHsCanteenDiningPlace(hsCanteenDiningPlace));
+        return toAjax(hsCanteenDiningPlaceService.updateById(hsCanteenDiningPlace));
     }
 
     /**

+ 104 - 0
willalp-admin/src/main/java/com/willalp/web/controller/clockingin/HsActivityAppointController.java

@@ -0,0 +1,104 @@
+package com.willalp.web.controller.clockingin;
+
+import com.willalp.common.annotation.Log;
+import com.willalp.common.core.controller.BaseController;
+import com.willalp.common.core.domain.AjaxResult;
+import com.willalp.common.core.page.TableDataInfo;
+import com.willalp.common.enums.BusinessType;
+import com.willalp.common.utils.DateUtils;
+import com.willalp.common.utils.SecurityUtils;
+import com.willalp.common.utils.poi.ExcelUtil;
+import com.willalp.event.domain.HsActivityAppoint;
+import com.willalp.event.service.IHsActivityAppointService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 活动预约列Controller
+ *
+ * @author willalp
+ * @date 2023-04-04
+ */
+@RestController
+@RequestMapping("/event/appoint")
+public class HsActivityAppointController extends BaseController
+{
+    @Resource
+    private IHsActivityAppointService hsActivityAppointService;
+
+    /**
+     * 查询活动预约列列表
+     */
+    @PreAuthorize("@ss.hasPermi('event:appoint:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(HsActivityAppoint hsActivityAppoint)
+    {
+        startPage();
+        List<HsActivityAppoint> list = hsActivityAppointService.selectHsActivityAppointList(hsActivityAppoint);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出活动预约列列表
+     */
+    @PreAuthorize("@ss.hasPermi('event:appoint:export')")
+    @Log(title = "活动预约列", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(HsActivityAppoint hsActivityAppoint)
+    {
+        List<HsActivityAppoint> list = hsActivityAppointService.selectHsActivityAppointList(hsActivityAppoint);
+        ExcelUtil<HsActivityAppoint> util = new ExcelUtil<HsActivityAppoint>(HsActivityAppoint.class);
+        return util.exportExcel(list, "活动预约列数据");
+    }
+
+    /**
+     * 获取活动预约列详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('event:appoint:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return AjaxResult.success(hsActivityAppointService.getById(id));
+    }
+
+    /**
+     * 新增活动预约列
+     */
+    @PreAuthorize("@ss.hasPermi('event:appoint:add')")
+    @Log(title = "活动预约列", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody HsActivityAppoint hsActivityAppoint)
+    {
+        hsActivityAppoint.setCreateBy(SecurityUtils.getUsername());
+        hsActivityAppoint.setCreateTime(DateUtils.getNowDate());
+        return toAjax(hsActivityAppointService.save(hsActivityAppoint));
+    }
+
+    /**
+     * 修改活动预约列
+     */
+    @PreAuthorize("@ss.hasPermi('event:appoint:edit')")
+    @Log(title = "活动预约列", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody HsActivityAppoint hsActivityAppoint)
+    {
+        hsActivityAppoint.setUpdateBy(SecurityUtils.getUsername());
+        hsActivityAppoint.setUpdateTime(DateUtils.getNowDate());
+        return toAjax(hsActivityAppointService.updateById(hsActivityAppoint));
+    }
+
+    /**
+     * 删除活动预约列
+     */
+    @PreAuthorize("@ss.hasPermi('event:appoint:remove')")
+    @Log(title = "活动预约列", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids)
+    {
+        return toAjax(hsActivityAppointService.removeByIds(Arrays.asList(ids)));
+    }
+}

+ 104 - 0
willalp-admin/src/main/java/com/willalp/web/controller/clockingin/HsAssociationsInfoController.java

@@ -0,0 +1,104 @@
+package com.willalp.web.controller.clockingin;
+
+import com.willalp.common.annotation.Log;
+import com.willalp.common.core.controller.BaseController;
+import com.willalp.common.core.domain.AjaxResult;
+import com.willalp.common.core.page.TableDataInfo;
+import com.willalp.common.enums.BusinessType;
+import com.willalp.common.utils.DateUtils;
+import com.willalp.common.utils.SecurityUtils;
+import com.willalp.common.utils.poi.ExcelUtil;
+import com.willalp.event.domain.HsAssociationsInfo;
+import com.willalp.event.service.IHsAssociationsInfoService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 社团信息Controller
+ *
+ * @author willalp
+ * @date 2023-04-04
+ */
+@RestController
+@RequestMapping("/event/associations")
+public class HsAssociationsInfoController extends BaseController
+{
+    @Resource
+    private IHsAssociationsInfoService hsAssociationsInfoService;
+
+    /**
+     * 查询社团信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('event:associations:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(HsAssociationsInfo hsAssociationsInfo)
+    {
+        startPage();
+        List<HsAssociationsInfo> list = hsAssociationsInfoService.selectHsAssociationsInfoList(hsAssociationsInfo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出社团信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('event:associations:export')")
+    @Log(title = "社团信息", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(HsAssociationsInfo hsAssociationsInfo)
+    {
+        List<HsAssociationsInfo> list = hsAssociationsInfoService.selectHsAssociationsInfoList(hsAssociationsInfo);
+        ExcelUtil<HsAssociationsInfo> util = new ExcelUtil<HsAssociationsInfo>(HsAssociationsInfo.class);
+        return util.exportExcel(list, "社团信息数据");
+    }
+
+    /**
+     * 获取社团信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('event:associations:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return AjaxResult.success(hsAssociationsInfoService.getById(id));
+    }
+
+    /**
+     * 新增社团信息
+     */
+    @PreAuthorize("@ss.hasPermi('event:associations:add')")
+    @Log(title = "社团信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody HsAssociationsInfo hsAssociationsInfo)
+    {
+        hsAssociationsInfo.setCreateBy(SecurityUtils.getUsername());
+        hsAssociationsInfo.setCreateTime(DateUtils.getNowDate());
+        return toAjax(hsAssociationsInfoService.save(hsAssociationsInfo));
+    }
+
+    /**
+     * 修改社团信息
+     */
+    @PreAuthorize("@ss.hasPermi('event:associations:edit')")
+    @Log(title = "社团信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody HsAssociationsInfo hsAssociationsInfo)
+    {
+        hsAssociationsInfo.setUpdateBy(SecurityUtils.getUsername());
+        hsAssociationsInfo.setUpdateTime(DateUtils.getNowDate());
+        return toAjax(hsAssociationsInfoService.updateById(hsAssociationsInfo));
+    }
+
+    /**
+     * 删除社团信息
+     */
+    @PreAuthorize("@ss.hasPermi('event:associations:remove')")
+    @Log(title = "社团信息", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids)
+    {
+        return toAjax(hsAssociationsInfoService.removeByIds(Arrays.asList(ids)));
+    }
+}

+ 2 - 1
willalp-admin/src/main/resources/application-dev.yml

@@ -9,7 +9,8 @@ willalp:
   # 实例演示开关
   demoEnabled: true
   # 文件路径 示例( Windows配置D:/willalp/uploadPath,Linux配置 /home/willalp/uploadPath)
-  profile: /home/willalp/ml/uploadPath
+#  profile: /home/willalp/ml/uploadPath
+  profile: D:/home/willalp/ml/uploadPath
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数组计算 char 字符验证

+ 1 - 1
willalp-admin/src/main/resources/application.yml

@@ -21,7 +21,7 @@ spring:
     # 国际化资源文件路径
     basename: i18n/messages
   profiles:
-    active: prod
+    active: dev
   # 文件上传
   servlet:
     multipart:

+ 37 - 0
willalp-canteen/src/main/java/com/willalp/canteen/domain/HsCanteenDiningPlace.java

@@ -40,6 +40,19 @@ public class HsCanteenDiningPlace extends TreeEntity
     @Excel(name = "经纬坐标")
     private String coordinate;
 
+    /** 可容纳人数 */
+    @Excel(name = "可容纳人数")
+    private Integer maxMumOfPeople;
+
+    /**
+     * 地点图片地址
+     */
+    private String placeImgUrl;
+
+    /** 详情 */
+    @Excel(name = "详情")
+    private String details;
+
     /** 机构代码 */
     @Excel(name = "机构代码")
     private String jgid;
@@ -134,4 +147,28 @@ public class HsCanteenDiningPlace extends TreeEntity
     public String getId() {
         return String.valueOf(getPlaceId());
     }
+
+    public String getDetails() {
+        return details;
+    }
+
+    public void setDetails(String details) {
+        this.details = details;
+    }
+
+    public Integer getMaxMumOfPeople() {
+        return maxMumOfPeople;
+    }
+
+    public void setMaxMumOfPeople(Integer maxMumOfPeople) {
+        this.maxMumOfPeople = maxMumOfPeople;
+    }
+
+    public String getPlaceImgUrl() {
+        return placeImgUrl;
+    }
+
+    public void setPlaceImgUrl(String placeImgUrl) {
+        this.placeImgUrl = placeImgUrl;
+    }
 }

+ 7 - 1
willalp-canteen/src/main/java/com/willalp/canteen/mapper/xml/HsCanteenDiningPlaceMapper.xml

@@ -20,6 +20,9 @@
         <result property="placeSite" column="place_site"/>
         <result property="placeType" column="place_type"/>
         <result property="coordinate" column="coordinate"/>
+        <result property="maxMumOfPeople" column="max_mum_of_people"/>
+        <result property="placeImgUrl" column="place_img_url"/>
+        <result property="details" column="details"/>
     </resultMap>
 
     <sql id="selectHsCanteenDiningPlaceVo">
@@ -28,6 +31,7 @@
                ancestors,
                place_name,
                jgid,
+               place_img_url,
                is_delete,
                create_by,
                create_time,
@@ -37,7 +41,9 @@
                place_number,
                place_site,
                place_type,
-               coordinate
+               coordinate,
+               max_mum_of_people,
+               details
         from hs_canteen_dining_place
     </sql>
 

+ 150 - 0
willalp-clocking-in/src/main/java/com/willalp/event/domain/HsActivityAppoint.java

@@ -0,0 +1,150 @@
+package com.willalp.event.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.willalp.common.annotation.Excel;
+import com.willalp.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+/**
+ * 活动预约列对象 hs_activity_appoint
+ *
+ * @author willalp
+ * @date 2023-04-04
+ */
+
+@TableName("hs_activity_appoint")
+public class HsActivityAppoint extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    @TableId
+    private String id;
+
+    /** 活动日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "活动日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date activityTime;
+
+    /** 姓名 */
+    @Excel(name = "姓名")
+    private String appointeeName;
+
+    /** 手机号 */
+    @Excel(name = "手机号")
+    private String appointeePhone;
+
+    /** 预约时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "预约时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date appointmentTime;
+
+    /** 活动ID */
+    @Excel(name = "活动ID")
+    private String activityId;
+
+    /** 操作 */
+    private String operation;
+
+    /** 是否删除 */
+    @TableLogic
+    private Integer isDelete;
+
+    public void setId(String id)
+    {
+        this.id = id;
+    }
+
+    public String getId()
+    {
+        return id;
+    }
+    public void setActivityTime(Date activityTime)
+    {
+        this.activityTime = activityTime;
+    }
+
+    public Date getActivityTime()
+    {
+        return activityTime;
+    }
+    public void setAppointeeName(String appointeeName)
+    {
+        this.appointeeName = appointeeName;
+    }
+
+    public String getAppointeeName()
+    {
+        return appointeeName;
+    }
+    public void setAppointeePhone(String appointeePhone)
+    {
+        this.appointeePhone = appointeePhone;
+    }
+
+    public String getAppointeePhone()
+    {
+        return appointeePhone;
+    }
+    public void setAppointmentTime(Date appointmentTime)
+    {
+        this.appointmentTime = appointmentTime;
+    }
+
+    public Date getAppointmentTime()
+    {
+        return appointmentTime;
+    }
+    public void setActivityId(String activityId)
+    {
+        this.activityId = activityId;
+    }
+
+    public String getActivityId()
+    {
+        return activityId;
+    }
+    public void setOperation(String operation)
+    {
+        this.operation = operation;
+    }
+
+    public String getOperation()
+    {
+        return operation;
+    }
+    public void setIsDelete(Integer isDelete)
+    {
+        this.isDelete = isDelete;
+    }
+
+    public Integer getIsDelete()
+    {
+        return isDelete;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("activityTime", getActivityTime())
+            .append("appointeeName", getAppointeeName())
+            .append("appointeePhone", getAppointeePhone())
+            .append("appointmentTime", getAppointmentTime())
+            .append("activityId", getActivityId())
+            .append("remark", getRemark())
+            .append("operation", getOperation())
+            .append("createTime", getCreateTime())
+            .append("createBy", getCreateBy())
+            .append("updateTime", getUpdateTime())
+            .append("updateBy", getUpdateBy())
+            .append("isDelete", getIsDelete())
+            .toString();
+    }
+}

+ 116 - 0
willalp-clocking-in/src/main/java/com/willalp/event/domain/HsAssociationsInfo.java

@@ -0,0 +1,116 @@
+package com.willalp.event.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.willalp.common.annotation.Excel;
+import com.willalp.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 社团信息对象 hs_associations_info
+ *
+ * @author willalp
+ * @date 2023-04-04
+ */
+
+@TableName("hs_associations_info")
+public class HsAssociationsInfo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    @TableId
+    private String id;
+
+    /** 项目名称 */
+    @Excel(name = "项目名称")
+    private String projectName;
+
+    /** 社团名称 */
+    @Excel(name = "社团名称")
+    private String associationsName;
+
+    /** 成员 */
+    @Excel(name = "成员")
+    private String users;
+
+    /** 风采 */
+    @Excel(name = "风采")
+    private String mien;
+
+    /** 是否删除(0.未删除;1.已删除) */
+    private Integer isDelete;
+
+    public void setId(String id)
+    {
+        this.id = id;
+    }
+
+    public String getId()
+    {
+        return id;
+    }
+    public void setProjectName(String projectName)
+    {
+        this.projectName = projectName;
+    }
+
+    public String getProjectName()
+    {
+        return projectName;
+    }
+    public void setAssociationsName(String associationsName)
+    {
+        this.associationsName = associationsName;
+    }
+
+    public String getAssociationsName()
+    {
+        return associationsName;
+    }
+    public void setUsers(String users)
+    {
+        this.users = users;
+    }
+
+    public String getUsers()
+    {
+        return users;
+    }
+    public void setMien(String mien)
+    {
+        this.mien = mien;
+    }
+
+    public String getMien()
+    {
+        return mien;
+    }
+    public void setIsDelete(Integer isDelete)
+    {
+        this.isDelete = isDelete;
+    }
+
+    public Integer getIsDelete()
+    {
+        return isDelete;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("projectName", getProjectName())
+            .append("associationsName", getAssociationsName())
+            .append("users", getUsers())
+            .append("mien", getMien())
+            .append("isDelete", getIsDelete())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 81 - 0
willalp-clocking-in/src/main/java/com/willalp/event/domain/HsEvent.java

@@ -1,5 +1,6 @@
 package com.willalp.event.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
@@ -46,6 +47,16 @@ public class HsEvent extends BaseEntity
     @Excel(name = "事件时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date eventTime;
 
+    /** 事件开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+    @Excel(name = "事件开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date eventStartTime;
+
+    /** 事件结束时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+    @Excel(name = "事件结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date eventEndTime;
+
     /** 结束时间 */
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@@ -59,11 +70,34 @@ public class HsEvent extends BaseEntity
     /** 事件地点 */
     @Excel(name = "事件地点")
     private String eventPlace;
+    @TableField(exist = false)
+    public String eventPlaceSite;
+
+    @TableField(exist = false)
+    public String eventImgUrl;
 
     /** 事件描述 */
     @Excel(name = "事件描述")
     private String eventDescribe;
 
+    /** 禁止取消预约时限 */
+    @Excel(name = "禁止取消预约时限")
+    private Integer banCancelSubscribeTimeLimit;
+
+    /** 数量限制 */
+    @Excel(name = "数量限制")
+    private Integer limitNum;
+    @TableField(exist = false)
+    public Integer alreadyHave;
+
+    /** 活动开始前多久提示 */
+    @Excel(name = "活动开始前多久提示")
+    private Integer howLongRemind;
+
+    /** 事件项目类型ID */
+    @Excel(name = "事件项目类型ID")
+    private String activityTypeId;
+
     /** 事件状态 */
     @Excel(name = "事件状态")
     private String eventStatus;
@@ -171,4 +205,51 @@ public class HsEvent extends BaseEntity
         return isDelete;
     }
 
+    public Integer getHowLongRemind() {
+        return howLongRemind;
+    }
+
+    public void setHowLongRemind(Integer howLongRemind) {
+        this.howLongRemind = howLongRemind;
+    }
+
+    public Integer getLimitNum() {
+        return limitNum;
+    }
+
+    public void setLimitNum(Integer limitNum) {
+        this.limitNum = limitNum;
+    }
+
+    public Integer getBanCancelSubscribeTimeLimit() {
+        return banCancelSubscribeTimeLimit;
+    }
+
+    public void setBanCancelSubscribeTimeLimit(Integer banCancelSubscribeTimeLimit) {
+        this.banCancelSubscribeTimeLimit = banCancelSubscribeTimeLimit;
+    }
+
+    public Date getEventEndTime() {
+        return eventEndTime;
+    }
+
+    public void setEventEndTime(Date eventEndTime) {
+        this.eventEndTime = eventEndTime;
+    }
+
+    public Date getEventStartTime() {
+        return eventStartTime;
+    }
+
+    public void setEventStartTime(Date eventStartTime) {
+        this.eventStartTime = eventStartTime;
+    }
+
+    public String getActivityTypeId() {
+        return activityTypeId;
+    }
+
+    public void setActivityTypeId(String activityTypeId) {
+        this.activityTypeId = activityTypeId;
+    }
 }

+ 67 - 0
willalp-clocking-in/src/main/java/com/willalp/event/domain/vo/AppActivityAppointRecordVo.java

@@ -0,0 +1,67 @@
+package com.willalp.event.domain.vo;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.willalp.common.annotation.Excel;
+
+import java.util.Date;
+
+/**
+ * APP活动记录
+ *
+ * @author willalp
+ * @date 2023-01-29*/
+
+public class AppActivityAppointRecordVo{
+
+    /** 主键 */
+    private String id;
+
+    /** 事件名称 */
+    @Excel(name = "事件名称")
+    private String eventName;
+
+    /** 事件开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date eventTime;
+
+    /** 事件类型 */
+    @Excel(name = "事件类型")
+    private String eventType;
+
+    public void setId(String id)
+    {
+        this.id = id;
+    }
+
+    public String getId()
+    {
+        return id;
+    }
+
+    public void setEventName(String eventName)
+    {
+        this.eventName = eventName;
+    }
+
+    public String getEventName()
+    {
+        return eventName;
+    }
+
+    public Date getEventTime() {
+        return eventTime;
+    }
+
+    public void setEventStartTime(Date eventTime) {
+        this.eventTime = eventTime;
+    }
+
+    public String getEventType() {
+        return eventType;
+    }
+
+    public void setEventType(String eventType) {
+        this.eventType = eventType;
+    }
+}

+ 65 - 0
willalp-clocking-in/src/main/java/com/willalp/event/domain/vo/ClubActivityMoreVo.java

@@ -0,0 +1,65 @@
+/**
+ * @projectName willalp-pns-ml
+ * @package com.willalp.event.domain.vo
+ * @className com.willalp.event.domain.vo.ClubActivityMoreVo
+ * @copyright Copyright 2019 HuiShan, Inc All rights reserved.
+ */
+package com.willalp.event.domain.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.willalp.common.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * ClubActivityMoreVo
+ * @description 会助理社团活动 小程序 more 页面信息VO
+ * @author hs
+ * @date 2023/4/6 13:13
+ * @version 1.0
+ */
+@Data
+public class ClubActivityMoreVo {
+    /** 主键 */
+    private String id;
+
+    /** 事件名称 */
+    @Excel(name = "名称")
+    private String eventName;
+
+    /** 事件类型 */
+    @Excel(name = "事件类型")
+    private String eventType;
+
+    @Excel(name = "社团群组")
+    private String clubName;
+
+    /** 事件开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+    @Excel(name = "事件开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date eventStartTime;
+
+    /** 事件结束时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+    @Excel(name = "事件结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date eventEndTime;
+
+    /** 事件地点 */
+    @Excel(name = "事件地点")
+    private String eventPlace;
+
+    @Excel(name = "事件详细地点")
+    public String eventPlaceSite;
+
+    /** 数量限制 */
+    @Excel(name = "数量限制")
+    private Integer limitNum;
+
+    /** 场地详情*/
+    private String placeMore;
+
+    /** 活动风采*/
+    private String mien;
+}
+ 

+ 33 - 0
willalp-clocking-in/src/main/java/com/willalp/event/mapper/HsActivityAppointMapper.java

@@ -0,0 +1,33 @@
+package com.willalp.event.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.willalp.event.domain.HsActivityAppoint;
+import com.willalp.event.domain.vo.AppActivityAppointRecordVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 活动预约列Mapper接口
+ *
+ * @author willalp
+ * @date 2023-04-04
+ */
+public interface HsActivityAppointMapper extends BaseMapper<HsActivityAppoint>
+{
+    /**
+     * 查询活动预约列列表
+     *
+     * @param hsActivityAppoint 活动预约列
+     * @return 活动预约列集合
+     */
+    List<HsActivityAppoint> selectHsActivityAppointList(HsActivityAppoint hsActivityAppoint);
+
+    /**
+     * APP活动记录
+     *
+     * @param userCode
+     * @return
+     */
+    List<AppActivityAppointRecordVo> appGetRecord(@Param("userCode") String userCode);
+}

+ 32 - 0
willalp-clocking-in/src/main/java/com/willalp/event/mapper/HsAssociationsInfoMapper.java

@@ -0,0 +1,32 @@
+package com.willalp.event.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.willalp.event.domain.HsAssociationsInfo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 社团信息Mapper接口
+ *
+ * @author willalp
+ * @date 2023-04-04
+ */
+public interface HsAssociationsInfoMapper extends BaseMapper<HsAssociationsInfo>
+{
+    /**
+     * 查询社团信息列表
+     *
+     * @param hsAssociationsInfo 社团信息
+     * @return 社团信息集合
+     */
+    List<HsAssociationsInfo> selectHsAssociationsInfoList(HsAssociationsInfo hsAssociationsInfo);
+
+    /**
+     * app获取参加的社团
+     *
+     * @param userCode
+     * @return
+     */
+    List<HsAssociationsInfo> appGetClubs(@Param("userCode") String userCode);
+}

+ 18 - 0
willalp-clocking-in/src/main/java/com/willalp/event/mapper/HsEventMapper.java

@@ -2,6 +2,8 @@ package com.willalp.event.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.willalp.event.domain.HsEvent;
+import com.willalp.event.domain.vo.ClubActivityMoreVo;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -36,4 +38,20 @@ public interface HsEventMapper extends BaseMapper<HsEvent>
      * @return
      */
     List<HsEvent> getFormerlyEventList(HsEvent hsEvent);
+
+
+    /**
+     * app获取活动集
+     *
+     * @param associationsInfoId
+     * @return
+     */
+    List<HsEvent> appGetEvents(@Param("associationsInfoId") String associationsInfoId);
+
+    /**
+     *
+     * @param id
+     * @return
+     */
+    ClubActivityMoreVo appGetMoreById(@Param("id") String id);
 }

+ 72 - 0
willalp-clocking-in/src/main/java/com/willalp/event/mapper/xml/HsActivityAppointMapper.xml

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.willalp.event.mapper.HsActivityAppointMapper">
+
+    <resultMap type="com.willalp.event.domain.HsActivityAppoint" id="HsActivityAppointResult">
+        <result property="id" column="id"/>
+        <result property="activityTime" column="activity_time"/>
+        <result property="appointeeName" column="appointee_name"/>
+        <result property="appointeePhone" column="appointee_phone"/>
+        <result property="appointmentTime" column="appointment_time"/>
+        <result property="activityId" column="activity_id"/>
+        <result property="remark" column="remark"/>
+        <result property="operation" column="operation"/>
+        <result property="createTime" column="create_time"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="isDelete" column="is_delete"/>
+    </resultMap>
+
+    <sql id="selectHsActivityAppointVo">
+        select id,
+               activity_time,
+               appointee_name,
+               appointee_phone,
+               appointment_time,
+               activity_id,
+               remark,
+               operation,
+               create_time,
+               create_by,
+               update_time,
+               update_by,
+               is_delete
+        from hs_activity_appoint
+    </sql>
+
+    <select id="selectHsActivityAppointList" parameterType="HsActivityAppoint" resultMap="HsActivityAppointResult">
+        <include refid="selectHsActivityAppointVo"/>
+        <where>
+            is_delete = 0
+            <if test="activityTime != null ">
+                and activity_time = #{activityTime}
+            </if>
+            <if test="appointeeName != null  and appointeeName != ''">
+                and appointee_name like concat('%', #{appointeeName}, '%')
+            </if>
+            <if test="appointeePhone != null  and appointeePhone != ''">
+                and appointee_phone = #{appointeePhone}
+            </if>
+            <if test="appointmentTime != null ">
+                and appointment_time = #{appointmentTime}
+            </if>
+            <if test="activityId != null ">
+                and activity_id = #{activityId}
+            </if>
+        </where>
+    </select>
+    <select id="appGetRecord" resultType="com.willalp.event.domain.vo.AppActivityAppointRecordVo">
+        select haa.id              id,
+               he.event_name       eventName,
+               he.event_start_time eventTime,
+               hai.project_name    eventType
+        from hs_activity_appoint haa
+                 left join hs_event he on haa.activity_id = he.id
+                 left join hs_associations_info hai on hai.id = he.activity_type_id
+        WHERE haa.is_delete = 0
+          AND he.create_by = #{userCode}
+    </select>
+</mapper>

+ 62 - 0
willalp-clocking-in/src/main/java/com/willalp/event/mapper/xml/HsAssociationsInfoMapper.xml

@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.willalp.event.mapper.HsAssociationsInfoMapper">
+
+    <resultMap type="com.willalp.event.domain.HsAssociationsInfo" id="HsAssociationsInfoResult">
+        <result property="id" column="id"/>
+        <result property="projectName" column="project_name"/>
+        <result property="associationsName" column="associations_name"/>
+        <result property="users" column="users"/>
+        <result property="mien" column="mien"/>
+        <result property="isDelete" column="is_delete"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
+    </resultMap>
+
+    <sql id="selectHsAssociationsInfoVo">
+        select id,
+               project_name,
+               associations_name,
+               users,
+               mien,
+               is_delete,
+               create_by,
+               create_time,
+               update_by,
+               update_time,
+               remark
+        from hs_associations_info
+    </sql>
+
+    <select id="selectHsAssociationsInfoList" parameterType="HsAssociationsInfo" resultMap="HsAssociationsInfoResult">
+        <include refid="selectHsAssociationsInfoVo"/>
+        <where>
+            is_delete = 0
+            <if test="projectName != null  and projectName != ''">
+                and project_name like concat('%', #{projectName}, '%')
+            </if>
+            <if test="associationsName != null  and associationsName != ''">
+                and associations_name like concat('%', #{associationsName}, '%')
+            </if>
+            <if test="users != null  and users != ''">
+                and users = #{users}
+            </if>
+            <if test="mien != null  and mien != ''">
+                and mien = #{mien}
+            </if>
+        </where>
+    </select>
+    <select id="appGetClubs" resultType="com.willalp.event.domain.HsAssociationsInfo">
+        select id,
+               project_name,
+               associations_name
+        from hs_associations_info
+        where is_delete = 0
+          AND locate(#{userCode}, users)
+    </select>
+</mapper>

+ 50 - 2
willalp-clocking-in/src/main/java/com/willalp/event/mapper/xml/HsEventMapper.xml

@@ -9,22 +9,33 @@
         <result property="eventNo" column="event_no"/>
         <result property="eventName" column="event_name"/>
         <result property="startTime" column="start_time"/>
+        <result property="banCancelSubscribeTimeLimit" column="ban_cancel_subscribe_time_limit"/>
         <result property="eventTime" column="event_time"/>
+        <result property="limitNum" column="limit_num"/>
         <result property="eventType" column="event_type"/>
-        <result property="eventPlace" column="event_place"/>
         <result property="endTime" column="end_time"/>
-        <result property="eventDescribe" column="event_describe"/>
+        <result property="howLongRemind" column="how_long_remind"/>
+        <result property="eventPlace" column="event_place"/>
         <result property="eventStatus" column="event_status"/>
+        <result property="eventDescribe" column="event_describe"/>
+        <result property="eventStartTime" column="event_start_time"/>
         <result property="isDelete" column="is_delete"/>
         <result property="createBy" column="create_by"/>
+        <result property="eventEndTime" column="event_end_time"/>
         <result property="createTime" column="create_time"/>
         <result property="updateBy" column="update_by"/>
         <result property="updateTime" column="update_time"/>
+        <result property="activityTypeId" column="activity_type_id"/>
         <result property="remark" column="remark"/>
     </resultMap>
 
     <sql id="selectHsEventVo">
         select id,
+               limit_num,
+               event_start_time,
+               event_end_time,
+               how_long_remind,
+               ban_cancel_subscribe_time_limit,
                event_no,
                event_name,
                start_time,
@@ -33,6 +44,7 @@
                event_place,
                end_time,
                event_describe,
+               activity_type_id,
                event_status,
                is_delete,
                create_by,
@@ -91,5 +103,41 @@
         AND
         end_time &lt; NOW()
     </select>
+    <select id="appGetEvents" resultType="com.willalp.event.domain.HsEvent">
+        SELECT he.id,
+               limit_num,
+               event_start_time,
+               event_end_time,
+               hcdp.place_name                                                              event_place,
+               hcdp.place_site                                                              eventPlaceSite,
+               hcdp.place_img_url                                                           eventImgUrl,
+               (SELECT count(1) FROM hs_activity_appoint haa WHERE he.id = haa.activity_id) alreadyHave
+        FROM hs_event he
+                 LEFT JOIN hs_canteen_dining_place hcdp ON he.event_place = hcdp.place_id
+            AND hcdp.place_type = 4
+            AND hcdp.is_delete = 0
+        WHERE he.is_delete = 0
+          AND he.activity_type_id = #{associationsInfoId}
+    </select>
+    <select id="appGetMoreById" resultType="com.willalp.event.domain.vo.ClubActivityMoreVo">
+        SELECT he.id,
+               limit_num,
+               event_name,
+               event_start_time,
+               event_end_time,
+               hcdp.place_name       eventPlace,
+               hcdp.place_site       eventPlaceSite,
+               hcdp.details          placeMore,
+               hai.project_name      eventType,
+               hai.associations_name clubName,
+               hai.mien
+        FROM hs_event he
+                 LEFT JOIN hs_canteen_dining_place hcdp ON he.event_place = hcdp.place_id
+                 LEFT JOIN hs_associations_info hai ON hai.id = he.activity_type_id
+        WHERE he.id = #{id}
+          AND he.is_delete = 0
+          AND hai.is_delete = 0
+          AND hcdp.is_delete = 0
+    </select>
 </mapper>
 

+ 31 - 0
willalp-clocking-in/src/main/java/com/willalp/event/service/IHsActivityAppointService.java

@@ -0,0 +1,31 @@
+package com.willalp.event.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.willalp.event.domain.HsActivityAppoint;
+import com.willalp.event.domain.vo.AppActivityAppointRecordVo;
+
+import java.util.List;
+
+/**
+ * 活动预约列Service接口
+ *
+ * @author willalp
+ * @date 2023-04-04
+ */
+public interface IHsActivityAppointService extends IService<HsActivityAppoint> {
+    /**
+     * 查询活动预约列列表
+     *
+     * @param hsActivityAppoint 活动预约列
+     * @return 活动预约列集合
+     */
+    public List<HsActivityAppoint> selectHsActivityAppointList(HsActivityAppoint hsActivityAppoint);
+
+    /**
+     * APP活动记录
+     *
+     * @param userCode
+     * @return
+     */
+    List<AppActivityAppointRecordVo> appGetRecord(String userCode);
+}

+ 31 - 0
willalp-clocking-in/src/main/java/com/willalp/event/service/IHsAssociationsInfoService.java

@@ -0,0 +1,31 @@
+package com.willalp.event.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.willalp.event.domain.HsAssociationsInfo;
+
+import java.util.List;
+
+/**
+ * 社团信息Service接口
+ *
+ * @author willalp
+ * @date 2023-04-04
+ */
+public interface IHsAssociationsInfoService extends IService<HsAssociationsInfo>
+{
+    /**
+     * 查询社团信息列表
+     *
+     * @param hsAssociationsInfo 社团信息
+     * @return 社团信息集合
+     */
+    public List<HsAssociationsInfo> selectHsAssociationsInfoList(HsAssociationsInfo hsAssociationsInfo);
+
+    /**
+     * app获取参加的社团
+     *
+     * @param userCode
+     * @return
+     */
+    List<HsAssociationsInfo> appGetClubs(String userCode);
+}

+ 17 - 0
willalp-clocking-in/src/main/java/com/willalp/event/service/IHsEventService.java

@@ -2,6 +2,7 @@ package com.willalp.event.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.willalp.event.domain.HsEvent;
+import com.willalp.event.domain.vo.ClubActivityMoreVo;
 
 import java.util.List;
 
@@ -32,4 +33,20 @@ public interface IHsEventService extends IService<HsEvent> {
      * 定时更新事件状态
      */
     void timingUpdateEventStatus();
+
+    /**
+     * app获取活动集
+     *
+     * @param associationsInfoId
+     * @return
+     */
+    List<HsEvent> appGetEvents(String associationsInfoId);
+
+    /**
+     * 获取APP更多嫌弃
+     *
+     * @param eventId
+     * @return
+     */
+    ClubActivityMoreVo appGetMoreById(String eventId);
 }

+ 41 - 0
willalp-clocking-in/src/main/java/com/willalp/event/service/impl/HsActivityAppointServiceImpl.java

@@ -0,0 +1,41 @@
+package com.willalp.event.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.willalp.event.domain.HsActivityAppoint;
+import com.willalp.event.domain.vo.AppActivityAppointRecordVo;
+import com.willalp.event.mapper.HsActivityAppointMapper;
+import com.willalp.event.service.IHsActivityAppointService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 活动预约列Service业务层处理
+ *
+ * @author willalp
+ * @date 2023-04-04
+ */
+@Service
+public class HsActivityAppointServiceImpl extends ServiceImpl<HsActivityAppointMapper, HsActivityAppoint>  implements IHsActivityAppointService
+{
+    @Resource
+    private HsActivityAppointMapper hsActivityAppointMapper;
+
+    /**
+     * 查询活动预约列列表
+     *
+     * @param hsActivityAppoint 活动预约列
+     * @return 活动预约列
+     */
+    @Override
+    public List<HsActivityAppoint> selectHsActivityAppointList(HsActivityAppoint hsActivityAppoint)
+    {
+        return hsActivityAppointMapper.selectHsActivityAppointList(hsActivityAppoint);
+    }
+
+    @Override
+    public List<AppActivityAppointRecordVo> appGetRecord(String userCode) {
+        return hsActivityAppointMapper.appGetRecord(userCode);
+    }
+}

+ 41 - 0
willalp-clocking-in/src/main/java/com/willalp/event/service/impl/HsAssociationsInfoServiceImpl.java

@@ -0,0 +1,41 @@
+package com.willalp.event.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.willalp.event.domain.HsAssociationsInfo;
+import com.willalp.event.mapper.HsAssociationsInfoMapper;
+import com.willalp.event.service.IHsAssociationsInfoService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 社团信息Service业务层处理
+ *
+ * @author willalp
+ * @date 2023-04-04
+ */
+@Service
+public class HsAssociationsInfoServiceImpl extends ServiceImpl<HsAssociationsInfoMapper, HsAssociationsInfo>  implements IHsAssociationsInfoService
+{
+    @Resource
+    private HsAssociationsInfoMapper hsAssociationsInfoMapper;
+
+    /**
+     * 查询社团信息列表
+     *
+     * @param hsAssociationsInfo 社团信息
+     * @return 社团信息
+     */
+    @Override
+    public List<HsAssociationsInfo> selectHsAssociationsInfoList(HsAssociationsInfo hsAssociationsInfo)
+    {
+        return hsAssociationsInfoMapper.selectHsAssociationsInfoList(hsAssociationsInfo);
+    }
+
+    @Override
+    public List<HsAssociationsInfo> appGetClubs(String userCode) {
+        return hsAssociationsInfoMapper.appGetClubs(userCode);
+    }
+
+}

+ 22 - 0
willalp-clocking-in/src/main/java/com/willalp/event/service/impl/HsEventServiceImpl.java

@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.willalp.common.utils.StringUtils;
 import com.willalp.event.domain.HsEvent;
 import com.willalp.event.domain.HsEventBusinessRelation;
+import com.willalp.event.domain.vo.ClubActivityMoreVo;
 import com.willalp.event.mapper.HsEventMapper;
+import com.willalp.event.service.IHsAssociationsInfoService;
 import com.willalp.event.service.IHsEventBusinessRelationService;
 import com.willalp.event.service.IHsEventService;
 import org.slf4j.Logger;
@@ -82,4 +84,24 @@ public class HsEventServiceImpl extends ServiceImpl<HsEventMapper, HsEvent> impl
             logger.info("事件状态更新成功 - 共【" + sumList.size() + "】条,开始进行【" + nowEvents.size() + "】条,已结束【" + formerlyEvents.size() + "】条 ==> 已删除相关数据");
         }
     }
+
+    @Override
+    public List<HsEvent> appGetEvents(String associationsInfoId) {
+        return baseMapper.appGetEvents(associationsInfoId);
+    }
+
+    @Resource
+    private IHsAssociationsInfoService associationsInfoService;
+
+    @Override
+    public ClubActivityMoreVo appGetMoreById(String eventId) {
+        if (StringUtils.isBlank(eventId)) {
+            return null;
+        }
+        ClubActivityMoreVo clubActivityMoreVo = baseMapper.appGetMoreById(eventId);
+        if (clubActivityMoreVo == null) {
+            return null;
+        }
+        return clubActivityMoreVo;
+    }
 }

+ 53 - 0
willalp-ui/src/api/event/appoint.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询活动预约列列表
+export function listAppoint(query) {
+  return request({
+    url: '/event/appoint/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询活动预约列详细
+export function getAppoint(id) {
+  return request({
+    url: '/event/appoint/' + id,
+    method: 'get'
+  })
+}
+
+// 新增活动预约列
+export function addAppoint(data) {
+  return request({
+    url: '/event/appoint',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改活动预约列
+export function updateAppoint(data) {
+  return request({
+    url: '/event/appoint',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除活动预约列
+export function delAppoint(id) {
+  return request({
+    url: '/event/appoint/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出活动预约列
+export function exportAppoint(query) {
+  return request({
+    url: '/event/appoint/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
willalp-ui/src/api/event/associations.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询社团信息列表
+export function listAssociations(query) {
+  return request({
+    url: '/event/associations/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询社团信息详细
+export function getAssociations(id) {
+  return request({
+    url: '/event/associations/' + id,
+    method: 'get'
+  })
+}
+
+// 新增社团信息
+export function addAssociations(data) {
+  return request({
+    url: '/event/associations',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改社团信息
+export function updateAssociations(data) {
+  return request({
+    url: '/event/associations',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除社团信息
+export function delAssociations(id) {
+  return request({
+    url: '/event/associations/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出社团信息
+export function exportAssociations(query) {
+  return request({
+    url: '/event/associations/export',
+    method: 'get',
+    params: query
+  })
+}

+ 1 - 1
willalp-ui/src/components/FileUpload/index.vue

@@ -59,7 +59,7 @@ export default {
     // 文件类型, 例如['png', 'jpg', 'jpeg']
     fileType: {
       type: Array,
-      default: () => ["doc", "xls", "ppt", "txt", "pdf"],
+      default: () => ["doc", "xls", "ppt", "txt", "pdf","png","jpeg"],
     },
     // 是否显示提示
     isShowTip: {

+ 67 - 61
willalp-ui/src/views/canteen/place/index.vue

@@ -80,7 +80,7 @@
     </el-table>
 
     <!-- 添加或修改地点对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="上级目录" prop="parentId">
           <treeselect v-model="form.parentId" :options="placeOptions" :normalizer="normalizer" placeholder="请选择父id"
@@ -92,6 +92,12 @@
         <el-form-item label="具体位置" prop="placeSite">
           <el-input v-model="form.placeSite" placeholder="请输入具体位置"/>
         </el-form-item>
+        <el-form-item label="位置图片" prop="placeSite">
+          <ImageUpload v-model="form.placeImgUrl"></ImageUpload>
+        </el-form-item>
+        <el-form-item label="详情" prop="placeSite">
+          <editor v-model="form.details" :min-height="192"/>
+        </el-form-item>
         <el-form-item label="位置类型" prop="placeType">
           <el-select v-model="form.placeType" placeholder="请选择位置类型" :disabled="usFlag">
             <el-option
@@ -118,13 +124,13 @@
 </template>
 
 <script>
-import {listPlace, getPlace, delPlace, addPlace, updatePlace, exportPlace} from "@/api/canteen/place";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import user from "@/store/modules/user";
+import { listPlace, getPlace, delPlace, addPlace, updatePlace, exportPlace } from '@/api/canteen/place'
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import user from '@/store/modules/user'
 
 export default {
-  name: "Place",
+  name: 'Place',
   dicts: ['place_type'],
   components: {
     Treeselect
@@ -140,7 +146,7 @@ export default {
       // 地点树选项
       placeOptions: [],
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -153,45 +159,45 @@ export default {
       // 表单校验
       rules: {},
       usFlag: false
-    };
+    }
   },
   created() {
-    this.getList();
+    this.getList()
   },
   methods: {
     /** 查询地点列表 */
     getList() {
-      this.loading = true;
-      this.queryParams.jgid = user.state.organ;
+      this.loading = true
+      this.queryParams.jgid = user.state.organ
       listPlace(this.queryParams).then(response => {
-        this.placeList = this.handleTree(response.data, "placeId", "parentId");
-        this.loading = false;
-      });
+        this.placeList = this.handleTree(response.data, 'placeId', 'parentId')
+        this.loading = false
+      })
     },
     /** 转换地点数据结构 */
     normalizer(node) {
       if (node.children && !node.children.length) {
-        delete node.children;
+        delete node.children
       }
       return {
         id: node.placeId,
         label: node.placeName,
         children: node.children
-      };
+      }
     },
     /** 查询地点下拉树结构 */
     getTreeselect() {
-      listPlace({jgid: user.state.organ}).then(response => {
-        this.placeOptions = [];
-        const data = {placeId: 0, placeName: '顶级节点', children: []};
-        data.children = this.handleTree(response.data, "placeId", "parentId");
-        this.placeOptions.push(data);
-      });
+      listPlace({ jgid: user.state.organ }).then(response => {
+        this.placeOptions = []
+        const data = { placeId: 0, placeName: '顶级节点', children: [] }
+        data.children = this.handleTree(response.data, 'placeId', 'parentId')
+        this.placeOptions.push(data)
+      })
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.reset();
+      this.open = false
+      this.reset()
     },
     // 表单重置
     reset() {
@@ -200,77 +206,77 @@ export default {
         parentId: null,
         placeName: null,
         jgid: null
-      };
-      this.resetForm("form");
+      }
+      this.resetForm('form')
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.getList();
+      this.getList()
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
     /** 新增按钮操作 */
     handleAdd(row) {
-      this.reset();
-      this.getTreeselect();
+      this.reset()
+      this.getTreeselect()
       if (row != null && row.placeId) {
-        this.form.parentId = row.placeId;
-        this.usFlag = true;
+        this.form.parentId = row.placeId
+        this.usFlag = true
         this.form.placeType = row.placeType
       } else {
-        this.form.parentId = 0;
-        this.usFlag = false;
+        this.form.parentId = 0
+        this.usFlag = false
       }
-      this.open = true;
-      this.title = "添加地点";
-      this.form.jgid = user.state.organ;
+      this.open = true
+      this.title = '添加地点'
+      this.form.jgid = user.state.organ
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
-      this.getTreeselect();
+      this.reset()
+      this.getTreeselect()
       if (row != null) {
-        this.form.parentId = row.placeId;
+        this.form.parentId = row.placeId
       }
       getPlace(row.placeId).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改地点";
-      });
+        this.form = response.data
+        this.open = true
+        this.title = '修改地点'
+      })
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs['form'].validate(valid => {
         if (valid) {
           if (this.form.placeId != null) {
             updatePlace(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
+              this.$modal.msgSuccess('修改成功')
+              this.open = false
+              this.getList()
+            })
           } else {
             addPlace(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+              this.$modal.msgSuccess('新增成功')
+              this.open = false
+              this.getList()
+            })
           }
         }
-      });
+      })
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      this.$modal.confirm('是否确认删除地点编号为"' + row.placeId + '"的数据项?').then(function () {
-        return delPlace(row.placeId);
+      this.$modal.confirm('是否确认删除地点编号为"' + row.placeId + '"的数据项?').then(function() {
+        return delPlace(row.placeId)
       }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
+        this.getList()
+        this.$modal.msgSuccess('删除成功')
       }).catch(() => {
-      });
+      })
     }
   }
-};
+}
 </script>

+ 377 - 0
willalp-ui/src/views/event/appoint/index.vue

@@ -0,0 +1,377 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
+      <el-form-item label="活动日期" prop="activityTime">
+        <el-date-picker clearable size="small"
+          v-model="queryParams.activityTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择活动日期">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="姓名" prop="appointeeName">
+        <el-input
+          v-model="queryParams.appointeeName"
+          placeholder="请输入姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="手机号" prop="appointeePhone">
+        <el-input
+          v-model="queryParams.appointeePhone"
+          placeholder="请输入手机号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="预约时间" prop="appointmentTime">
+        <el-date-picker clearable size="small"
+          v-model="queryParams.appointmentTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择预约时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="活动ID" prop="activityId">
+        <el-input
+          v-model="queryParams.activityId"
+          placeholder="请输入活动ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['event:appoint:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['event:appoint:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['event:appoint:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['event:appoint:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="appointList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="主键" align="center" prop="id" />
+      <el-table-column label="活动日期" align="center" prop="activityTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.activityTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="姓名" align="center" prop="appointeeName" />
+      <el-table-column label="手机号" align="center" prop="appointeePhone" />
+      <el-table-column label="预约时间" align="center" prop="appointmentTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.appointmentTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="活动ID" align="center" prop="activityId" />
+      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['event:appoint:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['event:appoint:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改活动预约列对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" >
+        <el-form-item label="活动日期" prop="activityTime">
+          <el-date-picker clearable size="small"
+            v-model="form.activityTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择活动日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="姓名" prop="appointeeName">
+          <el-input v-model="form.appointeeName" placeholder="请输入姓名" />
+        </el-form-item>
+        <el-form-item label="手机号" prop="appointeePhone">
+          <el-input v-model="form.appointeePhone" placeholder="请输入手机号" />
+        </el-form-item>
+        <el-form-item label="预约时间" prop="appointmentTime">
+          <el-date-picker clearable size="small"
+            v-model="form.appointmentTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择预约时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="活动ID" prop="activityId">
+          <el-input v-model="form.activityId" placeholder="请输入活动ID" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listAppoint, getAppoint, delAppoint, addAppoint, updateAppoint, exportAppoint } from "@/api/event/appoint";
+
+export default {
+  name: "Appoint",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 活动预约列表格数据
+      appointList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        activityTime: null,
+        appointeeName: null,
+        appointeePhone: null,
+        appointmentTime: null,
+        activityId: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        activityTime: [
+          { required: true, message: "活动日期不能为空", trigger: "blur" }
+        ],
+        appointeeName: [
+          { required: true, message: "姓名不能为空", trigger: "blur" }
+        ],
+        appointeePhone: [
+          { required: true, message: "手机号不能为空", trigger: "blur" }
+        ],
+        appointmentTime: [
+          { required: true, message: "预约时间不能为空", trigger: "blur" }
+        ],
+        activityId: [
+          { required: true, message: "活动ID不能为空", trigger: "blur" }
+        ],
+        remark: [
+          { required: true, message: "备注不能为空", trigger: "blur" }
+        ],
+        operation: [
+          { required: true, message: "操作不能为空", trigger: "blur" }
+        ],
+        createTime: [
+          { required: true, message: "创建时间不能为空", trigger: "blur" }
+        ],
+        createBy: [
+          { required: true, message: "创建人不能为空", trigger: "blur" }
+        ],
+        updateTime: [
+          { required: true, message: "最后一次修改时间不能为空", trigger: "blur" }
+        ],
+        updateBy: [
+          { required: true, message: "修改人不能为空", trigger: "blur" }
+        ],
+        isDelete: [
+          { required: true, message: "是否删除不能为空", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询活动预约列列表 */
+    getList() {
+      this.loading = true;
+      listAppoint(this.queryParams).then(response => {
+        this.appointList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        activityTime: null,
+        appointeeName: null,
+        appointeePhone: null,
+        appointmentTime: null,
+        activityId: null,
+        remark: null,
+        operation: null,
+        createTime: null,
+        createBy: null,
+        updateTime: null,
+        updateBy: null,
+        isDelete: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加活动预约列";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getAppoint(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改活动预约列";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateAppoint(this.form).then(() => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addAppoint(this.form).then(() => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除活动预约列编号为"' + ids + '"的数据项?').then(function() {
+        return delAppoint(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$modal.confirm('是否确认导出所有活动预约列数据项?').then(() => {
+        this.exportLoading = true;
+        return exportAppoint(queryParams);
+      }).then(response => {
+        this.$download.name(response.msg);
+        this.exportLoading = false;
+      }).catch(() => {});
+    }
+  }
+};
+</script>

+ 290 - 0
willalp-ui/src/views/event/associations/index.vue

@@ -0,0 +1,290 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
+      <el-form-item label="项目名称" prop="projectName">
+        <el-input
+          v-model="queryParams.projectName"
+          placeholder="请输入项目名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="社团名称" prop="associationsName">
+        <el-input
+          v-model="queryParams.associationsName"
+          placeholder="请输入社团名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['event:associations:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['event:associations:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['event:associations:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['event:associations:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="associationsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="主键ID" align="center" prop="id" />
+      <el-table-column label="项目名称" align="center" prop="projectName" />
+      <el-table-column label="社团名称" align="center" prop="associationsName" />
+      <el-table-column label="成员" align="center" prop="users" />
+      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['event:associations:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['event:associations:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改社团信息对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" >
+        <el-form-item label="项目名称" prop="projectName">
+          <el-input v-model="form.projectName" placeholder="请输入项目名称" />
+        </el-form-item>
+        <el-form-item label="社团名称" prop="associationsName">
+          <el-input v-model="form.associationsName" placeholder="请输入社团名称" />
+        </el-form-item>
+        <el-form-item label="成员" prop="users">
+          <el-input v-model="form.users" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="风采">
+          <editor v-model="form.mien" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listAssociations, getAssociations, delAssociations, addAssociations, updateAssociations, exportAssociations } from "@/api/event/associations";
+
+export default {
+  name: "Associations",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 社团信息表格数据
+      associationsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        projectName: null,
+        associationsName: null,
+        users: null,
+        mien: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询社团信息列表 */
+    getList() {
+      this.loading = true;
+      listAssociations(this.queryParams).then(response => {
+        this.associationsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        projectName: null,
+        associationsName: null,
+        users: null,
+        mien: null,
+        isDelete: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加社团信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getAssociations(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改社团信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateAssociations(this.form).then(() => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addAssociations(this.form).then(() => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除社团信息编号为"' + ids + '"的数据项?').then(function() {
+        return delAssociations(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$modal.confirm('是否确认导出所有社团信息数据项?').then(() => {
+        this.exportLoading = true;
+        return exportAssociations(queryParams);
+      }).then(response => {
+        this.$download.name(response.msg);
+        this.exportLoading = false;
+      }).catch(() => {});
+    }
+  }
+};
+</script>

+ 143 - 65
willalp-ui/src/views/eventConfig/event/index.vue

@@ -38,8 +38,8 @@
           placeholder="选择执行时间">
         </el-date-picker>
       </el-form-item>
-      <!--      <el-form-item label="事件地点" prop="eventPlace">-->
-      <!--        <el-select v-model="queryParams.eventPlace" placeholder="请选择事件地点" clearable size="small">-->
+      <!--      <el-form-item label="地点" prop="eventPlace">-->
+      <!--        <el-select v-model="queryParams.eventPlace" placeholder="请选择地点" clearable size="small">-->
       <!--          <el-option label="请选择字典生成" value="" />-->
       <!--        </el-select>-->
       <!--      </el-form-item>-->
@@ -115,6 +115,19 @@
       <!--      <el-table-column label="主键" align="center" prop="id" />-->
       <el-table-column label="事件编号" align="center" prop="eventNo"/>
       <el-table-column label="事件名称" align="center" prop="eventName"/>
+      <el-table-column label="禁止取消预约时限" align="center" prop="banCancelSubscribeTimeLimit"/>
+      <el-table-column label="活动开始前多久提示" align="center" prop="howLongRemind"/>
+      <el-table-column label="数量限制" align="center" prop="limitNum"/>
+      <el-table-column label="事件开始时间" align="center" prop="eventStartTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.eventStartTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="事件结束时间" align="center" prop="eventEndTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.eventEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+        </template>
+      </el-table-column>
       <el-table-column label="开始时间" align="center" prop="startTime" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@@ -135,7 +148,12 @@
           <dict-tag :options="dict.type.event_type" :value="scope.row.eventType"/>
         </template>
       </el-table-column>
-      <el-table-column label="事件地点" align="center" prop="eventPlace" v-if="queryParams.eventStatus !== '1'"/>
+      <el-table-column label="地点" align="center" prop="eventPlace" v-if="queryParams.eventStatus !== '1'">
+        <template slot-scope="scope">
+          <treeselect v-model="scope.row.eventPlace" :options="placeOptions" :normalizer="normalizer" placeholder="请选择地点"
+                      disabled/>
+        </template>
+      </el-table-column>
       <el-table-column label="事件描述" align="center" prop="eventDescribe" v-if="queryParams.eventStatus !== '1'"/>
       <el-table-column label="事件状态" align="center" prop="eventStatus">
         <template slot-scope="scope">
@@ -189,25 +207,46 @@
         <el-form-item label="事件名称" prop="eventName">
           <el-input v-model="form.eventName" placeholder="请输入事件名称"/>
         </el-form-item>
-        <el-form-item label="开始时间" prop="startTime">
+        <el-form-item label="事件项目" prop="eventName">
+          <el-input v-model="form.activityTypeId" placeholder="请输入事件名称"/>
+        </el-form-item>
+        <el-form-item label="禁止取消预约时限" prop="banCancelSubscribeTimeLimit">
+          <el-input v-model="form.banCancelSubscribeTimeLimit" placeholder="请输入禁止取消预约时限"/>
+        </el-form-item>
+        <el-form-item label="数量限制" prop="limitNum">
+          <el-input v-model="form.limitNum" placeholder="请输入数量限制"/>
+        </el-form-item>
+        <el-form-item label="活动开始前多久提示" prop="howLongRemind">
+          <el-input v-model="form.howLongRemind" placeholder="请输入活动开始前多久提示"/>
+        </el-form-item>
+        <el-form-item label="活动开始时间" prop="startTime">
           <el-date-picker
             clearable size="small"
-            v-model="form.startTime"
+            v-model="form.eventStartTime"
             type="datetime"
             value-format="yyyy-MM-dd HH:mm:ss"
             placeholder="选择开始时间">
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="执行时间" prop="eventTime">
+        <el-form-item label="活动结束时间" prop="startTime">
           <el-date-picker
             clearable size="small"
-            v-model="form.eventTime"
+            v-model="form.eventEndTime"
             type="datetime"
             value-format="yyyy-MM-dd HH:mm:ss"
-            placeholder="选择执行时间">
+            placeholder="选择开始时间">
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="结束时间" prop="endTime">
+        <el-form-item label="预约开始时间" prop="startTime">
+          <el-date-picker
+            clearable size="small"
+            v-model="form.startTime"
+            type="datetime"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            placeholder="选择开始时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="预约结束时间" prop="endTime">
           <el-date-picker
             clearable size="small"
             v-model="form.endTime"
@@ -216,6 +255,15 @@
             placeholder="选择结束时间">
           </el-date-picker>
         </el-form-item>
+        <el-form-item label="执行时间" prop="eventTime">
+          <el-date-picker
+            clearable size="small"
+            v-model="form.eventTime"
+            type="datetime"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            placeholder="选择执行时间">
+          </el-date-picker>
+        </el-form-item>
         <el-form-item label="事件类型" prop="eventType">
           <el-select v-model="form.eventType" placeholder="请选择事件类型">
             <el-option
@@ -226,10 +274,9 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="事件地点" prop="eventPlace" v-if="queryParams.eventStatus !== '1'">
-          <el-select v-model="form.eventPlace" placeholder="请选择事件地点">
-            <el-option label="请选择字典生成" value=""/>
-          </el-select>
+        <el-form-item label="地点" prop="eventPlace" v-if="queryParams.eventStatus !== '1'">
+          <treeselect v-model="form.eventPlace" :options="placeOptions" :normalizer="normalizer"
+                      placeholder="请选择地点"/>
         </el-form-item>
         <el-form-item label="事件描述" v-if="queryParams.eventStatus !== '1'">
           <editor v-model="form.eventDescribe" :min-height="192"/>
@@ -257,13 +304,23 @@
 </template>
 
 <script>
-import {listEvent, getEvent, delEvent, addEvent, updateEvent, exportEvent} from "@/api/eventConfig/event";
+import { listEvent, getEvent, delEvent, addEvent, updateEvent, exportEvent } from '@/api/eventConfig/event'
+import { listPlace } from '@/api/canteen/place'
+import user from '@/store/modules/user'
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 
 export default {
-  name: "Event",
+  name: 'Event',
+  components: {
+    Treeselect
+  },
   dicts: ['event_type', 'event_status'],
   data() {
     return {
+
+      // 地点树选项
+      placeOptions: [],
       // 遮罩层
       loading: true,
       // 导出遮罩层
@@ -282,7 +339,7 @@ export default {
       eventList: [],
       id: '',
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -298,13 +355,13 @@ export default {
         eventPlace: null,
         eventDescribe: null,
         eventStatus: null,
-        isDelete: null,
+        isDelete: null
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {}
-    };
+    }
   },
   created() {
     // this.getList();
@@ -312,20 +369,41 @@ export default {
   methods: {
     /** 查询活动配置列表 */
     getList() {
-      this.loading = true;
+      this.loading = true
       listEvent(this.queryParams).then(response => {
-        this.eventList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
+        this.eventList = response.rows
+        this.total = response.total
+        this.loading = false
+      })
     },
     getEventId() {
-      return this.id;
+      return this.id
+    },
+    /** 查询地点下拉树结构 */
+    getTreeselect() {
+      listPlace({ jgid: user.state.organ }).then(response => {
+        this.placeOptions = []
+        const data = { placeId: 0, placeName: '顶级节点', children: [] }
+        data.children = this.handleTree(response.data, 'placeId', 'parentId')
+        this.placeOptions.push(data)
+      })
+    },
+
+    /** 转换地点数据结构 */
+    normalizer(node) {
+      if (node.children && !node.children.length) {
+        delete node.children
+      }
+      return {
+        id: node.placeId,
+        label: node.placeName,
+        children: node.children
+      }
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.reset();
+      this.open = false
+      this.reset()
     },
     // 表单重置
     reset() {
@@ -344,22 +422,22 @@ export default {
         updateBy: null,
         updateTime: null,
         remark: null
-      };
-      this.resetForm("form");
+      }
+      this.resetForm('form')
     },
     bindingGiftChild(row) {
-      this.id = row.id;
-      this.$parent.$parent.getBindingList();
+      this.id = row.id
+      this.$parent.$parent.getBindingList()
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
+      this.queryParams.pageNum = 1
+      this.getList()
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
@@ -369,63 +447,63 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加活动配置";
+      this.reset()
+      this.open = true
+      this.title = '添加活动配置'
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
+      this.reset()
       const id = row.id || this.ids
       getEvent(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改活动配置";
-      });
+        this.form = response.data
+        this.open = true
+        this.title = '修改活动配置'
+      })
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs['form'].validate(valid => {
         if (valid) {
           if (this.form.id != null) {
             updateEvent(this.form).then(() => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
+              this.$modal.msgSuccess('修改成功')
+              this.open = false
+              this.getList()
+            })
           } else {
             addEvent(this.form).then(() => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+              this.$modal.msgSuccess('新增成功')
+              this.open = false
+              this.getList()
+            })
           }
         }
-      });
+      })
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除活动配置编号为"' + ids + '"的数据项?').then(function () {
-        return delEvent(ids);
+      const ids = row.id || this.ids
+      this.$modal.confirm('是否确认删除活动配置编号为"' + ids + '"的数据项?').then(function() {
+        return delEvent(ids)
       }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
+        this.getList()
+        this.$modal.msgSuccess('删除成功')
       }).catch(() => {
-      });
+      })
     },
     /** 导出按钮操作 */
     handleExport() {
-      const queryParams = this.queryParams;
+      const queryParams = this.queryParams
       this.$modal.confirm('是否确认导出所有活动配置数据项?').then(() => {
-        this.exportLoading = true;
-        return exportEvent(queryParams);
+        this.exportLoading = true
+        return exportEvent(queryParams)
       }).then(response => {
-        this.$download.name(response.msg);
-        this.exportLoading = false;
+        this.$download.name(response.msg)
+        this.exportLoading = false
       }).catch(() => {
-      });
+      })
     }
   }
-};
+}
 </script>