fix equip issue
This commit is contained in:
parent
cb2627e375
commit
ce71ebd548
|
|
@ -1,8 +1,13 @@
|
|||
package com.bonus.zlpt.common.core.domain.equip.vo;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.equip.DevInfo;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class DevInfoVo extends DevInfo {
|
||||
|
||||
private long parentId;
|
||||
private String typeName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.bonus.zlpt.equip.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo;
|
||||
import com.bonus.zlpt.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.zlpt.common.core.web.controller.BaseController;
|
||||
import com.bonus.zlpt.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -32,10 +34,10 @@ public class DevInfoController extends BaseController
|
|||
*/
|
||||
@RequiresPermissions("equip:info:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DevInfo devInfo)
|
||||
public TableDataInfo list(DevInfoVo devInfo)
|
||||
{
|
||||
startPage();
|
||||
List<DevInfo> list = devInfoService.selectDevInfoList(devInfo);
|
||||
List<DevInfoVo> list = devInfoService.selectDevInfoList(devInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
|
@ -45,10 +47,10 @@ public class DevInfoController extends BaseController
|
|||
@RequiresPermissions("equip:info:export")
|
||||
@Log(title = "设备信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DevInfo devInfo)
|
||||
public void export(HttpServletResponse response, DevInfoVo devInfo)
|
||||
{
|
||||
List<DevInfo> list = devInfoService.selectDevInfoList(devInfo);
|
||||
ExcelUtil<DevInfo> util = new ExcelUtil<DevInfo>(DevInfo.class);
|
||||
List<DevInfoVo> list = devInfoService.selectDevInfoList(devInfo);
|
||||
ExcelUtil<DevInfoVo> util = new ExcelUtil<DevInfoVo>(DevInfoVo.class);
|
||||
util.exportExcel(response, list, "设备信息数据");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.zlpt.equip.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.zlpt.common.core.domain.equip.DevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo;
|
||||
|
||||
/**
|
||||
* 设备信息Mapper接口
|
||||
|
|
@ -25,7 +26,7 @@ public interface DevInfoMapper
|
|||
* @param devInfo 设备信息
|
||||
* @return 设备信息集合
|
||||
*/
|
||||
public List<DevInfo> selectDevInfoList(DevInfo devInfo);
|
||||
public List<DevInfoVo> selectDevInfoList(DevInfoVo devInfo);
|
||||
|
||||
/**
|
||||
* 新增设备信息
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.zlpt.equip.service;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.zlpt.common.core.domain.equip.DevInfo;
|
||||
import com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo;
|
||||
|
||||
/**
|
||||
* 设备信息Service接口
|
||||
|
|
@ -25,7 +26,7 @@ public interface IDevInfoService
|
|||
* @param devInfo 设备信息
|
||||
* @return 设备信息集合
|
||||
*/
|
||||
public List<DevInfo> selectDevInfoList(DevInfo devInfo);
|
||||
public List<DevInfoVo> selectDevInfoList(DevInfoVo devInfo);
|
||||
|
||||
/**
|
||||
* 新增设备信息
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.zlpt.equip.service.impl;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo;
|
||||
import com.bonus.zlpt.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -40,7 +41,7 @@ public class DevInfoServiceImpl implements IDevInfoService
|
|||
* @return 设备信息
|
||||
*/
|
||||
@Override
|
||||
public List<DevInfo> selectDevInfoList(DevInfo devInfo)
|
||||
public List<DevInfoVo> selectDevInfoList(DevInfoVo devInfo)
|
||||
{
|
||||
return devInfoMapper.selectDevInfoList(devInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,31 +36,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select ma_id, code, type_id, ma_status, lease_scope, location, brand, model_name, production_date, working_hours, serial_number, month_lease_price, day_lease_price, pic_url, js_month_price, js_day_price, description, gps_code, own_co, create_time, creator, deposit, is_active, update_time, update_by from ma_dev_info
|
||||
</sql>
|
||||
|
||||
<select id="selectDevInfoList" parameterType="com.bonus.zlpt.common.core.domain.equip.DevInfo" resultMap="DevInfoResult">
|
||||
<include refid="selectDevInfoVo"/>
|
||||
<select id="selectDevInfoList" parameterType="com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo" resultType="com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo">
|
||||
select d.*,t.type_name
|
||||
from ma_dev_info d
|
||||
left join ma_type_info t on d.type_id = t.type_id
|
||||
<where>
|
||||
<if test="maId != null "> and ma_id = #{maId}</if>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
||||
<if test="maStatus != null and maStatus != ''"> and ma_status = #{maStatus}</if>
|
||||
<if test="leaseScope != null "> and lease_scope = #{leaseScope}</if>
|
||||
<if test="location != null and location != ''"> and location = #{location}</if>
|
||||
<if test="brand != null and brand != ''"> and brand = #{brand}</if>
|
||||
<if test="modelName != null and modelName != ''"> and model_name like concat('%', #{modelName}, '%')</if>
|
||||
<if test="productionDate != null and productionDate != ''"> and production_date = #{productionDate}</if>
|
||||
<if test="workingHours != null and workingHours != ''"> and working_hours = #{workingHours}</if>
|
||||
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
|
||||
<if test="monthLeasePrice != null and monthLeasePrice != ''"> and month_lease_price = #{monthLeasePrice}</if>
|
||||
<if test="dayLeasePrice != null and dayLeasePrice != ''"> and day_lease_price = #{dayLeasePrice}</if>
|
||||
<if test="picUrl != null and picUrl != ''"> and pic_url = #{picUrl}</if>
|
||||
<if test="jsMonthPrice != null and jsMonthPrice != ''"> and js_month_price = #{jsMonthPrice}</if>
|
||||
<if test="jsDayPrice != null and jsDayPrice != ''"> and js_day_price = #{jsDayPrice}</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
<if test="gpsCode != null and gpsCode != ''"> and gps_code = #{gpsCode}</if>
|
||||
<if test="ownCo != null "> and own_co = #{ownCo}</if>
|
||||
<if test="creator != null "> and creator = #{creator}</if>
|
||||
<if test="deposit != null "> and deposit = #{deposit}</if>
|
||||
<if test="isActive != null and isActive != ''"> and is_active = #{isActive}</if>
|
||||
<if test="maId != null "> and d.ma_id = #{maId}</if>
|
||||
<if test="code != null and code != ''"> and d.code = #{code}</if>
|
||||
<if test="typeId != null "> and d.type_id = #{typeId}</if>
|
||||
<if test="maStatus != null and maStatus != ''"> and d.ma_status = #{maStatus}</if>
|
||||
<if test="leaseScope != null "> and d.lease_scope = #{leaseScope}</if>
|
||||
<if test="location != null and location != ''"> and d.location = #{location}</if>
|
||||
<if test="brand != null and brand != ''"> and d.brand = #{brand}</if>
|
||||
<if test="modelName != null and modelName != ''"> and d.model_name like concat('%', #{modelName}, '%')</if>
|
||||
<if test="productionDate != null and productionDate != ''"> and d.production_date = #{productionDate}</if>
|
||||
<if test="workingHours != null and workingHours != ''"> and d.working_hours = #{workingHours}</if>
|
||||
<if test="serialNumber != null and serialNumber != ''"> and d.serial_number = #{serialNumber}</if>
|
||||
<if test="monthLeasePrice != null and monthLeasePrice != ''"> and d.month_lease_price = #{monthLeasePrice}</if>
|
||||
<if test="dayLeasePrice != null and dayLeasePrice != ''"> and d.day_lease_price = #{dayLeasePrice}</if>
|
||||
<if test="picUrl != null and picUrl != ''"> and d.pic_url = #{picUrl}</if>
|
||||
<if test="jsMonthPrice != null and jsMonthPrice != ''"> and d.js_month_price = #{jsMonthPrice}</if>
|
||||
<if test="jsDayPrice != null and jsDayPrice != ''"> and d.js_day_price = #{jsDayPrice}</if>
|
||||
<if test="description != null and description != ''"> and d.description = #{description}</if>
|
||||
<if test="gpsCode != null and gpsCode != ''"> and d.gps_code = #{gpsCode}</if>
|
||||
<if test="ownCo != null "> and d.own_co = #{ownCo}</if>
|
||||
<if test="creator != null "> and d.creator = #{creator}</if>
|
||||
<if test="deposit != null "> and d.deposit = #{deposit}</if>
|
||||
<if test="isActive != null and isActive != ''"> and d.is_active = #{isActive}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue