Commit 86d1b45f authored by chenhao's avatar chenhao

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

parents 5e1fc5d9 86704053
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-api</artifactId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>amos-boot-module-avic-api</artifactId>
</project>
\ No newline at end of file
package com.yeejoin.amos.avic.face.model;
import org.typroject.tyboot.core.rdbms.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author 子杨
* @since 2022-03-28
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class AvicCustomPathModel extends BaseModel {
/**
*
*/
private static final long serialVersionUID = 6756323320498708828L;
private String agencyCode;
private String pathName;
private String path;
/**
* 分类编码
*/
private String desc;
}
package com.yeejoin.amos.avic.face.orm.dao;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.avic.face.orm.entity.AvicCustomPath;
/**
* <p>
* Mapper 接口
* </p>
*
* @author 子杨
* @since 2022-03-28
*/
@Mapper
public interface AvicCustomPathMapper extends BaseMapper<AvicCustomPath> {
}
\ No newline at end of file
package com.yeejoin.amos.avic.face.orm.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
*
* </p>
*
* @author 子杨
* @since 2022-03-28
*/
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("avic_custom_path")
public class AvicCustomPath extends BaseEntity {
@TableField("AGENCY_CODE")
private String agencyCode;
@TableField("PATH_NAME")
private String pathName;
@TableField("PATH")
private String path;
/**
* 分类编码
*/
@TableField("DESC")
private String desc;
}
package com.yeejoin.amos.avic.face.service;
import org.springframework.stereotype.Component;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.avic.face.model.AvicCustomPathModel;
import com.yeejoin.amos.avic.face.orm.dao.AvicCustomPathMapper;
import com.yeejoin.amos.avic.face.orm.entity.AvicCustomPath;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
/**
* <p>
* 服务类
* </p>
*
* @author 子杨
* @since 2022-03-28
*/
@Component
public class AvicCustomPathService extends BaseService<AvicCustomPathModel,AvicCustomPath,AvicCustomPathMapper> {
/**
* 分页查询
*/
public Page<AvicCustomPathModel> queryForAvicCustomPathPage(Page page, String agencyCode) {
return this.queryForPage(page, null, false, agencyCode);
}
/**
* 列表查询 示例
*/
public List<AvicCustomPathModel> queryForAvicCustomPathList(String agencyCode) {
return this.queryForList("" , false, agencyCode);
}
}
package com.yeejoin.amos.avic.face.webservice;
import javax.activation.DataHandler;
import javax.jws.WebMethod;
import javax.jws.WebService;
import com.yeejoin.amos.avic.face.model.AvicCustomPathModel;
@WebService(targetNamespace = "http://service.avic.amos.yeejoin.com")
public interface FileFransferService {
/**
* 利用中航码传输文件
* @param handler
* @param fileName
* @param path
*/
@WebMethod
public void useCodetransferFile(DataHandler handler, String fileName, String path, String code);
/**
* 传输文件
* @param handler
* @param fileName
* @param path
*/
@WebMethod
public void transferFile(DataHandler handler, String fileName, String path);
/**
* 传输目录配置
* @param name
* @param path
* @param desc
*/
@WebMethod
public void transferPathConfig(AvicCustomPathModel model);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.avic.face.orm.dao.AvicCustomPathMapper">
</mapper>
...@@ -86,4 +86,7 @@ public class OrgUsrDto extends BaseDto { ...@@ -86,4 +86,7 @@ public class OrgUsrDto extends BaseDto {
@ApiModelProperty(value = "唯一编号") @ApiModelProperty(value = "唯一编号")
private String code; private String code;
@ApiModelProperty(value = "合同编号")
private Long contractId;
} }
...@@ -43,6 +43,8 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> { ...@@ -43,6 +43,8 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
*/ */
List<OrgUsr> listOrgUserById(Long orgUserId); List<OrgUsr> listOrgUserById(Long orgUserId);
List<OrgUsrDto> selectOrgUsrList (@Param("seq") Long seq);
/** /**
* * @param null * * @param null
* @return * @return
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
FROM FROM
cb_org_usr cb_org_usr
WHERE WHERE
sequence_nbr IN ( SELECT DISTINCT signed_company_id FROM cb_contract WHERE company_id = #{seq} ) sequence_nbr IN ( SELECT DISTINCT signed_company_id FROM cb_contract WHERE company_id = #{seq} and is_delete = 0 )
AND biz_org_type = "COMPANY" AND biz_org_type = "COMPANY"
AND is_delete = 0 AND is_delete = 0
</select> </select>
......
...@@ -302,6 +302,27 @@ ...@@ -302,6 +302,27 @@
</if> </if>
</select> </select>
<select id="selectOrgUsrList" resultType="com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto">
SELECT DISTINCT
cb_org_usr.sequence_nbr ,
cb_org_usr.biz_org_name,
cb_org_usr.biz_org_code,
cb_org_usr.amos_org_id,
cb_org_usr.amos_org_code,
cb_org_usr.biz_org_type,
cb_org_usr.build_name,
cb_org_usr.build_id,
cb_org_usr.parent_id,
cb_contract.sequence_nbr as contract_id
FROM
cb_org_usr
LEFT JOIN cb_contract on cb_org_usr.sequence_nbr = cb_contract.signed_company_id and cb_contract.company_id = #{seq}
WHERE
cb_org_usr.sequence_nbr IN ( SELECT DISTINCT signed_company_id FROM cb_contract WHERE company_id = #{seq} and is_delete = 0 )
AND cb_org_usr.biz_org_type = "COMPANY"
AND cb_org_usr.is_delete = 0
</select>
<select id="listContractDto" resultType="com.yeejoin.amos.boot.module.common.api.dto.CompanyDto"> <select id="listContractDto" resultType="com.yeejoin.amos.boot.module.common.api.dto.CompanyDto">
SELECT SELECT
......
...@@ -32,6 +32,11 @@ public class MaintenanceResourceDto extends BaseTreeNode { ...@@ -32,6 +32,11 @@ public class MaintenanceResourceDto extends BaseTreeNode {
*/ */
private Integer type; private Integer type;
/**
* 维保合同编号
*/
private String contractId;
public MaintenanceResourceDto() { public MaintenanceResourceDto() {
} }
......
...@@ -115,6 +115,16 @@ public class CommonPageInfoParam extends CommonPageable { ...@@ -115,6 +115,16 @@ public class CommonPageInfoParam extends CommonPageable {
private String isFireAlarm; private String isFireAlarm;
private String isRemovedFire;
public void setIsRemovedFire(String isRemovedFire) {
this.isRemovedFire = isRemovedFire;
}
public String getIsRemovedFire() {
return isRemovedFire;
}
public void setIsFireAlarm(String isFireAlarm) { public void setIsFireAlarm(String isFireAlarm) {
this.isFireAlarm = isFireAlarm; this.isFireAlarm = isFireAlarm;
} }
......
...@@ -61,6 +61,8 @@ public class CommonPageParamUtil { ...@@ -61,6 +61,8 @@ public class CommonPageParamUtil {
param.setCleanStatus(toString(queryRequests.get(i).getValue())); param.setCleanStatus(toString(queryRequests.get(i).getValue()));
} else if("isRemoveShield".equals(name)){ } else if("isRemoveShield".equals(name)){
param.setIsRemoveShield(toString(queryRequests.get(i).getValue())); param.setIsRemoveShield(toString(queryRequests.get(i).getValue()));
} else if("isRemovedFire".equals(name)){
param.setIsRemovedFire(toString(queryRequests.get(i).getValue()));
} }
} }
if(commonPageable !=null){ if(commonPageable !=null){
......
...@@ -27,5 +27,6 @@ ...@@ -27,5 +27,6 @@
<module>amos-boot-module-equip-api</module> <module>amos-boot-module-equip-api</module>
<module>amos-boot-module-latentdanger-api</module> <module>amos-boot-module-latentdanger-api</module>
<module>amos-boot-module-ccs-api</module> <module>amos-boot-module-ccs-api</module>
<module>amos-boot-module-avic-api</module>
</modules> </modules>
</project> </project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-biz</artifactId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>amos-boot-module-avic-biz</artifactId>
<dependencies>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-avic-api</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
<version>3.2.6</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package com.yeejoin.amos.avic.config;
import javax.xml.ws.Endpoint;
import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.yeejoin.amos.avic.face.webservice.FileFransferService;
@Configuration
public class CxfConfig {
@Autowired
FileFransferService fileFransferService;
@Autowired
private Bus bus;
@Bean
public Endpoint endpoint() {
EndpointImpl endpoint = new EndpointImpl(bus, fileFransferService);
endpoint.publish("/fileFransfer");
return endpoint;
}
}
package com.yeejoin.amos.avic.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.avic.controller.AvicCustomPathResource;
import com.yeejoin.amos.avic.face.model.AvicCustomPathModel;
import com.yeejoin.amos.avic.face.service.AvicCustomPathService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.doc.TycloudResource;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
/**
* <p>
* 前端控制器
* </p>
*
* @author 子杨
* @since 2022-03-28
*/
@RestController
@TycloudResource(module = "avic", value = "avicCustomPath")
@RequestMapping(value = "/v1/avic/AvicCustomPath")
@Api(tags = "avic-")
public class AvicCustomPathResource {
@Value("${avic.webservice.path}")
String webserviceUrl;
private final Logger logger = LogManager.getLogger(AvicCustomPathResource.class);
@Autowired
private AvicCustomPathService simpleService;
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "创建")
@RequestMapping(value = "", method = RequestMethod.POST)
public ResponseModel<AvicCustomPathModel> create(@RequestBody AvicCustomPathModel model) {
model = simpleService.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
public void postConfig() {
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient(webserviceUrl);
try {
// invoke("方法名",参数1,参数2,参数3....);
client.invoke("transferPathConfig", "张三");
} catch (java.lang.Exception e) {
e.printStackTrace();
}
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "更新")
@RequestMapping(value = "/{sequenceNbr}", method = RequestMethod.PUT)
public ResponseModel<AvicCustomPathModel> update(@RequestBody AvicCustomPathModel model,
@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(simpleService.updateWithModel(model));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查询单个对象")
@RequestMapping(value = "/{sequenceNbr}", method = RequestMethod.GET)
public ResponseModel<AvicCustomPathModel> seleteOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(simpleService.queryBySeq(sequenceNbr));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "分页查询")
@RequestMapping(value = "/page", method = RequestMethod.GET)
public ResponseModel<Page> queryForPage(@RequestParam(value = "agencyCode") String agencyCode,
@RequestParam(value = "current") int current, @RequestParam(value = "size") int size) {
Page page = new Page();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(simpleService.queryForAvicCustomPathPage(page, agencyCode));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "列表查询")
@RequestMapping(value = "/list", method = RequestMethod.GET)
public ResponseModel selectForList(@RequestParam(value = "agencyCode") String agencyCode) {
return ResponseHelper.buildResponse(simpleService.queryForAvicCustomPathList(agencyCode));
}
}
package com.yeejoin.amos.avic.controller;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.doc.TycloudResource;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.yeejoin.amos.avic.face.model.AvicCustomPathModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@RestController
@TycloudResource(module = "avic", value = "FileFransfer")
@RequestMapping(value = "/v1/avic/WebServicesFileFransfer")
@Api(tags = "avic-")
public class WebServicesFileFransferResource {
private final Logger logger = LogManager.getLogger(WebServicesFileFransferResource.class);
@Value("${avic.webservice.path}")
String webserviceUrl;
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "传输文件")
@RequestMapping(value = "/file", method = RequestMethod.POST)
public ResponseModel postfile() {
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient(webserviceUrl);
try {
// invoke("方法名",参数1,参数2,参数3....);
client.invoke("transferFile", "张三");
} catch (java.lang.Exception e) {
e.printStackTrace();
}
return ResponseHelper.buildResponse(null);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "传输目录配置")
@RequestMapping(value = "/config", method = RequestMethod.POST)
public ResponseModel postConfig(@RequestBody AvicCustomPathModel model) {
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient(webserviceUrl);
try {
client.invoke("transferPathConfig", model);
} catch (java.lang.Exception e) {
e.printStackTrace();
}
return ResponseHelper.buildResponse(null);
}
}
package com.yeejoin.amos.avic.service.impl;
import java.io.IOException;
import java.io.InputStream;
import javax.activation.DataHandler;
import javax.jws.WebService;
import org.springframework.stereotype.Component;
import com.yeejoin.amos.avic.face.model.AvicCustomPathModel;
import com.yeejoin.amos.avic.face.webservice.FileFransferService;
@WebService(serviceName = "FileFransferService",
targetNamespace = "http://service.avic.amos.yeejoin.com",
endpointInterface = "com.yeejoin.amos.avic.face.webservice.FileFransferService")
@Component
public class FileFransferServiceImpl implements FileFransferService {
@Override
public void useCodetransferFile(DataHandler handler, String fileName, String path, String code) {
}
@Override
public void transferFile(DataHandler handler, String fileName, String path) {
InputStream is = null;
try {
is = handler.getInputStream();
} catch (IOException e) {
e.printStackTrace();
}finally {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
@Override
public void transferPathConfig(AvicCustomPathModel model) {
}
}
...@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany; ...@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany;
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.api.mapper.DynamicFormInstanceMapper; import com.yeejoin.amos.boot.module.common.api.mapper.DynamicFormInstanceMapper;
import com.yeejoin.amos.boot.module.common.api.mapper.MaintenanceCompanyMapper; import com.yeejoin.amos.boot.module.common.api.mapper.MaintenanceCompanyMapper;
import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper;
import com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService; import com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService;
import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService; import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -76,7 +77,8 @@ public class MaintenanceCompanyServiceImpl ...@@ -76,7 +77,8 @@ public class MaintenanceCompanyServiceImpl
@Autowired @Autowired
SourceFileServiceImpl sourceFileService; SourceFileServiceImpl sourceFileService;
@Autowired
OrgUsrMapper orgUsrMapper;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -710,7 +712,7 @@ public class MaintenanceCompanyServiceImpl ...@@ -710,7 +712,7 @@ public class MaintenanceCompanyServiceImpl
maintenanceCompany.put("type", 1); maintenanceCompany.put("type", 1);
maintenanceCompany.put("parentId", 0); maintenanceCompany.put("parentId", 0);
// 查询该维保单位下的业主信息 // 查询该维保单位下的业主信息
List<OrgUsrDto> orgUsrDtos = this.baseMapper.selectOrgUsrList(list.getSequenceNbr()); List<OrgUsrDto> orgUsrDtos = orgUsrMapper.selectOrgUsrList(list.getSequenceNbr());
orgUsrDtos.forEach(orgUsrDto -> { orgUsrDtos.forEach(orgUsrDto -> {
Map<String, Object> airCompany = new HashMap<>(); Map<String, Object> airCompany = new HashMap<>();
airCompany.put("id", orgUsrDto.getSequenceNbr()); airCompany.put("id", orgUsrDto.getSequenceNbr());
...@@ -718,6 +720,7 @@ public class MaintenanceCompanyServiceImpl ...@@ -718,6 +720,7 @@ public class MaintenanceCompanyServiceImpl
airCompany.put("name", orgUsrDto.getBizOrgName()); airCompany.put("name", orgUsrDto.getBizOrgName());
airCompany.put("type", 2); airCompany.put("type", 2);
airCompany.put("parentId", list.getSequenceNbr()); airCompany.put("parentId", list.getSequenceNbr());
airCompany.put("contractId", orgUsrDto.getContractId());
companysMsg.add(airCompany); companysMsg.add(airCompany);
}); });
companysMsg.add(maintenanceCompany); companysMsg.add(maintenanceCompany);
......
...@@ -217,6 +217,7 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -217,6 +217,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
@RequestParam(value = "isRemoveShield", required = false) String isRemoveShield, @RequestParam(value = "isRemoveShield", required = false) String isRemoveShield,
@RequestParam(value = "id", required = false) String id, @RequestParam(value = "id", required = false) String id,
@RequestParam(value = "cleanStatus", required = false) String cleanStatus, @RequestParam(value = "cleanStatus", required = false) String cleanStatus,
@RequestParam(value = "isRemovedFire", required = false) String isRemovedFire,
CommonPageable commonPageable) { CommonPageable commonPageable) {
List<CommonRequest> queryRequests = new ArrayList<>(); List<CommonRequest> queryRequests = new ArrayList<>();
CommonRequest request = new CommonRequest(); CommonRequest request = new CommonRequest();
...@@ -264,6 +265,10 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -264,6 +265,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
request12.setName("isRemoveShield"); request12.setName("isRemoveShield");
request12.setValue(StringUtil.isNotEmpty(isRemoveShield) ? StringUtils.trimToNull(isRemoveShield) : null); request12.setValue(StringUtil.isNotEmpty(isRemoveShield) ? StringUtils.trimToNull(isRemoveShield) : null);
queryRequests.add(request12); queryRequests.add(request12);
CommonRequest request13 = new CommonRequest();
request13.setName("isRemovedFire");
request13.setValue(StringUtil.isNotEmpty(isRemovedFire) ? StringUtils.trimToNull(isRemovedFire) : null);
queryRequests.add(request13);
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable); CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
org.springframework.data.domain.Page<AlarmListDataVO> list = iEquipmentSpecificAlarmService.listAlarmsPage(param); org.springframework.data.domain.Page<AlarmListDataVO> list = iEquipmentSpecificAlarmService.listAlarmsPage(param);
return CommonResponseUtil.success(list); return CommonResponseUtil.success(list);
......
...@@ -7,6 +7,7 @@ import java.util.Map; ...@@ -7,6 +7,7 @@ import java.util.Map;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -47,7 +48,7 @@ public class View3dController extends AbstractBaseController { ...@@ -47,7 +48,7 @@ public class View3dController extends AbstractBaseController {
@Autowired @Autowired
private IFireFightingSystemService fireFightingSystemService; private IFireFightingSystemService fireFightingSystemService;
@Lazy
@Autowired @Autowired
private IEquipmentSpecificSerivce equipmentSpecificSerivce; private IEquipmentSpecificSerivce equipmentSpecificSerivce;
......
...@@ -180,6 +180,14 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -180,6 +180,14 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
* @return Map<String,Object> * @return Map<String,Object>
*/ */
Map<String,Object> fireWaterSysPool(); Map<String,Object> fireWaterSysPool();
/**
* 消防水系统-》消防管网
* @return Map<String,Object>
*/
Map<String,Object> fireWaterSysPipeNetwork();
/** /**
* 消防水系统-》消火栓按钮 * 消防水系统-》消火栓按钮
* @return Map<String,Object> * @return Map<String,Object>
......
...@@ -377,8 +377,10 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -377,8 +377,10 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
List<Map<String, Object>> result = formInstanceMapper.getParentId(instanceId); List<Map<String, Object>> result = formInstanceMapper.getParentId(instanceId);
if (result.size()>0 && result != null){ if (result.size()>0 && result != null){
result.forEach(e-> result.forEach(e->
{ {
Long subInstanceId =Long.parseLong(e.get("instance_id").toString()); Long subInstanceId =Long.parseLong(e.get("parent_id").toString());
// Long subInstanceId =Long.parseLong(e.get("instance_id").toString());
formInstanceMapper.updateFormInstanceByInstanceAndFieldName("bizOrgCode", bizOrgCode, subInstanceId); formInstanceMapper.updateFormInstanceByInstanceAndFieldName("bizOrgCode", bizOrgCode, subInstanceId);
formInstanceMapper.updateFormInstanceByInstanceAndFieldName("bizOrgName", bizOrgName, subInstanceId); formInstanceMapper.updateFormInstanceByInstanceAndFieldName("bizOrgName", bizOrgName, subInstanceId);
long id1 = Long.parseLong(e.get("id").toString()); long id1 = Long.parseLong(e.get("id").toString());
...@@ -386,15 +388,18 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -386,15 +388,18 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
List<Map<String, Object>> resultSon = formInstanceMapper.getParentId(id1); List<Map<String, Object>> resultSon = formInstanceMapper.getParentId(id1);
if (resultSon.size()>0&& resultSon != null){ if (resultSon.size()>0&& resultSon != null){
resultSon.forEach(r->{ resultSon.forEach(r->{
Long subInstanceId1 =Long.parseLong(r.get("instance_id").toString()); // Long subInstanceId1 =Long.parseLong(r.get("instance_id").toString());
formInstanceMapper.updateFormInstanceByInstanceAndFieldName("bizOrgCode", bizOrgCode, subInstanceId1); Long subInstanceId1 =Long.parseLong(r.get("parent_id").toString());
formInstanceMapper.updateFormInstanceByInstanceAndFieldName("bizOrgCode", bizOrgCode, subInstanceId1);
formInstanceMapper.updateFormInstanceByInstanceAndFieldName("bizOrgName", bizOrgName, subInstanceId1); formInstanceMapper.updateFormInstanceByInstanceAndFieldName("bizOrgName", bizOrgName, subInstanceId1);
long id2 = Long.parseLong(r.get("id").toString()); long id2 = Long.parseLong(r.get("id").toString());
formInstanceMapper.updateStr(id2 ,r.get("name").toString(),r.get("full_name").toString(),r.get("parent_id").toString(),r.get("code").toString(),bizOrgCode,bizOrgName); formInstanceMapper.updateStr(id2 ,r.get("name").toString(),r.get("full_name").toString(),r.get("parent_id").toString(),r.get("code").toString(),bizOrgCode,bizOrgName);
List<Map<String, Object>> resultSons = formInstanceMapper.getParentId(id2); List<Map<String, Object>> resultSons = formInstanceMapper.getParentId(id2);
if (resultSons.size()>0 && !ValidationUtil.isEmpty(resultSons)){ if (resultSons.size()>0 && !ValidationUtil.isEmpty(resultSons)){
resultSons.forEach(z->{ resultSons.forEach(z->{
Long subInstanceId2 =Long.parseLong(z.get("instance_id").toString()); // Long subInstanceId2 =Long.parseLong(z.get("instance_id").toString());
Long subInstanceId2 =Long.parseLong(z.get("parent_id").toString());
formInstanceMapper.updateFormInstanceByInstanceAndFieldName("bizOrgCode", bizOrgCode, subInstanceId2); formInstanceMapper.updateFormInstanceByInstanceAndFieldName("bizOrgCode", bizOrgCode, subInstanceId2);
formInstanceMapper.updateFormInstanceByInstanceAndFieldName("bizOrgName", bizOrgName, subInstanceId2); formInstanceMapper.updateFormInstanceByInstanceAndFieldName("bizOrgName", bizOrgName, subInstanceId2);
long id3 = Long.parseLong(z.get("id").toString()); long id3 = Long.parseLong(z.get("id").toString());
......
...@@ -31,6 +31,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -31,6 +31,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.TransactionSynchronization; import org.springframework.transaction.support.TransactionSynchronization;
...@@ -75,6 +76,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ ...@@ -75,6 +76,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
private IEquipmentSpecificAlarmLogService equipmentSpecificAlarmLogService; private IEquipmentSpecificAlarmLogService equipmentSpecificAlarmLogService;
@Autowired @Autowired
@Lazy
private IEquipmentSpecificSerivce equipmentSpecificSerivce; private IEquipmentSpecificSerivce equipmentSpecificSerivce;
@Autowired @Autowired
...@@ -151,6 +153,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ ...@@ -151,6 +153,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
if (!ObjectUtils.isEmpty(alarmLog)) { if (!ObjectUtils.isEmpty(alarmLog)) {
Long equipmentSpecificAlarmId = alarmLog.getEquipmentSpecificAlarmId(); Long equipmentSpecificAlarmId = alarmLog.getEquipmentSpecificAlarmId();
ent.setEquipmentSpecificAlarmId(equipmentSpecificAlarmId); ent.setEquipmentSpecificAlarmId(equipmentSpecificAlarmId);
ent.setEquipmentSpecificIndexKey(alarmLog.getEquipmentSpecificIndexKey());
String cleanType = equipmentSpecificMapper.getEquipmentBySpecificId(alarmLog.getEquipmentSpecificId()); String cleanType = equipmentSpecificMapper.getEquipmentBySpecificId(alarmLog.getEquipmentSpecificId());
if (StringUtil.isNotEmpty(cleanType) && AlarmCleanTypeEnum.QRXC.getCode().equals(cleanType)) { if (StringUtil.isNotEmpty(cleanType) && AlarmCleanTypeEnum.QRXC.getCode().equals(cleanType)) {
EquipmentSpecificAlarm alarm = equipmentSpecificAlarmMapper.selectById(alarmLog.getEquipmentSpecificAlarmId()); EquipmentSpecificAlarm alarm = equipmentSpecificAlarmMapper.selectById(alarmLog.getEquipmentSpecificAlarmId());
......
...@@ -199,7 +199,10 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -199,7 +199,10 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
@Override @Override
public org.springframework.data.domain.Page<AlarmListDataVO> listAlarmsPage(CommonPageInfoParam param) { public org.springframework.data.domain.Page<AlarmListDataVO> listAlarmsPage(CommonPageInfoParam param) {
Page page = new Page(param.getPageNumber()-1,(param.getPageNumber()-1) * param.getPageSize()); Page page = new Page(param.getPageNumber(), param.getPageSize());
// page.setCurrent(param.getPageNumber() == 1 ? 0 : param.getPageNumber());
// page.setSize(param.getPageNumber() * param.getPageSize());
Page<Map<String, Object>> mybatisResult = this.baseMapper.pageAlarmsInfo(page, param); Page<Map<String, Object>> mybatisResult = this.baseMapper.pageAlarmsInfo(page, param);
List<AlarmListDataVO> res = new ArrayList<>(); List<AlarmListDataVO> res = new ArrayList<>();
if (mybatisResult.getSize() > 0) { if (mybatisResult.getSize() > 0) {
......
...@@ -274,8 +274,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -274,8 +274,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
} }
private void setChargePersonName(FireFightingSystemVo vo) { private void setChargePersonName(FireFightingSystemVo vo) {
if (StringUtil.isNotEmpty(vo.getRecUserId())) { if (StringUtil.isNotEmpty(vo.getChargePerson())) {
FeignClientResult<AgencyUserModel> result = Privilege.agencyUserClient.queryByUserId(vo.getRecUserId());
FeignClientResult<AgencyUserModel> result = Privilege.agencyUserClient.queryByUserId(vo.getChargePerson());
AgencyUserModel userModel = result == null ? new AgencyUserModel() : result.getResult(); AgencyUserModel userModel = result == null ? new AgencyUserModel() : result.getResult();
vo.setChargePersonName(userModel.getRealName()); vo.setChargePersonName(userModel.getRealName());
} }
...@@ -889,6 +890,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -889,6 +890,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
this.putAll(data, fireFightingSystemMapper.fireWaterSysPool()); this.putAll(data, fireFightingSystemMapper.fireWaterSysPool());
this.putAll(data, fireFightingSystemMapper.fireWaterSysWaterPump()); this.putAll(data, fireFightingSystemMapper.fireWaterSysWaterPump());
this.putAll(data, fireFightingSystemMapper.fireWaterSysHydrant()); this.putAll(data, fireFightingSystemMapper.fireWaterSysHydrant());
this.putAll(data, fireFightingSystemMapper.fireWaterSysPipeNetwork());
} else { } else {
data = fireFightingSystemMapper.otherSysIndexNumAndTotal(); data = fireFightingSystemMapper.otherSysIndexNumAndTotal();
} }
......
...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil;
import com.yeejoin.equipmanage.common.dto.MaintenanceResourceDto; import com.yeejoin.equipmanage.common.dto.MaintenanceResourceDto;
import com.yeejoin.equipmanage.common.dto.WaterResourceDto; import com.yeejoin.equipmanage.common.dto.WaterResourceDto;
import com.yeejoin.equipmanage.common.dto.WaterResourceTypeDto; import com.yeejoin.equipmanage.common.dto.WaterResourceTypeDto;
...@@ -123,14 +124,29 @@ public class MaintenanceResourceServiceImpl extends ServiceImpl<MaintenanceResou ...@@ -123,14 +124,29 @@ public class MaintenanceResourceServiceImpl extends ServiceImpl<MaintenanceResou
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
List<MaintenanceResourceDto> companyTree = getCompanyList(appKey, product, token); List<MaintenanceResourceDto> companyTree = getCompanyList(appKey, product, token);
if (!CollectionUtils.isEmpty(companyTree)) { if (!CollectionUtils.isEmpty(companyTree)) {
List<MaintenanceResourceDto> result = new ArrayList<>();
result.addAll(list);
for (int i = 0; i < list.size(); i++) {
for (int j = 0; j < companyTree.size(); j++) {
if (list.get(i).getParentId().equals(companyTree.get(j).getParentId()) && list.get(i).getId().equals(companyTree.get(j).getId()) ){
result.remove(list.get(i));
}
}
}
result.addAll(companyTree);
result.forEach(e->{if (e.getContractId() == null){
e.setContractId(QRCodeUtil.generateQRCode());
}
});
List<MaintenanceResourceDto> dataList = new ArrayList<>(); List<MaintenanceResourceDto> dataList = new ArrayList<>();
list.addAll(companyTree); Map<String, Optional<MaintenanceResourceDto>> collect = result.stream().collect(groupingBy(MaintenanceResourceDto::getContractId, minBy(Comparator.comparing(MaintenanceResourceDto::getParentId))));
Map<String, Optional<MaintenanceResourceDto>> collect = list.stream().collect(groupingBy(MaintenanceResourceDto::getId, minBy(Comparator.comparing(MaintenanceResourceDto::getParentId))));
collect.entrySet().forEach(entry -> { collect.entrySet().forEach(entry -> {
entry.getValue().ifPresent(v -> { entry.getValue().ifPresent(v -> {
dataList.add(v); dataList.add(v);
}); });
}); });
return TreeNodeUtil.assembleTree(dataList); return TreeNodeUtil.assembleTree(dataList);
} }
return TreeNodeUtil.assembleTree(list); return TreeNodeUtil.assembleTree(list);
......
...@@ -73,7 +73,7 @@ public class TagService extends BaseService<KnowledgeTagModel, KnowledgeTag, Tag ...@@ -73,7 +73,7 @@ public class TagService extends BaseService<KnowledgeTagModel, KnowledgeTag, Tag
} }
Long sequenceNbr = sequence.nextId(); Long sequenceNbr = sequence.nextId();
model.setSequenceNbr(sequenceNbr); model.setSequenceNbr(sequenceNbr);
model.setTagStatus(Constants.TAG_STATUS_DEACTIVATE); model.setTagStatus(Constants.TAG_STATUS_ACTIVATE);
model.setAgencyCode(RequestContext.getAgencyCode()); model.setAgencyCode(RequestContext.getAgencyCode());
model.setCreator(RequestContext.getExeUserId()); model.setCreator(RequestContext.getExeUserId());
//创建标签-分组关联关系 //创建标签-分组关联关系
......
...@@ -1985,8 +1985,10 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD ...@@ -1985,8 +1985,10 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
pageParam.put("bizOrgCode", person.get("bizOrgCode").toString().substring(0, 12)); pageParam.put("bizOrgCode", person.get("bizOrgCode").toString().substring(0, 12));
// 登录人为治理人 // 登录人为治理人
pageParam.put("governUserId", jcsUserId); pageParam.put("governUserId", jcsUserId);
pageParam.put("bizType", bizType);
//暂时注释掉,web巡查隐患查不出
//pageParam.put("bizType", bizType);
} }
} }
// pageParam.put("bizType", bizType); // pageParam.put("bizType", bizType);
......
...@@ -54,5 +54,6 @@ ...@@ -54,5 +54,6 @@
<module>amos-boot-module-latentdanger-biz</module> <module>amos-boot-module-latentdanger-biz</module>
<module>amos-boot-module-equip-biz</module> <module>amos-boot-module-equip-biz</module>
<module>amos-boot-module-ccs-biz</module> <module>amos-boot-module-ccs-biz</module>
<module>amos-boot-module-avic-biz</module>
</modules> </modules>
</project> </project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-biz-boot</artifactId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>amos-boot-system-avic</artifactId>
<version>1.0.0</version>
<dependencies>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-avic-biz</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package com.yeejoin.amos;
import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
import java.net.InetAddress;
import java.net.UnknownHostException;
import javax.xml.ws.WebServiceProvider;
/**
* <pre>
* 服务启动类
* </pre>
*/
@SpringBootApplication
@EnableTransactionManagement
@EnableConfigurationProperties
@EnableDiscoveryClient
@EnableFeignClients
@EnableAsync
@MapperScan({"org.typroject.tyboot.demo.face.orm.dao*", "org.typroject.tyboot.face.*.orm.dao*",
"org.typroject.tyboot.core.auth.face.orm.dao*", "org.typroject.tyboot.component.*.face.orm.dao*",
"com.yeejoin.amos.boot.module.*.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper",
"com.yeejoin.amos.avic.face.orm.dao*"})
@ComponentScan(basePackages = {"org.typroject", "com.yeejoin.amos"})
public class AmoAVICApplication {
private static final Logger logger = LoggerFactory.getLogger(AmoAVICApplication.class);
public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext context = SpringApplication.run(AmoAVICApplication.class, args);
Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
GlobalExceptionHandler.setAlwaysOk(true);
logger.info("\n----------------------------------------------------------\n\t"
+ "Application Amos-Biz-Boot is running! Access URLs:\n\t" + "Swagger文档: \thttp://" + ip + ":" + port
+ path + "/doc.html\n" + "----------------------------------------------------------");
}
}
## DB properties:
spring.datasource.url=jdbc:mysql://172.16.3.18:3306/amos_avic_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
## eureka properties:
eureka.instance.hostname=172.16.3.18
eureka.client.serviceUrl.defaultZone=http://${eureka.instance.hostname}:10001/eureka/
## redis properties:
spring.redis.database=1
spring.redis.host=172.16.3.18
spring.redis.port=6379
spring.redis.password=yeejoin@2020
avic.webservice.path=http://localhost:8808/avic/services/fileFransfer?wsdl
\ No newline at end of file
spring.application.name=AMOS-BIZ-AVIC-API
server.servlet.context-path=/avic
server.port=8808
spring.profiles.active=dev
spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
logging.config=classpath:logback-${spring.profiles.active}.xml
## mybatis-plus配置控制台打印完整带参数SQL语句
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
## DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle=10
spring.datasource.hikari.maximum-pool-size=25
spring.datasource.hikari.auto-commit=true
spring.datasource.hikari.idle-timeout=30000
spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.max-lifetime=120000
spring.datasource.hikari.connection-timeout=30000
spring.datasource.hikari.connection-test-query=SELECT 1
##liquibase
spring.liquibase.change-log=classpath:/db/changelog/changelog-master.xml
spring.liquibase.enabled=true
## eureka properties:
eureka.client.registry-fetch-interval-seconds=5
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url-path=/actuator/health
eureka.instance.lease-expiration-duration-in-seconds=10
eureka.instance.lease-renewal-interval-in-seconds=5
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url-path=/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/doc.html
## redis properties:
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
## redis失效时间
redis.cache.failure.time=10800
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
</databaseChangeLog>
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/ccs.log.%d{yyyy-MM-dd}.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>7</MaxHistory>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>${LOG_PATTERN}</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>30mb</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="DEBUG"/>
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
<logger name="com.baomidou.mybatisplus" level="DEBUG"/>
<logger name="org.springframework" level="DEBUG"/>
<logger name="org.typroject" level="DEBUG"/>
<logger name="com.yeejoin" level="DEBUG"/>
<!-- 日志输出级别 -->
<root level="INFO">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url = jdbc:mysql://172.16.6.60:3306/xiy_amos_satety_business?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai spring.datasource.url = jdbc:mysql://172.16.6.60:3306/xiy_amos_satety_business?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=root_123 spring.datasource.password=root_123
spring.datasource.type=com.zaxxer.hikari.HikariDataSource spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.pool-name=DatebookHikariCP spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.minimum-idle= 3 spring.datasource.hikari.minimum-idle= 3
...@@ -20,6 +18,7 @@ fileserver_domain=http://39.98.45.134:9000/ ...@@ -20,6 +18,7 @@ fileserver_domain=http://39.98.45.134:9000/
#eureka.instance.ip-address= 172.16.3.135 #eureka.instance.ip-address= 172.16.3.135
eureka.instance.hostname= 172.16.3.97 eureka.instance.hostname= 172.16.3.97
eureka.instance.prefer-ip-address = true eureka.instance.prefer-ip-address = true
eureka.client.serviceUrl.defaultZone: http://${eureka.instance.hostname}:10001/eureka/ eureka.client.serviceUrl.defaultZone: http://${eureka.instance.hostname}:10001/eureka/
......
...@@ -4791,7 +4791,11 @@ SELECT ...@@ -4791,7 +4791,11 @@ SELECT
`eh`.`ehxfscyw` AS `ehxfscyw`, `eh`.`ehxfscyw` AS `ehxfscyw`,
`eh`.`ehxfscyl` AS `ehxfscyl`, `eh`.`ehxfscyl` AS `ehxfscyl`,
`eh`.`ehxfsccs` AS `ehxfsccs`, `eh`.`ehxfsccs` AS `ehxfsccs`,
`eh`.`ehxfscg` AS `ehxfscg` `eh`.`ehxfscg` AS `ehxfscg`,
`shsx`.`shsxyw` AS `shsxyw`,
`shsx`.`shsxyl` AS `shsxyl`,
`shsx`.`shsxcs` AS `shsxcs`,
`shsx`.`shsxg` AS `shsxg`
FROM FROM
( (
( (
...@@ -4991,7 +4995,106 @@ FROM ...@@ -4991,7 +4995,106 @@ FROM
) )
) `b` ) `b`
) )
) `eh` ON ((1 = 1)) ) `eh` ON 1 = 1
LEFT JOIN (
SELECT
ifnull(sum(`a`.`value`), 0) AS `shsxyw`,
ifnull(
(
CASE
WHEN (`a`.`value` = NULL) THEN
0
WHEN (
(`a`.`value` <> '')
AND (`b`.`height` <> '')
) THEN
round(
(
(`a`.`value` / `b`.`height`) * 100
),
2
)
WHEN (`b`.`height` = NULL) THEN
0
END
),
0
) AS `shsxyl`,
ifnull(`b`.`waterStorage`, 0) AS `shsxcs`,
ifnull(`b`.`height`, 0) AS `shsxg`
FROM
(
(
SELECT
`si`.`value` AS `value`
FROM
(
`wl_equipment_specific_index` `si`
JOIN `wl_equipment_specific` `s`
)
WHERE
(
(
`si`.`equipment_index_key` = 'FHS_FirePoolDevice_WaterLevel'
)
AND (
`s`.`code` = '1HXFSCCJZZ100000'
)
AND (
`si`.`equipment_specific_id` = `s`.`id`
)
)
) `a`
JOIN (
SELECT
max(
(
CASE
WHEN (`i`.`field_name` = 'height') THEN
`i`.`field_value`
END
)
) AS `height`,
max(
(
CASE
WHEN (
`i`.`field_name` = 'waterStorage'
) THEN
`i`.`field_value`
END
)
) AS `waterStorage`
FROM
`wl_form_instance` `i`
WHERE
(
(
(`i`.`field_name` = 'height')
OR (
`i`.`field_name` = 'waterStorage'
)
)
AND (
`i`.`instance_id` = (
SELECT
`i`.`instance_id`
FROM
`wl_form_instance` `i`
WHERE
(
(`i`.`field_name` = 'code')
AND (
`i`.`field_value` = 'SC106268'
)
)
LIMIT 1
)
)
)
) `b`
)
) `shsx` ON 1 = 1
); );
-- 泡沫灭火3小 -- 泡沫灭火3小
DROP VIEW IF EXISTS `v_fire_equip_ffs_num`; DROP VIEW IF EXISTS `v_fire_equip_ffs_num`;
......
...@@ -50,14 +50,14 @@ ...@@ -50,14 +50,14 @@
END# END#
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="suhuiguang" id="1623223065754-3" runAlways="true"> <changeSet author="suhuiguang" id="1623223065756-3" runAlways="true">
<comment>`getChildrenIdsByRootId`</comment> <comment>`getChildrenIdsByRootId`</comment>
<sql endDelimiter="#"> <sql endDelimiter="#">
DROP FUNCTION IF EXISTS `getChildrenIdsByRootId`# DROP FUNCTION IF EXISTS `getChildrenIdsByRootId`#
CREATE FUNCTION `getChildrenIdsByRootId` (`rootId` VARCHAR(100)) RETURNS varchar(1000) CREATE FUNCTION `getChildrenIdsByRootId` (`rootId` VARCHAR(100)) RETURNS text
BEGIN BEGIN
DECLARE ids VARCHAR(1000); DECLARE ids text;
DECLARE ptemp VARCHAR(1000); DECLARE ptemp text;
SELECT SELECT
GROUP_CONCAT(c.instanceId) INTO ids GROUP_CONCAT(c.instanceId) INTO ids
FROM FROM
......
...@@ -319,8 +319,17 @@ ...@@ -319,8 +319,17 @@
wl_equipment_specific_alarm_log wlesal wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment we ON wlesal.equipment_code = we.code LEFT JOIN wl_equipment we ON wlesal.equipment_code = we.code
LEFT JOIN wl_equipment_specific_alarm wlesa ON wlesa.id = wlesal.equipment_specific_alarm_id LEFT JOIN wl_equipment_specific_alarm wlesa ON wlesa.id = wlesal.equipment_specific_alarm_id
WHERE <where>
wlesal.clean_time is NULL ) d <choose>
<when test="param.confirmType != null and param.confirmType == 0">
wlesal.confirm_type is NULL
</when>
<otherwise>
wlesal.clean_time is NULL
</otherwise>
</choose>
</where>
) d
<where> <where>
<if test="param.warehouseStructureName != null and param.warehouseStructureName != ''"> <if test="param.warehouseStructureName != null and param.warehouseStructureName != ''">
d.warehouseStructureName like d.warehouseStructureName like
...@@ -365,6 +374,9 @@ ...@@ -365,6 +374,9 @@
<if test="param.isRemoveShield != null and param.isRemoveShield != ''">AND <if test="param.isRemoveShield != null and param.isRemoveShield != ''">AND
d.type != 'SHIELD' d.type != 'SHIELD'
</if> </if>
<if test="param.isRemovedFire != null and param.isRemovedFire == 1">AND
d.type != 'FIREALARM'
</if>
</where> </where>
ORDER BY d.createDate DESC ORDER BY d.createDate DESC
</select> </select>
......
...@@ -1498,7 +1498,7 @@ ...@@ -1498,7 +1498,7 @@
LEFT JOIN `wl_equipment_detail` wed ON wed.equipment_id = we.id LEFT JOIN `wl_equipment_detail` wed ON wed.equipment_id = we.id
LEFT JOIN `wl_equipment_specific` wes ON wes.equipment_detail_id = wed.id LEFT JOIN `wl_equipment_specific` wes ON wes.equipment_detail_id = wed.id
where where
wes.id = #{specificId} wes.id = #{specificId} AND we.is_iot = '1'
</select> </select>
<select id="getListByWarehouseStructureId" <select id="getListByWarehouseStructureId"
resultType="com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO"> resultType="com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO">
......
...@@ -1447,6 +1447,21 @@ ...@@ -1447,6 +1447,21 @@
<select id="fireWaterSysPool" resultType="java.util.Map"> <select id="fireWaterSysPool" resultType="java.util.Map">
select * from v_fire_pool_water_level select * from v_fire_pool_water_level
</select> </select>
<select id="fireWaterSysPipeNetwork" resultType="java.util.Map">
SELECT
IFNULL(MAX(wesi.`value`), 0) AS xfgwyl
FROM
wl_equipment_specific_index wesi
LEFT JOIN wl_equipment_specific wes ON wes.id = wesi.equipment_specific_id
WHERE
wes.equipment_code = '92011000T5Q44'
AND wesi.equipment_index_key = 'FHS_PipePressureDetector_PipePressure'
ORDER BY
abs( wesi.`value` ) DESC
LIMIT 1
</select>
<select id="fireFoamSysEquipmentIndexNumber" resultType="java.util.Map"> <select id="fireFoamSysEquipmentIndexNumber" resultType="java.util.Map">
select * from v_fire_equip_ffs_num select * from v_fire_equip_ffs_num
</select> </select>
......
spring.application.name=AMOS-API-KNOWLEDGEBASE spring.application.name=AMOS-API-KNOWLEDGEBASE
server.port=30009 server.port=3009
server.servlet.context-path=/knowledgebase server.servlet.context-path=/knowledgebase
spring.profiles.active=dev spring.profiles.active=dev
......
...@@ -271,16 +271,17 @@ ...@@ -271,16 +271,17 @@
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<repositories> <repositories>
<repository> <repository>
<id>Releases</id> <id>Releases</id>
<name>Releases</name> <name>Releases</name>
<url>http://4v059425e3.zicp.vip:13535/nexus/content/repositories/releases/</url> <url>http://36.46.149.14:8081/nexus/content/repositories/releases/</url>
</repository> </repository>
<repository>
<id>Snapshots</id> <repository>
<name>Snapshots</name> <id>Snapshots</id>
<url>http://4v059425e3.zicp.vip:13535/nexus/content/repositories/snapshots/</url> <name>Snapshots</name>
</repository> <url>http://36.46.149.14:8081/nexus/content/repositories/snapshots/</url>
</repository>
<repository> <repository>
<id>com.e-iceblue</id> <id>com.e-iceblue</id>
<name>e-iceblue</name> <name>e-iceblue</name>
...@@ -291,6 +292,7 @@ ...@@ -291,6 +292,7 @@
<modules> <modules>
<module>amos-boot-module</module> <module>amos-boot-module</module>
<module>amos-boot-biz-common</module> <module>amos-boot-biz-common</module>
<module>amos-boot-system-avic</module>
<module>amos-boot-system-tzs</module> <module>amos-boot-system-tzs</module>
<module>amos-boot-system-jcs</module> <module>amos-boot-system-jcs</module>
<module>amos-boot-system-knowledgebase</module> <module>amos-boot-system-knowledgebase</module>
......
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