master
parent
229b7373b3
commit
56788216ed
2
ruoyi
2
ruoyi
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6a52c42db8cf808d63dcb49723ee3866cf381505
|
Subproject commit ed710408bffa365228193ae257e70bfcb33469dd
|
||||||
|
|
@ -7,7 +7,6 @@ import com.gunshi.project.xyt.entity.so.MessageCenterPageSo;
|
||||||
import com.gunshi.project.xyt.model.MessageCenter;
|
import com.gunshi.project.xyt.model.MessageCenter;
|
||||||
import com.gunshi.project.xyt.service.MessageCenterService;
|
import com.gunshi.project.xyt.service.MessageCenterService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
@ -43,8 +42,8 @@ public class MessageCenterController {
|
||||||
|
|
||||||
@Operation(summary = "全部标注已读")
|
@Operation(summary = "全部标注已读")
|
||||||
@GetMapping("/all/read")
|
@GetMapping("/all/read")
|
||||||
public R<Boolean> allRead(@RequestParam("receiveUserId") @Parameter(description = "接收人id") Long receiveUserId) {
|
public R<Boolean> allRead() {
|
||||||
return R.ok(service.allRead(receiveUserId));
|
return R.ok(service.allRead());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "APP-消息中心")
|
@Operation(summary = "APP-消息中心")
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ public interface OsmoticPressRMapper extends BaseMapper<OsmoticPressR> {
|
||||||
<script>
|
<script>
|
||||||
select to_char(t.tm,'YYYY-MM-DD') as tm,t.rz
|
select to_char(t.tm,'YYYY-MM-DD') as tm,t.rz
|
||||||
from public.st_rsvr_r t
|
from public.st_rsvr_r t
|
||||||
where to_char(t.tm, 'HH24:MI:SS') = '08:00:00' and t.stcd = '61610700'
|
where to_char(t.tm, 'HH24:MI:SS') = '08:00:00' and t.stcd = #{stcd}
|
||||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||||
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -63,7 +63,7 @@ public interface OsmoticPressRMapper extends BaseMapper<OsmoticPressR> {
|
||||||
order by t.tm desc
|
order by t.tm desc
|
||||||
</script>
|
</script>
|
||||||
""")
|
""")
|
||||||
List<StRzVo> queryRz(@Param("obj") OsmoticQuerySo osmoticQuerySo);
|
List<StRzVo> queryRz(@Param("obj") OsmoticQuerySo osmoticQuerySo,@Param("stcd") String stcd);
|
||||||
|
|
||||||
@Select("""
|
@Select("""
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -93,7 +93,7 @@ public interface OsmoticPressRMapper extends BaseMapper<OsmoticPressR> {
|
||||||
<script>
|
<script>
|
||||||
select to_char(t.tm,'YYYY-MM-DD HH24:MI:SS') as tm,t.rz
|
select to_char(t.tm,'YYYY-MM-DD HH24:MI:SS') as tm,t.rz
|
||||||
from public.st_rsvr_r t
|
from public.st_rsvr_r t
|
||||||
where t.stcd = '61610700'
|
where t.stcd = #{stcd}
|
||||||
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
||||||
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -103,7 +103,7 @@ public interface OsmoticPressRMapper extends BaseMapper<OsmoticPressR> {
|
||||||
order by t.tm desc
|
order by t.tm desc
|
||||||
</script>
|
</script>
|
||||||
""")
|
""")
|
||||||
List<StRzVo> queryLineRz(@Param("obj") OsmoticQuerySo osmoticQuerySo);
|
List<StRzVo> queryLineRz(@Param("obj") OsmoticQuerySo osmoticQuerySo,@Param("stcd") String stcd);
|
||||||
|
|
||||||
@Select("""
|
@Select("""
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -147,11 +147,11 @@ public interface OsmoticPressRMapper extends BaseMapper<OsmoticPressR> {
|
||||||
<script>
|
<script>
|
||||||
select to_char(t.tm,'YYYY-MM-DD') as tm,t.drp as rz
|
select to_char(t.tm,'YYYY-MM-DD') as tm,t.drp as rz
|
||||||
from public.st_pptn_r_d t
|
from public.st_pptn_r_d t
|
||||||
where t.year = #{year} and t.stcd = '61610700'
|
where t.year = #{year} and t.stcd = #{stcd}
|
||||||
order by t.tm desc
|
order by t.tm desc
|
||||||
</script>
|
</script>
|
||||||
""")
|
""")
|
||||||
List<StRzVo> queryDrp(@Param("year") Integer year);
|
List<StRzVo> queryDrp(@Param("year") Integer year,@Param("stcd") String stcd);
|
||||||
|
|
||||||
@Select("""
|
@Select("""
|
||||||
<script>
|
<script>
|
||||||
|
|
|
||||||
|
|
@ -64,10 +64,10 @@ public class MessageCenterService extends ServiceImpl<MessageCenterMapper, Messa
|
||||||
return this.page(page.getPageSo().toPage(),queryWrapper);
|
return this.page(page.getPageSo().toPage(),queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean allRead(Long receiveUserId) {
|
public Boolean allRead() {
|
||||||
return this.lambdaUpdate()
|
return this.lambdaUpdate()
|
||||||
.set(MessageCenter::getStatus, 1)
|
.set(MessageCenter::getStatus, 1)
|
||||||
.eq(MessageCenter::getReceiveUserId, receiveUserId)
|
.eq(MessageCenter::getReceiveUserId, SecurityUtils.getUserId())
|
||||||
.update();
|
.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -179,7 +179,8 @@ public class MessageCenterService extends ServiceImpl<MessageCenterMapper, Messa
|
||||||
if (ObjectUtils.isNotNull(dateTimeRangeSo) && ObjectUtils.isNotNull(dateTimeRangeSo.getEnd())) {
|
if (ObjectUtils.isNotNull(dateTimeRangeSo) && ObjectUtils.isNotNull(dateTimeRangeSo.getEnd())) {
|
||||||
queryWrapper.lt(MessageCenter::getPublishTime, dateTimeRangeSo.getEnd());
|
queryWrapper.lt(MessageCenter::getPublishTime, dateTimeRangeSo.getEnd());
|
||||||
}
|
}
|
||||||
queryWrapper.orderByAsc(MessageCenter::getStatus).orderByDesc(MessageCenter::getPublishTime);
|
queryWrapper.eq(MessageCenter::getStatus,0);
|
||||||
|
queryWrapper.orderByDesc(MessageCenter::getPublishTime);
|
||||||
return this.list(queryWrapper);
|
return this.list(queryWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,18 +53,19 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
|
||||||
if(CollectionUtils.isEmpty(osmoticQuerySo.getStationCodes())){
|
if(CollectionUtils.isEmpty(osmoticQuerySo.getStationCodes())){
|
||||||
return resList;
|
return resList;
|
||||||
}
|
}
|
||||||
|
String stcd = shiftRService.getStcd();
|
||||||
Boolean isDesc = true;
|
Boolean isDesc = true;
|
||||||
//查询测站降雨量
|
//查询测站降雨量
|
||||||
Map<String,BigDecimal> drpMap = new HashMap<>();
|
Map<String,BigDecimal> drpMap = new HashMap<>();
|
||||||
if(year != null){
|
if(year != null){
|
||||||
isDesc = false;
|
isDesc = false;
|
||||||
List<StRzVo> drpList = baseMapper.queryDrp(year);
|
List<StRzVo> drpList = baseMapper.queryDrp(year,stcd);
|
||||||
drpMap = drpList.stream().collect(Collectors.toMap(StRzVo::getTm, StRzVo::getRz));
|
drpMap = drpList.stream().collect(Collectors.toMap(StRzVo::getTm, StRzVo::getRz));
|
||||||
}
|
}
|
||||||
List<String> dateList = DateUtil.getDatesBetween(osmoticQuerySo.getDateTimeRangeSo().getStart(), osmoticQuerySo.getDateTimeRangeSo().getEnd(),isDesc);
|
List<String> dateList = DateUtil.getDatesBetween(osmoticQuerySo.getDateTimeRangeSo().getStart(), osmoticQuerySo.getDateTimeRangeSo().getEnd(),isDesc);
|
||||||
|
|
||||||
//查询库水位
|
//查询库水位
|
||||||
List<StRzVo> list = baseMapper.queryRz(osmoticQuerySo);
|
List<StRzVo> list = baseMapper.queryRz(osmoticQuerySo,stcd);
|
||||||
Map<String, BigDecimal> rzMap = list.stream().collect(Collectors.toMap(StRzVo::getTm, StRzVo::getRz));
|
Map<String, BigDecimal> rzMap = list.stream().collect(Collectors.toMap(StRzVo::getTm, StRzVo::getRz));
|
||||||
//查询测站管水位/渗流量
|
//查询测站管水位/渗流量
|
||||||
List<OsmoticValueVo> valueList = baseMapper.queryValue(osmoticQuerySo);
|
List<OsmoticValueVo> valueList = baseMapper.queryValue(osmoticQuerySo);
|
||||||
|
|
@ -89,8 +90,9 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
|
||||||
if(CollectionUtils.isEmpty(stationCodes)){
|
if(CollectionUtils.isEmpty(stationCodes)){
|
||||||
return resList;
|
return resList;
|
||||||
}
|
}
|
||||||
|
String stcd = shiftRService.getStcd();
|
||||||
//查询库水位
|
//查询库水位
|
||||||
List<StRzVo> list = baseMapper.queryRz(osmoticQuerySo);
|
List<StRzVo> list = baseMapper.queryRz(osmoticQuerySo,stcd);
|
||||||
//查询测站管水位
|
//查询测站管水位
|
||||||
List<OsmoticValueVo> valueList = baseMapper.queryValue(osmoticQuerySo);
|
List<OsmoticValueVo> valueList = baseMapper.queryValue(osmoticQuerySo);
|
||||||
//按测站分组
|
//按测站分组
|
||||||
|
|
@ -119,7 +121,7 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
|
||||||
//查询测站降雨量
|
//查询测站降雨量
|
||||||
List<StRzVo> drpList;
|
List<StRzVo> drpList;
|
||||||
if(year != null){
|
if(year != null){
|
||||||
drpList = baseMapper.queryDrp(year);
|
drpList = baseMapper.queryDrp(year,stcd);
|
||||||
OsmoticChartVo chartVo = new OsmoticChartVo();
|
OsmoticChartVo chartVo = new OsmoticChartVo();
|
||||||
chartVo.setStationCode("rz");
|
chartVo.setStationCode("rz");
|
||||||
if(CollectionUtils.isNotEmpty(list)){
|
if(CollectionUtils.isNotEmpty(list)){
|
||||||
|
|
@ -179,8 +181,9 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
|
||||||
|
|
||||||
public List<OsmoticStationVo> infiltraLine(OsmoticQuerySo osmoticQuerySo) {
|
public List<OsmoticStationVo> infiltraLine(OsmoticQuerySo osmoticQuerySo) {
|
||||||
List<OsmoticStationVo> resList = new ArrayList<>();
|
List<OsmoticStationVo> resList = new ArrayList<>();
|
||||||
|
String stcd = shiftRService.getStcd();
|
||||||
//查询库水位
|
//查询库水位
|
||||||
List<StRzVo> list = baseMapper.queryLineRz(osmoticQuerySo);
|
List<StRzVo> list = baseMapper.queryLineRz(osmoticQuerySo,stcd);
|
||||||
Map<String, BigDecimal> rzMap = list.stream().collect(Collectors.toMap(StRzVo::getTm, StRzVo::getRz));
|
Map<String, BigDecimal> rzMap = list.stream().collect(Collectors.toMap(StRzVo::getTm, StRzVo::getRz));
|
||||||
//查询测站管水位
|
//查询测站管水位
|
||||||
List<OsmoticValueVo> valueList = baseMapper.queryLineValue(osmoticQuerySo);
|
List<OsmoticValueVo> valueList = baseMapper.queryLineValue(osmoticQuerySo);
|
||||||
|
|
@ -426,7 +429,7 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
|
||||||
}
|
}
|
||||||
OsmoticQuerySo osmoticQuerySo = new OsmoticQuerySo();
|
OsmoticQuerySo osmoticQuerySo = new OsmoticQuerySo();
|
||||||
BeanUtils.copyProperties(so,osmoticQuerySo);
|
BeanUtils.copyProperties(so,osmoticQuerySo);
|
||||||
List<StRzVo> stRzVos = baseMapper.queryLineRz(osmoticQuerySo);
|
List<StRzVo> stRzVos = baseMapper.queryLineRz(osmoticQuerySo,shiftRService.getStcd());
|
||||||
return bindPressDetail(list,stRzVos);
|
return bindPressDetail(list,stRzVos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import com.gunshi.project.xyt.entity.so.OsmoticDetailQuerySo;
|
||||||
import com.gunshi.project.xyt.entity.so.OsmoticQueryPageSo;
|
import com.gunshi.project.xyt.entity.so.OsmoticQueryPageSo;
|
||||||
import com.gunshi.project.xyt.entity.so.OsmoticQuerySo;
|
import com.gunshi.project.xyt.entity.so.OsmoticQuerySo;
|
||||||
import com.gunshi.project.xyt.entity.vo.*;
|
import com.gunshi.project.xyt.entity.vo.*;
|
||||||
|
import com.gunshi.project.xyt.mapper.AttResBaseMapper;
|
||||||
import com.gunshi.project.xyt.mapper.OsmoticPressRMapper;
|
import com.gunshi.project.xyt.mapper.OsmoticPressRMapper;
|
||||||
import com.gunshi.project.xyt.mapper.OsmoticShiftRMapper;
|
import com.gunshi.project.xyt.mapper.OsmoticShiftRMapper;
|
||||||
import com.gunshi.project.xyt.model.OsmoticShiftR;
|
import com.gunshi.project.xyt.model.OsmoticShiftR;
|
||||||
|
|
@ -41,6 +42,9 @@ public class OsmoticShiftRService extends ServiceImpl<OsmoticShiftRMapper, Osmot
|
||||||
@Resource
|
@Resource
|
||||||
private OsmoticPressRMapper pressRMapper;
|
private OsmoticPressRMapper pressRMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private AttResBaseMapper attResBaseMapper;
|
||||||
|
|
||||||
private static final String X_PREFIX = "/X";
|
private static final String X_PREFIX = "/X";
|
||||||
private static final String Y_PREFIX = "/Y";
|
private static final String Y_PREFIX = "/Y";
|
||||||
private static final String H_PREFIX = "/H";
|
private static final String H_PREFIX = "/H";
|
||||||
|
|
@ -288,10 +292,16 @@ public class OsmoticShiftRService extends ServiceImpl<OsmoticShiftRMapper, Osmot
|
||||||
List<OsmoticShiftValueVo> list = baseMapper.detailValue(so);
|
List<OsmoticShiftValueVo> list = baseMapper.detailValue(so);
|
||||||
OsmoticQuerySo osmoticQuerySo = new OsmoticQuerySo();
|
OsmoticQuerySo osmoticQuerySo = new OsmoticQuerySo();
|
||||||
BeanUtils.copyProperties(so,osmoticQuerySo);
|
BeanUtils.copyProperties(so,osmoticQuerySo);
|
||||||
List<StRzVo> stRzVos = pressRMapper.queryLineRz(osmoticQuerySo);
|
List<StRzVo> stRzVos = pressRMapper.queryLineRz(osmoticQuerySo,getStcd());
|
||||||
return bindShiftDetail(list,stRzVos);
|
return bindShiftDetail(list,stRzVos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getStcd(){
|
||||||
|
List<AttResBaseVo> attResBaseVos = attResBaseMapper.queryList();
|
||||||
|
AttResBaseVo attResBaseVo = attResBaseVos.get(0);
|
||||||
|
return attResBaseVo == null ? "":attResBaseVo.getStcd();
|
||||||
|
}
|
||||||
|
|
||||||
private List<OsmoticShiftValueVo> bindShiftDetail(List<OsmoticShiftValueVo> list, List<StRzVo> stRzVos) {
|
private List<OsmoticShiftValueVo> bindShiftDetail(List<OsmoticShiftValueVo> list, List<StRzVo> stRzVos) {
|
||||||
HashSet<String> strings = new HashSet<>();
|
HashSet<String> strings = new HashSet<>();
|
||||||
list.stream().forEach(v1 -> strings.add(v1.getTm()));
|
list.stream().forEach(v1 -> strings.add(v1.getTm()));
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ ruoyi:
|
||||||
# 版权年份
|
# 版权年份
|
||||||
copyrightYear: 2024
|
copyrightYear: 2024
|
||||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||||
#profile: D:/ruoyi/uploadPath
|
profile: /app/uploadPath
|
||||||
# 获取ip地址开关
|
# 获取ip地址开关
|
||||||
addressEnabled: false
|
addressEnabled: false
|
||||||
# 验证码类型 math 数字计算 char 字符验证
|
# 验证码类型 math 数字计算 char 字符验证
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue