New file |
| | |
| | | package com.ruoyi.cwgl.controller; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.utils.file.DownloadExportUtil; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.cwgl.domain.SmartLockerApplication; |
| | | import com.ruoyi.cwgl.service.ISmartLockerApplicationService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * 智能柜物品申领管理Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-09-09 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/cwgl/smartLockerApplication") |
| | | public class SmartLockerApplicationController extends BaseController |
| | | { |
| | | @Autowired |
| | | private ISmartLockerApplicationService smartLockerApplicationService; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询智能柜物品申领管理列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:smartLockerApplication:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SmartLockerApplication smartLockerApplication) |
| | | { |
| | | startPage(); |
| | | List<SmartLockerApplication> list = smartLockerApplicationService.selectSmartLockerApplicationList(smartLockerApplication); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出智能柜物品申领管理列表 |
| | | * @param smartLockerApplication 查询条件对象 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:smartLockerApplication:export')") |
| | | @Log(title = "智能柜物品申领管理", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult export(SmartLockerApplication smartLockerApplication,String exportKey) |
| | | { |
| | | smartLockerApplicationService.export(smartLockerApplication,exportKey); |
| | | return AjaxResult.success("导出请求成功,请稍后点击下载...!"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取智能柜物品申领管理详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:smartLockerApplication:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Integer id) |
| | | { |
| | | return AjaxResult.success(smartLockerApplicationService.selectSmartLockerApplicationById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增智能柜物品申领管理 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:smartLockerApplication:add')") |
| | | @Log(title = "智能柜物品申领管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody SmartLockerApplication smartLockerApplication) |
| | | { |
| | | return toAjax(smartLockerApplicationService.insertSmartLockerApplication(smartLockerApplication)); |
| | | } |
| | | |
| | | /** |
| | | * 修改智能柜物品申领管理 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:smartLockerApplication:edit')") |
| | | @Log(title = "智能柜物品申领管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody SmartLockerApplication smartLockerApplication) |
| | | { |
| | | return toAjax(smartLockerApplicationService.updateSmartLockerApplication(smartLockerApplication)); |
| | | } |
| | | |
| | | /** |
| | | * 删除智能柜物品申领管理 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:smartLockerApplication:remove')") |
| | | @Log(title = "智能柜物品申领管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Integer[] ids) |
| | | { |
| | | return toAjax(smartLockerApplicationService.deleteSmartLockerApplicationByIds(ids)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.cwgl.domain; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | /** |
| | | * 智能柜物品申领管理对象 smart_locker_application |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-09-09 |
| | | */ |
| | | @Data |
| | | public class SmartLockerApplication{ |
| | | |
| | | |
| | | /** ID */ |
| | | @TableField("id") |
| | | private Integer id; |
| | | |
| | | |
| | | /** 指令类型(0:开门指令;1:流转指令) */ |
| | | @Excel(name = "指令类型(0:开门指令;1:流转指令)") |
| | | |
| | | @TableField("command_type") |
| | | private Integer commandType; |
| | | |
| | | |
| | | /** 申领人编码 */ |
| | | @Excel(name = "申领人编码") |
| | | |
| | | @TableField("applicant_code") |
| | | private String applicantCode; |
| | | |
| | | |
| | | /** 申领人姓名 */ |
| | | @Excel(name = "申领人姓名") |
| | | |
| | | @TableField("applicant_name") |
| | | private String applicantName; |
| | | |
| | | |
| | | /** 领取物品类型(0:车钥匙;1:文件;2:印章;3:其他) */ |
| | | @Excel(name = "领取物品类型(0:车钥匙;1:文件;2:印章;3:其他)") |
| | | |
| | | @TableField("item_type") |
| | | private Integer itemType; |
| | | |
| | | |
| | | /** 物品名称(当领取物品类型是车钥匙的时候,填写车牌) */ |
| | | @Excel(name = "物品名称", readConverterExp = "当=领取物品类型是车钥匙的时候,填写车牌") |
| | | |
| | | @TableField("item_name") |
| | | private String itemName; |
| | | |
| | | |
| | | /** 智能柜编号默认接驳站智能钥匙柜 */ |
| | | @Excel(name = "智能柜编号默认接驳站智能钥匙柜") |
| | | |
| | | @TableField("locker_no") |
| | | private String lockerNo; |
| | | |
| | | |
| | | /** 智能柜格口号 */ |
| | | @Excel(name = "智能柜格口号") |
| | | |
| | | @TableField("locker_port") |
| | | private Integer lockerPort; |
| | | |
| | | |
| | | /** 状态(0:正常;1:作废;2:领取) */ |
| | | @Excel(name = "状态(0:正常;1:作废;2:领取)") |
| | | |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | |
| | | /** 作废时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "作废时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("cancel_time") |
| | | private Date cancelTime; |
| | | |
| | | |
| | | /** 领取时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "领取时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | |
| | | @TableField("receive_time") |
| | | private Date receiveTime; |
| | | |
| | | |
| | | /** 创建时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | |
| | | /** 更新时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("update_time") |
| | | private Date updateTime; |
| | | |
| | | |
| | | /** 备注 */ |
| | | @Excel(name = "备注") |
| | | |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | |
| | | /** 创建人 */ |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | |
| | | /** 更新人 */ |
| | | @TableField("update_by") |
| | | private String updateBy; |
| | | |
| | | |
| | | /** 删除标记(0:正常;1:删除) */ |
| | | @Excel(name = "删除标记(0:正常;1:删除)") |
| | | |
| | | @TableField("deleted") |
| | | private Integer deleted; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.cwgl.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.cwgl.domain.SmartLockerApplication; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | |
| | | /** |
| | | * 智能柜物品申领管理Mapper接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-09-09 |
| | | */ |
| | | public interface SmartLockerApplicationMapper extends BaseMapper<SmartLockerApplication> |
| | | { |
| | | /** |
| | | * 查询智能柜物品申领管理 |
| | | * |
| | | * @param id 智能柜物品申领管理ID |
| | | * @return 智能柜物品申领管理 |
| | | */ |
| | | public SmartLockerApplication selectSmartLockerApplicationById(Integer id); |
| | | |
| | | /** |
| | | * 查询智能柜物品申领管理 记录数 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @return 智能柜物品申领管理集合 |
| | | */ |
| | | public int selectSmartLockerApplicationCount(SmartLockerApplication smartLockerApplication); |
| | | |
| | | /** |
| | | * 查询智能柜物品申领管理列表 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @return 智能柜物品申领管理集合 |
| | | */ |
| | | public List<SmartLockerApplication> selectSmartLockerApplicationList(SmartLockerApplication smartLockerApplication); |
| | | |
| | | /** |
| | | * 新增智能柜物品申领管理 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @return 结果 |
| | | */ |
| | | public int insertSmartLockerApplication(SmartLockerApplication smartLockerApplication); |
| | | |
| | | /** |
| | | * 新增智能柜物品申领管理[批量] |
| | | * |
| | | * @param smartLockerApplications 智能柜物品申领管理 |
| | | * @return 结果 |
| | | */ |
| | | public int insertSmartLockerApplicationBatch(List<SmartLockerApplication> smartLockerApplications); |
| | | |
| | | /** |
| | | * 修改智能柜物品申领管理 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @return 结果 |
| | | */ |
| | | public int updateSmartLockerApplication(SmartLockerApplication smartLockerApplication); |
| | | |
| | | /** |
| | | * 修改智能柜物品申领管理[批量] |
| | | * |
| | | * @param smartLockerApplications 智能柜物品申领管理 |
| | | * @return 结果 |
| | | */ |
| | | public int updateSmartLockerApplicationBatch(List<SmartLockerApplication> smartLockerApplications); |
| | | |
| | | /** |
| | | * 删除智能柜物品申领管理 |
| | | * |
| | | * @param id 智能柜物品申领管理ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteSmartLockerApplicationById(Integer id); |
| | | |
| | | /** |
| | | * 批量删除智能柜物品申领管理 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteSmartLockerApplicationByIds(Integer[] ids); |
| | | } |
New file |
| | |
| | | package com.ruoyi.cwgl.service; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.cwgl.domain.SmartLockerApplication; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | /** |
| | | * 智能柜物品申领管理Service接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-09-09 |
| | | */ |
| | | public interface ISmartLockerApplicationService extends IService<SmartLockerApplication> |
| | | { |
| | | /** |
| | | * 查询智能柜物品申领管理 |
| | | * |
| | | * @param id 智能柜物品申领管理ID |
| | | * @return 智能柜物品申领管理 |
| | | */ |
| | | public SmartLockerApplication selectSmartLockerApplicationById(Integer id); |
| | | |
| | | /** |
| | | * 查询智能柜物品申领管理 记录数 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @return 智能柜物品申领管理集合 |
| | | */ |
| | | public int selectSmartLockerApplicationCount(SmartLockerApplication smartLockerApplication); |
| | | |
| | | /** |
| | | * 查询智能柜物品申领管理列表 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @return 智能柜物品申领管理集合 |
| | | */ |
| | | public List<SmartLockerApplication> selectSmartLockerApplicationList(SmartLockerApplication smartLockerApplication); |
| | | |
| | | /** |
| | | * 查询智能柜物品申领管理列表 异步 导出 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @param exportKey 导出功能的唯一标识 |
| | | * @return 智能柜物品申领管理集合 |
| | | */ |
| | | public void export(SmartLockerApplication smartLockerApplication, String exportKey) ; |
| | | |
| | | |
| | | /** |
| | | * 新增智能柜物品申领管理 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @return 结果 |
| | | */ |
| | | public int insertSmartLockerApplication(SmartLockerApplication smartLockerApplication); |
| | | |
| | | /** |
| | | * 新增智能柜物品申领管理[批量] |
| | | * |
| | | * @param smartLockerApplications 智能柜物品申领管理 |
| | | * @return 结果 |
| | | */ |
| | | public int insertSmartLockerApplicationBatch(List<SmartLockerApplication> smartLockerApplications); |
| | | |
| | | /** |
| | | * 修改智能柜物品申领管理 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @return 结果 |
| | | */ |
| | | public int updateSmartLockerApplication(SmartLockerApplication smartLockerApplication); |
| | | |
| | | /** |
| | | * 修改智能柜物品申领管理[批量] |
| | | * |
| | | * @param smartLockerApplications 智能柜物品申领管理 |
| | | * @return 结果 |
| | | */ |
| | | public int updateSmartLockerApplicationBatch(List<SmartLockerApplication> smartLockerApplications); |
| | | /** |
| | | * 批量删除智能柜物品申领管理 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteSmartLockerApplicationByIds(String ids); |
| | | |
| | | /** |
| | | * 批量删除智能柜物品申领管理 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteSmartLockerApplicationByIds(Integer[] ids); |
| | | |
| | | /** |
| | | * 删除智能柜物品申领管理信息 |
| | | * |
| | | * @param id 智能柜物品申领管理ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteSmartLockerApplicationById(Integer id); |
| | | } |
New file |
| | |
| | | package com.ruoyi.cwgl.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.annotation.DataSource; |
| | | import com.ruoyi.common.enums.DataSourceType; |
| | | import com.ruoyi.common.core.service.BaseService; |
| | | |
| | | import com.ruoyi.cwgl.mapper.SmartLockerApplicationMapper; |
| | | import com.ruoyi.cwgl.domain.SmartLockerApplication; |
| | | import com.ruoyi.cwgl.service.ISmartLockerApplicationService; |
| | | import com.ruoyi.common.core.text.Convert; |
| | | |
| | | /** |
| | | * 智能柜物品申领管理Service业务层处理 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-09-09 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class SmartLockerApplicationServiceImpl extends BaseService<SmartLockerApplicationMapper, SmartLockerApplication> implements ISmartLockerApplicationService |
| | | { |
| | | protected final Logger logger = LoggerFactory.getLogger(getClass()); |
| | | @Resource |
| | | private SmartLockerApplicationMapper smartLockerApplicationMapper; |
| | | |
| | | |
| | | /** |
| | | * 查询智能柜物品申领管理 |
| | | * |
| | | * @param id 智能柜物品申领管理ID |
| | | * @return 智能柜物品申领管理 |
| | | */ |
| | | @DataSource(DataSourceType.SLAVE) |
| | | @Override |
| | | public SmartLockerApplication selectSmartLockerApplicationById(Integer id) |
| | | { |
| | | return smartLockerApplicationMapper.selectSmartLockerApplicationById(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询智能柜物品申领管理 记录数 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @return 智能柜物品申领管理集合 |
| | | */ |
| | | @DataSource(DataSourceType.SLAVE) |
| | | @Override |
| | | public int selectSmartLockerApplicationCount(SmartLockerApplication smartLockerApplication) |
| | | { |
| | | return smartLockerApplicationMapper.selectSmartLockerApplicationCount(smartLockerApplication); |
| | | } |
| | | |
| | | /** |
| | | * 查询智能柜物品申领管理列表 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @return 智能柜物品申领管理 |
| | | */ |
| | | @DataSource(DataSourceType.SLAVE) |
| | | @Override |
| | | public List<SmartLockerApplication> selectSmartLockerApplicationList(SmartLockerApplication smartLockerApplication) |
| | | { |
| | | return smartLockerApplicationMapper.selectSmartLockerApplicationList(smartLockerApplication); |
| | | } |
| | | |
| | | /** |
| | | * 查询智能柜物品申领管理列表 异步 导出 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @param exportKey 导出功能的唯一标识 |
| | | * @return 智能柜物品申领管理集合 |
| | | */ |
| | | @DataSource(DataSourceType.SLAVE) |
| | | @Async |
| | | @Override |
| | | public void export(SmartLockerApplication smartLockerApplication,String exportKey) { |
| | | |
| | | super.export(SmartLockerApplication.class,exportKey,"smartLockerApplicationData",(pageNum)->{ |
| | | PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE); |
| | | return selectSmartLockerApplicationList(smartLockerApplication); |
| | | }); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增智能柜物品申领管理 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertSmartLockerApplication(SmartLockerApplication smartLockerApplication) |
| | | { |
| | | smartLockerApplication.setCreateTime(DateUtils.getNowDate()); |
| | | return smartLockerApplicationMapper.insertSmartLockerApplication(smartLockerApplication); |
| | | } |
| | | |
| | | /** |
| | | * 新增智能柜物品申领管理[批量] |
| | | * |
| | | * @param smartLockerApplications 智能柜物品申领管理 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertSmartLockerApplicationBatch(List<SmartLockerApplication> smartLockerApplications) |
| | | { |
| | | int rows = smartLockerApplicationMapper.insertSmartLockerApplicationBatch(smartLockerApplications); |
| | | return rows; |
| | | } |
| | | |
| | | /** |
| | | * 修改智能柜物品申领管理 |
| | | * |
| | | * @param smartLockerApplication 智能柜物品申领管理 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateSmartLockerApplication(SmartLockerApplication smartLockerApplication) |
| | | { |
| | | smartLockerApplication.setUpdateTime(DateUtils.getNowDate()); |
| | | return smartLockerApplicationMapper.updateSmartLockerApplication(smartLockerApplication); |
| | | } |
| | | |
| | | /** |
| | | * 修改智能柜物品申领管理[批量] |
| | | * |
| | | * @param smartLockerApplications 智能柜物品申领管理 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateSmartLockerApplicationBatch(List<SmartLockerApplication> smartLockerApplications){ |
| | | return smartLockerApplicationMapper.updateSmartLockerApplicationBatch(smartLockerApplications); |
| | | } |
| | | |
| | | /** |
| | | * 删除智能柜物品申领管理对象 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteSmartLockerApplicationByIds(String ids) |
| | | { |
| | | return deleteSmartLockerApplicationByIds(Convert.toIntArray(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 删除智能柜物品申领管理对象 |
| | | * |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteSmartLockerApplicationByIds(Integer[] ids) |
| | | { |
| | | return smartLockerApplicationMapper.deleteSmartLockerApplicationByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * 删除智能柜物品申领管理信息 |
| | | * |
| | | * @param id 智能柜物品申领管理ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteSmartLockerApplicationById(Integer id) |
| | | { |
| | | return smartLockerApplicationMapper.deleteSmartLockerApplicationById(id); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.cwgl.mapper.SmartLockerApplicationMapper"> |
| | | |
| | | <resultMap type="com.ruoyi.cwgl.domain.SmartLockerApplication" id="SmartLockerApplicationResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="commandType" column="command_type" /> |
| | | <result property="applicantCode" column="applicant_code" /> |
| | | <result property="applicantName" column="applicant_name" /> |
| | | <result property="itemType" column="item_type" /> |
| | | <result property="itemName" column="item_name" /> |
| | | <result property="lockerNo" column="locker_no" /> |
| | | <result property="lockerPort" column="locker_port" /> |
| | | <result property="status" column="status" /> |
| | | <result property="cancelTime" column="cancel_time" /> |
| | | <result property="receiveTime" column="receive_time" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="deleted" column="deleted" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSmartLockerApplicationVo"> |
| | | select thisTab.id, thisTab.command_type, thisTab.applicant_code, thisTab.applicant_name, thisTab.item_type, thisTab.item_name, thisTab.locker_no, thisTab.locker_port, thisTab.status, thisTab.cancel_time, thisTab.receive_time, thisTab.create_time, thisTab.update_time, thisTab.remark, thisTab.create_by, thisTab.update_by, thisTab.deleted from smart_locker_application AS thisTab |
| | | </sql> |
| | | <sql id="selectSmartLockerApplicationVoCount"> |
| | | select count(0) from smart_locker_application as thisTab |
| | | </sql> |
| | | |
| | | <sql id="whereCondition"> |
| | | <if test="commandType != null "> and thisTab.command_type = #{commandType}</if> |
| | | <if test="applicantCode != null and applicantCode != ''"> and thisTab.applicant_code = #{applicantCode}</if> |
| | | <if test="applicantName != null and applicantName != ''"> and thisTab.applicant_name like concat('%', #{applicantName}, '%')</if> |
| | | <if test="itemType != null "> and thisTab.item_type = #{itemType}</if> |
| | | <if test="itemName != null and itemName != ''"> and thisTab.item_name like concat('%', #{itemName}, '%')</if> |
| | | <if test="lockerNo != null and lockerNo != ''"> and thisTab.locker_no = #{lockerNo}</if> |
| | | <if test="lockerPort != null "> and thisTab.locker_port = #{lockerPort}</if> |
| | | <if test="status != null "> and thisTab.status = #{status}</if> |
| | | <if test="cancelTime != null "> and thisTab.cancel_time = #{cancelTime}</if> |
| | | <if test="receiveTime != null "> and thisTab.receive_time = #{receiveTime}</if> |
| | | <if test="deleted != null "> and thisTab.deleted = #{deleted}</if> |
| | | </sql> |
| | | |
| | | <!--查询--> |
| | | <select id="selectSmartLockerApplicationById" parameterType="Integer" resultMap="SmartLockerApplicationResult"> |
| | | <include refid="selectSmartLockerApplicationVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectSmartLockerApplicationCount" parameterType="com.ruoyi.cwgl.domain.SmartLockerApplication" resultType="int"> |
| | | <include refid="selectSmartLockerApplicationVoCount"/> |
| | | <where> |
| | | <include refid="whereCondition"/> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSmartLockerApplicationList" parameterType="com.ruoyi.cwgl.domain.SmartLockerApplication" resultMap="SmartLockerApplicationResult"> |
| | | <include refid="selectSmartLockerApplicationVo"/> |
| | | <where> |
| | | <include refid="whereCondition"/> |
| | | </where> |
| | | order by thisTab.id desc |
| | | </select> |
| | | |
| | | <!-- 新增 --> |
| | | <insert id="insertSmartLockerApplication" parameterType="com.ruoyi.cwgl.domain.SmartLockerApplication" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into smart_locker_application |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="commandType != null">command_type,</if> |
| | | <if test="applicantCode != null and applicantCode != ''">applicant_code,</if> |
| | | <if test="applicantName != null and applicantName != ''">applicant_name,</if> |
| | | <if test="itemType != null">item_type,</if> |
| | | <if test="itemName != null and itemName != ''">item_name,</if> |
| | | <if test="lockerNo != null">locker_no,</if> |
| | | <if test="lockerPort != null">locker_port,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="cancelTime != null">cancel_time,</if> |
| | | <if test="receiveTime != null">receive_time,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="remark != null">remark,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="deleted != null">deleted,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="commandType != null">#{commandType},</if> |
| | | <if test="applicantCode != null and applicantCode != ''">#{applicantCode},</if> |
| | | <if test="applicantName != null and applicantName != ''">#{applicantName},</if> |
| | | <if test="itemType != null">#{itemType},</if> |
| | | <if test="itemName != null and itemName != ''">#{itemName},</if> |
| | | <if test="lockerNo != null">#{lockerNo},</if> |
| | | <if test="lockerPort != null">#{lockerPort},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="cancelTime != null">#{cancelTime},</if> |
| | | <if test="receiveTime != null">#{receiveTime},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="deleted != null">#{deleted},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <insert id="insertSmartLockerApplicationBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into smart_locker_application |
| | | <trim prefix="(" suffix=") values" suffixOverrides=","> |
| | | id,command_type,applicant_code,applicant_name,item_type,item_name,locker_no,locker_port,status,cancel_time,receive_time,create_time,update_time,remark,create_by,update_by,deleted, |
| | | </trim> |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | <trim prefix="(" suffix=") " suffixOverrides=","> |
| | | #{item.id},#{item.commandType},#{item.applicantCode},#{item.applicantName},#{item.itemType},#{item.itemName},#{item.lockerNo},#{item.lockerPort},#{item.status},#{item.cancelTime},#{item.receiveTime},#{item.createTime},#{item.updateTime},#{item.remark},#{item.createBy},#{item.updateBy},#{item.deleted}, |
| | | </trim> |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <!-- 修改 --> |
| | | <update id="updateSmartLockerApplication" parameterType="com.ruoyi.cwgl.domain.SmartLockerApplication"> |
| | | update smart_locker_application |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="commandType != null">command_type = #{commandType},</if> |
| | | <if test="applicantCode != null and applicantCode != ''">applicant_code = #{applicantCode},</if> |
| | | <if test="applicantName != null and applicantName != ''">applicant_name = #{applicantName},</if> |
| | | <if test="itemType != null">item_type = #{itemType},</if> |
| | | <if test="itemName != null and itemName != ''">item_name = #{itemName},</if> |
| | | <if test="lockerNo != null">locker_no = #{lockerNo},</if> |
| | | <if test="lockerPort != null">locker_port = #{lockerPort},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="cancelTime != null">cancel_time = #{cancelTime},</if> |
| | | <if test="receiveTime != null">receive_time = #{receiveTime},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="deleted != null">deleted = #{deleted},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | <!-- 修改 --> |
| | | <update id="updateSmartLockerApplicationBatch" parameterType="java.util.List"> |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | | update smart_locker_application |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="item.commandType != null">command_type = #{item.commandType},</if> |
| | | <if test="item.applicantCode != null and item.applicantCode != ''">applicant_code = #{item.applicantCode},</if> |
| | | <if test="item.applicantName != null and item.applicantName != ''">applicant_name = #{item.applicantName},</if> |
| | | <if test="item.itemType != null">item_type = #{item.itemType},</if> |
| | | <if test="item.itemName != null and item.itemName != ''">item_name = #{item.itemName},</if> |
| | | <if test="item.lockerNo != null">locker_no = #{item.lockerNo},</if> |
| | | <if test="item.lockerPort != null">locker_port = #{item.lockerPort},</if> |
| | | <if test="item.status != null">status = #{item.status},</if> |
| | | <if test="item.cancelTime != null">cancel_time = #{item.cancelTime},</if> |
| | | <if test="item.receiveTime != null">receive_time = #{item.receiveTime},</if> |
| | | <if test="item.createTime != null">create_time = #{item.createTime},</if> |
| | | <if test="item.updateTime != null">update_time = #{item.updateTime},</if> |
| | | <if test="item.remark != null">remark = #{item.remark},</if> |
| | | <if test="item.createBy != null">create_by = #{item.createBy},</if> |
| | | <if test="item.updateBy != null">update_by = #{item.updateBy},</if> |
| | | <if test="item.deleted != null">deleted = #{item.deleted},</if> |
| | | </trim> |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | <!--删除--> |
| | | <delete id="deleteSmartLockerApplicationById" parameterType="Integer"> |
| | | delete from smart_locker_application where id = #{id} |
| | | </delete> |
| | | <delete id="deleteSmartLockerApplicationByIds" parameterType="Integer"> |
| | | delete from smart_locker_application where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | import request,{download,requestType} from "@/utils/request"; |
| | | import {BaseEntityInterface} from "@/utils/globalInterface"; |
| | | export interface SmartLockerApplicationI extends BaseEntityInterface{ |
| | | id ?: number , commandType ?: number , applicantCode ?: string , applicantName ?: string , itemType ?: number , itemName ?: string , lockerNo ?: string , lockerPort ?: number , status ?: number , cancelTime ?: string , receiveTime ?: string , createTime ?: string , updateTime ?: string , remark ?: string , createBy ?: string , updateBy ?: string , deleted ?: number } |
| | | |
| | | |
| | | /** |
| | | * 查询智能柜物品申领管理列表 |
| | | */ |
| | | export const listSmartLockerApplication:requestType = (query) => { |
| | | return request({ |
| | | url: '/cwgl/smartLockerApplication/list', |
| | | method:'get', |
| | | params:query |
| | | }) |
| | | } |
| | | /** |
| | | * 查询智能柜物品申领管理详细 |
| | | */ |
| | | export const getSmartLockerApplication:requestType = (id) => { |
| | | return request({ |
| | | url: '/cwgl/smartLockerApplication/' + id, |
| | | method:'get' |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 新增智能柜物品申领管理 |
| | | */ |
| | | export const addSmartLockerApplication:requestType = (data) => { |
| | | return request({ |
| | | url: '/cwgl/smartLockerApplication', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 修改智能柜物品申领管理 |
| | | */ |
| | | export const updateSmartLockerApplication:requestType = (data) => { |
| | | return request({ |
| | | url: '/cwgl/smartLockerApplication', |
| | | method: 'put', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 删除智能柜物品申领管理 |
| | | */ |
| | | export const delSmartLockerApplication:requestType = (id) => { |
| | | return request({ |
| | | url: '/cwgl/smartLockerApplication/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出智能柜物品申领管理 |
| | | */ |
| | | export const exportSmartLockerApplication:requestType = (query) => { |
| | | return new Promise<any>(()=>{ |
| | | download('/cwgl/smartLockerApplication/export',query); |
| | | }) |
| | | } |
New file |
| | |
| | | <template> |
| | | <basicContainer > |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="pageF.loading" |
| | | :data="tableData" |
| | | :page="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crudRef" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @refresh-change="refreshChange" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template #menu-left> |
| | | <el-button |
| | | type="success" |
| | | icon="Edit" |
| | | :disabled="pageF.single" |
| | | v-hasPermi="['cwgl:smartLockerApplication:edit']" |
| | | @click="handleUpdate">修改 |
| | | </el-button> |
| | | <el-button |
| | | type="danger" |
| | | icon="Delete" |
| | | :disabled="pageF.multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['cwgl:smartLockerApplication:remove']" |
| | | >删除 |
| | | </el-button> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['cwgl:smartLockerApplication:export']" |
| | | >导出 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basicContainer> |
| | | </template> |
| | | |
| | | <script setup name="smartLockerApplication" lang="ts"> |
| | | import {SmartLockerApplicationI,addSmartLockerApplication, delSmartLockerApplication, exportSmartLockerApplication, getSmartLockerApplication, listSmartLockerApplication, updateSmartLockerApplication} from "@/api/cwgl/smartLockerApplication"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import {computed,reactive, ref, toRefs} from "vue"; |
| | | import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface"; |
| | | import {usePagePlus} from "@/hooks/usePagePlus"; |
| | | import {hasPermission} from "@/utils/permissionUtils"; |
| | | |
| | | const { proxy } = useCurrentInstance(); |
| | | const crudRef = ref(); |
| | | |
| | | const permissionList = computed(()=>{ |
| | | return { |
| | | addBtn: hasPermission(["cwgl:smartLockerApplication:add"]), |
| | | delBtn: hasPermission(["cwgl:smartLockerApplication:remove"]), |
| | | editBtn: hasPermission(["cwgl:smartLockerApplication:edit"]), |
| | | viewBtn: hasPermission(["cwgl:smartLockerApplication:query"]), |
| | | } |
| | | }) |
| | | |
| | | const data = reactive({ |
| | | form:<SmartLockerApplicationI>{}, |
| | | queryParams:<SmartLockerApplicationI&PageQueryInterface>{}, |
| | | page: <PagesInterface>{ |
| | | pageSize: 10, |
| | | total: 0, |
| | | currentPage: 1, |
| | | }, |
| | | selectionList:[], |
| | | }) |
| | | const {queryParams,form,page,selectionList} = toRefs(data); |
| | | const option = ref({ |
| | | pageKey: 'SmartLockerApplication', |
| | | rowKey: 'id', |
| | | column: { |
| | | id: { |
| | | label: 'ID', |
| | | }, |
| | | commandType: { |
| | | label: '指令类型(0:开门指令;1:流转指令)', |
| | | }, |
| | | applicantCode: { |
| | | label: '申领人编码', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "申领人编码不能为空", trigger: "blur" } |
| | | ], }, |
| | | applicantName: { |
| | | label: '申领人姓名', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "申领人姓名不能为空", trigger: "blur" } |
| | | ], }, |
| | | itemType: { |
| | | label: '领取物品类型(0:车钥匙;1:文件;2:印章;3:其他)', |
| | | }, |
| | | itemName: { |
| | | label: '物品名称', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "物品名称不能为空", trigger: "blur" } |
| | | ], }, |
| | | lockerNo: { |
| | | label: '智能柜编号默认接驳站智能钥匙柜', |
| | | }, |
| | | lockerPort: { |
| | | label: '智能柜格口号', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "智能柜格口号不能为空", trigger: "blur" } |
| | | ], }, |
| | | status: { |
| | | label: '状态(0:正常;1:作废;2:领取)', |
| | | }, |
| | | cancelTime: { |
| | | label: '作废时间', |
| | | }, |
| | | receiveTime: { |
| | | label: '领取时间', |
| | | }, |
| | | createTime: { |
| | | label: '创建时间', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "创建时间不能为空", trigger: "blur" } |
| | | ], }, |
| | | updateTime: { |
| | | label: '更新时间', |
| | | }, |
| | | remark: { |
| | | label: '备注', |
| | | type: 'textarea', minRows: 3, maxRows: 5, |
| | | }, |
| | | createBy: { |
| | | label: '创建人', |
| | | }, |
| | | updateBy: { |
| | | label: '更新人', |
| | | }, |
| | | deleted: { |
| | | label: '删除标记(0:正常;1:删除)', |
| | | }, |
| | | } |
| | | }) |
| | | |
| | | const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange, |
| | | searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({ |
| | | form:form, |
| | | option:option, |
| | | queryParams:queryParams, |
| | | idKey:'id', |
| | | page:page.value, |
| | | getListApi:listSmartLockerApplication, |
| | | getDetailApi:getSmartLockerApplication, |
| | | exportApi:exportSmartLockerApplication, |
| | | deleteApi:delSmartLockerApplication, |
| | | addApi:addSmartLockerApplication, |
| | | updateApi:updateSmartLockerApplication, |
| | | handleUpdateFunc:()=>{ |
| | | crudRef.value.rowEdit(selectionList.value[0]); |
| | | }, |
| | | handleSelectionChangeFunc:(selection:any)=>{ |
| | | selectionList.value = selection; |
| | | } |
| | | }) |
| | | |
| | | |
| | | </script> |