大屏统计修改
This commit is contained in:
parent
d75ccfe889
commit
e83235e955
|
@ -17,7 +17,7 @@ import java.util.Date;
|
||||||
@Data
|
@Data
|
||||||
public class SysUser extends BaseEntity {
|
public class SysUser extends BaseEntity {
|
||||||
|
|
||||||
public static final String DEFAULT_PASSWORD = "Aqpx123456";
|
public static final String DEFAULT_PASSWORD = "123456";
|
||||||
|
|
||||||
/** 用户ID **/
|
/** 用户ID **/
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
|
|
|
@ -5,7 +5,6 @@ import com.org.utils.AjaxResult;
|
||||||
import com.org.web.data.service.DataService;
|
import com.org.web.data.service.DataService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
@ -19,7 +18,7 @@ public class DataController extends BaseController {
|
||||||
DataService dataService;
|
DataService dataService;
|
||||||
|
|
||||||
@PostMapping("/statistics")
|
@PostMapping("/statistics")
|
||||||
@PreAuthorize("@ss.hasPermi('data:statistics')")
|
// @PreAuthorize("@ss.hasPermi('data:statistics')")
|
||||||
public AjaxResult statistics() {
|
public AjaxResult statistics() {
|
||||||
return AjaxResult.success(dataService.queryDataStatistics());
|
return AjaxResult.success(dataService.queryDataStatistics());
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,7 +220,7 @@ public interface DataMapper extends BaseMapper<BcPersonSupport> {
|
||||||
|
|
||||||
|
|
||||||
// 房源入住情况
|
// 房源入住情况
|
||||||
@Select("select '床位' as name, " +
|
@Select("select '供养床位' as name, " +
|
||||||
" (select count(1) " +
|
" (select count(1) " +
|
||||||
" from bc_room_bed a " +
|
" from bc_room_bed a " +
|
||||||
" left join bc_room b on a.room_id = b.id " +
|
" left join bc_room b on a.room_id = b.id " +
|
||||||
|
@ -236,7 +236,7 @@ public interface DataMapper extends BaseMapper<BcPersonSupport> {
|
||||||
|
|
||||||
"union " +
|
"union " +
|
||||||
|
|
||||||
"select '房间' as name, " +
|
"select '供养房间' as name, " +
|
||||||
" (select count(1) " +
|
" (select count(1) " +
|
||||||
" from bc_room " +
|
" from bc_room " +
|
||||||
" where is_delete = 0 " +
|
" where is_delete = 0 " +
|
||||||
|
|
|
@ -38,7 +38,21 @@ public class DataService extends ServiceImpl<DataMapper, BcPersonSupport> {
|
||||||
|
|
||||||
List<DataStatisticsItem> villageRankList = baseMapper.listVillageRank();
|
List<DataStatisticsItem> villageRankList = baseMapper.listVillageRank();
|
||||||
|
|
||||||
|
// 修改value总数->剩余数
|
||||||
List<DataStatisticsItem> roomCountList = baseMapper.listRoomCount();
|
List<DataStatisticsItem> roomCountList = baseMapper.listRoomCount();
|
||||||
|
|
||||||
|
// 供养床位
|
||||||
|
DataStatisticsItem gycw = new DataStatisticsItem();
|
||||||
|
if (roomCountList != null && !roomCountList.isEmpty()) {
|
||||||
|
gycw.setName("供养床位");
|
||||||
|
gycw.setId(1);
|
||||||
|
gycw.setValue(roomCountList.get(0).getValue()); // 床位总数
|
||||||
|
}
|
||||||
|
|
||||||
|
for (DataStatisticsItem item : roomCountList) {
|
||||||
|
item.setValue(item.getValue() - item.getValue2());
|
||||||
|
}
|
||||||
|
|
||||||
List<DataStatisticsItem> roomTypeList = baseMapper.listRoomType();
|
List<DataStatisticsItem> roomTypeList = baseMapper.listRoomType();
|
||||||
|
|
||||||
List<DataStatisticsItem> villageCountList = baseMapper.listVillageCount();
|
List<DataStatisticsItem> villageCountList = baseMapper.listVillageCount();
|
||||||
|
@ -61,6 +75,8 @@ public class DataService extends ServiceImpl<DataMapper, BcPersonSupport> {
|
||||||
|
|
||||||
|
|
||||||
dataStatistics.setRoomCountList(roomCountList);
|
dataStatistics.setRoomCountList(roomCountList);
|
||||||
|
|
||||||
|
roomTypeList.add(gycw);
|
||||||
dataStatistics.setRoomTypeList(roomTypeList);
|
dataStatistics.setRoomTypeList(roomTypeList);
|
||||||
|
|
||||||
dataStatistics.setVillageCountList(villageCountList);
|
dataStatistics.setVillageCountList(villageCountList);
|
||||||
|
|
Loading…
Reference in New Issue