Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
4eab7c20f2
|
|
@ -69,6 +69,14 @@ public class DevInfoVo extends DevInfo {
|
||||||
private String monthLeasePriceOrderBy; // ASC or DESC
|
private String monthLeasePriceOrderBy; // ASC or DESC
|
||||||
@ApiModelProperty(value = "搜索装备更新时间排序 ASC or DESC")
|
@ApiModelProperty(value = "搜索装备更新时间排序 ASC or DESC")
|
||||||
private String updateTimeOrderBy; // ASC or DESC
|
private String updateTimeOrderBy; // ASC or DESC
|
||||||
|
@ApiModelProperty(value = "装备分类级别")
|
||||||
private Integer level; //ma_type_level 级别: 1,2,3
|
private Integer level; //ma_type_level 级别: 1,2,3
|
||||||
|
@ApiModelProperty(value = "装备状态")
|
||||||
private String maStatusStr;
|
private String maStatusStr;
|
||||||
|
@ApiModelProperty(value = "省份名称")
|
||||||
|
private String provinceStr;
|
||||||
|
@ApiModelProperty(value = "市名称")
|
||||||
|
private String cityStr;
|
||||||
|
@ApiModelProperty(value = "区名称")
|
||||||
|
private String areaStr;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ import com.bonus.zlpt.common.core.domain.system.SysFile;
|
||||||
import com.bonus.zlpt.equip.api.domain.DevInfo;
|
import com.bonus.zlpt.equip.api.domain.DevInfo;
|
||||||
import com.bonus.zlpt.equip.api.domain.dto.InforMationDto;
|
import com.bonus.zlpt.equip.api.domain.dto.InforMationDto;
|
||||||
import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo;
|
import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo;
|
||||||
|
import com.bonus.zlpt.system.api.domain.BaseAddress;
|
||||||
import com.bonus.zlpt.system.api.domain.SysDic;
|
import com.bonus.zlpt.system.api.domain.SysDic;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备信息Mapper接口
|
* 设备信息Mapper接口
|
||||||
*
|
*
|
||||||
|
|
@ -84,5 +84,10 @@ public interface DevInfoMapper
|
||||||
int insertLon(InforMationDto inforMationDto);
|
int insertLon(InforMationDto inforMationDto);
|
||||||
|
|
||||||
public List<SysDic> getSysDic();
|
public List<SysDic> getSysDic();
|
||||||
|
|
||||||
public SysDic getSysDicById(Integer id);
|
public SysDic getSysDicById(Integer id);
|
||||||
|
|
||||||
|
public List<BaseAddress> getBaseAddress();
|
||||||
|
|
||||||
|
public String getBaseAddressById(Integer id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import com.bonus.zlpt.equip.api.domain.dto.InforMationDto;
|
||||||
import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo;
|
import com.bonus.zlpt.equip.api.domain.vo.DevInfoVo;
|
||||||
import com.bonus.zlpt.common.core.domain.system.SysFile;
|
import com.bonus.zlpt.common.core.domain.system.SysFile;
|
||||||
import com.bonus.zlpt.common.core.utils.DateUtils;
|
import com.bonus.zlpt.common.core.utils.DateUtils;
|
||||||
|
import com.bonus.zlpt.system.api.domain.BaseAddress;
|
||||||
import com.bonus.zlpt.system.api.domain.SysDic;
|
import com.bonus.zlpt.system.api.domain.SysDic;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import com.bonus.zlpt.equip.mapper.SysFileInfoMapper;
|
import com.bonus.zlpt.equip.mapper.SysFileInfoMapper;
|
||||||
|
|
@ -72,8 +73,23 @@ public class DevInfoServiceImpl implements IDevInfoService
|
||||||
}
|
}
|
||||||
Long companyUpNum = devInfoMapper.getCompanyUpNum(devInfoVo.getOwnCo());
|
Long companyUpNum = devInfoMapper.getCompanyUpNum(devInfoVo.getOwnCo());
|
||||||
devInfoVo.setCompanyUpNum(companyUpNum);
|
devInfoVo.setCompanyUpNum(companyUpNum);
|
||||||
|
|
||||||
SysDic sysDic = devInfoMapper.getSysDicById(Integer.parseInt(devInfoVo.getMaStatus()));
|
SysDic sysDic = devInfoMapper.getSysDicById(Integer.parseInt(devInfoVo.getMaStatus()));
|
||||||
devInfoVo.setMaStatusStr(sysDic.getName());
|
devInfoVo.setMaStatusStr(sysDic.getName());
|
||||||
|
|
||||||
|
List<BaseAddress> addressList = devInfoMapper.getBaseAddress();
|
||||||
|
for (BaseAddress address : addressList) {
|
||||||
|
if (String.valueOf(devInfoVo.getProvinceId()).equals(String.valueOf(address.getId()))) {
|
||||||
|
devInfoVo.setProvinceStr(address.getName());
|
||||||
|
}
|
||||||
|
if (String.valueOf(devInfoVo.getCityId()).equals(String.valueOf(address.getId()))) {
|
||||||
|
devInfoVo.setCityStr(address.getName());
|
||||||
|
}
|
||||||
|
if (String.valueOf(devInfoVo.getAreaId()).equals(String.valueOf(address.getId()))) {
|
||||||
|
devInfoVo.setAreaStr(address.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// devInfoVo.setProvinceStr(devInfoMapper.getBaseAddressById(devInfoVo.getProvinceId()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
error("fail to get devInfo for files or companyUpNum or maStatusStr" + maId);
|
error("fail to get devInfo for files or companyUpNum or maStatusStr" + maId);
|
||||||
}
|
}
|
||||||
|
|
@ -90,21 +106,46 @@ public class DevInfoServiceImpl implements IDevInfoService
|
||||||
public List<DevInfoVo> selectDevInfoList(DevInfoVo devInfo)
|
public List<DevInfoVo> selectDevInfoList(DevInfoVo devInfo)
|
||||||
{
|
{
|
||||||
List<DevInfoVo> list = devInfoMapper.selectDevInfoList(devInfo);
|
List<DevInfoVo> list = devInfoMapper.selectDevInfoList(devInfo);
|
||||||
List<SysDic> sysDics = devInfoMapper.getSysDic();
|
fillInMaStatusStr(list);
|
||||||
for (DevInfoVo devInfoVo : list) {
|
fillInCityStr(list);
|
||||||
for (SysDic sysDic : sysDics) {
|
|
||||||
if (devInfoVo.getMaStatus().equals(String.valueOf(sysDic.getId()))) {
|
|
||||||
devInfoVo.setMaStatusStr(sysDic.getName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DevInfoVo> selectDevInfoHotList(DevInfoVo devInfo)
|
public List<DevInfoVo> selectDevInfoHotList(DevInfoVo devInfo)
|
||||||
{
|
{
|
||||||
return devInfoMapper.selectDevInfoHotList(devInfo);
|
List<DevInfoVo> hotList = devInfoMapper.selectDevInfoHotList(devInfo);
|
||||||
|
fillInMaStatusStr(hotList);
|
||||||
|
fillInCityStr(hotList);
|
||||||
|
return hotList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fillInMaStatusStr(List<DevInfoVo> list) {
|
||||||
|
List<SysDic> sysDicList = devInfoMapper.getSysDic();
|
||||||
|
for (DevInfoVo devInfoVo : list) {
|
||||||
|
for (SysDic sysDic : sysDicList) {
|
||||||
|
if (devInfoVo.getMaStatus().equals(String.valueOf(sysDic.getId()))) {
|
||||||
|
devInfoVo.setMaStatusStr(sysDic.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fillInCityStr(List<DevInfoVo> list) {
|
||||||
|
List<BaseAddress> addressList = devInfoMapper.getBaseAddress();
|
||||||
|
for (DevInfoVo devInfoVo : list) {
|
||||||
|
for (BaseAddress address : addressList) {
|
||||||
|
// if (String.valueOf(devInfoVo.getProvinceId()).equals(String.valueOf(address.getId()))) {
|
||||||
|
// devInfoVo.setProvinceStr(address.getName());
|
||||||
|
// }
|
||||||
|
if (String.valueOf(devInfoVo.getCityId()).equals(String.valueOf(address.getId()))) {
|
||||||
|
devInfoVo.setCityStr(address.getName());
|
||||||
|
}
|
||||||
|
// if (String.valueOf(devInfoVo.getAreaId()).equals(String.valueOf(address.getId()))) {
|
||||||
|
// devInfoVo.setAreaStr(address.getName());
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join bm_company_info c on d.own_co = c.company_id
|
left join bm_company_info c on d.own_co = c.company_id
|
||||||
left join ma_hot_search h on d.ma_id = h.ma_id
|
left join ma_hot_search h on d.ma_id = h.ma_id
|
||||||
left join ma_type_info ti on d.type_id = ti.type_id
|
left join ma_type_info ti on d.type_id = ti.type_id
|
||||||
where d.is_active='1'
|
<where>
|
||||||
|
d.is_active='1'
|
||||||
|
<if test="maStatus != null and maStatus != ''"> and d.ma_status = #{maStatus}</if>
|
||||||
|
</where>
|
||||||
order by h.search_num
|
order by h.search_num
|
||||||
</select>
|
</select>
|
||||||
<!-- <select id="selectDevInfoHotList" parameterType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo" resultType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo">-->
|
<!-- <select id="selectDevInfoHotList" parameterType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo" resultType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo">-->
|
||||||
|
|
@ -354,4 +357,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from sys_dic
|
from sys_dic
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getBaseAddress" resultType="com.bonus.zlpt.system.api.domain.BaseAddress">
|
||||||
|
select id,name from base_address where status = 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getBaseAddressById" resultType="String">
|
||||||
|
select name from base_address where status = 1 and id = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -44,16 +44,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectOrderInfoByOrderId" parameterType="Long" resultType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo">
|
<select id="selectOrderInfoByOrderId" parameterType="Long" resultType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo">
|
||||||
select d.*,o.code,o.time,o.order_status,o.reject_reason
|
select d.*,o.code,o.time,o.order_status,o.reject_reason,s.file_url as contract_url
|
||||||
from ma_order_info o
|
from ma_order_info o
|
||||||
left join ma_order_details d on d.order_id = o.order_id
|
left join ma_order_details d on d.order_id = o.order_id
|
||||||
where o.order_id = #{orderId}
|
left join sys_file_info s on s.model_id = o.order_id
|
||||||
|
where s.dic_id = 21 and o.order_id = #{orderId}
|
||||||
</select>
|
</select>
|
||||||
<!-- select d.*,o.code,o.time as order_time,o.order_status,s.file_url as contract_url-->
|
|
||||||
<!-- from ma_order_info o-->
|
|
||||||
<!-- left join ma_order_details d on d.order_id = o.order_id-->
|
|
||||||
<!-- left join sys_file_info s on s.model_id = o.order_id-->
|
|
||||||
<!-- where o.order_id = #{orderId} and s.dic_id = 21-->
|
|
||||||
|
|
||||||
<insert id="insertOrderInfo" parameterType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo">
|
<insert id="insertOrderInfo" parameterType="com.bonus.zlpt.common.core.domain.order.vo.OrderInfoVo">
|
||||||
insert into ma_order_info
|
insert into ma_order_info
|
||||||
|
|
@ -99,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="addressId != null">address_id,</if>
|
<if test="addressId != null">address_id,</if>
|
||||||
<if test="address != null">address,</if>
|
<if test="address != null">address,</if>
|
||||||
<if test="duration != null">duration,</if>
|
<if test="duration != null">duration,</if>
|
||||||
<if test="durationType != null">durationType,</if>
|
<if test="durationType != null">duration_type,</if>
|
||||||
<if test="invoiceType != null">invoice_type,</if>
|
<if test="invoiceType != null">invoice_type,</if>
|
||||||
<if test="description != null">description,</if>
|
<if test="description != null">description,</if>
|
||||||
<if test="maId != null">ma_id,</if>
|
<if test="maId != null">ma_id,</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue