This commit is contained in:
mashuai 2024-06-11 11:19:51 +08:00
parent d2cc5721f2
commit 5a96f46e6a
3 changed files with 39 additions and 1 deletions

View File

@ -1,11 +1,14 @@
package com.bonus.sgzb.base.api.domain; package com.bonus.sgzb.base.api.domain;
import com.bonus.sgzb.common.core.annotation.Excel;
import com.bonus.sgzb.common.core.web.domain.BaseEntity; import com.bonus.sgzb.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* *
* @author Dingjie * @author Dingjie
@ -43,26 +46,31 @@ public class MaMachine extends BaseEntity {
* 物品种类 * 物品种类
*/ */
@ApiModelProperty(value = "物品种类") @ApiModelProperty(value = "物品种类")
@Excel(name = "物品种类", sort = 1)
private String itemType; private String itemType;
/** /**
* 设备类型 * 设备类型
*/ */
@ApiModelProperty(value = "设备类型") @ApiModelProperty(value = "设备类型")
@Excel(name = "设备类型", sort = 2)
private String deviceType; private String deviceType;
/** /**
* 规格型号 * 规格型号
*/ */
@ApiModelProperty(value = "规格型号") @ApiModelProperty(value = "规格型号")
@Excel(name = "规格型号", sort = 3)
private String specificationType; private String specificationType;
/** /**
* 机具编号 * 机具编号
*/ */
@ApiModelProperty(value = "机具编号") @ApiModelProperty(value = "机具编号")
@Excel(name = "设备编码", sort = 4)
private String maCode; private String maCode;
/** /**
* 原编号 * 原编号
*/ */
@ApiModelProperty(value = "原编号") @ApiModelProperty(value = "原编号")
@Excel(name = "设备原编号", sort = 8)
private String preCode; private String preCode;
/** /**
* 机具状态数据字典 * 机具状态数据字典
@ -73,11 +81,13 @@ public class MaMachine extends BaseEntity {
* 机具状态数据字典 * 机具状态数据字典
*/ */
@ApiModelProperty(value = "机具状态(数据字典)名称") @ApiModelProperty(value = "机具状态(数据字典)名称")
@Excel(name = "设备状态", sort = 6)
private String maStatusName; private String maStatusName;
/** /**
* 二维码 * 二维码
*/ */
@ApiModelProperty(value = "二维码") @ApiModelProperty(value = "二维码")
@Excel(name = "二维码", sort = 9)
private String qrCode; private String qrCode;
/** /**
* 购置价 * 购置价
@ -103,6 +113,7 @@ public class MaMachine extends BaseEntity {
* 固定资产编号 * 固定资产编号
*/ */
@ApiModelProperty(value = "固定资产编号") @ApiModelProperty(value = "固定资产编号")
@Excel(name = "固定资产编号", sort = 7)
private String assetsCode; private String assetsCode;
/** /**
* 本次检验人 * 本次检验人
@ -148,6 +159,7 @@ public class MaMachine extends BaseEntity {
* 购置批次 * 购置批次
*/ */
@ApiModelProperty(value = "购置批次") @ApiModelProperty(value = "购置批次")
@Excel(name = "采购单号", sort = 5)
private String buyTask; private String buyTask;
/** /**
* 所在仓库 * 所在仓库
@ -176,6 +188,7 @@ public class MaMachine extends BaseEntity {
private String endTime; private String endTime;
@ApiModelProperty(value = "仓库名称") @ApiModelProperty(value = "仓库名称")
@Excel(name = "所在仓库", sort = 10)
private String ownHouseName; private String ownHouseName;
@ApiModelProperty(value = "仓库id") @ApiModelProperty(value = "仓库id")
private Long houseId; private Long houseId;
@ -221,5 +234,8 @@ public class MaMachine extends BaseEntity {
@ApiModelProperty(value = "1二维码绑定标识 2rfid绑定标识") @ApiModelProperty(value = "1二维码绑定标识 2rfid绑定标识")
private Integer flag; private Integer flag;
/** 导出选中列表 */
private List<Long> dataCondition;
} }

View File

@ -3,6 +3,7 @@ package com.bonus.sgzb.base.controller;
import com.bonus.sgzb.base.api.domain.MaMachine; import com.bonus.sgzb.base.api.domain.MaMachine;
import com.bonus.sgzb.base.mapper.MaMachineMapper; import com.bonus.sgzb.base.mapper.MaMachineMapper;
import com.bonus.sgzb.base.service.MaMachineService; import com.bonus.sgzb.base.service.MaMachineService;
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
import com.bonus.sgzb.common.core.web.controller.BaseController; import com.bonus.sgzb.common.core.web.controller.BaseController;
import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.core.web.page.TableDataInfo; import com.bonus.sgzb.common.core.web.page.TableDataInfo;
@ -14,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
/** /**
@ -56,6 +58,20 @@ public class MaMachineController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
* 导出查询机具设备管理
* @param response
* @param maMachine
*/
@ApiOperation(value = "导出查询机具设备管理")
@PostMapping("/export")
public void export(HttpServletResponse response, MaMachine maMachine)
{
List<MaMachine> list = maMachineService.getMaMachine(maMachine);
ExcelUtil<MaMachine> util = new ExcelUtil<>(MaMachine.class);
util.exportExcel(response, list, "机具设备管理");
}
/** /**
* 新增机具设备管理 * 新增机具设备管理

View File

@ -75,6 +75,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="beginTime != null and endTime != null and beginTime != '' and endTime != null"> <if test="beginTime != null and endTime != null and beginTime != '' and endTime != null">
AND m.create_time between #{beginTime} and #{endTime} AND m.create_time between #{beginTime} and #{endTime}
</if> </if>
<if test="dataCondition != null and dataCondition.size()>0">
AND m.ma_id in
<foreach collection="dataCondition" item="maId" index="index" open="(" separator="," close=")">
#{maId}
</foreach>
</if>
</where> </where>
order by m.ma_id desc order by m.ma_id desc
</select> </select>
@ -244,7 +250,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="maStatus != null and maStatus != ''">ma_status = #{maStatus},</if> <if test="maStatus != null and maStatus != ''">ma_status = #{maStatus},</if>
<if test="qrCode != null and qrCode != ''">qr_code = #{qrCode},</if> <if test="qrCode != null and qrCode != ''">qr_code = #{qrCode},</if>
<if test="buyPrice != null and buyPrice != ''">buy_price = #{buyPrice},</if> <if test="buyPrice != null and buyPrice != ''">buy_price = #{buyPrice},</if>
<if test="maVender != null and maVender != ''">ma_vender = #{maVender},</if> <if test="maVender != null">ma_vender = #{maVender},</if>
<if test="outFacTime != null and outFacTime != ''">out_fac_time =#{outFacTime},</if> <if test="outFacTime != null and outFacTime != ''">out_fac_time =#{outFacTime},</if>
<if test="outFacCode != null">out_fac_code = #{outFacCode},</if> <if test="outFacCode != null">out_fac_code = #{outFacCode},</if>
<if test="assetsCode != null">assets_code =#{assetsCode},</if> <if test="assetsCode != null">assets_code =#{assetsCode},</if>