Merge remote-tracking branch 'origin/master'
# Conflicts: # bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenDeviceSensorMetricMapper.xml
This commit is contained in:
commit
36dafaab46
|
|
@ -2,6 +2,8 @@ package com.bonus.canteen.core.kitchen.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
//import com.bonus.canteen.core.kitchen.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
|
|
@ -42,8 +44,8 @@ public class KitchenDeviceSensorRecordController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "查询厨房后场设备传感器记录列表")
|
||||
//@RequiresPermissions("kitchen:record:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(KitchenDeviceSensorRecord kitchenDeviceSensorRecord) {
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody @Valid KitchenDeviceSensorRecord kitchenDeviceSensorRecord) {
|
||||
startPage();
|
||||
List<KitchenDeviceSensorRecord> list = kitchenDeviceSensorRecordService.selectKitchenDeviceSensorRecordList(kitchenDeviceSensorRecord);
|
||||
return getDataTable(list);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.bonus.canteen.core.kitchen.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
//import com.bonus.canteen.core.kitchen.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
|
|
@ -42,8 +44,8 @@ public class KitchenSampleCabinetRecordController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "查询留样柜操作记录列表")
|
||||
//@RequiresPermissions("kitchen:record:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(KitchenSampleCabinetRecord kitchenSampleCabinetRecord) {
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody @Valid KitchenSampleCabinetRecord kitchenSampleCabinetRecord) {
|
||||
startPage();
|
||||
List<KitchenSampleCabinetRecord> list = kitchenSampleCabinetRecordService.selectKitchenSampleCabinetRecordList(kitchenSampleCabinetRecord);
|
||||
return getDataTable(list);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.bonus.canteen.core.kitchen.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
//import com.bonus.canteen.core.kitchen.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
|
|
@ -42,8 +44,8 @@ public class KitchenSampleDishesRecordController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "查询留样机留样清单列表")
|
||||
//@RequiresPermissions("kitchen:record:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(KitchenSampleDishesRecord kitchenSampleDishesRecord) {
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody @Valid KitchenSampleDishesRecord kitchenSampleDishesRecord) {
|
||||
startPage();
|
||||
List<KitchenSampleDishesRecord> list = kitchenSampleDishesRecordService.selectKitchenSampleDishesRecordList(kitchenSampleDishesRecord);
|
||||
return getDataTable(list);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.bonus.canteen.core.kitchen.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
//import com.bonus.canteen.core.kitchen.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
|
|
@ -42,8 +44,8 @@ public class KitchenStaffDevicePrivilegeController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "查询厨房员工设备权限列表")
|
||||
//@RequiresPermissions("kitchen:privilege:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(KitchenStaffDevicePrivilege kitchenStaffDevicePrivilege) {
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody @Valid KitchenStaffDevicePrivilege kitchenStaffDevicePrivilege) {
|
||||
startPage();
|
||||
List<KitchenStaffDevicePrivilege> list = kitchenStaffDevicePrivilegeService.selectKitchenStaffDevicePrivilegeList(kitchenStaffDevicePrivilege);
|
||||
return getDataTable(list);
|
||||
|
|
@ -81,7 +83,7 @@ public class KitchenStaffDevicePrivilegeController extends BaseController {
|
|||
//@RequiresPermissions("kitchen:privilege:add")
|
||||
@SysLog(title = "厨房员工设备权限", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增厨房员工设备权限")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody KitchenStaffDevicePrivilege kitchenStaffDevicePrivilege) {
|
||||
public AjaxResult add(@RequestBody List<KitchenStaffDevicePrivilege> kitchenStaffDevicePrivilege) {
|
||||
try {
|
||||
return toAjax(kitchenStaffDevicePrivilegeService.insertKitchenStaffDevicePrivilege(kitchenStaffDevicePrivilege));
|
||||
} catch (Exception e) {
|
||||
|
|
@ -97,7 +99,7 @@ public class KitchenStaffDevicePrivilegeController extends BaseController {
|
|||
//@RequiresPermissions("kitchen:privilege:edit")
|
||||
@SysLog(title = "厨房员工设备权限", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改厨房员工设备权限")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody KitchenStaffDevicePrivilege kitchenStaffDevicePrivilege) {
|
||||
public AjaxResult edit(@RequestBody List<KitchenStaffDevicePrivilege> kitchenStaffDevicePrivilege) {
|
||||
try {
|
||||
return toAjax(kitchenStaffDevicePrivilegeService.updateKitchenStaffDevicePrivilege(kitchenStaffDevicePrivilege));
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.bonus.canteen.core.kitchen.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
//import com.bonus.canteen.core.kitchen.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
|
|
@ -42,8 +44,8 @@ public class KitchenStaffIllegalWarningController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "查询厨房员工违规报警列表")
|
||||
//@RequiresPermissions("kitchen:warning:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(KitchenStaffIllegalWarning kitchenStaffIllegalWarning) {
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody @Valid KitchenStaffIllegalWarning kitchenStaffIllegalWarning) {
|
||||
startPage();
|
||||
List<KitchenStaffIllegalWarning> list = kitchenStaffIllegalWarningService.selectKitchenStaffIllegalWarningList(kitchenStaffIllegalWarning);
|
||||
return getDataTable(list);
|
||||
|
|
|
|||
|
|
@ -1,28 +1,21 @@
|
|||
package com.bonus.canteen.core.kitchen.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo;
|
||||
import com.bonus.canteen.core.kitchen.service.IKitchenStaffInfoService;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
//import com.bonus.canteen.core.kitchen.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo;
|
||||
import com.bonus.canteen.core.kitchen.service.IKitchenStaffInfoService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 厨房员工资料Controller
|
||||
|
|
@ -42,8 +35,8 @@ public class KitchenStaffInfoController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "查询厨房员工资料列表")
|
||||
//@RequiresPermissions("kitchen:info:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(KitchenStaffInfo kitchenStaffInfo) {
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody @Valid KitchenStaffInfo kitchenStaffInfo) {
|
||||
startPage();
|
||||
List<KitchenStaffInfo> list = kitchenStaffInfoService.selectKitchenStaffInfoList(kitchenStaffInfo);
|
||||
return getDataTable(list);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.bonus.canteen.core.kitchen.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
//import com.bonus.canteen.core.kitchen.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
|
|
@ -42,8 +44,8 @@ public class KitchenStaffMorningCheckController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "查询厨房员工晨检记录列表")
|
||||
//@RequiresPermissions("kitchen:check:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(KitchenStaffMorningCheck kitchenStaffMorningCheck) {
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@RequestBody @Valid KitchenStaffMorningCheck kitchenStaffMorningCheck) {
|
||||
startPage();
|
||||
List<KitchenStaffMorningCheck> list = kitchenStaffMorningCheckService.selectKitchenStaffMorningCheckList(kitchenStaffMorningCheck);
|
||||
return getDataTable(list);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
package com.bonus.canteen.core.kitchen.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AccessAuthority {
|
||||
private Long deviceId;
|
||||
private String deviceName;
|
||||
private Integer deviceType;
|
||||
private String privilegeValue;
|
||||
private String location;
|
||||
}
|
||||
|
|
@ -33,6 +33,16 @@ public class KitchenDeviceSensorMetric extends BaseEntity {
|
|||
@ApiModelProperty(value = "参数编码")
|
||||
private String measureCode;
|
||||
|
||||
/** 参数名称 */
|
||||
@Excel(name = "参数名称")
|
||||
@ApiModelProperty(value = "参数代码")
|
||||
private String measureCode;
|
||||
|
||||
/** 参数名称 */
|
||||
@Excel(name = "参数名称")
|
||||
@ApiModelProperty(value = "参数代码")
|
||||
private String deviceType;
|
||||
|
||||
/** 参数名称 */
|
||||
@Excel(name = "参数名称")
|
||||
@ApiModelProperty(value = "参数名称")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
package com.bonus.canteen.core.kitchen.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -42,7 +45,7 @@ public class KitchenDeviceSensorRecord extends BaseEntity {
|
|||
/** 测量指标 */
|
||||
@Excel(name = "测量指标")
|
||||
@ApiModelProperty(value = "测量指标")
|
||||
private String measureMetricId;
|
||||
private String measureCode;
|
||||
|
||||
/** 测量具体值 */
|
||||
@Excel(name = "测量具体值")
|
||||
|
|
@ -75,5 +78,20 @@ public class KitchenDeviceSensorRecord extends BaseEntity {
|
|||
@ApiModelProperty(value = "区域id")
|
||||
private Long areaId;
|
||||
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
@ApiModelProperty(value = "食堂名称")
|
||||
private String canteenName;
|
||||
|
||||
@ApiModelProperty(value = "测量结果类型")
|
||||
private List<Integer> sensorResultTypeList;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime startDateTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime endDateTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.bonus.canteen.core.kitchen.domain;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
|
|
@ -64,7 +66,7 @@ public class KitchenSampleCabinetRecord extends BaseEntity {
|
|||
/** 动作类型 1:留样 2:取样 3无操作 */
|
||||
@Excel(name = "动作类型 1:留样 2:取样 3无操作")
|
||||
@ApiModelProperty(value = "动作类型 1:留样 2:取样 3无操作")
|
||||
private Long actionType;
|
||||
private Integer actionType;
|
||||
|
||||
/** 抓拍图片 */
|
||||
@Excel(name = "抓拍图片")
|
||||
|
|
@ -75,7 +77,29 @@ public class KitchenSampleCabinetRecord extends BaseEntity {
|
|||
@ApiModelProperty(value = "操作日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "操作日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date operateDate;
|
||||
private LocalDate operateDate;
|
||||
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
@ApiModelProperty(value = "食堂名称")
|
||||
private String canteenName;
|
||||
|
||||
@ApiModelProperty(value = "操作人")
|
||||
private String nickName;
|
||||
|
||||
@ApiModelProperty(value = "动作类型名称 1:留样 2:取样 3无操作")
|
||||
private String actionTypeName;
|
||||
|
||||
@ApiModelProperty(value = "操作员工")
|
||||
private Long staffName;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime startDateTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime endDateTime;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.canteen.core.kitchen.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
|
|
@ -8,6 +9,8 @@ import lombok.Data;
|
|||
import lombok.ToString;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 留样机留样清单对象 kitchen_sample_dishes_record
|
||||
*
|
||||
|
|
@ -117,7 +120,7 @@ public class KitchenSampleDishesRecord extends BaseEntity {
|
|||
/** 重量是否达到标准 1是2否 */
|
||||
@Excel(name = "重量是否达到标准 1是2否")
|
||||
@ApiModelProperty(value = "重量是否达到标准 1是2否")
|
||||
private Long weightStandard;
|
||||
private Integer weightStandard;
|
||||
|
||||
/** 有效时长 */
|
||||
@Excel(name = "有效时长")
|
||||
|
|
@ -127,7 +130,7 @@ public class KitchenSampleDishesRecord extends BaseEntity {
|
|||
/** 留样时长是否达到标准 1是2否 */
|
||||
@Excel(name = "留样时长是否达到标准 1是2否")
|
||||
@ApiModelProperty(value = "留样时长是否达到标准 1是2否")
|
||||
private Long durationStandard;
|
||||
private Integer durationStandard;
|
||||
|
||||
/** 样品状态 */
|
||||
@Excel(name = "样品状态")
|
||||
|
|
@ -142,7 +145,39 @@ public class KitchenSampleDishesRecord extends BaseEntity {
|
|||
/** 存放状态 1未入柜 2在柜 3离柜 4超时自动离柜 */
|
||||
@Excel(name = "存放状态 1未入柜 2在柜 3离柜 4超时自动离柜")
|
||||
@ApiModelProperty(value = "存放状态 1未入柜 2在柜 3离柜 4超时自动离柜")
|
||||
private Long saveStatus;
|
||||
private Integer saveStatus;
|
||||
|
||||
@Excel(name = "存放状态 1未入柜 2在柜 3离柜 4超时自动离柜")
|
||||
@ApiModelProperty(value = "存放状态 1未入柜 2在柜 3离柜 4超时自动离柜")
|
||||
private String saveStatusName;
|
||||
|
||||
@ApiModelProperty(value = "查询类型 1 今日 2 昨日 3 历史")
|
||||
@NotNull(message = "查询类型不能为空")
|
||||
private Integer searchType;
|
||||
|
||||
@ApiModelProperty(value = "违规状态 1 重量未达标 2 时长未达标 3 正常")
|
||||
private String illegalStatusName;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime startDateTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime endDateTime;
|
||||
|
||||
@ApiModelProperty("食堂名称")
|
||||
private LocalDateTime canteenName;
|
||||
|
||||
@ApiModelProperty("档口名称")
|
||||
private LocalDateTime stallName;
|
||||
|
||||
@ApiModelProperty("菜品名称")
|
||||
private LocalDateTime dishesName;
|
||||
|
||||
@ApiModelProperty("设备名称")
|
||||
private LocalDateTime deviceName;
|
||||
|
||||
@ApiModelProperty("留样人")
|
||||
private LocalDateTime userName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@ public class KitchenStaffDevicePrivilege extends BaseEntity {
|
|||
@ApiModelProperty(value = "食堂设备id")
|
||||
private Long deviceId;
|
||||
|
||||
@Excel(name = "食堂设备id")
|
||||
@ApiModelProperty(value = "食堂设备id")
|
||||
private Integer deviceType;
|
||||
|
||||
/** 权限名称 */
|
||||
@Excel(name = "权限名称")
|
||||
@ApiModelProperty(value = "权限名称")
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
package com.bonus.canteen.core.kitchen.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
|
@ -82,5 +84,20 @@ public class KitchenStaffIllegalWarning extends BaseEntity {
|
|||
@Excel(name = "告警类型", readConverterExp = "1=-未戴口罩,2=-垃圾桶未盖报警,3=-发现老鼠,4=-未穿厨师服,5=-未戴厨师帽,6=-未戴手套,7=-抽烟,8=-打电话,9=-地面巡检,1=0-设备归位,1=1-未授权人员进入,1=3-动火离人")
|
||||
private Long alarmType;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime startDateTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime endDateTime;
|
||||
|
||||
private String nickName;
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String canteenName;
|
||||
|
||||
@JsonIgnore
|
||||
private String encryptedSearchValue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
package com.bonus.canteen.core.kitchen.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.system.api.domain.SysUser;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
|
@ -18,7 +22,7 @@ import com.bonus.common.core.web.domain.BaseEntity;
|
|||
|
||||
@Data
|
||||
@ToString
|
||||
public class KitchenStaffInfo extends BaseEntity {
|
||||
public class KitchenStaffInfo extends SysUser {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 食堂后场人员id */
|
||||
|
|
@ -38,7 +42,7 @@ public class KitchenStaffInfo extends BaseEntity {
|
|||
@ApiModelProperty(value = "健康证到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "健康证到期时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date healthCertExpire;
|
||||
private LocalDate healthCertExpire;
|
||||
|
||||
/** 健康证正面 */
|
||||
@Excel(name = "健康证正面")
|
||||
|
|
@ -54,13 +58,30 @@ public class KitchenStaffInfo extends BaseEntity {
|
|||
@ApiModelProperty(value = "营养师证到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "营养师证到期时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date nutrityCertExpire;
|
||||
private LocalDate nutrityCertExpire;
|
||||
|
||||
/** 安全员证到期时间 */
|
||||
@ApiModelProperty(value = "安全员证到期时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "安全员证到期时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date safetyCertExpire;
|
||||
private LocalDate safetyCertExpire;
|
||||
|
||||
@ApiModelProperty(value = "健康证状态名称")
|
||||
private String healthCertStatusName;
|
||||
|
||||
@ApiModelProperty(value = "健康证状态")
|
||||
private Integer healthCertStatus;
|
||||
|
||||
@ApiModelProperty(value = "岗位名称")
|
||||
private String postName;
|
||||
|
||||
@ApiModelProperty(value = "员工设备权限")
|
||||
private List<AccessAuthority> accessAuthorityList;
|
||||
|
||||
@ApiModelProperty(value = "食堂编号")
|
||||
private Long canteenId;
|
||||
|
||||
@JsonIgnore
|
||||
private String encryptedSearchValue;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.bonus.canteen.core.kitchen.domain;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
|
|
@ -58,5 +60,24 @@ public class KitchenStaffMorningCheck extends BaseEntity {
|
|||
@ApiModelProperty(value = "晨检视频地址")
|
||||
private String checkVideoUrl;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime startDateTime;
|
||||
|
||||
@ApiModelProperty("结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime endDateTime;
|
||||
|
||||
@ApiModelProperty("岗位")
|
||||
private Long[] postIds;
|
||||
|
||||
private String postName;
|
||||
|
||||
private String nickName;
|
||||
|
||||
private String canteenName;
|
||||
|
||||
private String phonenumber;
|
||||
|
||||
private String encryptedSearchValue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
package com.bonus.canteen.core.kitchen.domain.constants;
|
||||
|
||||
public enum CommonFlagEnum {
|
||||
YES(1, "是"),
|
||||
NO(2, "否");
|
||||
|
||||
private final Integer key;
|
||||
private final String desc;
|
||||
|
||||
private CommonFlagEnum(Integer key, String desc) {
|
||||
this.key = key;
|
||||
this.desc = desc;
|
||||
}
|
||||
public Integer getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return this.desc;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.bonus.canteen.core.kitchen.domain.constants;
|
||||
|
||||
public enum DeviceSensorResultEnum {
|
||||
NORMAL(1, "正常"),
|
||||
TEMPERATURE_HIGH(2, "温度过高"),
|
||||
TEMPERATURE_LOW(3, "温度过低"),
|
||||
HUMIDITY_HIGH(4, "湿度过高"),
|
||||
HUMIDITY_LOW(5, "湿度过低"),
|
||||
SMOKE_HIGH(6, "烟雾浓度高");
|
||||
|
||||
private final Integer key;
|
||||
private final String desc;
|
||||
|
||||
private DeviceSensorResultEnum(Integer key, String desc) {
|
||||
this.key = key;
|
||||
this.desc = desc;
|
||||
}
|
||||
public Integer getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
public static String getDescByKey(Integer targetKey) {
|
||||
for (DeviceSensorResultEnum sensorResultEnum : DeviceSensorResultEnum.values()) {
|
||||
if (sensorResultEnum.getKey().equals(targetKey)) {
|
||||
return sensorResultEnum.getDesc();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.bonus.canteen.core.kitchen.domain.constants;
|
||||
|
||||
import com.bonus.canteen.core.account.constants.AccTradeTypeEnum;
|
||||
|
||||
public enum HealthCertStatusEnum {
|
||||
NOT_APPROVE(1, "正常"),
|
||||
APPROVE(2, "过期"),
|
||||
NOT_APPROVE_AGAIN(3, "缺失"),
|
||||
EXPIRED(4, "临期");
|
||||
|
||||
private final Integer key;
|
||||
private final String desc;
|
||||
|
||||
private HealthCertStatusEnum(Integer key, String desc) {
|
||||
this.key = key;
|
||||
this.desc = desc;
|
||||
}
|
||||
public Integer getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
public static String getDescByKey(Integer targetKey) {
|
||||
for (HealthCertStatusEnum healthCertStatusEnum : HealthCertStatusEnum.values()) {
|
||||
if (healthCertStatusEnum.getKey().equals(targetKey)) {
|
||||
return healthCertStatusEnum.getDesc();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.bonus.canteen.core.kitchen.domain.constants;
|
||||
|
||||
public enum SampleCabinetActionTypeEnum {
|
||||
NOT_APPROVE(1, "菜品放入"),
|
||||
APPROVE(2, "菜品取出"),
|
||||
NOT_APPROVE_AGAIN(3, "无操作");
|
||||
|
||||
private final Integer key;
|
||||
private final String desc;
|
||||
|
||||
private SampleCabinetActionTypeEnum(Integer key, String desc) {
|
||||
this.key = key;
|
||||
this.desc = desc;
|
||||
}
|
||||
public Integer getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
public static String getDescByKey(Integer targetKey) {
|
||||
for (SampleCabinetActionTypeEnum cabinetActionTypeEnum : SampleCabinetActionTypeEnum.values()) {
|
||||
if (cabinetActionTypeEnum.getKey().equals(targetKey)) {
|
||||
return cabinetActionTypeEnum.getDesc();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.bonus.canteen.core.kitchen.domain.constants;
|
||||
|
||||
public enum SampleDishesSaveStatusEnum {
|
||||
NOT_IN_CABINET(1, "未入柜"),
|
||||
IN_CABINET(2, "在柜"),
|
||||
LEAVE_CABINET(3, "离柜"),
|
||||
OVERTIME_LEAVE_CABINET(4, "超时自动离柜");
|
||||
|
||||
private final Integer key;
|
||||
private final String desc;
|
||||
|
||||
private SampleDishesSaveStatusEnum(Integer key, String desc) {
|
||||
this.key = key;
|
||||
this.desc = desc;
|
||||
}
|
||||
public Integer getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
public static String getDescByKey(Integer targetKey) {
|
||||
for (SampleDishesSaveStatusEnum dishesSaveStatusEnum : SampleDishesSaveStatusEnum.values()) {
|
||||
if (dishesSaveStatusEnum.getKey().equals(targetKey)) {
|
||||
return dishesSaveStatusEnum.getDesc();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.bonus.canteen.core.kitchen.domain.constants;
|
||||
|
||||
public enum SampleDishesSearchType {
|
||||
TODAY(1, "今日"),
|
||||
YESTERDAY(2, "昨日"),
|
||||
HISTORY(3, "历史");
|
||||
|
||||
private final Integer key;
|
||||
private final String desc;
|
||||
|
||||
private SampleDishesSearchType(Integer key, String desc) {
|
||||
this.key = key;
|
||||
this.desc = desc;
|
||||
}
|
||||
public Integer getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -5,22 +5,31 @@ import com.bonus.canteen.core.kitchen.domain.KitchenDeviceSensorMetric;
|
|||
|
||||
/**
|
||||
* 厨房设备衡量指标设置Mapper接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-06-16
|
||||
*/
|
||||
public interface KitchenDeviceSensorMetricMapper {
|
||||
/**
|
||||
* 查询厨房设备衡量指标设置
|
||||
*
|
||||
*
|
||||
* @param measureId 厨房设备衡量指标设置主键
|
||||
* @return 厨房设备衡量指标设置
|
||||
*/
|
||||
public KitchenDeviceSensorMetric selectKitchenDeviceSensorMetricByMeasureId(Long measureId);
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除厨房设备衡量指标设置
|
||||
*
|
||||
* @param measureCode 厨房设备衡量代码
|
||||
* @return 结果
|
||||
*/
|
||||
public List<KitchenDeviceSensorMetric> selectKitchenDeviceSensorMetricByMeasureCode(String measureCode);
|
||||
|
||||
/**
|
||||
* 查询厨房设备衡量指标设置列表
|
||||
*
|
||||
*
|
||||
* @param kitchenDeviceSensorMetric 厨房设备衡量指标设置
|
||||
* @return 厨房设备衡量指标设置集合
|
||||
*/
|
||||
|
|
@ -28,7 +37,7 @@ public interface KitchenDeviceSensorMetricMapper {
|
|||
|
||||
/**
|
||||
* 新增厨房设备衡量指标设置
|
||||
*
|
||||
*
|
||||
* @param kitchenDeviceSensorMetric 厨房设备衡量指标设置
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -36,7 +45,7 @@ public interface KitchenDeviceSensorMetricMapper {
|
|||
|
||||
/**
|
||||
* 修改厨房设备衡量指标设置
|
||||
*
|
||||
*
|
||||
* @param kitchenDeviceSensorMetric 厨房设备衡量指标设置
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -44,7 +53,7 @@ public interface KitchenDeviceSensorMetricMapper {
|
|||
|
||||
/**
|
||||
* 删除厨房设备衡量指标设置
|
||||
*
|
||||
*
|
||||
* @param measureId 厨房设备衡量指标设置主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -52,9 +61,10 @@ public interface KitchenDeviceSensorMetricMapper {
|
|||
|
||||
/**
|
||||
* 批量删除厨房设备衡量指标设置
|
||||
*
|
||||
*
|
||||
* @param measureIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteKitchenDeviceSensorMetricByMeasureIds(Long[] measureIds);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,14 @@ public interface KitchenStaffDevicePrivilegeMapper {
|
|||
*/
|
||||
public KitchenStaffDevicePrivilege selectKitchenStaffDevicePrivilegeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询厨房员工设备权限
|
||||
*
|
||||
* @param staffId 厨房员工
|
||||
* @return 厨房员工设备权限
|
||||
*/
|
||||
public List<KitchenStaffDevicePrivilege> selectKitchenStaffDevicePrivilegeByStaffId(Long staffId);
|
||||
|
||||
/**
|
||||
* 查询厨房员工设备权限列表
|
||||
*
|
||||
|
|
@ -57,4 +65,6 @@ public interface KitchenStaffDevicePrivilegeMapper {
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteKitchenStaffDevicePrivilegeByIds(Long[] ids);
|
||||
|
||||
public int deleteKitchenStaffDevicePrivilegeByStaffId(Long staffId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.kitchen.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 厨房员工资料Mapper接口
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public interface IKitchenStaffDevicePrivilegeService {
|
|||
* @param kitchenStaffDevicePrivilege 厨房员工设备权限
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertKitchenStaffDevicePrivilege(KitchenStaffDevicePrivilege kitchenStaffDevicePrivilege);
|
||||
public int insertKitchenStaffDevicePrivilege(List<KitchenStaffDevicePrivilege> kitchenStaffDevicePrivilege);
|
||||
|
||||
/**
|
||||
* 修改厨房员工设备权限
|
||||
|
|
@ -40,7 +40,7 @@ public interface IKitchenStaffDevicePrivilegeService {
|
|||
* @param kitchenStaffDevicePrivilege 厨房员工设备权限
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateKitchenStaffDevicePrivilege(KitchenStaffDevicePrivilege kitchenStaffDevicePrivilege);
|
||||
public int updateKitchenStaffDevicePrivilege(List<KitchenStaffDevicePrivilege> kitchenStaffDevicePrivilege);
|
||||
|
||||
/**
|
||||
* 批量删除厨房员工设备权限
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
package com.bonus.canteen.core.kitchen.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.canteen.core.kitchen.domain.constants.SampleCabinetActionTypeEnum;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -39,7 +42,14 @@ public class KitchenSampleCabinetRecordServiceImpl implements IKitchenSampleCabi
|
|||
*/
|
||||
@Override
|
||||
public List<KitchenSampleCabinetRecord> selectKitchenSampleCabinetRecordList(KitchenSampleCabinetRecord kitchenSampleCabinetRecord) {
|
||||
return kitchenSampleCabinetRecordMapper.selectKitchenSampleCabinetRecordList(kitchenSampleCabinetRecord);
|
||||
List<KitchenSampleCabinetRecord> kitchenSampleCabinetRecordList = kitchenSampleCabinetRecordMapper
|
||||
.selectKitchenSampleCabinetRecordList(kitchenSampleCabinetRecord);
|
||||
if(CollUtil.isNotEmpty(kitchenSampleCabinetRecordList)) {
|
||||
for (KitchenSampleCabinetRecord record : kitchenSampleCabinetRecordList) {
|
||||
record.setActionTypeName(SampleCabinetActionTypeEnum.getDescByKey(record.getActionType()));
|
||||
}
|
||||
}
|
||||
return kitchenSampleCabinetRecordList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,8 +1,17 @@
|
|||
package com.bonus.canteen.core.kitchen.service.impl;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.canteen.core.kitchen.domain.constants.CommonFlagEnum;
|
||||
import com.bonus.canteen.core.kitchen.domain.constants.SampleDishesSaveStatusEnum;
|
||||
import com.bonus.canteen.core.kitchen.domain.constants.SampleDishesSearchType;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.canteen.core.kitchen.mapper.KitchenSampleDishesRecordMapper;
|
||||
|
|
@ -39,7 +48,33 @@ public class KitchenSampleDishesRecordServiceImpl implements IKitchenSampleDishe
|
|||
*/
|
||||
@Override
|
||||
public List<KitchenSampleDishesRecord> selectKitchenSampleDishesRecordList(KitchenSampleDishesRecord kitchenSampleDishesRecord) {
|
||||
return kitchenSampleDishesRecordMapper.selectKitchenSampleDishesRecordList(kitchenSampleDishesRecord);
|
||||
if(kitchenSampleDishesRecord.getSearchType().equals(SampleDishesSearchType.TODAY.getKey())) {
|
||||
kitchenSampleDishesRecord.setStartDateTime(LocalDateTime.of(LocalDate.now(),LocalTime.MIDNIGHT));
|
||||
kitchenSampleDishesRecord.setEndDateTime(LocalDateTime.of(LocalDate.now(),LocalTime.MAX));
|
||||
}else if(kitchenSampleDishesRecord.getSearchType().equals(SampleDishesSearchType.YESTERDAY.getKey())) {
|
||||
LocalDate yesterday = LocalDate.now().minusDays(1);
|
||||
kitchenSampleDishesRecord.setStartDateTime(LocalDateTime.of(yesterday,LocalTime.MIDNIGHT));
|
||||
kitchenSampleDishesRecord.setEndDateTime(LocalDateTime.of(yesterday,LocalTime.MAX));
|
||||
}
|
||||
List<KitchenSampleDishesRecord> kitchenSampleDishesRecordList = kitchenSampleDishesRecordMapper
|
||||
.selectKitchenSampleDishesRecordList(kitchenSampleDishesRecord);
|
||||
if(CollUtil.isNotEmpty(kitchenSampleDishesRecordList)) {
|
||||
for (KitchenSampleDishesRecord record : kitchenSampleDishesRecordList) {
|
||||
record.setSaveStatusName(SampleDishesSaveStatusEnum.getDescByKey(record.getSaveStatus()));
|
||||
String illegalStatusName = "";
|
||||
if(CommonFlagEnum.YES.getKey().equals(record.getWeightStandard())) {
|
||||
illegalStatusName = illegalStatusName + "重量未达标";
|
||||
}
|
||||
if(CommonFlagEnum.YES.getKey().equals(record.getDurationStandard())) {
|
||||
illegalStatusName = illegalStatusName + "\n时长未达标";
|
||||
}
|
||||
if(StringUtils.isBlank(illegalStatusName)) {
|
||||
illegalStatusName = "正常";
|
||||
}
|
||||
record.setIllegalStatusName(illegalStatusName);
|
||||
}
|
||||
}
|
||||
return kitchenSampleDishesRecordList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,13 +1,17 @@
|
|||
package com.bonus.canteen.core.kitchen.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.canteen.core.kitchen.mapper.KitchenStaffDevicePrivilegeMapper;
|
||||
import com.bonus.canteen.core.kitchen.domain.KitchenStaffDevicePrivilege;
|
||||
import com.bonus.canteen.core.kitchen.service.IKitchenStaffDevicePrivilegeService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 厨房员工设备权限Service业务层处理
|
||||
|
|
@ -49,13 +53,21 @@ public class KitchenStaffDevicePrivilegeServiceImpl implements IKitchenStaffDevi
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertKitchenStaffDevicePrivilege(KitchenStaffDevicePrivilege kitchenStaffDevicePrivilege) {
|
||||
kitchenStaffDevicePrivilege.setCreateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return kitchenStaffDevicePrivilegeMapper.insertKitchenStaffDevicePrivilege(kitchenStaffDevicePrivilege);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int insertKitchenStaffDevicePrivilege(List<KitchenStaffDevicePrivilege> kitchenStaffDevicePrivilege) {
|
||||
if(CollUtil.isNotEmpty(kitchenStaffDevicePrivilege)) {
|
||||
kitchenStaffDevicePrivilegeMapper.deleteKitchenStaffDevicePrivilegeByStaffId(kitchenStaffDevicePrivilege.get(0).getStaffId());
|
||||
for (KitchenStaffDevicePrivilege privilege : kitchenStaffDevicePrivilege) {
|
||||
privilege.setCreateTime(DateUtils.getNowDate());
|
||||
privilege.setCreateBy(SecurityUtils.getUsername());
|
||||
try {
|
||||
return kitchenStaffDevicePrivilegeMapper.insertKitchenStaffDevicePrivilege(privilege);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -65,13 +77,19 @@ public class KitchenStaffDevicePrivilegeServiceImpl implements IKitchenStaffDevi
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateKitchenStaffDevicePrivilege(KitchenStaffDevicePrivilege kitchenStaffDevicePrivilege) {
|
||||
kitchenStaffDevicePrivilege.setUpdateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return kitchenStaffDevicePrivilegeMapper.updateKitchenStaffDevicePrivilege(kitchenStaffDevicePrivilege);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
public int updateKitchenStaffDevicePrivilege(List<KitchenStaffDevicePrivilege> kitchenStaffDevicePrivilege) {
|
||||
if(CollUtil.isNotEmpty(kitchenStaffDevicePrivilege)) {
|
||||
for (KitchenStaffDevicePrivilege privilege : kitchenStaffDevicePrivilege) {
|
||||
privilege.setUpdateTime(DateUtils.getNowDate());
|
||||
privilege.setUpdateBy(SecurityUtils.getUsername());
|
||||
try {
|
||||
return kitchenStaffDevicePrivilegeMapper.updateKitchenStaffDevicePrivilege(privilege);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.canteen.core.kitchen.service.impl;
|
|||
import java.util.List;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.houqin.utils.SM4EncryptUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.canteen.core.kitchen.mapper.KitchenStaffIllegalWarningMapper;
|
||||
|
|
@ -39,6 +40,8 @@ public class KitchenStaffIllegalWarningServiceImpl implements IKitchenStaffIlleg
|
|||
*/
|
||||
@Override
|
||||
public List<KitchenStaffIllegalWarning> selectKitchenStaffIllegalWarningList(KitchenStaffIllegalWarning kitchenStaffIllegalWarning) {
|
||||
String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(kitchenStaffIllegalWarning.getSearchValue());
|
||||
kitchenStaffIllegalWarning.setEncryptedSearchValue(encryptedSearchValue);
|
||||
return kitchenStaffIllegalWarningMapper.selectKitchenStaffIllegalWarningList(kitchenStaffIllegalWarning);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,33 @@
|
|||
package com.bonus.canteen.core.kitchen.service.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.canteen.core.kitchen.domain.AccessAuthority;
|
||||
import com.bonus.canteen.core.kitchen.domain.KitchenDeviceInfo;
|
||||
import com.bonus.canteen.core.kitchen.domain.KitchenStaffDevicePrivilege;
|
||||
import com.bonus.canteen.core.kitchen.domain.constants.HealthCertStatusEnum;
|
||||
import com.bonus.canteen.core.kitchen.mapper.KitchenDeviceInfoMapper;
|
||||
import com.bonus.canteen.core.kitchen.mapper.KitchenStaffDevicePrivilegeMapper;
|
||||
import com.bonus.canteen.core.kitchen.service.IKitchenStaffDevicePrivilegeService;
|
||||
import com.bonus.canteen.core.user.domain.UserFace;
|
||||
import com.bonus.canteen.core.user.service.IUserFaceService;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.houqin.constant.DeviceTypeEnum;
|
||||
import com.bonus.common.houqin.utils.SM4EncryptUtils;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import org.apache.catalina.security.SecurityUtil;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.canteen.core.kitchen.mapper.KitchenStaffInfoMapper;
|
||||
import com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo;
|
||||
import com.bonus.canteen.core.kitchen.service.IKitchenStaffInfoService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 厨房员工资料Service业务层处理
|
||||
|
|
@ -19,6 +39,12 @@ import com.bonus.canteen.core.kitchen.service.IKitchenStaffInfoService;
|
|||
public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
||||
@Autowired
|
||||
private KitchenStaffInfoMapper kitchenStaffInfoMapper;
|
||||
@Autowired
|
||||
private IKitchenStaffDevicePrivilegeService kitchenStaffDevicePrivilegeService;
|
||||
@Autowired
|
||||
private KitchenStaffDevicePrivilegeMapper kitchenStaffDevicePrivilegeMapper;
|
||||
@Autowired
|
||||
private KitchenDeviceInfoMapper kitchenDeviceInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询厨房员工资料
|
||||
|
|
@ -28,7 +54,26 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
|||
*/
|
||||
@Override
|
||||
public KitchenStaffInfo selectKitchenStaffInfoByStaffId(Long staffId) {
|
||||
return kitchenStaffInfoMapper.selectKitchenStaffInfoByStaffId(staffId);
|
||||
KitchenStaffInfo kitchenStaffInfo = kitchenStaffInfoMapper.selectKitchenStaffInfoByStaffId(staffId);
|
||||
if(Objects.nonNull(kitchenStaffInfo)) {
|
||||
kitchenStaffInfo.setPhonenumber(SM4EncryptUtils.sm4Decrypt(kitchenStaffInfo.getPhonenumber()));
|
||||
List<KitchenStaffDevicePrivilege> kitchenStaffDevicePrivilegeList = kitchenStaffDevicePrivilegeMapper
|
||||
.selectKitchenStaffDevicePrivilegeByStaffId(staffId);
|
||||
if(CollUtil.isNotEmpty(kitchenStaffDevicePrivilegeList)) {
|
||||
AccessAuthority accessAuthority = new AccessAuthority();
|
||||
for (KitchenStaffDevicePrivilege kitchenStaffDevicePrivilege : kitchenStaffDevicePrivilegeList) {
|
||||
KitchenDeviceInfo deviceInfo = kitchenDeviceInfoMapper.selectKitchenDeviceInfoByDeviceId(kitchenStaffDevicePrivilege.getDeviceId());
|
||||
if(Objects.nonNull(deviceInfo)) {
|
||||
accessAuthority.setDeviceName(deviceInfo.getDeviceName());
|
||||
accessAuthority.setLocation(deviceInfo.getSubPlace());
|
||||
}
|
||||
accessAuthority.setDeviceId(kitchenStaffDevicePrivilege.getDeviceId());
|
||||
accessAuthority.setDeviceType(kitchenStaffDevicePrivilege.getDeviceType());
|
||||
accessAuthority.setPrivilegeValue(kitchenStaffDevicePrivilege.getPrivilegeValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
return kitchenStaffInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -39,7 +84,16 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
|||
*/
|
||||
@Override
|
||||
public List<KitchenStaffInfo> selectKitchenStaffInfoList(KitchenStaffInfo kitchenStaffInfo) {
|
||||
return kitchenStaffInfoMapper.selectKitchenStaffInfoList(kitchenStaffInfo);
|
||||
String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(kitchenStaffInfo.getSearchValue());
|
||||
kitchenStaffInfo.setEncryptedSearchValue(encryptedSearchValue);
|
||||
List<KitchenStaffInfo> kitchenStaffInfoList = kitchenStaffInfoMapper.selectKitchenStaffInfoList(kitchenStaffInfo);
|
||||
if(CollUtil.isNotEmpty(kitchenStaffInfoList)) {
|
||||
for (KitchenStaffInfo info : kitchenStaffInfoList) {
|
||||
info.setPhonenumber(SM4EncryptUtils.sm4Decrypt(info.getPhonenumber()));
|
||||
info.setHealthCertStatusName(HealthCertStatusEnum.getDescByKey(info.getHealthCertStatus()));
|
||||
}
|
||||
}
|
||||
return kitchenStaffInfoList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -49,10 +103,14 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int insertKitchenStaffInfo(KitchenStaffInfo kitchenStaffInfo) {
|
||||
kitchenStaffInfo.setCreateTime(DateUtils.getNowDate());
|
||||
kitchenStaffInfo.setCreateBy(SecurityUtils.getUsername());
|
||||
try {
|
||||
return kitchenStaffInfoMapper.insertKitchenStaffInfo(kitchenStaffInfo);
|
||||
int result = kitchenStaffInfoMapper.insertKitchenStaffInfo(kitchenStaffInfo);
|
||||
addPrivileges(kitchenStaffInfo);
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
|
|
@ -67,11 +125,29 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
|||
@Override
|
||||
public int updateKitchenStaffInfo(KitchenStaffInfo kitchenStaffInfo) {
|
||||
kitchenStaffInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
kitchenStaffInfo.setUpdateBy(SecurityUtils.getUsername());
|
||||
try {
|
||||
return kitchenStaffInfoMapper.updateKitchenStaffInfo(kitchenStaffInfo);
|
||||
kitchenStaffInfoMapper.updateKitchenStaffInfo(kitchenStaffInfo);
|
||||
kitchenStaffDevicePrivilegeMapper.deleteKitchenStaffDevicePrivilegeByStaffId(kitchenStaffInfo.getStaffId());
|
||||
addPrivileges(kitchenStaffInfo);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
private void addPrivileges(KitchenStaffInfo kitchenStaffInfo) {
|
||||
if(CollUtil.isNotEmpty(kitchenStaffInfo.getAccessAuthorityList())) {
|
||||
for(AccessAuthority access : kitchenStaffInfo.getAccessAuthorityList()) {
|
||||
KitchenStaffDevicePrivilege kitchenStaffDevicePrivilege = new KitchenStaffDevicePrivilege();
|
||||
kitchenStaffDevicePrivilege.setStaffId(kitchenStaffInfo.getStaffId());
|
||||
kitchenStaffDevicePrivilege.setDeviceId(access.getDeviceId());
|
||||
kitchenStaffDevicePrivilege.setDeviceType(access.getDeviceType());
|
||||
kitchenStaffDevicePrivilege.setPrivilegeName("is_enable");
|
||||
kitchenStaffDevicePrivilege.setPrivilegeValue(access.getPrivilegeValue());
|
||||
kitchenStaffDevicePrivilegeService.insertKitchenStaffDevicePrivilege(Collections.singletonList(kitchenStaffDevicePrivilege));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
package com.bonus.canteen.core.kitchen.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.houqin.utils.SM4EncryptUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.canteen.core.kitchen.mapper.KitchenStaffMorningCheckMapper;
|
||||
|
|
@ -39,7 +42,17 @@ public class KitchenStaffMorningCheckServiceImpl implements IKitchenStaffMorning
|
|||
*/
|
||||
@Override
|
||||
public List<KitchenStaffMorningCheck> selectKitchenStaffMorningCheckList(KitchenStaffMorningCheck kitchenStaffMorningCheck) {
|
||||
return kitchenStaffMorningCheckMapper.selectKitchenStaffMorningCheckList(kitchenStaffMorningCheck);
|
||||
String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(kitchenStaffMorningCheck.getSearchValue());
|
||||
kitchenStaffMorningCheck.setEncryptedSearchValue(encryptedSearchValue);
|
||||
List<KitchenStaffMorningCheck> kitchenStaffMorningCheckList = kitchenStaffMorningCheckMapper
|
||||
.selectKitchenStaffMorningCheckList(kitchenStaffMorningCheck);
|
||||
if(CollUtil.isNotEmpty(kitchenStaffMorningCheckList)) {
|
||||
kitchenStaffMorningCheckList.forEach(value -> {
|
||||
value.setPhonenumber(SM4EncryptUtils.sm4Decrypt(value.getPhonenumber()));
|
||||
});
|
||||
}
|
||||
|
||||
return kitchenStaffMorningCheckList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -41,7 +41,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="selectKitchenDeviceSensorMetricVo"/>
|
||||
where measure_id = #{measureId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectKitchenDeviceSensorMetricByMeasureCode" parameterType="String" resultMap="KitchenDeviceSensorMetricResult">
|
||||
<include refid="selectKitchenDeviceSensorMetricVo"/>
|
||||
where measure_code = #{measureCode}
|
||||
</select>
|
||||
|
||||
<insert id="insertKitchenDeviceSensorMetric" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenDeviceSensorMetric" useGeneratedKeys="true" keyProperty="measureId">
|
||||
insert into kitchen_device_sensor_metric
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="batchNo" column="batch_no" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="deviceType" column="device_type" />
|
||||
<result property="measureMetricId" column="measure_metric_id" />
|
||||
<result property="measureCode" column="measure_code" />
|
||||
<result property="measureData" column="measure_data" />
|
||||
<result property="gatewayDeviceId" column="gateway_device_id" />
|
||||
<result property="deviceTime" column="device_time" />
|
||||
|
|
@ -19,25 +19,89 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="canteenName" column="canteen_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectKitchenDeviceSensorRecordVo">
|
||||
select record_id, batch_no, device_id, device_type, measure_metric_id, measure_data, gateway_device_id, device_time, sub_place, canteen_id, area_id, create_by, create_time, update_by, update_time from kitchen_device_sensor_record
|
||||
select record_id, batch_no, kdsr.device_id, kdsr.device_type, kdsr.measure_code, measure_data,
|
||||
gateway_device_id, device_time, kdsr.sub_place, kdsr.canteen_id, kdsr.area_id, kdsr.create_by,
|
||||
kdsr.create_time, kdsr.update_by, kdsr.update_time, kdi.device_name, bc.canteen_name
|
||||
from kitchen_device_sensor_record kdsr
|
||||
left join kitchen_device_sensor_metric kdsm on kdsm.measure_code = kdsr.measure_code
|
||||
left join kitchen_device_info kdi on kdi.device_id = kdsr.device_id
|
||||
left join basic_canteen bc on bc.canteen_id = kdi.canteen_id
|
||||
</sql>
|
||||
|
||||
<select id="selectKitchenDeviceSensorRecordList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenDeviceSensorRecord" resultMap="KitchenDeviceSensorRecordResult">
|
||||
<include refid="selectKitchenDeviceSensorRecordVo"/>
|
||||
<where>
|
||||
<if test="batchNo != null "> and batch_no = #{batchNo}</if>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="deviceType != null "> and device_type = #{deviceType}</if>
|
||||
<if test="measureMetricId != null and measureMetricId != ''"> and measure_metric_id = #{measureMetricId}</if>
|
||||
<if test="deviceId != null "> and kdsr.device_id = #{deviceId}</if>
|
||||
<if test="deviceType != null "> and kdsr.device_type = #{deviceType}</if>
|
||||
<if test="measureCode != null and measureCode != ''"> and kdsr.measure_code = #{measureCode}</if>
|
||||
<if test="measureData != null and measureData != ''"> and measure_data = #{measureData}</if>
|
||||
<if test="gatewayDeviceId != null "> and gateway_device_id = #{gatewayDeviceId}</if>
|
||||
<if test="deviceTime != null "> and device_time = #{deviceTime}</if>
|
||||
<if test="subPlace != null "> and sub_place = #{subPlace}</if>
|
||||
<if test="canteenId != null "> and canteen_id = #{canteenId}</if>
|
||||
<if test="areaId != null "> and area_id = #{areaId}</if>
|
||||
<if test="subPlace != null "> and kdsr.sub_place = #{subPlace}</if>
|
||||
<if test="canteenId != null "> and kdsr.canteen_id = #{canteenId}</if>
|
||||
<if test="areaId != null "> and kdsr.area_id = #{areaId}</if>
|
||||
<if test="sensorResultTypeList != null and sensorResultTypeList.size() > 0">
|
||||
and (
|
||||
<foreach item="type" collection="sensorResultTypeList" separator=" or ">
|
||||
<choose>
|
||||
<when test="type == 1">
|
||||
((kdsm.measure_code = 'temperature'
|
||||
and kdsm.measure_type = 1
|
||||
and kdsr.measure_data between kdsm.measure_min_value and kdsm.measure_max_value)
|
||||
or (kdsm.measure_code = 'humidity'
|
||||
and kdsm.measure_type = 1
|
||||
and kdsr.measure_data between kdsm.measure_min_value and kdsm.measure_max_value)
|
||||
or (kdsm.measure_code = 'smoke'
|
||||
and kdsm.measure_type = 1
|
||||
and kdsr.measure_data <![CDATA[ <= ]]> kdsm.measure_max_value)
|
||||
)
|
||||
</when>
|
||||
<when test="type == 2">
|
||||
(kdsm.measure_code = 'temperature'
|
||||
and kdsm.measure_type = 1
|
||||
and kdsr.measure_data <![CDATA[ > ]]> kdsm.measure_max_value)
|
||||
</when>
|
||||
<when test="type == 3">
|
||||
(kdsm.measure_code = 'temperature'
|
||||
and kdsm.measure_type = 1
|
||||
and kdsr.measure_data <![CDATA[ < ]]> kdsm.measure_min_value)
|
||||
</when>
|
||||
<when test="type == 4">
|
||||
(kdsm.measure_code = 'humidity'
|
||||
and kdsm.measure_type = 1
|
||||
and kdsr.measure_data <![CDATA[ > ]]> kdsm.measure_max_value)
|
||||
</when>
|
||||
<when test="type == 5">
|
||||
(kdsm.measure_code = 'humidity'
|
||||
and kdsm.measure_type = 1
|
||||
and kdsr.measure_data <![CDATA[ < ]]> kdsm.measure_min_value)
|
||||
</when>
|
||||
<when test="type == 6">
|
||||
(kdsm.measure_code = 'smoke'
|
||||
and kdsm.measure_type = 1
|
||||
and kdsr.measure_data <![CDATA[ > ]]> kdsm.measure_max_value)
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
and (kdsr.device_id like CONCAT('%',#{searchValue},'%')
|
||||
or kdi.device_name like CONCAT('%',#{searchValue},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="startDateTime != null">
|
||||
and kdsr.create_time <![CDATA[ >= ]]> #{startDateTime}
|
||||
</if>
|
||||
<if test="endDateTime != null">
|
||||
and kdsr.create_time <![CDATA[ <= ]]> #{endDateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
@ -52,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="batchNo != null">batch_no,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="deviceType != null">device_type,</if>
|
||||
<if test="measureMetricId != null">measure_metric_id,</if>
|
||||
<if test="measureCode != null">measure_code,</if>
|
||||
<if test="measureData != null">measure_data,</if>
|
||||
<if test="gatewayDeviceId != null">gateway_device_id,</if>
|
||||
<if test="deviceTime != null">device_time,</if>
|
||||
|
|
@ -68,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="batchNo != null">#{batchNo},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="deviceType != null">#{deviceType},</if>
|
||||
<if test="measureMetricId != null">#{measureMetricId},</if>
|
||||
<if test="measureCode != null">#{measureCode},</if>
|
||||
<if test="measureData != null">#{measureData},</if>
|
||||
<if test="gatewayDeviceId != null">#{gatewayDeviceId},</if>
|
||||
<if test="deviceTime != null">#{deviceTime},</if>
|
||||
|
|
@ -88,7 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="batchNo != null">batch_no = #{batchNo},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="deviceType != null">device_type = #{deviceType},</if>
|
||||
<if test="measureMetricId != null">measure_metric_id = #{measureMetricId},</if>
|
||||
<if test="measureCode != null">measure_code = #{measureCode},</if>
|
||||
<if test="measureData != null">measure_data = #{measureData},</if>
|
||||
<if test="gatewayDeviceId != null">gateway_device_id = #{gatewayDeviceId},</if>
|
||||
<if test="deviceTime != null">device_time = #{deviceTime},</if>
|
||||
|
|
|
|||
|
|
@ -19,16 +19,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="canteenName" column="canteen_name" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectKitchenSampleCabinetRecordVo">
|
||||
select record_id, device_id, open_cabinet_temp, close_cabinet_temp, staff_id, open_cabinet_time, close_cabinet_time, operate_type, action_type, operate_photo, operate_date, create_by, create_time, update_by, update_time from kitchen_sample_cabinet_record
|
||||
select record_id, kscr.device_id, open_cabinet_temp, close_cabinet_temp, staff_id,
|
||||
open_cabinet_time, close_cabinet_time, operate_type, action_type,
|
||||
operate_photo, operate_date, kscr.create_by, kscr.create_time, kscr.update_by, kscr.update_time,
|
||||
kdi.device_name, bc.canteen_name, su.nick_name
|
||||
from kitchen_sample_cabinet_record kscr
|
||||
left join kitchen_device_info kdi on kdi.device_id = kscr.device_id
|
||||
left join basic_canteen bc on bc.canteen_id = kdi.canteen_id
|
||||
left join sys_user su on su.user_id = kscr.staff_id
|
||||
</sql>
|
||||
|
||||
<select id="selectKitchenSampleCabinetRecordList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenSampleCabinetRecord" resultMap="KitchenSampleCabinetRecordResult">
|
||||
<include refid="selectKitchenSampleCabinetRecordVo"/>
|
||||
<where>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="deviceId != null "> and kscr.device_id = #{deviceId}</if>
|
||||
<if test="openCabinetTemp != null "> and open_cabinet_temp = #{openCabinetTemp}</if>
|
||||
<if test="closeCabinetTemp != null "> and close_cabinet_temp = #{closeCabinetTemp}</if>
|
||||
<if test="staffId != null "> and staff_id = #{staffId}</if>
|
||||
|
|
@ -38,6 +48,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="actionType != null "> and action_type = #{actionType}</if>
|
||||
<if test="operatePhoto != null and operatePhoto != ''"> and operate_photo = #{operatePhoto}</if>
|
||||
<if test="operateDate != null "> and operate_date = #{operateDate}</if>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
and (kscr.device_id like CONCAT('%',#{searchValue},'%')
|
||||
or kdi.device_name like CONCAT('%',#{searchValue},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="staffName != null and staffName != ''">
|
||||
and (su.nick_name like CONCAT('%',#{staffName},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="startDateTime != null">
|
||||
and kscr.create_time <![CDATA[ >= ]]> #{startDateTime}
|
||||
</if>
|
||||
<if test="endDateTime != null">
|
||||
and kscr.create_time <![CDATA[ <= ]]> #{endDateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,21 +32,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="canteenName" column="canteen_name" />
|
||||
<result property="stallName" column="stall_name" />
|
||||
<result property="dishesName" column="dishes_name" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="userName" column="user_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectKitchenSampleDishesRecordVo">
|
||||
select record_id, mealtime_type, device_id, stall_id, canteen_id, dishes_id, image_url, machine_no, machine_sn, sample_weight, sample_save_time, chef_id, sample_save_staff_id, sample_take_staff_id, print_record_time, enter_cabinet_time, leave_cabinet_time, expiration_time, weight_standard, valid_duration, duration_standard, status, cabinet_no, save_status, create_by, create_time, update_by, update_time from kitchen_sample_dishes_record
|
||||
select record_id, mealtime_type, ksdr.device_id, ksdr.stall_id, ksdr.canteen_id, ksdr.dishes_id,
|
||||
ksdr.image_url, machine_no, machine_sn, sample_weight, sample_save_time,
|
||||
chef_id, sample_save_staff_id, sample_take_staff_id, print_record_time,
|
||||
enter_cabinet_time, leave_cabinet_time, expiration_time, weight_standard,
|
||||
valid_duration, duration_standard, ksdr.status, cabinet_no, save_status,
|
||||
ksdr.create_by, ksdr.create_time, ksdr.update_by, ksdr.update_time,
|
||||
bc.canteen_name, bs.stall_name, bd.dishes_name, kdi.device_name, su.user_name
|
||||
from kitchen_sample_dishes_record ksdr
|
||||
left join basic_canteen bc on bc.canteen_id = ksdr.canteen_id
|
||||
left join basic_stall bs on bs.stall_id = ksdr.stall_id
|
||||
left join cook_dishes bd on bd.dishes_id = ksdr.dishes_id
|
||||
left join kitchen_device_info kdi on kdi.device_id = ksdr.device_id
|
||||
left join sys_user su on su.user_id = ksdr.sample_save_staff_id
|
||||
</sql>
|
||||
|
||||
<select id="selectKitchenSampleDishesRecordList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenSampleDishesRecord" resultMap="KitchenSampleDishesRecordResult">
|
||||
<include refid="selectKitchenSampleDishesRecordVo"/>
|
||||
<where>
|
||||
<if test="mealtimeType != null "> and mealtime_type = #{mealtimeType}</if>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="stallId != null "> and stall_id = #{stallId}</if>
|
||||
<if test="canteenId != null "> and canteen_id = #{canteenId}</if>
|
||||
<if test="dishesId != null "> and dishes_id = #{dishesId}</if>
|
||||
<if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if>
|
||||
<if test="deviceId != null "> and ksdr.device_id = #{deviceId}</if>
|
||||
<if test="stallId != null "> and ksdr.stall_id = #{stallId}</if>
|
||||
<if test="canteenId != null "> and ksdr.canteen_id = #{canteenId}</if>
|
||||
<if test="dishesId != null "> and ksdr.dishes_id = #{dishesId}</if>
|
||||
<if test="imageUrl != null and imageUrl != ''"> and ksdr.image_url = #{imageUrl}</if>
|
||||
<if test="machineNo != null and machineNo != ''"> and machine_no = #{machineNo}</if>
|
||||
<if test="machineSn != null and machineSn != ''"> and machine_sn = #{machineSn}</if>
|
||||
<if test="sampleWeight != null "> and sample_weight = #{sampleWeight}</if>
|
||||
|
|
@ -61,9 +78,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="weightStandard != null "> and weight_standard = #{weightStandard}</if>
|
||||
<if test="validDuration != null "> and valid_duration = #{validDuration}</if>
|
||||
<if test="durationStandard != null "> and duration_standard = #{durationStandard}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="status != null "> and ksdr.status = #{status}</if>
|
||||
<if test="cabinetNo != null "> and cabinet_no = #{cabinetNo}</if>
|
||||
<if test="saveStatus != null "> and save_status = #{saveStatus}</if>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
and (ksdr.dishes_id like CONCAT('%',#{searchValue},'%')
|
||||
or bd.dishes_name like CONCAT('%',#{searchValue},'%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<resultMap type="com.bonus.canteen.core.kitchen.domain.KitchenStaffDevicePrivilege" id="KitchenStaffDevicePrivilegeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="staffId" column="staff_id" />
|
||||
<result property="deviceType" column="device_type" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="privilegeName" column="privilege_name" />
|
||||
<result property="privilegeValue" column="privilege_value" />
|
||||
|
|
@ -16,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectKitchenStaffDevicePrivilegeVo">
|
||||
select id, staff_id, device_id, privilege_name, privilege_value, create_by, create_time, update_by, update_time from kitchen_staff_device_privilege
|
||||
select id, staff_id, device_type, device_id, privilege_name, privilege_value, create_by, create_time, update_by, update_time from kitchen_staff_device_privilege
|
||||
</sql>
|
||||
|
||||
<select id="selectKitchenStaffDevicePrivilegeList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffDevicePrivilege" resultMap="KitchenStaffDevicePrivilegeResult">
|
||||
|
|
@ -33,11 +34,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="selectKitchenStaffDevicePrivilegeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectKitchenStaffDevicePrivilegeByStaffId" parameterType="Long" resultMap="KitchenStaffDevicePrivilegeResult">
|
||||
<include refid="selectKitchenStaffDevicePrivilegeVo"/>
|
||||
where staff_id = #{staffId}
|
||||
</select>
|
||||
|
||||
<insert id="insertKitchenStaffDevicePrivilege" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffDevicePrivilege" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into kitchen_staff_device_privilege
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="staffId != null">staff_id,</if>
|
||||
<if test="deviceType != null">device_type,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="privilegeName != null">privilege_name,</if>
|
||||
<if test="privilegeValue != null">privilege_value,</if>
|
||||
|
|
@ -48,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="staffId != null">#{staffId},</if>
|
||||
<if test="deviceType != null">#{deviceType},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="privilegeName != null">#{privilegeName},</if>
|
||||
<if test="privilegeValue != null">#{privilegeValue},</if>
|
||||
|
|
@ -62,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update kitchen_staff_device_privilege
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="staffId != null">staff_id = #{staffId},</if>
|
||||
<if test="deviceType != null">device_type = #{deviceType},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="privilegeName != null">privilege_name = #{privilegeName},</if>
|
||||
<if test="privilegeValue != null">privilege_value = #{privilegeValue},</if>
|
||||
|
|
@ -83,4 +92,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteKitchenStaffDevicePrivilegeByStaffId" parameterType="Long">
|
||||
delete from kitchen_staff_device_privilege where staff_id = #{staffId}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -21,19 +21,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="canteenName" column="canteen_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectKitchenStaffIllegalWarningVo">
|
||||
select illegal_warning_id, staff_id, device_id, img_url, record_desc, record_time, illegal_warning_type, handle_state, handle_time, handler_person, notify_state, notify_desc, alarm_type, create_by, create_time, update_by, update_time from kitchen_staff_illegal_warning
|
||||
select illegal_warning_id, ksiw.staff_id, device_id, ksiw.img_url, record_desc, record_time,
|
||||
illegal_warning_type, handle_state, handle_time, handler_person, notify_state,
|
||||
notify_desc, alarm_type, ksiw.create_by, ksiw.create_time, ksiw.update_by, ksiw.update_time,
|
||||
su.nick_name, su.user_id, bc.canteen_name
|
||||
from kitchen_staff_illegal_warning ksiw
|
||||
left join kitchen_staff_info ksi on ksiw.staff_id = ksi.staff_id
|
||||
left join sys_user su on su.user_id = ksi.user_id
|
||||
left join basic_canteen bc on bc.canteen_id = ksi.canteen_id
|
||||
</sql>
|
||||
|
||||
<select id="selectKitchenStaffIllegalWarningList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffIllegalWarning" resultMap="KitchenStaffIllegalWarningResult">
|
||||
<include refid="selectKitchenStaffIllegalWarningVo"/>
|
||||
<where>
|
||||
<if test="staffId != null "> and staff_id = #{staffId}</if>
|
||||
<if test="staffId != null "> and ksiw.staff_id = #{staffId}</if>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if>
|
||||
<if test="recordDesc != null and recordDesc != ''"> and record_desc = #{recordDesc}</if>
|
||||
<if test="imgUrl != null and imgUrl != ''"> and ksiw.img_url = #{imgUrl}</if>
|
||||
<if test="recordDesc != null and recordDesc != ''"> and record_desc like CONCAT('%',#{recordDesc},'%')</if>
|
||||
<if test="recordTime != null "> and record_time = #{recordTime}</if>
|
||||
<if test="illegalWarningType != null "> and illegal_warning_type = #{illegalWarningType}</if>
|
||||
<if test="handleState != null "> and handle_state = #{handleState}</if>
|
||||
|
|
@ -42,6 +52,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="notifyState != null "> and notify_state = #{notifyState}</if>
|
||||
<if test="notifyDesc != null and notifyDesc != ''"> and notify_desc = #{notifyDesc}</if>
|
||||
<if test="alarmType != null "> and alarm_type = #{alarmType}</if>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
and (su.nick_name like CONCAT('%',#{searchValue},'%')
|
||||
or su.phonenumber = #{encryptedSearchValue}
|
||||
or su.user_id like CONCAT('%',#{searchValue},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="startDateTime != null">
|
||||
and ksiw.create_time <![CDATA[ >= ]]> #{startDateTime}
|
||||
</if>
|
||||
<if test="endDateTime != null">
|
||||
and ksiw.create_time <![CDATA[ <= ]]> #{endDateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<mapper namespace="com.bonus.canteen.core.kitchen.mapper.KitchenStaffInfoMapper">
|
||||
<resultMap type="com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo" id="KitchenStaffInfoResult">
|
||||
<result property="staffId" column="staff_id" />
|
||||
<result property="canteenId" column="canteen_id" />
|
||||
<result property="staffNo" column="staff_no" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="healthCertExpire" column="health_cert_expire" />
|
||||
|
|
@ -19,19 +20,66 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectKitchenStaffInfoVo">
|
||||
select staff_id, staff_no, user_id, health_cert_expire, health_cert_front_img, health_cert_back_img, nutrity_cert_expire, safety_cert_expire, create_by, create_time, update_by, update_time from kitchen_staff_info
|
||||
select staff_id, canteen_id, staff_no, kst.user_id, health_cert_expire,
|
||||
health_cert_front_img, health_cert_back_img, nutrity_cert_expire,
|
||||
safety_cert_expire, kst.create_by, kst.create_time, kst.update_by, kst.update_time,
|
||||
su.nick_name, su.phonenumber, su.sex, uf.photo_url, uf.face_state as faceStatus, sp.post_name
|
||||
from kitchen_staff_info kst
|
||||
left join sys_user su on kst.user_id = su.user_id
|
||||
left join sys_user_post sup on kst.user_id = sup.user_id
|
||||
left join sys_post sp on sup.post_id = sp.post_id
|
||||
left join user_face uf on kst.user_id = uf.user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectKitchenStaffInfoList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo" resultMap="KitchenStaffInfoResult">
|
||||
<include refid="selectKitchenStaffInfoVo"/>
|
||||
<where>
|
||||
<if test="staffNo != null and staffNo != ''"> and staff_no = #{staffNo}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userId != null "> and kst.user_id = #{userId}</if>
|
||||
<if test="healthCertExpire != null "> and health_cert_expire = #{healthCertExpire}</if>
|
||||
<if test="healthCertFrontImg != null "> and health_cert_front_img = #{healthCertFrontImg}</if>
|
||||
<if test="healthCertBackImg != null "> and health_cert_back_img = #{healthCertBackImg}</if>
|
||||
<if test="nutrityCertExpire != null "> and nutrity_cert_expire = #{nutrityCertExpire}</if>
|
||||
<if test="safetyCertExpire != null "> and safety_cert_expire = #{safetyCertExpire}</if>
|
||||
<if test="sex != null "> and su.sex = #{sex}</if>
|
||||
<if test="postIds != null and postIds.length() > 0">
|
||||
and sup.post_id in
|
||||
<foreach item="postId" collection="postIds" open="(" separator="," close=")">
|
||||
#{postId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="faceStatus != null "> and uf.face_state = #{faceStatus}</if>
|
||||
<if test="healthCertStatus != null ">
|
||||
and case
|
||||
when #{healthCertStatus} = 1 then
|
||||
(
|
||||
DATE_SUB(kst.health_cert_expire,
|
||||
INTERVAL (select bs.item_value from basic_setting bs where bs.item_name = 'staff_health_cert_left_day_reminder') DAY)
|
||||
<![CDATA[ >= ]]> now()
|
||||
)
|
||||
when #{healthCertStatus} = 2 then
|
||||
(
|
||||
kst.health_cert_expire <![CDATA[ < ]]> now()
|
||||
)
|
||||
when #{healthCertStatus} = 3 then
|
||||
(
|
||||
health_cert_front_img is null
|
||||
)
|
||||
when #{healthCertStatus} = 4 then
|
||||
(
|
||||
DATE_SUB(kst.health_cert_expire,
|
||||
INTERVAL (select bs.item_value from basic_setting bs where bs.item_name = 'staff_health_cert_left_day_reminder') DAY)
|
||||
<![CDATA[ < ]]> now()
|
||||
and kst.health_cert_expire > now()
|
||||
)
|
||||
end
|
||||
</if>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
and (su.nick_name like CONCAT('%',#{searchValue},'%')
|
||||
or su.phonenumber = #{encryptedSearchValue}
|
||||
or su.user_id like CONCAT('%',#{searchValue},'%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
@ -44,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
insert into kitchen_staff_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="staffNo != null and staffNo != ''">staff_no,</if>
|
||||
<if test="canteenId != null">canteen_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="healthCertExpire != null">health_cert_expire,</if>
|
||||
<if test="healthCertFrontImg != null">health_cert_front_img,</if>
|
||||
|
|
@ -57,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="staffNo != null and staffNo != ''">#{staffNo},</if>
|
||||
<if test="canteenId != null">#{canteenId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="healthCertExpire != null">#{healthCertExpire},</if>
|
||||
<if test="healthCertFrontImg != null">#{healthCertFrontImg},</if>
|
||||
|
|
@ -74,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update kitchen_staff_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="staffNo != null and staffNo != ''">staff_no = #{staffNo},</if>
|
||||
<if test="canteenId != null">canteen_id = #{canteenId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="healthCertExpire != null">health_cert_expire = #{healthCertExpire},</if>
|
||||
<if test="healthCertFrontImg != null">health_cert_front_img = #{healthCertFrontImg},</if>
|
||||
|
|
|
|||
|
|
@ -16,22 +16,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="postName" column="post_name" />
|
||||
<result property="canteenName" column="canteen_name" />
|
||||
<result property="phonenumber" column="phonenumber" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectKitchenStaffMorningCheckVo">
|
||||
select check_Id, staff_id, device_id, temperature_value, temperature_status, check_status, record_time, check_video_url, create_by, create_time, update_by, update_time from kitchen_staff_morning_check
|
||||
select check_Id, ksmc.staff_id, device_id, temperature_value, temperature_status,
|
||||
check_status, record_time, check_video_url, ksmc.create_by, ksmc.create_time,
|
||||
ksmc.update_by, ksmc.update_time, su.nick_name, sp.post_name, bc.canteen_name,
|
||||
su.phonenumber
|
||||
from kitchen_staff_morning_check ksmc
|
||||
left join kitchen_staff_info ksi on ksmc.staff_id = ksi.staff_id
|
||||
left join sys_user su on ksi.user_id = su.user_id
|
||||
left join sys_user_post sup on ksi.user_id = sup.user_id
|
||||
left join sys_post sp on sup.post_id = sp.post_id
|
||||
left join basic_canteen bc on ksi.canteen_id = bc.canteen_id
|
||||
</sql>
|
||||
|
||||
<select id="selectKitchenStaffMorningCheckList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffMorningCheck" resultMap="KitchenStaffMorningCheckResult">
|
||||
<include refid="selectKitchenStaffMorningCheckVo"/>
|
||||
<where>
|
||||
<if test="staffId != null "> and staff_id = #{staffId}</if>
|
||||
<if test="staffId != null "> and ksmc.staff_id = #{staffId}</if>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="temperatureValue != null "> and temperature_value = #{temperatureValue}</if>
|
||||
<if test="temperatureStatus != null and temperatureStatus != ''"> and temperature_status = #{temperatureStatus}</if>
|
||||
<if test="checkStatus != null "> and check_status = #{checkStatus}</if>
|
||||
<if test="recordTime != null "> and record_time = #{recordTime}</if>
|
||||
<if test="checkVideoUrl != null and checkVideoUrl != ''"> and check_video_url = #{checkVideoUrl}</if>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
and (su.nick_name like CONCAT('%',#{searchValue},'%')
|
||||
or su.phonenumber = #{encryptedSearchValue}
|
||||
or su.user_id like CONCAT('%',#{searchValue},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="postIds != null and postIds.length() > 0">
|
||||
and sup.post_id in
|
||||
<foreach item="postId" collection="postIds" open="(" separator="," close=")">
|
||||
#{postId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="startDateTime != null">
|
||||
and ksmc.create_time <![CDATA[ >= ]]> #{startDateTime}
|
||||
</if>
|
||||
<if test="endDateTime != null">
|
||||
and ksmc.create_time <![CDATA[ <= ]]> #{endDateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue