Преглед на файлове

新增设备领用模块

lingpeng.li преди 3 седмици
родител
ревизия
b575a1368e
променени са 15 файла, в които са добавени 1138 реда и са изтрити 2 реда
  1. 326 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/controller/DeviceLoanController.java
  2. 29 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/dto/DeviceLoanItemQuery.java
  3. 127 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/entity/DeviceLoan.java
  4. 138 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/entity/IssuedDevice.java
  5. 22 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/mapper/DeviceLoanMapper.java
  6. 32 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/mapper/IssuedDeviceMapper.java
  7. 75 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/mapper/xml/DeviceLoanMapper.xml
  8. 16 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/mapper/xml/IssuedDeviceMapper.xml
  9. 69 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/service/IDeviceLoanService.java
  10. 23 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/service/IIssuedDeviceService.java
  11. 92 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/service/impl/DeviceLoanServiceImpl.java
  12. 27 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/service/impl/IssuedDeviceServiceImpl.java
  13. 32 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/vo/DeviceLoanItemVO.java
  14. 128 0
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/vo/DeviceLoanPage.java
  15. 2 2
      zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceScrap/controller/DeviceScrapController.java

+ 326 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/controller/DeviceLoanController.java

@@ -0,0 +1,326 @@
+package org.jeecg.modules.equipmentDisposal.deviceLoan.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.CommonAPI;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.RedisUtil;
+import org.jeecg.common.util.TokenUtils;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.dto.DeviceLoanItemQuery;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.entity.DeviceLoan;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.entity.IssuedDevice;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.service.IDeviceLoanService;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.service.IIssuedDeviceService;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.vo.DeviceLoanItemVO;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.vo.DeviceLoanPage;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @Description: 设备领用
+ * @Author: jeecg-boot
+ * @Date: 2025-05-12
+ * @Version: V1.0
+ */
+@Api(tags = "设备领用")
+@RestController
+@RequestMapping("/equipmentDisposal/deviceLoan")
+@Slf4j
+public class DeviceLoanController {
+
+    @Lazy
+    @Resource
+    private CommonAPI commonApi;
+
+    @Lazy
+    @Resource
+    private RedisUtil redisUtil;
+
+    @Autowired
+    private IDeviceLoanService deviceLoanService;
+    @Autowired
+    private IIssuedDeviceService issuedDeviceService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param deviceLoan
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "设备领用-分页列表查询")
+    @ApiOperation(value = "设备领用-分页列表查询", notes = "设备领用-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<DeviceLoan>> queryPageList(DeviceLoan deviceLoan,
+                                                   @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                   HttpServletRequest req) {
+        QueryWrapper<DeviceLoan> queryWrapper = QueryGenerator.initQueryWrapper(deviceLoan, req.getParameterMap());
+        Page<DeviceLoan> page = new Page<DeviceLoan>(pageNo, pageSize);
+        IPage<DeviceLoan> pageList = deviceLoanService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param deviceLoanPage
+     * @return
+     */
+    @AutoLog(value = "设备领用-添加")
+    @ApiOperation(value = "设备领用-添加", notes = "设备领用-添加")
+    @RequiresPermissions("equipmentDisposal:device_loan:add")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody DeviceLoanPage deviceLoanPage) {
+        DeviceLoan deviceLoan = new DeviceLoan();
+        BeanUtils.copyProperties(deviceLoanPage, deviceLoan);
+        deviceLoanService.saveMain(deviceLoan, deviceLoanPage.getIssuedDeviceList());
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param deviceLoanPage
+     * @return
+     */
+    @AutoLog(value = "设备领用-编辑")
+    @ApiOperation(value = "设备领用-编辑", notes = "设备领用-编辑")
+    @RequiresPermissions("equipmentDisposal:device_loan:edit")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody DeviceLoanPage deviceLoanPage) {
+        DeviceLoan deviceLoan = new DeviceLoan();
+        BeanUtils.copyProperties(deviceLoanPage, deviceLoan);
+        DeviceLoan deviceLoanEntity = deviceLoanService.getById(deviceLoan.getId());
+        if (deviceLoanEntity == null) {
+            return Result.error("未找到对应数据");
+        }
+        deviceLoanService.updateMain(deviceLoan, deviceLoanPage.getIssuedDeviceList());
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "设备领用-通过id删除")
+    @ApiOperation(value = "设备领用-通过id删除", notes = "设备领用-通过id删除")
+    @RequiresPermissions("equipmentDisposal:device_loan:delete")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        deviceLoanService.delMain(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "设备领用-批量删除")
+    @ApiOperation(value = "设备领用-批量删除", notes = "设备领用-批量删除")
+    @RequiresPermissions("equipmentDisposal:device_loan:deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.deviceLoanService.delBatchMain(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "设备领用-通过id查询", notes = "设备领用-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<DeviceLoan> queryById(@RequestParam(name = "id", required = true) String id) {
+        DeviceLoan deviceLoan = deviceLoanService.getById(id);
+        if (deviceLoan == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(deviceLoan);
+
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "领用设备通过主表ID查询")
+    @ApiOperation(value = "领用设备主表ID查询", notes = "领用设备-通主表ID查询")
+    @GetMapping(value = "/queryIssuedDeviceByMainId")
+    public Result<List<IssuedDevice>> queryIssuedDeviceListByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<IssuedDevice> issuedDeviceList = issuedDeviceService.selectByMainId(id);
+        return Result.OK(issuedDeviceList);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param deviceLoan
+     */
+    @RequiresPermissions("equipmentDisposal:device_loan:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, DeviceLoan deviceLoan) {
+        // Step.1 组装查询条件查询数据
+        QueryWrapper<DeviceLoan> queryWrapper = QueryGenerator.initQueryWrapper(deviceLoan, request.getParameterMap());
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+        //配置选中数据查询条件
+        String selections = request.getParameter("selections");
+        if (oConvertUtils.isNotEmpty(selections)) {
+            List<String> selectionList = Arrays.asList(selections.split(","));
+            queryWrapper.in("id", selectionList);
+        }
+        // Step.2 获取导出数据
+        List<DeviceLoan> deviceLoanList = deviceLoanService.list(queryWrapper);
+
+        // Step.3 组装pageList
+        List<DeviceLoanPage> pageList = new ArrayList<DeviceLoanPage>();
+        for (DeviceLoan main : deviceLoanList) {
+            DeviceLoanPage vo = new DeviceLoanPage();
+            BeanUtils.copyProperties(main, vo);
+            List<IssuedDevice> issuedDeviceList = issuedDeviceService.selectByMainId(main.getId());
+            vo.setIssuedDeviceList(issuedDeviceList);
+            pageList.add(vo);
+        }
+
+        // Step.4 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        mv.addObject(NormalExcelConstants.FILE_NAME, "设备领用列表");
+        mv.addObject(NormalExcelConstants.CLASS, DeviceLoanPage.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("设备领用数据", "导出人:" + sysUser.getRealname(), "设备领用"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequiresPermissions("equipmentDisposal:device_loan:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            // 获取上传文件对象
+            MultipartFile file = entity.getValue();
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<DeviceLoanPage> list = ExcelImportUtil.importExcel(file.getInputStream(), DeviceLoanPage.class, params);
+                for (DeviceLoanPage page : list) {
+                    DeviceLoan po = new DeviceLoan();
+                    BeanUtils.copyProperties(page, po);
+                    deviceLoanService.saveMain(po, page.getIssuedDeviceList());
+                }
+                return Result.OK("文件导入成功!数据行数:" + list.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.OK("文件导入失败!");
+    }
+
+    /**
+     * 分页列表查询(与我相关)
+     *
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @ApiOperation(value = "设备领用-分页列表查询(与我相关)", notes = "设备领用-分页列表查询(与我相关)")
+    @GetMapping(value = "/listByUser")
+    public Result<IPage<DeviceLoan>> queryPageListByUser(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                         @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                         HttpServletRequest req) {
+
+        LoginUser loginUser = TokenUtils.getLoginUser(req, commonApi, redisUtil);
+        // 构建查询条件  
+        LambdaQueryWrapper<DeviceLoan> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(DeviceLoan::getLoaner, loginUser.getId());
+        QueryGenerator.initQueryWrapper(queryWrapper, req.getParameterMap());
+        Page<DeviceLoan> page = new Page<DeviceLoan>(pageNo, pageSize);
+        IPage<DeviceLoan> pageList = deviceLoanService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    @ApiOperation(value = "设备领用记录-设备领用信息与领用设备信息组合查询", notes = "设备领用记录-设备领用信息与领用设备信息组合查询")
+    @GetMapping("/listLoanItems")
+    public Result<IPage<DeviceLoanItemVO>> listLoanItems(
+            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+            DeviceLoanItemQuery query) {
+
+        // 禁用自动 searchCount
+        Page<DeviceLoanItemVO> page = new Page<>(pageNo, pageSize, false); // false 表示不自动 count
+
+        // 查询当前页数据
+        IPage<DeviceLoanItemVO> pagedLoanItems = deviceLoanService.getPagedLoanItems(page, query);
+
+        // 手动查询总数
+        long total = deviceLoanService.getLoanItemsCount(query);
+
+        // 设置数据与总数
+        page.setRecords(pagedLoanItems.getRecords());
+        page.setTotal(total);
+
+        return Result.OK(page);
+    }
+
+
+}

+ 29 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/dto/DeviceLoanItemQuery.java

@@ -0,0 +1,29 @@
+package org.jeecg.modules.equipmentDisposal.deviceLoan.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class DeviceLoanItemQuery {
+
+    @ApiModelProperty(value = "领用单号")
+    private String loanNumber;
+
+    @ApiModelProperty(value = "设备编号")
+    private String deviceCode;
+
+    @ApiModelProperty(value = "设备名称")
+    private String deviceName;
+
+    @ApiModelProperty(value = "领用人")
+    private String loaner;
+
+    @ApiModelProperty(value = "经办人")
+    private String handler;
+
+    @ApiModelProperty(value = "领用时间")
+    private String loanTime;
+
+    @ApiModelProperty(value = "是否归还(0:已归还 1:未归还 2:过期未归还)")
+    private Integer isReturned;
+}

+ 127 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/entity/DeviceLoan.java

@@ -0,0 +1,127 @@
+package org.jeecg.modules.equipmentDisposal.deviceLoan.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 设备领用
+ * @Author: jeecg-boot
+ * @Date: 2025-05-12
+ * @Version: V1.0
+ */
+@ApiModel(value = "device_loan对象", description = "设备领用")
+@Data
+@TableName("device_loan")
+public class DeviceLoan implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "id")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 日期
+     */
+    @Excel(name = "日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "日期")
+    private Date createDate;
+    /**
+     * 领用单号
+     */
+    @Excel(name = "领用单号", width = 15)
+    @ApiModelProperty(value = "领用单号")
+    private String loanNumber;
+    /**
+     * 涉及设备编号
+     */
+    @Excel(name = "涉及设备编号", width = 15)
+    @ApiModelProperty(value = "涉及设备编号")
+    private String deviceNumber;
+    /**
+     * 涉及设备名称
+     */
+    @Excel(name = "涉及设备名称", width = 15)
+    @ApiModelProperty(value = "涉及设备名称")
+    private String deviceName;
+    /**
+     * 领用部门
+     */
+    @Excel(name = "领用部门", width = 15)
+    @ApiModelProperty(value = "领用部门")
+    private String loanDepartment;
+    /**
+     * 领用人
+     */
+    @Excel(name = "领用人", width = 15)
+    @ApiModelProperty(value = "领用人")
+    private String loaner;
+    /**
+     * 经办人
+     */
+    @Excel(name = "经办人", width = 15)
+    @ApiModelProperty(value = "经办人")
+    private String handler;
+    /**
+     * 领用时间
+     */
+    @Excel(name = "领用时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "领用时间")
+    private Date loanTime;
+    /**
+     * 归还/领用比例,如0/1、1/1等
+     */
+    @Excel(name = "归还/领用比例,如0/1、1/1等", width = 15)
+    @ApiModelProperty(value = "归还/领用比例,如0/1、1/1等")
+    private String returnLoanRatio;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+}

+ 138 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/entity/IssuedDevice.java

@@ -0,0 +1,138 @@
+package org.jeecg.modules.equipmentDisposal.deviceLoan.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 领用设备
+ * @Author: jeecg-boot
+ * @Date: 2025-05-12
+ * @Version: V1.0
+ */
+@ApiModel(value = "sbsmzq_issued_device对象", description = "领用设备")
+@Data
+@TableName("sbsmzq_issued_device")
+public class IssuedDevice implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新日期
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 设备编号
+     */
+    @Excel(name = "设备编号", width = 15)
+    @ApiModelProperty(value = "设备编号")
+    private String deviceCode;
+    /**
+     * 设备名称
+     */
+    @Excel(name = "设备名称", width = 15)
+    @ApiModelProperty(value = "设备名称")
+    private String deviceName;
+    /**
+     * 类别
+     */
+    @Excel(name = "类别", width = 15)
+    @ApiModelProperty(value = "类别")
+    private String deviceType;
+    /**
+     * 功能位置
+     */
+    @Excel(name = "功能位置", width = 15)
+    @ApiModelProperty(value = "功能位置")
+    private String functionLocation;
+    /**
+     * 品牌
+     */
+    @Excel(name = "品牌", width = 15)
+    @ApiModelProperty(value = "品牌")
+    private String brand;
+    /**
+     * 规格型号
+     */
+    @Excel(name = "规格型号", width = 15)
+    @ApiModelProperty(value = "规格型号")
+    private String spec;
+    /**
+     * 设备状态
+     */
+    @Excel(name = "设备状态", width = 15)
+    @ApiModelProperty(value = "设备状态")
+    private Integer deviceStatus;
+    /**
+     * 预计归还时间
+     */
+    @Excel(name = "预计归还时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "预计归还时间")
+    private Date estimatedReturnTime;
+    /**
+     * 实际归还时间
+     */
+    @Excel(name = "实际归还时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "实际归还时间")
+    private Date actualReturnTime;
+    /**
+     * 是否归还(0:已归还 1:未归还 2:过期未归还)
+     */
+    @Excel(name = "是否归还(0:已归还、1:暂未归还)", width = 15)
+    @ApiModelProperty(value = "是否归还(0:已归还 1:未归还 2:过期未归还)")
+    private Integer isReturned;
+    /**
+     * 设备领用id
+     */
+    @ApiModelProperty(value = "设备领用id")
+    private String loanId;
+    /**
+     * 设备id
+     */
+    @Excel(name = "设备id", width = 15)
+    @ApiModelProperty(value = "设备id")
+    private String deviceId;
+}

+ 22 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/mapper/DeviceLoanMapper.java

@@ -0,0 +1,22 @@
+package org.jeecg.modules.equipmentDisposal.deviceLoan.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.dto.DeviceLoanItemQuery;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.entity.DeviceLoan;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.vo.DeviceLoanItemVO;
+
+/**
+ * @Description: 设备领用
+ * @Author: jeecg-boot
+ * @Date: 2025-05-12
+ * @Version: V1.0
+ */
+public interface DeviceLoanMapper extends BaseMapper<DeviceLoan> {
+
+    IPage<DeviceLoanItemVO> queryLoanItemsPage(Page<DeviceLoanItemVO> page, @Param("query") DeviceLoanItemQuery query);
+
+    Long countLoanItems(@Param("query") DeviceLoanItemQuery query);
+}

+ 32 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/mapper/IssuedDeviceMapper.java

@@ -0,0 +1,32 @@
+package org.jeecg.modules.equipmentDisposal.deviceLoan.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.entity.IssuedDevice;
+
+import java.util.List;
+
+/**
+ * @Description: 领用设备
+ * @Author: jeecg-boot
+ * @Date: 2025-05-12
+ * @Version: V1.0
+ */
+public interface IssuedDeviceMapper extends BaseMapper<IssuedDevice> {
+
+    /**
+     * 通过主表id删除子表数据
+     *
+     * @param mainId 主表id
+     * @return boolean
+     */
+    boolean deleteByMainId(@Param("mainId") String mainId);
+
+    /**
+     * 通过主表id查询子表数据
+     *
+     * @param mainId 主表id
+     * @return List<IssuedDevice>
+     */
+    List<IssuedDevice> selectByMainId(@Param("mainId") String mainId);
+}

+ 75 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/mapper/xml/DeviceLoanMapper.xml

@@ -0,0 +1,75 @@
+<?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="org.jeecg.modules.equipmentDisposal.deviceLoan.mapper.DeviceLoanMapper">
+
+    <select id="queryLoanItemsPage" resultType="org.jeecg.modules.equipmentDisposal.deviceLoan.vo.DeviceLoanItemVO">
+        SELECT
+        ds.id AS loanId,
+        ds.loan_number,
+        ds.loaner,
+        ds.handler AS issuingHandler,
+        ds.handler AS returnHandler,
+        ds.loan_time,
+        ds.remarks,
+        ti.id AS itemId,
+        ti.device_code,
+        ti.device_name,
+        ti.estimated_return_time,
+        ti.actual_return_time
+        FROM device_loan ds
+        LEFT JOIN sbsmzq_issued_device ti
+        ON ds.id COLLATE utf8mb4_general_ci = ti.loan_id COLLATE utf8mb4_general_ci
+        <where>
+            <if test="query.loanNumber != null and query.loanNumber != ''">
+                AND ds.loan_number = #{query.loanNumber}
+            </if>
+            <if test="query.loaner != null and query.loaner != ''">
+                AND ds.loaner = #{query.loaner}
+            </if>
+            <if test="query.handler != null and query.handler != ''">
+                AND ds.handler = #{query.handler}
+            </if>
+            <if test="query.deviceCode != null and query.deviceCode != ''">
+                AND ti.device_code = #{query.deviceCode}
+            </if>
+            <if test="query.deviceName != null and query.deviceName != ''">
+                AND ti.device_name = #{query.deviceName}
+            </if>
+            <if test="query.loanTime != null and query.loanTime != ''">
+                AND ds.loan_time &gt;= CONCAT(#{query.loanTime}, ' 00:00:00')
+                AND ds.loan_time &lt; CONCAT(DATE_ADD(#{query.loanTime}, INTERVAL 1 DAY), ' 00:00:00')
+            </if>
+        </where>
+        ORDER BY ds.loan_time DESC
+    </select>
+
+    <select id="countLoanItems" resultType="java.lang.Long">
+        SELECT COUNT(1)
+        FROM device_loan ds
+        LEFT JOIN sbsmzq_issued_device ti
+        ON ds.id COLLATE utf8mb4_general_ci = ti.loan_id COLLATE utf8mb4_general_ci
+        <where>
+            <if test="query.loanNumber != null and query.loanNumber != ''">
+                AND ds.loan_number = #{query.loanNumber}
+            </if>
+            <if test="query.loaner != null and query.loaner != ''">
+                AND ds.loaner = #{query.loaner}
+            </if>
+            <if test="query.handler != null and query.handler != ''">
+                AND ds.handler = #{query.handler}
+            </if>
+            <if test="query.deviceCode != null and query.deviceCode != ''">
+                AND ti.device_code = #{query.deviceCode}
+            </if>
+            <if test="query.deviceName != null and query.deviceName != ''">
+                AND ti.device_name = #{query.deviceName}
+            </if>
+            <if test="query.loanTime != null and query.loanTime != ''">
+                AND ds.loan_time &gt;= CONCAT(#{query.loanTime}, ' 00:00:00')
+                AND ds.loan_time &lt; CONCAT(DATE_ADD(#{query.loanTime}, INTERVAL 1 DAY), ' 00:00:00')
+            </if>
+        </where>
+        ORDER BY ds.loan_time DESC
+    </select>
+
+</mapper>

+ 16 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/mapper/xml/IssuedDeviceMapper.xml

@@ -0,0 +1,16 @@
+<?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="org.jeecg.modules.equipmentDisposal.deviceLoan.mapper.IssuedDeviceMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sbsmzq_issued_device 
+		WHERE
+			 loan_id = #{mainId} 	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.equipmentDisposal.deviceLoan.entity.IssuedDevice">
+		SELECT * 
+		FROM  sbsmzq_issued_device
+		WHERE
+			 loan_id = #{mainId} 	</select>
+</mapper>

+ 69 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/service/IDeviceLoanService.java

@@ -0,0 +1,69 @@
+package org.jeecg.modules.equipmentDisposal.deviceLoan.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.dto.DeviceLoanItemQuery;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.entity.DeviceLoan;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.entity.IssuedDevice;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.vo.DeviceLoanItemVO;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Description: 设备领用
+ * @Author: jeecg-boot
+ * @Date: 2025-05-12
+ * @Version: V1.0
+ */
+public interface IDeviceLoanService extends IService<DeviceLoan> {
+
+    /**
+     * 添加一对多
+     *
+     * @param deviceLoan
+     * @param issuedDeviceList
+     */
+    public void saveMain(DeviceLoan deviceLoan, List<IssuedDevice> issuedDeviceList);
+
+    /**
+     * 修改一对多
+     *
+     * @param deviceLoan
+     * @param issuedDeviceList
+     */
+    public void updateMain(DeviceLoan deviceLoan, List<IssuedDevice> issuedDeviceList);
+
+    /**
+     * 删除一对多
+     *
+     * @param id
+     */
+    public void delMain(String id);
+
+    /**
+     * 批量删除一对多
+     *
+     * @param idList
+     */
+    public void delBatchMain(Collection<? extends Serializable> idList);
+
+    /**
+     * 领用记录的联合分页查询
+     *
+     * @param page
+     * @param query
+     * @return
+     */
+    IPage<DeviceLoanItemVO> getPagedLoanItems(Page<DeviceLoanItemVO> page, DeviceLoanItemQuery query);
+
+    /**
+     * 领用记录总数据条数
+     *
+     * @param query
+     * @return
+     */
+    long getLoanItemsCount(DeviceLoanItemQuery query);
+}

+ 23 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/service/IIssuedDeviceService.java

@@ -0,0 +1,23 @@
+package org.jeecg.modules.equipmentDisposal.deviceLoan.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.entity.IssuedDevice;
+
+import java.util.List;
+
+/**
+ * @Description: 领用设备
+ * @Author: jeecg-boot
+ * @Date: 2025-05-12
+ * @Version: V1.0
+ */
+public interface IIssuedDeviceService extends IService<IssuedDevice> {
+
+    /**
+     * 通过主表id查询子表数据
+     *
+     * @param mainId 主表id
+     * @return List<IssuedDevice>
+     */
+    List<IssuedDevice> selectByMainId(String mainId);
+}

+ 92 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/service/impl/DeviceLoanServiceImpl.java

@@ -0,0 +1,92 @@
+package org.jeecg.modules.equipmentDisposal.deviceLoan.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.dto.DeviceLoanItemQuery;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.entity.DeviceLoan;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.entity.IssuedDevice;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.mapper.DeviceLoanMapper;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.mapper.IssuedDeviceMapper;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.service.IDeviceLoanService;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.vo.DeviceLoanItemVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Description: 设备领用
+ * @Author: jeecg-boot
+ * @Date: 2025-05-12
+ * @Version: V1.0
+ */
+@Service
+public class DeviceLoanServiceImpl extends ServiceImpl<DeviceLoanMapper, DeviceLoan> implements IDeviceLoanService {
+
+    @Autowired
+    private DeviceLoanMapper deviceLoanMapper;
+    @Autowired
+    private IssuedDeviceMapper issuedDeviceMapper;
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void saveMain(DeviceLoan deviceLoan, List<IssuedDevice> issuedDeviceList) {
+        deviceLoanMapper.insert(deviceLoan);
+        if (issuedDeviceList != null && issuedDeviceList.size() > 0) {
+            for (IssuedDevice entity : issuedDeviceList) {
+                //外键设置
+                entity.setLoanId(deviceLoan.getId());
+                issuedDeviceMapper.insert(entity);
+            }
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void updateMain(DeviceLoan deviceLoan, List<IssuedDevice> issuedDeviceList) {
+        deviceLoanMapper.updateById(deviceLoan);
+
+        //1.先删除子表数据
+        issuedDeviceMapper.deleteByMainId(deviceLoan.getId());
+
+        //2.子表数据重新插入
+        if (issuedDeviceList != null && issuedDeviceList.size() > 0) {
+            for (IssuedDevice entity : issuedDeviceList) {
+                //外键设置
+                entity.setLoanId(deviceLoan.getId());
+                issuedDeviceMapper.insert(entity);
+            }
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delMain(String id) {
+        issuedDeviceMapper.deleteByMainId(id);
+        deviceLoanMapper.deleteById(id);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void delBatchMain(Collection<? extends Serializable> idList) {
+        for (Serializable id : idList) {
+            issuedDeviceMapper.deleteByMainId(id.toString());
+            deviceLoanMapper.deleteById(id);
+        }
+    }
+
+    @Override
+    public IPage<DeviceLoanItemVO> getPagedLoanItems(Page<DeviceLoanItemVO> page, DeviceLoanItemQuery query) {
+        return deviceLoanMapper.queryLoanItemsPage(page, query);
+    }
+
+    @Override
+    public long getLoanItemsCount(DeviceLoanItemQuery query) {
+        return deviceLoanMapper.countLoanItems(query);
+    }
+
+}

+ 27 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/service/impl/IssuedDeviceServiceImpl.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.equipmentDisposal.deviceLoan.service.impl;
+
+import org.jeecg.modules.equipmentDisposal.deviceLoan.entity.IssuedDevice;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.mapper.IssuedDeviceMapper;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.service.IIssuedDeviceService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 领用设备
+ * @Author: jeecg-boot
+ * @Date:   2025-05-12
+ * @Version: V1.0
+ */
+@Service
+public class IssuedDeviceServiceImpl extends ServiceImpl<IssuedDeviceMapper, IssuedDevice> implements IIssuedDeviceService {
+	
+	@Autowired
+	private IssuedDeviceMapper issuedDeviceMapper;
+	
+	@Override
+	public List<IssuedDevice> selectByMainId(String mainId) {
+		return issuedDeviceMapper.selectByMainId(mainId);
+	}
+}

+ 32 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/vo/DeviceLoanItemVO.java

@@ -0,0 +1,32 @@
+package org.jeecg.modules.equipmentDisposal.deviceLoan.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+public class DeviceLoanItemVO {
+
+    // DeviceLoan 字段
+    private String loanId;  //设备领用id
+    private String loanNumber; //领用单号
+    private String loaner; //领用人
+    private String issuingHandler; //领用经手人
+    private String returnHandler; //归还经手人
+    private Date loanTime;  //领用时间
+    private String approvalStatus; //审批状态
+    private String remarks;   //备注
+
+    // IssuedDevice 字段
+    private String itemId;   //领用设备id
+    private String deviceCode;  //设备编号
+    private String deviceName;  //设备名称
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date estimatedReturnTime; //预计归还日期
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date actualReturnTime; //实际归还日期
+}

+ 128 - 0
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceLoan/vo/DeviceLoanPage.java

@@ -0,0 +1,128 @@
+package org.jeecg.modules.equipmentDisposal.deviceLoan.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecg.modules.equipmentDisposal.deviceLoan.entity.IssuedDevice;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecgframework.poi.excel.annotation.ExcelCollection;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description: 设备领用
+ * @Author: jeecg-boot
+ * @Date: 2025-05-12
+ * @Version: V1.0
+ */
+@Data
+@ApiModel(value = "device_loanPage对象", description = "设备领用")
+public class DeviceLoanPage {
+
+    /**
+     * id
+     */
+    @ApiModelProperty(value = "id")
+    private String id;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新时间
+     */
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+    /**
+     * 所属部门
+     */
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**
+     * 日期
+     */
+    @Excel(name = "日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "日期")
+    private Date createDate;
+    /**
+     * 领用单号
+     */
+    @Excel(name = "领用单号", width = 15)
+    @ApiModelProperty(value = "领用单号")
+    private String loanNumber;
+    /**
+     * 涉及设备编号
+     */
+    @Excel(name = "涉及设备编号", width = 15)
+    @ApiModelProperty(value = "涉及设备编号")
+    private String deviceNumber;
+    /**
+     * 涉及设备名称
+     */
+    @Excel(name = "涉及设备名称", width = 15)
+    @ApiModelProperty(value = "涉及设备名称")
+    private String deviceName;
+    /**
+     * 领用部门
+     */
+    @Excel(name = "领用部门", width = 15)
+    @ApiModelProperty(value = "领用部门")
+    private String loanDepartment;
+    /**
+     * 领用人
+     */
+    @Excel(name = "领用人", width = 15)
+    @ApiModelProperty(value = "领用人")
+    private String loaner;
+    /**
+     * 经办人
+     */
+    @Excel(name = "经办人", width = 15)
+    @ApiModelProperty(value = "经办人")
+    private String handler;
+    /**
+     * 领用时间
+     */
+    @Excel(name = "领用时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "领用时间")
+    private Date loanTime;
+    /**
+     * 归还/领用比例,如0/1、1/1等
+     */
+    @Excel(name = "归还/领用比例,如0/1、1/1等", width = 15)
+    @ApiModelProperty(value = "归还/领用比例,如0/1、1/1等")
+    private String returnLoanRatio;
+    /**
+     * 备注
+     */
+    @Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+    @ExcelCollection(name = "领用设备")
+    @ApiModelProperty(value = "领用设备")
+    private List<IssuedDevice> issuedDeviceList;
+
+}

+ 2 - 2
zgzt-sbsmzq/jeecg-module-lifecycle/src/main/java/org/jeecg/modules/equipmentDisposal/deviceScrap/controller/DeviceScrapController.java

@@ -313,13 +313,13 @@ public class DeviceScrapController {
         Page<DeviceScrapItemVO> page = new Page<>(pageNo, pageSize, false); // false 表示不自动 count
 
         // 查询当前页数据
-        IPage<DeviceScrapItemVO> pagedTransferItems = deviceScrapService.getPagedScrapItems(page, query);
+        IPage<DeviceScrapItemVO> pagedScrapItems = deviceScrapService.getPagedScrapItems(page, query);
 
         // 手动查询总数
         long total = deviceScrapService.getScrapItemsCount(query);
 
         // 设置数据与总数
-        page.setRecords(pagedTransferItems.getRecords());
+        page.setRecords(pagedScrapItems.getRecords());
         page.setTotal(total);
 
         return Result.OK(page);