This commit is contained in:
zt
2025-08-26 21:05:13 +08:00
parent 971101d5e8
commit 5772b5fc83
11 changed files with 137 additions and 17 deletions

View File

@ -21,15 +21,15 @@ public class SaPermissionImpl implements StpInterface {
*/ */
@Override @Override
public List<String> getPermissionList(Object loginId, String loginType) { public List<String> getPermissionList(Object loginId, String loginType) {
// LoginUser loginUser = LoginHelper.getLoginUser(); LoginUser loginUser = LoginHelper.getLoginUser();
// UserType userType = UserType.getUserType(loginUser.getUserType()); UserType userType = UserType.getUserType(loginUser.getUserType());
// if (userType == UserType.SYS_USER) { if (userType == UserType.SYS_USER) {
// return new ArrayList<>(loginUser.getMenuPermission()); return new ArrayList<>(loginUser.getMenuPermission());
// } else if (userType == UserType.APP_USER) { } else if (userType == UserType.APP_USER) {
// // 其他端 自行根据业务编写 // 其他端 自行根据业务编写
// } }
// return new ArrayList<>(); return new ArrayList<>();
return Collections.singletonList("*"); // return Collections.singletonList("*");
} }
/** /**

View File

@ -14,10 +14,6 @@ import java.util.List;
@Data @Data
public class SseMessageDto implements Serializable { public class SseMessageDto implements Serializable {
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -37,8 +33,13 @@ public class SseMessageDto implements Serializable {
private String route; private String route;
/** /**
* 详情 * 项目id
*/ */
private Long projectId; private Long projectId;
/**
* 是否记录
*/
private Boolean isRecord = true;
} }

View File

@ -30,7 +30,7 @@ public class SseMessageDbListener implements ApplicationRunner, Ordered {
public void run(ApplicationArguments args) throws Exception { public void run(ApplicationArguments args) throws Exception {
sseEmitterManager.subscribeMessage((message) -> { sseEmitterManager.subscribeMessage((message) -> {
log.info("SSE主题订阅收到消息session keys={} message={}", message.getUserIds(), message.getMessage()); log.info("SSE主题订阅收到消息session keys={} message={}", message.getUserIds(), message.getMessage());
if (CollUtil.isNotEmpty(message.getUserIds())) { if (CollUtil.isNotEmpty(message.getUserIds()) && message.getIsRecord()) {
ArrayList<MsgNotice> noticeList = new ArrayList<>(); ArrayList<MsgNotice> noticeList = new ArrayList<>();
for (Long key : message.getUserIds()) { for (Long key : message.getUserIds()) {
MsgNotice notice = new MsgNotice(); MsgNotice notice = new MsgNotice();

View File

@ -94,6 +94,7 @@ public class DesVolumeFileController extends BaseController {
} }
@GetMapping("/joinList") @GetMapping("/joinList")
public TableDataInfo<DesVolumeFileJoinVo> joinList(DesVolumeFileBo bo, PageQuery pageQuery) { public TableDataInfo<DesVolumeFileJoinVo> joinList(DesVolumeFileBo bo, PageQuery pageQuery) {
return desVolumeFileService.queryJoinPageList(bo, pageQuery); return desVolumeFileService.queryJoinPageList(bo, pageQuery);

View File

@ -16,6 +16,7 @@ import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.web.core.BaseController; import org.dromara.common.web.core.BaseController;
import org.dromara.land.domain.bo.BusLandTransferLedgerBo; import org.dromara.land.domain.bo.BusLandTransferLedgerBo;
import org.dromara.land.domain.vo.BusLandTransferLedgerCountVo;
import org.dromara.land.domain.vo.BusLandTransferLedgerVo; import org.dromara.land.domain.vo.BusLandTransferLedgerVo;
import org.dromara.land.service.IBusLandTransferLedgerService; import org.dromara.land.service.IBusLandTransferLedgerService;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -119,4 +120,12 @@ public class BusLandTransferLedgerController extends BaseController {
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(busLandTransferLedgerService.deleteWithValidByIds(List.of(ids), true)); return toAjax(busLandTransferLedgerService.deleteWithValidByIds(List.of(ids), true));
} }
@SaCheckPermission("land:landTransferLedger:list")
@GetMapping("/count/{projectId}")
public R<BusLandTransferLedgerCountVo> count(@NotNull(message = "项目不能为空")
@PathVariable Long projectId) {
return R.ok(busLandTransferLedgerService.countByProjectId(projectId));
}
} }

View File

@ -0,0 +1,53 @@
package org.dromara.land.domain.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.land.domain.BusLandTransferLedger;
import org.dromara.land.domain.bo.UnitBo;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
/**
* 项目土地流转台账视图对象 bus_land_transfer_ledger
*
* @author Lion Li
* @date 2025-07-25
*/
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = BusLandTransferLedger.class)
public class BusLandTransferLedgerCountVo implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 设计面积
*/
private BigDecimal designArea = BigDecimal.ZERO;
/**
* 已流转面积
*/
private BigDecimal transferAea= BigDecimal.ZERO;
/**
* 土地租金(元)
*/
private BigDecimal landRent= BigDecimal.ZERO;
}

View File

@ -1,11 +1,14 @@
package org.dromara.land.service; package org.dromara.land.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.validation.constraints.NotNull;
import org.dromara.land.domain.BusLandTransferLedger; import org.dromara.land.domain.BusLandTransferLedger;
import org.dromara.land.domain.vo.BusLandTransferLedgerCountVo;
import org.dromara.land.domain.vo.BusLandTransferLedgerVo; import org.dromara.land.domain.vo.BusLandTransferLedgerVo;
import org.dromara.land.domain.bo.BusLandTransferLedgerBo; import org.dromara.land.domain.bo.BusLandTransferLedgerBo;
import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.PageQuery;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -76,4 +79,10 @@ public interface IBusLandTransferLedgerService extends IService<BusLandTransferL
* @return 是否删除成功 * @return 是否删除成功
*/ */
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
/**
* 统计项目土地流转台账信息
*/
BusLandTransferLedgerCountVo countByProjectId(Long projectId);
} }

View File

@ -17,6 +17,7 @@ import org.dromara.land.domain.bo.BusLandTransferLedgerBo;
import org.dromara.land.domain.bo.UnitBo; import org.dromara.land.domain.bo.UnitBo;
import org.dromara.land.domain.vo.BusEnterRoadVo; import org.dromara.land.domain.vo.BusEnterRoadVo;
import org.dromara.land.domain.vo.BusLandBlockVo; import org.dromara.land.domain.vo.BusLandBlockVo;
import org.dromara.land.domain.vo.BusLandTransferLedgerCountVo;
import org.dromara.land.domain.vo.BusLandTransferLedgerVo; import org.dromara.land.domain.vo.BusLandTransferLedgerVo;
import org.dromara.land.mapper.BusLandTransferLedgerMapper; import org.dromara.land.mapper.BusLandTransferLedgerMapper;
import org.dromara.land.service.IBusEnterRoadService; import org.dromara.land.service.IBusEnterRoadService;
@ -25,6 +26,7 @@ import org.dromara.land.service.IBusLandBlockUnitProjectService;
import org.dromara.land.service.IBusLandTransferLedgerService; import org.dromara.land.service.IBusLandTransferLedgerService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
/** /**
@ -189,6 +191,9 @@ public class BusLandTransferLedgerServiceImpl extends ServiceImpl<BusLandTransfe
@Override @Override
public Boolean updateByBo(BusLandTransferLedgerBo bo) { public Boolean updateByBo(BusLandTransferLedgerBo bo) {
BusLandTransferLedger update = MapstructUtils.convert(bo, BusLandTransferLedger.class); BusLandTransferLedger update = MapstructUtils.convert(bo, BusLandTransferLedger.class);
if("2".equals(update.getTransferStatus()) && update.getLandBlockId()!=null){
iBusLandBlockUnitProjectService.deleteByLandIds(List.of(update.getLandBlockId()));
}
validEntityBeforeSave(update); validEntityBeforeSave(update);
return baseMapper.updateById(update) > 0; return baseMapper.updateById(update) > 0;
} }
@ -214,4 +219,31 @@ public class BusLandTransferLedgerServiceImpl extends ServiceImpl<BusLandTransfe
} }
return baseMapper.deleteByIds(ids) > 0; return baseMapper.deleteByIds(ids) > 0;
} }
@Override
public BusLandTransferLedgerCountVo countByProjectId(Long projectId) {
LambdaQueryWrapper<BusLandTransferLedger> lqw = Wrappers.lambdaQuery();
lqw.eq(BusLandTransferLedger::getProjectId,projectId);
lqw.in(BusLandTransferLedger::getTransferStatus, Arrays.asList("0","1"));
List<BusLandTransferLedger> list = list(lqw);
BusLandTransferLedgerCountVo busLandTransferLedgerCountVo = new BusLandTransferLedgerCountVo();
if(list != null && !list.isEmpty()){
BigDecimal reduce = list.stream().filter(vo -> vo.getDesignArea() != null).map(BusLandTransferLedger::getDesignArea)
.reduce(BigDecimal.ZERO, BigDecimal::add);
busLandTransferLedgerCountVo.setDesignArea(reduce);
BigDecimal reduce1 = list.stream().filter(vo -> vo.getTransferAea() != null).map(BusLandTransferLedger::getTransferAea)
.reduce(BigDecimal.ZERO, BigDecimal::add);
busLandTransferLedgerCountVo.setTransferAea(reduce1);
BigDecimal reduce2 = list.stream().filter(vo -> vo.getLandRent() != null).map(BusLandTransferLedger::getLandRent)
.reduce(BigDecimal.ZERO, BigDecimal::add);
busLandTransferLedgerCountVo.setLandRent(reduce2);
}
return busLandTransferLedgerCountVo;
}
} }

View File

@ -12,6 +12,9 @@ import org.dromara.common.log.enums.BusinessType;
import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.web.core.BaseController; import org.dromara.common.web.core.BaseController;
import org.dromara.ctr.domain.bo.CtrExpensesContractBo;
import org.dromara.ctr.domain.vo.CtrExpensesContractVo;
import org.dromara.ctr.service.ICtrExpensesContractService;
import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveCreateReq; import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveCreateReq;
import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveQueryReq; import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveQueryReq;
import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveUpdateReq; import org.dromara.materials.domain.dto.materialreceive.MatMaterialReceiveUpdateReq;
@ -35,6 +38,8 @@ public class MatMaterialReceiveController extends BaseController {
@Resource @Resource
private IMatMaterialReceiveService matMaterialReceiveService; private IMatMaterialReceiveService matMaterialReceiveService;
@Resource
private ICtrExpensesContractService ctrExpensesContractService;
/** /**
* 查询物料接收单列表 * 查询物料接收单列表
@ -102,4 +107,14 @@ public class MatMaterialReceiveController extends BaseController {
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(matMaterialReceiveService.deleteByIds(List.of(ids))); return toAjax(matMaterialReceiveService.deleteByIds(List.of(ids)));
} }
/**
* 支出合同列表
*/
@SaCheckPermission("materials:materialReceive:add")
@GetMapping("/ctrList")
public TableDataInfo<CtrExpensesContractVo> list(CtrExpensesContractBo bo, PageQuery pageQuery) {
return ctrExpensesContractService.queryPageList(bo, pageQuery);
}
} }

View File

@ -61,7 +61,7 @@ public class SysUserController extends BaseController {
/** /**
* 获取用户列表 * 获取用户列表
*/ */
@SaCheckPermission("system:user:list") // @SaCheckPermission("system:user:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<SysUserVo> list(SysUserBo user, PageQuery pageQuery) { public TableDataInfo<SysUserVo> list(SysUserBo user, PageQuery pageQuery) {
return userService.selectPageUserList(user, pageQuery); return userService.selectPageUserList(user, pageQuery);

View File

@ -130,7 +130,7 @@ public class BusTenderPlanLimitListController extends BaseController {
/** /**
* 修改限价一览 * 修改限价一览
*/ */
@SaCheckPermission("tender:tenderPlanLimitList:edit") @SaCheckPermission("tender:tenderPlanLimitList ")
@Log(title = "限价一览", businessType = BusinessType.UPDATE) @Log(title = "限价一览", businessType = BusinessType.UPDATE)
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()