fix
This commit is contained in:
parent
bec2b15853
commit
45cce848f6
|
|
@ -11,7 +11,12 @@ public class DevInfoVo extends DevInfo {
|
|||
private Integer pageNum;
|
||||
private Integer pageSize;
|
||||
private long parentId;
|
||||
/* 装备类别 grandpa */
|
||||
private String typeName;
|
||||
/* 装备组别 parent */
|
||||
private String groupName;
|
||||
/* 装备名称 child */
|
||||
private String deviceName;
|
||||
private String companyName;
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,12 @@ import lombok.ToString;
|
|||
@Data
|
||||
@ToString
|
||||
public class OrderDetailsVo extends OrderDetails {
|
||||
/** 装备类型 */
|
||||
/* 装备类别 grandpa */
|
||||
private String typeName;
|
||||
/** 装备名称 */
|
||||
private String equipName;
|
||||
|
||||
/* 装备组别 parent */
|
||||
private String groupName;
|
||||
|
||||
/* 装备名称 child */
|
||||
private String deviceName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,10 +36,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</sql>
|
||||
|
||||
<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,c.company_name
|
||||
select d.*,t.type_name as device_name,t.parent_name as group_name,c.company_name
|
||||
from ma_dev_info d
|
||||
left join ma_type_info t on d.type_id = t.type_id
|
||||
left join bm_company_info c on d.own_co = c.company_id
|
||||
left join (select t.*, p.type_name as parent_name
|
||||
from ma_type_info t
|
||||
left join ma_type_info p on t.parent_id=p.type_id) t on d.type_id = t.type_id
|
||||
left join bm_company_info c on d.own_co = c.company_id
|
||||
<where>
|
||||
<if test="maId != null "> and d.ma_id = #{maId}</if>
|
||||
<if test="code != null and code != ''"> and d.code = #{code}</if>
|
||||
|
|
@ -77,10 +79,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="selectDevInfoByMaId" parameterType="Long" resultType="com.bonus.zlpt.common.core.domain.equip.vo.DevInfoVo">
|
||||
select d.*,t.type_name,c.company_name
|
||||
select d.*,t.type_name as device_name,t.parent_name as group_name,c.company_name
|
||||
from ma_dev_info d
|
||||
left join ma_type_info t on d.type_id = t.type_id
|
||||
left join bm_company_info c on d.own_co = c.company_id
|
||||
left join (select t.*, p.type_name as parent_name
|
||||
from ma_type_info t
|
||||
left join ma_type_info p on t.parent_id=p.type_id) t on d.type_id = t.type_id
|
||||
left join bm_company_info c on d.own_co = c.company_id
|
||||
where d.ma_id = #{maId}
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -76,12 +76,15 @@ public class OrderDetailsController extends BaseController
|
|||
OrderDetails orderDetails = orderDetailsService.selectOrderDetailsById(id);
|
||||
Map map1 = (Map) equipClient.getInfo(orderDetails.getMaId());
|
||||
Map map2 = (Map) map1.get(DATA_TAG);
|
||||
String modelName = (String) map2.get("modelName");
|
||||
String typeName = (String) map2.get("typeName");
|
||||
String groupName = (String) map2.get("groupName");
|
||||
String modelName = (String) map2.get("modelName");
|
||||
String deviceName = (String) map2.get("deviceName");
|
||||
OrderDetailsVo orderDetailsVo = new OrderDetailsVo();
|
||||
BeanUtils.copyProperties(orderDetails, orderDetailsVo);
|
||||
orderDetailsVo.setTypeName(typeName);
|
||||
orderDetailsVo.setEquipName(modelName+typeName);
|
||||
orderDetailsVo.setGroupName(groupName);
|
||||
orderDetailsVo.setDeviceName(modelName+deviceName);
|
||||
return success(orderDetailsVo);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue