Commit 9012a04f authored by litengwei's avatar litengwei

Merge remote-tracking branch 'origin/develop_dl_3.7.0.9' into develop_dl_3.7.0.9

parents 1f0366bc 5a076e8b
...@@ -22,7 +22,6 @@ import lombok.EqualsAndHashCode; ...@@ -22,7 +22,6 @@ import lombok.EqualsAndHashCode;
@ApiModel(value="OrgUsr对象", description="人员信息") @ApiModel(value="OrgUsr对象", description="人员信息")
public class OrgPersonDto extends BaseDto { public class OrgPersonDto extends BaseDto {
/** /**
* *
*/ */
...@@ -82,4 +81,6 @@ public class OrgPersonDto extends BaseDto { ...@@ -82,4 +81,6 @@ public class OrgPersonDto extends BaseDto {
@ApiModelProperty(value = "动态表单值") @ApiModelProperty(value = "动态表单值")
private List<DynamicFormInstance> dynamicFormValue; private List<DynamicFormInstance> dynamicFormValue;
private String personImg;
} }
...@@ -99,4 +99,6 @@ public class OrgUsrDto extends BaseDto { ...@@ -99,4 +99,6 @@ public class OrgUsrDto extends BaseDto {
@ApiModelProperty(value = "消防信息实体") @ApiModelProperty(value = "消防信息实体")
private CompanyInfo companyInfo; private CompanyInfo companyInfo;
private String personImg;
} }
...@@ -90,4 +90,7 @@ public class OrgUsr extends BaseEntity { ...@@ -90,4 +90,7 @@ public class OrgUsr extends BaseEntity {
@ApiModelProperty(value = "管理类别") @ApiModelProperty(value = "管理类别")
@TableField(exist = false) @TableField(exist = false)
private String managementType; private String managementType;
@ApiModelProperty(value = "人员照片")
private String personImg;
} }
...@@ -15,7 +15,9 @@ import java.util.Map; ...@@ -15,7 +15,9 @@ import java.util.Map;
public interface OrganizationMapper extends BaseMapper<Organization> { public interface OrganizationMapper extends BaseMapper<Organization> {
Page<Map<String, Object>> getOrganizationInfo(Page<Map<String, Object>> page, @Param("bizOrgCode") String bizOrgCode); List<Map<String, Object>> getOrganizationInfo(@Param("bizOrgCode") String bizOrgCode);
Map<String, Object> getTeamLeader();
Page<Map<String, Object>> getOrganizationList(Page<Map<String, Object>> page, @Param("bizOrgCode") String bizOrgCode); Page<Map<String, Object>> getOrganizationList(Page<Map<String, Object>> page, @Param("bizOrgCode") String bizOrgCode);
......
...@@ -5,13 +5,22 @@ ...@@ -5,13 +5,22 @@
<select id="getOrganizationInfo" resultType="java.util.Map"> <select id="getOrganizationInfo" resultType="java.util.Map">
SELECT
( SELECT COUNT( 1 ) FROM cb_organization_user cou WHERE cou.emergency_team_id = co.sequence_nbr ) AS
value,
co.emergency_team_name AS name
FROM
cb_organization co
WHERE co.is_delete = 0
ORDER BY
co.sort desc
LIMIT 5
</select>
<select id="getTeamLeader" resultType="Map">
SELECT SELECT
( (
SELECT SELECT
Ifnull (GROUP_CONCAT( cou.biz_org_name ),'') AS Ifnull (GROUP_CONCAT( cou.biz_org_name ),'') AS value
value
FROM FROM
( (
SELECT SELECT
...@@ -32,25 +41,34 @@ ...@@ -32,25 +41,34 @@
) )
AND cdfi.field_code = 'userId' AND cdfi.field_code = 'userId'
) temp ) temp
LEFT JOIN cb_org_usr cou ON cou.sequence_nbr = temp.userId LEFT JOIN cb_org_usr cou ON cou.sequence_nbr = temp.userId WHERE cou.is_delete = 0
WHERE cou.is_delete = 0 ) AS value,
) AS (
value
,
'当值值长' AS name UNION
(
SELECT SELECT
( SELECT COUNT( 1 ) FROM cb_organization_user cou WHERE cou.emergency_team_id = co.sequence_nbr ) AS Ifnull(GROUP_CONCAT( dfi.field_value ),'') AS tel
value
,
co.emergency_team_name AS name
FROM FROM
cb_organization co (
WHERE co.is_delete = 0 SELECT
ORDER BY cdfi.field_value AS userId
co.sort desc FROM
LIMIT 5 cb_dynamic_form_instance cdfi
WHERE
cdfi.instance_id IN (
SELECT
cdps.instance_id
FROM
cb_duty_person_shift cdps
LEFT JOIN cb_dynamic_form_instance cdfi ON cdps.instance_id = cdfi.instance_id
WHERE
cdfi.field_code = 'postType'
AND field_value = '1676'
AND cdps.duty_date = ( SELECT DATE_FORMAT(NOW(),"%Y-%m-%d"))
) )
AND cdfi.field_code = 'userId'
) temp
LEFT JOIN cb_dynamic_form_instance dfi ON dfi.instance_id = temp.userId WHERE dfi.field_code = 'telephone'
) AS tel,
'当值值长' AS name
</select> </select>
<select id="getOrganizationList" resultType="java.util.Map"> <select id="getOrganizationList" resultType="java.util.Map">
SELECT SELECT
......
...@@ -778,9 +778,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -778,9 +778,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
public String getPersonImg(String id) { public String getPersonImg(String id) {
Long userId = Long.valueOf(id); Long userId = Long.valueOf(id);
OrgUsr orgUsr = this.baseMapper.queryByUserId(userId); OrgUsr orgUsr = this.baseMapper.queryByUserId(userId);
List<DynamicFormInstanceDto> list = alertFormValueServiceImpl.listBySeqnum(orgUsr.getSequenceNbr()); return orgUsr.getPersonImg();
String str = list.get(0).getFieldValue();
return str;
} }
public List<FormValue> getFormValueDetail(Long id) throws Exception { public List<FormValue> getFormValueDetail(Long id) throws Exception {
...@@ -2964,6 +2962,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -2964,6 +2962,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
orgUsr.setBizOrgName(peopleBasicInfoDto.getName()); orgUsr.setBizOrgName(peopleBasicInfoDto.getName());
orgUsr.setParentId(peopleBasicInfoDto.getCompany()); orgUsr.setParentId(peopleBasicInfoDto.getCompany());
orgUsr.setParentName(peopleBasicInfoDto.getBizOrgName()); orgUsr.setParentName(peopleBasicInfoDto.getBizOrgName());
orgUsr.setPersonImg(peopleBasicInfoDto.getPersonImg());
orgUsr.setIsDelete(false); orgUsr.setIsDelete(false);
return orgUsr; return orgUsr;
} }
......
...@@ -232,4 +232,6 @@ public interface EquipmentSpecificAlarmMapper extends BaseMapper<EquipmentSpecif ...@@ -232,4 +232,6 @@ public interface EquipmentSpecificAlarmMapper extends BaseMapper<EquipmentSpecif
List<Map<String, Object>> stationInfo(); List<Map<String, Object>> stationInfo();
void updateStatusByAlarm(); void updateStatusByAlarm();
void clearAlarmData(@Param("equipmentSpecificId") Long equipmentSpecificId);
} }
...@@ -2,6 +2,9 @@ package com.yeejoin.equipmanage.mapper; ...@@ -2,6 +2,9 @@ package com.yeejoin.equipmanage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.equipmanage.common.entity.ManufacturerInfo; import com.yeejoin.equipmanage.common.entity.ManufacturerInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* Mapper 接口 * Mapper 接口
...@@ -14,7 +17,6 @@ public interface ManufacturerInfoMapper extends BaseMapper<ManufacturerInfo> { ...@@ -14,7 +17,6 @@ public interface ManufacturerInfoMapper extends BaseMapper<ManufacturerInfo> {
int checkName(String name, Long id); int checkName(String name, Long id);
String checkDelete(Long id); List<String> checkDelete(@Param("ids") List<Long> ids);
} }
...@@ -383,14 +383,8 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment ...@@ -383,14 +383,8 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
@Override @Override
public String checkDelete(List<Long> ids) { public String checkDelete(List<Long> ids) {
String res = ""; List<String> s = manufacturerInfoMapper.checkDelete(ids);
for (Long id : ids) { return String.join(",", s);
String s = manufacturerInfoMapper.checkDelete(id);
if (s != null && !("").equals(s)) {
res = res + s + " , ";
}
}
return res;
} }
@Override @Override
......
...@@ -1004,6 +1004,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1004,6 +1004,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentDetailService.removeById(equipmentSpecific.getEquipmentDetailId()); equipmentDetailService.removeById(equipmentSpecific.getEquipmentDetailId());
} }
if (res > 0) { if (res > 0) {
equipmentSpecificAlarmMapper.clearAlarmData(id);
// 删除设备动态表单扩展属性 // 删除设备动态表单扩展属性
return formInstanceEquipService.deleteInstanceById(id); return formInstanceEquipService.deleteInstanceById(id);
} else { } else {
......
...@@ -357,22 +357,22 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -357,22 +357,22 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
JSONObject jsonObject = JSONObject.parseObject(message); JSONObject jsonObject = JSONObject.parseObject(message);
String dataType = jsonObject.getString("datatype"); String dataType = jsonObject.getString("datatype");
String indexAddress,value,timeStamp,quality = null; String indexAddress, value, timeStamp, quality = null;
//如果消息是遥信类型,进行指标转换 //如果消息是遥信类型,进行指标转换
if(dataType != null && dataType.equals("state")){ if (dataType != null && dataType.equals("state")) {
indexAddress = jsonObject.getString("scadaid"); indexAddress = jsonObject.getString("scadaid");
value = jsonObject.getInteger("value") ==1 ? "true":"false"; value = jsonObject.getInteger("value") == 1 ? "true" : "false";
timeStamp = jsonObject.getString("timestamp"); timeStamp = jsonObject.getString("timestamp");
}else{ } else {
indexAddress = jsonObject.getString("key"); indexAddress = jsonObject.getString("key");
value = jsonObject.getString("value"); value = jsonObject.getString("value");
timeStamp = jsonObject.getString("time_stamp"); timeStamp = jsonObject.getString("time_stamp");
quality = jsonObject.getString("quality"); quality = jsonObject.getString("quality");
} }
EquipmentSpecificIndex equipmentSpeIndex = equipmentSpecificIndexService.getEquipmentSpeIndexByIndexAddress(indexAddress,null); EquipmentSpecificIndex equipmentSpeIndex = equipmentSpecificIndexService.getEquipmentSpeIndexByIndexAddress(indexAddress, null);
if (equipmentSpeIndex == null){ if (equipmentSpeIndex == null) {
return; return;
} }
equipmentSpeIndex.setValue(value); equipmentSpeIndex.setValue(value);
...@@ -625,11 +625,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -625,11 +625,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
String traceId = jsonObject.getString("traceId"); String traceId = jsonObject.getString("traceId");
String deviceCode = jsonObject.getString("deviceCode"); String deviceCode = jsonObject.getString("deviceCode");
String gatewayId = jsonObject.getString("gatewayId"); String gatewayId = jsonObject.getString("gatewayId");
String value=jsonObject.getString("value"); String value = jsonObject.getString("value");
EquipmentSpecificIndex equipmentSpeIndex = equipmentSpecificIndexService.getEquipmentSpeIndexByIndexAddress(indexAddress,gatewayId); EquipmentSpecificIndex equipmentSpeIndex = equipmentSpecificIndexService.getEquipmentSpeIndexByIndexAddress(indexAddress, gatewayId);
if (equipmentSpeIndex == null){ if (equipmentSpeIndex == null) {
return; return;
} }
...@@ -644,7 +644,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -644,7 +644,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
//更新装备性能指标 //更新装备性能指标
//equipmentSpecificIndexService.updateById(equipmentSpeIndex); //equipmentSpecificIndexService.updateById(equipmentSpeIndex);
tagsMap.put("key", indexAddress+"_"+gatewayId); tagsMap.put("key", indexAddress + "_" + gatewayId);
fieldsMap.put("traceId", traceId); fieldsMap.put("traceId", traceId);
fieldsMap.put("address", indexAddress); fieldsMap.put("address", indexAddress);
...@@ -655,10 +655,12 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -655,10 +655,12 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
fieldsMap.put("equipmentIndexName", equipmentSpeIndex.getEquipmentIndexName()); fieldsMap.put("equipmentIndexName", equipmentSpeIndex.getEquipmentIndexName());
fieldsMap.put("equipmentIndexKey", equipmentSpeIndex.getEquipmentIndexKey()); fieldsMap.put("equipmentIndexKey", equipmentSpeIndex.getEquipmentIndexKey());
fieldsMap.put("isAlarm", equipmentSpeIndex.getIsAlarm().toString()); fieldsMap.put("isAlarm", equipmentSpeIndex.getIsAlarm().toString());
fieldsMap.put("unit", equipmentSpeIndex.getUnit());
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
fieldsMap.put("createdTime", simpleDateFormat.format(new Date())); fieldsMap.put("createdTime", simpleDateFormat.format(new Date()));
fieldsMap.put("equipmentIndex", JSON.toJSONString(equipmentSpeIndex)); fieldsMap.put("equipmentIndex", JSON.toJSONString(equipmentSpeIndex));
//保存influxDB库
influxDbConnection.insert("iot_data", tagsMap, fieldsMap); influxDbConnection.insert("iot_data", tagsMap, fieldsMap);
QueryWrapper<EquipmentSpecific> queryWrapper = new QueryWrapper<>(); QueryWrapper<EquipmentSpecific> queryWrapper = new QueryWrapper<>();
...@@ -697,7 +699,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -697,7 +699,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() { TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override @Override
public void afterCommit() { public void afterCommit() {
// 直流中心消息推送刷新 // 直流中心消息推送刷新
publishDataToDCCenterPage(equipmentSpecificIndexList); publishDataToDCCenterPage(equipmentSpecificIndexList);
...@@ -772,12 +774,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -772,12 +774,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
iotDataListToCacheMap(iotDatalist); iotDataListToCacheMap(iotDatalist);
iotDatalist.forEach(iotDataVO -> { iotDatalist.forEach(iotDataVO -> {
boolean alarmFlag = false; boolean alarmFlag = false;
String indexKey = iotDataVO.getKey();
String indexValue = iotDataVO.getValue().toString();
// 稳压泵启停信号处理
if (indexKey.equals(pressurePumpStart)) {
pressurePump(indexKey, indexValue, iotDatalist, topicEntity);
}
for (EquipmentSpecificIndex equipmentSpecificIndex : indexList) { for (EquipmentSpecificIndex equipmentSpecificIndex : indexList) {
if (!ObjectUtils.isEmpty(equipmentSpecificIndex.getNameKey()) if (!ObjectUtils.isEmpty(equipmentSpecificIndex.getNameKey())
&& equipmentSpecificIndex.getNameKey().toLowerCase().equals(iotDataVO.getKey().toLowerCase())) { && equipmentSpecificIndex.getNameKey().toLowerCase().equals(iotDataVO.getKey().toLowerCase())) {
...@@ -897,6 +894,15 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -897,6 +894,15 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() { TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override @Override
public void afterCommit() { public void afterCommit() {
iotDatalist.forEach(iotDataVO -> {
String indexKey = iotDataVO.getKey();
String indexValue = iotDataVO.getValue().toString();
// 稳压泵启停信号处理
if (indexKey.equals(pressurePumpStart)) {
pressurePump(indexKey, indexValue, iotDatalist, topicEntity);
}
});
equipmentSpecificAlarms.forEach(action -> { equipmentSpecificAlarms.forEach(action -> {
if (AlarmStatusEnum.BJ.getCode() == action.getStatus()) { if (AlarmStatusEnum.BJ.getCode() == action.getStatus()) {
alarmLogs.add(addEquipAlarmLogRecord(action)); alarmLogs.add(addEquipAlarmLogRecord(action));
......
...@@ -5,6 +5,7 @@ import java.util.*; ...@@ -5,6 +5,7 @@ import java.util.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.common.api.entity.*;
import com.yeejoin.amos.boot.module.common.api.enums.ExceptionEnum; import com.yeejoin.amos.boot.module.common.api.enums.ExceptionEnum;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -50,14 +51,6 @@ import com.yeejoin.amos.boot.module.common.api.dto.FirefightersZhDto; ...@@ -50,14 +51,6 @@ import com.yeejoin.amos.boot.module.common.api.dto.FirefightersZhDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto; import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.dto.PeopleBasicInfoDto; import com.yeejoin.amos.boot.module.common.api.dto.PeopleBasicInfoDto;
import com.yeejoin.amos.boot.module.common.api.dto.PeopleInfoDto; import com.yeejoin.amos.boot.module.common.api.dto.PeopleInfoDto;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import com.yeejoin.amos.boot.module.common.api.entity.Firefighters;
import com.yeejoin.amos.boot.module.common.api.entity.FirefightersContacts;
import com.yeejoin.amos.boot.module.common.api.entity.FirefightersContract;
import com.yeejoin.amos.boot.module.common.api.entity.FirefightersEducation;
import com.yeejoin.amos.boot.module.common.api.entity.FirefightersJacket;
import com.yeejoin.amos.boot.module.common.api.entity.FirefightersPost;
import com.yeejoin.amos.boot.module.common.api.entity.FirefightersThought;
import com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum; import com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FireTeamServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.FireTeamServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersContactsServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersContactsServiceImpl;
......
...@@ -38,12 +38,25 @@ public class OrganizationImpl extends BaseService<Organization, Organization, Or ...@@ -38,12 +38,25 @@ public class OrganizationImpl extends BaseService<Organization, Organization, Or
@Override @Override
public Page<Map<String, Object>> getOrganizationInfo(Page<Map<String, Object>> page, String bizOrgCode) { public Page<Map<String, Object>> getOrganizationInfo(Page<Map<String, Object>> page, String bizOrgCode) {
Page<Map<String, Object>> page1 = new Page<>(); Page<Map<String, Object>> page1 = new Page<>();
List<Map<String, Object>> list = organizationMapper.getOrganizationInfo(page, bizOrgCode).getRecords(); List<Map<String, Object>> list = organizationMapper.getOrganizationInfo(bizOrgCode);
LambdaQueryWrapper<Organization> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<Organization> wrapper = new LambdaQueryWrapper<>();
wrapper.orderByDesc(Organization::getSort); wrapper.orderByDesc(Organization::getSort);
List<Organization> organizations = this.baseMapper.selectList(wrapper); List<Organization> organizations = this.baseMapper.selectList(wrapper);
List<Map<String, Object>> res = new ArrayList<>(); List<Map<String, Object>> res = new ArrayList<>();
if (0 < list.size()) { if (0 < list.size()) {
// 获取值长
Map<String, Object> resMap = this.baseMapper.getTeamLeader();
Map<String, Object> leaderMap = new HashMap<>();
if (ObjectUtils.isEmpty(resMap.get("value"))) {
leaderMap.put("name", resMap.get("name") + "");
leaderMap.put("value", "");
} else {
// 跟现场确认此处值长只有一人,所以只做一人处理
leaderMap.put("name", resMap.get("name") + " " + "1人");
leaderMap.put("value", resMap.get("value") + "-" + resMap.get("tel"));
}
res.add(leaderMap);
for (Map<String, Object> map : list) { for (Map<String, Object> map : list) {
Map<String, Object> tempMap = new HashMap<>(); Map<String, Object> tempMap = new HashMap<>();
if (ObjectUtils.isEmpty(map.get("value"))) { if (ObjectUtils.isEmpty(map.get("value"))) {
...@@ -51,19 +64,22 @@ public class OrganizationImpl extends BaseService<Organization, Organization, Or ...@@ -51,19 +64,22 @@ public class OrganizationImpl extends BaseService<Organization, Organization, Or
tempMap.put("value", ""); tempMap.put("value", "");
} else { } else {
tempMap.put("name", map.get("name") + " " + map.get("value") + "人"); tempMap.put("name", map.get("name") + " " + map.get("value") + "人");
Organization organization = organizations.stream().filter(x -> x.getEmergencyTeamName().equals(map.get("name"))).collect(Collectors.toList()).get(0); List<Organization> organizationList = organizations.stream().filter(x -> x.getEmergencyTeamName().equals(map.get("name"))).collect(Collectors.toList());
String[] nameArr = organization.getGroupLeader().split(","); if (0 < organizationList.size()) {
List<String> nameList = Arrays.asList(nameArr); Organization organization = organizationList.get(0);
String[] telArr = new String[nameList.size()]; String[] nameArr = organization.getGroupLeader().split(",");
if (ObjectUtils.isNotEmpty(organization.getGroupLeaderTel())) { List<String> nameList = Arrays.asList(nameArr);
telArr = organization.getGroupLeaderTel().split("\n"); String[] telArr = new String[nameList.size()];
} if (ObjectUtils.isNotEmpty(organization.getGroupLeaderTel())) {
List<String> telList = Arrays.asList(telArr); telArr = organization.getGroupLeaderTel().split("\n");
List<String> valueList = new ArrayList<>(); }
for (int i = 0; i < nameList.size(); i++) { List<String> telList = Arrays.asList(telArr);
valueList.add(nameList.get(i) + "-" + telList.get(i)); List<String> valueList = new ArrayList<>();
for (int i = 0; i < nameList.size(); i++) {
valueList.add(nameList.get(i) + "-" + telList.get(i));
}
tempMap.put("value", String.join(",", valueList));
} }
tempMap.put("value", String.join(",", valueList));
} }
res.add(tempMap); res.add(tempMap);
} }
......
...@@ -713,8 +713,8 @@ public class InputItemController extends AbstractBaseController { ...@@ -713,8 +713,8 @@ public class InputItemController extends AbstractBaseController {
} }
//如果为1则为否,顺应机场逻辑 //如果为1则为否,顺应机场逻辑
param.setCustomType("1".equals(param.getCustomType()) ? null : param.getCustomType()); /* param.setCustomType("1".equals(param.getCustomType()) ? null : param.getCustomType());
param.setKeyPartsType("1".equals(param.getKeyPartsType()) ? null : param.getKeyPartsType()); param.setKeyPartsType("1".equals(param.getKeyPartsType()) ? null : param.getKeyPartsType());*/
AgencyUserModel user = getUserInfo(); AgencyUserModel user = getUserInfo();
if (ObjectUtils.isEmpty(user)) { if (ObjectUtils.isEmpty(user)) {
return CommonResponseUtil.failure("用户session过期"); return CommonResponseUtil.failure("用户session过期");
......
...@@ -155,10 +155,10 @@ ...@@ -155,10 +155,10 @@
<select id="checkDelete" resultType="String"> <select id="checkDelete" resultType="String">
select select
(select name from wl_equipment_detail eq where eq.id = sto.equipment_detail_id) as name (select name from wl_equipment_detail eq where eq.id = sto.equipment_detail_id) as name
from wl_stock_detail as sto from wl_stock_detail as sto
where where
equipment_detail_id = #{id} equipment_detail_id = #{id}
group by equipment_detail_id group by equipment_detail_id
</select> </select>
<select id="getWareId" resultType="Long"> <select id="getWareId" resultType="Long">
......
...@@ -1589,4 +1589,10 @@ ...@@ -1589,4 +1589,10 @@
GROUP BY GROUP BY
a.`name` a.`name`
</select> </select>
<delete id="clearAlarmData">
DELETE FROM wl_equipment_specific_alarm WHERE equipment_specific_id = #{equipmentSpecificId};
DELETE FROM wl_equipment_specific_alarm_log WHERE equipment_specific_id = #{equipmentSpecificId};
DELETE FROM wl_equipment_alarm_report_day WHERE equipment_specific_id = #{equipmentSpecificId};
</delete>
</mapper> </mapper>
\ No newline at end of file
...@@ -26,8 +26,26 @@ ...@@ -26,8 +26,26 @@
</select> </select>
<select id="checkDelete" resultType="string"> <select id="checkDelete" resultType="string">
select name from wl_equipment_detail where equipment_id = #{id} select
name
from
wl_equipment_detail
<where>
equipment_id IN
<foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</where>
union union
select name from wl_car where equipment_id = #{id} select
name
from
wl_car
<where>
equipment_id IN
<foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</where>
</select> </select>
</mapper> </mapper>
...@@ -3882,4 +3882,16 @@ ...@@ -3882,4 +3882,16 @@
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="ky" id="2023-06-21-001">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="cb_org_usr" columnName="person_img"/>
</not>
</preConditions>
<comment>cb_org_usr add column</comment>
<sql>
alter table `cb_org_usr` add column `person_img` varchar(255) DEFAULT NULL COMMENT '人员照片'
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
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