Commit 0f5c1606 authored by tangwei's avatar tangwei

车辆列表

parent dc25f31d
...@@ -369,6 +369,7 @@ public class EquipmentCategoryController extends AbstractBaseController { ...@@ -369,6 +369,7 @@ public class EquipmentCategoryController extends AbstractBaseController {
* *
* @return * @return
*/ */
@RequestMapping(value = "/cola/industry-tree", method = RequestMethod.GET) @RequestMapping(value = "/cola/industry-tree", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "根据行业过滤树形结构返回", notes = "根据行业过滤树形结构返回") @ApiOperation(httpMethod = "GET", value = "根据行业过滤树形结构返回", notes = "根据行业过滤树形结构返回")
...@@ -392,11 +393,40 @@ public class EquipmentCategoryController extends AbstractBaseController { ...@@ -392,11 +393,40 @@ public class EquipmentCategoryController extends AbstractBaseController {
return list; return list;
} }
@RequestMapping(value = "/cola/industry-tree/CarOrEqu", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "根据行业过滤树形结构返回", notes = "根据行业过滤树形结构返回")
public List<EquipmentCategory> industryTreeList(@RequestParam String code,@RequestParam String codedate) {
List<EquipmentCategory> list = new ArrayList<>();
if (!"".equals(code)) {
// 判断缓存中是否有该数据
String equipmentTreeListIndustryKey = equipmentTreeListIndustry + "-" + code+ "-" + codedate;
boolean treeListFlag = redisUtils.hasKey(equipmentTreeListIndustryKey);
if (!treeListFlag) {
if (redisUtils.get(equipmentTreeListIndustryKey) != null) {
list = JSONObject.parseArray(redisUtils.get(equipmentTreeListIndustryKey).toString(),
EquipmentCategory.class);
}
} else {
// 缓存中没有, 读取并写入缓存
list = getIndustryTreeListCarOrEqu(code,codedate);
redisUtils.set(equipmentTreeListIndustryKey, JSONObject.toJSONString(list), 0);
}
}
return list;
}
public List<EquipmentCategory> getIndustryTreeList(String code) { public List<EquipmentCategory> getIndustryTreeList(String code) {
List<EquipmentCategory> list = this.iEquipmentCategoryService.getIndustryTreeList(code); List<EquipmentCategory> list = this.iEquipmentCategoryService.getIndustryTreeList(code);
return list; return list;
} }
public List<EquipmentCategory> getIndustryTreeListCarOrEqu(String code,String codedate) {
List<EquipmentCategory> list = this.iEquipmentCategoryService.getColaEquipmentCategoryListCarOrEqu(code,codedate);
return list;
}
/** /**
* *
* 获取子节点 * 获取子节点
......
...@@ -259,6 +259,104 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -259,6 +259,104 @@ public class FireFightingSystemController extends AbstractBaseController {
} }
@PostMapping(value = "/getEquipTypeAmountCar")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "九大类下装备,通过code截取", notes = "九大类下装备信息列表")
public IPage<EquipTypeImgAmountVO> getEquipTypeAmountCar(@RequestBody EquipTypeAmountPageDTO equipTypeAmountPage) {
String[] result = hierarchy.split(",");
Map<Integer, Integer> map = new HashMap<>();
for (int i = 0; i < result.length; i++) {
map.put(i, Integer.valueOf(result[i]));
}
if (StringUtil.isNotEmpty(equipTypeAmountPage.getEquipmentClassificationCode())) {
QueryWrapper<EquipmentCategory> equipmentCategoryQueryWrapper = new QueryWrapper<>();
equipmentCategoryQueryWrapper.eq("code", equipTypeAmountPage.getEquipmentClassificationCode());
equipmentCategoryQueryWrapper.eq("industry_code", equipTypeAmountPage.getIndustryCode());
EquipmentCategory equipmentCategory = equipmentCategoryService.getOne(equipmentCategoryQueryWrapper);
if (equipmentCategory == null) {
throw new RuntimeException("装备定义code有误");
}
int inhierarchy = 1;
for (int i = 0; i < result.length + 1; i++) {
//进来先判断是否默认就是空,如果为空第一层
if (equipmentCategory.getParentId() == null) {
//判断是否是最下面的子节点
if (i >= 4) {
inhierarchy = 8;
} else {
inhierarchy = map.get(i);
}
break;
} else {
//查找到循环几次为空
equipmentCategory = equipmentCategoryService.getById(equipmentCategory.getParentId());
}
}
return fireFightingSystemService.getColaCategoryAmountCarList(inhierarchy, equipTypeAmountPage.getEquipmentClassificationCode().substring(0, inhierarchy), equipTypeAmountPage);
} else {
return fireFightingSystemService.getColaCategoryAmountCarList(0, null, equipTypeAmountPage);
}
}
@PostMapping(value = "/getEquipTypeAmountEqu")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "九大类下装备,通过code截取", notes = "九大类下装备信息列表")
public IPage<EquipTypeImgAmountVO> getEquipTypeAmountEqu(@RequestBody EquipTypeAmountPageDTO equipTypeAmountPage) {
String[] result = hierarchy.split(",");
Map<Integer, Integer> map = new HashMap<>();
for (int i = 0; i < result.length; i++) {
map.put(i, Integer.valueOf(result[i]));
}
if (StringUtil.isNotEmpty(equipTypeAmountPage.getEquipmentClassificationCode())) {
QueryWrapper<EquipmentCategory> equipmentCategoryQueryWrapper = new QueryWrapper<>();
equipmentCategoryQueryWrapper.eq("code", equipTypeAmountPage.getEquipmentClassificationCode());
equipmentCategoryQueryWrapper.eq("industry_code", equipTypeAmountPage.getIndustryCode());
EquipmentCategory equipmentCategory = equipmentCategoryService.getOne(equipmentCategoryQueryWrapper);
if (equipmentCategory == null) {
throw new RuntimeException("装备定义code有误");
}
int inhierarchy = 1;
for (int i = 0; i < result.length + 1; i++) {
//进来先判断是否默认就是空,如果为空第一层
if (equipmentCategory.getParentId() == null) {
//判断是否是最下面的子节点
if (i >= 4) {
inhierarchy = 8;
} else {
inhierarchy = map.get(i);
}
break;
} else {
//查找到循环几次为空
equipmentCategory = equipmentCategoryService.getById(equipmentCategory.getParentId());
}
}
return fireFightingSystemService.getColaCategoryAmountEquList(inhierarchy, equipTypeAmountPage.getEquipmentClassificationCode().substring(0, inhierarchy), equipTypeAmountPage);
} else {
return fireFightingSystemService.getColaCategoryAmountEquList(0, null, equipTypeAmountPage);
}
}
/** /**
* 添加系统 * 添加系统
* *
......
...@@ -73,4 +73,9 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> { ...@@ -73,4 +73,9 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
List<Long> getAllChildCategoryIdList(@Param(value = "categoryId") Long categoryId); List<Long> getAllChildCategoryIdList(@Param(value = "categoryId") Long categoryId);
List<EquipmentCategory> getColaEquipmentCategoryList(@Param(value = "head") Integer head, @Param(value = "industryCode") String industryCode); List<EquipmentCategory> getColaEquipmentCategoryList(@Param(value = "head") Integer head, @Param(value = "industryCode") String industryCode);
List<EquipmentCategory> getColaEquipmentCategoryListEqu(@Param(value = "head") Integer head, @Param(value = "industryCode") String industryCode);
List<EquipmentCategory> getColaEquipmentCategoryListCar(@Param(value = "head") Integer head, @Param(value = "industryCode") String industryCode);
} }
...@@ -111,6 +111,21 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -111,6 +111,21 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
@Param("codeHead")String codeHead, @Param("codeHead")String codeHead,
@Param("equipTypeAmountPage")EquipTypeAmountPageDTO equipTypeAmountPage); @Param("equipTypeAmountPage")EquipTypeAmountPageDTO equipTypeAmountPage);
IPage<EquipTypeImgAmountVO> getColaCategoryAmountCarList(@Param("page")IPage page,
@Param("hierarchy")int hierarchy,
@Param("codeHead")String codeHead,
@Param("equipTypeAmountPage")EquipTypeAmountPageDTO equipTypeAmountPage);
IPage<EquipTypeImgAmountVO> getColaCategoryAmountEquList(@Param("page")IPage page,
@Param("hierarchy")int hierarchy,
@Param("codeHead")String codeHead,
@Param("equipTypeAmountPage")EquipTypeAmountPageDTO equipTypeAmountPage);
List<FireFightingSystem> getFireFightingSystemDetail(@Param("fireFightingSystemVo")FireFightingSystemVo fireFightingSystemVo); List<FireFightingSystem> getFireFightingSystemDetail(@Param("fireFightingSystemVo")FireFightingSystemVo fireFightingSystemVo);
List<FireFightingSystemEntity> getFightingSysByCodes(@Param("ids") String[] idsArr); List<FireFightingSystemEntity> getFightingSysByCodes(@Param("ids") String[] idsArr);
......
...@@ -57,9 +57,14 @@ public interface IEquipmentCategoryService extends IService<EquipmentCategory> { ...@@ -57,9 +57,14 @@ public interface IEquipmentCategoryService extends IService<EquipmentCategory> {
List<EquipmentCategory> getColaEquipmentCategoryList(Integer head, String industryCode); List<EquipmentCategory> getColaEquipmentCategoryList(Integer head, String industryCode);
List<EquipmentCategory> getColaEquipmentCategoryListCarOrEqu(String code,Integer head, String industryCode);
List<IndustryVo> getTreeListAll(); List<IndustryVo> getTreeListAll();
List<EquipmentCategory> getIndustryTreeList(String code); List<EquipmentCategory> getIndustryTreeList(String code);
List<EquipmentCategory> getColaEquipmentCategoryListCarOrEqu(String code,String codedate);
List<EquipmentCategory> getEquipmentCategoryEquipmentList(); List<EquipmentCategory> getEquipmentCategoryEquipmentList();
......
...@@ -130,6 +130,12 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE ...@@ -130,6 +130,12 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
IPage<EquipTypeImgAmountVO> getColaCategoryAmountList(int hierarchy, String codeHead, EquipTypeAmountPageDTO equipTypeAmountPage); IPage<EquipTypeImgAmountVO> getColaCategoryAmountList(int hierarchy, String codeHead, EquipTypeAmountPageDTO equipTypeAmountPage);
IPage<EquipTypeImgAmountVO> getColaCategoryAmountCarList(int hierarchy, String codeHead, EquipTypeAmountPageDTO equipTypeAmountPage);
IPage<EquipTypeImgAmountVO> getColaCategoryAmountEquList(int hierarchy, String codeHead, EquipTypeAmountPageDTO equipTypeAmountPage);
/** /**
* 获取消防系统在装备分类的定义 * 获取消防系统在装备分类的定义
* *
......
...@@ -402,6 +402,16 @@ public class EquipmentCategoryServiceImpl extends ServiceImpl<EquipmentCategoryM ...@@ -402,6 +402,16 @@ public class EquipmentCategoryServiceImpl extends ServiceImpl<EquipmentCategoryM
return this.baseMapper.getColaEquipmentCategoryList(head, industryCode); return this.baseMapper.getColaEquipmentCategoryList(head, industryCode);
} }
@Override
public List<EquipmentCategory> getColaEquipmentCategoryListCarOrEqu(String code,Integer head, String industryCode){
if(code.equals("2")){
return this.baseMapper.getColaEquipmentCategoryListCar(head,industryCode);
}else{
return this.baseMapper.getColaEquipmentCategoryListEqu(head,industryCode);
}
}
/** /**
* 获取全量树数据 * 获取全量树数据
* @return * @return
...@@ -493,5 +503,29 @@ public class EquipmentCategoryServiceImpl extends ServiceImpl<EquipmentCategoryM ...@@ -493,5 +503,29 @@ public class EquipmentCategoryServiceImpl extends ServiceImpl<EquipmentCategoryM
getChildrenList(list, tmpMap); getChildrenList(list, tmpMap);
return list; return list;
} }
public List<EquipmentCategory> getColaEquipmentCategoryListCarOrEqu(String code,String codedate) {
List<EquipmentCategory> list = new ArrayList<>();
List<EquipmentCategory> equipmentCategories = getColaEquipmentCategoryListCarOrEqu(codedate,Integer.valueOf(equipmentCategoryLeftTypeCode), code);
Map<String, List<EquipmentCategory>> tmpMap = new HashMap<String, List<EquipmentCategory>>();
equipmentCategories.forEach(action -> {
if (action.getParentId() == null) {
list.add(action);
} else {
if (tmpMap.get(action.getParentId().toString()) == null) {
ArrayList<EquipmentCategory> tmplist = new ArrayList<EquipmentCategory>();
tmplist.add(action);
tmpMap.put(action.getParentId().toString(), tmplist);
} else {
if (!tmpMap.get(action.getParentId().toString()).contains(action)) {
tmpMap.get(action.getParentId().toString()).add(action);
}
}
}
});
getChildrenList(list, tmpMap);
return list;
}
} }
...@@ -678,6 +678,43 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -678,6 +678,43 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return list; return list;
} }
@Override
public IPage<EquipTypeImgAmountVO> getColaCategoryAmountCarList(int hierarchy, String codeHead, EquipTypeAmountPageDTO equipTypeAmountPage) {
String type = equipTypeAmountPage.getType();
if (!"".equals(type) && "car".equals(type)) {
equipTypeAmountPage.setSystemId(null);
equipTypeAmountPage.setStatus(null);
}
IPage<EquipTypeImgAmountVO> list = fireFightingSystemMapper.getColaCategoryAmountCarList(equipTypeAmountPage.getPage(), hierarchy, codeHead, equipTypeAmountPage);
list.getRecords().forEach(x -> {
if (!x.getEqtype().startsWith("4") && StringUtil.isNotEmpty(x.getAmount())) {
x.setAmount(x.getAmount().split("\\.")[0]);
}
});
return list;
}
@Override
public IPage<EquipTypeImgAmountVO> getColaCategoryAmountEquList(int hierarchy, String codeHead, EquipTypeAmountPageDTO equipTypeAmountPage) {
String type = equipTypeAmountPage.getType();
if (!"".equals(type) && "car".equals(type)) {
equipTypeAmountPage.setSystemId(null);
equipTypeAmountPage.setStatus(null);
}
IPage<EquipTypeImgAmountVO> list = fireFightingSystemMapper.getColaCategoryAmountEquList(equipTypeAmountPage.getPage(), hierarchy, codeHead, equipTypeAmountPage);
list.getRecords().forEach(x -> {
if (!x.getEqtype().startsWith("4") && StringUtil.isNotEmpty(x.getAmount())) {
x.setAmount(x.getAmount().split("\\.")[0]);
}
});
return list;
}
@Override @Override
public List<EquipmentManageVo> getSystemCategory() { public List<EquipmentManageVo> getSystemCategory() {
return equipmentManageMapper.getSystemList(); return equipmentManageMapper.getSystemList();
......
...@@ -387,4 +387,57 @@ ...@@ -387,4 +387,57 @@
AND wl_equipment_category.industry_code = #{industryCode} AND wl_equipment_category.industry_code = #{industryCode}
</if> </if>
</select> </select>
<select id="getColaEquipmentCategoryListEqu" resultMap="Category">
SELECT
id,
parent_id,
CODE,
NAME,
is_consumptive,
description,
remark,
create_date,
CASE
LEFT ( CODE, 1 )
WHEN #{head} THEN 'car'
ELSE 'equipment'
end
AS type,
industry_code
FROM
wl_equipment_category
WHERE LEFT ( CODE, 1 ) != '2'
<if test="industryCode!=null and industryCode!=''">
AND wl_equipment_category.industry_code = #{industryCode}
</if>
</select>
<select id="getColaEquipmentCategoryListCar" resultMap="Category">
SELECT
id,
parent_id,
CODE,
NAME,
is_consumptive,
description,
remark,
create_date,
CASE
LEFT ( CODE, 1 )
WHEN #{head} THEN 'car'
ELSE 'equipment'
end
AS type,
industry_code
FROM
wl_equipment_category
WHERE LEFT ( CODE, 1 ) = '2'
<if test="industryCode!=null and industryCode!=''">
AND wl_equipment_category.industry_code = #{industryCode}
</if>
</select>
</mapper> </mapper>
...@@ -724,7 +724,7 @@ ...@@ -724,7 +724,7 @@
<if test="equipTypeAmountPage.iotCode!=null and equipTypeAmountPage.iotCode!=''"> <if test="equipTypeAmountPage.iotCode!=null and equipTypeAmountPage.iotCode!=''">
AND wlc.iot_code LIKE CONCAT('%',#{equipTypeAmountPage.iotCode},'%') AND wlc.iot_code LIKE CONCAT('%',#{equipTypeAmountPage.iotCode},'%')
</if> </if>
)s2 )s2
<if test="equipTypeAmountPage.warehouseStructureName!=null and equipTypeAmountPage.warehouseStructureName!=''"> <if test="equipTypeAmountPage.warehouseStructureName!=null and equipTypeAmountPage.warehouseStructureName!=''">
where s2.full_name LIKE CONCAT('%',#{equipTypeAmountPage.warehouseStructureName},'%') where s2.full_name LIKE CONCAT('%',#{equipTypeAmountPage.warehouseStructureName},'%')
</if> </if>
...@@ -735,6 +735,13 @@ ...@@ -735,6 +735,13 @@
</if> </if>
order by createDate DESC order by createDate DESC
</select> </select>
<select id="getFireFightingSystemDetail" <select id="getFireFightingSystemDetail"
resultType="com.yeejoin.equipmanage.common.datasync.entity.FireFightingSystem"> resultType="com.yeejoin.equipmanage.common.datasync.entity.FireFightingSystem">
SELECT SELECT
...@@ -1646,4 +1653,208 @@ FROM ...@@ -1646,4 +1653,208 @@ FROM
)d )d
</select> </select>
<select id="getColaCategoryAmountCarList" resultMap="CategoryAmountList">
select * from ( SELECT
wlc.id,
wlc.qr_code,
CONCAT('03#',wlc.qr_code) fullqrCode,
wlc.standard,
wle.img,
wlc.`NAME` equipmentName,
NULL AS full_name,
wlun.NAME unitName,
NULL AS systemName,
1 AS amount,
'' as stockDetailId,
'car' as type,
wlai.`name` manufacturerName,
wlc.car_num as code,
wlc.iot_code as iotCode,
CASE
wlc.car_state
WHEN '1' THEN
'在位'
WHEN '2' THEN
'执勤'
WHEN '3' THEN
'维修'
WHEN '6' THEN
'退役'
WHEN '7' THEN
'报废' ELSE '未入库'
END AS STATUS,
wlc.create_date as createDate,
'2' as eqtype,
wlc.biz_org_code as bizOrgCode,
wlc.biz_org_name as bizOrgName
FROM
wl_car wlc
LEFT JOIN wl_equipment wle ON wle.id = wlc.equipment_id
LEFT JOIN wl_unit wlun ON wle.unit_id = wlun.id
LEFT JOIN wl_manufacturer_info wlai ON wlc.manufacturer_id = wlai.id
LEFT JOIN wl_equipment_category wec ON wle.category_id = wec.id
WHERE 1=1
<if test="codeHead!=null and codeHead!='' and codeHead!=' '">
and LEFT (wec.CODE, #{hierarchy}) = #{codeHead}
</if>
<if test="equipTypeAmountPage.industryCode!=null">
and wec.industry_code = #{equipTypeAmountPage.industryCode}
</if>
<if test="equipTypeAmountPage.equipmentName!=null and equipTypeAmountPage.equipmentName!=''">
And wlc.`NAME` LIKE CONCAT('%',#{equipTypeAmountPage.equipmentName},'%')
</if>
<if test="equipTypeAmountPage.manufacturerId!=null">
and wlc.manufacturer_id = #{equipTypeAmountPage.manufacturerId}
</if>
<if test="equipTypeAmountPage.isImport!=null">
and wlc.is_import = #{equipTypeAmountPage.isImport}
</if>
<if test="equipTypeAmountPage.code!=null and equipTypeAmountPage.code!=''">
AND wlc.car_num LIKE CONCAT('%',#{equipTypeAmountPage.code},'%')
</if>
<if test="equipTypeAmountPage.iotCode!=null and equipTypeAmountPage.iotCode!=''">
AND wlc.iot_code LIKE CONCAT('%',#{equipTypeAmountPage.iotCode},'%')
</if>
)s2
<if test="equipTypeAmountPage.warehouseStructureName!=null and equipTypeAmountPage.warehouseStructureName!=''">
where s2.full_name LIKE CONCAT('%',#{equipTypeAmountPage.warehouseStructureName},'%')
</if>
<if test="equipTypeAmountPage.bizOrgCode!=null and equipTypeAmountPage.bizOrgCode!=''">
where s2.bizOrgCode LIKE CONCAT(#{equipTypeAmountPage.bizOrgCode},'%')
</if>
order by createDate DESC
</select>
<select id="getColaCategoryAmountEquList" resultMap="CategoryAmountList">
select * from (
SELECT
wles.id,
wles.qr_code,
CONCAT('01#',wles.qr_code) fullqrCode,
wled.standard,
wle.img,
wled.NAME equipmentName,
concat_ws('-',wlws.full_name,wled.area) as full_name,
wlun.NAME unitName,
(SELECT GROUP_CONCAT(fem.name) FROM `f_fire_fighting_system` fem WHERE find_in_set(fem.id,wles.system_id))
as systemName,
wlsd.amount,
wlsd.id as stockDetailId,
'equipment' as type,
wlai.`name` manufacturerName,
wles.code,
wles.iot_code as iotCode,
case wlsd.`status`
when '1' then '在位'
when '2' then '执勤'
when '3' then '维修'
when '6' then '退役'
when '7' then '报废'
when '10' then '车载'
when '11' then '损耗'
when '12' then '配装'
else '未入库' END as status,
wles.create_date as createDate,
wled.code as eqtype,
wles.biz_org_code as bizOrgCode,
wles.biz_org_name as bizOrgName
FROM
(select id,qr_code,code ,iot_code ,biz_org_code ,biz_org_name,create_date ,equipment_detail_id ,system_id from wl_equipment_specific) wles
LEFT JOIN (select id,amount,status,equipment_specific_id,warehouse_structure_id from wl_stock_detail ) wlsd on wlsd.equipment_specific_id = wles.id
LEFT JOIN wl_warehouse_structure wlws on wlsd.warehouse_structure_id = wlws.id
LEFT JOIN (select id,standard ,name ,area ,code, equipment_id ,manufacturer_id,is_import from wl_equipment_detail) wled on wles.equipment_detail_id = wled.id
LEFT JOIN wl_equipment wle ON wle.id = wled.equipment_id
LEFT JOIN wl_unit wlun ON wle.unit_id = wlun.id
LEFT JOIN wl_manufacturer_info wlai on wled.manufacturer_id=wlai.id
LEFT JOIN wl_equipment_category wec ON wle.category_id = wec.id
WHERE 1=1
<if test="codeHead!=null and codeHead!='' and codeHead!=' '">
and LEFT (wle.CODE, #{hierarchy}) = #{codeHead}
</if>
<if test="equipTypeAmountPage.industryCode!=null">
and wec.industry_code = #{equipTypeAmountPage.industryCode}
</if>
<if test="equipTypeAmountPage.systemId!=null">
and wles.system_id = #{equipTypeAmountPage.systemId}
</if>
<if test="equipTypeAmountPage.manufacturerId!=null">
and wled.manufacturer_id = #{equipTypeAmountPage.manufacturerId}
</if>
<if test="equipTypeAmountPage.isImport!=null">
and wled.is_import = #{equipTypeAmountPage.isImport}
</if>
<if test="equipTypeAmountPage.warehouseStructureId!=null">
and wlsd.warehouse_structure_id in (
select id from wl_warehouse_structure where parent_id in(
select id from wl_warehouse_structure where parent_id = #{equipTypeAmountPage.warehouseStructureId})
union
select id from wl_warehouse_structure where parent_id = #{equipTypeAmountPage.warehouseStructureId} or
id = #{equipTypeAmountPage.warehouseStructureId}
)
</if>
<if test="equipTypeAmountPage.status == 1">
and wlsd.warehouse_structure_id is null
</if>
<if test="equipTypeAmountPage.status == 0">
and wlsd.warehouse_structure_id is not null
</if>
<if test="equipTypeAmountPage.equipmentName!=null and equipTypeAmountPage.equipmentName!=''">
AND wled.name LIKE CONCAT('%',#{equipTypeAmountPage.equipmentName},'%')
</if>
<if test="equipTypeAmountPage.code!=null and equipTypeAmountPage.code!=''">
AND wles.code LIKE CONCAT('%',#{equipTypeAmountPage.code},'%')
</if>
<if test="equipTypeAmountPage.iotCode!=null and equipTypeAmountPage.iotCode!=''">
AND wles.iot_code LIKE CONCAT('%',#{equipTypeAmountPage.iotCode},'%')
</if>
)s1
<if test="equipTypeAmountPage.warehouseStructureName!=null and equipTypeAmountPage.warehouseStructureName!=''">
where s1.full_name LIKE CONCAT('%',#{equipTypeAmountPage.warehouseStructureName},'%')
</if>
<if test="equipTypeAmountPage.bizOrgCode!=null and equipTypeAmountPage.bizOrgCode!=''">
where s1.bizOrgCode LIKE CONCAT(#{equipTypeAmountPage.bizOrgCode},'%')
</if>
order by createDate DESC
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment