Compare commits
No commits in common. "92b72c1e5d513fc9c2ba18d2f0662d2632e86cc0" and "cb811166910bb1249ff6b61a860ef4107d0d26c9" have entirely different histories.
92b72c1e5d
...
cb81116691
|
|
@ -98,23 +98,6 @@ public class KitchenStaffInfoController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改厨房员工资料
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "修改厨房员工人脸状态")
|
|
||||||
//@PreventRepeatSubmit
|
|
||||||
//@RequiresPermissions("kitchen:info:edit")
|
|
||||||
@SysLog(title = "厨房员工资料", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改厨房员工人脸状态")
|
|
||||||
@PostMapping("/edit/face-state")
|
|
||||||
public AjaxResult editFaceState(@RequestBody KitchenStaffInfo kitchenStaffInfo) {
|
|
||||||
try {
|
|
||||||
|
|
||||||
return toAjax(kitchenStaffInfoService.updateKitchenStaffFaceState(kitchenStaffInfo));
|
|
||||||
} catch (Exception e) {
|
|
||||||
return error(e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除厨房员工资料
|
* 删除厨房员工资料
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.bonus.canteen.core.kitchen.domain;
|
package com.bonus.canteen.core.kitchen.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -114,6 +113,4 @@ public class KitchenDeviceSensorRecord extends BaseEntity {
|
||||||
@ApiModelProperty("结束时间")
|
@ApiModelProperty("结束时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime endDateTime;
|
private LocalDateTime endDateTime;
|
||||||
|
|
||||||
private String searchValue;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.bonus.canteen.core.kitchen.domain;
|
package com.bonus.canteen.core.kitchen.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -86,6 +85,9 @@ public class KitchenSampleCabinetRecord extends BaseEntity {
|
||||||
@ApiModelProperty(value = "食堂名称")
|
@ApiModelProperty(value = "食堂名称")
|
||||||
private String canteenName;
|
private String canteenName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作人")
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "动作类型名称 1:留样 2:取样 3无操作")
|
@ApiModelProperty(value = "动作类型名称 1:留样 2:取样 3无操作")
|
||||||
private String actionTypeName;
|
private String actionTypeName;
|
||||||
|
|
||||||
|
|
@ -100,6 +102,4 @@ public class KitchenSampleCabinetRecord extends BaseEntity {
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime endDateTime;
|
private LocalDateTime endDateTime;
|
||||||
|
|
||||||
private String searchValue;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.bonus.canteen.core.kitchen.domain;
|
package com.bonus.canteen.core.kitchen.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
@ -180,7 +179,5 @@ public class KitchenSampleDishesRecord extends BaseEntity {
|
||||||
private String deviceName;
|
private String deviceName;
|
||||||
|
|
||||||
@ApiModelProperty("留样人")
|
@ApiModelProperty("留样人")
|
||||||
private String staffName;
|
private String userName;
|
||||||
|
|
||||||
private String searchValue;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,76 +0,0 @@
|
||||||
package com.bonus.canteen.core.kitchen.domain;
|
|
||||||
|
|
||||||
import com.bonus.common.core.annotation.Excel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.ToString;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人员生物识别特征对象 sys_user_face
|
|
||||||
*
|
|
||||||
* @author xsheng
|
|
||||||
* @date 2025-04-03
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@ToString
|
|
||||||
public class KitchenStaffFace implements Serializable {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 主键自增 */
|
|
||||||
private Long faceId;
|
|
||||||
|
|
||||||
/** 人员id */
|
|
||||||
@ApiModelProperty(value = "人员id")
|
|
||||||
@NotBlank(message = "人员id必填")
|
|
||||||
private Long staffId;
|
|
||||||
|
|
||||||
/** 照片地址 */
|
|
||||||
@ApiModelProperty(value = "照片地址")
|
|
||||||
//@NotBlank(message = "照片地址必填")
|
|
||||||
private String photoUrl;
|
|
||||||
|
|
||||||
/** 特征码 */
|
|
||||||
@Excel(name = "特征码")
|
|
||||||
@ApiModelProperty(value = "特征码")
|
|
||||||
private String features;
|
|
||||||
|
|
||||||
/** 类型 1-照片 2-指纹 3-掌纹 4-掌静脉 5-指静脉 6-虹膜 */
|
|
||||||
@Excel(name = "类型 1-照片 2-指纹 3-掌纹 4-掌静脉 5-指静脉 6-虹膜")
|
|
||||||
@ApiModelProperty(value = "类型 1-照片 2-指纹 3-掌纹 4-掌静脉 5-指静脉 6-虹膜")
|
|
||||||
private Long photoType = 1L;
|
|
||||||
|
|
||||||
/** 特征码生成状态 1-未生成 2-生成成功 3-生成失败 */
|
|
||||||
@Excel(name = "特征码生成状态 1-未生成 2-生成成功 3-生成失败")
|
|
||||||
@ApiModelProperty(value = "特征码生成状态 1-未生成 2-生成成功 3-生成失败")
|
|
||||||
private Long featuresBuildStatus;
|
|
||||||
|
|
||||||
/** 特征码生成时间 */
|
|
||||||
@ApiModelProperty(value = "特征码生成时间")
|
|
||||||
private Date featuresBuildTime;
|
|
||||||
|
|
||||||
/** 状态 1-正常 2-冻结 3-销户 4-挂失 */
|
|
||||||
@ApiModelProperty(value = "状态 1-正常 2-冻结 3-销户 4-挂失")
|
|
||||||
private String faceState;
|
|
||||||
|
|
||||||
/** 特征码生成失败原因 */
|
|
||||||
@Excel(name = "特征码生成失败原因")
|
|
||||||
@ApiModelProperty(value = "特征码生成失败原因")
|
|
||||||
private String errorMsg;
|
|
||||||
|
|
||||||
/** 删除标志(0代表存在 2代表删除) */
|
|
||||||
private String delFlag;
|
|
||||||
|
|
||||||
private String createBy;
|
|
||||||
|
|
||||||
private String createTime;
|
|
||||||
|
|
||||||
private String updateBy;
|
|
||||||
|
|
||||||
private String updateTime;
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.bonus.canteen.core.kitchen.domain;
|
package com.bonus.canteen.core.kitchen.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
@ -93,14 +92,12 @@ public class KitchenStaffIllegalWarning extends BaseEntity {
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime endDateTime;
|
private LocalDateTime endDateTime;
|
||||||
|
|
||||||
private String staffName;
|
private String nickName;
|
||||||
|
|
||||||
private String staffNo;
|
private Long userId;
|
||||||
|
|
||||||
private String canteenName;
|
private String canteenName;
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private String encryptedSearchValue;
|
private String encryptedSearchValue;
|
||||||
|
|
||||||
private String searchValue;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
package com.bonus.canteen.core.kitchen.domain;
|
package com.bonus.canteen.core.kitchen.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.bonus.canteen.core.common.utils.FileUrlUtil;
|
import com.bonus.canteen.core.common.utils.FileUrlUtil;
|
||||||
|
import com.bonus.system.api.domain.SysUser;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.bonus.common.core.annotation.Excel;
|
import com.bonus.common.core.annotation.Excel;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
|
@ -23,7 +23,7 @@ import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ToString
|
@ToString
|
||||||
public class KitchenStaffInfo extends BaseEntity {
|
public class KitchenStaffInfo extends SysUser {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 食堂后场人员id */
|
/** 食堂后场人员id */
|
||||||
|
|
@ -34,42 +34,10 @@ public class KitchenStaffInfo extends BaseEntity {
|
||||||
@ApiModelProperty(value = "食堂后场人员编号")
|
@ApiModelProperty(value = "食堂后场人员编号")
|
||||||
private String staffNo;
|
private String staffNo;
|
||||||
|
|
||||||
/** 食堂后场人员姓名 */
|
/** 用户id */
|
||||||
@Excel(name = "食堂后场人员姓名")
|
@Excel(name = "用户id")
|
||||||
@ApiModelProperty(value = "食堂后场人员姓名")
|
@ApiModelProperty(value = "用户id")
|
||||||
private String staffName;
|
private Long userId;
|
||||||
|
|
||||||
/** 食堂后场人员岗位 */
|
|
||||||
@Excel(name = "食堂后场人员岗位")
|
|
||||||
@ApiModelProperty(value = "食堂后场人员岗位")
|
|
||||||
private String postName;
|
|
||||||
|
|
||||||
/** 食堂后场人员手机号 */
|
|
||||||
@Excel(name = "食堂后场人员手机号")
|
|
||||||
@ApiModelProperty(value = "食堂后场人员手机号")
|
|
||||||
private String mobile;
|
|
||||||
|
|
||||||
/** 食堂后场人员性别 */
|
|
||||||
@Excel(name = "食堂后场人员性别")
|
|
||||||
@ApiModelProperty(value = "食堂后场人员性别")
|
|
||||||
private Integer sex;
|
|
||||||
|
|
||||||
/** 区域 */
|
|
||||||
@Excel(name = "区域")
|
|
||||||
@ApiModelProperty(value = "区域")
|
|
||||||
private Long areaId;
|
|
||||||
|
|
||||||
@Excel(name = "食堂后场人员人脸照片地址")
|
|
||||||
@ApiModelProperty(value = "食堂后场人员人脸照片地址")
|
|
||||||
private String faceUrl;
|
|
||||||
|
|
||||||
@Excel(name = "关联食堂")
|
|
||||||
@ApiModelProperty(value = "关联食堂")
|
|
||||||
private String canteenName;
|
|
||||||
|
|
||||||
@Excel(name = "关联区域")
|
|
||||||
@ApiModelProperty(value = "关联区域")
|
|
||||||
private String areaName;
|
|
||||||
|
|
||||||
/** 健康证到期时间 */
|
/** 健康证到期时间 */
|
||||||
@ApiModelProperty(value = "健康证到期时间")
|
@ApiModelProperty(value = "健康证到期时间")
|
||||||
|
|
@ -105,20 +73,18 @@ public class KitchenStaffInfo extends BaseEntity {
|
||||||
@ApiModelProperty(value = "健康证状态")
|
@ApiModelProperty(value = "健康证状态")
|
||||||
private Integer healthCertStatus;
|
private Integer healthCertStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "岗位名称")
|
||||||
|
private String postName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "员工设备权限")
|
@ApiModelProperty(value = "员工设备权限")
|
||||||
private List<AccessAuthority> accessAuthorityList;
|
private List<AccessAuthority> accessAuthorityList;
|
||||||
|
|
||||||
@ApiModelProperty(value = "食堂编号")
|
@ApiModelProperty(value = "食堂编号")
|
||||||
private Long canteenId;
|
private Long canteenId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "人脸状态")
|
|
||||||
private Integer faceState;
|
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private String encryptedSearchValue;
|
private String encryptedSearchValue;
|
||||||
|
|
||||||
private String searchValue;
|
|
||||||
|
|
||||||
public String getHealthCertFrontImg() {
|
public String getHealthCertFrontImg() {
|
||||||
return FileUrlUtil.getFileUrl(this.healthCertFrontImg);
|
return FileUrlUtil.getFileUrl(this.healthCertFrontImg);
|
||||||
}
|
}
|
||||||
|
|
@ -126,8 +92,4 @@ public class KitchenStaffInfo extends BaseEntity {
|
||||||
public String getHealthCertBackImg() {
|
public String getHealthCertBackImg() {
|
||||||
return FileUrlUtil.getFileUrl(this.healthCertBackImg);
|
return FileUrlUtil.getFileUrl(this.healthCertBackImg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFaceUrl() {
|
|
||||||
return FileUrlUtil.getFileUrl(this.faceUrl);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package com.bonus.canteen.core.kitchen.domain;
|
package com.bonus.canteen.core.kitchen.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
@ -76,19 +76,17 @@ public class KitchenStaffMorningCheck extends BaseEntity {
|
||||||
private String postName;
|
private String postName;
|
||||||
|
|
||||||
@ApiModelProperty("用户名称")
|
@ApiModelProperty("用户名称")
|
||||||
private String staffName;
|
private String nickName;
|
||||||
|
|
||||||
@ApiModelProperty("食堂名称")
|
@ApiModelProperty("食堂名称")
|
||||||
private String canteenName;
|
private String canteenName;
|
||||||
|
|
||||||
@ApiModelProperty("手机号码")
|
@ApiModelProperty("手机号码")
|
||||||
private String mobile;
|
private String phonenumber;
|
||||||
|
|
||||||
@ApiModelProperty("员工编号")
|
@ApiModelProperty("员工编号")
|
||||||
private String staffNo;
|
private Long staffNo;
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private String encryptedSearchValue;
|
private String encryptedSearchValue;
|
||||||
|
|
||||||
private String searchValue;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.bonus.canteen.core.kitchen.domain;
|
package com.bonus.canteen.core.kitchen.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -104,6 +103,4 @@ public class KitchenWasteDeal extends BaseEntity {
|
||||||
@ApiModelProperty("结束时间")
|
@ApiModelProperty("结束时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime endDateTime;
|
private LocalDateTime endDateTime;
|
||||||
|
|
||||||
private String searchValue;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.bonus.canteen.core.kitchen.domain;
|
package com.bonus.canteen.core.kitchen.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
@ -71,6 +70,4 @@ public class KitchenWasteMeal extends BaseEntity {
|
||||||
@Excel(name = "区域Id")
|
@Excel(name = "区域Id")
|
||||||
@ApiModelProperty(value = "厨余汇总")
|
@ApiModelProperty(value = "厨余汇总")
|
||||||
private Long wasteMealCount;
|
private Long wasteMealCount;
|
||||||
|
|
||||||
private String searchValue;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
package com.bonus.canteen.core.kitchen.domain.constants;
|
|
||||||
|
|
||||||
public enum StaffFaceStateEnum {
|
|
||||||
ENABLE(1, "正常"),
|
|
||||||
HISTORY(2, "禁用");
|
|
||||||
|
|
||||||
private final Integer key;
|
|
||||||
private final String desc;
|
|
||||||
|
|
||||||
private StaffFaceStateEnum(Integer key, String desc) {
|
|
||||||
this.key = key;
|
|
||||||
this.desc = desc;
|
|
||||||
}
|
|
||||||
public Integer getKey() {
|
|
||||||
return this.key;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDesc() {
|
|
||||||
return this.desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isValidFaceState(int value) {
|
|
||||||
for (StaffFaceStateEnum state : StaffFaceStateEnum.values()) {
|
|
||||||
if (state.getKey() == value) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
package com.bonus.canteen.core.kitchen.mapper;
|
|
||||||
|
|
||||||
import com.bonus.canteen.core.kitchen.domain.KitchenStaffFace;
|
|
||||||
import com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人员生物识别特征Mapper接口
|
|
||||||
*
|
|
||||||
* @author xsheng
|
|
||||||
* @date 2025-04-03
|
|
||||||
*/
|
|
||||||
public interface KitchenStaffFaceMapper {
|
|
||||||
int insertStaffFace(KitchenStaffFace kitchenStaffFace);
|
|
||||||
|
|
||||||
int deleteStaffFace(KitchenStaffFace kitchenStaffFace);
|
|
||||||
|
|
||||||
int deleteStaffFaces(Long[] staffIds);
|
|
||||||
|
|
||||||
int updateStaffFaceState(KitchenStaffInfo kitchenStaffInfo);
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
package com.bonus.canteen.core.kitchen.service;
|
|
||||||
|
|
||||||
import com.bonus.canteen.core.kitchen.domain.KitchenStaffFace;
|
|
||||||
import com.bonus.canteen.core.user.domain.UserFace;
|
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人员生物识别特征Service接口
|
|
||||||
*
|
|
||||||
* @author xsheng
|
|
||||||
* @date 2025-04-03
|
|
||||||
*/
|
|
||||||
public interface IKitchenStaffFaceService {
|
|
||||||
/**
|
|
||||||
* 查询人员生物识别特征
|
|
||||||
*
|
|
||||||
* @param dto 人员生物识别特征主键
|
|
||||||
* @return 人员生物识别特征
|
|
||||||
*/
|
|
||||||
AjaxResult uploadUserFace(@Valid KitchenStaffFace dto);
|
|
||||||
}
|
|
||||||
|
|
@ -42,14 +42,6 @@ public interface IKitchenStaffInfoService {
|
||||||
*/
|
*/
|
||||||
public int updateKitchenStaffInfo(KitchenStaffInfo kitchenStaffInfo);
|
public int updateKitchenStaffInfo(KitchenStaffInfo kitchenStaffInfo);
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改厨房员工人脸状态
|
|
||||||
*
|
|
||||||
* @param kitchenStaffInfo 厨房员工资料
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateKitchenStaffFaceState(KitchenStaffInfo kitchenStaffInfo);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除厨房员工资料
|
* 批量删除厨房员工资料
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,93 +0,0 @@
|
||||||
package com.bonus.canteen.core.kitchen.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import com.bonus.canteen.core.common.utils.FileUrlUtil;
|
|
||||||
import com.bonus.canteen.core.common.utils.MqUtil;
|
|
||||||
import com.bonus.canteen.core.kitchen.domain.KitchenStaffFace;
|
|
||||||
import com.bonus.canteen.core.kitchen.mapper.KitchenStaffFaceMapper;
|
|
||||||
import com.bonus.canteen.core.kitchen.service.IKitchenStaffFaceService;
|
|
||||||
import com.bonus.canteen.core.user.domain.DeviceMqPersonalUpdateMessageDTO;
|
|
||||||
import com.bonus.canteen.core.user.utils.ArcFaceHelper;
|
|
||||||
import com.bonus.canteen.core.user.utils.FaceResult;
|
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
|
||||||
import com.bonus.common.core.utils.DateUtils;
|
|
||||||
import com.bonus.common.core.utils.StringUtils;
|
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
|
||||||
import com.bonus.common.houqin.mq.constant.LeMqConstant;
|
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Base64;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人员生物识别特征Service业务层处理
|
|
||||||
*
|
|
||||||
* @author xsheng
|
|
||||||
* @date 2025-04-03
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class KitchenStaffFaceServiceImpl implements IKitchenStaffFaceService {
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(KitchenStaffFaceServiceImpl.class);
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private KitchenStaffFaceMapper kitchenStaffFaceMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询人员生物识别特征
|
|
||||||
*
|
|
||||||
* @param dto 人员生物识别特征主键
|
|
||||||
* @return 人员生物识别特征
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public AjaxResult uploadUserFace(KitchenStaffFace dto) {
|
|
||||||
if (ObjectUtil.isNull(dto)) {
|
|
||||||
throw new ServiceException("参数为空!");
|
|
||||||
}
|
|
||||||
if (ObjectUtil.isNull(dto.getStaffId())) {
|
|
||||||
throw new ServiceException("用户ID为空!");
|
|
||||||
}
|
|
||||||
if (StringUtils.isEmpty(dto.getPhotoUrl())) {
|
|
||||||
kitchenStaffFaceMapper.deleteStaffFace(dto);
|
|
||||||
// //发送mq
|
|
||||||
// DeviceMqPersonalUpdateMessageDTO bean = new DeviceMqPersonalUpdateMessageDTO().setUpdatePersonPhoto(dto.getStaffId().intValue(),"del");
|
|
||||||
// MqUtil.pushToTenantAllDevice(bean, LeMqConstant.Topic.DEVICE_UPDATE_PERSONAL_CONFIG_V4);
|
|
||||||
} else {
|
|
||||||
log.info("开始采集虹软人脸");
|
|
||||||
ArcFaceHelper arcFaceHelper = new ArcFaceHelper();
|
|
||||||
String url = FileUrlUtil.getFileUrl(dto.getPhotoUrl());
|
|
||||||
FaceResult faceResult = arcFaceHelper.getFaceFeatures(url);
|
|
||||||
log.info("采集结束");
|
|
||||||
List<KitchenStaffFace> list = new ArrayList<>();
|
|
||||||
if (faceResult != null) {
|
|
||||||
KitchenStaffFace faceVO = new KitchenStaffFace();
|
|
||||||
faceVO.setErrorMsg("[软件]成功");
|
|
||||||
faceVO.setFeatures(Base64.getEncoder().encodeToString(faceResult.getFeatures()));
|
|
||||||
faceVO.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
|
|
||||||
faceVO.setStaffId(dto.getStaffId());
|
|
||||||
faceVO.setPhotoUrl(dto.getPhotoUrl());
|
|
||||||
faceVO.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
|
|
||||||
faceVO.setUpdateBy(String.valueOf(SecurityUtils.getUserId()));
|
|
||||||
faceVO.setCreateTime(DateUtils.getTime());
|
|
||||||
faceVO.setUpdateTime(DateUtils.getTime());
|
|
||||||
list.add(faceVO);
|
|
||||||
log.info("faceResult.getFeatures():" + Base64.getEncoder().encodeToString(faceResult.getFeatures()));
|
|
||||||
log.info("人脸采集成功");
|
|
||||||
} else {
|
|
||||||
throw new ServiceException("[虹软算法]:特征值提取失败");
|
|
||||||
}
|
|
||||||
int code = kitchenStaffFaceMapper.insertStaffFace(list.get(0));
|
|
||||||
if (code == 0){
|
|
||||||
throw new ServiceException("[虹软算法]:保存失败");
|
|
||||||
}
|
|
||||||
// //发送mq
|
|
||||||
// DeviceMqPersonalUpdateMessageDTO bean = new DeviceMqPersonalUpdateMessageDTO().setUpdatePersonPhoto(dto.getStaffId().intValue(),"update");
|
|
||||||
// MqUtil.pushToTenantAllDevice(bean, LeMqConstant.Topic.DEVICE_UPDATE_PERSONAL_CONFIG_V4);
|
|
||||||
}
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -5,12 +5,15 @@ import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.bonus.canteen.core.kitchen.domain.*;
|
import com.bonus.canteen.core.kitchen.domain.KitchenSetting;
|
||||||
import com.bonus.canteen.core.kitchen.domain.constants.StaffFaceStateEnum;
|
import com.bonus.canteen.core.kitchen.mapper.KitchenSettingMapper;
|
||||||
import com.bonus.canteen.core.kitchen.mapper.*;
|
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.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.kitchen.service.IKitchenStaffDevicePrivilegeService;
|
||||||
import com.bonus.canteen.core.kitchen.service.IKitchenStaffFaceService;
|
|
||||||
import com.bonus.canteen.core.kitchen.vo.KitchenDeviceListVO;
|
import com.bonus.canteen.core.kitchen.vo.KitchenDeviceListVO;
|
||||||
import com.bonus.canteen.core.user.domain.UserFace;
|
import com.bonus.canteen.core.user.domain.UserFace;
|
||||||
import com.bonus.canteen.core.user.service.IUserFaceService;
|
import com.bonus.canteen.core.user.service.IUserFaceService;
|
||||||
|
|
@ -24,6 +27,8 @@ import org.apache.catalina.security.SecurityUtil;
|
||||||
import org.apache.commons.compress.utils.Lists;
|
import org.apache.commons.compress.utils.Lists;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.bonus.canteen.core.kitchen.mapper.KitchenStaffInfoMapper;
|
||||||
|
import com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo;
|
||||||
import com.bonus.canteen.core.kitchen.service.IKitchenStaffInfoService;
|
import com.bonus.canteen.core.kitchen.service.IKitchenStaffInfoService;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
@ -45,10 +50,6 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
||||||
private KitchenDeviceInfoMapper kitchenDeviceInfoMapper;
|
private KitchenDeviceInfoMapper kitchenDeviceInfoMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private KitchenSettingMapper kitchenSettingMapper;
|
private KitchenSettingMapper kitchenSettingMapper;
|
||||||
@Autowired
|
|
||||||
private IKitchenStaffFaceService kitchenStaffFaceService;
|
|
||||||
@Autowired
|
|
||||||
private KitchenStaffFaceMapper kitchenStaffFaceMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询厨房员工资料
|
* 查询厨房员工资料
|
||||||
|
|
@ -60,32 +61,29 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
||||||
public KitchenStaffInfo selectKitchenStaffInfoByStaffId(Long staffId) {
|
public KitchenStaffInfo selectKitchenStaffInfoByStaffId(Long staffId) {
|
||||||
KitchenStaffInfo kitchenStaffInfo = kitchenStaffInfoMapper.selectKitchenStaffInfoByStaffId(staffId);
|
KitchenStaffInfo kitchenStaffInfo = kitchenStaffInfoMapper.selectKitchenStaffInfoByStaffId(staffId);
|
||||||
if(Objects.nonNull(kitchenStaffInfo)) {
|
if(Objects.nonNull(kitchenStaffInfo)) {
|
||||||
|
kitchenStaffInfo.setPhonenumber(SM4EncryptUtils.sm4Decrypt(kitchenStaffInfo.getPhonenumber()));
|
||||||
List<KitchenStaffDevicePrivilege> kitchenStaffDevicePrivilegeList = kitchenStaffDevicePrivilegeMapper
|
List<KitchenStaffDevicePrivilege> kitchenStaffDevicePrivilegeList = kitchenStaffDevicePrivilegeMapper
|
||||||
.selectKitchenStaffDevicePrivilegeByStaffId(staffId);
|
.selectKitchenStaffDevicePrivilegeByStaffId(staffId);
|
||||||
composeDeviceAccess(kitchenStaffDevicePrivilegeList, kitchenStaffInfo);
|
if(CollUtil.isNotEmpty(kitchenStaffDevicePrivilegeList)) {
|
||||||
|
List<AccessAuthority> accessAuthorityList = Lists.newArrayList();
|
||||||
|
for (KitchenStaffDevicePrivilege kitchenStaffDevicePrivilege : kitchenStaffDevicePrivilegeList) {
|
||||||
|
AccessAuthority accessAuthority = new AccessAuthority();
|
||||||
|
KitchenDeviceListVO 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());
|
||||||
|
accessAuthorityList.add(accessAuthority);
|
||||||
|
}
|
||||||
|
kitchenStaffInfo.setAccessAuthorityList(accessAuthorityList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return kitchenStaffInfo;
|
return kitchenStaffInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void composeDeviceAccess(List<KitchenStaffDevicePrivilege> kitchenStaffDevicePrivilegeList, KitchenStaffInfo kitchenStaffInfo) {
|
|
||||||
if(CollUtil.isNotEmpty(kitchenStaffDevicePrivilegeList)) {
|
|
||||||
List<AccessAuthority> accessAuthorityList = Lists.newArrayList();
|
|
||||||
for (KitchenStaffDevicePrivilege kitchenStaffDevicePrivilege : kitchenStaffDevicePrivilegeList) {
|
|
||||||
AccessAuthority accessAuthority = new AccessAuthority();
|
|
||||||
KitchenDeviceListVO 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());
|
|
||||||
accessAuthorityList.add(accessAuthority);
|
|
||||||
}
|
|
||||||
kitchenStaffInfo.setAccessAuthorityList(accessAuthorityList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询厨房员工资料列表
|
* 查询厨房员工资料列表
|
||||||
*
|
*
|
||||||
|
|
@ -108,9 +106,7 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
||||||
reminderDays = kitchenSettingList.get(0).getItemValue() == null ? 30L : Long.parseLong(kitchenSettingList.get(0).getItemValue());
|
reminderDays = kitchenSettingList.get(0).getItemValue() == null ? 30L : Long.parseLong(kitchenSettingList.get(0).getItemValue());
|
||||||
}
|
}
|
||||||
for (KitchenStaffInfo info : kitchenStaffInfoList) {
|
for (KitchenStaffInfo info : kitchenStaffInfoList) {
|
||||||
List<KitchenStaffDevicePrivilege> kitchenStaffDevicePrivilegeList = kitchenStaffDevicePrivilegeMapper
|
info.setPhonenumber(SM4EncryptUtils.sm4Decrypt(info.getPhonenumber()));
|
||||||
.selectKitchenStaffDevicePrivilegeByStaffId(info.getStaffId());
|
|
||||||
composeDeviceAccess(kitchenStaffDevicePrivilegeList, info);
|
|
||||||
if(StringUtils.isBlank(info.getHealthCertFrontImg())) {
|
if(StringUtils.isBlank(info.getHealthCertFrontImg())) {
|
||||||
info.setHealthCertStatusName(HealthCertStatusEnum.NO_IMG.getDesc());
|
info.setHealthCertStatusName(HealthCertStatusEnum.NO_IMG.getDesc());
|
||||||
}else if(Objects.nonNull(info.getHealthCertExpire()) && info.getHealthCertExpire().isBefore(LocalDate.now())){
|
}else if(Objects.nonNull(info.getHealthCertExpire()) && info.getHealthCertExpire().isBefore(LocalDate.now())){
|
||||||
|
|
@ -149,10 +145,6 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
||||||
checkUser(kitchenStaffInfo);
|
checkUser(kitchenStaffInfo);
|
||||||
int result = kitchenStaffInfoMapper.insertKitchenStaffInfo(kitchenStaffInfo);
|
int result = kitchenStaffInfoMapper.insertKitchenStaffInfo(kitchenStaffInfo);
|
||||||
addPrivileges(kitchenStaffInfo);
|
addPrivileges(kitchenStaffInfo);
|
||||||
KitchenStaffFace kitchenStaffFace = new KitchenStaffFace();
|
|
||||||
kitchenStaffFace.setStaffId(kitchenStaffInfo.getStaffId());
|
|
||||||
kitchenStaffFace.setPhotoUrl(kitchenStaffInfo.getFaceUrl());
|
|
||||||
kitchenStaffFaceService.uploadUserFace(kitchenStaffFace);
|
|
||||||
return result;
|
return result;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException(e.getMessage());
|
throw new ServiceException(e.getMessage());
|
||||||
|
|
@ -169,7 +161,7 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
||||||
public int updateKitchenStaffInfo(KitchenStaffInfo kitchenStaffInfo) {
|
public int updateKitchenStaffInfo(KitchenStaffInfo kitchenStaffInfo) {
|
||||||
kitchenStaffInfo.setUpdateTime(DateUtils.getNowDate());
|
kitchenStaffInfo.setUpdateTime(DateUtils.getNowDate());
|
||||||
kitchenStaffInfo.setUpdateBy(SecurityUtils.getUsername());
|
kitchenStaffInfo.setUpdateBy(SecurityUtils.getUsername());
|
||||||
if(Objects.isNull(kitchenStaffInfo.getStaffNo())) {
|
if(Objects.isNull(kitchenStaffInfo.getStaffId())) {
|
||||||
throw new ServiceException("员工编号不能为空");
|
throw new ServiceException("员工编号不能为空");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
@ -177,28 +169,22 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
||||||
kitchenStaffInfoMapper.updateKitchenStaffInfo(kitchenStaffInfo);
|
kitchenStaffInfoMapper.updateKitchenStaffInfo(kitchenStaffInfo);
|
||||||
kitchenStaffDevicePrivilegeMapper.deleteKitchenStaffDevicePrivilegeByStaffId(kitchenStaffInfo.getStaffId());
|
kitchenStaffDevicePrivilegeMapper.deleteKitchenStaffDevicePrivilegeByStaffId(kitchenStaffInfo.getStaffId());
|
||||||
addPrivileges(kitchenStaffInfo);
|
addPrivileges(kitchenStaffInfo);
|
||||||
KitchenStaffFace kitchenStaffFace = new KitchenStaffFace();
|
|
||||||
kitchenStaffFace.setStaffId(kitchenStaffInfo.getStaffId());
|
|
||||||
kitchenStaffFace.setPhotoUrl(kitchenStaffInfo.getFaceUrl());
|
|
||||||
kitchenStaffFaceService.uploadUserFace(kitchenStaffFace);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException(e.getMessage());
|
throw new ServiceException(e.getMessage());
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateKitchenStaffFaceState(KitchenStaffInfo kitchenStaffInfo) {
|
|
||||||
if(StaffFaceStateEnum.isValidFaceState(kitchenStaffInfo.getFaceState())) {
|
|
||||||
throw new ServiceException("无效的人脸状态");
|
|
||||||
}
|
|
||||||
return kitchenStaffFaceMapper.updateStaffFaceState(kitchenStaffInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void checkUser(KitchenStaffInfo kitchenStaffInfo) {
|
private void checkUser(KitchenStaffInfo kitchenStaffInfo) {
|
||||||
KitchenStaffInfo kitchenStaffInfoByPhone = new KitchenStaffInfo();
|
KitchenStaffInfo kitchenStaffInfoByPhone = new KitchenStaffInfo();
|
||||||
kitchenStaffInfoByPhone.setStaffNo(kitchenStaffInfo.getStaffNo());
|
kitchenStaffInfoByPhone.setUserId(kitchenStaffInfo.getUserId());
|
||||||
List<KitchenStaffInfo> staffInfoList = kitchenStaffInfoMapper.selectKitchenStaffInfoList(kitchenStaffInfoByPhone);
|
List<KitchenStaffInfo> staffInfoList = kitchenStaffInfoMapper.selectKitchenStaffInfoList(kitchenStaffInfoByPhone);
|
||||||
|
if(CollUtil.isNotEmpty(staffInfoList) && !Objects.equals(staffInfoList.get(0).getStaffId(), kitchenStaffInfo.getStaffId())) {
|
||||||
|
throw new ServiceException("该用户已存在");
|
||||||
|
}
|
||||||
|
kitchenStaffInfoByPhone = new KitchenStaffInfo();
|
||||||
|
kitchenStaffInfoByPhone.setStaffNo(kitchenStaffInfo.getStaffNo());
|
||||||
|
staffInfoList = kitchenStaffInfoMapper.selectKitchenStaffInfoList(kitchenStaffInfoByPhone);
|
||||||
if(CollUtil.isNotEmpty(staffInfoList) && !Objects.equals(staffInfoList.get(0).getStaffId(), kitchenStaffInfo.getStaffId())) {
|
if(CollUtil.isNotEmpty(staffInfoList) && !Objects.equals(staffInfoList.get(0).getStaffId(), kitchenStaffInfo.getStaffId())) {
|
||||||
throw new ServiceException("该用户编号已存在");
|
throw new ServiceException("该用户编号已存在");
|
||||||
}
|
}
|
||||||
|
|
@ -229,7 +215,6 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
||||||
@Override
|
@Override
|
||||||
public int deleteKitchenStaffInfoByStaffIds(Long[] staffIds) {
|
public int deleteKitchenStaffInfoByStaffIds(Long[] staffIds) {
|
||||||
kitchenStaffDevicePrivilegeMapper.deleteKitchenStaffDevicePrivilegeByStaffIds(staffIds);
|
kitchenStaffDevicePrivilegeMapper.deleteKitchenStaffDevicePrivilegeByStaffIds(staffIds);
|
||||||
kitchenStaffFaceMapper.deleteStaffFaces(staffIds);
|
|
||||||
return kitchenStaffInfoMapper.deleteKitchenStaffInfoByStaffIds(staffIds);
|
return kitchenStaffInfoMapper.deleteKitchenStaffInfoByStaffIds(staffIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -242,9 +227,6 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
||||||
@Override
|
@Override
|
||||||
public int deleteKitchenStaffInfoByStaffId(Long staffId) {
|
public int deleteKitchenStaffInfoByStaffId(Long staffId) {
|
||||||
kitchenStaffDevicePrivilegeMapper.deleteKitchenStaffDevicePrivilegeByStaffId(staffId);
|
kitchenStaffDevicePrivilegeMapper.deleteKitchenStaffDevicePrivilegeByStaffId(staffId);
|
||||||
KitchenStaffFace kitchenStaffFace = new KitchenStaffFace();
|
|
||||||
kitchenStaffFace.setStaffId(staffId);
|
|
||||||
kitchenStaffFaceMapper.deleteStaffFace(kitchenStaffFace);
|
|
||||||
return kitchenStaffInfoMapper.deleteKitchenStaffInfoByStaffId(staffId);
|
return kitchenStaffInfoMapper.deleteKitchenStaffInfoByStaffId(staffId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ public class KitchenStaffMorningCheckServiceImpl implements IKitchenStaffMorning
|
||||||
.selectKitchenStaffMorningCheckList(kitchenStaffMorningCheck);
|
.selectKitchenStaffMorningCheckList(kitchenStaffMorningCheck);
|
||||||
if(CollUtil.isNotEmpty(kitchenStaffMorningCheckList)) {
|
if(CollUtil.isNotEmpty(kitchenStaffMorningCheckList)) {
|
||||||
kitchenStaffMorningCheckList.forEach(value -> {
|
kitchenStaffMorningCheckList.forEach(value -> {
|
||||||
value.setMobile(SM4EncryptUtils.sm4Decrypt(value.getMobile()));
|
value.setPhonenumber(SM4EncryptUtils.sm4Decrypt(value.getPhonenumber()));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,18 +21,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="deviceName" column="device_name" />
|
<result property="deviceName" column="device_name" />
|
||||||
<result property="canteenName" column="canteen_name" />
|
<result property="canteenName" column="canteen_name" />
|
||||||
<result property="staffName" column="staff_name" />
|
<result property="nickName" column="nick_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectKitchenSampleCabinetRecordVo">
|
<sql id="selectKitchenSampleCabinetRecordVo">
|
||||||
select record_id, kscr.device_id, open_cabinet_temp, close_cabinet_temp, kscr.staff_id,
|
select record_id, kscr.device_id, open_cabinet_temp, close_cabinet_temp, kscr.staff_id,
|
||||||
open_cabinet_time, close_cabinet_time, operate_type, action_type,
|
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,
|
operate_photo, operate_date, kscr.create_by, kscr.create_time, kscr.update_by, kscr.update_time,
|
||||||
kdi.device_name, bc.canteen_name, ksi.staff_name
|
kdi.device_name, bc.canteen_name, su.nick_name
|
||||||
from kitchen_sample_cabinet_record kscr
|
from kitchen_sample_cabinet_record kscr
|
||||||
left join kitchen_device_info kdi on kdi.device_id = kscr.device_id
|
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 basic_canteen bc on bc.canteen_id = kdi.canteen_id
|
||||||
left join kitchen_staff_info ksi on ksi.staff_id = kscr.staff_id
|
left join kitchen_staff_info ksi on ksi.staff_id = kscr.staff_id
|
||||||
|
left join sys_user su on su.user_id = ksi.user_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectKitchenSampleCabinetRecordList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenSampleCabinetRecord" resultMap="KitchenSampleCabinetRecordResult">
|
<select id="selectKitchenSampleCabinetRecordList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenSampleCabinetRecord" resultMap="KitchenSampleCabinetRecordResult">
|
||||||
|
|
@ -54,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="staffName != null and staffName != ''">
|
<if test="staffName != null and staffName != ''">
|
||||||
and (ksi.staff_name like CONCAT('%',#{staffName},'%')
|
and (su.nick_name like CONCAT('%',#{staffName},'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="startDateTime != null">
|
<if test="startDateTime != null">
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="stallName" column="stall_name" />
|
<result property="stallName" column="stall_name" />
|
||||||
<result property="dishesName" column="dishes_name" />
|
<result property="dishesName" column="dishes_name" />
|
||||||
<result property="deviceName" column="device_name" />
|
<result property="deviceName" column="device_name" />
|
||||||
<result property="staffName" column="staff_name" />
|
<result property="userName" column="user_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectKitchenSampleDishesRecordVo">
|
<sql id="selectKitchenSampleDishesRecordVo">
|
||||||
|
|
@ -46,13 +46,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
enter_cabinet_time, leave_cabinet_time, expiration_time, weight_standard,
|
enter_cabinet_time, leave_cabinet_time, expiration_time, weight_standard,
|
||||||
valid_duration, duration_standard, ksdr.status, cabinet_no, save_status,
|
valid_duration, duration_standard, ksdr.status, cabinet_no, save_status,
|
||||||
ksdr.create_by, ksdr.create_time, ksdr.update_by, ksdr.update_time,
|
ksdr.create_by, ksdr.create_time, ksdr.update_by, ksdr.update_time,
|
||||||
bc.canteen_name, bs.stall_name, bd.dishes_name, kdi.device_name, ksi.staff_name
|
bc.canteen_name, bs.stall_name, bd.dishes_name, kdi.device_name, su.user_name
|
||||||
from kitchen_sample_dishes_record ksdr
|
from kitchen_sample_dishes_record ksdr
|
||||||
left join basic_canteen bc on bc.canteen_id = ksdr.canteen_id
|
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 basic_stall bs on bs.stall_id = ksdr.stall_id
|
||||||
left join cook_dishes bd on bd.dishes_id = ksdr.dishes_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 kitchen_device_info kdi on kdi.device_id = ksdr.device_id
|
||||||
left join kitchen_staff_info ksi on ksi.staff_id = ksdr.sample_save_staff_id
|
left join sys_user su on su.user_id = ksdr.sample_save_staff_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectKitchenSampleDishesRecordList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenSampleDishesRecord" resultMap="KitchenSampleDishesRecordResult">
|
<select id="selectKitchenSampleDishesRecordList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenSampleDishesRecord" resultMap="KitchenSampleDishesRecordResult">
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
<?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.bonus.canteen.core.kitchen.mapper.KitchenStaffFaceMapper">
|
|
||||||
<insert id="insertStaffFace" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffFace">
|
|
||||||
insert into kitchen_staff_face(staff_id,photo_url,features,create_by,error_msg,create_time,update_by,update_time)
|
|
||||||
values(#{staffId},#{photoUrl},#{features},#{createBy},#{errorMsg},#{createTime},#{updateBy},#{updateTime})
|
|
||||||
on duplicate key update features = #{features},
|
|
||||||
photo_url = #{photoUrl},
|
|
||||||
error_msg = #{errorMsg},
|
|
||||||
update_by = #{updateBy},
|
|
||||||
update_time = #{updateTime}
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateStaffFaceState" >
|
|
||||||
update kitchen_staff_face set face_state = #{faceState}
|
|
||||||
where staff_id = #{staffId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteStaffFace" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffFace">
|
|
||||||
delete from kitchen_staff_face
|
|
||||||
where staff_id = #{staffId}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteStaffFaces">
|
|
||||||
delete from kitchen_staff_face
|
|
||||||
where staff_id in
|
|
||||||
<foreach item="staffId" collection="array" open="(" separator="," close=")">
|
|
||||||
#{staffId}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
</mapper>
|
|
||||||
|
|
@ -21,8 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="staffName" column="staff_name" />
|
<result property="nickName" column="nick_name" />
|
||||||
<result property="staffNo" column="staff_no" />
|
<result property="userId" column="user_id" />
|
||||||
<result property="canteenName" column="canteen_name" />
|
<result property="canteenName" column="canteen_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
@ -30,9 +30,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select illegal_warning_id, ksiw.staff_id, device_id, ksiw.img_url, record_desc, record_time,
|
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,
|
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,
|
notify_desc, alarm_type, ksiw.create_by, ksiw.create_time, ksiw.update_by, ksiw.update_time,
|
||||||
ksi.staff_name, ksi.staff_no, bc.canteen_name
|
su.nick_name, su.user_id, bc.canteen_name
|
||||||
from kitchen_staff_illegal_warning ksiw
|
from kitchen_staff_illegal_warning ksiw
|
||||||
left join kitchen_staff_info ksi on ksiw.staff_id = ksi.staff_id
|
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
|
left join basic_canteen bc on bc.canteen_id = ksi.canteen_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
@ -52,9 +53,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="notifyDesc != null and notifyDesc != ''"> and notify_desc = #{notifyDesc}</if>
|
<if test="notifyDesc != null and notifyDesc != ''"> and notify_desc = #{notifyDesc}</if>
|
||||||
<if test="alarmType != null "> and alarm_type = #{alarmType}</if>
|
<if test="alarmType != null "> and alarm_type = #{alarmType}</if>
|
||||||
<if test="searchValue != null and searchValue != ''">
|
<if test="searchValue != null and searchValue != ''">
|
||||||
and (ksi.staff_name like CONCAT('%',#{searchValue},'%')
|
and (su.nick_name like CONCAT('%',#{searchValue},'%')
|
||||||
or ksi.mobile like CONCAT('%',#{searchValue},'%')
|
or su.phonenumber = #{encryptedSearchValue}
|
||||||
or ksi.staff_no like CONCAT('%',#{searchValue},'%')
|
or su.user_id like CONCAT('%',#{searchValue},'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="startDateTime != null">
|
<if test="startDateTime != null">
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="staffId" column="staff_id" />
|
<result property="staffId" column="staff_id" />
|
||||||
<result property="canteenId" column="canteen_id" />
|
<result property="canteenId" column="canteen_id" />
|
||||||
<result property="staffNo" column="staff_no" />
|
<result property="staffNo" column="staff_no" />
|
||||||
<result property="staffName" column="staff_name" />
|
<result property="userId" column="user_id" />
|
||||||
<result property="postName" column="post_name" />
|
|
||||||
<result property="mobile" column="mobile" />
|
|
||||||
<result property="sex" column="sex" />
|
|
||||||
<result property="areaId" column="area_id" />
|
|
||||||
<result property="faceUrl" column="photo_url" />
|
|
||||||
<result property="faceState" column="face_state" />
|
|
||||||
<result property="canteenName" column="canteen_name" />
|
|
||||||
<result property="areaName" column="area_name" />
|
|
||||||
<result property="healthCertExpire" column="health_cert_expire" />
|
<result property="healthCertExpire" column="health_cert_expire" />
|
||||||
<result property="healthCertFrontImg" column="health_cert_front_img" />
|
<result property="healthCertFrontImg" column="health_cert_front_img" />
|
||||||
<result property="healthCertBackImg" column="health_cert_back_img" />
|
<result property="healthCertBackImg" column="health_cert_back_img" />
|
||||||
|
|
@ -28,29 +20,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectKitchenStaffInfoVo">
|
<sql id="selectKitchenStaffInfoVo">
|
||||||
select kst.staff_id, kst.canteen_id, staff_no, staff_name, post_name, mobile, sex, kst.area_id, health_cert_expire,
|
select staff_id, canteen_id, staff_no, kst.user_id, health_cert_expire,
|
||||||
health_cert_front_img, health_cert_back_img, nutrity_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,
|
safety_cert_expire, kst.create_by, kst.create_time, kst.update_by, kst.update_time,
|
||||||
ksf.photo_url, ksf.face_state, bc.canteen_name, ba.area_name
|
su.nick_name, su.phonenumber, su.sex, uf.photo_url, uf.face_state as faceStatus, sp.post_name
|
||||||
from kitchen_staff_info kst
|
from kitchen_staff_info kst
|
||||||
left join kitchen_staff_face ksf on kst.staff_id = ksf.staff_id
|
left join sys_user su on kst.user_id = su.user_id
|
||||||
left join basic_canteen bc on kst.canteen_id = bc.canteen_id
|
left join sys_user_post sup on kst.user_id = sup.user_id
|
||||||
left join basic_area ba on kst.area_id = ba.area_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>
|
</sql>
|
||||||
|
|
||||||
<select id="selectKitchenStaffInfoList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo" resultMap="KitchenStaffInfoResult">
|
<select id="selectKitchenStaffInfoList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo" resultMap="KitchenStaffInfoResult">
|
||||||
<include refid="selectKitchenStaffInfoVo"/>
|
<include refid="selectKitchenStaffInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="staffNo != null and staffNo != ''"> and staff_no = #{staffNo}</if>
|
<if test="staffNo != null and staffNo != ''"> and staff_no = #{staffNo}</if>
|
||||||
<if test="staffName != null and staffName != ''"> and staff_name = #{staffNo}</if>
|
<if test="userId != null "> and kst.user_id = #{userId}</if>
|
||||||
<if test="postName != null and postName != ''"> and post_name like CONCAT('%',#{postName},'%')</if>
|
|
||||||
<if test="sex != null"> and sex = #{sex}</if>
|
|
||||||
<if test="areaId != null"> and kst.area_id = #{areaId}</if>
|
|
||||||
<if test="healthCertExpire != null "> and health_cert_expire = #{healthCertExpire}</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="nutrityCertExpire != null "> and nutrity_cert_expire = #{nutrityCertExpire}</if>
|
||||||
<if test="safetyCertExpire != null "> and safety_cert_expire = #{safetyCertExpire}</if>
|
<if test="safetyCertExpire != null "> and safety_cert_expire = #{safetyCertExpire}</if>
|
||||||
<if test="faceState != null">
|
<if test="sex != null "> and su.sex = #{sex}</if>
|
||||||
and ksf.face_state = #{faceState}</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 ">
|
<if test="healthCertStatus != null ">
|
||||||
and case
|
and case
|
||||||
when #{healthCertStatus} = 1 then
|
when #{healthCertStatus} = 1 then
|
||||||
|
|
@ -77,9 +75,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
end
|
end
|
||||||
</if>
|
</if>
|
||||||
<if test="searchValue != null and searchValue != ''">
|
<if test="searchValue != null and searchValue != ''">
|
||||||
and (kst.staff_name like CONCAT('%',#{searchValue},'%')
|
and (su.nick_name like CONCAT('%',#{searchValue},'%')
|
||||||
or kst.mobile like CONCAT('%',#{searchValue},'%')
|
or su.phonenumber = #{encryptedSearchValue}
|
||||||
or kst.staff_no like CONCAT('%',#{searchValue},'%')
|
or su.user_id like CONCAT('%',#{searchValue},'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
@ -88,19 +86,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectKitchenStaffInfoByStaffId" parameterType="Long" resultMap="KitchenStaffInfoResult">
|
<select id="selectKitchenStaffInfoByStaffId" parameterType="Long" resultMap="KitchenStaffInfoResult">
|
||||||
<include refid="selectKitchenStaffInfoVo"/>
|
<include refid="selectKitchenStaffInfoVo"/>
|
||||||
where kst.staff_id = #{staffId}
|
where staff_id = #{staffId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertKitchenStaffInfo" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo" useGeneratedKeys="true" keyProperty="staffId">
|
<insert id="insertKitchenStaffInfo" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo" useGeneratedKeys="true" keyProperty="staffId">
|
||||||
insert into kitchen_staff_info
|
insert into kitchen_staff_info
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="staffNo != null and staffNo != ''">staff_no,</if>
|
<if test="staffNo != null and staffNo != ''">staff_no,</if>
|
||||||
<if test="staffName != null and staffName != ''">staff_name,</if>
|
|
||||||
<if test="postName != null and postName != ''">post_name,</if>
|
|
||||||
<if test="mobile != null and mobile != ''">mobile,</if>
|
|
||||||
<if test="sex != null">sex,</if>
|
|
||||||
<if test="areaId != null">area_id,</if>
|
|
||||||
<if test="canteenId != null">canteen_id,</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="healthCertExpire != null">health_cert_expire,</if>
|
||||||
<if test="healthCertFrontImg != null">health_cert_front_img,</if>
|
<if test="healthCertFrontImg != null">health_cert_front_img,</if>
|
||||||
<if test="healthCertBackImg != null">health_cert_back_img,</if>
|
<if test="healthCertBackImg != null">health_cert_back_img,</if>
|
||||||
|
|
@ -113,12 +107,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="staffNo != null and staffNo != ''">#{staffNo},</if>
|
<if test="staffNo != null and staffNo != ''">#{staffNo},</if>
|
||||||
<if test="staffName != null and staffName != ''">#{staffName},</if>
|
|
||||||
<if test="postName != null and postName != ''">#{postName},</if>
|
|
||||||
<if test="mobile != null and mobile != ''">#{mobile},</if>
|
|
||||||
<if test="sex != null">#{sex},</if>
|
|
||||||
<if test="areaId != null">#{areaId},</if>
|
|
||||||
<if test="canteenId != null">#{canteenId},</if>
|
<if test="canteenId != null">#{canteenId},</if>
|
||||||
|
<if test="userId != null">#{userId},</if>
|
||||||
<if test="healthCertExpire != null">#{healthCertExpire},</if>
|
<if test="healthCertExpire != null">#{healthCertExpire},</if>
|
||||||
<if test="healthCertFrontImg != null">#{healthCertFrontImg},</if>
|
<if test="healthCertFrontImg != null">#{healthCertFrontImg},</if>
|
||||||
<if test="healthCertBackImg != null">#{healthCertBackImg},</if>
|
<if test="healthCertBackImg != null">#{healthCertBackImg},</if>
|
||||||
|
|
@ -135,12 +125,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
update kitchen_staff_info
|
update kitchen_staff_info
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="staffNo != null and staffNo != ''">staff_no = #{staffNo},</if>
|
<if test="staffNo != null and staffNo != ''">staff_no = #{staffNo},</if>
|
||||||
<if test="staffName != null and staffName != ''">staff_name = #{staffName},</if>
|
|
||||||
<if test="postName != null and postName != ''">post_name = #{postName},</if>
|
|
||||||
<if test="mobile != null and mobile != ''">mobile = #{mobile},</if>
|
|
||||||
<if test="sex != null">sex = #{sex},</if>
|
|
||||||
<if test="areaId != null">area_id = #{areaId},</if>
|
|
||||||
<if test="canteenId != null">canteen_id = #{canteenId},</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="healthCertExpire != null">health_cert_expire = #{healthCertExpire},</if>
|
||||||
<if test="healthCertFrontImg != null">health_cert_front_img = #{healthCertFrontImg},</if>
|
<if test="healthCertFrontImg != null">health_cert_front_img = #{healthCertFrontImg},</if>
|
||||||
<if test="healthCertBackImg != null">health_cert_back_img = #{healthCertBackImg},</if>
|
<if test="healthCertBackImg != null">health_cert_back_img = #{healthCertBackImg},</if>
|
||||||
|
|
|
||||||
|
|
@ -16,20 +16,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="staffName" column="staff_name" />
|
<result property="nickName" column="nick_name" />
|
||||||
<result property="postName" column="post_name" />
|
<result property="postName" column="post_name" />
|
||||||
<result property="canteenName" column="canteen_name" />
|
<result property="canteenName" column="canteen_name" />
|
||||||
<result property="mobile" column="mobile" />
|
<result property="phonenumber" column="phonenumber" />
|
||||||
<result property="staffNo" column="staff_no" />
|
<result property="staffNo" column="staff_no" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectKitchenStaffMorningCheckVo">
|
<sql id="selectKitchenStaffMorningCheckVo">
|
||||||
select check_Id, ksmc.staff_id, device_id, temperature_value, temperature_status,
|
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,
|
check_status, record_time, check_video_url, ksmc.create_by, ksmc.create_time,
|
||||||
ksmc.update_by, ksmc.update_time, ksi.staff_name, ksi.post_name, bc.canteen_name,
|
ksmc.update_by, ksmc.update_time, su.nick_name, sp.post_name, bc.canteen_name,
|
||||||
ksi.mobile, ksi.staff_no
|
su.phonenumber, ksi.staff_no
|
||||||
from kitchen_staff_morning_check ksmc
|
from kitchen_staff_morning_check ksmc
|
||||||
left join kitchen_staff_info ksi on ksmc.staff_id = ksi.staff_id
|
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
|
left join basic_canteen bc on ksi.canteen_id = bc.canteen_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
@ -43,13 +46,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="checkStatus != null "> and check_status = #{checkStatus}</if>
|
<if test="checkStatus != null "> and check_status = #{checkStatus}</if>
|
||||||
<if test="recordTime != null "> and record_time = #{recordTime}</if>
|
<if test="recordTime != null "> and record_time = #{recordTime}</if>
|
||||||
<if test="checkVideoUrl != null and checkVideoUrl != ''"> and check_video_url = #{checkVideoUrl}</if>
|
<if test="checkVideoUrl != null and checkVideoUrl != ''"> and check_video_url = #{checkVideoUrl}</if>
|
||||||
<if test="postName != null and postName != ''"> and post_name like CONCAT('%',#{postName},'%')</if>
|
|
||||||
<if test="searchValue != null and searchValue != ''">
|
<if test="searchValue != null and searchValue != ''">
|
||||||
and (ksi.staff_name like CONCAT('%',#{searchValue},'%')
|
and (su.nick_name like CONCAT('%',#{searchValue},'%')
|
||||||
or ksi.mobile like CONCAT('%',#{searchValue},'%')
|
or su.phonenumber = #{encryptedSearchValue}
|
||||||
or ksi.staff_no like CONCAT('%',#{searchValue},'%')
|
or su.user_id like CONCAT('%',#{searchValue},'%')
|
||||||
)
|
)
|
||||||
</if>
|
</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">
|
<if test="startDateTime != null">
|
||||||
and ksmc.record_time <![CDATA[ >= ]]> #{startDateTime}
|
and ksmc.record_time <![CDATA[ >= ]]> #{startDateTime}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select waste_id, weight, garbage_name, action_date, device_id, mealtime_type,
|
select waste_id, weight, garbage_name, action_date, device_id, mealtime_type,
|
||||||
kwd.canteen_id, kwd.area_id, deal_type, sale_amount, scene_picture, kwd.staff_id,
|
kwd.canteen_id, kwd.area_id, deal_type, sale_amount, scene_picture, kwd.staff_id,
|
||||||
kwd.create_by, kwd.create_time, kwd.update_by, kwd.update_time, bc.canteen_name,
|
kwd.create_by, kwd.create_time, kwd.update_by, kwd.update_time, bc.canteen_name,
|
||||||
ksi.staff_name as deal_user_name
|
su.user_name as deal_user_name
|
||||||
from kitchen_waste_deal kwd
|
from kitchen_waste_deal kwd
|
||||||
left join basic_canteen bc on kwd.canteen_id = bc.canteen_id
|
left join basic_canteen bc on kwd.canteen_id = bc.canteen_id
|
||||||
left join kitchen_staff_info ksi on kwd.staff_id = ksi.staff_id
|
left join kitchen_staff_info ksi on kwd.staff_id = ksi.staff_id
|
||||||
|
left join sys_user su on ksi.user_id = su.user_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectKitchenWasteDealList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenWasteDeal" resultMap="KitchenWasteDealResult">
|
<select id="selectKitchenWasteDealList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenWasteDeal" resultMap="KitchenWasteDealResult">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue