wany 2024-11-06 10:01:35 +08:00
parent 229b7373b3
commit 56788216ed
7 changed files with 34 additions and 21 deletions

2
ruoyi

@ -1 +1 @@
Subproject commit 6a52c42db8cf808d63dcb49723ee3866cf381505
Subproject commit ed710408bffa365228193ae257e70bfcb33469dd

View File

@ -7,7 +7,6 @@ import com.gunshi.project.xyt.entity.so.MessageCenterPageSo;
import com.gunshi.project.xyt.model.MessageCenter;
import com.gunshi.project.xyt.service.MessageCenterService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
@ -43,8 +42,8 @@ public class MessageCenterController {
@Operation(summary = "全部标注已读")
@GetMapping("/all/read")
public R<Boolean> allRead(@RequestParam("receiveUserId") @Parameter(description = "接收人id") Long receiveUserId) {
return R.ok(service.allRead(receiveUserId));
public R<Boolean> allRead() {
return R.ok(service.allRead());
}
@Operation(summary = "APP-消息中心")

View File

@ -53,7 +53,7 @@ public interface OsmoticPressRMapper extends BaseMapper<OsmoticPressR> {
<script>
select to_char(t.tm,'YYYY-MM-DD') as tm,t.rz
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">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
@ -63,7 +63,7 @@ public interface OsmoticPressRMapper extends BaseMapper<OsmoticPressR> {
order by t.tm desc
</script>
""")
List<StRzVo> queryRz(@Param("obj") OsmoticQuerySo osmoticQuerySo);
List<StRzVo> queryRz(@Param("obj") OsmoticQuerySo osmoticQuerySo,@Param("stcd") String stcd);
@Select("""
<script>
@ -93,7 +93,7 @@ public interface OsmoticPressRMapper extends BaseMapper<OsmoticPressR> {
<script>
select to_char(t.tm,'YYYY-MM-DD HH24:MI:SS') as tm,t.rz
from public.st_rsvr_r t
where t.stcd = '61610700'
where t.stcd = #{stcd}
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
</if>
@ -103,7 +103,7 @@ public interface OsmoticPressRMapper extends BaseMapper<OsmoticPressR> {
order by t.tm desc
</script>
""")
List<StRzVo> queryLineRz(@Param("obj") OsmoticQuerySo osmoticQuerySo);
List<StRzVo> queryLineRz(@Param("obj") OsmoticQuerySo osmoticQuerySo,@Param("stcd") String stcd);
@Select("""
<script>
@ -147,11 +147,11 @@ public interface OsmoticPressRMapper extends BaseMapper<OsmoticPressR> {
<script>
select to_char(t.tm,'YYYY-MM-DD') as tm,t.drp as rz
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
</script>
""")
List<StRzVo> queryDrp(@Param("year") Integer year);
List<StRzVo> queryDrp(@Param("year") Integer year,@Param("stcd") String stcd);
@Select("""
<script>

View File

@ -64,10 +64,10 @@ public class MessageCenterService extends ServiceImpl<MessageCenterMapper, Messa
return this.page(page.getPageSo().toPage(),queryWrapper);
}
public Boolean allRead(Long receiveUserId) {
public Boolean allRead() {
return this.lambdaUpdate()
.set(MessageCenter::getStatus, 1)
.eq(MessageCenter::getReceiveUserId, receiveUserId)
.eq(MessageCenter::getReceiveUserId, SecurityUtils.getUserId())
.update();
}
@ -179,7 +179,8 @@ public class MessageCenterService extends ServiceImpl<MessageCenterMapper, Messa
if (ObjectUtils.isNotNull(dateTimeRangeSo) && ObjectUtils.isNotNull(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);
}
}

View File

@ -53,18 +53,19 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
if(CollectionUtils.isEmpty(osmoticQuerySo.getStationCodes())){
return resList;
}
String stcd = shiftRService.getStcd();
Boolean isDesc = true;
//查询测站降雨量
Map<String,BigDecimal> drpMap = new HashMap<>();
if(year != null){
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));
}
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));
//查询测站管水位/渗流量
List<OsmoticValueVo> valueList = baseMapper.queryValue(osmoticQuerySo);
@ -89,8 +90,9 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
if(CollectionUtils.isEmpty(stationCodes)){
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);
//按测站分组
@ -119,7 +121,7 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
//查询测站降雨量
List<StRzVo> drpList;
if(year != null){
drpList = baseMapper.queryDrp(year);
drpList = baseMapper.queryDrp(year,stcd);
OsmoticChartVo chartVo = new OsmoticChartVo();
chartVo.setStationCode("rz");
if(CollectionUtils.isNotEmpty(list)){
@ -179,8 +181,9 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
public List<OsmoticStationVo> infiltraLine(OsmoticQuerySo osmoticQuerySo) {
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));
//查询测站管水位
List<OsmoticValueVo> valueList = baseMapper.queryLineValue(osmoticQuerySo);
@ -426,7 +429,7 @@ public class OsmoticPressRService extends ServiceImpl<OsmoticPressRMapper, Osmot
}
OsmoticQuerySo osmoticQuerySo = new OsmoticQuerySo();
BeanUtils.copyProperties(so,osmoticQuerySo);
List<StRzVo> stRzVos = baseMapper.queryLineRz(osmoticQuerySo);
List<StRzVo> stRzVos = baseMapper.queryLineRz(osmoticQuerySo,shiftRService.getStcd());
return bindPressDetail(list,stRzVos);
}

View File

@ -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.OsmoticQuerySo;
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.OsmoticShiftRMapper;
import com.gunshi.project.xyt.model.OsmoticShiftR;
@ -41,6 +42,9 @@ public class OsmoticShiftRService extends ServiceImpl<OsmoticShiftRMapper, Osmot
@Resource
private OsmoticPressRMapper pressRMapper;
@Resource
private AttResBaseMapper attResBaseMapper;
private static final String X_PREFIX = "/X";
private static final String Y_PREFIX = "/Y";
private static final String H_PREFIX = "/H";
@ -288,10 +292,16 @@ public class OsmoticShiftRService extends ServiceImpl<OsmoticShiftRMapper, Osmot
List<OsmoticShiftValueVo> list = baseMapper.detailValue(so);
OsmoticQuerySo osmoticQuerySo = new OsmoticQuerySo();
BeanUtils.copyProperties(so,osmoticQuerySo);
List<StRzVo> stRzVos = pressRMapper.queryLineRz(osmoticQuerySo);
List<StRzVo> stRzVos = pressRMapper.queryLineRz(osmoticQuerySo,getStcd());
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) {
HashSet<String> strings = new HashSet<>();
list.stream().forEach(v1 -> strings.add(v1.getTm()));

View File

@ -7,7 +7,7 @@ ruoyi:
# 版权年份
copyrightYear: 2024
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
#profile: D:/ruoyi/uploadPath
profile: /app/uploadPath
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证