diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenStaffEnterExitRecordController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenStaffEnterExitRecordController.java new file mode 100644 index 0000000..b9cb639 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenStaffEnterExitRecordController.java @@ -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 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 list = kitchenStaffEnterExitRecordService.selectKitchenStaffEnterExitRecordList(kitchenStaffEnterExitRecord); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenSubPlaceController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenSubPlaceController.java new file mode 100644 index 0000000..46de61d --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/controller/KitchenSubPlaceController.java @@ -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 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 list = kitchenSubPlaceService.selectKitchenSubPlaceList(kitchenSubPlace); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/domain/KitchenStaffEnterExitRecord.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/domain/KitchenStaffEnterExitRecord.java new file mode 100644 index 0000000..c251271 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/domain/KitchenStaffEnterExitRecord.java @@ -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; + + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/domain/KitchenSubPlace.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/domain/KitchenSubPlace.java new file mode 100644 index 0000000..7158eed --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/domain/KitchenSubPlace.java @@ -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; + + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/mapper/KitchenStaffEnterExitRecordMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/mapper/KitchenStaffEnterExitRecordMapper.java new file mode 100644 index 0000000..6b3e4b6 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/mapper/KitchenStaffEnterExitRecordMapper.java @@ -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 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); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/mapper/KitchenSubPlaceMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/mapper/KitchenSubPlaceMapper.java new file mode 100644 index 0000000..99ffd83 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/mapper/KitchenSubPlaceMapper.java @@ -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 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); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/IKitchenStaffEnterExitRecordService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/IKitchenStaffEnterExitRecordService.java new file mode 100644 index 0000000..4a389fe --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/IKitchenStaffEnterExitRecordService.java @@ -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 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); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/IKitchenSubPlaceService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/IKitchenSubPlaceService.java new file mode 100644 index 0000000..7679740 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/IKitchenSubPlaceService.java @@ -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 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); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenStaffEnterExitRecordServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenStaffEnterExitRecordServiceImpl.java new file mode 100644 index 0000000..c7e12b4 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenStaffEnterExitRecordServiceImpl.java @@ -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 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); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenSubPlaceServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenSubPlaceServiceImpl.java new file mode 100644 index 0000000..cd75dec --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/kitchen/service/impl/KitchenSubPlaceServiceImpl.java @@ -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 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); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenStaffEnterExitRecordMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenStaffEnterExitRecordMapper.xml new file mode 100644 index 0000000..aef175c --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenStaffEnterExitRecordMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into kitchen_staff_enter_exit_record + + staff_id, + device_id, + enter_time, + enter_img_url, + exit_time, + exit_img_url, + create_by, + create_time, + update_by, + update_time, + + + #{staffId}, + #{deviceId}, + #{enterTime}, + #{enterImgUrl}, + #{exitTime}, + #{exitImgUrl}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update kitchen_staff_enter_exit_record + + staff_id = #{staffId}, + device_id = #{deviceId}, + enter_time = #{enterTime}, + enter_img_url = #{enterImgUrl}, + exit_time = #{exitTime}, + exit_img_url = #{exitImgUrl}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where check_Id = #{checkId} + + + + delete from kitchen_staff_enter_exit_record where check_Id = #{checkId} + + + + delete from kitchen_staff_enter_exit_record where check_Id in + + #{checkId} + + + \ No newline at end of file diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenSubPlaceMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenSubPlaceMapper.xml new file mode 100644 index 0000000..60c3fc4 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenSubPlaceMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into kitchen_sub_place + + sub_place_name, + img_url, + canteen_id, + warehouse_id, + create_by, + create_time, + update_by, + update_time, + + + #{subPlaceName}, + #{imgUrl}, + #{canteenId}, + #{warehouseId}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update kitchen_sub_place + + sub_place_name = #{subPlaceName}, + img_url = #{imgUrl}, + canteen_id = #{canteenId}, + warehouse_id = #{warehouseId}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where sub_place_id = #{subPlaceId} + + + + delete from kitchen_sub_place where sub_place_id = #{subPlaceId} + + + + delete from kitchen_sub_place where sub_place_id in + + #{subPlaceId} + + + \ No newline at end of file