Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master'

tjf 7 сар өмнө
parent
commit
79b36c5543
56 өөрчлөгдсөн 4929 нэмэгдсэн , 268 устгасан
  1. 4 0
      ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
  2. 104 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/clock/ClockHolidaysController.java
  3. 50 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/clock/ClockRecordController.java
  4. 24 19
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/clock/ClockUserInfoController.java
  5. 13 0
      ruoyi-common/pom.xml
  6. 90 11
      ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
  7. 6 0
      ruoyi-system/pom.xml
  8. 84 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/ClockHolidays.java
  9. 71 38
      ruoyi-system/src/main/java/com/ruoyi/system/domain/ClockRecord.java
  10. 23 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/ClockUserInfo.java
  11. 68 10
      ruoyi-system/src/main/java/com/ruoyi/system/domain/DutySchedule.java
  12. 63 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClockHolidaysMapper.java
  13. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/DutyScheduleMapper.java
  14. 61 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IClockHolidaysService.java
  15. 12 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IClockRecordService.java
  16. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IClockUserInfoService.java
  17. 96 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClockHolidaysServiceImpl.java
  18. 552 75
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClockRecordServiceImpl.java
  19. 59 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClockUserInfoServiceImpl.java
  20. 58 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/Task.java
  21. 96 0
      ruoyi-system/src/main/resources/mapper/system/ClockHolidaysMapper.xml
  22. 32 22
      ruoyi-system/src/main/resources/mapper/system/ClockRecordMapper.xml
  23. 1 0
      ruoyi-system/src/main/resources/mapper/system/ClockUserInfoMapper.xml
  24. 26 2
      ruoyi-system/src/main/resources/mapper/system/DutyScheduleMapper.xml
  25. 1 1
      ruoyi-ui/src/api/system/dict/type.js
  26. 44 0
      ruoyi-ui/src/api/system/foodRecord.js
  27. 44 0
      ruoyi-ui/src/api/system/in.js
  28. 44 0
      ruoyi-ui/src/api/system/menuFood.js
  29. 44 0
      ruoyi-ui/src/api/tongj/config.js
  30. BIN
      ruoyi-ui/src/assets/images/icon_yqht_ssjk_lb_normal.png
  31. BIN
      ruoyi-ui/src/assets/images/icon_yqht_xzsp_bzsp.png
  32. BIN
      ruoyi-ui/src/assets/images/pic_bzsp_btbg.png
  33. BIN
      ruoyi-ui/src/assets/images/pic_bzsp_cpbjb_bg.png
  34. BIN
      ruoyi-ui/src/assets/images/pic_bzsp_cpbjb_xqbg.png
  35. BIN
      ruoyi-ui/src/assets/images/pic_bzsp_dbbg.png
  36. BIN
      ruoyi-ui/src/assets/images/pic_bzsp_ymbg.png
  37. BIN
      ruoyi-ui/src/assets/images/pic_bzsp_z1.png
  38. BIN
      ruoyi-ui/src/assets/images/pic_bzsp_z2.png
  39. BIN
      ruoyi-ui/src/assets/images/pic_bzsp_z3.png
  40. BIN
      ruoyi-ui/src/assets/images/pic_bzsp_z4.png
  41. BIN
      ruoyi-ui/src/assets/images/pic_bzsp_z5.png
  42. BIN
      ruoyi-ui/src/assets/images/pic_bzsp_z6.png
  43. BIN
      ruoyi-ui/src/assets/images/pic_bzsp_z7.png
  44. 14 1
      ruoyi-ui/src/main.js
  45. 1 1
      ruoyi-ui/src/settings.js
  46. 2 2
      ruoyi-ui/src/views/index.vue
  47. 1084 0
      ruoyi-ui/src/views/tongj/configss/index.vue
  48. 175 8
      ruoyi-ui/src/views/tongj/food/index.vue
  49. 509 0
      ruoyi-ui/src/views/tongj/foodRecord/index.vue
  50. 181 12
      ruoyi-ui/src/views/tongj/foodme/index.vue
  51. 421 0
      ruoyi-ui/src/views/tongj/in/index.vue
  52. 598 0
      ruoyi-ui/src/views/tongj/menuFood/index.vue
  53. 15 3
      ruoyi-ui/src/views/tongj/order/index.vue
  54. 16 4
      ruoyi-ui/src/views/tongj/orderme/index.vue
  55. 99 38
      ruoyi-ui/src/views/tongj/record/index.vue
  56. 40 21
      ruoyi-ui/src/views/tongj/shebe/index.vue

+ 4 - 0
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java

@@ -3,12 +3,16 @@ package com.ruoyi;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.annotation.EnableScheduling;
 
 /**
  * 启动程序
  * 
  * @author ruoyi
  */
+@EnableAsync
+@EnableScheduling
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
 public class RuoYiApplication
 {

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/clock/ClockHolidaysController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.web.controller.clock;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.ClockHolidays;
+import com.ruoyi.system.service.IClockHolidaysService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 节假日时间Controller
+ *
+ * @author boman
+ * @date 2024-11-27
+ */
+@RestController
+@RequestMapping("/system/holidays")
+public class ClockHolidaysController extends BaseController
+{
+    @Autowired
+    private IClockHolidaysService clockHolidaysService;
+
+/**
+ * 查询节假日时间列表
+ */
+@PreAuthorize("@ss.hasPermi('system:holidays:list')")
+@GetMapping("/list")
+    public TableDataInfo list(ClockHolidays clockHolidays)
+    {
+        startPage();
+        List<ClockHolidays> list = clockHolidaysService.selectClockHolidaysList(clockHolidays);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出节假日时间列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:holidays:export')")
+    @Log(title = "节假日时间", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ClockHolidays clockHolidays)
+    {
+        List<ClockHolidays> list = clockHolidaysService.selectClockHolidaysList(clockHolidays);
+        ExcelUtil<ClockHolidays> util = new ExcelUtil<ClockHolidays>(ClockHolidays.class);
+        util.exportExcel(response, list, "节假日时间数据");
+    }
+
+    /**
+     * 获取节假日时间详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:holidays:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(clockHolidaysService.selectClockHolidaysById(id));
+    }
+
+    /**
+     * 新增节假日时间
+     */
+    @PreAuthorize("@ss.hasPermi('system:holidays:add')")
+    @Log(title = "节假日时间", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ClockHolidays clockHolidays)
+    {
+        return toAjax(clockHolidaysService.insertClockHolidays(clockHolidays));
+    }
+
+    /**
+     * 修改节假日时间
+     */
+    @PreAuthorize("@ss.hasPermi('system:holidays:edit')")
+    @Log(title = "节假日时间", businessType = BusinessType.UPDATE)
+    @PostMapping("/put")
+    public AjaxResult edit(@RequestBody ClockHolidays clockHolidays)
+    {
+        return toAjax(clockHolidaysService.updateClockHolidays(clockHolidays));
+    }
+
+    /**
+     * 删除节假日时间
+     */
+    @PreAuthorize("@ss.hasPermi('system:holidays:remove')")
+    @Log(title = "节假日时间", businessType = BusinessType.DELETE)
+    @GetMapping("/delete/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(clockHolidaysService.deleteClockHolidaysByIds(ids));
+    }
+}

+ 50 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/clock/ClockRecordController.java

@@ -1,8 +1,10 @@
 package com.ruoyi.web.controller.clock;
 
 import java.util.List;
+import java.util.Map;
 import javax.servlet.http.HttpServletResponse;
 
+import com.ruoyi.system.domain.ClockUserInfo;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -54,6 +56,16 @@ public class ClockRecordController extends BaseController {
         return clockRecordService.selectClockRecordListRl(clockRecord);
     }
 
+
+    /**
+     * 查询打卡记录(只给当天的第一天和最后一条)
+     */
+    @PreAuthorize("@ss.hasPermi('system:clock:info')")
+    @GetMapping("/info")
+    public AjaxResult info(ClockRecord clockRecord) {
+        return clockRecordService.selectClockRecordListInfo(clockRecord);
+    }
+
     /**
      * 导出打卡记录列表
      */
@@ -104,4 +116,42 @@ public class ClockRecordController extends BaseController {
     public AjaxResult remove(@PathVariable Long[] clockIds) {
         return toAjax(clockRecordService.deleteClockRecordByClockIds(clockIds));
     }
+
+    /**
+     * 个人月打卡记录统计
+     */
+    @PreAuthorize("@ss.hasPermi('system:clock:personage:month')")
+    @GetMapping("/personage/month")
+    public AjaxResult personage(ClockRecord clockRecord) {
+        return clockRecordService.personage(clockRecord);
+    }
+
+    /**
+     * 月打卡记录统计
+     */
+    @PreAuthorize("@ss.hasPermi('system:clock:all:month')")
+    @GetMapping("/all/month")
+    public TableDataInfo all(ClockUserInfo clockUserInfo) {
+        List<Map<String,Object>> listMap = clockRecordService.all(clockUserInfo);
+        return getDataTable(listMap);
+    }
+
+    /**
+     * 打卡人员异常统计
+     */
+    @PreAuthorize("@ss.hasPermi('system:clock:abnormal')")
+    @GetMapping("/abnormal")
+    public AjaxResult abnormal(ClockRecord clockRecord) {
+        return clockRecordService.abnormal(clockRecord);
+    }
+
+    /**
+     * 个人打卡异常详情(pc用)
+     *
+     */
+    @PreAuthorize("@ss.hasPermi('system:clock:details')")
+    @GetMapping("/pc/details")
+    public AjaxResult details(ClockRecord clockRecord) {
+        return clockRecordService.details(clockRecord);
+    }
 }

+ 24 - 19
ruoyi-admin/src/main/java/com/ruoyi/web/controller/clock/ClockUserInfoController.java

@@ -2,6 +2,7 @@ package com.ruoyi.web.controller.clock;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -29,18 +30,16 @@ import com.ruoyi.common.core.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/system/info")
-public class ClockUserInfoController extends BaseController
-{
+public class ClockUserInfoController extends BaseController {
     @Autowired
     private IClockUserInfoService clockUserInfoService;
 
-/**
- * 查询打卡人员信息列表
- */
-@PreAuthorize("@ss.hasPermi('system:info:list')")
-@GetMapping("/list")
-    public TableDataInfo list(ClockUserInfo clockUserInfo)
-    {
+    /**
+     * 查询打卡人员信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:info:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ClockUserInfo clockUserInfo) {
         startPage();
         List<ClockUserInfo> list = clockUserInfoService.selectClockUserInfoList(clockUserInfo);
         return getDataTable(list);
@@ -52,8 +51,7 @@ public class ClockUserInfoController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:info:export')")
     @Log(title = "打卡人员信息", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, ClockUserInfo clockUserInfo)
-    {
+    public void export(HttpServletResponse response, ClockUserInfo clockUserInfo) {
         List<ClockUserInfo> list = clockUserInfoService.selectClockUserInfoList(clockUserInfo);
         ExcelUtil<ClockUserInfo> util = new ExcelUtil<ClockUserInfo>(ClockUserInfo.class);
         util.exportExcel(response, list, "打卡人员信息数据");
@@ -64,8 +62,7 @@ public class ClockUserInfoController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:info:query')")
     @GetMapping(value = "/{userId}")
-    public AjaxResult getInfo(@PathVariable("userId") Long userId)
-    {
+    public AjaxResult getInfo(@PathVariable("userId") Long userId) {
         return success(clockUserInfoService.selectClockUserInfoByUserId(userId));
     }
 
@@ -75,8 +72,7 @@ public class ClockUserInfoController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:info:add')")
     @Log(title = "打卡人员信息", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody ClockUserInfo clockUserInfo)
-    {
+    public AjaxResult add(@RequestBody ClockUserInfo clockUserInfo) {
         return toAjax(clockUserInfoService.insertClockUserInfo(clockUserInfo));
     }
 
@@ -86,8 +82,7 @@ public class ClockUserInfoController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:info:edit')")
     @Log(title = "打卡人员信息", businessType = BusinessType.UPDATE)
     @PostMapping("/put")
-    public AjaxResult edit(@RequestBody ClockUserInfo clockUserInfo)
-    {
+    public AjaxResult edit(@RequestBody ClockUserInfo clockUserInfo) {
         return toAjax(clockUserInfoService.updateClockUserInfo(clockUserInfo));
     }
 
@@ -97,8 +92,18 @@ public class ClockUserInfoController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:info:remove')")
     @Log(title = "打卡人员信息", businessType = BusinessType.DELETE)
     @GetMapping("/delete/{userIds}")
-    public AjaxResult remove(@PathVariable Long[] userIds)
-    {
+    public AjaxResult remove(@PathVariable Long[] userIds) {
         return toAjax(clockUserInfoService.deleteClockUserInfoByUserIds(userIds));
     }
+
+    /**
+     * 查询打卡人员打卡信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:info:record:list')")
+    @GetMapping("/record/list")
+    public TableDataInfo recordList(ClockUserInfo clockUserInfo) {
+        startPage();
+        List<ClockUserInfo> list = clockUserInfoService.selectClockUserInfoRecordList(clockUserInfo);
+        return getDataTable(list);
+    }
 }

+ 13 - 0
ruoyi-common/pom.xml

@@ -143,6 +143,19 @@
             <version>1.1.3</version>
         </dependency>
 
+        <dependency>
+            <groupId>org.jsoup</groupId>
+            <artifactId>jsoup</artifactId>
+            <version>1.8.3</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</artifactId>
+            <version>3.9.0</version>
+        </dependency>
+
+
     </dependencies>
 
 </project>

+ 90 - 11
ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java

@@ -8,9 +8,7 @@ import java.time.temporal.TemporalAdjusters;
 import java.time.*;
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAdjusters;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 import java.util.List;
 import java.util.stream.Collectors;
@@ -61,6 +59,16 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
         return dateTimeNow(YYYY_MM_DD);
     }
 
+    /**
+     * 获取当前日期, 默认格式为yyyy
+     *
+     * @return String
+     */
+    public static String getYear()
+    {
+        return dateTimeNow(YYYY);
+    }
+
     public static final String getTime()
     {
         return dateTimeNow(YYYY_MM_DD_HH_MM_SS);
@@ -271,14 +279,6 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
 
 
 
-
-    public static void main(String[] args) {
-        List<String> strings = weekList();
-        for (String string : strings) {
-            System.out.println(string);
-        }
-    }
-
     /**
      * 增加 Date  ==> LocalDate
      */
@@ -303,4 +303,83 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
         }
         return dateList;
     }
+
+    /**
+     * 判断当前日期是星期几
+     *
+     * @param pTime 修要判断的时间
+     * @return dayForWeek 判断结果
+     * @Exception 发生异常
+     */
+
+    public static int dayForWeek(String pTime) throws Exception {
+
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+
+        Calendar c = Calendar.getInstance();
+
+        c.setTime(format.parse(pTime));
+
+        int dayForWeek = 0;
+
+        if (c.get(Calendar.DAY_OF_WEEK) == 1) {
+
+            dayForWeek = 7;
+
+        } else {
+
+            dayForWeek = c.get(Calendar.DAY_OF_WEEK) - 1;
+
+        }
+
+        return dayForWeek;
+
+    }
+
+    /******
+     * 获取两个日期中间的所有日期
+     * @param start
+     * @param end
+     * @return
+     */
+    public static List<Date> getDatesBetween(String start, String end) {
+        List<Date> dates = new ArrayList<>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        try {
+            Date startDate = sdf.parse(start);
+            Date endDate = sdf.parse(end);
+
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTime(startDate);
+
+            while (!calendar.getTime().after(endDate)) {
+                dates.add(calendar.getTime());
+                calendar.add(Calendar.DAY_OF_MONTH, 1);
+            }
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+
+        return dates;
+    }
+
+    /**
+     * 判断两个日期相差的天数
+     *  str2 - str1
+     * @return
+     */
+    public static int compare(String str1,String str2)
+    {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        try {
+            Date date1 = sdf.parse(str1);
+            Date date2 = sdf.parse(str2);
+            return differentDaysByMillisecond(date1, date2);
+        } catch (ParseException e) {
+            e.printStackTrace();
+            return 0;
+        }
+
+    }
+
 }

+ 6 - 0
ruoyi-system/pom.xml

@@ -23,6 +23,12 @@
             <artifactId>ruoyi-common</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+
     </dependencies>
 
 </project>

+ 84 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/ClockHolidays.java

@@ -0,0 +1,84 @@
+package com.ruoyi.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 节假日时间对象 clock_holidays
+ * 
+ * @author boman
+ * @date 2024-11-27
+ */
+public class ClockHolidays extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private Long id;
+
+    /** 年份 */
+    @Excel(name = "年份")
+    private String year;
+
+    /** 日期(yyyy-mm-dd) */
+    @Excel(name = "日期", readConverterExp = "y=yyy-mm-dd")
+    private String holidayDate;
+
+    /** 是否补班 YES:补班,NO:放假 */
+    @Excel(name = "是否补班 YES:补班,NO:放假")
+    private String type;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setYear(String year) 
+    {
+        this.year = year;
+    }
+
+    public String getYear() 
+    {
+        return year;
+    }
+    public void setHolidayDate(String holidayDate) 
+    {
+        this.holidayDate = holidayDate;
+    }
+
+    public String getHolidayDate() 
+    {
+        return holidayDate;
+    }
+    public void setType(String type) 
+    {
+        this.type = type;
+    }
+
+    public String getType() 
+    {
+        return type;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("year", getYear())
+            .append("holidayDate", getHolidayDate())
+            .append("type", getType())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 71 - 38
ruoyi-system/src/main/java/com/ruoyi/system/domain/ClockRecord.java

@@ -38,28 +38,39 @@ public class ClockRecord extends BaseEntity
     @Excel(name = "人员身份证号")
     private String idCard;
 
+    /** 打卡记录完整时间(yyyy-MM-dd HH:mm:ss) */
+    @Excel(name = "打卡记录完整时间")
+    private String recordDt;
+
     /** 打卡记录日期(yyyy-mm-dd) */
     @Excel(name = "打卡记录日期")
+    private String recordDate;
+
+    /** 打卡记录时间(HH:mm:ss) */
+    @Excel(name = "打卡记录时间")
     private String recordTime;
 
+    /** 打卡地点 */
+    @Excel(name = "打卡地点")
+    private String recordLocations;
+
     /** 周几(1:星期一,2:星期二,3:星期三,4:星期四,5:星期五,6:星期六,7:星期日) */
     @Excel(name = "周几", readConverterExp = "1=星期一,2=星期二,3=星期三,4=星期四,5=星期五,6=星期六,7=星期日")
     private String week;
 
-    /** 上班打卡时间 */
-    @Excel(name = "上班打卡时间")
-    private String workingTime;
-
-    /** 下班打卡时间 */
-    @Excel(name = "下班打卡时间")
-    private String dutyTime;
-
     private String startTime;
 
     private String endTime;
 
-    /** 是否打卡 N:否,Y:是*/
-    @Excel(name = "是否打卡", readConverterExp = "N=否,Y=是")
+    /** 打卡情况  1:正常打卡,2:外勤打卡,3:迟到,4:早退*/
+    @Excel(name = "打卡情况", readConverterExp = "1=正常打卡,2=外勤打卡,3=迟到,4=早退")
+    private String isOutwork;
+
+    /** 图片地址*/
+    private String pictureUrl;
+
+    /** 上班,下班打卡 1:上班,2:下班*/
+    @Excel(name = "上班,下班打卡", readConverterExp = "1=上班,2=下班")
     private String type;
 
     public void setClockId(Long clockId) 
@@ -125,23 +136,29 @@ public class ClockRecord extends BaseEntity
     {
         return recordTime;
     }
-    public void setWorkingTime(String workingTime) 
-    {
-        this.workingTime = workingTime;
+
+    public String getRecordDt() {
+        return recordDt;
     }
 
-    public String getWorkingTime() 
-    {
-        return workingTime;
+    public void setRecordDt(String recordDt) {
+        this.recordDt = recordDt;
     }
-    public void setDutyTime(String dutyTime) 
-    {
-        this.dutyTime = dutyTime;
+
+    public String getRecordDate() {
+        return recordDate;
     }
 
-    public String getDutyTime() 
-    {
-        return dutyTime;
+    public void setRecordDate(String recordDate) {
+        this.recordDate = recordDate;
+    }
+
+    public String getIsOutwork() {
+        return isOutwork;
+    }
+
+    public void setIsOutwork(String isOutwork) {
+        this.isOutwork = isOutwork;
     }
 
     public String getStartTime() {
@@ -176,23 +193,39 @@ public class ClockRecord extends BaseEntity
         this.week = week;
     }
 
+    public String getPictureUrl() {
+        return pictureUrl;
+    }
+
+    public void setPictureUrl(String pictureUrl) {
+        this.pictureUrl = pictureUrl;
+    }
+
+    public String getRecordLocations() {
+        return recordLocations;
+    }
+
+    public void setRecordLocations(String recordLocations) {
+        this.recordLocations = recordLocations;
+    }
+
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("clockId", getClockId())
-            .append("userId", getUserId())
-            .append("deptName", getDeptName())
-            .append("userName", getUserName())
-            .append("phonenumber", getPhonenumber())
-            .append("idCard", getIdCard())
-            .append("recordTime", getRecordTime())
-            .append("workingTime", getWorkingTime())
-            .append("dutyTime", getDutyTime())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
+        return "ClockRecord{" +
+                "clockId=" + clockId +
+                ", userId=" + userId +
+                ", deptName=" + deptName +
+                ", userName='" + userName + '\'' +
+                ", phonenumber='" + phonenumber + '\'' +
+                ", idCard='" + idCard + '\'' +
+                ", recordDt='" + recordDt + '\'' +
+                ", recordDate='" + recordDate + '\'' +
+                ", recordTime='" + recordTime + '\'' +
+                ", week='" + week + '\'' +
+                ", startTime='" + startTime + '\'' +
+                ", endTime='" + endTime + '\'' +
+                ", isOutwork='" + isOutwork + '\'' +
+                ", type='" + type + '\'' +
+                '}';
     }
 }

+ 23 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/ClockUserInfo.java

@@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
+import java.util.Map;
+
 /**
  * 打卡人员信息对象 clock_user_info
  * 
@@ -41,6 +43,11 @@ public class ClockUserInfo extends BaseEntity
     /** 删除标志(0代表存在 2代表删除) */
     private String delFlag;
 
+    private Map<String,Object> clockMap;
+
+    /** 日期(yyyy-mm) */
+    private String recordDate;
+
     public void setUserId(Long userId) 
     {
         this.userId = userId;
@@ -105,6 +112,22 @@ public class ClockUserInfo extends BaseEntity
         return delFlag;
     }
 
+    public Map<String, Object> getClockMap() {
+        return clockMap;
+    }
+
+    public void setClockMap(Map<String, Object> clockMap) {
+        this.clockMap = clockMap;
+    }
+
+    public String getRecordDate() {
+        return recordDate;
+    }
+
+    public void setRecordDate(String recordDate) {
+        this.recordDate = recordDate;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 68 - 10
ruoyi-system/src/main/java/com/ruoyi/system/domain/DutySchedule.java

@@ -18,6 +18,25 @@ public class DutySchedule extends BaseEntity
     /** id */
     private Long dutyId;
 
+    /** 经度 */
+    @Excel(name = "经度")
+    private String lon;
+
+    /** 纬度 */
+    @Excel(name = "纬度")
+    private String lat;
+
+    /** 打卡中心地点 */
+    @Excel(name = "打卡中心地点")
+    private String locations;
+
+    /** 打卡范围,单位米 */
+    @Excel(name = "打卡范围")
+    private String distance;
+
+    /** 外勤打卡是否需要拍照 N:否,Y:是 */
+    private String isPicture;
+
     /** 上班时间 */
     @Excel(name = "上班时间")
     private String startWorkTime;
@@ -54,17 +73,56 @@ public class DutySchedule extends BaseEntity
         return endWorkTime;
     }
 
+    public String getLon() {
+        return lon;
+    }
+
+    public void setLon(String lon) {
+        this.lon = lon;
+    }
+
+    public String getLat() {
+        return lat;
+    }
+
+    public void setLat(String lat) {
+        this.lat = lat;
+    }
+
+    public String getDistance() {
+        return distance;
+    }
+
+    public void setDistance(String distance) {
+        this.distance = distance;
+    }
+
+    public String getIsPicture() {
+        return isPicture;
+    }
+
+    public void setIsPicture(String isPicture) {
+        this.isPicture = isPicture;
+    }
+
+    public String getLocations() {
+        return locations;
+    }
+
+    public void setLocations(String locations) {
+        this.locations = locations;
+    }
+
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("dutyId", getDutyId())
-            .append("startWorkTime", getStartWorkTime())
-            .append("endWorkTime", getEndWorkTime())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
+        return "DutySchedule{" +
+                "dutyId=" + dutyId +
+                ", lon='" + lon + '\'' +
+                ", lat='" + lat + '\'' +
+                ", distance='" + distance + '\'' +
+                ", isPicture='" + isPicture + '\'' +
+                ", startWorkTime='" + startWorkTime + '\'' +
+                ", endWorkTime='" + endWorkTime + '\'' +
+                '}';
     }
 }

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClockHolidaysMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.ClockHolidays;
+
+/**
+ * 节假日时间Mapper接口
+ * 
+ * @author boman
+ * @date 2024-11-27
+ */
+public interface ClockHolidaysMapper 
+{
+    /**
+     * 查询节假日时间
+     * 
+     * @param id 节假日时间主键
+     * @return 节假日时间
+     */
+    public ClockHolidays selectClockHolidaysById(Long id);
+
+    /**
+     * 查询节假日时间列表
+     * 
+     * @param clockHolidays 节假日时间
+     * @return 节假日时间集合
+     */
+    public List<ClockHolidays> selectClockHolidaysList(ClockHolidays clockHolidays);
+
+    /**
+     * 新增节假日时间
+     * 
+     * @param clockHolidays 节假日时间
+     * @return 结果
+     */
+    public int insertClockHolidays(ClockHolidays clockHolidays);
+
+    /**
+     * 修改节假日时间
+     * 
+     * @param clockHolidays 节假日时间
+     * @return 结果
+     */
+    public int updateClockHolidays(ClockHolidays clockHolidays);
+
+    /**
+     * 删除节假日时间
+     * 
+     * @param id 节假日时间主键
+     * @return 结果
+     */
+    public int deleteClockHolidaysById(Long id);
+
+    /**
+     * 批量删除节假日时间
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteClockHolidaysByIds(Long[] ids);
+
+    List<ClockHolidays> selectClockHolidaysMonthList(ClockHolidays clockHoliday);
+}

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/DutyScheduleMapper.java

@@ -58,4 +58,6 @@ public interface DutyScheduleMapper
      * @return 结果
      */
     public int deleteDutyScheduleByDutyIds(Long[] dutyIds);
+
+    DutySchedule selectDutyScheduleByDutyNew();
 }

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IClockHolidaysService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.ClockHolidays;
+
+/**
+ * 节假日时间Service接口
+ * 
+ * @author boman
+ * @date 2024-11-27
+ */
+public interface IClockHolidaysService 
+{
+    /**
+     * 查询节假日时间
+     * 
+     * @param id 节假日时间主键
+     * @return 节假日时间
+     */
+    public ClockHolidays selectClockHolidaysById(Long id);
+
+    /**
+     * 查询节假日时间列表
+     * 
+     * @param clockHolidays 节假日时间
+     * @return 节假日时间集合
+     */
+    public List<ClockHolidays> selectClockHolidaysList(ClockHolidays clockHolidays);
+
+    /**
+     * 新增节假日时间
+     * 
+     * @param clockHolidays 节假日时间
+     * @return 结果
+     */
+    public int insertClockHolidays(ClockHolidays clockHolidays);
+
+    /**
+     * 修改节假日时间
+     * 
+     * @param clockHolidays 节假日时间
+     * @return 结果
+     */
+    public int updateClockHolidays(ClockHolidays clockHolidays);
+
+    /**
+     * 批量删除节假日时间
+     * 
+     * @param ids 需要删除的节假日时间主键集合
+     * @return 结果
+     */
+    public int deleteClockHolidaysByIds(Long[] ids);
+
+    /**
+     * 删除节假日时间信息
+     * 
+     * @param id 节假日时间主键
+     * @return 结果
+     */
+    public int deleteClockHolidaysById(Long id);
+}

+ 12 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IClockRecordService.java

@@ -1,9 +1,11 @@
 package com.ruoyi.system.service;
 
 import java.util.List;
+import java.util.Map;
 
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.system.domain.ClockRecord;
+import com.ruoyi.system.domain.ClockUserInfo;
 
 /**
  * 打卡记录Service接口
@@ -64,4 +66,14 @@ public interface IClockRecordService
     AjaxResult selectClockRecordListRl(ClockRecord clockRecord);
 
     AjaxResult kqdc();
+
+    AjaxResult selectClockRecordListInfo(ClockRecord clockRecord);
+
+    AjaxResult personage(ClockRecord clockRecord);
+
+    List<Map<String,Object>> all(ClockUserInfo clockUserInfo);
+
+    AjaxResult abnormal(ClockRecord clockRecord);
+
+    AjaxResult details(ClockRecord clockRecord);
 }

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IClockUserInfoService.java

@@ -58,4 +58,6 @@ public interface IClockUserInfoService
      * @return 结果
      */
     public int deleteClockUserInfoByUserId(Long userId);
+
+    List<ClockUserInfo> selectClockUserInfoRecordList(ClockUserInfo clockUserInfo);
 }

+ 96 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClockHolidaysServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.ClockHolidaysMapper;
+import com.ruoyi.system.domain.ClockHolidays;
+import com.ruoyi.system.service.IClockHolidaysService;
+
+/**
+ * 节假日时间Service业务层处理
+ * 
+ * @author boman
+ * @date 2024-11-27
+ */
+@Service
+public class ClockHolidaysServiceImpl implements IClockHolidaysService 
+{
+    @Autowired
+    private ClockHolidaysMapper clockHolidaysMapper;
+
+    /**
+     * 查询节假日时间
+     * 
+     * @param id 节假日时间主键
+     * @return 节假日时间
+     */
+    @Override
+    public ClockHolidays selectClockHolidaysById(Long id)
+    {
+        return clockHolidaysMapper.selectClockHolidaysById(id);
+    }
+
+    /**
+     * 查询节假日时间列表
+     * 
+     * @param clockHolidays 节假日时间
+     * @return 节假日时间
+     */
+    @Override
+    public List<ClockHolidays> selectClockHolidaysList(ClockHolidays clockHolidays)
+    {
+        return clockHolidaysMapper.selectClockHolidaysList(clockHolidays);
+    }
+
+    /**
+     * 新增节假日时间
+     * 
+     * @param clockHolidays 节假日时间
+     * @return 结果
+     */
+    @Override
+    public int insertClockHolidays(ClockHolidays clockHolidays)
+    {
+        clockHolidays.setCreateTime(DateUtils.getNowDate());
+        return clockHolidaysMapper.insertClockHolidays(clockHolidays);
+    }
+
+    /**
+     * 修改节假日时间
+     * 
+     * @param clockHolidays 节假日时间
+     * @return 结果
+     */
+    @Override
+    public int updateClockHolidays(ClockHolidays clockHolidays)
+    {
+        clockHolidays.setUpdateTime(DateUtils.getNowDate());
+        return clockHolidaysMapper.updateClockHolidays(clockHolidays);
+    }
+
+    /**
+     * 批量删除节假日时间
+     * 
+     * @param ids 需要删除的节假日时间主键
+     * @return 结果
+     */
+    @Override
+    public int deleteClockHolidaysByIds(Long[] ids)
+    {
+        return clockHolidaysMapper.deleteClockHolidaysByIds(ids);
+    }
+
+    /**
+     * 删除节假日时间信息
+     * 
+     * @param id 节假日时间主键
+     * @return 结果
+     */
+    @Override
+    public int deleteClockHolidaysById(Long id)
+    {
+        return clockHolidaysMapper.deleteClockHolidaysById(id);
+    }
+}

+ 552 - 75
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClockRecordServiceImpl.java

@@ -1,108 +1,132 @@
 package com.ruoyi.system.service.impl;
 
+import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
 
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysRole;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.PageUtils;
+import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.system.domain.ClockUserInfo;
-import com.ruoyi.system.domain.OrderFood;
-import com.ruoyi.system.mapper.ClockUserInfoMapper;
-import com.ruoyi.system.mapper.OrderFoodMapper;
+import com.ruoyi.system.domain.*;
+import com.ruoyi.system.mapper.*;
+import lombok.SneakyThrows;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.ruoyi.system.mapper.ClockRecordMapper;
-import com.ruoyi.system.domain.ClockRecord;
 import com.ruoyi.system.service.IClockRecordService;
 
 /**
  * 打卡记录Service业务层处理
- * 
+ *
  * @author ruoyi
  * @date 2024-08-06
  */
 @Service
-public class ClockRecordServiceImpl implements IClockRecordService 
-{
+public class ClockRecordServiceImpl implements IClockRecordService {
     @Autowired
     private ClockRecordMapper clockRecordMapper;
     @Autowired
     private ClockUserInfoMapper clockUserInfoMapper;
     @Autowired
     private OrderFoodMapper orderFoodMapper;
+    @Autowired
+    private DutyScheduleMapper dutyScheduleMapper;
+    @Autowired
+    private ClockHolidaysMapper clockHolidaysMapper;
 
     /**
      * 查询打卡记录
-     * 
+     *
      * @param clockId 打卡记录主键
      * @return 打卡记录
      */
     @Override
-    public ClockRecord selectClockRecordByClockId(Long clockId)
-    {
+    public ClockRecord selectClockRecordByClockId(Long clockId) {
         return clockRecordMapper.selectClockRecordByClockId(clockId);
     }
 
     /**
      * 查询打卡记录列表
-     * 
+     *
      * @param clockRecord 打卡记录
      * @return 打卡记录
      */
     @Override
-    public List<ClockRecord> selectClockRecordList(ClockRecord clockRecord)
-    {
+    public List<ClockRecord> selectClockRecordList(ClockRecord clockRecord) {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        List<SysRole> roles = user.getRoles();
+        boolean bl = true;
+        for (SysRole role : roles) {
+            if ("admin".equals(role.getRoleKey()) || "administrators".equals(role.getRoleKey())) {
+                bl = false;
+            }
+        }
+        if (bl) {
+            clockRecord.setUserId(user.getUserId());
+        }
         return clockRecordMapper.selectClockRecordList(clockRecord);
     }
 
     /**
      * 新增打卡记录
-     * 
+     *
      * @param clockRecord 打卡记录
      * @return 结果
      */
     @Override
-    public int insertClockRecord(ClockRecord clockRecord)
-    {
+    public int insertClockRecord(ClockRecord clockRecord) {
+        SysUser user = SecurityUtils.getLoginUser().getUser();
+        clockRecord.setUserId(user.getUserId());
+        clockRecord.setUserName(user.getNickName());
+        clockRecord.setPhonenumber(user.getPhonenumber());
+        /*String[] dt = clockRecord.getRecordDt().split(" ");
+        clockRecord.setRecordDate(dt[0]);
+        clockRecord.setRecordTime(dt[1]);*/
+        //判断传入的时间是周几
+        try {
+            int dayForWeek = DateUtils.dayForWeek(clockRecord.getRecordDate());
+            clockRecord.setWeek(String.valueOf(dayForWeek));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
         clockRecord.setCreateTime(DateUtils.getNowDate());
         return clockRecordMapper.insertClockRecord(clockRecord);
     }
 
     /**
      * 修改打卡记录
-     * 
+     *
      * @param clockRecord 打卡记录
      * @return 结果
      */
     @Override
-    public int updateClockRecord(ClockRecord clockRecord)
-    {
+    public int updateClockRecord(ClockRecord clockRecord) {
         clockRecord.setUpdateTime(DateUtils.getNowDate());
         return clockRecordMapper.updateClockRecord(clockRecord);
     }
 
     /**
      * 批量删除打卡记录
-     * 
+     *
      * @param clockIds 需要删除的打卡记录主键
      * @return 结果
      */
     @Override
-    public int deleteClockRecordByClockIds(Long[] clockIds)
-    {
+    public int deleteClockRecordByClockIds(Long[] clockIds) {
         return clockRecordMapper.deleteClockRecordByClockIds(clockIds);
     }
 
     /**
      * 删除打卡记录信息
-     * 
+     *
      * @param clockId 打卡记录主键
      * @return 结果
      */
     @Override
-    public int deleteClockRecordByClockId(Long clockId)
-    {
+    public int deleteClockRecordByClockId(Long clockId) {
         return clockRecordMapper.deleteClockRecordByClockId(clockId);
     }
 
@@ -111,55 +135,77 @@ public class ClockRecordServiceImpl implements IClockRecordService
         Map<String, Object> resultMap = new HashMap<>();
         //查询人员数据
         ClockUserInfo clockUserInfo = clockUserInfoMapper.selectClockUserInfoByUserId(clockRecord.getUserId());
-        resultMap.put("name",clockUserInfo.getUserName());
+        resultMap.put("name", clockUserInfo.getUserName());
         //查询最新打卡数据
         ClockRecord clockRecordNew = clockRecordMapper.selectClockRecordNew(clockRecord);
-        resultMap.put("time",clockRecordNew.getRecordTime());
+        resultMap.put("time", clockRecordNew.getRecordDate());
         //todo 上下班时间
-        resultMap.put("workTime","");
+        DutySchedule dutySchedule = dutyScheduleMapper.selectDutyScheduleByDutyNew();
+        resultMap.put("workTime", dutySchedule.getStartWorkTime() + " - " + dutySchedule.getEndWorkTime());
         //查询查询月打卡数据
         List<ClockRecord> clockRecords = clockRecordMapper.selectOrderFoodListRl(clockRecord);
         //按日期分类
         Map<String, List<ClockRecord>> clockTime = new HashMap<>();
-        if (clockRecords != null && clockRecords.size() > 0){
-            clockTime = clockRecords.stream().collect(Collectors.groupingBy(ClockRecord::getRecordTime));
+        if (clockRecords != null && clockRecords.size() > 0) {
+            clockTime = clockRecords.stream().collect(Collectors.groupingBy(ClockRecord::getRecordDate));
         }
         //查询传入月所有日期
-        List<String> dayList = DateUtils.getDay(DateUtils.parseDate(clockRecord.getRecordTime()));
+        List<String> dayList = DateUtils.getDay(DateUtils.parseDate(clockRecord.getRecordDate()));
         //写入数据
         List<Map> mapList = new ArrayList<>();
-        if (dayList.size()> 0){
+        if (dayList.size() > 0) {
             for (String day : dayList) {
-                Map<String,Object> map = new HashMap<>(5);
-                map.put("date",day);
-                map.put("am","未打卡");
-                //上午打卡标识 1:打卡,2:未打卡
-                map.put("amex","2");
-                map.put("pm","未打卡");
-                //下午打卡标识 1:打卡,2:未打卡
-                map.put("pmex","2");
-                if (clockTime.size() > 0){
+                Map<String, Object> map = new HashMap<>(5);
+                map.put("date", day);
+                map.put("am", "未打卡");
+                //上午打卡标识 1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                map.put("amex", "5");
+                map.put("pm", "未打卡");
+                //下午打卡标识 1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                map.put("pmex", "5");
+                if (clockTime.size() > 0) {
                     List<ClockRecord> clockRecordList = clockTime.get(day);
-                    if (clockRecordList != null && clockRecordList.size() > 0){
-                        for (ClockRecord clock : clockRecordList) {
-                            if(StringUtils.isNotEmpty(clock.getWorkingTime())){
-                                map.put("am",clock.getWorkingTime());
-                                //上午打卡表示 1:打卡,2:未打卡
-                                map.put("amex","1");
-                            }
-                            if(StringUtils.isNotEmpty(clock.getDutyTime())){
-                                map.put("pm",clock.getDutyTime());
-                                //下午打卡表示 1:打卡,2:未打卡
-                                map.put("pmex","1");
-                            }
+                    if (clockRecordList != null && clockRecordList.size() > 0) {
+                        clockRecordList = clockRecordList.stream().sorted(Comparator.comparing(ClockRecord::getRecordTime).reversed()).collect(Collectors.toList());
+                        if ("1".equals(clockRecordList.get(clockRecordList.size() - 1).getType())) {
+                            map.put("am", clockRecordList.get(clockRecordList.size() - 1).getRecordTime());
+                            //上午打卡表示  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                            map.put("amex", clockRecordList.get(clockRecordList.size() - 1).getIsOutwork());
+                        }
+                        if ("2".equals(clockRecordList.get(clockRecordList.size() - 1).getType())) {
+                            map.put("pm", clockRecordList.get(clockRecordList.size() - 1).getRecordTime());
+                            //下午打卡表示  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                            map.put("pmex", clockRecordList.get(clockRecordList.size() - 1).getIsOutwork());
+                        }
+                        if ("1".equals(clockRecordList.get(0).getType())) {
+                            map.put("am", clockRecordList.get(0).getRecordTime());
+                            //上午打卡表示  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                            map.put("amex", clockRecordList.get(0).getIsOutwork());
+                        }
+                        if ("2".equals(clockRecordList.get(0).getType())) {
+                            map.put("pm", clockRecordList.get(0).getRecordTime());
+                            //下午打卡表示  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                            map.put("pmex", clockRecordList.get(0).getIsOutwork());
                         }
+
                     }
                 }
                 mapList.add(map);
             }
         }
         //日历数据
-        resultMap.put("rlData",mapList);
+        resultMap.put("rlData", mapList);
+        //补班时间
+        //查询是否存在当前年数据
+        ClockHolidays clockHoliday = new ClockHolidays();
+        clockHoliday.setYear(DateUtils.getYear());
+        clockHoliday.setHolidayDate(clockRecord.getRecordDate());
+        List<ClockHolidays> clockHolidaysList = clockHolidaysMapper.selectClockHolidaysMonthList(clockHoliday);
+        if(clockHolidaysList==null || clockHolidaysList.size()<0){
+            clockHolidaysList = new ArrayList<>();
+        }
+        //放假数据
+        resultMap.put("holidays", clockHolidaysList);
         return AjaxResult.success(resultMap);
     }
 
@@ -171,22 +217,24 @@ public class ClockRecordServiceImpl implements IClockRecordService
         //查询当天应打卡人数
         int dkzs = 0;
         ClockRecord clockRecord = new ClockRecord();
-        clockRecord.setRecordTime(day);
+        clockRecord.setRecordDate(day);
         List<ClockRecord> clockRecords = clockRecordMapper.selectClockRecordList(clockRecord);
+        Map<String, List<ClockRecord>> clockUserId = clockRecords.stream().collect(Collectors.groupingBy(ClockRecord::getUserName));
+        //查询打卡人员
+        ClockUserInfo clockUserInfo = new ClockUserInfo();
+        clockUserInfo.setDelFlag("0");
+        List<ClockUserInfo> clockUserInfoList = clockUserInfoMapper.selectClockUserInfoList(clockUserInfo);
         //已打卡人数
         int ydk = 0;
         //未打卡人数
         int wdk = 0;
-        if(clockRecords!=null && clockRecords.size()>0){
-            dkzs = clockRecords.size();
-            for (ClockRecord record : clockRecords) {
-                if(StringUtils.isNotEmpty(record.getWorkingTime()) || StringUtils.isNotEmpty(record.getDutyTime())){
-                    ydk++;
-                }else{
-                    wdk++;
-                }
-            }
+        if (clockUserId != null && clockUserId.size() > 0) {
+            ydk = clockUserId.size();
+        }
+        if (clockUserInfoList != null && clockUserInfoList.size() > 0) {
+            wdk = clockUserInfoList.size() - clockUserId.size();
         }
+
         //订餐统计
         OrderFood orderFood = new OrderFood();
         orderFood.setOrderFoodTime(DateUtils.parseDate(day));
@@ -197,23 +245,452 @@ public class ClockRecordServiceImpl implements IClockRecordService
         int dcwc = 0;
         //订餐晚餐人数
         int dcDinner = 0;
-        if(orderFoods!=null && orderFoods.size()>0){
+        if (orderFoods != null && orderFoods.size() > 0) {
             dczs = orderFoods.size();
             for (OrderFood food : orderFoods) {
-                if("1".equals(food.getOrderFoodType())){
+                if ("1".equals(food.getOrderFoodType())) {
                     dcwc++;
                 }
-                if("2".equals(food.getOrderFoodType())){
+                if ("2".equals(food.getOrderFoodType())) {
                     dcDinner++;
                 }
             }
         }
-        resultMap.put("dkzs",dkzs);
-        resultMap.put("ydk",ydk);
-        resultMap.put("wdk",wdk);
-        resultMap.put("dczs",dczs);
-        resultMap.put("dcwc",dcwc);
-        resultMap.put("dcDinner",dcDinner);
+        resultMap.put("dkzs", dkzs);
+        resultMap.put("ydk", ydk);
+        resultMap.put("wdk", wdk);
+        resultMap.put("dczs", dczs);
+        resultMap.put("dcwc", dcwc);
+        resultMap.put("dcDinner", dcDinner);
+        return AjaxResult.success(resultMap);
+    }
+
+    @Override
+    public AjaxResult selectClockRecordListInfo(ClockRecord clockRecord) {
+        Map<String, Object> resultMap = new HashMap<>();
+
+        DutySchedule dutySchedule = dutyScheduleMapper.selectDutyScheduleByDutyNew();
+        resultMap.put("workTime", dutySchedule.getStartWorkTime() + " - " + dutySchedule.getEndWorkTime());
+
+        //查询查询打卡数据
+        List<ClockRecord> clockRecords = clockRecordMapper.selectClockRecordList(clockRecord);
+        //按日期分类
+        Map<String, List<ClockRecord>> clockTime = new HashMap<>();
+        if (clockRecords != null && clockRecords.size() > 0) {
+            clockTime = clockRecords.stream().collect(Collectors.groupingBy(ClockRecord::getRecordDate));
+        }
+        //查询传入月所有日期
+        List<Date> dayList = DateUtils.getDatesBetween(clockRecord.getStartTime(), clockRecord.getEndTime());
+        //写入数据
+        List<Map> mapList = new ArrayList<>();
+        if (dayList.size() > 0) {
+            for (Date day : dayList) {
+                Map<String, Object> map = new HashMap<>(5);
+                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+                map.put("date", format.format(day));
+                map.put("am", "未打卡");
+                //上午打卡标识  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                map.put("amex", "5");
+                map.put("pm", "未打卡");
+                //下午打卡标识  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                map.put("pmex", "5");
+                if (clockTime.size() > 0) {
+                    List<ClockRecord> clockRecordList = clockTime.get(format.format(day));
+                    if (clockRecordList != null && clockRecordList.size() > 0) {
+                        clockRecordList = clockRecordList.stream().sorted(Comparator.comparing(ClockRecord::getRecordTime).reversed()).collect(Collectors.toList());
+                        if ("1".equals(clockRecordList.get(clockRecordList.size() - 1).getType())) {
+                            map.put("am", clockRecordList.get(clockRecordList.size() - 1).getRecordTime());
+                            //上午打卡表示  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                            map.put("amex", clockRecordList.get(clockRecordList.size() - 1).getIsOutwork());
+                        }
+                        if ("2".equals(clockRecordList.get(clockRecordList.size() - 1).getType())) {
+                            map.put("pm", clockRecordList.get(clockRecordList.size() - 1).getRecordTime());
+                            //下午打卡表示  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                            map.put("pmex", clockRecordList.get(clockRecordList.size() - 1).getIsOutwork());
+                        }
+                        if ("1".equals(clockRecordList.get(0).getType())) {
+                            map.put("am", clockRecordList.get(0).getRecordTime());
+                            //上午打卡表示  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                            map.put("amex", clockRecordList.get(0).getIsOutwork());
+                        }
+                        if ("2".equals(clockRecordList.get(0).getType())) {
+                            map.put("pm", clockRecordList.get(0).getRecordTime());
+                            //下午打卡表示  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                            map.put("pmex", clockRecordList.get(0).getIsOutwork());
+                        }
+
+                    }
+                }
+                mapList.add(map);
+            }
+        }
+        //日历数据
+        resultMap.put("rlData", mapList);
+        return AjaxResult.success(resultMap);
+    }
+
+    @Override
+    public AjaxResult personage(ClockRecord clockRecord) {
+        Map<String, Object> resultMap = statistics(clockRecord);
+        return AjaxResult.success(resultMap);
+    }
+
+    @Override
+    public List<Map<String, Object>> all(ClockUserInfo clockUserInfo) {
+        List<Map<String, Object>> listMap = new ArrayList<>();
+        startPage();
+        List<ClockUserInfo> clockUserList = clockUserInfoMapper.selectClockUserInfoList(clockUserInfo);
+        clearPage();
+        for (ClockUserInfo userInfo : clockUserList) {
+            ClockRecord clockRecord = new ClockRecord();
+            clockRecord.setUserId(userInfo.getUserId());
+            clockRecord.setRecordDate(clockUserInfo.getRecordDate() + "-01");
+            Map<String, Object> resultMap = statistics(clockRecord);
+            resultMap.put("name", userInfo.getUserName());
+            resultMap.put("userId",userInfo.getUserId());
+            listMap.add(resultMap);
+        }
+        return listMap;
+    }
+
+    @SneakyThrows
+    @Override
+    public AjaxResult abnormal(ClockRecord clockRecord) {
+        Map<String, Object> resultMap = new HashMap<>();
+        int wq = 0;
+        int cd = 0;
+        int zt = 0;
+        int wdk = 0;
+        //获取所有打卡人员
+        //查询打卡人员
+        ClockUserInfo clockUserInfo = new ClockUserInfo();
+        clockUserInfo.setDelFlag("0");
+        List<ClockUserInfo> clockUserInfoList = clockUserInfoMapper.selectClockUserInfoList(clockUserInfo);
+        //获取时间段内的所有打卡信息
+        List<ClockRecord> clockRecords = clockRecordMapper.selectClockRecordList(clockRecord);
+
+        //按人员类
+        Map<Long, List<ClockRecord>> clockUser = new HashMap<>();
+        if (clockRecords != null && clockRecords.size() > 0) {
+            clockUser = clockRecords.stream().collect(Collectors.groupingBy(ClockRecord::getUserId));
+        }
+
+        //查询本年度所有节假日时间
+        //查询是否存在当前年数据
+        ClockHolidays clockHoliday = new ClockHolidays();
+        clockHoliday.setYear(DateUtils.getYear());
+        List<ClockHolidays> clockHolidaysList = clockHolidaysMapper.selectClockHolidaysList(clockHoliday);
+        //分成补班和节假日
+        List<String> jjrList = new ArrayList<>();
+        List<String> bbList = new ArrayList<>();
+        for (ClockHolidays clockHolidays : clockHolidaysList) {
+            if("NO".equals(clockHolidays.getType())){
+                jjrList.add(clockHolidays.getHolidayDate());
+            }else{
+                bbList.add(clockHolidays.getHolidayDate());
+            }
+        }
+
+
+
+        //查询传入两个日期的所有日期
+        List<Date> dayList = DateUtils.getDatesBetween(clockRecord.getStartTime(), clockRecord.getEndTime());
+        for (ClockUserInfo userInfo : clockUserInfoList) {
+            List<ClockRecord> clockRecordUser = clockUser.get(userInfo.getUserId());
+            //按日期分类
+            Map<String, List<ClockRecord>> clockTime = new HashMap<>();
+            if (clockRecordUser != null && clockRecordUser.size() > 0) {
+                clockTime = clockRecordUser.stream().collect(Collectors.groupingBy(ClockRecord::getRecordDate));
+            }
+            if (dayList.size() > 0) {
+                for (Date day : dayList) {
+                    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+                    boolean bl = (DateUtils.dayForWeek(format.format(day))==6 || DateUtils.dayForWeek(format.format(day))==7);
+                    if(jjrList.contains(format.format(day)) || (bl && !bbList.contains(format.format(day)))){
+                        continue;
+                    }
+                    List<ClockRecord> clockRecordList = clockTime.get(format.format(day));
+                    if(clockRecordList==null || clockRecordList.size()<=0){
+                        wdk++;
+                    }else{
+                        boolean sw = false;
+                        boolean xw = false;
+                        boolean bcd = false;
+                        boolean bzt = false;
+                        boolean bwq = false;
+                        if ("1".equals(clockRecordList.get(clockRecordList.size() - 1).getType())) {
+                            sw = true;
+                            if ("3".equals(clockRecordList.get(clockRecordList.size() - 1).getIsOutwork())) {
+                                bcd = true;
+                            }
+                            if ("2".equals(clockRecordList.get(clockRecordList.size() - 1).getIsOutwork())) {
+                                bwq = true;
+                            }
+                        }
+                        if ("2".equals(clockRecordList.get(clockRecordList.size() - 1).getType())) {
+                            xw = true;
+                            if ("4".equals(clockRecordList.get(clockRecordList.size() - 1).getIsOutwork())) {
+                                bzt = true;
+                            }
+                            if ("2".equals(clockRecordList.get(clockRecordList.size() - 1).getIsOutwork())) {
+                                bwq = true;
+                            }
+                        }
+                        if ("1".equals(clockRecordList.get(0).getType())) {
+                            sw = true;
+                            if ("3".equals(clockRecordList.get(0).getIsOutwork())) {
+                                bcd = true;
+                            }
+                            if ("2".equals(clockRecordList.get(0).getIsOutwork())) {
+                                bwq = true;
+                            }
+                        }
+                        if ("2".equals(clockRecordList.get(0).getType())) {
+                            xw = true;
+                            if ("4".equals(clockRecordList.get(0).getIsOutwork())) {
+                                bzt = true;
+                            }
+                            if ("2".equals(clockRecordList.get(0).getIsOutwork())) {
+                                bwq = true;
+                            }
+                        }
+                        if(!sw || !xw){
+                            wdk++;
+                        }
+                        if(bcd){
+                            cd++;
+                        }
+                        if(bzt){
+                            zt++;
+                        }
+                        if(bwq){
+                            wq++;
+                        }
+                    }
+                }
+            }
+        }
+        resultMap.put("cd", cd);
+        resultMap.put("zt", zt);
+        resultMap.put("wq", wq);
+        resultMap.put("wdk", wdk);
         return AjaxResult.success(resultMap);
     }
+
+    @SneakyThrows
+    @Override
+    public AjaxResult details(ClockRecord clockRecord) {
+        List<Map<String, Object>> listMap = new ArrayList<>();
+        //查询人员打卡数据
+        List<ClockRecord> clockRecords = clockRecordMapper.selectClockRecordList(clockRecord);
+        //按日期分类
+        Map<String, List<ClockRecord>> clockTime = new HashMap<>();
+        if (clockRecords != null && clockRecords.size() > 0) {
+            clockTime = clockRecords.stream().collect(Collectors.groupingBy(ClockRecord::getRecordDate));
+        }
+        //查询传入两个日期的所有日期
+        List<Date> dayList = DateUtils.getDatesBetween(clockRecord.getStartTime(), clockRecord.getEndTime());
+        //查询本年度所有节假日时间
+        ClockHolidays clockHoliday = new ClockHolidays();
+        clockHoliday.setYear(DateUtils.getYear());
+        List<ClockHolidays> clockHolidaysList = clockHolidaysMapper.selectClockHolidaysList(clockHoliday);
+        //分成补班和节假日
+        List<String> jjrList = new ArrayList<>();
+        List<String> bbList = new ArrayList<>();
+        for (ClockHolidays clockHolidays : clockHolidaysList) {
+            if("NO".equals(clockHolidays.getType())){
+                jjrList.add(clockHolidays.getHolidayDate());
+            }else{
+                bbList.add(clockHolidays.getHolidayDate());
+            }
+        }
+        for (Date day : dayList) {
+            Map<String, Object> resultMap = new HashMap<>();
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+            boolean bl = (DateUtils.dayForWeek(format.format(day))==6 || DateUtils.dayForWeek(format.format(day))==7);
+            if(jjrList.contains(format.format(day)) || (bl && !bbList.contains(format.format(day)))){
+                continue;
+            }
+            List<ClockRecord> clockRecordList = clockTime.get(format.format(day));
+            if(clockRecordList==null || clockRecordList.size()<=0){
+                resultMap.put("time",format.format(day));
+                resultMap.put("details","全天未打卡");
+                listMap.add(resultMap);
+            }else{
+                resultMap.put("time",format.format(day));
+                StringBuilder sb = new StringBuilder();
+                if(clockRecordList.size()>2){
+                    if ("1".equals(clockRecordList.get(0).getType())) {
+                        if ("3".equals(clockRecordList.get(0).getIsOutwork())) {
+                            sb.append("上午:迟到");
+                        }
+                        if ("2".equals(clockRecordList.get(0).getIsOutwork())) {
+                            sb.append("上午:外勤");
+                        }
+                    }
+                    if ("2".equals(clockRecordList.get(clockRecordList.size() - 1).getType())) {
+                        if ("4".equals(clockRecordList.get(clockRecordList.size() - 1).getIsOutwork())) {
+                            if(StringUtils.isNotEmpty(sb.toString())){
+                                sb.append(",");
+                            }
+                            sb.append("下午:早退");
+                        }
+                        if ("2".equals(clockRecordList.get(clockRecordList.size() - 1).getIsOutwork())) {
+                            if(StringUtils.isNotEmpty(sb.toString())){
+                                sb.append(",");
+                            }
+                            sb.append("下午:外勤");
+                        }
+                    }
+                }else{
+                    if ("1".equals(clockRecordList.get(0).getType())) {
+                        if ("3".equals(clockRecordList.get(0).getIsOutwork())) {
+                            sb.append("上午:迟到").append(",");
+                        }
+                        if ("2".equals(clockRecordList.get(0).getIsOutwork())) {
+                            sb.append("上午:外勤").append(",");
+                        }
+                        sb.append("下午:缺卡");
+                    }
+                    if ("2".equals(clockRecordList.get(0).getType())) {
+                        sb.append("上午:缺卡");
+                        if ("4".equals(clockRecordList.get(0).getIsOutwork())) {
+                            sb.append(",").append("下午:早退");
+                        }
+                        if ("2".equals(clockRecordList.get(0).getIsOutwork())) {
+                            sb.append(",").append("下午:外勤");
+                        }
+                    }
+                }
+                resultMap.put("details",sb.toString());
+                listMap.add(resultMap);
+            }
+        }
+        return AjaxResult.success(listMap);
+    }
+
+    /**
+     * 设置请求分页数据
+     */
+    protected void startPage() {
+        PageUtils.startPage();
+    }
+
+    /**
+     * 清理分页的线程变量
+     */
+    protected void clearPage() {
+        PageUtils.clearPage();
+    }
+
+
+    @SneakyThrows
+    public Map<String, Object> statistics(ClockRecord clockRecord) {
+        String year = DateUtils.getYear();
+        Map<String, Object> resultMap = new HashMap<>();
+        //迟到
+        int cd = 0;
+        //早退
+        int zt = 0;
+        //外勤
+        int wq = 0;
+        //未打卡
+        int wdk = 0;
+
+        if (StringUtils.isEmpty(clockRecord.getRecordDate())) {
+            clockRecord.setRecordDate(DateUtils.getDate());
+        }
+        //查询查询月打卡数据
+        List<ClockRecord> clockRecords = clockRecordMapper.selectOrderFoodListRl(clockRecord);
+        //按日期分类
+        Map<String, List<ClockRecord>> clockTime = new HashMap<>();
+        if (clockRecords != null && clockRecords.size() > 0) {
+            clockTime = clockRecords.stream().collect(Collectors.groupingBy(ClockRecord::getRecordDate));
+        }
+        //查询传入月所有日期
+        List<String> dayList = DateUtils.getDay(DateUtils.parseDate(clockRecord.getRecordDate()));
+        //查询本年度所有节假日时间
+        //查询是否存在当前年数据
+        ClockHolidays clockHoliday = new ClockHolidays();
+        clockHoliday.setYear(year);
+        List<ClockHolidays> clockHolidaysList = clockHolidaysMapper.selectClockHolidaysList(clockHoliday);
+        //分成补班和节假日
+        List<String> jjrList = new ArrayList<>();
+        List<String> bbList = new ArrayList<>();
+        for (ClockHolidays clockHolidays : clockHolidaysList) {
+            if("NO".equals(clockHolidays.getType())){
+                jjrList.add(clockHolidays.getHolidayDate());
+            }else{
+                bbList.add(clockHolidays.getHolidayDate());
+            }
+        }
+
+        for (String s : dayList) {
+            if(DateUtils.compare(s,DateUtils.getDate())<0){
+                continue;
+            }
+            //判断当天是否需要上班
+            boolean bl = (DateUtils.dayForWeek(s)==6 || DateUtils.dayForWeek(s)==7);
+            if(bbList.contains(s) || (!bl && !jjrList.contains(s))){
+                //需要要上班(当天不是双休并且不在节假日内,或者需要补班)
+                if(!clockTime.containsKey(s)){
+                    wdk = wdk+2;
+                    continue;
+                }
+                List<ClockRecord> clockRecordList = clockTime.get(s);
+                clockRecordList = clockRecordList.stream().sorted(Comparator.comparing(ClockRecord::getRecordTime).reversed()).collect(Collectors.toList());
+                boolean sw = false;
+                boolean xw = false;
+                if ("1".equals(clockRecordList.get(clockRecordList.size() - 1).getType())) {
+                    sw = true;
+                    if ("3".equals(clockRecordList.get(clockRecordList.size() - 1).getIsOutwork())) {
+                        cd++;
+                    }
+                    if ("2".equals(clockRecordList.get(clockRecordList.size() - 1).getIsOutwork())) {
+                        wq++;
+                    }
+                }
+                if ("2".equals(clockRecordList.get(clockRecordList.size() - 1).getType())) {
+                    xw = true;
+                    if ("4".equals(clockRecordList.get(clockRecordList.size() - 1).getIsOutwork())) {
+                        zt++;
+                    }
+                    if ("2".equals(clockRecordList.get(clockRecordList.size() - 1).getIsOutwork())) {
+                        wq++;
+                    }
+                }
+                if ("1".equals(clockRecordList.get(0).getType())) {
+                    sw = true;
+                    if ("3".equals(clockRecordList.get(0).getIsOutwork())) {
+                        cd++;
+                    }
+                    if ("2".equals(clockRecordList.get(0).getIsOutwork())) {
+                        wq++;
+                    }
+                }
+                if ("2".equals(clockRecordList.get(0).getType())) {
+                    xw = true;
+                    if ("4".equals(clockRecordList.get(0).getIsOutwork())) {
+                        zt++;
+                    }
+                    if ("2".equals(clockRecordList.get(0).getIsOutwork())) {
+                        wq++;
+                    }
+                }
+                if(!sw || !xw){
+                    wdk++;
+                }
+            }
+        }
+        /*for (String key : clockTime.keySet()) {
+
+        }*/
+        resultMap.put("cd", cd);
+        resultMap.put("zt", zt);
+        resultMap.put("wq", wq);
+        resultMap.put("wdk", wdk);
+        return resultMap;
+    }
+
+
 }

+ 59 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClockUserInfoServiceImpl.java

@@ -1,7 +1,15 @@
 package com.ruoyi.system.service.impl;
 
+import java.util.Comparator;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.ClockRecord;
+import com.ruoyi.system.mapper.ClockRecordMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.ClockUserInfoMapper;
@@ -19,6 +27,8 @@ public class ClockUserInfoServiceImpl implements IClockUserInfoService
 {
     @Autowired
     private ClockUserInfoMapper clockUserInfoMapper;
+    @Autowired
+    private ClockRecordMapper clockRecordMapper;
 
     /**
      * 查询打卡人员信息
@@ -93,4 +103,53 @@ public class ClockUserInfoServiceImpl implements IClockUserInfoService
     {
         return clockUserInfoMapper.deleteClockUserInfoByUserId(userId);
     }
+
+    @Override
+    public List<ClockUserInfo> selectClockUserInfoRecordList(ClockUserInfo clockUserInfo) {
+        List<ClockUserInfo> clockUserList = clockUserInfoMapper.selectClockUserInfoList(clockUserInfo);
+        if(StringUtils.isEmpty(clockUserInfo.getRecordDate())){
+            clockUserInfo.setRecordDate(DateUtils.getDate());
+        }
+        for (ClockUserInfo userInfo : clockUserList) {
+            Map<String,Object> clockMap = new HashMap<>();
+            clockMap.put("date",clockUserInfo.getRecordDate());
+            clockMap.put("am","未打卡");
+            //上午打卡标识 1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+            clockMap.put("amex","5");
+            clockMap.put("pm","未打卡");
+            //下午打卡标识 1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+            clockMap.put("pmex","5");
+            //查询当天的所有打卡信息
+            ClockRecord clockRecord = new ClockRecord();
+            clockRecord.setUserId(userInfo.getUserId());
+            clockRecord.setRecordDate(clockUserInfo.getRecordDate());
+            List<ClockRecord> clockRecords = clockRecordMapper.selectClockRecordList(clockRecord);
+            if (clockRecords != null && clockRecords.size() > 0){
+                clockRecords = clockRecords.stream().sorted(Comparator.comparing(ClockRecord::getRecordTime).reversed()).collect(Collectors.toList());
+                if("1".equals(clockRecords.get(clockRecords.size()-1).getType())){
+                    clockMap.put("am",clockRecords.get(clockRecords.size()-1).getRecordTime());
+                    //上午打卡表示  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                    clockMap.put("amex",clockRecords.get(clockRecords.size()-1).getIsOutwork());
+                }
+                if("2".equals(clockRecords.get(clockRecords.size()-1).getType())){
+                    clockMap.put("pm",clockRecords.get(clockRecords.size()-1).getRecordTime());
+                    //下午打卡表示  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                    clockMap.put("pmex",clockRecords.get(clockRecords.size()-1).getIsOutwork());
+                }
+                if("1".equals(clockRecords.get(0).getType())){
+                    clockMap.put("am",clockRecords.get(0).getRecordTime());
+                    //上午打卡表示  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                    clockMap.put("amex",clockRecords.get(0).getIsOutwork());
+                }
+                if("2".equals(clockRecords.get(0).getType())){
+                    clockMap.put("pm",clockRecords.get(0).getRecordTime());
+                    //下午打卡表示  1:正常打卡,2:外勤打卡,3:迟到,4:早退,5:未打卡
+                    clockMap.put("pmex",clockRecords.get(0).getIsOutwork());
+                }
+
+            }
+            userInfo.setClockMap(clockMap);
+        }
+        return clockUserList;
+    }
 }

+ 58 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/Task.java

@@ -1,24 +1,36 @@
 package com.ruoyi.system.service.impl;
 
 
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
 import com.google.gson.Gson;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.http.HttpUtils;
+import com.ruoyi.system.domain.ClockHolidays;
 import com.ruoyi.system.domain.MenuFood;
 import com.ruoyi.system.domain.MenuFoodRecord;
+import com.ruoyi.system.mapper.ClockHolidaysMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
+import org.springframework.util.ObjectUtils;
 
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 import java.util.List;
 import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
 
 /**
  * 定时任务
  */
 @Component
 public class Task {
+
+    @Autowired
+    private ClockHolidaysMapper clockHolidaysMapper;
     @Autowired
     private MenuFoodRecordServiceImpl menuFoodRecordService;
     @Autowired
@@ -47,4 +59,50 @@ public class Task {
             menuFoodRecordService.insertMenuFoodRecord(menuFoodRecord);
         }
     }
+
+    /***
+     *获取法定节假日和补班信息
+     * 定时:每个月20号2点
+     * @throws Exception
+     */
+    @Async
+    //@Scheduled(cron = "0 0/2 * * * ? ")
+    //@Scheduled(cron = "0 20 0 * * ? ")
+    //@Scheduled(cron = "0/10 * * * * ? ")
+    @Scheduled(cron = "0 0 2 20 * ? ")
+    public void holidays() {
+        String year = DateUtils.getYear();
+        //查询是否存在当前年数据
+        ClockHolidays clockHoliday = new ClockHolidays();
+        clockHoliday.setYear(year);
+        List<ClockHolidays> clockHolidaysList = clockHolidaysMapper.selectClockHolidaysList(clockHoliday);
+        if(clockHolidaysList!=null && clockHolidaysList.size()>0){
+            year = String.valueOf(Integer.parseInt(year) + 1);
+        }
+        String url = "https://timor.tech/api/holiday/year/"+year;
+        String rspStr = HttpUtils.sendGet(url);
+        JSONObject obj = JSON.parseObject(rspStr);
+        Map<String, Map<String, Object>> holiday = (Map<String, Map<String, Object>>) obj.get("holiday");
+        if(ObjectUtils.isEmpty(holiday)){
+            return;
+        }
+        Set<String> strings = holiday.keySet();
+        for (String str : strings) {
+            Map<String, Object> stringObjectMap = holiday.get(str);
+            boolean bool = (Boolean) stringObjectMap.get("holiday");
+            ClockHolidays clockHolidays = new ClockHolidays();
+            clockHolidays.setYear(year);
+            clockHolidays.setHolidayDate((String) stringObjectMap.get("date"));
+            clockHolidays.setType("NO");
+            if(!bool){
+                clockHolidays.setType("YES");
+            }
+            clockHolidays.setCreateTime(DateUtils.getNowDate());
+            clockHolidays.setUpdateTime(DateUtils.getNowDate());
+            clockHolidaysMapper.insertClockHolidays(clockHolidays);
+        }
+
+        System.out.println("1");
+
+    }
 }

+ 96 - 0
ruoyi-system/src/main/resources/mapper/system/ClockHolidaysMapper.xml

@@ -0,0 +1,96 @@
+<?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.ruoyi.system.mapper.ClockHolidaysMapper">
+    
+    <resultMap type="ClockHolidays" id="ClockHolidaysResult">
+        <result property="id"    column="id"    />
+        <result property="year"    column="year"    />
+        <result property="holidayDate"    column="holiday_date"    />
+        <result property="type"    column="type"    />
+        <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="selectClockHolidaysVo">
+        select id, year, holiday_date, type, create_by, create_time, update_by, update_time, remark from clock_holidays
+    </sql>
+
+    <select id="selectClockHolidaysList" parameterType="ClockHolidays" resultMap="ClockHolidaysResult">
+        <include refid="selectClockHolidaysVo"/>
+        <where>  
+            <if test="year != null  and year != ''"> and year = #{year}</if>
+            <if test="holidayDate != null  and holidayDate != ''"> and holiday_date = #{holidayDate}</if>
+            <if test="type != null  and type != ''"> and type = #{type}</if>
+        </where>
+    </select>
+    
+    <select id="selectClockHolidaysById" parameterType="Long" resultMap="ClockHolidaysResult">
+        <include refid="selectClockHolidaysVo"/>
+        where id = #{id}
+    </select>
+    <select id="selectClockHolidaysMonthList" parameterType="ClockHolidays" resultMap="ClockHolidaysResult">
+        <include refid="selectClockHolidaysVo"/>
+        <where>
+            <if test="year != null  and year != ''"> and year = #{year}</if>
+            <if test="holidayDate != null  and holidayDate != ''">
+                and date_format(holiday_date,'%Y%m') = date_format(#{holidayDate},'%Y%m')
+            </if>
+            <if test="type != null  and type != ''"> and type = #{type}</if>
+        </where>
+    </select>
+
+    <insert id="insertClockHolidays" parameterType="ClockHolidays" useGeneratedKeys="true" keyProperty="id">
+        insert into clock_holidays
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="year != null and year != ''">year,</if>
+            <if test="holidayDate != null">holiday_date,</if>
+            <if test="type != null and type != ''">type,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="year != null and year != ''">#{year},</if>
+            <if test="holidayDate != null">#{holidayDate},</if>
+            <if test="type != null and type != ''">#{type},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateClockHolidays" parameterType="ClockHolidays">
+        update clock_holidays
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="year != null and year != ''">year = #{year},</if>
+            <if test="holidayDate != null">holiday_date = #{holidayDate},</if>
+            <if test="type != null and type != ''">type = #{type},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteClockHolidaysById" parameterType="Long">
+        delete from clock_holidays where id = #{id}
+    </delete>
+
+    <delete id="deleteClockHolidaysByIds" parameterType="String">
+        delete from clock_holidays where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 32 - 22
ruoyi-system/src/main/resources/mapper/system/ClockRecordMapper.xml

@@ -11,10 +11,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="userName"    column="user_name"    />
         <result property="phonenumber"    column="phonenumber"    />
         <result property="idCard"    column="id_card"    />
+        <result property="recordDt"    column="record_dt"    />
+        <result property="recordDate"    column="record_date"    />
         <result property="recordTime"    column="record_time"    />
+        <result property="recordLocations"    column="record_locations"    />
         <result property="week"    column="week"    />
-        <result property="workingTime"    column="working_time"    />
-        <result property="dutyTime"    column="duty_time"    />
+        <result property="isOutwork"    column="is_outwork"    />
+        <result property="pictureUrl"    column="picture_url"    />
         <result property="type"    column="type"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
@@ -24,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectClockRecordVo">
-        select clock_id, user_id, dept_name, user_name, phonenumber, id_card, record_time,week, working_time, duty_time,type, create_by, create_time, update_by, update_time, remark from clock_record
+        select clock_id, user_id, dept_name, user_name, phonenumber, id_card,record_dt,record_date, record_time,record_locations,week, is_outwork,picture_url,type, create_by, create_time, update_by, update_time, remark from clock_record
     </sql>
 
     <select id="selectClockRecordList" parameterType="ClockRecord" resultMap="ClockRecordResult">
@@ -35,16 +38,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userName != null  and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
             <if test="phonenumber != null  and phonenumber != ''"> and phonenumber = #{phonenumber}</if>
             <if test="idCard != null  and idCard != ''"> and id_card = #{idCard}</if>
-            <if test="recordTime != null  and recordTime != ''"> and record_time = #{recordTime}</if>
+            <if test="recordDate != null  and recordDate != ''"> and record_date = #{recordDate}</if>
             <if test="week != null  and week != ''"> and week = #{week}</if>
-            <if test="workingTime != null  and workingTime != ''"> and working_time = #{workingTime}</if>
-            <if test="dutyTime != null  and dutyTime != ''"> and duty_time = #{dutyTime}</if>
+            <if test="isOutwork != null  and isOutwork != ''"> and is_outwork = #{isOutwork}</if>
             <if test="type != null  and type != ''"> and type = #{type}</if>
             <if test="startTime != null and startTime != ''"><!-- 开始时间检索 -->
-                AND record_time &gt;= #{startTime}
+                AND record_date &gt;= #{startTime}
             </if>
             <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
-                AND record_time &lt;= #{endTime}
+                AND record_date &lt;= #{endTime}
             </if>
         </where>
     </select>
@@ -61,23 +63,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userName != null  and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
             <if test="phonenumber != null  and phonenumber != ''"> and phonenumber = #{phonenumber}</if>
             <if test="idCard != null  and idCard != ''"> and id_card = #{idCard}</if>
-            <if test="recordTime != null  and recordTime != ''">
-                and date_format(record_time,'%Y%m') = date_format(#{recordTime},'%Y%m')
+            <if test="recordDate != null  and recordDate != ''">
+                and date_format(record_date,'%Y%m') = date_format(#{recordDate},'%Y%m')
             </if>
-            <if test="workingTime != null  and workingTime != ''"> and working_time = #{workingTime}</if>
-            <if test="dutyTime != null  and dutyTime != ''"> and duty_time = #{dutyTime}</if>
+            <if test="isOutwork != null  and isOutwork != ''"> and is_outwork = #{isOutwork}</if>
+            <if test="type != null  and type != ''"> and type = #{type}</if>
             <if test="startTime != null and startTime != ''"><!-- 开始时间检索 -->
-                AND record_time &gt;= #{startTime}
+                AND record_date &gt;= #{startTime}
             </if>
             <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
-                AND record_time &lt;= #{endTime}
+                AND record_date &lt;= #{endTime}
             </if>
         </where>
     </select>
     <select id="selectClockRecordNew" parameterType="ClockRecord" resultMap="ClockRecordResult">
         <include refid="selectClockRecordVo"/>
-        where (working_time!=null or duty_time!=null)
-        and user_id = #{userId}
+        where user_id = #{userId}
         order by record_time desc limit 1
     </select>
 
@@ -89,10 +90,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userName != null and userName != ''">user_name,</if>
             <if test="phonenumber != null">phonenumber,</if>
             <if test="idCard != null">id_card,</if>
+            <if test="recordDt != null">record_dt,</if>
+            <if test="recordDate != null">record_date,</if>
             <if test="recordTime != null">record_time,</if>
+            <if test="recordLocations != null">record_locations,</if>
             <if test="week != null">week,</if>
-            <if test="workingTime != null">working_time,</if>
-            <if test="dutyTime != null">duty_time,</if>
+            <if test="isOutwork != null  and isOutwork != ''"> is_outwork,</if>
+            <if test="pictureUrl != null  and pictureUrl != ''"> picture_url,</if>
             <if test="type != null  and type != ''">type,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
@@ -106,10 +110,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userName != null and userName != ''">#{userName},</if>
             <if test="phonenumber != null">#{phonenumber},</if>
             <if test="idCard != null">#{idCard},</if>
+            <if test="recordDt != null">#{recordDt},</if>
+            <if test="recordDate != null">#{recordDate},</if>
             <if test="recordTime != null">#{recordTime},</if>
+            <if test="recordLocations != null"> #{recordLocations},</if>
             <if test="week != null">#{week},</if>
-            <if test="workingTime != null">#{workingTime},</if>
-            <if test="dutyTime != null">#{dutyTime},</if>
+            <if test="isOutwork != null  and isOutwork != ''">#{isOutwork},</if>
+            <if test="pictureUrl != null  and pictureUrl != ''"> #{pictureUrl},</if>
             <if test="type != null  and type != ''">#{type},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
@@ -127,10 +134,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userName != null and userName != ''">user_name = #{userName},</if>
             <if test="phonenumber != null">phonenumber = #{phonenumber},</if>
             <if test="idCard != null">id_card = #{idCard},</if>
+            <if test="recordDt != null">record_dt= #{recordDt},</if>
+            <if test="recordDate != null">record_date = #{recordDate},</if>
             <if test="recordTime != null">record_time = #{recordTime},</if>
+            <if test="recordLocations != null">record_locations = #{recordLocations},</if>
             <if test="week != null "> and week = #{week},</if>
-            <if test="workingTime != null">working_time = #{workingTime},</if>
-            <if test="dutyTime != null">duty_time = #{dutyTime},</if>
+            <if test="isOutwork != null  and isOutwork != ''"> is_outwork = #{isOutwork},</if>
+            <if test="pictureUrl != null  and pictureUrl != ''"> picture_url=#{pictureUrl},</if>
             <if test="type != null  and type != ''">type = #{type},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/ClockUserInfoMapper.xml

@@ -31,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userName != null  and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
             <if test="phonenumber != null  and phonenumber != ''"> and phonenumber = #{phonenumber}</if>
             <if test="idCard != null  and idCard != ''"> and id_card = #{idCard}</if>
+            <if test="delFlag != null  and delFlag != ''"> and del_flag = #{delFlag}</if>
         </where>
     </select>
     

+ 26 - 2
ruoyi-system/src/main/resources/mapper/system/DutyScheduleMapper.xml

@@ -6,6 +6,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="DutySchedule" id="DutyScheduleResult">
         <result property="dutyId"    column="duty_id"    />
+        <result property="lon"    column="lon"    />
+        <result property="lat"    column="lat"    />
+        <result property="locations"    column="locations"    />
+        <result property="distance"    column="distance"    />
+        <result property="isPicture"    column="is_picture"    />
         <result property="startWorkTime"    column="start_work_time"    />
         <result property="endWorkTime"    column="end_work_time"    />
         <result property="createBy"    column="create_by"    />
@@ -16,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectDutyScheduleVo">
-        select duty_id, start_work_time, end_work_time, create_by, create_time, update_by, update_time, remark from duty_schedule
+        select duty_id,lon,lat,locations,distance,is_picture, start_work_time, end_work_time, create_by, create_time, update_by, update_time, remark from duty_schedule
     </sql>
 
     <select id="selectDutyScheduleList" parameterType="DutySchedule" resultMap="DutyScheduleResult">
@@ -31,10 +36,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectDutyScheduleVo"/>
         where duty_id = #{dutyId}
     </select>
-        
+    <select id="selectDutyScheduleByDutyNew" parameterType="Long" resultMap="DutyScheduleResult">
+        <include refid="selectDutyScheduleVo"/>
+        order by create_time desc limit 1
+    </select>
+
     <insert id="insertDutySchedule" parameterType="DutySchedule" useGeneratedKeys="true" keyProperty="dutyId">
         insert into duty_schedule
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="lon != null">lon,</if>
+            <if test="lat != null">lat,</if>
+            <if test="locations != null">locations,</if>
+            <if test="distance != null">distance,</if>
+            <if test="isPicture != null">is_picture,</if>
             <if test="startWorkTime != null">start_work_time,</if>
             <if test="endWorkTime != null">end_work_time,</if>
             <if test="createBy != null">create_by,</if>
@@ -44,6 +58,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="lon != null">#{lon},</if>
+            <if test="lat != null">#{lat},</if>
+            <if test="locations != null">#{locations},</if>
+            <if test="distance != null">#{distance},</if>
+            <if test="isPicture != null">#{isPicture},</if>
             <if test="startWorkTime != null">#{startWorkTime},</if>
             <if test="endWorkTime != null">#{endWorkTime},</if>
             <if test="createBy != null">#{createBy},</if>
@@ -57,6 +76,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateDutySchedule" parameterType="DutySchedule">
         update duty_schedule
         <trim prefix="SET" suffixOverrides=",">
+            <if test="lon != null">lon = #{lon},</if>
+            <if test="lat != null">lat = #{lat},</if>
+            <if test="locations != null">locations = #{locations},</if>
+            <if test="distance != null">distance = #{distance},</if>
+            <if test="isPicture != null">is_picture = #{isPicture},</if>
             <if test="startWorkTime != null">start_work_time = #{startWorkTime},</if>
             <if test="endWorkTime != null">end_work_time = #{endWorkTime},</if>
             <if test="createBy != null">create_by = #{createBy},</if>

+ 1 - 1
ruoyi-ui/src/api/system/dict/type.js

@@ -46,7 +46,7 @@ export function delType(dictId) {
 // 刷新字典缓存
 export function refreshCache() {
   return request({
-    url: '/system/dict/type/refreshCache/delete',
+    url: '/system/dict/type/refreshCache',
     method: 'get'
   })
 }

+ 44 - 0
ruoyi-ui/src/api/system/foodRecord.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询每日食谱记录列表
+export function listFoodRecord(query) {
+  return request({
+    url: '/system/foodRecord/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询每日食谱记录详细
+export function getFoodRecord(menuFoodRecordId) {
+  return request({
+    url: '/system/foodRecord/' + menuFoodRecordId,
+    method: 'get'
+  })
+}
+
+// 新增每日食谱记录
+export function addFoodRecord(data) {
+  return request({
+    url: '/system/foodRecord',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改每日食谱记录
+export function updateFoodRecord(data) {
+  return request({
+    url: '/system/foodRecord/put',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除每日食谱记录
+export function delFoodRecord(menuFoodRecordId) {
+  return request({
+    url: '/system/foodRecord/delete/' + menuFoodRecordId,
+    method: 'get'
+  })
+}

+ 44 - 0
ruoyi-ui/src/api/system/in.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询会议室签到列表
+export function listIn(query) {
+  return request({
+    url: '/sign/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询会议室签到详细
+export function getIn(signInId) {
+  return request({
+    url: '/sign/' + signInId,
+    method: 'get'
+  })
+}
+
+// 新增会议室签到
+export function addIn(data) {
+  return request({
+    url: '/sign',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改会议室签到
+export function updateIn(data) {
+  return request({
+    url: '/sign/put',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除会议室签到
+export function delIn(signInId) {
+  return request({
+    url: '/sign/delete/' + signInId,
+    method: 'get'
+  })
+}

+ 44 - 0
ruoyi-ui/src/api/system/menuFood.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询每日食谱列表
+export function listMenuFood(query) {
+  return request({
+    url: '/system/menuFood/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询每日食谱详细
+export function getMenuFood(menuFoodId) {
+  return request({
+    url: '/system/menuFood/' + menuFoodId,
+    method: 'get'
+  })
+}
+
+// 新增每日食谱
+export function addMenuFood(data) {
+  return request({
+    url: '/system/menuFood',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改每日食谱
+export function updateMenuFood(data) {
+  return request({
+    url: '/system/menuFood/put',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除每日食谱
+export function delMenuFood(menuFoodId) {
+  return request({
+    url: '/system/menuFood/delete/' + menuFoodId,
+    method: 'get'
+  })
+}

+ 44 - 0
ruoyi-ui/src/api/tongj/config.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询考勤规则配置列表
+export function listConfig(query) {
+  return request({
+    url: '/kaoqin/config/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询考勤规则配置详细
+export function getConfig(kaoqinId) {
+  return request({
+    url: '/kaoqin/config/' + kaoqinId,
+    method: 'get'
+  })
+}
+
+// 新增考勤规则配置
+export function addConfig(data) {
+  return request({
+    url: '/kaoqin/config',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改考勤规则配置
+export function updateConfig(data) {
+  return request({
+    url: '/kaoqin/config/put',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除考勤规则配置
+export function delConfig(kaoqinId) {
+  return request({
+    url: '/kaoqin/config/delete/' + kaoqinId,
+    method: 'get'
+  })
+}

BIN
ruoyi-ui/src/assets/images/icon_yqht_ssjk_lb_normal.png


BIN
ruoyi-ui/src/assets/images/icon_yqht_xzsp_bzsp.png


BIN
ruoyi-ui/src/assets/images/pic_bzsp_btbg.png


BIN
ruoyi-ui/src/assets/images/pic_bzsp_cpbjb_bg.png


BIN
ruoyi-ui/src/assets/images/pic_bzsp_cpbjb_xqbg.png


BIN
ruoyi-ui/src/assets/images/pic_bzsp_dbbg.png


BIN
ruoyi-ui/src/assets/images/pic_bzsp_ymbg.png


BIN
ruoyi-ui/src/assets/images/pic_bzsp_z1.png


BIN
ruoyi-ui/src/assets/images/pic_bzsp_z2.png


BIN
ruoyi-ui/src/assets/images/pic_bzsp_z3.png


BIN
ruoyi-ui/src/assets/images/pic_bzsp_z4.png


BIN
ruoyi-ui/src/assets/images/pic_bzsp_z5.png


BIN
ruoyi-ui/src/assets/images/pic_bzsp_z6.png


BIN
ruoyi-ui/src/assets/images/pic_bzsp_z7.png


+ 14 - 1
ruoyi-ui/src/main.js

@@ -4,6 +4,8 @@ import Cookies from 'js-cookie'
 import VueUeditorWrap from 'vue-ueditor-wrap'
 import VueJsonp from 'vue-jsonp'
 import Print from 'vue-print-nb'
+import VueAMap from 'vue-amap';
+import BaiduMap from 'vue-baidu-map'
 
 import Element from 'element-ui'
 import './assets/styles/element-variables.scss'
@@ -88,9 +90,20 @@ Vue.use(plugins)
 Vue.use(VueMeta)
 Vue.use(Print)
 Vue.use(VideoPlayer)
+Vue.use(VueAMap);
+Vue.use(BaiduMap, {
+ // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
+ ak: 'Bjardsym8W1tLv0PmOAVfCosOLIiFdKX'
+})
 
-DictData.install()
 
+VueAMap.initAMapApiLoader({
+  key: 'your amap key',
+  plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],
+  // 默认高德 sdk 版本为 1.4.4
+  v: '1.4.4'
+});
+DictData.install()
 /**
  * If you don't want to use mock-server
  * you want to use MockJs for mock api

+ 1 - 1
ruoyi-ui/src/settings.js

@@ -1,7 +1,7 @@
 module.exports = {
 	// urls: `https://zxyyq.qs163.cn`,
   // http://47.99.82.249:5010
-	urls:`http://192.168.101.245:8065`,
+	urls:`http://192.168.101.168:8065`,
   // http://192.168.101.168:8065
   /**
    * 侧边栏主题 深色主题theme-dark,浅色主题theme-light

+ 2 - 2
ruoyi-ui/src/views/index.vue

@@ -313,7 +313,7 @@
 				        preload="auto"
 				        muted
 				        autoplay
-				  	  width="95%"
+				  	   width="95%"
 				  	  height="550px"
 				        type="rtmp/flv"
 				      >
@@ -604,7 +604,7 @@ export default {
 	  getListsheb() {
 	    this.loading = true;
 	    // this.queryParams
-		let nghet={ pageNo: 1,pageSize: 10,name:this.queryParamsy.name}
+		let nghet={ pageNo: 1,pageSize: 500,name:this.queryParamsy.name}
 	    camera(nghet).then(response => {
 	      this.postListf = response.data.data.list;
 	  	if(response.data.data != null){

+ 1084 - 0
ruoyi-ui/src/views/tongj/configss/index.vue

@@ -0,0 +1,1084 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" class="nghfs">
+		<p class="lqw" style="font-weight: 700;font-size: 15px;"> <img src="../../../assets/images/icon_yq_htgl_btzs.png" alt="" style="width:10px;height: 10px;margin-right: 10px;"> 搜索条件</p>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="是否拍照" prop="isPicture">
+            <el-select
+              v-model="queryParams.isPicture"
+              placeholder="拍照打卡"
+              clearable
+            >
+              <el-option
+                v-for="dict in dict.type.sys_yes_no"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <!-- <el-col :span="8">
+          <el-form-item label="上午上班" prop="kaTimeAmIn">
+            <el-time-picker
+                v-model="queryParams.kaTimeAmIn"
+                value-format=" HH:mm:ss"
+                format=" HH:mm:ss"
+                @change = "jksed"
+                 style="width: 280px;"
+                placeholder="请选择上午上班">
+              </el-time-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="上午下班" prop="kaTimeAmOut">
+            <el-time-picker
+                v-model="queryParams.kaTimeAmOut"
+                value-format=" HH:mm:ss"
+                format=" HH:mm:ss"
+                 style="width: 280px;"
+                placeholder="请选择上午下班">
+              </el-time-picker>
+            
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="下午上班" prop="kaTimePmIn">
+            <el-time-picker
+                v-model="queryParams.kaTimePmIn"
+                value-format=" HH:mm:ss"
+                format=" HH:mm:ss"
+                 style="width: 280px;"
+                placeholder="请选择下午上班">
+              </el-time-picker>
+            
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="下午下班" prop="kaTimePmOut">
+            <el-time-picker
+                v-model="queryParams.kaTimePmOut"
+                value-format=" HH:mm:ss"
+                format=" HH:mm:ss"
+                 style="width: 280px;"
+                placeholder="请选择下午下班">
+              </el-time-picker>
+            
+          </el-form-item>
+        </el-col> -->
+        <el-col :span="8">
+          <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-col>
+      </el-row>
+    </el-form>
+    
+	<div class="ntgs" >
+	   <div style="display: flex;align-items: center; margin-bottom: 10px;">
+	     <p class="lqw" style="font-weight: 700;font-size: 15px; margin: 0; margin-bottom: 0;"> <img src="../../../assets/images/icon_yq_htgl_btzs.png" alt="" style="width:10px;height: 10px;margin-right: 10px; margin-left: 10px;"> 打卡配置</p>
+    <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="['kaoqin:config: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="['kaoqin:config: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="['kaoqin:config:remove']"
+        >删除</el-button>
+      </el-col>
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['kaoqin:config:export']"
+        >导出</el-button>
+      </el-col> -->
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+	</div>
+
+    <el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange" :max-height="tableMaxHeight">
+      <el-table-column type="selection" width="55" align="center" />
+     <!-- <el-table-column label="配置id" align="center" prop="kaoqinId" />
+      <el-table-column label="部门id" align="center" prop="deptId" /> -->
+      <!-- <el-table-column label="部门名称" align="center" prop="deptName" /> -->
+      <el-table-column label="打卡地点" align="center" prop="locations" />
+      <!-- <el-table-column label="打卡地点经度" align="center" prop="kaLog" />
+      <el-table-column label="打卡地点维度" align="center" prop="kaLat" /> -->
+      <!-- <el-table-column label="打卡次数(一天)" align="center" prop="kaNum" width="180"/> -->
+      <el-table-column label="打卡距离(半径米)" align="center" prop="distance" width="180"/>
+       <!-- 1:上午上班 2:上午下班 3:下午上班 4:下午下班 -->
+      <!-- <el-table-column label="打卡分类" align="center" prop="kaSort" /> -->
+      <el-table-column label="上班" align="center" prop="startWorkTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ scope.row.startWorkTime }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="下班" align="center" prop="endWorkTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ scope.row.endWorkTime }}</span>
+        </template>
+      </el-table-column>
+	  <el-table-column label="是否拍照" align="center" prop="isPicture" width="100">
+	    <template slot-scope="scope">
+	      <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isPicture"/>
+	    </template>
+	  </el-table-column>
+      <!-- <el-table-column label="下午上班" align="center" prop="kaTimePmIn" width="180">
+        <template slot-scope="scope">
+          <span>{{ scope.row.kaTimePmIn}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="下午下班" align="center" prop="kaTimePmOut" width="180">
+        <template slot-scope="scope">
+          <span>{{ scope.row.kaTimePmOut }}</span>
+        </template>
+      </el-table-column> -->
+
+      <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['kaoqin:config:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['kaoqin:config: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"
+    />
+	</div>
+
+    <!-- 添加或修改考勤规则配置对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+        <!-- <el-form-item label="部门id" prop="deptId">
+          <el-input v-model="form.deptId" placeholder="请输入部门id" />
+        </el-form-item> -->
+        <el-row>
+          <el-col :span="24" >
+            <el-form-item label="打卡地点" prop="locations" class="oiue">
+              <!-- @ready="handler" -->
+              <baidu-map  :center="mapCenter" :zoom="zoom" @click ="getLocationPoint"  class="iuey" :scroll-wheel-zoom="true" :autoViewport="true">
+                       <bm-view class="bm-view"></bm-view>
+                         <bm-control :offset="{width: '10px', height: '10px'}">
+                  <!-- <bm-auto-complete v-model="form.address" :sugStyle="{zIndex: 99}"> -->
+                    <!-- <el-input placeholder="请输入地名关键字" v-model="form.address" @blur = "boiu" @focus= "faie"></el-input>  -->
+
+                  <!-- <search-field placeholder="请输入地名关键字"></search-field>  -->
+                  <!-- 这里指代一个自定义搜索框组件 -->
+                  <!-- </bm-auto-complete> -->
+                   <bm-marker v-if="nhe" :position="{lng:form.lon, lat: form.lat}"></bm-marker>
+                   <el-autocomplete
+                    v-model="form.locations"
+                    :fetch-suggestions="querySearch"
+                    placeholder="请输入打卡地点"
+                    @change="dessde"
+                    style="width: 100%"
+                    :trigger-on-focus="false"
+                    @select="handleSelect"
+                  />
+                </bm-control>
+                <!-- :pageCapacity = "20" nhesf-->
+                <!-- <bm-local-search :keyword="form.address" :auto-viewport="true" class="pui" @searchcomplete = "oieueo" v-show="okuyt" @confirm= "confirmf" :location="location" ></bm-local-search>  :panel ="false"-->
+                <bm-local-search  :keyword="form.locations" :auto-viewport="true" :pageCapacity = "20" :location="location" :forceLocal="false"  @searchcomplete ="oieueo"  @markersset = "confirmf" :panel ="false" ></bm-local-search>
+              </baidu-map>
+            </el-form-item>
+
+          </el-col>
+          <el-col :span="24">
+            <!-- <el-col :span="8">
+            <el-form-item label="打卡次数" prop="kaNum">
+              <el-select
+                v-model="form.kaNum"
+                placeholder="打卡次数"
+                clearable
+                @change="jues"
+              >
+                <el-option
+                  v-for="dict in cinume"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                />
+              </el-select>
+            </el-form-item>
+            </el-col> -->
+            <el-col :span="6">
+              <el-form-item label="拍照打卡" prop="isPicture">
+                <el-select
+                  v-model="form.isPicture"
+                  placeholder="拍照打卡"
+                  clearable
+				  
+                >
+                  <el-option
+                    v-for="dict in dict.type.sys_yes_no"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="打卡距离" prop="distance">
+                <el-input v-model="form.distance" placeholder="请输入打卡距离(半径,单位米)" />
+              </el-form-item>
+            </el-col>
+			<el-col :span="6">
+			  <el-form-item label="上班" prop="startWorkTime">
+			    <el-time-picker
+				style="width: 160px;"
+			        v-model="form.startWorkTime"
+			        value-format="HH:mm:ss"
+			        format="HH:mm:ss"
+			        placeholder="请选择上午上班">
+			      </el-time-picker>
+			    
+			  </el-form-item>
+			</el-col>
+			<el-col :span="6">
+			  <el-form-item label="下班" prop="endWorkTime">
+			    <el-time-picker
+				style="width: 140px;"
+			        v-model="form.endWorkTime"
+			        value-format="HH:mm:ss"
+			        format="HH:mm:ss"
+			        placeholder="请选择下午下班">
+			      </el-time-picker>
+			  </el-form-item>
+			</el-col>
+          </el-col>
+		  
+		
+
+
+
+
+          <!-- <el-col :span="8">
+            <el-form-item label="打卡分类" prop="kaSort">
+              <el-select
+                v-model="form.kaSort"
+                placeholder="打卡分类"
+                clearable
+              >
+                <el-option
+                  v-for="dict in dict.type.sys_normal_disable"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col> -->
+          <!-- <el-col :span="12">
+            <el-form-item label="上午上班" prop="startWorkTime">
+              <el-time-picker
+                  v-model="form.startWorkTime"
+                  value-format="HH:mm:ss"
+                  format="HH:mm:ss"
+                  placeholder="请选择上午上班">
+                </el-time-picker>
+              
+            </el-form-item>
+          </el-col> -->
+          <el-col :span="12" v-show="time">
+            <el-form-item label="上午下班" :prop="time == true?'kaTimeAmOut' : ''" >
+              <el-time-picker
+                  v-model="form.kaTimeAmOut"
+                  value-format="HH:mm:ss"
+                  format="HH:mm:ss"
+                  placeholder="请选择上午下班">
+                </el-time-picker>
+              <!-- <el-date-picker clearable
+                v-model="form.kaTimeAmOut"
+                type="datetime"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                format="yyyy-MM-dd HH:mm:ss"
+                placeholder="请选择上午下班">
+              </el-date-picker> -->
+            </el-form-item>
+          </el-col>
+          <el-col :span="8" v-show="time">
+            <el-form-item label="下午上班" :prop="time == true?'kaTimePmIn' : ''">
+              <el-time-picker
+                  v-model="form.kaTimePmIn"
+                  value-format="HH:mm:ss"
+                  format="HH:mm:ss"
+                  placeholder="请选择下午上班">
+                </el-time-picker>
+              <!-- <el-date-picker clearable
+                v-model="form.kaTimePmIn"
+                type="datetime"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                format="yyyy-MM-dd HH:mm:ss"
+                placeholder="请选择下午上班">
+              </el-date-picker> -->
+            </el-form-item>
+          </el-col>
+		  <!-- 8 -->
+         <!-- <el-col :span="8">
+            <el-form-item label="下午下班" prop="endWorkTime">
+              <el-time-picker
+                  v-model="form.endWorkTime"
+                  value-format="HH:mm:ss"
+                  format="HH:mm:ss"
+                  placeholder="请选择下午下班">
+                </el-time-picker>
+              
+            </el-form-item>
+          </el-col> -->
+          <!-- <el-col :span="8" v-if="njki">
+            <el-form-item label="部门名称" prop="deptId">
+              <treeselect v-model="form.deptId" @select="selectDepart" :options="deptOptions" :show-count="true" placeholder="请选择部门名称" />
+            </el-form-item>
+          </el-col> -->
+          <!-- <el-col :span=" 8">
+            <el-form-item label="备注" prop="remark">
+              <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+            </el-form-item>
+          </el-col> -->
+        </el-row>
+
+        <!-- <el-form-item label="打卡地点经度" prop="kaLog">
+          <el-input v-model="form.kaLog" placeholder="请输入打卡地点经度" />
+        </el-form-item>
+        <el-form-item label="打卡地点维度" prop="kaLat">
+          <el-input v-model="form.kaLat" 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 { listConfig, getConfig, delConfig, addConfig, updateConfig } from "@/api/tongj/config";
+import { listSchedule, getSchedule, delSchedule, addSchedule, updateSchedule } from "@/api/system/schedule";
+import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus } from "@/api/system/user";
+import store from '@/store'
+import { treeselect } from "@/api/system/dept";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+const defaultSettings = require("@/settings.js");
+export default {
+  name: "Schedule",
+  dicts: ['sys_normal_disable','sys_yes_no'],
+  components: { Treeselect },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      defaultSettings,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      mapCenter: {
+        lng:116.587611,
+        lat:30.636756
+      },
+      mapLocation: {
+        address: undefined,
+        coordinate: undefined
+      },
+      zoom:11,
+      okuyt:true,
+      nameadd:[],
+      kdourg:[{'value':'抱歉,没有搜索到位置请重新输入'}],
+      location:'',
+       cb:undefined,
+      // 考勤规则配置表格数据
+      configList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      nhesf:0,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        deptId: null,
+        locations: null,
+        lon: null,
+        lat: null,
+        kaNum: null,
+        distance: null,
+        kaSort: null,
+        startWorkTime: null,
+        kaTimeAmOut: null,
+        kaTimePmIn: null,
+        endWorkTime: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        isPicture:[
+          { required: true, message: "不能为空", trigger: "blur" }
+        ],
+        locations: [
+          { required: true, message: "打卡地点名称不能为空", trigger: "blur" }
+        ],
+        // deptId: [
+        //   { required: true, message: "不能为空", trigger: "blur" }
+        // ],
+        // kaNum: [
+        //   { required: true, message: "打卡次数(一天几次打卡)不能为空", trigger: "blur" }
+        // ],
+        distance: [
+          { required: true, message: "打卡距离(半径)不能为空", trigger: "blur" }
+        ],
+        // kaSort: [
+        //   { required: true, message: "打卡分类 1:上午上班 2:上午下班 3:下午上班 4:下午下班不能为空", trigger: "blur" }
+        // ],
+        startWorkTime: [
+          { required: true, message: "打卡时间 -上午上班不能为空", trigger: "blur" }
+        ],
+        // kaTimeAmOut: [
+        //   { required: true, message: "打卡时间 -上午下班不能为空", trigger: "blur" }
+        // ],
+        // kaTimePmIn: [
+        //   { required: true, message: "打卡时间 -下午上班不能为空", trigger: "blur" }
+        // ],
+        endWorkTime: [
+          { required: true, message: "打卡时间 -下午下班不能为空", trigger: "blur" }
+        ],
+      },
+      cinume:[{'value' : 2,'label':'一天两次'},{'value' : 4,'label':'一天四次'}],
+      time:false,
+      // 部门树选项
+      deptOptions: undefined,
+      opende:false,
+      tableMaxHeight:'200',
+      njki:false,
+      nhe:false,
+      center:{
+        lng:'',
+        lat:''
+      },
+      hfes:false,
+      jde:[]
+    };
+  },
+  created() {
+    // this.queryParams.deptId = store.getters.deptid
+    this.getList();
+    // this.getTreeselect()
+    console.log(store)
+    window.onresize = () => {
+          this.changeTableMaxHeight()
+        }
+        this.changeTableMaxHeight()
+  },
+  methods: {
+
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+
+    /** 查询考勤规则配置列表 */
+    getList() {
+      this.loading = true;
+      listSchedule(this.queryParams).then(response => {
+        this.configList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        kaoqinId: null,
+        deptId: null,
+        locations: null,
+        lon: null,
+        lat: null,
+        kaNum: null,
+        distance: null,
+        kaSort: null,
+        startWorkTime: null,
+        kaTimeAmOut: null,
+        kaTimePmIn: null,
+        endWorkTime: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null,
+		isPicture:'Y'
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.kaoqinId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+	
+	 ba_gd(bd_lat,bd_lon){
+		 let x_pi = 3.14159265358979324 * 3000.0 / 180.0;
+	     let  x = Number(bd_lon- 0.0065) 
+	     let y = Number( bd_lat- 0.006)
+	     let z = Number(Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi))
+	     let theta = Number(Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi))
+	     bd_lon  = Number(z * Math.cos(theta))
+	     bd_lat  = Number(z * Math.sin(theta))
+		 this.form.lat = bd_lat
+		 this.form.lon = bd_lon
+	},
+	
+	// 高德转百度
+	ga_bd(gd_lon,gd_lat){
+		let x_pi = 3.14159265358979324 * 3000.0 / 180.0;;
+	     let x = lng;
+	        let y = lat;
+	        let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi);
+	        let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi);
+	        let lngs = z * Math.cos(theta) + 0.0065;
+	        let lats = z * Math.sin(theta) + 0.006;
+		 this.form.lat = lats
+		 this.form.lon = lngs
+	     console.log(lngs);
+	     console.log(lats);
+		 this.open = true;
+	},
+	
+
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.nhe = false
+      this.title = "添加考勤规则配置";
+      this.njki = true
+      this.nhesf = 20
+      this.mapCenter.lng = 116.587611
+      this.mapCenter.lat = 30.636756
+      // this.handler()
+      // this.form.deptId = store.getters.deptid
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      this.nhe = true
+      const kaoqinId = row.dutyId || this.ids
+      this.njki = false
+      getSchedule(kaoqinId).then(response => {
+        this.form = response.data;
+		if(this.form.lat != null){
+			let x_pi = 3.14159265358979324 * 3000.0 / 180.0;;
+			 let x = this.form.lon;
+			    let y = this.form.lat;
+			    let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi);
+			    let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi);
+			    let lngs = z * Math.cos(theta) + 0.0065;
+			    let lats = z * Math.sin(theta) + 0.006;
+			 this.form.lat = lats
+			 this.form.lon = lngs
+			 console.log(lngs);
+			 console.log(lats);
+			 this.open = true;
+			// this.ga_bd(this.form.lat,this.form.lon)
+		}
+		
+        // this.center.lng = this.form.lng
+        // this.center.lat = this.form.lat
+        this.nameadd = []
+        this.hfes = true
+        // this.mapCenter = this.form.kaAddress
+        this.nhe = true
+		this.open = true;
+		
+        // this.makerCenter(this.form.kaAddress)
+        
+        this.title = "修改考勤规则配置";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+		  this.ba_gd(this.form.lat,this.form.lon)
+          if (this.form.dutyId != null) {
+            updateSchedule(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addSchedule(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const kaoqinIds = row.dutyId || this.ids;
+      this.$modal.confirm('是否确认删除考勤规则配置编号为"' + kaoqinIds + '"的数据项?').then(function() {
+        return delSchedule(kaoqinIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('kaoqin/config/export', {
+        ...this.queryParams
+      }, `config_${new Date().getTime()}.xlsx`)
+    },
+    // 、、地图
+    getLocationPoint(e){
+     console.log(e,76);
+     this.center.lng = e.point.lng
+     this.center.lat = e.point.lat
+     this.form.lat = e.point.lat
+     this.form.lon = e.point.lng
+     // this.mapCenter.lng = this.form.lng
+     // this.mapCenter.lat = this.form.lat
+     this.nhe = true
+     var point = new BMap.Point(e.point.lng, e.point.lat);
+                       var gc = new BMap.Geocoder();
+                       let _this = this;
+                       gc.getLocation(point, function (rs) {
+                           var addComp = rs.addressComponents;
+                           console.log(rs.addressComponents,3);//地址信息
+                           console.log(rs)
+        })
+    },
+    searchcomplete(e){
+      console.log(e);
+    },
+    querySearch(queryString,cb) {
+      // console.log(e);
+      // this.keyword = e
+      // results, cb
+      // var that = this
+      // var myGeo = new this.BMap.Geocoder()
+      // console.log(queryString, cb);
+
+      // myGeo.getPoint(queryString, function(point) {
+      //   console.log(point);
+      //   // var point = '安庆市'
+
+      //   if (point) {
+      //     that.mapLocation.coordinate = point
+      //     that.makerCenter(point)
+      //   } else {
+      //     that.mapLocation.coordinate = null
+      //   }
+      // }, this.locationCity)
+      // console.log(this.locationCity);
+
+      // var options = {
+      //   onSearchComplete: function(results) {
+      //     console.log(local.getStatus());
+
+      //     if (local.getStatus() === 0) {
+      //       // 判断状态是否正确
+      //       var s = []
+      //       console.log(results.getCurrentNumPois());
+
+      //       for (var i = 0; i < results.getCurrentNumPois(); i++) {
+      //         var x = results.getPoi(i)
+      //         console.log(x);
+
+      //         var item = { value: x.address + x.title, point: x.point }
+      //         s.push(item)
+      //         // console.log(s);
+
+      //         cb(s)
+      //       }
+      //       // console.log(s);
+
+      //     } else {
+      //       cb()
+      //     }
+      //   }
+      // // this.oieueo(results)
+      console.log(queryString);
+      if(this.hfes == true){
+       this.center.lng = this.form.lng
+       this.center.lat = this.form.lat
+      }
+      var item = []
+      var x = ''
+      //  this.nameadd = queryString.Ir
+      // queryString.value = ''
+       for(var i = 0 ; i <  this.nameadd.length; i++){
+         console.log(queryString[i]);
+        // var item = { value: this.nameadd[i].address + this.nameadd[i].title, point: this.nameadd[i].point }
+        // if(queryString[i].address == undefined){
+        //     queryString[i].address = ''
+        // }
+        //  x= this.nameadd[i].address + this.nameadd[i].title
+        // item.push(x)
+       this.nameadd[i].value = this.nameadd[i].address + this.nameadd[i].title
+       console.log(this.nameadd[i].value);
+
+      //  this.nameadd.push( item)
+         }
+        //  this.nameadd = item
+         console.log(this.nameadd);
+        //  this.cb = cb
+        // if(this.njki == true){
+           cb(this.nameadd)
+           if(this.nameadd.length != 0){
+             // console.log(local.getStatus());
+
+           }else{
+             cb(this.kdourg)
+           }
+        // }
+
+
+
+      console.log(this.nameadd);
+
+      // }
+      // console.log(options );
+    // var local = new this.BMap.LocalSearch('安庆市', options)
+
+    // console.log(queryString );
+      // local.search(queryString)
+    },
+    handleSelect(item) {
+      var { point } = item
+      this.mapLocation.coordinate = point
+      this.form.lat = point.lat
+      this.form.lon = point.lng
+      console.log(this.form.lat,this.form.lon);
+      // this.makerCenter(point)
+    },
+    // handler({ BMap, map }) {
+    //   // console.log(2)
+    //   // this.center.lng = this.form.lng
+    //   // this.center.lat = this.form.lat
+    //   this.map = map
+    //   // console.log(this.map,map,999999);
+    //   // console.log(this.map)
+
+    //   // if (this.map) {
+    //     // this.map.clearOverlays()
+    //     // this.map.addOverlay(new this.BMap.Marker(point))
+    //     this.mapCenter.lng = '30.636756'
+    //     this.mapCenter.lat = '116.587611'
+    //     // this.mapCenter = '安庆市'
+    //     // this.mapZoom = 15
+    //   // }
+    // },
+    oieueo(results,cb){
+     //  console.log(results,cb);
+    // console.log(results.Hr,3);
+    console.log(this.form,87);
+     // if(this.form.address == ''){
+     //   this.nameadd = []
+     // }else{
+     //  this.nameadd = results.Ir
+     // }
+    // var allOverlay = this.map.getOverlays();
+    // console.log(allOverlay,897)
+    // this.map.removeOverlay(allOverlay[allOverlay.length-1]);
+
+     if(this.njki == false){
+       this.jde = []
+       this.nhesf = 0
+       this.nameadd = this.jde.push(results)
+       this.center.lng = this.form.lon
+       this.center.lat = this.form.lat
+       this.mapCenter.lng = this.form.lon - 0
+       this.mapCenter.lat = this.form.lat - 0
+       console.log(this.mapCenter,897)
+       this.querySearch(this.nameadd,this.cb)
+       // this.mapCenter = this.form.kaAddress
+       // return
+
+       // this.querySearch(this.nameadd)
+     }else{
+       this.mapCenter.lng= 116.587611
+       this.mapCenter.lat = 30.633773
+       this.querySearch(this.nameadd,this.cb)
+     }
+
+      console.log(this.nameadd);
+
+     //  var cb= cb
+
+     // }
+
+
+     //  results,cb
+
+     //  this.nameadd.
+     //  var local = new this.BMap.LocalSearch(this.map, options)
+     //   local.search(queryString)
+
+     },
+     dessde(e){
+       console.log(e,890)
+       this.njki = true
+       this.nhesf = 20
+     },
+     //选中数据
+     confirmf(e){
+       console.log(143);
+       console.log(e.length,this.nameadd);
+
+       if(this.njki == false){
+         return
+       }
+       this.nameadd = e
+       console.log(e.length,this.nameadd);
+     },
+     jues(e){
+        console.log(e);
+        if(e==4){
+          this.time = true
+        }else{
+          this.time = false
+          this.form.kaTimeAmOut = null
+          this.form.kaTimePmIn = null
+        }
+     },
+     jksed(){
+       console.log(this.queryParams.startWorkTime)
+     },
+     selectDepart(val){
+       console.log(val)
+       this.form.deptName =val.label
+     },
+     // 获取屏幕高度
+     showFilterForm () {
+           this.filterActive = !this.filterActive
+           this.changeTableMaxHeight()
+         },
+
+         changeTableMaxHeight () {
+           let height = document.body.offsetHeight // 网页可视区域高度
+           // if (this.filterActive) {
+           //   this.tableMaxHeight = height - 320
+           // } else {
+             this.tableMaxHeight = height - 250
+           // }
+           console.log(height)
+         }
+  }
+};
+</script>
+<style rel="stylesheet/scss" lang="scss">
+  .BMap_cpyCtrl {
+     display: none;
+   }
+  .anchorBL {
+     display: none;
+}
+.xioaq-from{
+  text-align: right
+
+}
+.xioaq_formit{
+  margin-bottom: 10px
+}
+.input-with-select{
+  width: 50%;
+  float: right;
+  margin-bottom: 20px
+}
+.el-cascader{
+  width: 100%;
+}
+.bm-view {
+  width: 100%;
+  height: 300px;
+}
+.oiue{
+  height: 300px;
+}
+.pui{
+  height: 100px;
+  position: absolute;
+  top: 40px;
+  left: 0;
+  z-index: 99;
+  // overflow: hidden;
+}
+.anchorTL{
+  width: 100%;
+}
+.app-container{
+  // padding: 0 !important;
+}
+.BMap_mask{
+  // background-color: #fff !important;
+}
+</style>
+<style lang="scss">
+	.nhgrls{
+		.el-dialog__body{
+			padding: 0;
+		}
+	}
+  .hyr{
+    span{
+      text-decoration:underline;
+    }
+  }
+</style>
+<style scoped lang="scss">
+  .iuer{
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    .ite{
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      p{
+        margin: 0;
+        font-size: 15px;
+        font-family: PingFang SC;
+        font-weight: 500;
+        color: #AAAAAA;
+        padding: 4px 12px;
+        background: #F7F8FA;
+        border-radius: 4px;
+        margin-right: 20px;
+      }
+      .actt{
+        background: #E6EBFF;
+        border: 1px solid #5974E0;
+        border-radius: 4px;
+        color: #5974E0;
+      }
+
+    }
+  }
+  .lqw{
+    padding: 0 10px;
+    margin: 0;
+    margin-bottom: 20px;
+  }
+.nhgel{
+  height: 170px;
+  background-color: #313b61;
+  width: 100%;
+  position: absolute;
+  top:0;
+  left:0;
+  z-index: 0;
+}
+	.app-container{
+		background-color: #f3f4f6;
+		padding-top: 10px;
+	   
+	}
+	.ntgs{
+	position: relative;
+		background-color: #fff;
+		padding: 5px;
+		// border-radius: 5px;
+		padding-top: 10px;
+	     padding: 10px 20px;
+		 padding-left: 10px;
+		.pagination-container{
+			height: 50px;
+		}
+	}
+	.nghfs{
+	position: relative;
+		background-color: #fff;
+		padding-top: 18px !important;
+		padding: 5px;
+		// border-radius: 5px;
+		// margin-bottom: 20px;
+	}
+	.ksf{
+		img{
+			width:100%;
+			height: 100%;
+		}
+	}
+
+</style>

+ 175 - 8
ruoyi-ui/src/views/tongj/food/index.vue

@@ -126,9 +126,10 @@
 	</div>
 
     <!-- 添加或修改订餐预约对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body class="nhgrlsw">
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
 		  <el-row>
+			 
 			  <el-col :span="12">
 				<el-form-item label="就餐人员名称" prop="orderFoodUser">
 				    <el-input disabled v-model="form.orderFoodUser" placeholder="请输入就餐人员名称" />
@@ -169,16 +170,77 @@
 		  			  </el-col>
 		  </el-row>
       </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
+      <div slot="footer" class="dialog-footer" style="display: flex;justify-content: space-between;align-items: center;">
+		  <div style="margin-left: 10px;display: flex;align-items: center;">
+			  <img style="width: 15px;height: 15px;" src="../../../assets/images/icon_yqht_xzsp_bzsp.png" alt="" >
+			 <p style="margin: 0; text-align: right;color: #FE5A0E;cursor: pointer;margin-bottom: 0;margin-left: 10px;" @click="ongis">每日食谱</p>  
+		  </div>
+        <div>
+			<el-button type="primary" @click="submitForm">确 定</el-button>
+			<el-button @click="cancel">取 消</el-button>
+		</div>
       </div>
     </el-dialog>
+	 <el-dialog title="每周食谱" :visible.sync="openm" width="780px" append-to-body>
+		 <div>
+		 	  						 <div class="yaunbei" style="position: relative;">
+		 	  							 <div class="yaunbei_one" style="position: relative; z-index: 22;">
+		 	  								 <p style="font-size: 29px;color: #FFFFFE;position: absolute;top: 143px;left: 183px;">{{weekst}}</p>
+		 	  							 </div>
+		 	  							 <div class="yaunbei_two" style="position: relative;margin-top: -140px; ">
+		 	  								<div v-for="(item,index) in  menuFoodList" :key="index" style="margin-top: 30px;">
+		 	  									<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z1.png" alt="" v-if="item.menuFoodTime == '星期一'">
+												<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z2.png" alt="" v-if="item.menuFoodTime == '星期二'">
+												<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z3.png" alt="" v-if="item.menuFoodTime == '星期三'">
+												<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z4.png" alt="" v-if="item.menuFoodTime == '星期四'">
+												<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z5.png" alt="" v-if="item.menuFoodTime == '星期五'">
+												<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z6.png" alt="" v-if="item.menuFoodTime == '星期六'">
+												<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z7.png" alt="" v-if="item.menuFoodTime == '星期日'">
+		 	  								   <div style="display: flex;
+		 									   align-items: flex-start;padding: 0 12px; margin-top: 25px;">
+		 										   <span style="background: #FFE0AE;
+		                                    border-radius: 16px;font-weight: 400;
+		 											font-size: 25px;color: #161616;
+		 											width: 24%;text-align: center;padding: 3px 0;">午餐</span>
+		 										   <p style="margin: 0; margin-left: 20px; 
+		 										   font-weight: 400;font-size: 25px;color: #382324;">{{item.menuFoodDetailLu == null?'暂无数据' : item.menuFoodDetailLu}}</p>
+		 									   </div>
+		 									   <div style="display: flex;
+		 									   align-items: flex-start;padding: 0 12px; margin-top: 25px;">
+		 									   		<span style="background: #DCF1FF;
+		 									        border-radius: 16px;font-weight: 400;
+		 									   		font-size: 25px;color: #161616;
+		 									   		width: 24%;text-align: center;padding: 3px 0;">晚餐</span>
+		 									   		<p style="margin: 0; margin-left: 20px; 
+		 									   		font-weight: 400;font-size: 25px;color: #382324;">{{item.menuFoodDetailDi == null?'暂无数据' : item.menuFoodDetailDi}}</p>
+		 									   </div>
+		 									</div>
+											<div style="position: absolute; bottom: -60px; right: 0;">
+												<img style="width: 580px;height: 265px;" src="../../../assets/images/pic_bzsp_dbbg.png" alt="">
+											</div>
+											<img src="../../../assets/images/pic_bzsp_cpbjb_xqbg.png" alt="" style="position: absolute; top: 300px;left: -20px;height: 72%;">
+		 	  							 </div>
+										 
+		 	  						 </div>
+									 <!-- <div slot="footer" class="dialog-footer">
+									   <el-button @click="cancel">取 消</el-button>
+									 </div> -->
+		 	  						 
+		 	  					 </div>
+	</el-dialog>
+	
   </div>
 </template>
 
 <script>
 import { listFood, getFood, delFood, addFood, updateFood } from "@/api/system/food";
+import {
+		listMenuFood,
+		getMenuFood,
+		delMenuFood,
+		addMenuFood,
+		updateMenuFood
+	} from "@/api/system/menuFood";
 
 export default {
   name: "Food",
@@ -203,6 +265,8 @@ export default {
       title: "",
       // 是否显示弹出层
       open: false,
+	  openm:false,
+	  menuFoodList:[],
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -219,12 +283,21 @@ export default {
       form: {},
       // 表单校验
       rules: {
-      }
+      },
+	  week:[],
+	  weekst:''
     };
   },
   created() {
-	  
+	  let data=[]
+	        for(let i=0;i <= 6;i++){
+	              data.push(this.getWeek(i))
+	        }
+	this.week=data;
+	this.weekst = this.week[0] + '-' +this.week[this.week.length-1]
+	console.log(this.weekst)
     this.getList();
+	this.getListm()
   },
   methods: {
     /** 查询订餐预约列表 */
@@ -236,11 +309,84 @@ export default {
         this.loading = false;
       });
     },
+	getListm() {
+		this.loading = true;
+		let nsgs={'pageNum': 1,'pageSize': 7,'isUse':'Y'}
+		listMenuFood(nsgs).then(response => {
+			// this.menuFoodList = response.rows;
+			let ilseli =['星期一','星期二','星期三','星期四','星期五','星期六','星期日']
+			let ilselif =['星期一','星期二','星期三','星期四','星期五','星期六','星期日']
+			let njgw = []
+				response.rows.filter(rou=>{
+					rou.menuFoodTime = rou.menuFoodTime.replace(/\s*/g,'');
+					for(var i=0;i< ilseli.length;i++ ){
+						if(rou.menuFoodTime == ilseli[i]){
+							ilseli.splice(i,1)
+						}
+					}
+				})
+				if(response.rows.length < 7){
+				for(var h=0;h< ilseli.length;h++ ){
+					let nhg={'menuFoodTime':ilseli[h],'menuFoodDetailDi':'暂无数据','menuFoodDetailLu':'暂无数据'}
+				    response.rows.push(nhg)
+				}
+				 response.rows.filter(roug=>{
+					 if(roug.menuFoodTime == '星期一'){
+						ilselif[0] = roug
+					 }
+					 if(roug.menuFoodTime == '星期二'){
+					 	ilselif[1] =roug
+					 }
+					 if(roug.menuFoodTime == '星期三'){
+					 	ilselif[2] = roug
+					 }
+					 if(roug.menuFoodTime == '星期四'){
+					 	ilselif[3] = roug
+					 }
+					 if(roug.menuFoodTime == '星期五'){
+					 	ilselif[4] = roug 
+					 }
+					 if(roug.menuFoodTime == '星期六'){
+					 	ilselif[5] = roug
+					 }
+					 if(roug.menuFoodTime == '星期日'){
+					 	ilselif[6] = roug
+					 }
+					 
+				 })
+				 this.menuFoodList = ilselif
+			}
+			this.total = response.total;
+			this.loading = false;
+		});
+	},
+	 getWeek (day) {
+	          var today = new Date();
+	          var targetday_milliseconds=today.getTime() + 1000*60*60*24*day;
+	          today.setTime(targetday_milliseconds);
+	          var tYear = today.getFullYear();
+	          var tMonth = today.getMonth();
+	          var tDate = today.getDate();
+	          tMonth = this.doHandleMonth(tMonth + 1);
+	          tDate =  this.doHandleMonth(tDate);
+	          return tMonth+"/"+tDate;
+	      },
+	      doHandleMonth(month){
+	         var m = month;
+	         if(month.toString().length == 1){
+	            m = "0" + month;
+	         }
+	         return m;
+	      },
+	
     // 取消按钮
     cancel() {
       this.open = false;
       this.reset();
     },
+	ongis(){
+		this.openm = true
+	},
     // 表单重置
     reset() {
       this.form = {
@@ -334,9 +480,9 @@ export default {
 };
 </script>
 <style lang="scss">
-	.nhgrls{
+	.nhgrlsw{
 		.el-dialog__body{
-			padding: 0;
+			padding-top: 10px;
 		}
 	}
   .hyr{
@@ -419,6 +565,27 @@ export default {
 			height: 100%;
 		}
 	}
+	.yaunbei{
+		background: url('../../../assets/images/pic_bzsp_ymbg.png') no-repeat;
+		background-size: 100% 100%;
+		padding-bottom: 90px;
+	}
+	.yaunbei_one{
+		height: 290px;
+		width: 550px;
+		background: url('../../../assets/images/pic_bzsp_btbg.png') no-repeat;
+		background-size: 549px 290px;
+		margin-left: 50%;
+		transform: translateX(-50%);
+	}
+	.yaunbei_two{
+		width: 650px;
+		padding: 150px 65px 180px 65px;
+		background: url('../../../assets/images/pic_bzsp_cpbjb_bg.png') no-repeat;
+		background-size: 649px 100%;
+		margin-left: 50%;
+		transform: translateX(-50%);
+	}
 
 </style>
 

+ 509 - 0
ruoyi-ui/src/views/tongj/foodRecord/index.vue

@@ -0,0 +1,509 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="140px" class="nghfs">
+        <p class="lqw" style="font-weight: 700;font-size: 15px;"> <img src="../../../assets/images/icon_yq_htgl_btzs.png" alt="" style="width:10px;height: 10px;margin-right: 10px;"> 搜索条件</p>
+      <el-form-item label="食谱日期 周一" prop="menuFoodTime">
+        <el-select v-model="queryParams.menuFoodTime" placeholder="请选择食谱日期 周一" clearable>
+          <el-option
+            v-for="dict in dict.type.week"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="记录时间" prop="recordTime">
+        <el-date-picker clearable
+          v-model="queryParams.recordTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="请选择记录时间">
+        </el-date-picker>
+      </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>
+    <div class="ntgs" >
+    <div style="display: flex;align-items: center; margin-bottom: 10px;">
+      <p class="lqw" style="font-weight: 700;font-size: 15px; margin: 0; margin-bottom: 0;"> <img src="../../../assets/images/icon_yq_htgl_btzs.png" alt="" style="width:10px;height: 10px;margin-right: 10px;"> 食谱记录</p>
+    <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="['system:foodRecord: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="['system:foodRecord: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="['system:foodRecord:remove']"
+        >删除</el-button>
+      </el-col> -->
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['system:foodRecord:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+	</div>
+	
+	<div>
+					 <div>
+						 <el-row :gutter="20" v-if="foodRecordList.length !=0">
+							 <el-col :span="8" v-for="(item,index) in foodRecordList" :key="index" style="margin-bottom: 20px;">
+								 <div class="foord">
+									<div class="foorso" style="height: 60px;">
+										<p ><span style="margin-right: 10px;"></span><dict-tag :options="dict.type.week" :value="item.menuFoodTime" /></p>
+										<p>{{item.recordTime == null?'暂无数据' : item.recordTime}}</p>
+									</div> 
+									<div style="border-bottom: 1px solid #DADADA;padding-top: 15px;padding-bottom: 15px;" class="foorset">
+										<div>
+											<span>午餐:</span><p>{{item.menuFoodDetailLu == null?'暂无数据' : item.menuFoodDetailLu}}</p>
+										</div>
+										<div>
+											<span style="color: #28C529;">晚餐:</span><p>{{item.menuFoodDetailDi == null?'暂无数据' : item.menuFoodDetailDi}}</p>
+										</div>
+									</div>
+									<div style="display: flex;align-items: center;height: 40px;">
+										<p @click="handleDelete(item)"
+								v-hasPermi="['system:foodRecord:remove']" style="flex:1;line-height: 40px; text-align: center; border-right: 1px solid #DADADA;color: #FF6969;font-weight: bold;font-size: 14px;">删除</p>
+										<!-- <p  @click="handleUpdate(item)"
+								v-hasPermi="['system:menuFood:edit']" style="flex:1;line-height: 40px;text-align: center;color: #5F8BF4;font-weight: bold;font-size: 14px;">修改</p> -->
+									</div>
+								 </div>
+							 </el-col>
+						 </el-row>
+						 <div v-if="foodRecordList.length ==0">
+						 						 <el-empty description="暂无数据"></el-empty>
+						 </div>
+					 </div>
+	</div>
+
+    <!-- <el-table v-loading="loading" :data="foodRecordList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="食谱日期" align="center" prop="menuFoodTime">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.week" :value="scope.row.menuFoodTime"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="食谱早餐详情" align="center" prop="menuFoodDetailBk" />
+      <el-table-column label="食谱中餐详情" align="center" prop="menuFoodDetailLu" />
+      <el-table-column label="食谱晚餐详情" align="center" prop="menuFoodDetailDi" />
+      <el-table-column label="记录时间" align="center" prop="recordTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.recordTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <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="['system:foodRecord:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['system:foodRecord: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"
+    />
+	</div>
+
+    <!-- 添加或修改每日食谱记录对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="食谱日期 周一" prop="menuFoodTime">
+          <el-select v-model="form.menuFoodTime" placeholder="请选择食谱日期 周一">
+            <el-option
+              v-for="dict in dict.type.week"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="食谱早餐详情" prop="menuFoodDetailBk">
+          <el-input v-model="form.menuFoodDetailBk" placeholder="请输入食谱早餐详情" />
+        </el-form-item>
+        <el-form-item label="食谱中餐详情" prop="menuFoodDetailLu">
+          <el-input v-model="form.menuFoodDetailLu" placeholder="请输入食谱中餐详情" />
+        </el-form-item>
+        <el-form-item label="食谱午餐详情" prop="menuFoodDetailDi">
+          <el-input v-model="form.menuFoodDetailDi" placeholder="请输入食谱午餐详情" />
+        </el-form-item>
+        <el-form-item label="食堂名称" prop="canteenName">
+          <el-input v-model="form.canteenName" placeholder="请输入食堂名称" />
+        </el-form-item>
+        <el-form-item label="食堂id" prop="canteenId">
+          <el-input v-model="form.canteenId" placeholder="请输入食堂id" />
+        </el-form-item>
+        <el-form-item label="记录时间" prop="recordTime">
+          <el-date-picker clearable
+            v-model="form.recordTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择记录时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="创建部门" prop="createDept">
+          <el-input v-model="form.createDept" placeholder="请输入创建部门" />
+        </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 { listFoodRecord, getFoodRecord, delFoodRecord, addFoodRecord, updateFoodRecord } from "@/api/system/foodRecord";
+
+export default {
+  name: "FoodRecord",
+  dicts: ['week'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 每日食谱记录表格数据
+      foodRecordList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        menuFoodTime: null,
+        menuFoodDetailBk: null,
+        menuFoodDetailLu: null,
+        menuFoodDetailDi: null,
+        recordTime: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询每日食谱记录列表 */
+    getList() {
+      this.loading = true;
+      listFoodRecord(this.queryParams).then(response => {
+        this.foodRecordList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        menuFoodRecordId: null,
+        menuFoodTime: null,
+        menuFoodType: null,
+        menuFoodDetailBk: null,
+        menuFoodDetailLu: null,
+        menuFoodDetailDi: null,
+        canteenName: null,
+        canteenId: null,
+        recordTime: null,
+        createDept: 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.menuFoodRecordId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加每日食谱记录";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const menuFoodRecordId = row.menuFoodRecordId || this.ids
+      getFoodRecord(menuFoodRecordId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改每日食谱记录";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.menuFoodRecordId != null) {
+            updateFoodRecord(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addFoodRecord(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const menuFoodRecordIds = row.menuFoodRecordId || this.ids;
+      this.$modal.confirm('是否确认删除数据项?').then(function() {
+        return delFoodRecord(menuFoodRecordIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/foodRecord/export', {
+        ...this.queryParams
+      }, `foodRecord_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>
+<style lang="scss">
+	.nhgrls {
+		.el-dialog__body {
+			padding: 0;
+		}
+	}
+
+	.hyr {
+		span {
+			text-decoration: underline;
+		}
+	}
+</style>
+<style scoped lang="scss">
+	.ingq {
+		p {
+			margin: 0;
+		}
+	}
+
+	.iuer {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+
+		.ite {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			p {
+				margin: 0;
+				font-size: 15px;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #AAAAAA;
+				padding: 4px 12px;
+				background: #F7F8FA;
+				border-radius: 4px;
+				margin-right: 20px;
+			}
+
+			.actt {
+				background: #E6EBFF;
+				border: 1px solid #5974E0;
+				border-radius: 4px;
+				color: #5974E0;
+			}
+
+		}
+	}
+
+	.lqw {
+		padding: 0 10px;
+		margin: 0;
+		margin-bottom: 20px;
+	}
+
+	.nhgel {
+		height: 170px;
+		background-color: #313b61;
+		width: 100%;
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: 0;
+	}
+
+	.app-container {
+		background-color: #f3f4f6;
+		padding-top: 10px;
+
+	}
+
+	.ntgs {
+		position: relative;
+		background-color: #fff;
+		padding: 5px;
+		// border-radius: 5px;
+		padding-top: 10px;
+		padding: 10px 20px;
+		padding-left: 10px;
+
+		.pagination-container {
+			height: 50px;
+		}
+	}
+
+	.nghfs {
+		position: relative;
+		background-color: #fff;
+		padding-top: 18px !important;
+		padding: 5px;
+		// border-radius: 5px;
+		// margin-bottom: 20px;
+	}
+
+	.ksf {
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.foord{
+		background: #FFFFFF;
+		box-shadow: 0px 0px 10px 0px #CDCDCD;
+		border-radius: 4px;
+		.foorso{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			border-bottom: 1px solid #DADADA;
+			padding: 0 10px;
+			
+			p{
+				display: flex;
+				font-weight: 800;
+				font-size: 16px;
+				color: #161616;
+				align-items: center;
+				span{
+					width: 8px;
+					height: 8px;
+					background: #4775EA;
+					border-radius: 50%;
+				}
+			}
+		}
+		.foorset{
+			div{
+				display: flex;
+				align-items: flex-start;
+				justify-content: flex-start;
+				padding: 0 10px;
+				span{
+					width: 22%;
+					font-weight: bold;
+					font-size: 14px;
+					color: #FE5A0E;
+				}
+				p{
+					flex:1;
+					margin-top: 0;
+					font-weight: bold;
+					font-size: 14px;
+					color: #606266;
+				}
+			}
+		}
+	}
+</style>

+ 181 - 12
ruoyi-ui/src/views/tongj/foodme/index.vue

@@ -25,7 +25,7 @@
 	              </el-select>
 	            </el-form-item>
 	          </el-col>
-	          <el-col :span="4"  style="margin-top: 3px;">
+	          <el-col :span="4" style="margin-top: 3px;">
 	            <el-button type="primary" style="background-color: #5974E0; border-color: #5974E0;" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
 	           <el-button style="background-color: #fff; border-color: #3464EB; color: #3464EB;" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 	          </el-col>
@@ -126,13 +126,14 @@
 	</div>
 
     <!-- 添加或修改订餐预约对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body class="nhgrlsw">
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
 		  <el-row>
+			 
 			  <el-col :span="12">
-			  				<el-form-item label="就餐人员名称" prop="orderFoodUser">
-			  				    <el-input disabled v-model="form.orderFoodUser" placeholder="请输入就餐人员名称" />
-			  				</el-form-item>  
+				<el-form-item label="就餐人员名称" prop="orderFoodUser">
+				    <el-input disabled v-model="form.orderFoodUser" placeholder="请输入就餐人员名称" />
+				</el-form-item>  
 			  </el-col>
 			  <el-col :span="12">
 			  	<el-form-item label="就餐人员部门" prop="orderFoodDept">
@@ -142,6 +143,7 @@
 		  			  <el-col :span="12">
 		  				 <el-form-item label="就餐时间" prop="orderFoodTime">
 		  				   <el-date-picker clearable
+						   style="width: 100%;"
 		  				     v-model="form.orderFoodTime"
 		  				     type="date"
 		  				     value-format="yyyy-MM-dd"
@@ -151,7 +153,7 @@
 		  			  </el-col>
 		  			  <el-col :span="12">
 		  			  	<el-form-item label="就餐类型" prop="orderFoodType">
-		  			  	  <el-select v-model="form.orderFoodType" placeholder="请选择就餐类型 1:午餐 2:晚餐">
+		  			  	  <el-select  style="width: 100%;" v-model="form.orderFoodType" placeholder="请选择就餐类型 1:午餐 2:晚餐">
 		  			  	    <el-option
 		  			  	      v-for="dict in dict.type.jiucan"
 		  			  	      :key="dict.value"
@@ -168,16 +170,77 @@
 		  			  </el-col>
 		  </el-row>
       </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
+      <div slot="footer" class="dialog-footer" style="display: flex;justify-content: space-between;align-items: center;">
+		  <div style="margin-left: 10px;display: flex;align-items: center;">
+			  <img style="width: 15px;height: 15px;" src="../../../assets/images/icon_yqht_xzsp_bzsp.png" alt="" >
+			 <p style="margin: 0; text-align: right;color: #FE5A0E;cursor: pointer;margin-bottom: 0;margin-left: 10px;" @click="ongis">每日食谱</p>  
+		  </div>
+        <div>
+			<el-button type="primary" @click="submitForm">确 定</el-button>
+			<el-button @click="cancel">取 消</el-button>
+		</div>
       </div>
     </el-dialog>
+	 <el-dialog title="每周食谱" :visible.sync="openm" width="780px" append-to-body>
+		 <div>
+		 	  						 <div class="yaunbei" style="position: relative;">
+		 	  							 <div class="yaunbei_one" style="position: relative; z-index: 22;">
+		 	  								 <p style="font-size: 29px;color: #FFFFFE;position: absolute;top: 143px;left: 183px;">{{weekst}}</p>
+		 	  							 </div>
+		 	  							 <div class="yaunbei_two" style="position: relative;margin-top: -140px; ">
+		 	  								<div v-for="(item,index) in  menuFoodList" :key="index" style="margin-top: 30px;">
+		 	  									<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z1.png" alt="" v-if="item.menuFoodTime == '星期一'">
+												<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z2.png" alt="" v-if="item.menuFoodTime == '星期二'">
+												<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z3.png" alt="" v-if="item.menuFoodTime == '星期三'">
+												<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z4.png" alt="" v-if="item.menuFoodTime == '星期四'">
+												<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z5.png" alt="" v-if="item.menuFoodTime == '星期五'">
+												<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z6.png" alt="" v-if="item.menuFoodTime == '星期六'">
+												<img style="width: 100%;height: 56px;" src="../../../assets/images/pic_bzsp_z7.png" alt="" v-if="item.menuFoodTime == '星期日'">
+		 	  								   <div style="display: flex;
+		 									   align-items: flex-start;padding: 0 12px; margin-top: 25px;">
+		 										   <span style="background: #FFE0AE;
+		                                    border-radius: 16px;font-weight: 400;
+		 											font-size: 25px;color: #161616;
+		 											width: 24%;text-align: center;padding: 3px 0;">午餐</span>
+		 										   <p style="margin: 0; margin-left: 20px; 
+		 										   font-weight: 400;font-size: 25px;color: #382324;">{{item.menuFoodDetailLu == null?'暂无数据' : item.menuFoodDetailLu}}</p>
+		 									   </div>
+		 									   <div style="display: flex;
+		 									   align-items: flex-start;padding: 0 12px; margin-top: 25px;">
+		 									   		<span style="background: #DCF1FF;
+		 									        border-radius: 16px;font-weight: 400;
+		 									   		font-size: 25px;color: #161616;
+		 									   		width: 24%;text-align: center;padding: 3px 0;">晚餐</span>
+		 									   		<p style="margin: 0; margin-left: 20px; 
+		 									   		font-weight: 400;font-size: 25px;color: #382324;">{{item.menuFoodDetailDi == null?'暂无数据' : item.menuFoodDetailDi}}</p>
+		 									   </div>
+		 									</div>
+											<div style="position: absolute; bottom: -60px; right: 0;">
+												<img style="width: 580px;height: 265px;" src="../../../assets/images/pic_bzsp_dbbg.png" alt="">
+											</div>
+											<img src="../../../assets/images/pic_bzsp_cpbjb_xqbg.png" alt="" style="position: absolute; top: 300px;left: -20px;height: 72%;">
+		 	  							 </div>
+										 
+		 	  						 </div>
+									 <!-- <div slot="footer" class="dialog-footer">
+									   <el-button @click="cancel">取 消</el-button>
+									 </div> -->
+		 	  						 
+		 	  					 </div>
+	</el-dialog>
+	
   </div>
 </template>
 
 <script>
 import { listFood, getFood, delFood, addFood, updateFood } from "@/api/system/food";
+import {
+		listMenuFood,
+		getMenuFood,
+		delMenuFood,
+		addMenuFood,
+		updateMenuFood
+	} from "@/api/system/menuFood";
 
 export default {
   name: "Food",
@@ -202,6 +265,8 @@ export default {
       title: "",
       // 是否显示弹出层
       open: false,
+	  openm:false,
+	  menuFoodList:[],
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -218,11 +283,21 @@ export default {
       form: {},
       // 表单校验
       rules: {
-      }
+      },
+	  week:[],
+	  weekst:''
     };
   },
   created() {
+	  let data=[]
+	        for(let i=0;i <= 6;i++){
+	              data.push(this.getWeek(i))
+	        }
+	this.week=data;
+	this.weekst = this.week[0] + '-' +this.week[this.week.length-1]
+	console.log(this.weekst)
     this.getList();
+	this.getListm()
   },
   methods: {
     /** 查询订餐预约列表 */
@@ -235,11 +310,84 @@ export default {
         this.loading = false;
       });
     },
+	getListm() {
+		this.loading = true;
+		let nsgs={'pageNum': 1,'pageSize': 7,'isUse':'Y'}
+		listMenuFood(nsgs).then(response => {
+			// this.menuFoodList = response.rows;
+			let ilseli =['星期一','星期二','星期三','星期四','星期五','星期六','星期日']
+			let ilselif =['星期一','星期二','星期三','星期四','星期五','星期六','星期日']
+			let njgw = []
+				response.rows.filter(rou=>{
+					rou.menuFoodTime = rou.menuFoodTime.replace(/\s*/g,'');
+					for(var i=0;i< ilseli.length;i++ ){
+						if(rou.menuFoodTime == ilseli[i]){
+							ilseli.splice(i,1)
+						}
+					}
+				})
+				if(response.rows.length < 7){
+				for(var h=0;h< ilseli.length;h++ ){
+					let nhg={'menuFoodTime':ilseli[h],'menuFoodDetailDi':'暂无数据','menuFoodDetailLu':'暂无数据'}
+				    response.rows.push(nhg)
+				}
+				 response.rows.filter(roug=>{
+					 if(roug.menuFoodTime == '星期一'){
+						ilselif[0] = roug
+					 }
+					 if(roug.menuFoodTime == '星期二'){
+					 	ilselif[1] =roug
+					 }
+					 if(roug.menuFoodTime == '星期三'){
+					 	ilselif[2] = roug
+					 }
+					 if(roug.menuFoodTime == '星期四'){
+					 	ilselif[3] = roug
+					 }
+					 if(roug.menuFoodTime == '星期五'){
+					 	ilselif[4] = roug 
+					 }
+					 if(roug.menuFoodTime == '星期六'){
+					 	ilselif[5] = roug
+					 }
+					 if(roug.menuFoodTime == '星期日'){
+					 	ilselif[6] = roug
+					 }
+					 
+				 })
+				 this.menuFoodList = ilselif
+			}
+			this.total = response.total;
+			this.loading = false;
+		});
+	},
+	 getWeek (day) {
+	          var today = new Date();
+	          var targetday_milliseconds=today.getTime() + 1000*60*60*24*day;
+	          today.setTime(targetday_milliseconds);
+	          var tYear = today.getFullYear();
+	          var tMonth = today.getMonth();
+	          var tDate = today.getDate();
+	          tMonth = this.doHandleMonth(tMonth + 1);
+	          tDate =  this.doHandleMonth(tDate);
+	          return tMonth+"/"+tDate;
+	      },
+	      doHandleMonth(month){
+	         var m = month;
+	         if(month.toString().length == 1){
+	            m = "0" + month;
+	         }
+	         return m;
+	      },
+	
     // 取消按钮
     cancel() {
       this.open = false;
       this.reset();
     },
+	ongis(){
+		this.openm = true
+	},
     // 表单重置
     reset() {
       this.form = {
@@ -333,9 +481,9 @@ export default {
 };
 </script>
 <style lang="scss">
-	.nhgrls{
+	.nhgrlsw{
 		.el-dialog__body{
-			padding: 0;
+			padding-top: 10px;
 		}
 	}
   .hyr{
@@ -418,6 +566,27 @@ export default {
 			height: 100%;
 		}
 	}
+	.yaunbei{
+		background: url('../../../assets/images/pic_bzsp_ymbg.png') no-repeat;
+		background-size: 100% 100%;
+		padding-bottom: 90px;
+	}
+	.yaunbei_one{
+		height: 290px;
+		width: 550px;
+		background: url('../../../assets/images/pic_bzsp_btbg.png') no-repeat;
+		background-size: 549px 290px;
+		margin-left: 50%;
+		transform: translateX(-50%);
+	}
+	.yaunbei_two{
+		width: 650px;
+		padding: 150px 65px 180px 65px;
+		background: url('../../../assets/images/pic_bzsp_cpbjb_bg.png') no-repeat;
+		background-size: 649px 100%;
+		margin-left: 50%;
+		transform: translateX(-50%);
+	}
 
 </style>
 

+ 421 - 0
ruoyi-ui/src/views/tongj/in/index.vue

@@ -0,0 +1,421 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="140px" class="nghfs">
+        <p class="lqw" style="font-weight: 700;font-size: 15px;"> <img src="../../../assets/images/icon_yq_htgl_btzs.png" alt="" style="width:10px;height: 10px;margin-right: 10px;"> 搜索条件</p>
+      
+	  <el-row>
+	    <!-- <el-col :span="24"> -->
+	      <el-col :span="8">
+	       <el-form-item label="用户名称" prop="nickName">
+	         <el-input
+	           v-model="queryParams.nickName"
+	           placeholder="请输入用户名称"
+	           clearable
+	           @keyup.enter.native="handleQuery"
+	         />
+	       </el-form-item>
+	      </el-col>
+	      <el-col :span="8">
+	        <el-form-item label="签到时间" prop="signTime">
+	          <el-date-picker clearable
+	            v-model="queryParams.signTime"
+	            type="date"
+	            value-format="yyyy-MM-dd"
+	            placeholder="请选择签到时间">
+	          </el-date-picker>
+	        </el-form-item>
+	      </el-col>
+	      <el-col :span="4"  style="margin-top: 3px;">
+	        <el-button type="primary" style="background-color: #5974E0; border-color: #5974E0;" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+	       <el-button style="background-color: #fff; border-color: #3464EB; color: #3464EB;" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+	      </el-col>
+	  </el-row>
+    </el-form>
+    <div class="ntgs" >
+    <div style="display: flex;align-items: center; margin-bottom: 10px;">
+      <p class="lqw" style="font-weight: 700;font-size: 15px; margin: 0; margin-bottom: 0;"> <img src="../../../assets/images/icon_yq_htgl_btzs.png" alt="" style="width:10px;height: 10px;margin-right: 10px;"> 会议签到</p>
+    <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="['system:in: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="['system:in: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="['system:in:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['system:in:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+	</div>
+
+    <el-table v-loading="loading" :data="inList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+	  <el-table-column label="会议室" align="center" prop="conferenceRoomName" />
+      <el-table-column label="会议室预约名称" align="center" prop="conferenceRoomName" />
+	  <el-table-column label="用户头像" align="center" prop="avatar" >
+	    <template slot-scope="scope">
+	     <image-preview :src="scope.row.avatar" :width="50" :height="50"/>
+	    </template>
+	  </el-table-column>
+      <el-table-column label="用户名称" align="center" prop="nickName" />
+      <el-table-column label="签到时间" align="center" prop="signTime" width="180">
+        <template slot-scope="scope">
+          <span>{{scope.row.signTime}}</span>
+        </template>
+      </el-table-column>
+      <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="['system:in:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['system:in: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"
+    />
+	</div>
+
+    <!-- 添加或修改会议室签到对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="会议室预约ID" prop="conferenceRoomOrderId">
+          <el-input v-model="form.conferenceRoomOrderId" placeholder="请输入会议室预约ID" />
+        </el-form-item>
+        <el-form-item label="会议室ID" prop="conferenceRoomId">
+          <el-input v-model="form.conferenceRoomId" placeholder="请输入会议室ID" />
+        </el-form-item>
+        <el-form-item label="用户id" prop="userId">
+          <el-input v-model="form.userId" placeholder="请输入用户id" />
+        </el-form-item>
+        <el-form-item label="用户头像地址" prop="avatar">
+          <el-input v-model="form.avatar" placeholder="请输入用户头像地址" />
+        </el-form-item>
+        <el-form-item label="用户名称" prop="nickName">
+          <el-input v-model="form.nickName" placeholder="请输入用户名称" />
+        </el-form-item>
+        <el-form-item label="签到时间" prop="signTime">
+          <el-date-picker clearable
+            v-model="form.signTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择签到时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="创建部门" prop="createDept">
+          <el-input v-model="form.createDept" placeholder="请输入创建部门" />
+        </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 { listIn, getIn, delIn, addIn, updateIn } from "@/api/system/in";
+
+export default {
+  name: "In",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 会议室签到表格数据
+      inList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        conferenceRoomOrderId: null,
+        conferenceRoomId: null,
+        userId: null,
+        avatar: null,
+        nickName: null,
+        signTime: null,
+        createDept: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        conferenceRoomOrderId: [
+          { required: true, message: "会议室预约ID不能为空", trigger: "blur" }
+        ],
+        conferenceRoomId: [
+          { required: true, message: "会议室ID不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询会议室签到列表 */
+    getList() {
+      this.loading = true;
+      listIn(this.queryParams).then(response => {
+        this.inList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        signInId: null,
+        conferenceRoomOrderId: null,
+        conferenceRoomId: null,
+        userId: null,
+        avatar: null,
+        nickName: null,
+        signTime: null,
+        createDept: 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.signInId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加会议室签到";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const signInId = row.signInId || this.ids
+      getIn(signInId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改会议室签到";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.signInId != null) {
+            updateIn(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addIn(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const signInIds = row.signInId || this.ids;
+      this.$modal.confirm('是否确认删除会议室签到编号为"' + signInIds + '"的数据项?').then(function() {
+        return delIn(signInIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/in/export', {
+        ...this.queryParams
+      }, `in_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>
+<style lang="scss">
+	.nhgrls{
+		.el-dialog__body{
+			padding: 0;
+		}
+	}
+  .hyr{
+    span{
+      text-decoration:underline;
+    }
+  }
+</style>
+<style scoped lang="scss">
+	.ingq{
+		p{
+			margin: 0;
+		}
+	}
+	
+  .iuer{
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    .ite{
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      p{
+        margin: 0;
+        font-size: 15px;
+        font-family: PingFang SC;
+        font-weight: 500;
+        color: #AAAAAA;
+        padding: 4px 12px;
+        background: #F7F8FA;
+        border-radius: 4px;
+        margin-right: 20px;
+      }
+      .actt{
+        background: #E6EBFF;
+        border: 1px solid #5974E0;
+        border-radius: 4px;
+        color: #5974E0;
+      }
+
+    }
+  }
+  .lqw{
+    padding: 0 10px;
+    margin: 0;
+    margin-bottom: 20px;
+  }
+.nhgel{
+  height: 170px;
+  background-color: #313b61;
+  width: 100%;
+  position: absolute;
+  top:0;
+  left:0;
+  z-index: 0;
+}
+	.app-container{
+		background-color: #f3f4f6;
+		padding-top: 10px;
+	   
+	}
+	.ntgs{
+	position: relative;
+		background-color: #fff;
+		padding: 5px;
+		// border-radius: 5px;
+		padding-top: 10px;
+	     padding: 10px 20px;
+		 padding-left: 10px;
+		.pagination-container{
+			height: 50px;
+		}
+	}
+	.nghfs{
+	position: relative;
+		background-color: #fff;
+		padding-top: 18px !important;
+		padding: 5px;
+		// border-radius: 5px;
+		// margin-bottom: 20px;
+	}
+	.ksf{
+		img{
+			width:100%;
+			height: 100%;
+		}
+	}
+
+</style>

+ 598 - 0
ruoyi-ui/src/views/tongj/menuFood/index.vue

@@ -0,0 +1,598 @@
+<template>
+	<div class="app-container">
+		<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
+			label-width="140px" class="nghfs">
+			<p class="lqw" style="font-weight: 700;font-size: 15px;"> <img
+					src="../../../assets/images/icon_yq_htgl_btzs.png" alt=""
+					style="width:10px;height: 10px;margin-right: 10px;"> 搜索条件</p>
+			<el-row>
+				<el-col :span="8">
+					<el-form-item label="食谱日期" prop="menuFoodTime">
+						<el-select v-model="queryParams.menuFoodTime" placeholder="请选择食谱日期 周一" clearable>
+							<el-option v-for="dict in dict.type.week" :key="dict.value" :label="dict.label"
+								:value="dict.value" />
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="是否启用" prop="isUse">
+						<el-input v-model="queryParams.isUse" placeholder="请输入是否启用" clearable
+							@keyup.enter.native="handleQuery" />
+					</el-form-item>
+				</el-col>
+				<el-col :span="6">
+					<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-col>
+			</el-row>
+		</el-form>
+
+		<div class="ntgs">
+			<div style="display: flex;align-items: center; margin-bottom: 10px;">
+				<p class="lqw" style="font-weight: 700;font-size: 15px; margin: 0; margin-bottom: 0;"> <img
+						src="../../../assets/images/icon_yq_htgl_btzs.png" alt=""
+						style="width:10px;height: 10px;margin-right: 10px;"> 食谱配置</p>
+				<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="['system:menuFood:add']">新增</el-button>
+					</el-col>
+					
+					<el-col :span="1.5">
+						<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
+							v-hasPermi="['system:menuFood:export']">导出</el-button>
+					</el-col>
+					<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+				</el-row>
+			</div>
+             
+			 <div>
+				 <div>
+					 <el-row :gutter="20" v-if="menuFoodList.length !=0">
+						 <el-col :span="8" v-for="(item,index) in menuFoodList" :key="index" style="margin-bottom: 20px;">
+							 <div class="foord">
+								<div class="foorso" style="height: 60px;">
+									<p ><span style="margin-right: 10px;"></span><dict-tag :options="dict.type.week" :value="item.menuFoodTime" /></p>
+									<el-switch
+									  v-model="item.isUse"
+									  active-value="Y"
+									  inactive-value="N"
+									  @change="handleStatusChange(item)"
+									></el-switch>
+								</div> 
+								<div style="border-bottom: 1px solid #DADADA;padding-top: 15px;padding-bottom: 15px;" class="foorset">
+									<div>
+										<span>午餐:</span><p>{{item.menuFoodDetailLu == null?'暂无数据' : item.menuFoodDetailLu}}</p>
+									</div>
+									<div>
+										<span style="color: #28C529;">晚餐:</span><p>{{item.menuFoodDetailDi == null?'暂无数据' : item.menuFoodDetailDi}}</p>
+									</div>
+								</div>
+								<div style="display: flex;align-items: center;height: 40px;">
+									<p @click="handleDelete(item)"
+							v-hasPermi="['system:menuFood:remove']" style="flex:1;line-height: 40px; text-align: center; border-right: 1px solid #DADADA;color: #FF6969;font-weight: bold;font-size: 14px;">删除</p>
+									<p  @click="handleUpdate(item)"
+							v-hasPermi="['system:menuFood:edit']" style="flex:1;line-height: 40px;text-align: center;color: #5F8BF4;font-weight: bold;font-size: 14px;">修改</p>
+								</div>
+							 </div>
+						 </el-col>
+					 </el-row>
+					 <div v-if="menuFoodList.length ==0">
+						 <el-empty description="暂无数据"></el-empty>
+					 </div>
+				 </div>
+			 </div>
+			<!-- <el-table v-loading="loading" :data="menuFoodList" @selection-change="handleSelectionChange">
+				<el-table-column type="selection" width="55" align="center" />
+				<el-table-column label="食谱日期" align="center" prop="menuFoodTime">
+					<template slot-scope="scope">
+						<dict-tag :options="dict.type.week" :value="scope.row.menuFoodTime" />
+					</template>
+				</el-table-column>
+				<el-table-column label="食谱早餐详情" align="center" prop="menuFoodDetailBk" />
+				<el-table-column label="食谱中餐详情" align="center" prop="menuFoodDetailLu" />
+				<el-table-column label="食谱晚餐详情" align="center" prop="menuFoodDetailDi" />
+				<el-table-column label="是否启用" align="center"  >
+				  <template slot-scope="scope">
+				    <el-switch
+				      v-model="scope.row.isUse"
+				      active-value="Y"
+				      inactive-value="N"
+				      @change="handleStatusChange(scope.row)"
+				    ></el-switch>
+				  </template>
+				</el-table-column>
+				<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="['system:menuFood:edit']">修改</el-button>
+						<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
+							v-hasPermi="['system:menuFood: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" />
+		</div>
+
+		<!-- 添加或修改每日食谱对话框 -->
+		<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
+			<el-form ref="form" :model="form" :rules="rules" label-width="110px">
+				<el-row>
+					<!-- <el-col :span="24">
+						<el-form-item multiple  label="食谱日期" prop="menuFoodTime">
+							<el-select v-model="form.menuFoodTime" placeholder="请选择食谱日期 周一">
+								<el-option v-for="dict in dict.type.week" :key="dict.value" :label="dict.label"
+									:value="dict.value"></el-option>
+							</el-select>
+						</el-form-item>
+					</el-col> -->
+					<el-col :span="24" v-for="(item,index) in  forlise" :key="index" v-if="ishoexx">
+						<div style="margin-bottom: 15px; font-weight: bold;font-size: 16px;color: #0391FD;display: flex;align-items: center;">
+							<span style="width: 8px;height: 8px;background: #0391FD;border-radius: 50%;margin-right: 10px;"></span> {{item.menuFoodTime}}</div>
+						<el-col :span="12">
+							<el-form-item label="午餐食谱" >
+								<el-input type="textarea"  v-model="item.menuFoodDetailLu" placeholder="请输入是午餐食谱,用“,”隔开…" />
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="晚餐食谱" >
+								<el-input type="textarea"  v-model="item.menuFoodDetailDi" placeholder="请输入是晚餐食谱,用“,”隔开…" />
+							</el-form-item>
+						</el-col>
+						<el-col :span="24">
+							<el-form-item label="是否启用" >
+								<el-radio-group v-model="item.isUse">
+								  <el-radio
+								    v-for="dict in dict.type.sys_yes_no"
+								    :key="dict.value"
+								    :label="dict.value"
+								  >{{dict.label}}</el-radio>
+								</el-radio-group>
+								
+							</el-form-item>
+						</el-col>
+					</el-col>
+					<el-col :span="24"  v-if="!ishoexx">
+						<div style="margin-bottom: 15px; font-weight: bold;font-size: 16px;color: #0391FD;display: flex;align-items: center;">
+							<span style="width: 8px;height: 8px;background: #0391FD;border-radius: 50%;margin-right: 10px;"></span> {{form.menuFoodTime}}</div>
+						<el-col :span="24">
+							<el-form-item label="午餐食谱" >
+								<el-input type="textarea"  v-model="form.menuFoodDetailLu" placeholder="请输入是午餐食谱,用“,”隔开…" />
+							</el-form-item>
+						</el-col>
+						<el-col :span="24">
+							<el-form-item label="晚餐食谱" >
+								<el-input type="textarea"  v-model="form.menuFoodDetailDi" placeholder="请输入是晚餐食谱,用“,”隔开…" />
+							</el-form-item>
+						</el-col>
+						<el-col :span="24">
+							<el-form-item label="是否启用" >
+								<el-radio-group v-model="form.isUse">
+								  <el-radio
+								    v-for="dict in dict.type.sys_yes_no"
+								    :key="dict.value"
+								    :label="dict.value"
+								  >{{dict.label}}</el-radio>
+								</el-radio-group>
+								
+							</el-form-item>
+						</el-col>
+					</el-col>
+					
+					
+				</el-row>
+
+				<!-- <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 {
+		listMenuFood,
+		getMenuFood,
+		delMenuFood,
+		addMenuFood,
+		updateMenuFood
+	} from "@/api/system/menuFood";
+
+	export default {
+		name: "MenuFood",
+		dicts: ['week','sys_yes_no'],
+		data() {
+			return {
+				// 遮罩层
+				loading: true,
+				// 选中数组
+				ids: [],
+				// 非单个禁用
+				single: true,
+				// 非多个禁用
+				multiple: true,
+				// 显示搜索条件
+				showSearch: true,
+				// 总条数
+				total: 0,
+				// 每日食谱表格数据
+				menuFoodList: [],
+				// 弹出层标题
+				title: "",
+				// 是否显示弹出层
+				open: false,
+				// 查询参数
+				queryParams: {
+					pageNum: 1,
+					pageSize: 9,
+					menuFoodTime: null,
+					menuFoodDetailBk: null,
+					menuFoodDetailLu: null,
+					menuFoodDetailDi: null,
+					canteenName: null,
+					isUse: null,
+				},
+				// 表单参数
+				form: {},
+				// 表单校验
+				rules: {},
+				forlise:[],
+				lsgsi:[],
+				ishoexx:false
+				
+			};
+		},
+		created() {
+			this.forlise = []
+			for(var i=0 ; i < 7; i++){
+				let nhe={menuFoodDetailLu:null,week:i+1,menuFoodDetailDi:null,isUse:'Y',menuFoodTime:null}
+				if(i == 1){
+						nhe.menuFoodTime ='星期一'
+					}else if(i == 2){
+						nhe.menuFoodTime ='星期二'
+					}else if(i == 3){
+						nhe.menuFoodTime ='星期三'
+					}else if(i == 4){
+						nhe.menuFoodTime ='星期四'
+					}else if(i == 5){
+						nhe.menuFoodTime ='星期五'
+					}else if(i == 6){
+						nhe.menuFoodTime ='星期六'
+					}else if(i == 6){
+						nhe.menuFoodTime ='星期日'
+					}
+				this.forlise.push(nhe)
+			}
+			this.getList();
+		},
+		methods: {
+			/** 查询每日食谱列表 */
+			getList() {
+				this.loading = true;
+				listMenuFood(this.queryParams).then(response => {
+					this.menuFoodList = response.rows;
+					this.total = response.total;
+					this.loading = false;
+				});
+			},
+			// 取消按钮
+			cancel() {
+				this.open = false;
+				this.reset();
+			},
+			// 表单重置
+			reset() {
+				this.form = {
+					menuFoodId: null,
+					menuFoodTime: null,
+					menuFoodType: null,
+					menuFoodDetailBk: null,
+					menuFoodDetailLu: null,
+					menuFoodDetailDi: null,
+					canteenName: null,
+					canteenId: null,
+					isUse: null,
+					createDept: 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.menuFoodId)
+				this.single = selection.length !== 1
+				this.multiple = !selection.length
+			},
+			/** 新增按钮操作 */
+			handleAdd() {
+				this.reset();
+				this.open = true;
+				this.forlise = []
+				for(var i=0 ; i < 7; i++){
+					let nhe={menuFoodDetailLu:null,week:i+1,menuFoodDetailDi:null,isUse:'Y',menuFoodTime:null}
+					if(i == 0){
+							nhe.menuFoodTime ='星期一'
+						}else if(i == 1){
+							nhe.menuFoodTime ='星期二'
+						}else if(i == 2){
+							nhe.menuFoodTime ='星期三'
+						}else if(i == 3){
+							nhe.menuFoodTime ='星期四'
+						}else if(i == 4){
+							nhe.menuFoodTime ='星期五'
+						}else if(i == 5){
+							nhe.menuFoodTime ='星期六'
+						}else if(i == 6){
+							nhe.menuFoodTime ='星期日'
+						}
+					this.forlise.push(nhe)
+				}
+				console.log(this.forlise)
+				this.ishoexx = true
+				this.title = "添加每日食谱";
+			},
+			// 用户状态修改
+			handleStatusChange(row) {
+			  let text = row.isUse == "Y" ? "启用" : "停用";
+			  this.$modal.confirm('确认要"' + text + '""' + row.menuFoodTime + '"食谱吗?').then(function() {
+			    return updateMenuFood(row);
+			  }).then(() => {
+			    this.$modal.msgSuccess(text + "成功");
+			  }).catch(function() {
+			    row.isUse = row.isUse === "Y" ? "N" : "Y";
+			  });
+			},
+			/** 修改按钮操作 */
+			handleUpdate(row) {
+				this.reset();
+				const menuFoodId = row.menuFoodId || this.ids
+				getMenuFood(menuFoodId).then(response => {
+					this.form = response.data;
+					this.ishoexx = false
+					this.open = true;
+					this.title = "修改每日食谱";
+				});
+			},
+			/** 提交按钮 */
+			submitForm() {
+				this.$refs["form"].validate(valid => {
+					if (valid) {
+						if (this.form.menuFoodId != null) {
+							if(this.form.menuFoodDetailLu == null || this.form.menuFoodDetailLu ==''){
+								if(this.form.menuFoodDetailDi == null || this.form.menuFoodDetailDi ==''){
+									this.$message.error('请添加信息');
+									return
+								}
+							}
+							console.log(this.form)
+							// return
+							updateMenuFood(this.form).then(response => {
+								this.$modal.msgSuccess("修改成功");
+								this.open = false;
+								this.getList();
+							});
+						} else {
+							this.lsgsi = []
+							this.lsgsi = this.forlise
+							let ns=[]
+							let nsgli = []
+							console.log(this.forlise)
+							for(var i=0; i< this.lsgsi.length; i++){
+								if(this.lsgsi[i].menuFoodDetailLu != null && this.lsgsi[i].menuFoodDetailLu != ''){
+									nsgli.push(this.lsgsi[i])
+									console.log(this.lsgsi[i],2)
+								}else{
+									if(this.lsgsi[i].menuFoodDetailDi != null && this.lsgsi[i].menuFoodDetailDi != ''){
+										nsgli.push(this.lsgsi[i])
+										console.log(this.lsgsi[i],3)
+									}
+								}
+								
+							}
+							if(nsgli.length == 0){
+								this.$message.error('请添加信息');
+								return
+							}
+							let nsgs= {'menuFoodList':nsgli}
+							addMenuFood(nsgs).then(response => {
+								this.$modal.msgSuccess("新增成功");
+								this.open = false;
+								this.getList();
+							});
+						}
+					}
+				});
+			},
+			/** 删除按钮操作 */
+			handleDelete(row) {
+				const menuFoodIds = row.menuFoodId || this.ids;
+				this.$modal.confirm('是否确认删除数据项?').then(function() {
+					return delMenuFood(menuFoodIds);
+				}).then(() => {
+					this.getList();
+					this.$modal.msgSuccess("删除成功");
+				}).catch(() => {});
+			},
+			/** 导出按钮操作 */
+			handleExport() {
+				this.download('system/menuFood/export', {
+					...this.queryParams
+				}, `menuFood_${new Date().getTime()}.xlsx`)
+			}
+		}
+	};
+</script>
+<style lang="scss">
+	.nhgrls {
+		.el-dialog__body {
+			padding: 0;
+		}
+	}
+
+	.hyr {
+		span {
+			text-decoration: underline;
+		}
+	}
+</style>
+<style scoped lang="scss">
+	.ingq {
+		p {
+			margin: 0;
+		}
+	}
+
+	.iuer {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+
+		.ite {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			p {
+				margin: 0;
+				font-size: 15px;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #AAAAAA;
+				padding: 4px 12px;
+				background: #F7F8FA;
+				border-radius: 4px;
+				margin-right: 20px;
+			}
+
+			.actt {
+				background: #E6EBFF;
+				border: 1px solid #5974E0;
+				border-radius: 4px;
+				color: #5974E0;
+			}
+
+		}
+	}
+
+	.lqw {
+		padding: 0 10px;
+		margin: 0;
+		margin-bottom: 20px;
+	}
+
+	.nhgel {
+		height: 170px;
+		background-color: #313b61;
+		width: 100%;
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: 0;
+	}
+
+	.app-container {
+		background-color: #f3f4f6;
+		padding-top: 10px;
+
+	}
+
+	.ntgs {
+		position: relative;
+		background-color: #fff;
+		padding: 5px;
+		// border-radius: 5px;
+		padding-top: 10px;
+		padding: 10px 20px;
+		padding-left: 10px;
+
+		.pagination-container {
+			height: 50px;
+		}
+	}
+
+	.nghfs {
+		position: relative;
+		background-color: #fff;
+		padding-top: 18px !important;
+		padding: 5px;
+		// border-radius: 5px;
+		// margin-bottom: 20px;
+	}
+
+	.ksf {
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.foord{
+		background: #FFFFFF;
+		box-shadow: 0px 0px 10px 0px #CDCDCD;
+		border-radius: 4px;
+		.foorso{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			border-bottom: 1px solid #DADADA;
+			padding: 0 10px;
+			
+			p{
+				display: flex;
+				font-weight: 800;
+				font-size: 16px;
+				color: #161616;
+				align-items: center;
+				span{
+					width: 8px;
+					height: 8px;
+					background: #4775EA;
+					border-radius: 50%;
+				}
+			}
+		}
+		.foorset{
+			div{
+				display: flex;
+				align-items: flex-start;
+				justify-content: flex-start;
+				padding: 0 10px;
+				span{
+					width: 22%;
+					font-weight: bold;
+					font-size: 14px;
+					color: #FE5A0E;
+				}
+				p{
+					flex:1;
+					margin-top: 0;
+					font-weight: bold;
+					font-size: 14px;
+					color: #606266;
+				}
+			}
+		}
+	}
+</style>

+ 15 - 3
ruoyi-ui/src/views/tongj/order/index.vue

@@ -186,7 +186,7 @@
 				  </div>
 				  <div style="background: #F0F8FE;border-radius: 10px; padding: 10px; margin-top: 20px;">
 					  <p style="font-weight: bold;font-size: 14px;color: #161616;"> <img src="../../../assets/images/icon_htgl_hyyy_3y.png" alt="" style="width: 16px;height: 16px; margin-right: 10px;">已预约时间段,以下时间段不可预约。</p>
-					  <div style="display: flex; flex-wrap: wrap;" v-if="lisget != null || lisget.length != 0 ">
+					  <div style="display: flex; flex-wrap: wrap;" v-if="lisget != null && lisget.length != 0 " >
 						  <div style="width: 50%; display: flex;align-items: center;"  v-for="(item,index) in lisget" :key="index">
 						  						  <p style="width: 6px;height: 6px;background: #FFB132;border-radius: 3px;margin-right: 10px;"></p>
 						  						  <p style="font-weight: bold;font-size: 14px;color: #161616;">{{item.startTime}}  </p>
@@ -269,6 +269,12 @@
 		  			  	  <el-input v-model="form.remark" placeholder="请输入会议说明" />
 		  			  	</el-form-item>			  
 		  			  </el-col>
+					  <el-col :span="24">
+					  	<el-form-item label="席卡详情" prop="xkDetail">
+					  	  <el-input v-model="form.xkDetail" placeholder="请输入席卡详情" />
+					  	</el-form-item>			  
+					  </el-col>
+					  
 		  </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -373,8 +379,10 @@ export default {
 		this.issid = this.orderListg[0].conferenceRoomId  
 		if(this.orderListg[0].conferenceRoomOrderList == null){
 			this.orderListg[0].conferenceRoomOrderList = []	  
+			this.lisget = []
+		}else{
+			this.lisget = this.orderListg[0].conferenceRoomOrderList 
 		}
-		this.lisget = this.orderListg[0].conferenceRoomOrderList 
 		this.conferenceRoomName = this.orderListg[0].conferenceRoomName
 		this.conferenceRoomAddress = this.orderListg[0].conferenceRoomAddress
 	  }
@@ -427,7 +435,8 @@ export default {
         updateBy: null,
         updateTime: null,
         remark: null,
-		useXk:'Y'
+		useXk:'Y',
+		xkDetail:null
       };
       this.resetForm("form");
     },
@@ -443,6 +452,9 @@ export default {
     },
 	iskbw(val){
 		this.issid = val.conferenceRoomId
+		if(val.conferenceRoomOrderList == null){
+			val.conferenceRoomOrderList = []	  
+		}
 		this.lisget = val.conferenceRoomOrderList
 		this.conferenceRoomName = val.conferenceRoomName
 		this.conferenceRoomAddress = val.conferenceRoomAddress

+ 16 - 4
ruoyi-ui/src/views/tongj/orderme/index.vue

@@ -186,7 +186,7 @@
 				  </div>
 				  <div style="background: #F0F8FE;border-radius: 10px; padding: 10px; margin-top: 20px;">
 					  <p style="font-weight: bold;font-size: 14px;color: #161616;"> <img src="../../../assets/images/icon_htgl_hyyy_3y.png" alt="" style="width: 16px;height: 16px; margin-right: 10px;">已预约时间段,以下时间段不可预约。</p>
-					  <div style="display: flex; flex-wrap: wrap;" v-if="lisget != null || lisget.length != 0 ">
+					  <div style="display: flex; flex-wrap: wrap;" v-if="lisget != null && lisget.length != 0 " >
 						  <div style="width: 50%; display: flex;align-items: center;"  v-for="(item,index) in lisget" :key="index">
 						  						  <p style="width: 6px;height: 6px;background: #FFB132;border-radius: 3px;margin-right: 10px;"></p>
 						  						  <p style="font-weight: bold;font-size: 14px;color: #161616;">{{item.startTime}}  </p>
@@ -269,6 +269,12 @@
 		  			  	  <el-input v-model="form.remark" placeholder="请输入会议说明" />
 		  			  	</el-form-item>			  
 		  			  </el-col>
+					  <el-col :span="24">
+					  	<el-form-item label="席卡详情" prop="xkDetail">
+					  	  <el-input v-model="form.xkDetail" placeholder="请输入席卡详情" />
+					  	</el-form-item>			  
+					  </el-col>
+					  
 		  </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -309,7 +315,7 @@ export default {
       // 查询参数
       queryParams: {
         pageNum: 1,
-        pageSize: 10,
+        pageSize: 7,
         orderUser: null,
         orderUserId: null,
         conferenceRoomId: null,
@@ -374,8 +380,10 @@ export default {
 		this.issid = this.orderListg[0].conferenceRoomId  
 		if(this.orderListg[0].conferenceRoomOrderList == null){
 			this.orderListg[0].conferenceRoomOrderList = []	  
+			this.lisget = []
+		}else{
+			this.lisget = this.orderListg[0].conferenceRoomOrderList 
 		}
-		this.lisget = this.orderListg[0].conferenceRoomOrderList 
 		this.conferenceRoomName = this.orderListg[0].conferenceRoomName
 		this.conferenceRoomAddress = this.orderListg[0].conferenceRoomAddress
 	  }
@@ -428,7 +436,8 @@ export default {
         updateBy: null,
         updateTime: null,
         remark: null,
-		useXk:'Y'
+		useXk:'Y',
+		xkDetail:null
       };
       this.resetForm("form");
     },
@@ -444,6 +453,9 @@ export default {
     },
 	iskbw(val){
 		this.issid = val.conferenceRoomId
+		if(val.conferenceRoomOrderList == null){
+			val.conferenceRoomOrderList = []	  
+		}
 		this.lisget = val.conferenceRoomOrderList
 		this.conferenceRoomName = val.conferenceRoomName
 		this.conferenceRoomAddress = val.conferenceRoomAddress

+ 99 - 38
ruoyi-ui/src/views/tongj/record/index.vue

@@ -26,7 +26,7 @@
 			 <el-col :span="8">
 			   <el-form-item label="打卡记录日期" prop="recordTime">
 			     <el-date-picker clearable
-			       v-model="form.recordTime"
+			       v-model="queryParams.recordTime"
 			       type="date"
 			       value-format="yyyy-MM-dd"
 			       placeholder="请选择打卡记录日期">
@@ -35,39 +35,41 @@
 			 </el-col>
 			 <el-col :span="8">
 			   <el-form-item label="开始时间" prop="startTime">
-			    <el-date-picker clearable
-			      v-model="form.startTime"
-			      type="date"
-			      value-format="yyyy-MM-dd"
-			      placeholder="请选择开始时间">
-			    </el-date-picker>
+			     <el-date-picker clearable
+			       v-model="queryParams.startTime"
+			       type="date"
+			       value-format="yyyy-MM-dd"
+			       placeholder="请选择开始时间">
+			     </el-date-picker>
 			   </el-form-item>
 			 </el-col>
 			 <el-col :span="8">
 			   <el-form-item label="结束时间" prop="endTime">
-			    <el-date-picker clearable
-			      v-model="form.endTime"
-			      type="date"
-			      value-format="yyyy-MM-dd"
-			      placeholder="请选择结束时间">
-			    </el-date-picker>
+			     <el-date-picker clearable
+			       v-model="queryParams.endTime"
+			       type="date"
+			       value-format="yyyy-MM-dd"
+			       placeholder="请选择结束时间">
+			     </el-date-picker>
 			   </el-form-item>
 			 </el-col>
 			 <el-col :span="8">
-			   <el-form-item label="身份证号" prop="idCard">
-			    <el-input
-			      v-model="queryParams.phonenumber"
-			      placeholder="请输入手机号码"
-			      clearable
-			      @keyup.enter.native="handleQuery"
-			    />
+			   <el-form-item label="是否打卡" prop="type">
+			   <el-select v-model="queryParams.type" placeholder="请选择是否打卡" clearable>
+			     <el-option
+			       v-for="dict in dict.type.sys_yes_no"
+			       :key="dict.value"
+			       :label="dict.label"
+			       :value="dict.value"
+			     />
+			   </el-select>
 			   </el-form-item>
 			 </el-col>
 			 <el-col :span="8">
-			   <el-form-item label="是否打卡" prop="type">
-			   <el-select v-model="queryParams.type" placeholder="请选择就餐类型" clearable>
+			   <el-form-item label="打卡情况" prop="isOutwork">
+			   <el-select v-model="queryParams.isOutwork" placeholder="请选择打卡情况" clearable>
 			     <el-option
-			       v-for="dict in dict.type.sys_yes_no"
+			       v-for="dict in dict.type.is_outwork"
 			       :key="dict.value"
 			       :label="dict.label"
 			       :value="dict.value"
@@ -130,33 +132,52 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 	</div>
+	<div style="display: flex;" class="nblqwt">
+		<p @click="iscvf(item)" :class=" ingsnum == item.dictValue? 'iscd' : ''" v-for="(item,index) in lishgew" :key="index">{{item.dictLabel}}<span>(45人)</span></p>
+	</div>
 
     <el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
       <!-- <el-table-column label="打卡记录id" align="center" prop="clockId" />
       <el-table-column label="人员ID" align="center" prop="userId" /> -->
-      <el-table-column label="所属部门名称" align="center" prop="deptName" />
+      <!-- <el-table-column label="所属部门名称" align="center" prop="deptName" /> -->
       <el-table-column label="人员姓名" align="center" prop="userName" />
       <el-table-column label="手机号码" align="center" prop="phonenumber" />
-      <el-table-column label="人员身份证号" align="center" prop="idCard" />
-      <el-table-column label="打卡记录日期" align="center" prop="recordTime" />
-      <el-table-column label="上班打卡时间" align="center" prop="workingTime" />
-      <el-table-column label="下班打卡时间" align="center" prop="dutyTime" />
-      <el-table-column label="是否打卡" align="center" prop="type" />
-	  <el-table-column label="是否打卡" align="center" prop="type">
+	  <el-table-column label="打卡地点" align="center" prop="recordLocations" width="160" show-overflow-tooltip />
+      <!-- <el-table-column label="人员身份证号" align="center" prop="idCard" /> -->
+	  <el-table-column label="周几" align="center" prop="week">
+	    <template slot-scope="scope">
+	      <dict-tag :options="dict.type.week" :value="scope.row.week"/>
+	    </template>
+	  </el-table-column>
+      <el-table-column label="打卡记录时间" align="center" prop="recordDt" width="160" />
+     <!-- <el-table-column label="上班打卡时间" align="center" prop="workingTime" />
+      <el-table-column label="下班打卡时间" align="center" prop="dutyTime" /> -->
+	  <!-- <el-table-column label="是否打卡" align="center" prop="type">
 	    <template slot-scope="scope">
 	      <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.type"/>
 	    </template>
+	  </el-table-column> -->
+	  <el-table-column label="打卡情况" align="center" prop="isOutwork">
+	    <template slot-scope="scope">
+	      <dict-tag :options="dict.type.is_outwork" :value="scope.row.isOutwork"/>
+	    </template>
 	  </el-table-column>
-      <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+	  <el-table-column label="打卡图片" align="center" prop="pictureUrl">
+	    <template slot-scope="scope">
+			<image-preview :src="scope.row.pictureUrl" :width="50" :height="50"/>
+	    </template>
+	  </el-table-column>
+	  <el-table-column label="备注" align="center" prop="remark" width="60" show-overflow-tooltip/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button
+          <!-- <el-button
             size="mini"
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['system:clock:edit']"
-          >修改</el-button>
+          >修改</el-button> -->
           <el-button
             size="mini"
             type="text"
@@ -165,7 +186,7 @@
             v-hasPermi="['system:clock:remove']"
           >删除</el-button>
         </template>
-      </el-table-column> -->
+      </el-table-column>
     </el-table>
     
     <pagination
@@ -221,7 +242,7 @@ import { listRecord, getRecord, delRecord, addRecord, updateRecord } from "@/api
 
 export default {
   name: "Record",
-  dicts: ['sys_yes_no'],
+  dicts: ['sys_yes_no','week','is_outwork'],
   data() {
     return {
       // 遮罩层
@@ -254,6 +275,7 @@ export default {
         recordTime: null,
         workingTime: null,
         dutyTime: null,
+		isOutwork:'1'
       },
       // 表单参数
       form: {},
@@ -262,13 +284,31 @@ export default {
         userName: [
           { required: true, message: "人员姓名不能为空", trigger: "blur" }
         ],
-      }
+      },
+	  lishgew:[],
+	  ingsnum:1
     };
   },
   created() {
+	  this.queryParams.startTime=  this.getNowDate()
     this.getList();
+	this.getDicts("is_outwork").then(response => {
+	          this.lishgew = response.data;
+	    });
+	
   },
   methods: {
+	  getNowDate() {
+	        const timeOne = new Date()
+	        const year = timeOne.getFullYear()
+	        let month = timeOne.getMonth() + 1
+	        let day = timeOne.getDate()
+	        month = month < 10 ? '0' + month : month
+	        day = day < 10 ? '0' + day : day
+	        const NOW_MONTHS_AGO = `${year}-${month}-${day}`
+	        return NOW_MONTHS_AGO
+	      },
+
     /** 查询打卡记录列表 */
     getList() {
       this.loading = true;
@@ -370,7 +410,13 @@ export default {
       this.download('system/record/export', {
         ...this.queryParams
       }, `record_${new Date().getTime()}.xlsx`)
-    }
+    },
+	iscvf(item){
+		this.ingsnum = item.dictValue
+		this.queryParams.isOutwork = item.dictValue
+		this.queryParams.pageNum = 1
+		this.getList()
+	}
   }
 };
 </script>
@@ -387,6 +433,21 @@ export default {
   }
 </style>
 <style scoped lang="scss">
+	.nblqwt{
+		padding-left: 10px;
+		p{
+			padding: 5px 14px ;
+			background-color: #eaeaea;
+			border-radius: 3px;
+			margin-right: 5px;
+			color: #666666 ;
+		}
+		.iscd{
+			border: 1px solid #3565ed;
+			background-color: #fff;
+			color: #3565ed ;
+		}
+	}
   .iuer{
     display: flex;
     justify-content: space-between;

+ 40 - 21
ruoyi-ui/src/views/tongj/shebe/index.vue

@@ -65,7 +65,29 @@
 	<div>
 		<el-row>
 			<el-col :span="24">
-				<div class='shotw' style="margin-bottom: 30px; text-align: center;">
+				<div class='shotw isjses' style="margin-bottom: 30px; ">
+					<el-col :span='4'>
+						<el-tabs v-model="editableTabsValue" :tab-position="tabPosition" style="height: 500px;">
+						    <el-tab-pane v-for="(item,index) in postList" :key="index">
+							<span slot="label"  @click="isfgw(item)" class="ingwfaq"><img src="../../../assets/images/icon_yqht_ssjk_lb_normal.png" alt="" style="width: 14px;height: 16px;"> {{item.name}}</span>
+							</el-tab-pane>
+						  </el-tabs>
+					</el-col>
+					<el-col :span='20' style="padding-left: 30px;">
+						<video
+						      class="videosmall"
+						      ref="videosmallone"
+						      preload="auto"
+						      muted
+						      autoplay
+							  width="95%"
+							  
+						      type="rtmp/flv"
+						    >
+						      <source src="" />
+						    </video>
+					</el-col>
+					    
 						 <!-- <div class="nghwgq" v-if="!isshiwa">
 							  <img src="../../../assets/images/jiaz.png" alt="" style="width: 90px;height: 86px;">
 							  <div>加载中,请稍后</div>
@@ -78,38 +100,22 @@
 						          width="100%"
 						          height="300px"
 						        /> -->
-								<video
-								      class="videosmall"
-								      ref="videosmallone"
-								      preload="auto"
-								      muted
-								      autoplay
-									  width="95%"
-									  
-								      type="rtmp/flv"
-								    >
-								      <source src="" />
-								    </video>
+								
 								
 						  <!-- <p class='p'>南大门出入口</p> -->
 				</div> 
 			</el-col>
-			<el-col :span="24">
+			<!-- <el-col :span="24">
 				<div class="ihgswq wrapper"  ref="wrapper" style=" overflow: hidden;">
 						  <div class="fijge content nhgwesvq" ref="content" style="width:1610px;">
-							  <!-- <el-row :gutter="20"> -->
-								  <!-- <el-col  :span="8"> -->
 									<div class='shotw '   v-for="(item,index) in postList" :key="index" @click="isfgw(item)" >
 											  <img src="../../../assets/images/fengm.png" alt=""> 
 												<img src="../../../assets/images/icon_spjk_play.png" alt="" class="iges"> 
 											  <p style="font-size: 14px;">{{item.name}}</p>
 									</div>  
-								  <!-- </el-col> -->
-							  <!-- </el-row> -->
-						  		   
 						  </div> 
 				</div>
-			</el-col>
+			</el-col> -->
 		</el-row>
 	   
 	   
@@ -246,6 +252,7 @@ export default {
 	  opent:false,
 	  bg:null,
     titles:'',
+	editableTabsValue:'5',
     opens:false,
 	  imageUrl:'@/assets/logo/logo.png',
 	  printObj: {
@@ -265,6 +272,7 @@ export default {
       single: true,
 	  checkedScoreDataDetails: [],
 	  scoreDataDetailsList:[],
+	  tabPosition:'left',
       // 非多个禁用
       multiple: true,
       // 显示搜索条件
@@ -866,6 +874,14 @@ export default {
 </script>
 
 <style lang="scss">
+	.isjses{
+		.el-tabs--left .el-tabs__nav-wrap.is-left::after{
+			width:6px;
+		}
+		.el-tabs--left .el-tabs__active-bar.is-left,{
+			width:6px;
+		}
+	}
 	.ingaqe{
 		.el-input--medium{
 			width:100%;
@@ -1080,5 +1096,8 @@ export default {
 			height: 100%;
 		}
 	}
-
+   .ingwfaq{
+	   font-weight: bold;
+	   font-size: 16px;
+   }
 </style>