Commit b9a98e4a authored by chenhao's avatar chenhao

Merge branch 'develop_ccs' of http://172.16.10.76/moa/amos-boot-biz into develop_ccs

parents e41f1864 19ffb583
...@@ -86,16 +86,16 @@ public class ControllerAop { ...@@ -86,16 +86,16 @@ public class ControllerAop {
return; return;
} }
} }
//TODO tyboot 框架拦截器已缓存数据
String token = RequestContext.getToken();
// 不需要校验token的接口直接返回 // 不需要校验token的接口直接返回
if (joinPoint.getSignature() instanceof MethodSignature) { if (joinPoint.getSignature() instanceof MethodSignature) {
if (!((MethodSignature) joinPoint.getSignature()).getMethod().getAnnotation(TycloudOperation.class).needAuth() && !request.getParameterMap().containsKey("token")) { if (!((MethodSignature) joinPoint.getSignature()).getMethod().getAnnotation(TycloudOperation.class).needAuth() && !request.getParameterMap().containsKey("token") && ValidationUtil.isEmpty(token)) {
return; return;
} }
} }
//TODO tyboot 框架拦截器已缓存数据
String token = RequestContext.getToken();
// 平台studio配置的下载接口token从url里取 // 平台studio配置的下载接口token从url里取
if (ValidationUtil.isEmpty(token)) { if (ValidationUtil.isEmpty(token)) {
fillRequestContext(request); fillRequestContext(request);
......
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.common.api.excel; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.common.api.excel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Random;
import org.apache.poi.ss.usermodel.DataValidation; import org.apache.poi.ss.usermodel.DataValidation;
import org.apache.poi.ss.usermodel.DataValidationConstraint; import org.apache.poi.ss.usermodel.DataValidationConstraint;
...@@ -70,8 +71,9 @@ public class TemplateDynamicCellWriteHandlerDate implements SheetWriteHandler{ ...@@ -70,8 +71,9 @@ public class TemplateDynamicCellWriteHandlerDate implements SheetWriteHandler{
// 如果下拉值总数大于100,则使用一个新sheet存储,避免生成的导入模板下拉值获取不到 // 如果下拉值总数大于100,则使用一个新sheet存储,避免生成的导入模板下拉值获取不到
if (v.length > LIMIT_NUMBER) { if (v.length > LIMIT_NUMBER) {
//定义sheet的名称 //定义sheet的名称
//1.创建一个隐藏的sheet 名称为 hidden + k //1.创建一个隐藏的sheet 名称为 hidden + k+随机数防止数据过多造成的名字重复
String sheetName = "hidden" +startIndex + k; Random random = new Random();
String sheetName = "hidden" +startIndex + k+random.nextInt(1000);
Workbook workbook = writeWorkbookHolder.getWorkbook(); Workbook workbook = writeWorkbookHolder.getWorkbook();
Sheet hiddenSheet = workbook.createSheet(sheetName); Sheet hiddenSheet = workbook.createSheet(sheetName);
for (int i = 0, length = v.length; i < length; i++) { for (int i = 0, length = v.length; i < length; i++) {
......
...@@ -76,6 +76,10 @@ public class FireEquipment implements Serializable { ...@@ -76,6 +76,10 @@ public class FireEquipment implements Serializable {
@ApiModelProperty(value = "所属区域") @ApiModelProperty(value = "所属区域")
@TableField("workarea") @TableField("workarea")
private String workArea; private String workArea;
@ApiModelProperty(value = "所属区域id")
@TableField("areaid")
private String areaid;
@ApiModelProperty(value = "所在建筑ID") @ApiModelProperty(value = "所在建筑ID")
@TableField("buildid") @TableField("buildid")
...@@ -87,23 +91,23 @@ public class FireEquipment implements Serializable { ...@@ -87,23 +91,23 @@ public class FireEquipment implements Serializable {
@ApiModelProperty(value = "所属消防系统Ids") @ApiModelProperty(value = "所属消防系统Ids")
@TableField("fightingsystemids") @TableField("fightingsystemids")
private String fightingSystemIds; private String fightingSystemIds = "";
@ApiModelProperty(value = "位置") @ApiModelProperty(value = "位置")
@TableField("position") @TableField("position")
private String position; private String position = "";
@ApiModelProperty(value = "使用日期") @ApiModelProperty(value = "使用日期")
@TableField("inusedate") @TableField("inusedate")
private LocalDateTime inUseDate; private LocalDateTime inUseDate ;
@ApiModelProperty(value = "状态") @ApiModelProperty(value = "状态")
@TableField("status") @TableField("status")
private String status; private String status = "正常";
@ApiModelProperty(value = "使用状态") @ApiModelProperty(value = "使用状态")
@TableField("inusestate") @TableField("inusestate")
private String inUseState; private String inUseState= "在位";
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@TableField("createdate") @TableField("createdate")
...@@ -115,23 +119,23 @@ public class FireEquipment implements Serializable { ...@@ -115,23 +119,23 @@ public class FireEquipment implements Serializable {
@ApiModelProperty(value = "别名") @ApiModelProperty(value = "别名")
@TableField("aliasname") @TableField("aliasname")
private String aliasname; private String aliasname = "";
@ApiModelProperty(value = "描述") @ApiModelProperty(value = "描述")
@TableField("description") @TableField("description")
private String description; private String description = "";
@ApiModelProperty(value = "辅助监控设备类型") @ApiModelProperty(value = "辅助监控设备类型")
@TableField("kind") @TableField("kind")
private String kind; private String kind = "";
@ApiModelProperty(value = "资产性质") @ApiModelProperty(value = "资产性质")
@TableField("assetsnature") @TableField("assetsnature")
private String assetsnature; private String assetsnature = "";
@ApiModelProperty(value = "设备来源种类") @ApiModelProperty(value = "设备来源种类")
@TableField("assetsource") @TableField("assetsource")
private String assetsource; private String assetsource = "";
@ApiModelProperty(value = "是否组合设备") @ApiModelProperty(value = "是否组合设备")
@TableField("combinedequipment") @TableField("combinedequipment")
...@@ -139,15 +143,15 @@ public class FireEquipment implements Serializable { ...@@ -139,15 +143,15 @@ public class FireEquipment implements Serializable {
@ApiModelProperty(value = "出厂编号") @ApiModelProperty(value = "出厂编号")
@TableField("factorynumber") @TableField("factorynumber")
private String factorynumber; private String factorynumber = "";
@ApiModelProperty(value = "制造国家") @ApiModelProperty(value = "制造国家")
@TableField("manufacturecountry") @TableField("manufacturecountry")
private String manufacturecountry; private String manufacturecountry = "";
@ApiModelProperty(value = "经营方式") @ApiModelProperty(value = "经营方式")
@TableField("operationmodel") @TableField("operationmodel")
private String operationmodel; private String operationmodel = "";
@ApiModelProperty(value = "运行编号") @ApiModelProperty(value = "运行编号")
@TableField("operationno") @TableField("operationno")
...@@ -155,11 +159,11 @@ public class FireEquipment implements Serializable { ...@@ -155,11 +159,11 @@ public class FireEquipment implements Serializable {
@ApiModelProperty(value = "验收测试的信息") @ApiModelProperty(value = "验收测试的信息")
@TableField("acceptancetest") @TableField("acceptancetest")
private String acceptancetest; private String acceptancetest = "";
@ApiModelProperty(value = "基线状态") @ApiModelProperty(value = "基线状态")
@TableField("baselinecondition") @TableField("baselinecondition")
private String baselinecondition; private String baselinecondition = "";
@ApiModelProperty(value = "基线生命损耗") @ApiModelProperty(value = "基线生命损耗")
@TableField("baselinelossoflife") @TableField("baselinelossoflife")
...@@ -175,38 +179,43 @@ public class FireEquipment implements Serializable { ...@@ -175,38 +179,43 @@ public class FireEquipment implements Serializable {
@ApiModelProperty(value = "资产生命周期日期") @ApiModelProperty(value = "资产生命周期日期")
@TableField("lifecycledate") @TableField("lifecycledate")
private String lifecycledate; private String lifecycledate = "";
@ApiModelProperty(value = "资产生命周期状态") @ApiModelProperty(value = "资产生命周期状态")
@TableField("lifecyclestate") @TableField("lifecyclestate")
private String lifecyclestate; private String lifecyclestate = "";
@ApiModelProperty(value = "批号") @ApiModelProperty(value = "批号")
@TableField("lotnumber") @TableField("lotnumber")
private String lotnumber; private String lotnumber = "";
@ApiModelProperty(value = "采购价格") @ApiModelProperty(value = "采购价格")
@TableField("purchaseprice") @TableField("purchaseprice")
private String purchaseprice; private String purchaseprice = "";
@ApiModelProperty(value = "退役原因") @ApiModelProperty(value = "退役原因")
@TableField("retiredreason") @TableField("retiredreason")
private String retiredreason; private String retiredreason = "";
@ApiModelProperty(value = "编号") @ApiModelProperty(value = "编号")
@TableField("serialnumber") @TableField("serialnumber")
private String serialnumber; private String serialnumber = "";
@ApiModelProperty(value = "类型") @ApiModelProperty(value = "类型")
@TableField("type") @TableField("type")
private String type; private String type = "";
@ApiModelProperty(value = "UTC编号") @ApiModelProperty(value = "UTC编号")
@TableField("utcnumber") @TableField("utcnumber")
private String utcnumber; private String utcnumber = "";
@ApiModelProperty(value = "所关联的设备信息") @ApiModelProperty(value = "所关联的设备信息")
@TableField("fireequipmentinfo") @TableField("fireequipmentinfo")
private String fireequipmentinfo; private String fireequipmentinfo = "";
@ApiModelProperty(value = "二维码")
@TableField(exist = false)
private String qrCode;
} }
\ No newline at end of file
...@@ -278,11 +278,11 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire ...@@ -278,11 +278,11 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
i.setCompany(fireTeam.getCompany()); i.setCompany(fireTeam.getCompany());
i.setCompanyName(fireTeam.getCompanyName()); i.setCompanyName(fireTeam.getCompanyName());
i.setCompanyCode(fireTeam.getCompanyCode()); i.setCompanyCode(fireTeam.getCompanyCode());
updateById(i); this.updateById(i);
}); });
} }
/*如果修改的队伍有下级队伍,所属单位一起修改 2021-10-18 陈召 结束*/ /*如果修改的队伍有下级队伍,所属单位一起修改 2021-10-18 陈召 结束*/
updateById(fireTeam); this.updateById(fireTeam);
} }
return fireTeam; return fireTeam;
} }
......
...@@ -1750,7 +1750,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1750,7 +1750,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
* @return * @return
*/ */
@Override @Override
public List<Map<String, Object>> getPersonDetailByCompanyIds(List<String> ids) { /* public List<Map<String, Object>> getPersonDetailByCompanyIds(List<String> ids) {
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<OrgUsr>(); LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<OrgUsr>();
...@@ -1758,6 +1758,17 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1758,6 +1758,17 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
wrapper.eq(OrgUsr::getBizOrgType, OrgPersonEnum.人员.getKey()); wrapper.eq(OrgUsr::getBizOrgType, OrgPersonEnum.人员.getKey());
wrapper.in(OrgUsr::getParentId, ids); wrapper.in(OrgUsr::getParentId, ids);
List<OrgUsr> orgPersonList = this.baseMapper.selectList(wrapper); List<OrgUsr> orgPersonList = this.baseMapper.selectList(wrapper);
List<String> fireStationSimpleList = new ArrayList<String>();
ids.forEach(id-> {
List<Map<String, Object>> maps = fireStationServiceImpl
.queryForFireStationListByCompanyId(Long.parseLong(id));
maps.stream().forEach(i -> {
String tagertString = i.get("name").toString() + "@" + i.get("sequence_nbr").toString();
fireStationSimpleList.add(tagertString);
});
});
for (OrgUsr orgUsr : orgPersonList) { for (OrgUsr orgUsr : orgPersonList) {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
List<DynamicFormInstanceDto> dyList = alertFormValueServiceImpl.queryByCalledId(orgUsr.getSequenceNbr()); List<DynamicFormInstanceDto> dyList = alertFormValueServiceImpl.queryByCalledId(orgUsr.getSequenceNbr());
...@@ -1792,12 +1803,66 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1792,12 +1803,66 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
if (ObjectUtils.isEmpty(fireStationList)) { if (ObjectUtils.isEmpty(fireStationList)) {
continue; continue;
} }
List<String> fireStationSimpleList = new ArrayList<String>(); if (!map.containsKey("fireStation")){
fireStationList.stream().forEach(i -> { map.put("fireStation", fireStationSimpleList);
}
list.add(map);
}
return list;
}*/
public List<Map<String, Object>> getPersonDetailByCompanyIds(List<String> ids) {
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<OrgUsr>();
wrapper.eq(OrgUsr::getIsDelete, false);
wrapper.eq(OrgUsr::getBizOrgType, OrgPersonEnum.人员.getKey());
wrapper.in(OrgUsr::getParentId, ids);
List<OrgUsr> orgPersonList = this.baseMapper.selectList(wrapper);
List<String> fireStationSimpleList = new ArrayList<String>();
ids.forEach(id-> {
List<Map<String, Object>> maps = fireStationServiceImpl
.queryForFireStationListByCompanyId(Long.parseLong(id));
maps.stream().forEach(i -> {
String tagertString = i.get("name").toString() + "@" + i.get("sequence_nbr").toString(); String tagertString = i.get("name").toString() + "@" + i.get("sequence_nbr").toString();
fireStationSimpleList.add(tagertString); fireStationSimpleList.add(tagertString);
}); });
map.put("fireStation", fireStationSimpleList); });
for (OrgUsr orgUsr : orgPersonList) {
Map<String, Object> map = new HashMap<String, Object>();
List<DynamicFormInstanceDto> dyList = alertFormValueServiceImpl.queryByCalledId(orgUsr.getSequenceNbr());
if (ObjectUtils.isEmpty(dyList)) {
continue;
}
for (DynamicFormInstanceDto dto : dyList) {
if ("positionType".equals(dto.getFieldCode())) {
map.put("postType", dto.getFieldValue());
map.put("postTypeName", dto.getFieldValueLabel());
break;
}
}
if (!map.containsKey("postType") || map.get("postType") == null
|| StringUtils.isBlank(map.get("postType").toString())) {
continue;
}
map.put("userName", orgUsr.getBizOrgName());
map.put("userId", orgUsr.getSequenceNbr().toString());
LambdaQueryWrapper<OrgUsr> wrapper1 = new LambdaQueryWrapper<OrgUsr>();
wrapper1.eq(OrgUsr::getIsDelete, false);
wrapper1.in(OrgUsr::getBizOrgType, OrgPersonEnum.公司.getKey(),OrgPersonEnum.部门.getKey());
wrapper1.eq(OrgUsr::getSequenceNbr, Long.parseLong(orgUsr.getParentId()));
OrgUsr orgCompany = this.baseMapper.selectOne(wrapper1);
if (ObjectUtils.isEmpty(orgCompany)) {
continue;
}
map.put("teamName", orgCompany.getBizOrgName());
map.put("teamId", orgCompany.getSequenceNbr().toString());
if (!map.containsKey("fireStation")){
map.put("fireStation", fireStationSimpleList);
}
list.add(map); list.add(map);
} }
return list; return list;
...@@ -2139,7 +2204,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -2139,7 +2204,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
public OrgUsr getCompanyByUserId(Long userId) { public OrgUsr getCompanyByUserId(Long userId) {
LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<OrgUsr>(); LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<OrgUsr>();
wrapper.eq(OrgUsr::getIsDelete, false); wrapper.eq(OrgUsr::getIsDelete, false);
wrapper.eq(OrgUsr::getSequenceNbr, userId); wrapper.eq(OrgUsr::getAmosOrgId, userId);
wrapper.eq(OrgUsr::getBizOrgType, CommonConstant.BIZ_ORG_TYPE_PERSON); wrapper.eq(OrgUsr::getBizOrgType, CommonConstant.BIZ_ORG_TYPE_PERSON);
OrgUsr orgUsr = baseMapper.selectOne(wrapper); OrgUsr orgUsr = baseMapper.selectOne(wrapper);
return getCompanyByParentId(orgUsr.getParentId()); return getCompanyByParentId(orgUsr.getParentId());
......
...@@ -1152,7 +1152,7 @@ public class CarController extends AbstractBaseController { ...@@ -1152,7 +1152,7 @@ public class CarController extends AbstractBaseController {
+ "&productKey=" + prefix + "&deviceName=" + suffix, + "&productKey=" + prefix + "&deviceName=" + suffix,
HttpMethod.GET, httpEntity, FeignClientResult.class); HttpMethod.GET, httpEntity, FeignClientResult.class);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error(e.getMessage());
} }
if (null != feignClientResult && feignClientResult.getBody().getStatus() == 200) { if (null != feignClientResult && feignClientResult.getBody().getStatus() == 200) {
return CommonResponseUtil.success(feignClientResult.getBody().getResult()); return CommonResponseUtil.success(feignClientResult.getBody().getResult());
...@@ -1160,7 +1160,6 @@ public class CarController extends AbstractBaseController { ...@@ -1160,7 +1160,6 @@ public class CarController extends AbstractBaseController {
log.error("注:iotCode为 (" + iotCode + ") 的车辆不存在于物联系统或物联系统车辆历史轨迹接口出错!"); log.error("注:iotCode为 (" + iotCode + ") 的车辆不存在于物联系统或物联系统车辆历史轨迹接口出错!");
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
} }
/** /**
......
...@@ -509,6 +509,7 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -509,6 +509,7 @@ public class FireFightingSystemController extends AbstractBaseController {
try { try {
return CommonResponseUtil.success(fireFightingSystemService.update(vo)); return CommonResponseUtil.success(fireFightingSystemService.update(vo));
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(),e);
return CommonResponseUtil.failure(e.getMessage()); return CommonResponseUtil.failure(e.getMessage());
} }
} }
......
...@@ -138,7 +138,7 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> { ...@@ -138,7 +138,7 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
/** /**
* 修改仓库 * 修改仓库
*/ */
int updateStr(@Param("id") Long id,@Param("name") String name,@Param("fullName") String fullName,@Param("parentId")String parentId, @Param("code")String code); int updateStr(@Param("id") Long id,@Param("name") String name,@Param("fullName") String fullName,@Param("parentId")String parentId, @Param("code")String code, @Param("bizOrgCode")String bizOrgCode);
/** /**
......
...@@ -343,10 +343,11 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -343,10 +343,11 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
String fullName = name; String fullName = name;
String code = (String) map.get("code"); String code = (String) map.get("code");
String parentName = formInstanceMapper.getStuctureName(parentId); String parentName = formInstanceMapper.getStuctureName(parentId);
String bizOrgCode = map.get("bizOrgCode").toString();
if (!"0".equals(parentId)) { if (!"0".equals(parentId)) {
fullName = parentName + '-' + name; fullName = parentName + '-' + name;
} }
formInstanceMapper.updateStr(instanceId, name, fullName, parentId, code); formInstanceMapper.updateStr(instanceId, name, fullName, parentId, code,bizOrgCode);
//3.修改仓库对应子数据 //3.修改仓库对应子数据
fullName = "0".equals(parentId) ? name + "-" : "-" + name; fullName = "0".equals(parentId) ? name + "-" : "-" + name;
name = beforFullName + "-"; name = beforFullName + "-";
......
...@@ -146,12 +146,20 @@ public class EqEqDynamicFormServiceImpl implements IEqDynamicFormService { ...@@ -146,12 +146,20 @@ public class EqEqDynamicFormServiceImpl implements IEqDynamicFormService {
this.fillFormColumnWithFiledValue(dynamicFormGroupVo, formInstanceMap); this.fillFormColumnWithFiledValue(dynamicFormGroupVo, formInstanceMap);
//3.处理子分组数据 //3.处理子分组数据
List<DynamicFormGroup> groupList = iEqDynamicFormGroupService.list(new LambdaQueryWrapper<DynamicFormGroup>() List<DynamicFormGroup> groupList = iEqDynamicFormGroupService.list(new LambdaQueryWrapper<DynamicFormGroup>()
.eq(DynamicFormGroup::getParentId, dynamicFormGroupVo.getId()).orderByAsc(DynamicFormGroup::getSort)); .eq(DynamicFormGroup::getParentId, dynamicFormGroupVo.getId()).eq(DynamicFormGroup::getParentId, dynamicFormGroupVo.getId()).orderByAsc(DynamicFormGroup::getSort));
List<DynamicFormGroupVo> formGroupVos = groupList.stream().map(s -> { List<DynamicFormGroupVo> formGroupVos=new ArrayList<>();
List<DynamicFormGroupVo> formGroupVos1 = groupList.stream().map(s -> {
this.stringToJsonGroupConfig(s); this.stringToJsonGroupConfig(s);
DynamicFormGroupVo target = new DynamicFormGroupVo(); JSONObject jsonObject =s.getGroupConfig();
Bean.copyExistPropertis(s, target); if((jsonObject.get("isSelect").toString()).equals("true")){
return target; DynamicFormGroupVo target = new DynamicFormGroupVo();
Bean.copyExistPropertis(s, target);
formGroupVos.add(target);
return target;
}
return null;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
formGroupVos.forEach(v -> { formGroupVos.forEach(v -> {
this.fillFormColumnWithFiledValue(v, formInstanceMap); this.fillFormColumnWithFiledValue(v, formInstanceMap);
......
...@@ -935,14 +935,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -935,14 +935,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
int res = this.baseMapper.deleteById(id); int res = this.baseMapper.deleteById(id);
if (res > 0 && syncSwitch) { if (res > 0 && syncSwitch) {
//数据同步 //数据同步
syncDataService.syncDeletedEquipmentSpecific(Arrays.asList(id)); delEquipmentSpecificSyncData(id);
List<EquipmentIndexVO> indexBySpecificIdIn = equipmentSpecificIndexSerivce.getEquipIndexBySpecificIdIn(Arrays.asList(String.valueOf(id)));
if (!indexBySpecificIdIn.isEmpty()) {
List<Long> fireEquipmentInfoCollect = indexBySpecificIdIn.stream().filter(vo -> 0 == vo.getIsIot()).map(EquipmentIndexVO::getId).collect(Collectors.toList());
List<Long> fireEquipMeasurementCollect = indexBySpecificIdIn.stream().filter(vo -> 1 == vo.getIsIot()).map(EquipmentIndexVO::getId).collect(Collectors.toList());
syncDataService.syncDeletedEquipmentSpecificInfo(fireEquipmentInfoCollect);
syncDataService.syncDeletedFireEquipMeasurement(fireEquipMeasurementCollect);
}
} }
//判断装备表剩余数量,无剩余删除模板 //判断装备表剩余数量,无剩余删除模板
QueryWrapper<EquipmentSpecific> wrapper = new QueryWrapper<>(); QueryWrapper<EquipmentSpecific> wrapper = new QueryWrapper<>();
...@@ -993,6 +986,18 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -993,6 +986,18 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
} }
} }
public void delEquipmentSpecificSyncData(Long id){
//数据同步
syncDataService.syncDeletedEquipmentSpecific(Arrays.asList(id));
List<EquipmentIndexVO> indexBySpecificIdIn = equipmentSpecificIndexSerivce.getEquipIndexBySpecificIdIn(Arrays.asList(String.valueOf(id)));
if (!indexBySpecificIdIn.isEmpty()) {
List<Long> fireEquipmentInfoCollect = indexBySpecificIdIn.stream().filter(vo -> 0 == vo.getIsIot()).map(EquipmentIndexVO::getId).collect(Collectors.toList());
List<Long> fireEquipMeasurementCollect = indexBySpecificIdIn.stream().filter(vo -> 1 == vo.getIsIot()).map(EquipmentIndexVO::getId).collect(Collectors.toList());
syncDataService.syncDeletedEquipmentSpecificInfo(fireEquipmentInfoCollect);
syncDataService.syncDeletedFireEquipMeasurement(fireEquipMeasurementCollect);
}
}
@Override @Override
public Object getOneCard(Long id, String type) { public Object getOneCard(Long id, String type) {
if (BitmapEnum.video.getKey().equals(type)) { if (BitmapEnum.video.getKey().equals(type)) {
...@@ -1212,6 +1217,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1212,6 +1217,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentSpecific.getStockDetail().setEquipmentSpecificId(equipmentSpecific.getId()); equipmentSpecific.getStockDetail().setEquipmentSpecificId(equipmentSpecific.getId());
equipmentSpecific.getStockDetail().setQrCode(qrCode); equipmentSpecific.getStockDetail().setQrCode(qrCode);
equipmentSpecific.getStockDetail().setBatchNum(new SimpleDateFormat("yyyy-MM-dd").format(new Date())); equipmentSpecific.getStockDetail().setBatchNum(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
equipmentSpecific.getStockDetail().setDescription(equipmentData.getEquipmentDetail().getArea());
stockDetailService.save(equipmentSpecific.getStockDetail()); stockDetailService.save(equipmentSpecific.getStockDetail());
//4.3生成入库单 //4.3生成入库单
...@@ -1523,6 +1529,11 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1523,6 +1529,11 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
// 已入库 // 已入库
this.baseMapper.deleteEquipDataByStockDetailId(stockDetail.getId(), specificId); this.baseMapper.deleteEquipDataByStockDetailId(stockDetail.getId(), specificId);
} }
if (syncSwitch) {
//数据同步
delEquipmentSpecificSyncData(specificId);
}
return Boolean.TRUE; return Boolean.TRUE;
} }
......
...@@ -839,8 +839,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -839,8 +839,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
if (!StringUtil.isNotEmpty(SystemTypeEnum.getEnum(systemCode))) { if (!StringUtil.isNotEmpty(SystemTypeEnum.getEnum(systemCode))) {
return null; return null;
} }
Map<String, Object> data = null; Map<String, Object> data;
if (isUpdate) { if (isUpdate) {
data = saveIntegrationPageSysData(systemCode); data = saveIntegrationPageSysData(systemCode);
} else { } else {
......
...@@ -771,9 +771,13 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -771,9 +771,13 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
action.setStatus(AlarmStatusEnum.HF.getCode()); action.setStatus(AlarmStatusEnum.HF.getCode());
} }
action.setUpdateDate(new Date()); action.setUpdateDate(new Date());
// 更新所在系统,设备可能编辑过 // 更新所在系统,设备可能编辑过,更新所在系统、装备名称、装备定义code
action.setSystemIds(equipmentSpcIndex.getSystemId()); action.setSystemIds(equipmentSpcIndex.getSystemId());
action.setSystemCodes(this.getSystemCodeBySpeId(equipmentSpcIndex.getSystemId())); action.setSystemCodes(this.getSystemCodeBySpeId(equipmentSpcIndex.getSystemId()));
action.setEquipmentSpecificName(equipmentSpcIndex.getEquipmentSpecificName());
action.setEquipmentCode(equipmentSpcIndex.getEquipmentCode());
// 冗余字段,alarm_log表更新时使用
action.setCode(equipmentSpcIndex.getEquipmentSpecificCode());
equipmentSpecificAlarms.add(action); equipmentSpecificAlarms.add(action);
}); });
} }
......
...@@ -305,7 +305,7 @@ public class SyncDataUtil { ...@@ -305,7 +305,7 @@ public class SyncDataUtil {
fireEquipMeasurement.setValue(i.getValue()); fireEquipMeasurement.setValue(i.getValue());
fireEquipMeasurement.setTypeCode(i.getTypeCode()); fireEquipMeasurement.setTypeCode(i.getTypeCode());
fireEquipMeasurement.setTypeName(i.getTypeName()); fireEquipMeasurement.setTypeName(i.getTypeName());
fireEquipMeasurement.setMRid(i.getTypeCode()); fireEquipMeasurement.setMRid(i.getIndexId());
return fireEquipMeasurement; return fireEquipMeasurement;
} }
).collect(Collectors.toList()); ).collect(Collectors.toList());
......
...@@ -43,9 +43,7 @@ public class EquipmentServiceImpl { ...@@ -43,9 +43,7 @@ public class EquipmentServiceImpl {
ResponseModel<Object> response = equipFeignClient.getFireSystemListAll(); ResponseModel<Object> response = equipFeignClient.getFireSystemListAll();
List<Map<String, Object>> fireSystemMapList = (List<Map<String, Object>>) response.getResult(); List<Map<String, Object>> fireSystemMapList = (List<Map<String, Object>>) response.getResult();
List<MenuFrom> fireSystemDtoList = Lists.newArrayList(); List<MenuFrom> fireSystemDtoList = Lists.newArrayList();
fireSystemMapList.stream().filter( fireSystemMapList.stream().forEach(
result -> result.get("bizOrgCode") != null && result.get("bizOrgCode").toString().startsWith(reginParams.getPersonIdentity().getBizOrgCode()))
.forEach(
system -> { system -> {
MenuFrom menuFrom = new MenuFrom((String) system.get("id"), (String) system.get("name"), "0", "0"); MenuFrom menuFrom = new MenuFrom((String) system.get("id"), (String) system.get("name"), "0", "0");
fireSystemDtoList.add(menuFrom); fireSystemDtoList.add(menuFrom);
......
...@@ -23,6 +23,7 @@ import org.springframework.beans.BeanUtils; ...@@ -23,6 +23,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
...@@ -412,7 +413,8 @@ public class ExcelServiceImpl { ...@@ -412,7 +413,8 @@ public class ExcelServiceImpl {
break; break;
} }
} }
@Transactional
public void commonUpload(MultipartFile multipartFile, ExcelDto excelDto,String uuidString) throws Exception { public void commonUpload(MultipartFile multipartFile, ExcelDto excelDto,String uuidString) throws Exception {
switch (excelDto.getType()) { switch (excelDto.getType()) {
......
...@@ -136,7 +136,7 @@ public class VoiceRecordFileController extends BaseController { ...@@ -136,7 +136,7 @@ public class VoiceRecordFileController extends BaseController {
sortRule = "desc"; sortRule = "desc";
} }
}else { }else {
sortParam = "call_time"; sortParam = "tel_start_time";
sortRule = "desc"; sortRule = "desc";
} }
Page<VoiceRecordFileDto> pageBean = voiceRecordFileServiceImpl.queryRecordListByQueryDto(page, Page<VoiceRecordFileDto> pageBean = voiceRecordFileServiceImpl.queryRecordListByQueryDto(page,
......
...@@ -1006,6 +1006,7 @@ ...@@ -1006,6 +1006,7 @@
wl_equipment_index.is_iot=1) b on b.equipment_id=wl_equipment_detail.equipment_id wl_equipment_index.is_iot=1) b on b.equipment_id=wl_equipment_detail.equipment_id
LEFT JOIN wl_stock_detail on wl_equipment_detail.id =wl_stock_detail.equipment_detail_id LEFT JOIN wl_stock_detail on wl_equipment_detail.id =wl_stock_detail.equipment_detail_id
LEFT JOIN wl_warehouse_structure on wl_stock_detail.warehouse_structure_id = wl_warehouse_structure.id LEFT JOIN wl_warehouse_structure on wl_stock_detail.warehouse_structure_id = wl_warehouse_structure.id
LEFT JOIN wl_equipment on wl_equipment.id = wl_equipment_detail.equipment_id where wl_equipment.is_iot = 1
)b )b
)m )m
<where> <where>
......
...@@ -364,7 +364,7 @@ WHERE wles.id=#{id} ...@@ -364,7 +364,7 @@ WHERE wles.id=#{id}
si.update_date, si.update_date,
ei.type_code AS typeCode, ei.type_code AS typeCode,
ei.type_name AS typeName, ei.type_name AS typeName,
es.`code` AS indexId ei.`id` AS indexId
FROM FROM
wl_equipment_specific_index si wl_equipment_specific_index si
LEFT JOIN wl_equipment_index ei ON si.equipment_index_id = ei.id LEFT JOIN wl_equipment_index ei ON si.equipment_index_id = ei.id
......
...@@ -738,6 +738,7 @@ ...@@ -738,6 +738,7 @@
SELECT SELECT
es.id, es.id,
es.`code` AS mrid, es.`code` AS mrid,
es.`code` AS materialObjectId,
es.`name`, es.`name`,
es.`name` AS aliasname, es.`name` AS aliasname,
es.`code`, es.`code`,
...@@ -757,7 +758,8 @@ ...@@ -757,7 +758,8 @@
NOW( ) AS updatedate, NOW( ) AS updatedate,
es.area_id AS areaid, es.area_id AS areaid,
ws.`name` AS buildname, ws.`name` AS buildname,
a.`name` AS workarea a.`name` AS workarea,
es.qr_code as qrCode
FROM FROM
wl_equipment_specific es wl_equipment_specific es
LEFT JOIN wl_equipment_detail ed ON es.equipment_detail_id = ed.id LEFT JOIN wl_equipment_detail ed ON es.equipment_detail_id = ed.id
...@@ -770,17 +772,31 @@ ...@@ -770,17 +772,31 @@
<select id="getEquipSpecificDetailsByEquipmentId" <select id="getEquipSpecificDetailsByEquipmentId"
resultType="com.yeejoin.equipmanage.common.datasync.entity.FireEquipment"> resultType="com.yeejoin.equipmanage.common.datasync.entity.FireEquipment">
SELECT SELECT
es.id, es.id,
ed.`name`, ed.`name`,
es.`code`, ed.`name` as aliasname,
es.`code` AS mRid, IFNULL(es.`code`,'') as `code`,
es.system_id AS fightingSystemIds, IFNULL(es.`code`,'') AS mRid,
es.iot_code AS iotCode, IFNULL(es.system_id,'') AS fightingSystemIds,
e.`name` AS categoryName, IFNULL(es.iot_code,'') AS iotCode,
e.`code` AS categoryCode, e.`name` AS categoryName,
ws.source_id AS buildId, e.`code` AS categoryCode,
ws.`name` AS buildName, IFNULL(ws.source_id,'') AS buildId,
TRIM( CONCAT( IFNULL( ws.full_name, '' ), ' ', IFNULL( sd.description, '' ) ) ) AS position IFNULL(ws.`name`,'') AS buildName,
IFNULL(a.`name`,'') as `workArea`,
IFNULL(a.`id`,'') as `areaid`,
(SELECT
`name`
FROM
f_station_info
LIMIT 1) as stationname,
(SELECT
station_code
FROM
f_station_info
LIMIT 1) as stationCode,
es.create_date as inUseDate,
TRIM( CONCAT( IFNULL( ws.full_name, '' ), ' ', IFNULL( sd.description, '' ) ) ) AS position
FROM FROM
wl_equipment_specific es wl_equipment_specific es
LEFT JOIN wl_equipment_detail ed ON es.equipment_detail_id = ed.id LEFT JOIN wl_equipment_detail ed ON es.equipment_detail_id = ed.id
...@@ -788,6 +804,7 @@ ...@@ -788,6 +804,7 @@
LEFT JOIN f_fire_fighting_system fs ON fs.id = es.system_id LEFT JOIN f_fire_fighting_system fs ON fs.id = es.system_id
LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = es.id LEFT JOIN wl_stock_detail sd ON sd.equipment_specific_id = es.id
LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id
LEFT JOIN wl_area a ON a.id = es.area_id
<where> <where>
<if test="equipmentId != null"> <if test="equipmentId != null">
ed.equipment_id = #{equipmentId} ed.equipment_id = #{equipmentId}
......
...@@ -796,6 +796,7 @@ ...@@ -796,6 +796,7 @@
<select id="getFireFightingSystemDetail" <select id="getFireFightingSystemDetail"
resultType="com.yeejoin.equipmanage.common.datasync.entity.FireFightingSystem"> resultType="com.yeejoin.equipmanage.common.datasync.entity.FireFightingSystem">
SELECT SELECT
fs.id, fs.id,
f.`name` AS stationname, f.`name` AS stationname,
f.`code` AS stationcode, f.`code` AS stationcode,
...@@ -803,7 +804,7 @@ ...@@ -803,7 +804,7 @@
fs.`name` AS aliasname, fs.`name` AS aliasname,
fs.`code`, fs.`code`,
fg.group_name AS systemtype, fg.group_name AS systemtype,
IFNULL(fs.install_date,'') AS installdate, fs.install_date AS installdate,
IFNULL(p.`name`,'') AS chargeperson, IFNULL(p.`name`,'') AS chargeperson,
IFNULL(fs.charge_person_phone,'') AS chargepersonphone, IFNULL(fs.charge_person_phone,'') AS chargepersonphone,
IFNULL(mi.`name`,'') AS constructionunit, IFNULL(mi.`name`,'') AS constructionunit,
...@@ -823,8 +824,8 @@ ...@@ -823,8 +824,8 @@
LEFT JOIN rpm_person p ON p.id = fs.charge_person, LEFT JOIN rpm_person p ON p.id = fs.charge_person,
f_station_info f f_station_info f
<where> <where>
<if test="id != null and id !=''"> <if test="fireFightingSystemVo != null and fireFightingSystemVo.id != null and fireFightingSystemVo.id !=''">
fs.id = #{id} fs.id = #{fireFightingSystemVo.id}
</if> </if>
</where> </where>
</select> </select>
...@@ -962,7 +963,7 @@ ...@@ -962,7 +963,7 @@
from from
`wl_equipment_specific_index` si `wl_equipment_specific_index` si
where where
si.equipment_index_key = 'FAS_AirSampler_FireAlarm') as sgbjqnum, si.equipment_index_key = 'FAS_SoundLightAlarm_FireAlarm') as sgbjqnum,
(SELECT (SELECT
count(1) count(1)
from from
......
...@@ -389,7 +389,8 @@ ...@@ -389,7 +389,8 @@
set name = #{name} , set name = #{name} ,
full_name = #{fullName}, full_name = #{fullName},
parent_id = #{parentId}, parent_id = #{parentId},
code = #{code} code = #{code},
biz_org_code = #{bizOrgCode}
where id = #{id} where id = #{id}
</update> </update>
<update id="updateStrFullName"> <update id="updateStrFullName">
......
...@@ -10,6 +10,7 @@ logging.config=classpath:logback-${spring.profiles.active}.xml ...@@ -10,6 +10,7 @@ logging.config=classpath:logback-${spring.profiles.active}.xml
## mybatis-plus配置控制台打印完整带参数SQL语句 ## mybatis-plus配置控制台打印完整带参数SQL语句
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
mybatis-plus.global-config.db-config.update-strategy=ignored
## redis失效时间 ## redis失效时间
redis.cache.failure.time=10800 redis.cache.failure.time=10800
......
...@@ -2817,5 +2817,16 @@ ...@@ -2817,5 +2817,16 @@
END# END#
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="tw" id="2022-02-22-tw-1">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_dynamic_form_column" />
</preConditions>
<comment>update data cb_dynamic_form_column</comment>
<sql>
update cb_dynamic_form_column set is_delete =0 where sequence_nbr=132828674812099;
</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