Merge branch 'dev-cq' of http://192.168.0.56:3000/bonus/devicesmgt into dev-cq
This commit is contained in:
commit
6a6459eadd
|
|
@ -1,11 +1,14 @@
|
|||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Dingjie
|
||||
|
|
@ -43,26 +46,31 @@ public class MaMachine extends BaseEntity {
|
|||
* 物品种类
|
||||
*/
|
||||
@ApiModelProperty(value = "物品种类")
|
||||
@Excel(name = "物品种类", sort = 1)
|
||||
private String itemType;
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
@ApiModelProperty(value = "设备类型")
|
||||
@Excel(name = "设备类型", sort = 2)
|
||||
private String deviceType;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号", sort = 3)
|
||||
private String specificationType;
|
||||
/**
|
||||
* 机具编号
|
||||
*/
|
||||
@ApiModelProperty(value = "机具编号")
|
||||
@Excel(name = "设备编码", sort = 4)
|
||||
private String maCode;
|
||||
/**
|
||||
* 原编号
|
||||
*/
|
||||
@ApiModelProperty(value = "原编号")
|
||||
@Excel(name = "设备原编号", sort = 8)
|
||||
private String preCode;
|
||||
/**
|
||||
* 机具状态(数据字典)
|
||||
|
|
@ -73,11 +81,13 @@ public class MaMachine extends BaseEntity {
|
|||
* 机具状态(数据字典)
|
||||
*/
|
||||
@ApiModelProperty(value = "机具状态(数据字典)名称")
|
||||
@Excel(name = "设备状态", sort = 6)
|
||||
private String maStatusName;
|
||||
/**
|
||||
* 二维码
|
||||
*/
|
||||
@ApiModelProperty(value = "二维码")
|
||||
@Excel(name = "二维码", sort = 9)
|
||||
private String qrCode;
|
||||
/**
|
||||
* 购置价
|
||||
|
|
@ -103,6 +113,7 @@ public class MaMachine extends BaseEntity {
|
|||
* 固定资产编号
|
||||
*/
|
||||
@ApiModelProperty(value = "固定资产编号")
|
||||
@Excel(name = "固定资产编号", sort = 7)
|
||||
private String assetsCode;
|
||||
/**
|
||||
* 本次检验人
|
||||
|
|
@ -148,6 +159,7 @@ public class MaMachine extends BaseEntity {
|
|||
* 购置批次
|
||||
*/
|
||||
@ApiModelProperty(value = "购置批次")
|
||||
@Excel(name = "采购单号", sort = 5)
|
||||
private String buyTask;
|
||||
/**
|
||||
* 所在仓库
|
||||
|
|
@ -176,6 +188,7 @@ public class MaMachine extends BaseEntity {
|
|||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "仓库名称")
|
||||
@Excel(name = "所在仓库", sort = 10)
|
||||
private String ownHouseName;
|
||||
@ApiModelProperty(value = "仓库id")
|
||||
private Long houseId;
|
||||
|
|
@ -221,5 +234,8 @@ public class MaMachine extends BaseEntity {
|
|||
@ApiModelProperty(value = "1:二维码绑定标识 2:rfid绑定标识")
|
||||
private Integer flag;
|
||||
|
||||
/** 导出选中列表 */
|
||||
private List<Long> dataCondition;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.sgzb.base.controller;
|
|||
import com.bonus.sgzb.base.api.domain.MaMachine;
|
||||
import com.bonus.sgzb.base.mapper.MaMachineMapper;
|
||||
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.domain.AjaxResult;
|
||||
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.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -56,6 +58,20 @@ public class MaMachineController extends BaseController {
|
|||
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, "机具设备管理");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增机具设备管理
|
||||
|
|
|
|||
|
|
@ -75,6 +75,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="beginTime != null and endTime != null and beginTime != '' and endTime != null">
|
||||
AND m.create_time between #{beginTime} and #{endTime}
|
||||
</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>
|
||||
order by m.ma_id desc
|
||||
</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="qrCode != null and qrCode != ''">qr_code = #{qrCode},</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="outFacCode != null">out_fac_code = #{outFacCode},</if>
|
||||
<if test="assetsCode != null">assets_code =#{assetsCode},</if>
|
||||
|
|
|
|||
|
|
@ -372,12 +372,10 @@
|
|||
<el-select
|
||||
v-model="form.propId"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择资产属性"
|
||||
style="width: 220px"
|
||||
>
|
||||
<el-option
|
||||
label="请选择"
|
||||
:value="0"
|
||||
></el-option>
|
||||
<el-option
|
||||
v-for="keeper in propList"
|
||||
:key="keeper.propId"
|
||||
|
|
@ -448,7 +446,7 @@
|
|||
placeholder="机具厂家"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 180px"
|
||||
style="width: 220px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplierList"
|
||||
|
|
@ -739,6 +737,7 @@ export default {
|
|||
getMachine(maId).then((response) => {
|
||||
this.form = response.data
|
||||
if (this.form.maVender) this.form.maVender = parseInt(this.form.maVender)
|
||||
if (this.form.propId == 0) this.form.propId = ''
|
||||
this.open = true
|
||||
this.title = '编辑'
|
||||
})
|
||||
|
|
@ -779,9 +778,10 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('system/dict/type/export', {
|
||||
// ...this.queryParams
|
||||
// }, `type_${new Date().getTime()}.xlsx`)
|
||||
this.download('base/machine/export', {
|
||||
...this.queryParams,
|
||||
dataCondition: this.ids
|
||||
}, `编码设备管理_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue