Compare commits

...

6 Commits

Author SHA1 Message Date
c4495d2cf2 Merge pull request '修改了车辆收费bug' (#1) from master into prod
All checks were successful
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Successful in 11m47s
Reviewed-on: #1
2025-08-26 13:57:40 +08:00
a16c333759 修改了车辆收费bug 2025-08-26 13:12:50 +08:00
6e84a1c646 发布
All checks were successful
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Successful in 16m48s
2025-08-26 10:52:59 +08:00
a6b0277ff6 fix:绿植租赁方案删除 2025-08-26 10:26:47 +08:00
ef0976c621 Merge remote-tracking branch 'origin/master' 2025-08-26 09:50:12 +08:00
e949122b37 修改了车辆收费bug 2025-08-26 09:47:32 +08:00
13 changed files with 106 additions and 18 deletions

View File

@@ -15,7 +15,7 @@ jobs:
- name: 拉取代码
uses: http://git.missmoc.top/mocheng/checkout@v4
with:
fetch-depth: 1
fetch-depth: 0
- name: 使用Maven构建项目
run: |
@@ -87,8 +87,8 @@ jobs:
echo "===== 清理操作 ====="
docker system prune -f
echo "===== 所有操作完成 ===="
- name: 重启服务
run: |
kubectl rollout restart deployment sis -n smartparks
kubectl rollout restart deployment property -n smartparks
kubectl rollout restart deployment property -n smartparks

View File

@@ -0,0 +1,30 @@
package org.dromara.property.domain.enums;
/**
* 收费类型枚举
*/
public enum ChargeTypeEnum {
/**
* 房屋收费
*/
HOUS_CHARGES("房屋收费", "1"),
/**
* 车辆收费
*/
CARD_CHARGES("车辆收费", "2");
private final String name;
private final String value;
ChargeTypeEnum(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return this.name;
}
public String getValue() {
return this.value;
}
}

View File

@@ -53,8 +53,12 @@ public class CostPayFeeAuditVo implements Serializable {
/**
* 房间号(如101,202)
*/
@ExcelProperty(value = "房间号(如101,202)")
@ExcelProperty(value = "房间号")
private String roomNumber;
/**
* 车牌号
*/
private String carNumber;
/**
* 费用项目id

View File

@@ -17,6 +17,7 @@ import java.util.List;
public interface PlantsPlanProductMapper extends BaseMapperPlus<PlantsPlanProduct, PlantsPlanProductVo> {
void deleteByPlanId(Long planId);
void deleteByPlanIds(List<Long> planIds);
List<PlantsPlanProductVo> queryProductsInfo(Long planId);
}

View File

@@ -67,6 +67,12 @@ public interface IPlantsPlanProductService {
*/
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
/**
* 根据方案id删除方案产品
* @param ids
*/
void deleteByPlanIds(List<Long> ids);
/**
* 批量保存租赁方案植物
*

View File

@@ -81,8 +81,9 @@ public class CostCarChargeServiceImpl implements ICostCarChargeService {
Page<CostCarChargeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
// List<Long> residentPersonIdList = result.getRecords().stream().map(vo -> vo.getPersonId()).distinct().collect(Collectors.toList());
// List<RemoteUserVo> remoteUserVos = remoteUserService.selectListByIds(residentPersonIdList);
List<ResidentPerson> residentPeoplelist = residentPersonMapper.selectList();
List<String> roomNames = roomService.queryRoomNameList(idList);
// List<String> roomNames = roomService.queryRoomNameList(idList);
result.getRecords().stream().forEach(s -> {
if (CollUtil.isNotEmpty(residentPeoplelist)) {
ResidentPerson residentPerson = residentPeoplelist.stream()

View File

@@ -18,6 +18,7 @@ import org.dromara.property.domain.CostHouseCharge;
import org.dromara.property.domain.CostPayFeeAudit;
import org.dromara.property.domain.bo.CostPayFeeAuditBo;
import org.dromara.property.domain.enums.ChargeStatusEnum;
import org.dromara.property.domain.enums.ChargeTypeEnum;
import org.dromara.property.domain.vo.*;
import org.dromara.property.mapper.*;
import org.dromara.property.service.ICostPayFeeAuditService;
@@ -59,7 +60,18 @@ public class CostPayFeeAuditServiceImpl implements ICostPayFeeAuditService {
CostItemsVo costItemsVo = costItemsMapper.selectVoById(costPayFeeAuditVo.getItemId());
costPayFeeAuditVo.setChargeItem(ObjectUtil.isNotEmpty(costItemsVo) ? costItemsVo.getChargeItem() : null);
costPayFeeAuditVo.setChargeCycle(ObjectUtil.isNotEmpty(costItemsVo) ? costItemsVo.getChargeCycle() : null);
//TbRoomVo roomVo = roomMapper.selectVoById(costPayFeeAuditVo.getChargeId());
if (costPayFeeAuditVo.getChargeType().equals(ChargeTypeEnum.HOUS_CHARGES.getValue())) {
CostHouseCharge costHouseCharge = coinHouseChargeMapper.selectById(costPayFeeAuditVo.getChargeId());
if (ObjectUtil.isNotEmpty(costHouseCharge)) {
String queryRoomName = roomMapper.queryRoomName(costHouseCharge.getRoomId());
costPayFeeAuditVo.setRoomNumber(ObjectUtil.isNotEmpty(queryRoomName) ? queryRoomName : null);
}
}
if (costPayFeeAuditVo.getChargeType().equals(ChargeTypeEnum.CARD_CHARGES.getValue())) {
CostCarCharge costCarCharge = costCarChargeMapper.selectById(costPayFeeAuditVo.getChargeId());
costPayFeeAuditVo.setCarNumber(ObjectUtil.isNotEmpty(costCarCharge) ? costCarCharge.getCarNumber() : null);
}
// TbRoomVo roomVo = roomMapper.selectVoById(costPayFeeAuditVo.getChargeId());
//costPayFeeAuditVo.setRoomNumber(ObjectUtil.isNotEmpty(roomVo)? roomVo.getRoomNumber() :null );
return costPayFeeAuditVo;
}
@@ -175,13 +187,13 @@ public class CostPayFeeAuditServiceImpl implements ICostPayFeeAuditService {
private void validEntityBeforeUpdate(CostPayFeeAudit entity) {
//TODO 做一些数据校验,如唯一约束
if (entity.getState().equals("1")) {
if (entity.getChargeType().equals("1")) {
if (entity.getChargeType().equals(ChargeTypeEnum.HOUS_CHARGES.getValue())) {
CostHouseCharge costHouseCharge = coinHouseChargeMapper.selectById(entity.getChargeId());
Assert.isTrue(ObjectUtil.isNotEmpty(costHouseCharge), "该房屋收费项不存在!");
costHouseCharge.setChargeStatus(ChargeStatusEnum.THE_PAYMENT_WAS_APPROVED.getValue());
coinHouseChargeMapper.updateById(costHouseCharge);
}
if (entity.getChargeType().equals("2")) {
if (entity.getChargeType().equals(ChargeTypeEnum.CARD_CHARGES.getValue())) {
CostCarCharge costCarCharge = costCarChargeMapper.selectById(entity.getChargeId());
Assert.isTrue(ObjectUtil.isNotEmpty(costCarCharge), "该车辆收费项为空");
@@ -190,13 +202,13 @@ public class CostPayFeeAuditServiceImpl implements ICostPayFeeAuditService {
}
}
if (entity.getState().equals("2")) {
if (entity.getChargeType().equals("1")) {
if (entity.getChargeType().equals(ChargeTypeEnum.HOUS_CHARGES.getValue())) {
CostHouseCharge costHouseCharge = coinHouseChargeMapper.selectById(entity.getChargeId());
Assert.isTrue(ObjectUtil.isNotEmpty(costHouseCharge), "该房屋收费项为空");
costHouseCharge.setChargeStatus(ChargeStatusEnum.THE_PAYMENT_REVIEW_FAILED.getValue());
coinHouseChargeMapper.updateById(costHouseCharge);
}
if (entity.getChargeType().equals("2")) {
if (entity.getChargeType().equals(ChargeTypeEnum.CARD_CHARGES.getValue())) {
CostCarCharge costCarCharge = costCarChargeMapper.selectById(entity.getChargeId());
Assert.isTrue(ObjectUtil.isNotEmpty(costCarCharge), "该车辆收费项为空");
costCarCharge.setChargeStatus(ChargeStatusEnum.THE_PAYMENT_REVIEW_FAILED.getValue());

View File

@@ -85,11 +85,13 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
public TableDataInfo<MeetBookingVo> queryPageList(MeetBookingBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<MeetBooking> lqw = buildQueryWrapper(bo);
Page<MeetBookingVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
List<MeetBookingVo> meetBookingVoList = new ArrayList<>();
if(CollUtil.isNotEmpty(result.getRecords())){
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoList();
List<Long> userId = result.getRecords().stream().map(vo -> vo.getPerson()).distinct().map(Long::parseLong).collect(Collectors.toList());
List<ResidentPersonVo> remoteUserVos = residentPersonMapper.selectVoByIds(userId);
// List<RemoteUserVo> remoteUserVos = remoteUserService.selectListByIds(userId);
List<MeetBookingVo> meetBookingVoList = new ArrayList<>();
result.getRecords().stream().forEach(s -> {
if (CollUtil.isNotEmpty(residentUnitVolist)) {
ResidentUnitVo residentUnitVo = residentUnitVolist.stream()
@@ -104,6 +106,7 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
}
meetBookingVoList.add(s);
});
}
return TableDataInfo.build(new Page<MeetBookingVo>().setRecords(meetBookingVoList).setTotal(result.getTotal()));
}

View File

@@ -1,8 +1,10 @@
package org.dromara.property.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil;
import org.apache.dubbo.config.annotation.DubboReference;
import org.dromara.common.core.exception.ServiceException;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.TableDataInfo;
@@ -12,11 +14,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.dromara.property.domain.MeetAttach;
import org.dromara.property.domain.MeetBooking;
import org.dromara.property.domain.vo.MeetAttachVo;
import org.dromara.property.domain.vo.ResidentPersonVo;
import org.dromara.property.mapper.MeetBookingMapper;
import org.dromara.property.mapper.ResidentPersonMapper;
import org.dromara.property.mapper.TbRoomMapper;
import org.dromara.property.mapper.*;
import org.dromara.system.api.RemoteUserService;
import org.dromara.system.api.domain.vo.RemoteUserVo;
import org.springframework.stereotype.Service;
@@ -24,7 +26,6 @@ import org.springframework.stereotype.Service;
import org.dromara.property.domain.bo.MeetBo;
import org.dromara.property.domain.vo.MeetVo;
import org.dromara.property.domain.Meet;
import org.dromara.property.mapper.MeetMapper;
import org.dromara.property.service.IMeetService;
import org.springframework.transaction.annotation.Transactional;
@@ -48,6 +49,7 @@ import java.util.stream.Collectors;
public class MeetServiceImpl implements IMeetService {
private final MeetMapper baseMapper;
private final MeetAttachMapper meetAttachMapper;
private final ResidentPersonMapper residentPersonMapper;
private final TbRoomMapper roomMapper;
private final MeetBookingMapper meetbookMapper;
@@ -63,7 +65,7 @@ public class MeetServiceImpl implements IMeetService {
@Override
public MeetVo queryById(Long id) {
MeetVo meetVo = baseMapper.selectVoById(id);
// ResidentPersonVo residentPersonVo = residentPersonMapper.selectVoById(meetVo.getPrincipals());
// ResidentPersonVo residentPersonVo = residentPersonMapper.selectVoById(meetVo.getPrincipals());
// if(ObjectUtil.isNotEmpty(residentPersonVo)){
// meetVo.setPrincipalsName(residentPersonVo.getUserName());
// meetVo.setPhoneNo(residentPersonVo.getPhone());
@@ -216,6 +218,10 @@ public class MeetServiceImpl implements IMeetService {
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if (isValid) {
//TODO 做一些业务上的校验,判断是否需要校验
boolean exists = meetAttachMapper.exists(new LambdaQueryWrapper<MeetAttach>().in(MeetAttach::getMeetId, ids));
Assert.isTrue(!exists, "会议室具有增值服务,不允许单独删除");
boolean meetbookExists = meetbookMapper.exists(new LambdaQueryWrapper<MeetBooking>().in(MeetBooking::getMeetId, ids));
Assert.isTrue(!meetbookExists, "会议室具有预约记录,不允许单独删除");
}
return baseMapper.deleteByIds(ids) > 0;
}

View File

@@ -159,6 +159,7 @@ public class PlantsPlanProductServiceImpl implements IPlantsPlanProductService {
/**
* 查询租赁方案植物数据
*
* @param planId
* @return
*/
@@ -166,4 +167,17 @@ public class PlantsPlanProductServiceImpl implements IPlantsPlanProductService {
public List<PlantsPlanProductVo> queryPlanProductsInfo(Long planId) {
return baseMapper.queryProductsInfo(planId);
}
/**
* 根据方案id删除方案产品
*
* @param ids 方案id
* @return
*/
@Override
public void deleteByPlanIds(List<Long> ids) {
if (CollectionUtils.isNotEmpty(ids)) {
baseMapper.deleteByPlanIds(ids);
}
}
}

View File

@@ -25,6 +25,7 @@ import org.dromara.property.domain.vo.PlantsRentalPlanVo;
import org.dromara.property.domain.PlantsRentalPlan;
import org.dromara.property.mapper.PlantsRentalPlanMapper;
import org.dromara.property.service.IPlantsRentalPlanService;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
@@ -166,6 +167,7 @@ public class PlantsRentalPlanServiceImpl implements IPlantsRentalPlanService {
* @return 是否删除成功
*/
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){
PlantsRentalOrderBo plantsRentalOrderBo = new PlantsRentalOrderBo();
@@ -174,6 +176,8 @@ public class PlantsRentalPlanServiceImpl implements IPlantsRentalPlanService {
if(CollectionUtils.isNotEmpty(plantsRentalOrderVos)){
throw new ServiceException("当前选中租赁方案不可删除");
}
//删除方案产品数据
planProductService.deleteByPlanIds(ids.stream().toList());
}
return baseMapper.deleteByIds(ids) > 0;
}

View File

@@ -26,6 +26,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from plants_plan_product p where p.plan_id=#{planId}
</delete>
<delete id="deleteByPlanIds" parameterType="java.util.List">
delete from plants_plan_product p where p.plan_id in
<foreach collection="list" item="planId" open="(" separator="," close=")">
#{planId}
</foreach>
</delete>
<select id="queryProductsInfo" resultMap="planProductMap">
select
c.id pid,

View File

@@ -40,9 +40,9 @@ spring.sql.init.platform=mysql
db.num=1
### Connect URL of DB:
db.url.0=jdbc:mysql://10.20.1.65:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
db.url.0=jdbc:mysql://192.168.159.129:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
db.user.0=root
db.password.0=By@2025!
db.password.0=123456
### the maximum retry times for push
nacos.config.push.maxRetryTime=50