Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # zlpt-modules/zlpt-equip/src/main/java/com/bonus/zlpt/equip/service/impl/DevInfoServiceImpl.java
This commit is contained in:
commit
749fa796ea
|
|
@ -50,6 +50,18 @@ public class DevInfo extends BaseEntity
|
|||
@ApiModelProperty(value = "设备所在地")
|
||||
private String location;
|
||||
|
||||
@Excel(name = "设备所在省id")
|
||||
@ApiModelProperty(value = "设备所在省id")
|
||||
private Integer provinceId;
|
||||
|
||||
@Excel(name = "设备所在市id")
|
||||
@ApiModelProperty(value = "设备所在市id")
|
||||
private Integer cityId;
|
||||
|
||||
@Excel(name = "设备所在区id")
|
||||
@ApiModelProperty(value = "设备所在省id")
|
||||
private Integer areaId;
|
||||
|
||||
/** 设备品牌 */
|
||||
@Excel(name = "设备品牌")
|
||||
@ApiModelProperty(value = "设备品牌")
|
||||
|
|
@ -83,7 +95,7 @@ public class DevInfo extends BaseEntity
|
|||
/** 设备天租价 */
|
||||
@Excel(name = "设备天租价")
|
||||
@ApiModelProperty(value = "设备天租价")
|
||||
private String dayLeasePrice;
|
||||
private Float dayLeasePrice;
|
||||
|
||||
/** 设备主照片 */
|
||||
@Excel(name = "设备主照片")
|
||||
|
|
@ -93,12 +105,12 @@ public class DevInfo extends BaseEntity
|
|||
/** 机手月租金 */
|
||||
@Excel(name = "机手月租金")
|
||||
@ApiModelProperty(value = "机手月租金")
|
||||
private String jsMonthPrice;
|
||||
private Float jsMonthPrice;
|
||||
|
||||
/** 机手天租金 */
|
||||
@Excel(name = "机手天租金")
|
||||
@ApiModelProperty(value = "机手天租金")
|
||||
private String jsDayPrice;
|
||||
private Float jsDayPrice;
|
||||
|
||||
/** 详细描述 */
|
||||
@Excel(name = "详细描述")
|
||||
|
|
|
|||
|
|
@ -70,4 +70,5 @@ public class DevInfoVo extends DevInfo {
|
|||
@ApiModelProperty(value = "搜索装备更新时间排序 ASC or DESC")
|
||||
private String updateTimeOrderBy; // ASC or DESC
|
||||
private Integer level; //ma_type_level 级别: 1,2,3
|
||||
private String maStatusStr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
package com.bonus.zlpt.system.api.domain;
|
||||
|
||||
import com.bonus.zlpt.common.core.annotation.Excel;
|
||||
import com.bonus.zlpt.common.core.web.page.PageDomain;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 数据字典(企业类型管理)
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel("数据字典(企业类型管理)")
|
||||
public class SysDic extends PageDomain {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
private PageDomain pageDomain;
|
||||
|
||||
@Excel(name = "id")
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
private Integer id;
|
||||
|
||||
@Excel(name = "父id")
|
||||
@ApiModelProperty(value = "父id", required = true)
|
||||
private Integer pId;
|
||||
|
||||
@Excel(name = "编码")
|
||||
@ApiModelProperty(value = "编码", required = true)
|
||||
private String code;
|
||||
|
||||
@Excel(name = "字典名称")
|
||||
@ApiModelProperty(value = "字典名称", required = true)
|
||||
private String name;
|
||||
|
||||
@Excel(name = "描述")
|
||||
@ApiModelProperty(value = "描述", required = true)
|
||||
private String description;
|
||||
|
||||
@Excel(name = "值")
|
||||
@ApiModelProperty(value = "值", required = true)
|
||||
private String value;
|
||||
|
||||
@Excel(name = "排序")
|
||||
@ApiModelProperty(value = "排序", required = true)
|
||||
private String sort;
|
||||
|
||||
@Excel(name = "层级")
|
||||
@ApiModelProperty(value = "层级", required = true)
|
||||
private String level;
|
||||
|
||||
@Excel(name = "状态")
|
||||
@ApiModelProperty(value = "状态", required = true)
|
||||
private String status;
|
||||
|
||||
@Excel(name = "创建时间")
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private String createTime;
|
||||
|
||||
@Excel(name = "创建人")
|
||||
@ApiModelProperty(value = "创建人", required = true)
|
||||
private String creator;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -48,6 +48,10 @@ public class OrderDetails extends BaseEntity
|
|||
@Excel(name = "工期时长")
|
||||
private String duration;
|
||||
|
||||
/** 工期时长类型 */
|
||||
@Excel(name = "工期时长类型 0-日 1-月")
|
||||
private String durationType;
|
||||
|
||||
/** 发票类型 */
|
||||
@Excel(name = "发票类型 1-增值税普票 2-增值税专票")
|
||||
private String invoiceType;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ public class OrderInfoVo extends OrderInfo {
|
|||
private String address;
|
||||
@ApiModelProperty(value = "工期时长")
|
||||
private String duration;
|
||||
@ApiModelProperty(name = "工期时长类型 0-日 1-月")
|
||||
private String durationType;
|
||||
@ApiModelProperty(value = "发票类型 1-增值税普票 2-增值税专票")
|
||||
private String invoiceType;
|
||||
@ApiModelProperty(value = "项目说明")
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
package com.bonus.zlpt.equip.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.system.SysFile;
|
||||
import com.bonus.zlpt.equip.api.domain.DevInfo;
|
||||
import com.bonus.zlpt.equip.api.domain.dto.InforMationDto;
|
||||
import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo;
|
||||
import com.bonus.zlpt.system.api.domain.SysDic;
|
||||
|
||||
|
||||
/**
|
||||
* 设备信息Mapper接口
|
||||
|
|
@ -83,4 +82,6 @@ public interface DevInfoMapper
|
|||
* @return
|
||||
*/
|
||||
int insertLon(InforMationDto inforMationDto);
|
||||
|
||||
public List<SysDic> getSysDic();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,24 +2,19 @@ package com.bonus.zlpt.equip.service.impl;
|
|||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
import com.bonus.zlpt.equip.api.domain.DevInfo;
|
||||
import com.bonus.zlpt.equip.api.domain.SysFileInfo;
|
||||
import com.bonus.zlpt.equip.api.domain.dto.InforMationDto;
|
||||
import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo;
|
||||
|
||||
import com.bonus.zlpt.common.core.domain.system.SysFile;
|
||||
import com.bonus.zlpt.common.core.utils.DateUtils;
|
||||
import com.bonus.zlpt.equip.api.enums.MaStatusEnum;
|
||||
import com.bonus.zlpt.system.api.domain.SysDic;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import com.bonus.zlpt.equip.mapper.SysFileInfoMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.zlpt.equip.mapper.DevInfoMapper;
|
||||
import com.bonus.zlpt.equip.service.IDevInfoService;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
|
|
@ -86,7 +81,16 @@ public class DevInfoServiceImpl implements IDevInfoService
|
|||
@Override
|
||||
public List<DevInfoVo> selectDevInfoList(DevInfoVo devInfo)
|
||||
{
|
||||
return devInfoMapper.selectDevInfoList(devInfo);
|
||||
List<DevInfoVo> list = devInfoMapper.selectDevInfoList(devInfo);
|
||||
List<SysDic> sysDics = devInfoMapper.getSysDic();
|
||||
for (DevInfoVo devInfoVo : list) {
|
||||
for (SysDic sysDic : sysDics) {
|
||||
if (devInfoVo.getMaStatus().equals(String.valueOf(sysDic.getId()))) {
|
||||
devInfoVo.setMaStatusStr(sysDic.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -184,8 +188,7 @@ public class DevInfoServiceImpl implements IDevInfoService
|
|||
//根据key计算每种状态的数量
|
||||
for (String key : keys) {
|
||||
List<DevInfo> DevInfoList = groupedByMaStatus.get(key);
|
||||
//根据key来获取状态名称
|
||||
sumTypeMap.put(MaStatusEnum.getNameByCode(Integer.parseInt(key)),DevInfoList.size());
|
||||
sumTypeMap.put(key,DevInfoList.size());
|
||||
}
|
||||
return sumTypeMap;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="maStatus" column="ma_status" />
|
||||
<result property="leaseScope" column="lease_scope" />
|
||||
<result property="location" column="location" />
|
||||
<result property="provinceId" column="province_id" />
|
||||
<result property="cityId" column="city_id" />
|
||||
<result property="areaId" column="area_id" />
|
||||
<result property="brand" column="brand" />
|
||||
<result property="modelName" column="model_name" />
|
||||
<result property="productionDate" column="production_date" />
|
||||
|
|
@ -39,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectDevInfoVo">
|
||||
select ma_id, code, type_id, ma_status, lease_scope, location, brand, model_name, production_date, working_hours, serial_number,
|
||||
select ma_id, code, type_id, ma_status, lease_scope, location, province_id, city_id, area_id, 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, update_time, update_by, specification, deposit, is_operator, is_active, update_time, update_by from ma_dev_info
|
||||
</sql>
|
||||
|
|
@ -71,6 +74,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<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="provinceId != null and provinceId != ''"> and d.province_id = #{provinceId}</if>
|
||||
<if test="cityId != null and cityId != ''"> and d.city_id = #{cityId}</if>
|
||||
<if test="areaId != null and areaId != ''"> and d.area_id = #{areaId}</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="ageMin != null and ageMin != '' and ageMax != null and ageMax != ''">
|
||||
|
|
@ -202,6 +208,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="maStatus != null">ma_status,</if>
|
||||
<if test="leaseScope != null">lease_scope,</if>
|
||||
<if test="location != null">location,</if>
|
||||
<if test="provinceId != null">provinceId,</if>
|
||||
<if test="cityId != null">cityId,</if>
|
||||
<if test="areaId != null">areaId,</if>
|
||||
<if test="brand != null">brand,</if>
|
||||
<if test="modelName != null">model_name,</if>
|
||||
<if test="productionDate != null">production_date,</if>
|
||||
|
|
@ -233,6 +242,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="maStatus != null">#{maStatus},</if>
|
||||
<if test="leaseScope != null">#{leaseScope},</if>
|
||||
<if test="location != null">#{location},</if>
|
||||
<if test="provinceId != null">#{provinceId},</if>
|
||||
<if test="cityId != null">#{cityId},</if>
|
||||
<if test="areaId != null">#{areaId},</if>
|
||||
<if test="brand != null">#{brand},</if>
|
||||
<if test="modelName != null">#{modelName},</if>
|
||||
<if test="productionDate != null">#{productionDate},</if>
|
||||
|
|
@ -281,6 +293,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="maStatus != null">ma_status = #{maStatus},</if>
|
||||
<if test="leaseScope != null">lease_scope = #{leaseScope},</if>
|
||||
<if test="location != null">location = #{location},</if>
|
||||
<if test="provinceId != null">province_id = #{provinceId},</if>
|
||||
<if test="cityId != null">city_id = #{cityId},</if>
|
||||
<if test="areaId != null">area_id = #{areaId},</if>
|
||||
<if test="brand != null">brand = #{brand},</if>
|
||||
<if test="modelName != null">model_name = #{modelName},</if>
|
||||
<if test="productionDate != null">production_date = #{productionDate},</if>
|
||||
|
|
@ -327,4 +342,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join bm_company_info c on d.own_co = c.company_id
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getSysDic" resultType="com.bonus.zlpt.system.api.domain.SysDic">
|
||||
select
|
||||
id,p_id,code,`name`,description,`value`,sort,`level`,status,create_time,creator
|
||||
from sys_dic
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -99,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="addressId != null">address_id,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="duration != null">duration,</if>
|
||||
<if test="durationType != null">durationType,</if>
|
||||
<if test="invoiceType != null">invoice_type,</if>
|
||||
<if test="description != null">description,</if>
|
||||
<if test="maId != null">ma_id,</if>
|
||||
|
|
@ -122,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="addressId != null">#{addressId},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="duration != null">#{duration},</if>
|
||||
<if test="durationType != null">#{durationType},</if>
|
||||
<if test="invoiceType != null">#{invoiceType},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
<if test="maId != null">#{maId},</if>
|
||||
|
|
@ -169,6 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="addressId != null">address_id = #{addressId},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="duration != null">duration = #{duration},</if>
|
||||
<if test="durationType != null">duration_type = #{durationType},</if>
|
||||
<if test="invoiceType != null">invoice_type = #{invoiceType},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
<if test="maId != null">ma_id = #{maId},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue