增加设备信息模型中的类型等级字段,并更新相关查询
This commit is contained in:
parent
dcc6e79df1
commit
d5282ab3f8
|
|
@ -382,4 +382,7 @@ public class DevInfo extends BaseEntity {
|
|||
@ApiModelProperty(value = "检验有效状态")
|
||||
private String verifyStatus;
|
||||
|
||||
@ApiModelProperty(value = "类型等级 存入字符串")
|
||||
private String levelType;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,4 +183,5 @@ public class DevInfoVo extends DevInfo {
|
|||
@ApiModelProperty(value = "设备类型级别")
|
||||
private Integer typeLevel;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -356,6 +356,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
bmFileInfo.setFileType(0L);
|
||||
List<BmFileInfo> mainFileInfoList = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
|
||||
if (!CollectionUtils.isEmpty(mainFileInfoList)) {
|
||||
devInfoVo.setMainFileList(mainFileInfoList);
|
||||
devInfoVo.setPicUrl(mainFileInfoList.get(0).getFileUrl());
|
||||
}
|
||||
}
|
||||
|
|
@ -408,18 +409,15 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
return AjaxResult.error("详情页展示图不能为空");
|
||||
}
|
||||
}
|
||||
String code = "";
|
||||
for (int i = 0; i < devInfo.getTableList().size(); i++) {
|
||||
//获取用户信息
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
//保存用户信息
|
||||
devInfo.setCreator(userId)
|
||||
/*.setMaStatus(ON_HIRE.getCode())*/
|
||||
.setOwnId(userId);
|
||||
if (org.apache.commons.lang3.StringUtils.isBlank(code)) {
|
||||
code = getString();
|
||||
}
|
||||
devInfo.setCode(code);
|
||||
devInfo.setCreator(userId).setOwnId(userId);
|
||||
// if (org.apache.commons.lang3.StringUtils.isBlank(code)) {
|
||||
// code = getString();
|
||||
// }
|
||||
// devInfo.setCode(code);
|
||||
devInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId().toString());
|
||||
devInfo.setDeviceCount(devInfo.getDeviceCount());
|
||||
devInfo.setIdentifyCode(devInfo.getTableList().get(i).getIdentifyCode());
|
||||
|
|
@ -428,7 +426,6 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
return AjaxResult.error("设备信息SQL保存失败,请修改后重试");
|
||||
}
|
||||
devInfoMapper.updateTypeLeasePrice(devInfo);
|
||||
code = "";
|
||||
//保存自定义属性值
|
||||
if (!CollectionUtils.isEmpty(devInfo.getDevInfoProperties())) {
|
||||
devInfoMapper.insertDevInfoProperties(devInfo.getMaId(), devInfo.getDevInfoProperties());
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<sql id="selectDevInfoVo">
|
||||
select ma_id, device_name, device_weight, device_count, code, identify_code, type_id, ma_status, lease_scope, location, province_id, city_id, area_id, brand, model_name, production_date, working_hours, serial_number,
|
||||
pic_url, js_month_price, js_day_price, description, gps_code, own_co, create_time,
|
||||
pic_url, js_month_price, js_day_price, description, gps_code, own_co, create_time, level_type,
|
||||
creator, update_time, person, person_phone, update_by, specification, deposit, is_operator, is_active, update_time, update_by
|
||||
from ma_dev_info
|
||||
</sql>
|
||||
|
|
@ -73,6 +73,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
d.create_time as createTime,
|
||||
d.update_time as updateTime,
|
||||
d.own_co as companyId,
|
||||
d.purchaseSource,
|
||||
d.assetValue,
|
||||
d.profession,
|
||||
d.main_process AS mainProcess,
|
||||
d.sub_process as subProcess,
|
||||
d.level_type as levelType,
|
||||
sd.dept_name as companyName,
|
||||
c.operate_address as operateAddress,
|
||||
mt3.type_id as thirdId,
|
||||
|
|
@ -266,6 +272,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
d.profession as profession,
|
||||
d.main_process as mainProcess,
|
||||
d.sub_process as subProcess,
|
||||
d.level_type as levelType,
|
||||
mt4.level as typeLevel,
|
||||
CASE
|
||||
WHEN check_date IS NULL THEN '未设置检验日期'
|
||||
|
|
@ -319,6 +326,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyId != null and companyId != ''">own_co,</if>
|
||||
<if test="person != null and person != ''">person,</if>
|
||||
<if test="personPhone != null and personPhone != ''">person_phone,</if>
|
||||
<if test="levelType != null and levelType != ''">level_type</if>
|
||||
<if test="assetValue != null and assetValue != ''">assetValue,</if>
|
||||
<if test="purchaseSource != null and purchaseSource != ''">purchaseSource,</if>
|
||||
create_time,
|
||||
|
|
@ -366,6 +374,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyId != null and companyId != ''">#{companyId},</if>
|
||||
<if test="person != null and person != ''">#{person},</if>
|
||||
<if test="personPhone != null and personPhone != ''">#{personPhone},</if>
|
||||
<if test="levelType != null and levelType != ''">#{levelType}</if>
|
||||
<if test="assetValue != null and assetValue != ''">#{assetValue},</if>
|
||||
<if test="purchaseSource != null and purchaseSource != ''">#{purchaseSource},</if>
|
||||
now(),
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND moi.code = #{code}
|
||||
</if>
|
||||
<if test="maId != null and maId != ''">
|
||||
AND moi.maId = #{maId}
|
||||
AND moi.ma_id = #{maId}
|
||||
</if>
|
||||
<if test="startTime != null and endTime != null ">
|
||||
AND ((hh.rent_begin_time BETWEEN #{startTime} AND #{endTime})
|
||||
|
|
|
|||
Loading…
Reference in New Issue