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 {
@RequestParam(required = false) Long stockDetailId) {
EquipmentDate equipmentDate = new EquipmentDate();
EquipmentSpecific equipmentSpecific = equipmentSpecificSerivce.getBaseMapper().selectOne(new QueryWrapper<EquipmentSpecific>().eq("code",code));
FireFightingSystemEntity fightingSystemEntity = new FireFightingSystemEntity();
if(!ObjectUtils.isEmpty(equipmentSpecific.getSystemId())){
FireFightingSystemEntity fightingSystemEntity = fireFightingSystemService.getOneById(Long.valueOf(equipmentSpecific.getSystemId()));
fightingSystemEntity = fireFightingSystemService.getOneById(Long.valueOf(equipmentSpecific.getSystemId()));
equipmentSpecific.setSystemId(fightingSystemEntity.getName());
} else {
equipmentSpecific.setSystemId("");
}
FireFightingSystemEntity fightingSystemEntity = fireFightingSystemService.getOneById(Long.valueOf(equipmentSpecific.getSystemId()));
equipmentSpecific.setSystemId(fightingSystemEntity.getName());
equipmentSpecific.setFullqrCode("01#" + equipmentSpecific.getQrCode());
EquipmentDetail equipmentDetail = iEquipmentDetailService.getOneById(equipmentSpecific.getEquipmentDetailId());
......
......@@ -866,8 +866,10 @@ public class FireFightingSystemController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取点位图,区域树数据", notes = "消防系统点位图使用")
@GetMapping(value = "/point/tree")
public List<PointTreeVo> getPointTree(@RequestParam(required = false) String systemId, @RequestParam(required = false) String bizOrgCode) {
return fireFightingSystemService.getPointTree(systemId, bizOrgCode);
public List<PointTreeVo> getPointTree(@RequestParam(required = false) String systemId,
@RequestParam(required = false) String bizOrgCode,
@RequestParam(required = false) String type) {
return fireFightingSystemService.getPointTree(systemId, bizOrgCode,type);
}
@RequestMapping(value = "/{systemCode}/system/detail", method = RequestMethod.GET)
......@@ -881,7 +883,7 @@ public class FireFightingSystemController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "获取系统分类树", notes = "获取系统分类树")
@GetMapping(value = "/systemAndEquipmentTreeByBziOrgCode")
public List<OrgMenuDto> systemAndEquipmentTreeByBziOrgCode(@RequestParam(required = false) String bizOrgCode) {
public List<OrgMenuDto> systemAndEquipmentTreeByBziOrgCode() {
return fireFightingSystemService.systemAndEquipmentTreeByBziOrgCode(bizOrgCode);
}
......
......@@ -87,7 +87,7 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
* @param orgCode
* @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;
import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.common.utils.WordTemplateUtils;
import com.yeejoin.equipmanage.common.vo.*;
import com.yeejoin.equipmanage.fegin.JcsFeign;
import com.yeejoin.equipmanage.mapper.*;
import com.yeejoin.equipmanage.remote.RemoteSecurityService;
import com.yeejoin.equipmanage.service.*;
......@@ -110,6 +111,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
private Resource systemCode;
@Autowired
JcsFeign jcsFeignClient;
@Autowired
private IEqDynamicFormGroupService iEqDynamicFormGroupService;
@Autowired
......@@ -401,7 +404,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
@Override
public List<PointTreeVo> getPointTree(String id, String orgCode) {
public List<PointTreeVo> getPointTree(String id, String orgCode, String type) {
// CommonResponse se = riskModelFeign.getRiskSourceList(orgCode);
// List<Map<String, Object>> list = (List<Map<String, Object>>) se.getDataList();
// List<PointTreeVo> responses = new ArrayList<>();
......@@ -416,6 +419,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
// responses.add(p);
// });
// 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);
return transferListToPointTree(buildList, id, null);
}
......
......@@ -32,14 +32,14 @@
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
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},'%')
</if>
<if test="equimentCode != null and equimentCode !='' and equimentCode !='null' ">
AND sys.CODE like CONCAT('%',#{equimentCode},'%')
</if>
<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 test="construction != 'all' ">
AND sys.CONSTRUCTION_UNIT = #{construction}
......@@ -62,10 +62,10 @@
from
f_fire_fighting_system
<where>
<if test="equimentName != null and equimentName !='' and equimentName != 'null' ">
<if test="equimentName != null and equimentName != '' and equimentName != 'null' ">
AND name like CONCAT('%',#{equimentName},'%')
</if>
<if test="equimentCode != null and equimentCode !='' and equimentCode !='null' ">
<if test="equimentCode != null and equimentCode != '' and equimentCode != 'null' ">
AND code like CONCAT('%',#{equimentCode},'%')
</if>
<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