位置信息和员工进出信息

This commit is contained in:
sxu 2025-06-23 13:29:28 +08:00
parent 2b41e57d27
commit cb81116691
12 changed files with 962 additions and 0 deletions

View File

@ -0,0 +1,119 @@
package com.bonus.canteen.core.kitchen.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.KitchenStaffEnterExitRecord;
import com.bonus.canteen.core.kitchen.service.IKitchenStaffEnterExitRecordService;
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;
/**
* 厨房员工进出门禁记录Controller
*
* @author xsheng
* @date 2025-06-23
*/
@Api(tags = "厨房员工进出门禁记录接口")
@RestController
@RequestMapping("/kitchen_staff_enter_exit_record")
public class KitchenStaffEnterExitRecordController extends BaseController {
@Autowired
private IKitchenStaffEnterExitRecordService kitchenStaffEnterExitRecordService;
/**
* 查询厨房员工进出门禁记录列表
*/
@ApiOperation(value = "查询厨房员工进出门禁记录列表")
//@RequiresPermissions("kitchen:record:list")
@GetMapping("/list")
public TableDataInfo list(KitchenStaffEnterExitRecord kitchenStaffEnterExitRecord) {
startPage();
List<KitchenStaffEnterExitRecord> list = kitchenStaffEnterExitRecordService.selectKitchenStaffEnterExitRecordList(kitchenStaffEnterExitRecord);
return getDataTable(list);
}
/**
* 导出厨房员工进出门禁记录列表
*/
@ApiOperation(value = "导出厨房员工进出门禁记录列表")
//@PreventRepeatSubmit
//@RequiresPermissions("kitchen:record:export")
@SysLog(title = "厨房员工进出门禁记录", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出厨房员工进出门禁记录")
@PostMapping("/export")
public void export(HttpServletResponse response, KitchenStaffEnterExitRecord kitchenStaffEnterExitRecord) {
List<KitchenStaffEnterExitRecord> list = kitchenStaffEnterExitRecordService.selectKitchenStaffEnterExitRecordList(kitchenStaffEnterExitRecord);
ExcelUtil<KitchenStaffEnterExitRecord> util = new ExcelUtil<KitchenStaffEnterExitRecord>(KitchenStaffEnterExitRecord.class);
util.exportExcel(response, list, "厨房员工进出门禁记录数据");
}
/**
* 获取厨房员工进出门禁记录详细信息
*/
@ApiOperation(value = "获取厨房员工进出门禁记录详细信息")
//@RequiresPermissions("kitchen:record:query")
@GetMapping(value = "/{checkId}")
public AjaxResult getInfo(@PathVariable("checkId") Long checkId) {
return success(kitchenStaffEnterExitRecordService.selectKitchenStaffEnterExitRecordByCheckId(checkId));
}
/**
* 新增厨房员工进出门禁记录
*/
@ApiOperation(value = "新增厨房员工进出门禁记录")
//@PreventRepeatSubmit
//@RequiresPermissions("kitchen:record:add")
@SysLog(title = "厨房员工进出门禁记录", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增厨房员工进出门禁记录")
@PostMapping
public AjaxResult add(@RequestBody KitchenStaffEnterExitRecord kitchenStaffEnterExitRecord) {
try {
return toAjax(kitchenStaffEnterExitRecordService.insertKitchenStaffEnterExitRecord(kitchenStaffEnterExitRecord));
} catch (Exception e) {
return error(e.getMessage());
}
}
/**
* 修改厨房员工进出门禁记录
*/
@ApiOperation(value = "修改厨房员工进出门禁记录")
//@PreventRepeatSubmit
//@RequiresPermissions("kitchen:record:edit")
@SysLog(title = "厨房员工进出门禁记录", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改厨房员工进出门禁记录")
@PostMapping("/edit")
public AjaxResult edit(@RequestBody KitchenStaffEnterExitRecord kitchenStaffEnterExitRecord) {
try {
return toAjax(kitchenStaffEnterExitRecordService.updateKitchenStaffEnterExitRecord(kitchenStaffEnterExitRecord));
} catch (Exception e) {
return error(e.getMessage());
}
}
/**
* 删除厨房员工进出门禁记录
*/
@ApiOperation(value = "删除厨房员工进出门禁记录")
//@PreventRepeatSubmit
//@RequiresPermissions("kitchen:record:remove")
@SysLog(title = "厨房员工进出门禁记录", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除厨房员工进出门禁记录")
@PostMapping("/del/{checkIds}")
public AjaxResult remove(@PathVariable Long[] checkIds) {
return toAjax(kitchenStaffEnterExitRecordService.deleteKitchenStaffEnterExitRecordByCheckIds(checkIds));
}
}

View File

@ -0,0 +1,119 @@
package com.bonus.canteen.core.kitchen.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.KitchenSubPlace;
import com.bonus.canteen.core.kitchen.service.IKitchenSubPlaceService;
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;
/**
* 厨房位置信息Controller
*
* @author xsheng
* @date 2025-06-23
*/
@Api(tags = "厨房位置信息接口")
@RestController
@RequestMapping("/kitchen_sub_place")
public class KitchenSubPlaceController extends BaseController {
@Autowired
private IKitchenSubPlaceService kitchenSubPlaceService;
/**
* 查询厨房位置信息列表
*/
@ApiOperation(value = "查询厨房位置信息列表")
//@RequiresPermissions("kitchen:place:list")
@GetMapping("/list")
public TableDataInfo list(KitchenSubPlace kitchenSubPlace) {
startPage();
List<KitchenSubPlace> list = kitchenSubPlaceService.selectKitchenSubPlaceList(kitchenSubPlace);
return getDataTable(list);
}
/**
* 导出厨房位置信息列表
*/
@ApiOperation(value = "导出厨房位置信息列表")
//@PreventRepeatSubmit
//@RequiresPermissions("kitchen:place:export")
@SysLog(title = "厨房位置信息", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出厨房位置信息")
@PostMapping("/export")
public void export(HttpServletResponse response, KitchenSubPlace kitchenSubPlace) {
List<KitchenSubPlace> list = kitchenSubPlaceService.selectKitchenSubPlaceList(kitchenSubPlace);
ExcelUtil<KitchenSubPlace> util = new ExcelUtil<KitchenSubPlace>(KitchenSubPlace.class);
util.exportExcel(response, list, "厨房位置信息数据");
}
/**
* 获取厨房位置信息详细信息
*/
@ApiOperation(value = "获取厨房位置信息详细信息")
//@RequiresPermissions("kitchen:place:query")
@GetMapping(value = "/{subPlaceId}")
public AjaxResult getInfo(@PathVariable("subPlaceId") Long subPlaceId) {
return success(kitchenSubPlaceService.selectKitchenSubPlaceBySubPlaceId(subPlaceId));
}
/**
* 新增厨房位置信息
*/
@ApiOperation(value = "新增厨房位置信息")
//@PreventRepeatSubmit
//@RequiresPermissions("kitchen:place:add")
@SysLog(title = "厨房位置信息", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增厨房位置信息")
@PostMapping
public AjaxResult add(@RequestBody KitchenSubPlace kitchenSubPlace) {
try {
return toAjax(kitchenSubPlaceService.insertKitchenSubPlace(kitchenSubPlace));
} catch (Exception e) {
return error(e.getMessage());
}
}
/**
* 修改厨房位置信息
*/
@ApiOperation(value = "修改厨房位置信息")
//@PreventRepeatSubmit
//@RequiresPermissions("kitchen:place:edit")
@SysLog(title = "厨房位置信息", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改厨房位置信息")
@PostMapping("/edit")
public AjaxResult edit(@RequestBody KitchenSubPlace kitchenSubPlace) {
try {
return toAjax(kitchenSubPlaceService.updateKitchenSubPlace(kitchenSubPlace));
} catch (Exception e) {
return error(e.getMessage());
}
}
/**
* 删除厨房位置信息
*/
@ApiOperation(value = "删除厨房位置信息")
//@PreventRepeatSubmit
//@RequiresPermissions("kitchen:place:remove")
@SysLog(title = "厨房位置信息", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除厨房位置信息")
@PostMapping("/del/{subPlaceIds}")
public AjaxResult remove(@PathVariable Long[] subPlaceIds) {
return toAjax(kitchenSubPlaceService.deleteKitchenSubPlaceBySubPlaceIds(subPlaceIds));
}
}

View File

@ -0,0 +1,60 @@
package com.bonus.canteen.core.kitchen.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity;
/**
* 厨房员工进出门禁记录对象 kitchen_staff_enter_exit_record
*
* @author xsheng
* @date 2025-06-23
*/
@Data
@ToString
public class KitchenStaffEnterExitRecord extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 晨检id */
private Long checkId;
/** 员工id */
@Excel(name = "员工id")
@ApiModelProperty(value = "员工id")
private Long staffId;
/** 门禁设备id */
@Excel(name = "门禁设备id")
@ApiModelProperty(value = "门禁设备id")
private Long deviceId;
/** 进入门禁时间 */
@ApiModelProperty(value = "进入门禁时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "进入门禁时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date enterTime;
/** 进入门禁图片 */
@Excel(name = "进入门禁图片")
@ApiModelProperty(value = "进入门禁图片")
private String enterImgUrl;
/** 出门时间 */
@ApiModelProperty(value = "出门时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出门时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date exitTime;
/** 出门图片 */
@Excel(name = "出门图片")
@ApiModelProperty(value = "出门图片")
private String exitImgUrl;
}

View File

@ -0,0 +1,46 @@
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 com.bonus.common.core.web.domain.BaseEntity;
/**
* 厨房位置信息对象 kitchen_sub_place
*
* @author xsheng
* @date 2025-06-23
*/
@Data
@ToString
public class KitchenSubPlace extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 从属位置id */
private Long subPlaceId;
/** 从属区域 */
@Excel(name = "从属区域")
@ApiModelProperty(value = "从属区域")
private String subPlaceName;
/** 图片 */
@Excel(name = "图片")
@ApiModelProperty(value = "图片")
private String imgUrl;
/** 关联食堂id */
@Excel(name = "关联食堂id")
@ApiModelProperty(value = "关联食堂id")
private Long canteenId;
/** 仓库id */
@Excel(name = "仓库id")
@ApiModelProperty(value = "仓库id")
private Long warehouseId;
}

View File

@ -0,0 +1,60 @@
package com.bonus.canteen.core.kitchen.mapper;
import java.util.List;
import com.bonus.canteen.core.kitchen.domain.KitchenStaffEnterExitRecord;
/**
* 厨房员工进出门禁记录Mapper接口
*
* @author xsheng
* @date 2025-06-23
*/
public interface KitchenStaffEnterExitRecordMapper {
/**
* 查询厨房员工进出门禁记录
*
* @param checkId 厨房员工进出门禁记录主键
* @return 厨房员工进出门禁记录
*/
public KitchenStaffEnterExitRecord selectKitchenStaffEnterExitRecordByCheckId(Long checkId);
/**
* 查询厨房员工进出门禁记录列表
*
* @param kitchenStaffEnterExitRecord 厨房员工进出门禁记录
* @return 厨房员工进出门禁记录集合
*/
public List<KitchenStaffEnterExitRecord> selectKitchenStaffEnterExitRecordList(KitchenStaffEnterExitRecord kitchenStaffEnterExitRecord);
/**
* 新增厨房员工进出门禁记录
*
* @param kitchenStaffEnterExitRecord 厨房员工进出门禁记录
* @return 结果
*/
public int insertKitchenStaffEnterExitRecord(KitchenStaffEnterExitRecord kitchenStaffEnterExitRecord);
/**
* 修改厨房员工进出门禁记录
*
* @param kitchenStaffEnterExitRecord 厨房员工进出门禁记录
* @return 结果
*/
public int updateKitchenStaffEnterExitRecord(KitchenStaffEnterExitRecord kitchenStaffEnterExitRecord);
/**
* 删除厨房员工进出门禁记录
*
* @param checkId 厨房员工进出门禁记录主键
* @return 结果
*/
public int deleteKitchenStaffEnterExitRecordByCheckId(Long checkId);
/**
* 批量删除厨房员工进出门禁记录
*
* @param checkIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteKitchenStaffEnterExitRecordByCheckIds(Long[] checkIds);
}

View File

@ -0,0 +1,60 @@
package com.bonus.canteen.core.kitchen.mapper;
import java.util.List;
import com.bonus.canteen.core.kitchen.domain.KitchenSubPlace;
/**
* 厨房位置信息Mapper接口
*
* @author xsheng
* @date 2025-06-23
*/
public interface KitchenSubPlaceMapper {
/**
* 查询厨房位置信息
*
* @param subPlaceId 厨房位置信息主键
* @return 厨房位置信息
*/
public KitchenSubPlace selectKitchenSubPlaceBySubPlaceId(Long subPlaceId);
/**
* 查询厨房位置信息列表
*
* @param kitchenSubPlace 厨房位置信息
* @return 厨房位置信息集合
*/
public List<KitchenSubPlace> selectKitchenSubPlaceList(KitchenSubPlace kitchenSubPlace);
/**
* 新增厨房位置信息
*
* @param kitchenSubPlace 厨房位置信息
* @return 结果
*/
public int insertKitchenSubPlace(KitchenSubPlace kitchenSubPlace);
/**
* 修改厨房位置信息
*
* @param kitchenSubPlace 厨房位置信息
* @return 结果
*/
public int updateKitchenSubPlace(KitchenSubPlace kitchenSubPlace);
/**
* 删除厨房位置信息
*
* @param subPlaceId 厨房位置信息主键
* @return 结果
*/
public int deleteKitchenSubPlaceBySubPlaceId(Long subPlaceId);
/**
* 批量删除厨房位置信息
*
* @param subPlaceIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteKitchenSubPlaceBySubPlaceIds(Long[] subPlaceIds);
}

View File

@ -0,0 +1,60 @@
package com.bonus.canteen.core.kitchen.service;
import java.util.List;
import com.bonus.canteen.core.kitchen.domain.KitchenStaffEnterExitRecord;
/**
* 厨房员工进出门禁记录Service接口
*
* @author xsheng
* @date 2025-06-23
*/
public interface IKitchenStaffEnterExitRecordService {
/**
* 查询厨房员工进出门禁记录
*
* @param checkId 厨房员工进出门禁记录主键
* @return 厨房员工进出门禁记录
*/
public KitchenStaffEnterExitRecord selectKitchenStaffEnterExitRecordByCheckId(Long checkId);
/**
* 查询厨房员工进出门禁记录列表
*
* @param kitchenStaffEnterExitRecord 厨房员工进出门禁记录
* @return 厨房员工进出门禁记录集合
*/
public List<KitchenStaffEnterExitRecord> selectKitchenStaffEnterExitRecordList(KitchenStaffEnterExitRecord kitchenStaffEnterExitRecord);
/**
* 新增厨房员工进出门禁记录
*
* @param kitchenStaffEnterExitRecord 厨房员工进出门禁记录
* @return 结果
*/
public int insertKitchenStaffEnterExitRecord(KitchenStaffEnterExitRecord kitchenStaffEnterExitRecord);
/**
* 修改厨房员工进出门禁记录
*
* @param kitchenStaffEnterExitRecord 厨房员工进出门禁记录
* @return 结果
*/
public int updateKitchenStaffEnterExitRecord(KitchenStaffEnterExitRecord kitchenStaffEnterExitRecord);
/**
* 批量删除厨房员工进出门禁记录
*
* @param checkIds 需要删除的厨房员工进出门禁记录主键集合
* @return 结果
*/
public int deleteKitchenStaffEnterExitRecordByCheckIds(Long[] checkIds);
/**
* 删除厨房员工进出门禁记录信息
*
* @param checkId 厨房员工进出门禁记录主键
* @return 结果
*/
public int deleteKitchenStaffEnterExitRecordByCheckId(Long checkId);
}

View File

@ -0,0 +1,60 @@
package com.bonus.canteen.core.kitchen.service;
import java.util.List;
import com.bonus.canteen.core.kitchen.domain.KitchenSubPlace;
/**
* 厨房位置信息Service接口
*
* @author xsheng
* @date 2025-06-23
*/
public interface IKitchenSubPlaceService {
/**
* 查询厨房位置信息
*
* @param subPlaceId 厨房位置信息主键
* @return 厨房位置信息
*/
public KitchenSubPlace selectKitchenSubPlaceBySubPlaceId(Long subPlaceId);
/**
* 查询厨房位置信息列表
*
* @param kitchenSubPlace 厨房位置信息
* @return 厨房位置信息集合
*/
public List<KitchenSubPlace> selectKitchenSubPlaceList(KitchenSubPlace kitchenSubPlace);
/**
* 新增厨房位置信息
*
* @param kitchenSubPlace 厨房位置信息
* @return 结果
*/
public int insertKitchenSubPlace(KitchenSubPlace kitchenSubPlace);
/**
* 修改厨房位置信息
*
* @param kitchenSubPlace 厨房位置信息
* @return 结果
*/
public int updateKitchenSubPlace(KitchenSubPlace kitchenSubPlace);
/**
* 批量删除厨房位置信息
*
* @param subPlaceIds 需要删除的厨房位置信息主键集合
* @return 结果
*/
public int deleteKitchenSubPlaceBySubPlaceIds(Long[] subPlaceIds);
/**
* 删除厨房位置信息信息
*
* @param subPlaceId 厨房位置信息主键
* @return 结果
*/
public int deleteKitchenSubPlaceBySubPlaceId(Long subPlaceId);
}

View File

@ -0,0 +1,98 @@
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.canteen.core.kitchen.mapper.KitchenStaffEnterExitRecordMapper;
import com.bonus.canteen.core.kitchen.domain.KitchenStaffEnterExitRecord;
import com.bonus.canteen.core.kitchen.service.IKitchenStaffEnterExitRecordService;
/**
* 厨房员工进出门禁记录Service业务层处理
*
* @author xsheng
* @date 2025-06-23
*/
@Service
public class KitchenStaffEnterExitRecordServiceImpl implements IKitchenStaffEnterExitRecordService {
@Autowired
private KitchenStaffEnterExitRecordMapper kitchenStaffEnterExitRecordMapper;
/**
* 查询厨房员工进出门禁记录
*
* @param checkId 厨房员工进出门禁记录主键
* @return 厨房员工进出门禁记录
*/
@Override
public KitchenStaffEnterExitRecord selectKitchenStaffEnterExitRecordByCheckId(Long checkId) {
return kitchenStaffEnterExitRecordMapper.selectKitchenStaffEnterExitRecordByCheckId(checkId);
}
/**
* 查询厨房员工进出门禁记录列表
*
* @param kitchenStaffEnterExitRecord 厨房员工进出门禁记录
* @return 厨房员工进出门禁记录
*/
@Override
public List<KitchenStaffEnterExitRecord> selectKitchenStaffEnterExitRecordList(KitchenStaffEnterExitRecord kitchenStaffEnterExitRecord) {
return kitchenStaffEnterExitRecordMapper.selectKitchenStaffEnterExitRecordList(kitchenStaffEnterExitRecord);
}
/**
* 新增厨房员工进出门禁记录
*
* @param kitchenStaffEnterExitRecord 厨房员工进出门禁记录
* @return 结果
*/
@Override
public int insertKitchenStaffEnterExitRecord(KitchenStaffEnterExitRecord kitchenStaffEnterExitRecord) {
kitchenStaffEnterExitRecord.setCreateTime(DateUtils.getNowDate());
try {
return kitchenStaffEnterExitRecordMapper.insertKitchenStaffEnterExitRecord(kitchenStaffEnterExitRecord);
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
}
/**
* 修改厨房员工进出门禁记录
*
* @param kitchenStaffEnterExitRecord 厨房员工进出门禁记录
* @return 结果
*/
@Override
public int updateKitchenStaffEnterExitRecord(KitchenStaffEnterExitRecord kitchenStaffEnterExitRecord) {
kitchenStaffEnterExitRecord.setUpdateTime(DateUtils.getNowDate());
try {
return kitchenStaffEnterExitRecordMapper.updateKitchenStaffEnterExitRecord(kitchenStaffEnterExitRecord);
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
}
/**
* 批量删除厨房员工进出门禁记录
*
* @param checkIds 需要删除的厨房员工进出门禁记录主键
* @return 结果
*/
@Override
public int deleteKitchenStaffEnterExitRecordByCheckIds(Long[] checkIds) {
return kitchenStaffEnterExitRecordMapper.deleteKitchenStaffEnterExitRecordByCheckIds(checkIds);
}
/**
* 删除厨房员工进出门禁记录信息
*
* @param checkId 厨房员工进出门禁记录主键
* @return 结果
*/
@Override
public int deleteKitchenStaffEnterExitRecordByCheckId(Long checkId) {
return kitchenStaffEnterExitRecordMapper.deleteKitchenStaffEnterExitRecordByCheckId(checkId);
}
}

View File

@ -0,0 +1,98 @@
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.canteen.core.kitchen.mapper.KitchenSubPlaceMapper;
import com.bonus.canteen.core.kitchen.domain.KitchenSubPlace;
import com.bonus.canteen.core.kitchen.service.IKitchenSubPlaceService;
/**
* 厨房位置信息Service业务层处理
*
* @author xsheng
* @date 2025-06-23
*/
@Service
public class KitchenSubPlaceServiceImpl implements IKitchenSubPlaceService {
@Autowired
private KitchenSubPlaceMapper kitchenSubPlaceMapper;
/**
* 查询厨房位置信息
*
* @param subPlaceId 厨房位置信息主键
* @return 厨房位置信息
*/
@Override
public KitchenSubPlace selectKitchenSubPlaceBySubPlaceId(Long subPlaceId) {
return kitchenSubPlaceMapper.selectKitchenSubPlaceBySubPlaceId(subPlaceId);
}
/**
* 查询厨房位置信息列表
*
* @param kitchenSubPlace 厨房位置信息
* @return 厨房位置信息
*/
@Override
public List<KitchenSubPlace> selectKitchenSubPlaceList(KitchenSubPlace kitchenSubPlace) {
return kitchenSubPlaceMapper.selectKitchenSubPlaceList(kitchenSubPlace);
}
/**
* 新增厨房位置信息
*
* @param kitchenSubPlace 厨房位置信息
* @return 结果
*/
@Override
public int insertKitchenSubPlace(KitchenSubPlace kitchenSubPlace) {
kitchenSubPlace.setCreateTime(DateUtils.getNowDate());
try {
return kitchenSubPlaceMapper.insertKitchenSubPlace(kitchenSubPlace);
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
}
/**
* 修改厨房位置信息
*
* @param kitchenSubPlace 厨房位置信息
* @return 结果
*/
@Override
public int updateKitchenSubPlace(KitchenSubPlace kitchenSubPlace) {
kitchenSubPlace.setUpdateTime(DateUtils.getNowDate());
try {
return kitchenSubPlaceMapper.updateKitchenSubPlace(kitchenSubPlace);
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
}
/**
* 批量删除厨房位置信息
*
* @param subPlaceIds 需要删除的厨房位置信息主键
* @return 结果
*/
@Override
public int deleteKitchenSubPlaceBySubPlaceIds(Long[] subPlaceIds) {
return kitchenSubPlaceMapper.deleteKitchenSubPlaceBySubPlaceIds(subPlaceIds);
}
/**
* 删除厨房位置信息信息
*
* @param subPlaceId 厨房位置信息主键
* @return 结果
*/
@Override
public int deleteKitchenSubPlaceBySubPlaceId(Long subPlaceId) {
return kitchenSubPlaceMapper.deleteKitchenSubPlaceBySubPlaceId(subPlaceId);
}
}

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.canteen.core.kitchen.mapper.KitchenStaffEnterExitRecordMapper">
<resultMap type="com.bonus.canteen.core.kitchen.domain.KitchenStaffEnterExitRecord" id="KitchenStaffEnterExitRecordResult">
<result property="checkId" column="check_Id" />
<result property="staffId" column="staff_id" />
<result property="deviceId" column="device_id" />
<result property="enterTime" column="enter_time" />
<result property="enterImgUrl" column="enter_img_url" />
<result property="exitTime" column="exit_time" />
<result property="exitImgUrl" column="exit_img_url" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectKitchenStaffEnterExitRecordVo">
select check_Id, staff_id, device_id, enter_time, enter_img_url, exit_time, exit_img_url, create_by, create_time, update_by, update_time from kitchen_staff_enter_exit_record
</sql>
<select id="selectKitchenStaffEnterExitRecordList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffEnterExitRecord" resultMap="KitchenStaffEnterExitRecordResult">
<include refid="selectKitchenStaffEnterExitRecordVo"/>
<where>
<if test="staffId != null "> and staff_id = #{staffId}</if>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="enterTime != null "> and enter_time = #{enterTime}</if>
<if test="enterImgUrl != null and enterImgUrl != ''"> and enter_img_url = #{enterImgUrl}</if>
<if test="exitTime != null "> and exit_time = #{exitTime}</if>
<if test="exitImgUrl != null and exitImgUrl != ''"> and exit_img_url = #{exitImgUrl}</if>
</where>
</select>
<select id="selectKitchenStaffEnterExitRecordByCheckId" parameterType="Long" resultMap="KitchenStaffEnterExitRecordResult">
<include refid="selectKitchenStaffEnterExitRecordVo"/>
where check_Id = #{checkId}
</select>
<insert id="insertKitchenStaffEnterExitRecord" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffEnterExitRecord" useGeneratedKeys="true" keyProperty="checkId">
insert into kitchen_staff_enter_exit_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="staffId != null">staff_id,</if>
<if test="deviceId != null">device_id,</if>
<if test="enterTime != null">enter_time,</if>
<if test="enterImgUrl != null">enter_img_url,</if>
<if test="exitTime != null">exit_time,</if>
<if test="exitImgUrl != null">exit_img_url,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="staffId != null">#{staffId},</if>
<if test="deviceId != null">#{deviceId},</if>
<if test="enterTime != null">#{enterTime},</if>
<if test="enterImgUrl != null">#{enterImgUrl},</if>
<if test="exitTime != null">#{exitTime},</if>
<if test="exitImgUrl != null">#{exitImgUrl},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateKitchenStaffEnterExitRecord" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffEnterExitRecord">
update kitchen_staff_enter_exit_record
<trim prefix="SET" suffixOverrides=",">
<if test="staffId != null">staff_id = #{staffId},</if>
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="enterTime != null">enter_time = #{enterTime},</if>
<if test="enterImgUrl != null">enter_img_url = #{enterImgUrl},</if>
<if test="exitTime != null">exit_time = #{exitTime},</if>
<if test="exitImgUrl != null">exit_img_url = #{exitImgUrl},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where check_Id = #{checkId}
</update>
<delete id="deleteKitchenStaffEnterExitRecordByCheckId" parameterType="Long">
delete from kitchen_staff_enter_exit_record where check_Id = #{checkId}
</delete>
<delete id="deleteKitchenStaffEnterExitRecordByCheckIds" parameterType="String">
delete from kitchen_staff_enter_exit_record where check_Id in
<foreach item="checkId" collection="array" open="(" separator="," close=")">
#{checkId}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,86 @@
<?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.KitchenSubPlaceMapper">
<resultMap type="com.bonus.canteen.core.kitchen.domain.KitchenSubPlace" id="KitchenSubPlaceResult">
<result property="subPlaceId" column="sub_place_id" />
<result property="subPlaceName" column="sub_place_name" />
<result property="imgUrl" column="img_url" />
<result property="canteenId" column="canteen_id" />
<result property="warehouseId" column="warehouse_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectKitchenSubPlaceVo">
select sub_place_id, sub_place_name, img_url, canteen_id, warehouse_id, create_by, create_time, update_by, update_time from kitchen_sub_place
</sql>
<select id="selectKitchenSubPlaceList" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenSubPlace" resultMap="KitchenSubPlaceResult">
<include refid="selectKitchenSubPlaceVo"/>
<where>
<if test="subPlaceName != null and subPlaceName != ''"> and sub_place_name like concat('%', #{subPlaceName}, '%')</if>
<if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if>
<if test="canteenId != null "> and canteen_id = #{canteenId}</if>
<if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
</where>
</select>
<select id="selectKitchenSubPlaceBySubPlaceId" parameterType="Long" resultMap="KitchenSubPlaceResult">
<include refid="selectKitchenSubPlaceVo"/>
where sub_place_id = #{subPlaceId}
</select>
<insert id="insertKitchenSubPlace" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenSubPlace" useGeneratedKeys="true" keyProperty="subPlaceId">
insert into kitchen_sub_place
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="subPlaceName != null and subPlaceName != ''">sub_place_name,</if>
<if test="imgUrl != null">img_url,</if>
<if test="canteenId != null">canteen_id,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="subPlaceName != null and subPlaceName != ''">#{subPlaceName},</if>
<if test="imgUrl != null">#{imgUrl},</if>
<if test="canteenId != null">#{canteenId},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateKitchenSubPlace" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenSubPlace">
update kitchen_sub_place
<trim prefix="SET" suffixOverrides=",">
<if test="subPlaceName != null and subPlaceName != ''">sub_place_name = #{subPlaceName},</if>
<if test="imgUrl != null">img_url = #{imgUrl},</if>
<if test="canteenId != null">canteen_id = #{canteenId},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where sub_place_id = #{subPlaceId}
</update>
<delete id="deleteKitchenSubPlaceBySubPlaceId" parameterType="Long">
delete from kitchen_sub_place where sub_place_id = #{subPlaceId}
</delete>
<delete id="deleteKitchenSubPlaceBySubPlaceIds" parameterType="String">
delete from kitchen_sub_place where sub_place_id in
<foreach item="subPlaceId" collection="array" open="(" separator="," close=")">
#{subPlaceId}
</foreach>
</delete>
</mapper>