Commit dd5a38fe authored by hezhuozhi's avatar hezhuozhi

Merge branch 'developer' into developer_bw

# Conflicts: # amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/PowerStationEngineeringInfoAllDto.java
parents 9f2ea623 bbeb4a19
......@@ -64,4 +64,6 @@ public class PowerStationEngineeringInfoAllDto {
//并网信息
AcceptanceCheck acceptanceCheck;
//保存标识 0 保存 1保存并提交
Integer commitFlag;
}
......@@ -84,7 +84,7 @@
</if>
</if>
</where>
<if test="param.offset != null and param.offset != '' and param.limit != null and param.limit != ''">
<if test="param.offset != null and param.limit != null">
LIMIT ${param.offset}, ${param.limit}
</if>
ORDER BY
......
......@@ -191,13 +191,17 @@ public class PeasantHouseholdWxController extends BaseController {
public ResponseModel<PeasantHouseholdWxDto> wxUserRegister(@ApiParam @RequestBody MobileLoginParamDto mobileLoginParam) {
PeasantHousehold peasantHousehold = new PeasantHousehold();
try {
//注册并登录 生成农户信息表数据
PeasantHouseholdWxDto peasantHouseholdWxDto = peasantHouseholdServiceImpl.registerAndLogin(mobileLoginParam);
peasantHousehold = peasantHouseholdWxDto.getPeasantHousehold();
log.info("微信农户注册, 入参 => {}", mobileLoginParam);
PeasantHouseholdDto model = mobileLoginParam.getPeasantHouseholdDto();
validatedPeasantHouseholdDto(model);
log.info("校验通过生成平台账号");
//注册并登录 生成农户信息表数据
PeasantHouseholdWxDto peasantHouseholdWxDto = peasantHouseholdServiceImpl.registerAndLogin(mobileLoginParam);
peasantHousehold = peasantHouseholdWxDto.getPeasantHousehold();
BeanDtoUtils.copyPropertiesAllNonNull(peasantHousehold, model);
log.info("生成农户属性");
model.setPeasantHouseholdNo(peasantHouseholdServiceImpl.getPeasantHouseholdNo(model.getRegionalCompaniesSeq()));
model.setIsCertified(1);// 这里就实名认证
model.setSurveyOrNot(0);
......@@ -232,11 +236,13 @@ public class PeasantHouseholdWxController extends BaseController {
}
}
}
log.info("更新农户信息");
BeanDtoUtils.copyPropertiesAllNonNull(model, peasantHousehold);
PeasantHouseholdDto result = peasantHouseholdServiceImpl.savePeasantHousehold(model, null);
peasantHouseholdWxDto.setPeasantHousehold(peasantHousehold);
return ResponseHelper.buildResponse(peasantHouseholdWxDto);
} catch (Exception e) {
e.printStackTrace();
log.error(e.getMessage());
if (null != peasantHousehold) {
log.error("调用平台接口回滚注册的用户 => {}", e, peasantHousehold.getAmosUserId());
......
......@@ -329,6 +329,13 @@ public class WorkOrderController extends BaseController {
return ResponseHelper.buildResponse(returnDto);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST",value = "更新详情信息", notes = "更新详情信息")
@PostMapping(value = "/updateDetail")
public ResponseModel updateDetail(@RequestBody PowerStationEngineeringInfoAllDto powerStationEngineeringInfoAllDto) {
workOrderServiceImpl.updateDetail(powerStationEngineeringInfoAllDto,getUserId());
return ResponseHelper.buildResponse(null);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -1394,4 +1394,38 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto, WorkOrder, W
}
@Transactional(rollbackFor = Exception.class)
public void updateDetail(PowerStationEngineeringInfoAllDto powerStationEngineeringInfoAllDto,String userId) {
//更新工程
PowerStationEngineeringInfo powerStationEngineeringInfo = powerStationEngineeringInfoAllDto.getPowerStationEngineeringInfo();
if(Objects.nonNull(powerStationEngineeringInfo)){
powerStationEngineeringInfoMapper.updateById(powerStationEngineeringInfo);
}
//更新施工信息
PowerStationConstructionData powerStationConstructionData = powerStationEngineeringInfoAllDto.getPowerStationConstructionData();
if(Objects.nonNull(powerStationConstructionData)){
powerStationConstructionDataMapper.updateById(powerStationConstructionData);
}
//更新并网信息
HygfOnGrid hygfOnGrid = powerStationEngineeringInfoAllDto.getHygfOnGrid();
if(Objects.nonNull(hygfOnGrid)){
hygfOnGridMapper.updateById(hygfOnGrid);
}
//更新设计信息
DesignInformationDto designInformation = powerStationEngineeringInfoAllDto.getDesignInformation();
if(Objects.nonNull(designInformation)){
designInformationService.updateWithModel(designInformation);
}
//更新商务信息
CommercialDto commercial = powerStationEngineeringInfoAllDto.getCommercial();
if(Objects.nonNull(commercial)){
commercialService.updateWithModel(commercial);
}
//提交
if(powerStationEngineeringInfoAllDto.getCommitFlag() == 1 && Objects.nonNull(hygfOnGrid)){
hygfOnGrid.setType("1");
basicGridAcceptanceService.saveAndCommit(hygfOnGrid,userId);
}
}
}
\ No newline at end of file
......@@ -256,7 +256,8 @@ hygf.icbc.myPrivateKey=MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCxMt/01
hygf.icbc.serviceUrl=https://apipcs3.dccnet.com.cn
hygf.icbc.aesKey=5xGJdh7qb+B95SUoxDlatg==
#hygf.icbc.camsPublicKey=040978047533e0e7381dbb5d794b268cd68ad4655712d3de5bb37d6883c02e474374ff4dac6d706cef661aaa788c1dfc2c2f74b91d05f406ea135b865b416c8f97
hygf.icbc.camsPublicKey=7E095625BE87DF744C916E40BD6B1C1EA486125CA566006062D8FFBBD8BD536ABA64DA6B6A6070D65148A734F660A2A742372E5965E87F99CD644FAB5F6DF2B2hygf.icbc.apigwPublicKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB
hygf.icbc.camsPublicKey=7E095625BE87DF744C916E40BD6B1C1EA486125CA566006062D8FFBBD8BD536ABA64DA6B6A6070D65148A734F660A2A742372E5965E87F99CD644FAB5F6DF2B2
hygf.icbc.apigwPublicKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB
hygf.icbc.outVendorId=071301
hygf.icbc.projectId=PJ14001401B000160171
......
......@@ -2,7 +2,7 @@ spring.application.name=AMOS-HYGF-YY
server.servlet.context-path=/hygf
server.port=33330
server.uri-encoding=UTF-8
spring.profiles.active=dev
spring.profiles.active=kingbase8
spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
logging.config=classpath:logback-${spring.profiles.active}.xml
......
......@@ -151,4 +151,12 @@ public class IdxBizFanPointVarCorrelationController extends BaseController {
return ResponseHelper.buildResponse(idxBizFanPointVarCorrelationServiceImpl.getDetailBySequenceNbr(sequenceNbr));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST",value = "查询当前点位所选择的工况变量", notes = "查询当前点位所选择的工况变量")
@PostMapping(value = "/updatePointChooseBySequenceNbrList")
public ResponseModel updatePointChooseBySequenceNbrList(@RequestBody IdxBizFanPointVarCorrelationDto dto) {
idxBizFanPointVarCorrelationServiceImpl.updatePointChooseBySequenceNbrList(dto.getSequenceNbrList());
return CommonResponseUtil.success();
}
}
......@@ -152,4 +152,11 @@ public class IdxBizPvPointVarCorrelationController extends BaseController {
return ResponseHelper.buildResponse(idxBizPvPointVarCorrelationServiceImpl.getDetailBySequenceNbr(sequenceNbr));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST",value = "查询当前点位所选择的工况变量", notes = "查询当前点位所选择的工况变量")
@PostMapping(value = "/updatePointChooseBySequenceNbrList")
public ResponseModel updatePointChooseBySequenceNbrList(@RequestBody IdxBizFanPointVarCorrelationDto dto) {
idxBizPvPointVarCorrelationServiceImpl.updatePointChooseBySequenceNbrList(dto.getSequenceNbrList());
return CommonResponseUtil.success();
}
}
......@@ -590,7 +590,9 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
@RequestParam(value = "warningName", required = false) String warningName,
@RequestParam(value = "stationId", required = false) String stationId,
@RequestParam(value = "startDate", required = false) String startDate,
@RequestParam(value = "endDate", required = false) String endDate) {
@RequestParam(value = "endDate", required = false) String endDate,
@RequestParam(value = "disposotionState", required = false) String disposotionState
) {
String syzGatewayId="";
if (StrUtil.isNotEmpty(stationId)) {
StationBasic stationBasic = stationBasicMapper.selectById(stationId);
......@@ -601,7 +603,7 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
arae = "%" + arae + "%";
}
Integer count = fanWaringRecordMapper.getEquipWarningInfoByPageCount(arae, station, stationType, warningName,
stationId, startDate, endDate,syzGatewayId);
stationId, startDate, endDate,syzGatewayId,disposotionState);
// 前端存在分页bug 此处限制分页后筛选导致页面超出问题
if (count > 0 && current > (count / 10 + 1)) {
current = 1;
......@@ -611,7 +613,7 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
// stationType, (current - 1) * size, size, warningName, stationId, startDate,
// endDate);
List<FanWarningRecord> idxBizFanWarningRecordIPage = fanWaringRecordMapper.getEquipWarningInfoByPage(arae,
station, stationType, (current - 1) * size, size, warningName, stationId, startDate, endDate,syzGatewayId);
station, stationType, (current - 1) * size, size, warningName, stationId, startDate, endDate,syzGatewayId,disposotionState);
Page<FanWarningRecord> idxBizFanWarningRecordPage = new Page<>(current, size);
idxBizFanWarningRecordPage.setRecords(idxBizFanWarningRecordIPage);
......@@ -1661,7 +1663,13 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
Map<String, Object> resultMap = new HashMap<>();
List<FanHealthIndex> fanHealthIndexList = fanHealthIndexMapper.selectList(lambdaQueryWrapper);
if(CollectionUtil.isNotEmpty(fanHealthIndexList)){
Collections.sort(fanHealthIndexList, (o1, o2) -> {
Date date1 = DateUtils.dateParse(o1.getRecDate());
Date date2 = DateUtils.dateParse(o2.getRecDate());
return date1.compareTo(date2);
});
}
List<String> time = new ArrayList<>();
List<Object> valueList = new ArrayList<>();
fanHealthIndexList.forEach(item -> {
......@@ -1697,7 +1705,13 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
lambdaQueryWrapper.last("limit 15");
List<PvHealthIndex> fanHealthIndexDayList = pvHealthIndexMapper.selectList(lambdaQueryWrapper);
if(CollectionUtil.isNotEmpty(fanHealthIndexDayList)){
Collections.sort(fanHealthIndexDayList, (o1, o2) -> {
Date date1 = DateUtils.dateParse(o1.getRecDate());
Date date2 = DateUtils.dateParse(o2.getRecDate());
return date1.compareTo(date2);
});
}
HashMap<String, Object> resultMap = new HashMap<>();
List<String> time = new ArrayList<>();
List<Object> valueList = new ArrayList<>();
......
......@@ -186,6 +186,10 @@ public class TdInfoQueryController extends BaseController {
{
throw new Exception("请选择开始时间和结束时间");
}
Page<FanHealthIndex> resultPage = new Page<>(dto.getCurrent(), dto.getSize());
if(DateUtils.dateParse(dto.getStartDate()).after(DateUtils.dateParse(dto.getEndDate()))){
return ResponseHelper.buildResponse(resultPage);
}
ReginParams reginParams = getSelectedOrgInfo();
String userId = reginParams.getUserModel().getUserId();
StdUserEmpower stdUserEmpower = userEmpowerMapper.selectOne(new QueryWrapper<StdUserEmpower>().eq("amos_user_id", userId).eq("permission_type", "YTH"));
......@@ -211,6 +215,9 @@ public class TdInfoQueryController extends BaseController {
Long startTs = pvHealthIndexMapper.getTsByRecDateGT("fan_health_index_data", startDate+" 00:00:00", "Asc ");
dto.setStartDateTs(startTs);
}
if(dto.getStartDateTs()==null){
return ResponseHelper.buildResponse(resultPage);
}
}
if (CharSequenceUtil.isNotEmpty(dto.getEndDate())) {
String dateNowShortStr = DateUtils.getDateNowShortStr();
......@@ -238,8 +245,10 @@ public class TdInfoQueryController extends BaseController {
dto.setEndDateTs(endTs);
dto.setTableName("fan_health_index_data");
}
if(dto.getEndDateTs()==null){
return ResponseHelper.buildResponse(resultPage);
}
}
Page<FanHealthIndex> resultPage = new Page<>(dto.getCurrent(), dto.getSize());
dto.setCurrent((dto.getCurrent() - 1) * dto.getSize());
if (CharSequenceUtil.isNotEmpty(dto.getSortsString())) {
ObjectMapper objectMapper = new ObjectMapper();
......@@ -265,7 +274,7 @@ public class TdInfoQueryController extends BaseController {
String orderColumn = convert(split[0]) + " " + replace;
dto.setSortOne(orderColumn);
}
if(dto.getEndDateTs()==null&&dto.getStartDateTs()==null)
if(dto.getEndDateTs()==null&&dto.getStartDateTs()==null)
{
return ResponseHelper.buildResponse(resultPage);
}
......@@ -307,6 +316,10 @@ public class TdInfoQueryController extends BaseController {
{
throw new Exception("请选择开始时间和结束时间");
}
Page<PvHealthIndex> resultPage = new Page<>(dto.getCurrent(), dto.getSize());
if(DateUtils.dateParse(dto.getStartDate()).after(DateUtils.dateParse(dto.getEndDate()))){
return ResponseHelper.buildResponse(resultPage);
}
ReginParams reginParams = getSelectedOrgInfo();
String userId = reginParams.getUserModel().getUserId();
StdUserEmpower stdUserEmpower = userEmpowerMapper.selectOne(new QueryWrapper<StdUserEmpower>().eq("amos_user_id", userId).eq("permission_type", "YTH"));
......@@ -333,6 +346,9 @@ public class TdInfoQueryController extends BaseController {
Long startTs = pvHealthIndexMapper.getTsByRecDateGT("pv_health_index_data", startDate+" 00:00:00", "Asc ");
dto.setStartDateTs(startTs);
}
if(dto.getStartDateTs()==null){
return ResponseHelper.buildResponse(resultPage);
}
}
if (CharSequenceUtil.isNotEmpty(dto.getEndDate())) {
String dateNowShortStr = DateUtils.getDateNowShortStr();
......@@ -360,6 +376,9 @@ public class TdInfoQueryController extends BaseController {
dto.setEndDateTs(endTs);
dto.setTableName("pv_health_index_data");
}
if(dto.getEndDateTs()==null){
return ResponseHelper.buildResponse(resultPage);
}
}
if (CharSequenceUtil.isNotEmpty(dto.getSortsString())) {
ObjectMapper objectMapper = new ObjectMapper();
......@@ -370,7 +389,6 @@ public class TdInfoQueryController extends BaseController {
e.printStackTrace();
}
}
Page<PvHealthIndex> resultPage = new Page<>(dto.getCurrent(), dto.getSize());
dto.setCurrent((dto.getCurrent() - 1) * dto.getSize());
List<Map<String, String>> orderWeight = dto.getSorts().stream().sorted(Comparator.comparing(t -> Integer.parseInt(t.get("orderWeight")))).collect(Collectors.toList());
List<String> orderByList = new ArrayList<>();
......@@ -387,7 +405,7 @@ public class TdInfoQueryController extends BaseController {
}
String join = String.join(",", orderByList);
dto.setOrderColumns(join);
if(dto.getEndDateTs()==null&&dto.getStartDateTs()==null)
if(dto.getEndDateTs()==null&&dto.getStartDateTs()==null)
{
return ResponseHelper.buildResponse(resultPage);
}
......
......@@ -89,4 +89,6 @@ public class IdxBizFanPointVarCorrelationDto {
@TableField(exist = false)
private List<String> processPointIds;
@TableField(exist = false)
private List<String> sequenceNbrList;
}
......@@ -10,11 +10,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanPointVarCorrelationDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointVarCorrelation;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWeight;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointVarCorrelation;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointVarCorrelationMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizFanPointVarCorrelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.ArrayList;
import java.util.List;
......@@ -103,7 +105,32 @@ public class IdxBizFanPointVarCorrelationServiceImpl extends BaseService<IdxBizF
wrapper.eq(IdxBizFanPointVarCorrelation::getEquipmentName, fanPointVarCorrelation.getEquipmentName());
wrapper.eq(IdxBizFanPointVarCorrelation::getSubSystem, fanPointVarCorrelation.getSubSystem());
wrapper.eq(IdxBizFanPointVarCorrelation::getAnalysisPointId, fanPointVarCorrelation.getAnalysisPointId());
wrapper.orderByDesc(IdxBizFanPointVarCorrelation::getMatchProcessPoint).orderByAsc(IdxBizFanPointVarCorrelation::getProcessPointName);
List<IdxBizFanPointVarCorrelation> fanPointVarCorrelationList = list(wrapper);
return fanPointVarCorrelationList;
}
public void updatePointChooseBySequenceNbrList(List<String> sequenceNbrList) {
if(CollectionUtil.isNotEmpty(sequenceNbrList) ){
if(sequenceNbrList.size()>3){
throw new BadRequest("最多选择3个");
}
LambdaQueryWrapper<IdxBizFanPointVarCorrelation> wrapper = new LambdaQueryWrapper<>();
wrapper.in(IdxBizFanPointVarCorrelation::getSequenceNbr, sequenceNbrList);
List<IdxBizFanPointVarCorrelation> fanPointVarCorrelations = list(wrapper);
if(CollectionUtil.isNotEmpty(fanPointVarCorrelations)){
IdxBizFanPointVarCorrelation firstData = fanPointVarCorrelations.get(0);
String analysisGatewayId = firstData.getAnalysisGatewayId();
Long analysisPointId = firstData.getAnalysisPointId();
List<String> processPointIds = new ArrayList<>();
for (IdxBizFanPointVarCorrelation fanPointVarCorrelation : fanPointVarCorrelations) {
if(!analysisGatewayId.equals(fanPointVarCorrelation.getAnalysisGatewayId())|| !analysisPointId.equals(fanPointVarCorrelation.getAnalysisPointId())){
throw new BadRequest("不是同一批分析测点无法操作");
}
processPointIds.add(String.valueOf(fanPointVarCorrelation.getProcessPointId()));
}
updatePointChoose(analysisGatewayId,Long.valueOf(analysisPointId),processPointIds);
}
}
}
}
\ No newline at end of file
......@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizPvPointVarCorrelati
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.ArrayList;
import java.util.List;
......@@ -103,7 +104,32 @@ public class IdxBizPvPointVarCorrelationServiceImpl extends BaseService<IdxBizPv
wrapper.eq(IdxBizPvPointVarCorrelation::getEquipmentName, pvPointVarCorrelation.getEquipmentName());
wrapper.eq(IdxBizPvPointVarCorrelation::getSubarray, pvPointVarCorrelation.getSubarray());
wrapper.eq(IdxBizPvPointVarCorrelation::getAnalysisPointId, pvPointVarCorrelation.getAnalysisPointId());
wrapper.orderByDesc(IdxBizPvPointVarCorrelation::getMatchProcessPoint).orderByAsc(IdxBizPvPointVarCorrelation::getProcessPointName);
List<IdxBizPvPointVarCorrelation> pvPointVarCorrelationList = list(wrapper);
return pvPointVarCorrelationList;
}
public void updatePointChooseBySequenceNbrList(List<String> sequenceNbrList) {
if(CollectionUtil.isNotEmpty(sequenceNbrList) ){
if(sequenceNbrList.size()>3){
throw new BadRequest("最多选择3个");
}
LambdaQueryWrapper<IdxBizPvPointVarCorrelation> wrapper = new LambdaQueryWrapper<>();
wrapper.in(IdxBizPvPointVarCorrelation::getSequenceNbr, sequenceNbrList);
List<IdxBizPvPointVarCorrelation> pvPointVarCorrelations = list(wrapper);
if(CollectionUtil.isNotEmpty(pvPointVarCorrelations)){
IdxBizPvPointVarCorrelation firstData = pvPointVarCorrelations.get(0);
String analysisGatewayId = firstData.getAnalysisGatewayId();
String analysisPointId = firstData.getAnalysisPointId();
List<String> processPointIds = new ArrayList<>();
for (IdxBizPvPointVarCorrelation pvPointdVarCorrelation : pvPointVarCorrelations) {
if(!analysisGatewayId.equals(pvPointdVarCorrelation.getAnalysisGatewayId())|| !analysisPointId.equals(pvPointdVarCorrelation.getAnalysisPointId())){
throw new BadRequest("不是同一批分析测点无法操作");
}
processPointIds.add(pvPointdVarCorrelation.getProcessPointId());
}
updatePointChoose(analysisGatewayId,Long.valueOf(analysisPointId),processPointIds);
}
}
}
}
\ No newline at end of file
......@@ -41,9 +41,10 @@ public interface FanWaringRecordMapper extends BaseMapper<FanWarningRecord> {
@Param("warningName") String warningName,
@Param("stationId") String stationId,
@Param("startDate") String startDate,
@Param("endDate") String endDate,@Param("syzGatewayId") String syzGatewayId);
@Param("endDate") String endDate,@Param("syzGatewayId") String syzGatewayId,
@Param("disposotionState")String disposotionState);
List<FanWarningRecord> getEquipWarningInfoByPage(String arae, String station, String stationType, Integer current, Integer size, String warningName, String stationId, String startDate, String endDate,@Param("syzGatewayId") String syzGatewayId);
List<FanWarningRecord> getEquipWarningInfoByPage(String arae, String station, String stationType, Integer current, Integer size, String warningName, String stationId, String startDate, String endDate,@Param("syzGatewayId") String syzGatewayId,@Param("disposotionState")String disposotionState);
List<Map<String, Object>> getAllEquipAlarmInfoAnalysisByArea(String araeCode, String stationType);
......
......@@ -68,7 +68,7 @@ emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://10.20.1.210:2883
emqx.user-name=admin
emqx.password=public
emqx.password=Yeejoin@2020
mqtt.scene.host=mqtt://10.20.1.210:8083/mqtt
mqtt.client.product.id=mqtt
mqtt.topic=topic_mqtt
......
......@@ -381,6 +381,9 @@
<if test="endDate != '' and endDate != null">
and concat(#{endDate}, ' 23:59:59') >= a.recdate
</if>
<if test="disposotionState != '' and disposotionState != null">
and a.disposotionstate = #{disposotionState}
</if>
</where>
order by recDate desc
limit #{current}, #{size}
......@@ -446,7 +449,9 @@
<if test="endDate != '' and endDate != null">
and concat(#{endDate}, ' 23:59:59') >= a.recdate
</if>
<if test="disposotionState != '' and disposotionState != null">
and a.disposotionstate = #{disposotionState}
</if>
</where>) b
</select>
......
......@@ -179,4 +179,10 @@ public class StationBasic extends BaseEntity {
*/
@TableField("equip_numbers")
private Integer equipNumbers=0;
/**
* 卡片url
*/
@TableField("card_url")
private String cardUrl;
}
......@@ -149,4 +149,4 @@ pictureUrl=upload/jxiop/syz/
idx.predict.serviceUrl=http://10.20.1.157:8095/jxdj/predict-data
forecast.url=
logic=
\ No newline at end of file
logic=false
\ No newline at end of file
......@@ -27,10 +27,10 @@ spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
## eureka properties:
#eureka.instance.hostname=139.9.173.44
eureka.instance.prefer-ip-address = true
eureka.client.serviceUrl.defaultZone=http://admin:a1234560@47.92.234.253:10001/eureka/
eureka.client.serviceUrl.defaultZone=http://admin:a1234560@10.20.1.160:10001/eureka/
## redis properties:
spring.redis.database=1
spring.redis.host=47.92.234.253
spring.redis.host=10.20.1.210
spring.redis.port=6379
spring.redis.password=yeejoin@2020
......@@ -68,10 +68,10 @@ emqx.clean-session=true
emqx.client-id=AMOS-JXIOP-BIGSCREEN
emqx.client-user-name=
emqx.client-password=
emqx.broker=tcp://47.92.234.253:2883
emqx.broker=tcp://10.20.1.210:2883
emqx.user-name=admin
emqx.password=public
mqtt.scene.host=mqtt://47.92.234.253:8083/mqtt
mqtt.scene.host=mqtt://10.20.1.210:8083/mqtt
mqtt.client.product.id=mqtt
mqtt.topic=topic_mqtt
spring.mqtt.completionTimeout=3000
......@@ -146,3 +146,7 @@ large.cron=0 0/5 * * * ?
forecast.url=
logic=
amos.system.user.user-name=hygf_robot
amos.system.user.password=a123456789
amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product=AMOS_STUDIO_WEB
......@@ -2,7 +2,7 @@ spring.application.name=AMOS-JXIOP-BIGSCREEN-CZ
server.servlet.context-path=/jxiop-bigscreen
server.port=33300
server.uri-encoding=UTF-8
spring.profiles.active=kingbase8
spring.profiles.active=dev1
spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
logging.config=classpath:logback-${spring.profiles.active}.xml
......
......@@ -28,14 +28,14 @@
</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"/>
<logger name="com.apache.ibatis" level="INFO"/>
<logger name="java.sql.Connection" level="INFO"/>
<logger name="java.sql.Statement" level="INFO"/>
<logger name="java.sql.PreparedStatement" level="INFO"/>
<logger name="com.baomidou.mybatisplus" level="INFO"/>
<logger name="org.springframework" level="INFO"/>
<logger name="org.typroject" level="INFO"/>
<logger name="com.yeejoin" level="INFO"/>
<!-- 日志输出级别 -->
<root level="INFO">
<appender-ref ref="FILE" />
......
......@@ -15,11 +15,11 @@ spring.db3.datasource.username=root
spring.db3.datasource.password=Yeejoin@2020
## eureka properties:
eureka.instance.hostname=47.92.234.253
eureka.instance.hostname=10.20.1.160
eureka.client.serviceUrl.defaultZone=http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties:
spring.redis.database=1
spring.redis.host=47.92.234.253
spring.redis.host=10.20.1.210
spring.redis.port=6379
spring.redis.password=yeejoin@2020
......
......@@ -36,11 +36,13 @@ public class DZMTSJServiceImpl implements IJXDZService {
@Override
public void backupData(List list, Long dateTime) {
Date date = new Date();
if (CollectionUtil.isNotEmpty(list)) {
List<StationDailyDataEntity> stationDailyDataEntityList = new ArrayList<>();
list.forEach(item -> {
StationDailyDataEntity stationDailyDataEntity = BeanUtil.copyProperties(item, StationDailyDataEntity.class);
stationDailyDataEntity.setDateTime(dateTime);
stationDailyDataEntity.setRecDate(date);
stationDailyDataEntityList.add(stationDailyDataEntity);
});
stationDailyDataService.saveBatch(stationDailyDataEntityList);
......
......@@ -31,11 +31,13 @@ public class FDZJCServiceImpl implements IJXDZService {
@Override
public void backupData(List list, Long dateTime) {
Date date = new Date();
if (CollectionUtil.isNotEmpty(list)) {
List<WindStationDataEntity> windStationDataEntityList = new ArrayList<>();
list.forEach(item -> {
WindStationDataEntity windStationDataEntity = BeanUtil.copyProperties(item, WindStationDataEntity.class);
windStationDataEntity.setDateTime(dateTime);
windStationDataEntity.setRecDate(date);
windStationDataEntityList.add(windStationDataEntity);
});
windStationDataService.saveBatch(windStationDataEntityList);
......
......@@ -17,10 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
@Service
public class FDZSBJCServiceImpl implements IJXDZService {
......@@ -33,11 +30,13 @@ public class FDZSBJCServiceImpl implements IJXDZService {
@Override
public void backupData(List list, Long dateTime) {
Date date = new Date();
if (CollectionUtil.isNotEmpty(list)) {
List<WindDeviceDataEntity> windDeviceDataEntityList = new ArrayList<>();
list.forEach(item -> {
WindDeviceDataEntity windDeviceDataEntity = BeanUtil.copyProperties(item, WindDeviceDataEntity.class);
windDeviceDataEntity.setDateTime(dateTime);
windDeviceDataEntity.setRecDate(date);
windDeviceDataEntityList.add(windDeviceDataEntity);
});
windDeviceDataService.saveBatch(windDeviceDataEntityList);
......
......@@ -31,11 +31,13 @@ public class GFDZJCServiceImpl implements IJXDZService {
@Override
public void backupData(List list, Long dateTime) {
Date date = new Date();
if (CollectionUtil.isNotEmpty(list)) {
List<PvStationDataEntity> pvStationDataEntityList = new ArrayList<>();
list.forEach(item -> {
PvStationDataEntity pvStationDataEntity = BeanUtil.copyProperties(item, PvStationDataEntity.class);
pvStationDataEntity.setDateTime(dateTime);
pvStationDataEntity.setRecDate(date);
pvStationDataEntityList.add(pvStationDataEntity);
});
pvStationDataService.saveBatch(pvStationDataEntityList);
......
......@@ -18,10 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
@Service
public class GFDZSBJCServiceImpl implements IJXDZService {
......@@ -34,11 +31,13 @@ public class GFDZSBJCServiceImpl implements IJXDZService {
@Override
public void backupData(List list, Long dateTime) {
Date date = new Date();
if (CollectionUtil.isNotEmpty(list)) {
List<PvDeviceDataEntity> pvDeviceDataEntityList = new ArrayList<>();
list.forEach(item -> {
PvDeviceDataEntity pvDeviceDataEntity = BeanUtil.copyProperties(item, PvDeviceDataEntity.class);
pvDeviceDataEntity.setDateTime(dateTime);
pvDeviceDataEntity.setRecDate(date);
pvDeviceDataEntityList.add(pvDeviceDataEntity);
});
pvDeviceDataService.saveBatch(pvDeviceDataEntityList);
......
......@@ -138,6 +138,7 @@ public class JXDZUtils {
log.info("发送GET请求,请求地址{}", reqUrl);
HttpEntity entity = new HttpEntity<>(buildHttpHeaders());
try {
log.info("发送GET请求,请求报文{}",entity);
ResponseEntity<JSONObject> response = restTemplate.exchange(reqUrl, HttpMethod.GET, entity, JSONObject.class);
if (HttpStatus.OK == response.getStatusCode()) {
log.info("发送请求成功,请求返回体{}", response.getBody());
......@@ -163,6 +164,7 @@ public class JXDZUtils {
log.info("发送POST请求,请求地址{}", reqUrl);
HttpEntity<JSONObject> entity = new HttpEntity<>(buildBody(needDataVO.getPlatformId(), needDataVO.getDateTime(), data, accessType, needDataVO.getReaccessId()), buildHttpHeaders());
try {
log.info("发送POST请求,请求报文{}",entity);
ResponseEntity<JSONObject> response = restTemplate.postForEntity(reqUrl, entity, JSONObject.class);
if (HttpStatus.OK == response.getStatusCode()) {
JSONObject body = response.getBody();
......@@ -175,7 +177,6 @@ public class JXDZUtils {
}
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new BadRequest("发送POST请求失败,失败原因[" + e.getMessage() + "]");
}
}
......@@ -219,6 +220,7 @@ public class JXDZUtils {
}
jsonObject.put("time", time);
jsonObject.put("data", data);
log.info("发送的原始数据{}",jsonObject);
return dataEncrypt(jsonObject.toJSONString(), publicKey);
}
}
## DB properties:
## db1-production database
spring.db1.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.url=jdbc:kingbase8://10.20.1.176:54321/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.url=jdbc:kingbase8://10.20.1.176:54321/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8&binaryTransferDisable=TINYINT
spring.db1.datasource.username=root
spring.db1.datasource.password=Yeejoin@2020
spring.db1.datasource.driver-class-name:com.kingbase8.Driver
## db2-sync_data
spring.db2.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db2.datasource.url=jdbc:kingbase8://10.20.1.176:54321/jxiop_sync_data?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db2.datasource.url=jdbc:kingbase8://10.20.1.176:54321/jxiop_sync_data?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8&binaryTransferDisable=TINYINT
spring.db2.datasource.username=root
spring.db2.datasource.password=Yeejoin@2020
spring.db2.datasource.driver-class-name: com.kingbase8.Driver
## db4-equip
spring.db4.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db4.datasource.url=jdbc:kingbase8://10.20.1.176:54321/equipment?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db4.datasource.url=jdbc:kingbase8://10.20.1.176:54321/equipment?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8&binaryTransferDisable=TINYINT
spring.db4.datasource.username=root
spring.db4.datasource.password=Yeejoin@2020
spring.db4.datasource.driver-class-name: com.kingbase8.Driver
## db5-amos_project
spring.db5.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db5.datasource.url=jdbc:kingbase8://10.20.1.176:54321/amos_project?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db5.datasource.url=jdbc:kingbase8://10.20.1.176:54321/amos_project?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8&binaryTransferDisable=TINYINT
spring.db5.datasource.username=root
spring.db5.datasource.password=Yeejoin@2020
spring.db5.datasource.driver-class-name: com.kingbase8.Driver
......@@ -34,11 +34,11 @@ spring.db3.datasource.password=taosdata
spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
## eureka properties:
eureka.instance.hostname=47.92.234.253
eureka.instance.hostname=10.20.1.160
eureka.client.serviceUrl.defaultZone=http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
## redis properties:
spring.redis.database=1
spring.redis.host=47.92.234.253
spring.redis.host=10.20.1.210
spring.redis.port=6379
spring.redis.password=yeejoin@2020
......
## DB properties:
## db1-production database
spring.db1.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.url=jdbc:mysql://139.9.173.44:3306/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.url=jdbc:mysql://139.9.173.44:3306/production?alloviwMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.db1.datasource.username=root
spring.db1.datasource.password=Yeejoin@2020
spring.db1.datasource.driver-class-name: com.mysql.cj.jdbc.Driver
......@@ -136,6 +136,8 @@ pictureUrl=upload/jxiop/syz/
daily.power.generation.cron=0/30 * * * * ?
moon.power.generation.cron=0/30 * * * * ?
year.power.generation.cron=0/30 * * * * ?
emqx.client-user-name=admin
emqx.client-password=public
......
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