Commit e89cb162 authored by tianyiming's avatar tianyiming

Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6_temp

# Conflicts: # amos-boot-system-equip/src/main/resources/mapper/EquipmentManageMapper.xml
parents 753c6a3c 9af94060
...@@ -244,13 +244,13 @@ public class EquipmentDetailController extends AbstractBaseController { ...@@ -244,13 +244,13 @@ public class EquipmentDetailController extends AbstractBaseController {
@RequestParam(required = false) Long stockDetailId) { @RequestParam(required = false) Long stockDetailId) {
EquipmentDate equipmentDate = new EquipmentDate(); EquipmentDate equipmentDate = new EquipmentDate();
EquipmentSpecific equipmentSpecific = equipmentSpecificSerivce.getBaseMapper().selectOne(new QueryWrapper<EquipmentSpecific>().eq("code",code)); EquipmentSpecific equipmentSpecific = equipmentSpecificSerivce.getBaseMapper().selectOne(new QueryWrapper<EquipmentSpecific>().eq("code",code));
FireFightingSystemEntity fightingSystemEntity = new FireFightingSystemEntity();
if(!ObjectUtils.isEmpty(equipmentSpecific.getSystemId())){ if(!ObjectUtils.isEmpty(equipmentSpecific.getSystemId())){
FireFightingSystemEntity fightingSystemEntity = fireFightingSystemService.getOneById(Long.valueOf(equipmentSpecific.getSystemId())); fightingSystemEntity = fireFightingSystemService.getOneById(Long.valueOf(equipmentSpecific.getSystemId()));
equipmentSpecific.setSystemId(fightingSystemEntity.getName()); equipmentSpecific.setSystemId(fightingSystemEntity.getName());
} else { } else {
equipmentSpecific.setSystemId(""); equipmentSpecific.setSystemId("");
} }
FireFightingSystemEntity fightingSystemEntity = fireFightingSystemService.getOneById(Long.valueOf(equipmentSpecific.getSystemId()));
equipmentSpecific.setSystemId(fightingSystemEntity.getName()); equipmentSpecific.setSystemId(fightingSystemEntity.getName());
equipmentSpecific.setFullqrCode("01#" + equipmentSpecific.getQrCode()); equipmentSpecific.setFullqrCode("01#" + equipmentSpecific.getQrCode());
EquipmentDetail equipmentDetail = iEquipmentDetailService.getOneById(equipmentSpecific.getEquipmentDetailId()); EquipmentDetail equipmentDetail = iEquipmentDetailService.getOneById(equipmentSpecific.getEquipmentDetailId());
......
...@@ -866,8 +866,10 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -866,8 +866,10 @@ public class FireFightingSystemController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取点位图,区域树数据", notes = "消防系统点位图使用") @ApiOperation(value = "获取点位图,区域树数据", notes = "消防系统点位图使用")
@GetMapping(value = "/point/tree") @GetMapping(value = "/point/tree")
public List<PointTreeVo> getPointTree(@RequestParam(required = false) String systemId, @RequestParam(required = false) String bizOrgCode) { public List<PointTreeVo> getPointTree(@RequestParam(required = false) String systemId,
return fireFightingSystemService.getPointTree(systemId, bizOrgCode); @RequestParam(required = false) String bizOrgCode,
@RequestParam(required = false) String type) {
return fireFightingSystemService.getPointTree(systemId, bizOrgCode,type);
} }
@RequestMapping(value = "/{systemCode}/system/detail", method = RequestMethod.GET) @RequestMapping(value = "/{systemCode}/system/detail", method = RequestMethod.GET)
...@@ -881,7 +883,7 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -881,7 +883,7 @@ public class FireFightingSystemController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "获取系统分类树", notes = "获取系统分类树") @ApiOperation(httpMethod = "GET", value = "获取系统分类树", notes = "获取系统分类树")
@GetMapping(value = "/systemAndEquipmentTreeByBziOrgCode") @GetMapping(value = "/systemAndEquipmentTreeByBziOrgCode")
public List<OrgMenuDto> systemAndEquipmentTreeByBziOrgCode(@RequestParam(required = false) String bizOrgCode) { public List<OrgMenuDto> systemAndEquipmentTreeByBziOrgCode() {
return fireFightingSystemService.systemAndEquipmentTreeByBziOrgCode(bizOrgCode); return fireFightingSystemService.systemAndEquipmentTreeByBziOrgCode(bizOrgCode);
} }
......
...@@ -87,7 +87,7 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE ...@@ -87,7 +87,7 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
* @param orgCode * @param orgCode
* @return * @return
*/ */
List<PointTreeVo> getPointTree(String systemId, String orgCode); List<PointTreeVo> getPointTree(String systemId, String orgCode,String type);
/** /**
......
...@@ -31,6 +31,7 @@ import com.yeejoin.equipmanage.common.utils.ChartsUtils; ...@@ -31,6 +31,7 @@ import com.yeejoin.equipmanage.common.utils.ChartsUtils;
import com.yeejoin.equipmanage.common.utils.StringUtil; import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.common.utils.WordTemplateUtils; import com.yeejoin.equipmanage.common.utils.WordTemplateUtils;
import com.yeejoin.equipmanage.common.vo.*; import com.yeejoin.equipmanage.common.vo.*;
import com.yeejoin.equipmanage.fegin.JcsFeign;
import com.yeejoin.equipmanage.mapper.*; import com.yeejoin.equipmanage.mapper.*;
import com.yeejoin.equipmanage.remote.RemoteSecurityService; import com.yeejoin.equipmanage.remote.RemoteSecurityService;
import com.yeejoin.equipmanage.service.*; import com.yeejoin.equipmanage.service.*;
...@@ -110,6 +111,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -110,6 +111,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
private Resource systemCode; private Resource systemCode;
@Autowired @Autowired
JcsFeign jcsFeignClient;
@Autowired
private IEqDynamicFormGroupService iEqDynamicFormGroupService; private IEqDynamicFormGroupService iEqDynamicFormGroupService;
@Autowired @Autowired
...@@ -401,7 +404,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -401,7 +404,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
} }
@Override @Override
public List<PointTreeVo> getPointTree(String id, String orgCode) { public List<PointTreeVo> getPointTree(String id, String orgCode, String type) {
// CommonResponse se = riskModelFeign.getRiskSourceList(orgCode); // CommonResponse se = riskModelFeign.getRiskSourceList(orgCode);
// List<Map<String, Object>> list = (List<Map<String, Object>>) se.getDataList(); // List<Map<String, Object>> list = (List<Map<String, Object>>) se.getDataList();
// List<PointTreeVo> responses = new ArrayList<>(); // List<PointTreeVo> responses = new ArrayList<>();
...@@ -416,6 +419,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -416,6 +419,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
// responses.add(p); // responses.add(p);
// }); // });
// List<PointTreeVo> regionList = responses.stream().filter(r -> "TRUE".equals(r.getIsRegion())).collect(Collectors.toList()); // List<PointTreeVo> regionList = responses.stream().filter(r -> "TRUE".equals(r.getIsRegion())).collect(Collectors.toList());
if("dl".equals(type)){
FeignClientResult<List<OrgUsrDto>> feignClientResult = jcsFeignClient.getCompanyDeptListWithAuth(authKey, "COMPANY", "dl");
orgCode = feignClientResult.getResult().get(0).getBizOrgCode();
}
List<PointTreeVo> buildList = buildingMapper.getBuildList(orgCode, null); List<PointTreeVo> buildList = buildingMapper.getBuildList(orgCode, null);
return transferListToPointTree(buildList, id, null); return transferListToPointTree(buildList, id, null);
} }
......
...@@ -32,14 +32,14 @@ ...@@ -32,14 +32,14 @@
left join wl_warehouse_structure wws on wws.id = sys.contro_box_build left join wl_warehouse_structure wws on wws.id = sys.contro_box_build
LEFT JOIN wl_equipment_category wec ON wec.id = sys.system_type LEFT JOIN wl_equipment_category wec ON wec.id = sys.system_type
where 1=1 where 1=1
<if test="equimentName != null and equimentName !='' and equimentCode !='null' "> <if test="equimentName != null and equimentName !='' and equimentName !='null' ">
AND sys.NAME like CONCAT('%',#{equimentName},'%') AND sys.NAME like CONCAT('%',#{equimentName},'%')
</if> </if>
<if test="equimentCode != null and equimentCode !='' and equimentCode !='null' "> <if test="equimentCode != null and equimentCode !='' and equimentCode !='null' ">
AND sys.CODE like CONCAT('%',#{equimentCode},'%') AND sys.CODE like CONCAT('%',#{equimentCode},'%')
</if> </if>
<if test="nameOrCode != null and nameOrCode != ''"> <if test="nameOrCode != null and nameOrCode != ''">
AND (sys.CODE like CONCAT('%',#{nameOrCode},'%') OR sys.NAME like CONCAT('%',#{nameOrCode},'%') OR wec.`name` like CONCAT('%',#{nameOrCode},'%') OR sys.system_type_code like CONCAT('%',#{nameOrCode},'%')) AND (sys.CODE like CONCAT('%',#{nameOrCode},'%') or sys.NAME like CONCAT('%',#{nameOrCode},'%') OR wec.`name` like CONCAT('%',#{nameOrCode},'%'))
</if> </if>
<if test="construction != 'all' "> <if test="construction != 'all' ">
AND sys.CONSTRUCTION_UNIT = #{construction} AND sys.CONSTRUCTION_UNIT = #{construction}
...@@ -61,11 +61,11 @@ ...@@ -61,11 +61,11 @@
count(1) count(1)
from from
f_fire_fighting_system f_fire_fighting_system
<where> <where>
<if test="equimentName != null and equimentName !='' and equimentName != 'null' "> <if test="equimentName != null and equimentName != '' and equimentName != 'null' ">
AND name like CONCAT('%',#{equimentName},'%') AND name like CONCAT('%',#{equimentName},'%')
</if> </if>
<if test="equimentCode != null and equimentCode !='' and equimentCode !='null' "> <if test="equimentCode != null and equimentCode != '' and equimentCode != 'null' ">
AND code like CONCAT('%',#{equimentCode},'%') AND code like CONCAT('%',#{equimentCode},'%')
</if> </if>
<if test="construction != 'all' "> <if test="construction != 'all' ">
......
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