Merge pull request 'master' (#12) from master into prod
All checks were successful
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Successful in 12m34s
All checks were successful
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Successful in 12m34s
合并分支
This commit is contained in:
@@ -6,6 +6,7 @@ import jakarta.validation.constraints.NotEmpty;
|
|||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
import org.dromara.common.core.validate.AddGroup;
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
import org.dromara.common.core.validate.EditGroup;
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
@@ -20,9 +21,14 @@ import org.dromara.property.api.model.LoginResidentPerson;
|
|||||||
import org.dromara.property.domain.bo.residentBo.ResidentPersonBo;
|
import org.dromara.property.domain.bo.residentBo.ResidentPersonBo;
|
||||||
import org.dromara.property.domain.vo.residentVo.ResidentPersonVo;
|
import org.dromara.property.domain.vo.residentVo.ResidentPersonVo;
|
||||||
import org.dromara.property.service.residentService.IResidentPersonService;
|
import org.dromara.property.service.residentService.IResidentPersonService;
|
||||||
|
import org.dromara.resource.api.RemoteFileService;
|
||||||
|
import org.dromara.resource.api.domain.RemoteFile;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -41,6 +47,9 @@ public class XResidentPersonController extends BaseController {
|
|||||||
|
|
||||||
private final IResidentPersonService residentPersonService;
|
private final IResidentPersonService residentPersonService;
|
||||||
|
|
||||||
|
@DubboReference
|
||||||
|
private RemoteFileService remoteFileService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取登录员工信息
|
* 获取登录员工信息
|
||||||
*/
|
*/
|
||||||
@@ -125,4 +134,16 @@ public class XResidentPersonController extends BaseController {
|
|||||||
return toAjax(residentPersonService.deleteWithValidByIds(List.of(ids), true));
|
return toAjax(residentPersonService.deleteWithValidByIds(List.of(ids), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传图片
|
||||||
|
*
|
||||||
|
* @param file 图片文件
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||||
|
public R<RemoteFile> upload(@RequestPart("file") MultipartFile file) throws IOException {
|
||||||
|
byte[] imgByte = file.getBytes();
|
||||||
|
RemoteFile remoteFile = remoteFileService.uploadImg(imgByte);
|
||||||
|
return R.ok(remoteFile);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -63,7 +63,7 @@ public class CostReturnPayFeeBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 业主id
|
* 业主id
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "业主id不能为空", groups = { AddGroup.class, EditGroup.class })
|
// @NotNull(message = "业主id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -197,44 +197,50 @@ public class CostHouseChargeServiceImpl implements ICostHouseChargeService {
|
|||||||
BigDecimal area = BigDecimal.valueOf(add.getArea());
|
BigDecimal area = BigDecimal.valueOf(add.getArea());
|
||||||
CostItemsVo costItemsVo = costItemsMapper.selectVoById(add.getCostItemsId());
|
CostItemsVo costItemsVo = costItemsMapper.selectVoById(add.getCostItemsId());
|
||||||
BigDecimal unitPrice = costItemsVo.getUnitPrice();
|
BigDecimal unitPrice = costItemsVo.getUnitPrice();
|
||||||
// //向上取整
|
|
||||||
// if (costItemsVo.getRoundingMode().equals("1")) {
|
|
||||||
// add.setAmountReceivable(area.multiply(unitPrice).add(costItemsVo.getSurcharge()).setScale(Integer.valueOf(costItemsVo.getCurrencyDecimals()), BigDecimal.ROUND_UP));
|
|
||||||
// }
|
|
||||||
// //向下取整
|
|
||||||
// if (costItemsVo.getRoundingMode().equals("2")) {
|
|
||||||
// add.setAmountReceivable(area.multiply(unitPrice).add(costItemsVo.getSurcharge()).setScale(Integer.valueOf(costItemsVo.getCurrencyDecimals()), BigDecimal.ROUND_DOWN));
|
|
||||||
// }
|
|
||||||
// //四舍五入
|
|
||||||
// if (costItemsVo.getRoundingMode().equals("0")) {
|
|
||||||
// add.setAmountReceivable(area.multiply(unitPrice).add(costItemsVo.getSurcharge()).setScale(Integer.valueOf(costItemsVo.getCurrencyDecimals()), RoundingMode.HALF_UP));
|
|
||||||
// }
|
|
||||||
|
|
||||||
List<RemoteDictDataVo> proExpenseType = remoteDictService.selectDictDataByType("pro_expense_type");
|
List<RemoteDictDataVo> proExpenseType = remoteDictService.selectDictDataByType("pro_expense_type");
|
||||||
|
|
||||||
//循环proExpenseType
|
//循环proExpenseType
|
||||||
for (RemoteDictDataVo remoteDictDataVo : proExpenseType) {
|
// for (RemoteDictDataVo remoteDictDataVo : proExpenseType) {
|
||||||
//类型为0,则为物业管理费用,设置收费为建筑面积*单价+附加费
|
// //类型为0,则为物业管理费用,设置收费为建筑面积*单价+附加费
|
||||||
if (Objects.equals(remoteDictDataVo.getDictValue(), "0")) {
|
// if (Objects.equals(remoteDictDataVo.getDictValue(), bo.getCostType())) {
|
||||||
add.setAmountReceivable(area.multiply(unitPrice).add(costItemsVo.getSurcharge().setScale(Integer.parseInt(costItemsVo.getCurrencyDecimals()), BigDecimal.ROUND_HALF_UP)));
|
// add.setAmountReceivable(area.multiply(unitPrice).add(costItemsVo.getSurcharge().setScale(Integer.parseInt(costItemsVo.getCurrencyDecimals()), BigDecimal.ROUND_HALF_UP)));
|
||||||
}
|
// }
|
||||||
//类型为2、7、9,则为停车费用、租金、押金,设置收费为固定收费
|
// //类型为2、7、9,则为停车费用、租金、押金,设置收费为固定收费
|
||||||
if (Objects.equals(remoteDictDataVo.getDictValue(), "2") || Objects.equals(remoteDictDataVo.getDictValue(), "7") || Objects.equals(remoteDictDataVo.getDictValue(), "9")) {
|
// if (Objects.equals(remoteDictDataVo.getDictValue(), bo.getCostType()) || Objects.equals(remoteDictDataVo.getDictValue(), "7") || Objects.equals(remoteDictDataVo.getDictValue(), "9")) {
|
||||||
add.setAmountReceivable(costItemsVo.getSurcharge());
|
// add.setAmountReceivable(costItemsVo.getSurcharge());
|
||||||
}
|
// }
|
||||||
//类型为5,则为水费
|
// //类型为5,则为水费
|
||||||
if (Objects.equals(remoteDictDataVo.getDictValue(), "5")) {
|
// if (Objects.equals(remoteDictDataVo.getDictValue(), bo.getCostType())) {
|
||||||
add.setAmountReceivable(meterCharge(residentUnitVo.getLocation(), area, 2L, bo));
|
// add.setAmountReceivable(meterCharge(residentUnitVo.getLocation(), area, 2L, bo));
|
||||||
}
|
// }
|
||||||
//类型为6,则为电费
|
// //类型为6,则为电费
|
||||||
if (Objects.equals(remoteDictDataVo.getDictValue(), "6")) {
|
// if (Objects.equals(remoteDictDataVo.getDictValue(), bo.getCostType())) {
|
||||||
add.setAmountReceivable(meterCharge(residentUnitVo.getLocation(), area, 1L, bo));
|
// add.setAmountReceivable(meterCharge(residentUnitVo.getLocation(), area, 1L, bo));
|
||||||
}
|
// }
|
||||||
//类型为8,则为气费
|
// //类型为8,则为气费
|
||||||
if (Objects.equals(remoteDictDataVo.getDictValue(), "8")) {
|
// if (Objects.equals(remoteDictDataVo.getDictValue(), bo.getCostType())) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
//类型为0,则为物业管理费用,设置收费为建筑面积*单价+附加费
|
||||||
|
if (Objects.equals("0", bo.getCostType())) {
|
||||||
|
add.setAmountReceivable(area.multiply(unitPrice).add(costItemsVo.getSurcharge().setScale(Integer.parseInt(costItemsVo.getCurrencyDecimals()), BigDecimal.ROUND_HALF_UP)));
|
||||||
|
}
|
||||||
|
//类型为2、7、9,则为停车费用、租金、押金,设置收费为固定收费
|
||||||
|
if (Objects.equals("2", bo.getCostType()) || Objects.equals("7", bo.getCostType()) || Objects.equals("9", bo.getCostType())) {
|
||||||
|
add.setAmountReceivable(costItemsVo.getSurcharge());
|
||||||
|
}
|
||||||
|
//类型为5,则为水费
|
||||||
|
if (Objects.equals("5", bo.getCostType())) {
|
||||||
|
add.setAmountReceivable(meterCharge(residentUnitVo.getLocation(), area, 2L, bo));
|
||||||
|
}
|
||||||
|
//类型为6,则为电费
|
||||||
|
if (Objects.equals("6", bo.getCostType())) {
|
||||||
|
add.setAmountReceivable(meterCharge(residentUnitVo.getLocation(), area, 1L, bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
add.setChargeStatus(ChargeStatusEnum.PAYMENT_IS_SUBJECT_TO_REVIEW.getValue());
|
add.setChargeStatus(ChargeStatusEnum.PAYMENT_IS_SUBJECT_TO_REVIEW.getValue());
|
||||||
//area
|
//area
|
||||||
@@ -284,8 +290,10 @@ public class CostHouseChargeServiceImpl implements ICostHouseChargeService {
|
|||||||
for (Map.Entry<Long, TbFloorVo> entry : floorData.entrySet()) {
|
for (Map.Entry<Long, TbFloorVo> entry : floorData.entrySet()) {
|
||||||
floorArea += entry.getValue().getArea();
|
floorArea += entry.getValue().getArea();
|
||||||
Map<String, Object> meterRecord = tbMeterRecordService.getEnergyTrend(entry.getKey().toString(), null, meterType, null, bo.getChargeTime(), null);
|
Map<String, Object> meterRecord = tbMeterRecordService.getEnergyTrend(entry.getKey().toString(), null, meterType, null, bo.getChargeTime(), null);
|
||||||
|
Map<String, Object> dayMap = Convert.convert(new TypeReference<>() {
|
||||||
|
}, meterRecord.get("day"));
|
||||||
Map<String, Object> resultMap = Convert.convert(new TypeReference<>() {
|
Map<String, Object> resultMap = Convert.convert(new TypeReference<>() {
|
||||||
}, meterRecord.get("nowMonth"));
|
}, dayMap.get("nowMonth"));
|
||||||
meterEnergy += Convert.convert(Float.class, resultMap.get("total"));
|
meterEnergy += Convert.convert(Float.class, resultMap.get("total"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -235,7 +235,7 @@ public class ServiceWorkOrdersServiceImpl implements IServiceWorkOrdersService {
|
|||||||
assert user != null;
|
assert user != null;
|
||||||
add.setInitiatorPeople(user.getNickname());
|
add.setInitiatorPeople(user.getNickname());
|
||||||
}
|
}
|
||||||
|
add.setInitiatorPeople(bo.getInitiatorName());
|
||||||
Date originalDate = new Date(); // 当前时间
|
Date originalDate = new Date(); // 当前时间
|
||||||
Date newDate = DateUtil.offsetHour(originalDate, serviceWorkOrdersType.getCompletionNumber());
|
Date newDate = DateUtil.offsetHour(originalDate, serviceWorkOrdersType.getCompletionNumber());
|
||||||
add.setPlanCompleTime(newDate);
|
add.setPlanCompleTime(newDate);
|
||||||
|
@@ -276,6 +276,9 @@ public class TbMeterRecordServiceImpl implements ITbMeterRecordService {
|
|||||||
}
|
}
|
||||||
ordersBo.setOrderName(orderName);
|
ordersBo.setOrderName(orderName);
|
||||||
ordersBo.setType(orderType);
|
ordersBo.setType(orderType);
|
||||||
|
ordersBo.setLocation(info.getInstallLocation());
|
||||||
|
ordersBo.setReportingType("3"); // 系统上报
|
||||||
|
ordersBo.setProcessingWeight("2"); // 紧急
|
||||||
boolean orderFlag = serviceWorkOrdersService.insertByBo(ordersBo);
|
boolean orderFlag = serviceWorkOrdersService.insertByBo(ordersBo);
|
||||||
Assert.isTrue(orderFlag, "自动上报工单失败");
|
Assert.isTrue(orderFlag, "自动上报工单失败");
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,7 @@ package org.dromara.sis.domain.bo.alarm;
|
|||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.dromara.sis.domain.enums.EventSmallTypeEnum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务指派参数
|
* 任务指派参数
|
||||||
@@ -62,4 +63,7 @@ public class AlarmAssignmentBo {
|
|||||||
* 任务指派操作人员部门id
|
* 任务指派操作人员部门id
|
||||||
*/
|
*/
|
||||||
private Long modifyDeptId;
|
private Long modifyDeptId;
|
||||||
|
|
||||||
|
private EventSmallTypeEnum smallType;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -233,7 +233,7 @@ public class EventAlarmReportServiceImpl implements IEventAlarmReportService {
|
|||||||
ls.add(bigImg);
|
ls.add(bigImg);
|
||||||
// 生成告警记录
|
// 生成告警记录
|
||||||
SisAlarmEvents alarmRecord = alarmEventsService.createAlarmRecord(deviceIp, level, smallType, desc, ls);
|
SisAlarmEvents alarmRecord = alarmEventsService.createAlarmRecord(deviceIp, level, smallType, desc, ls);
|
||||||
autoAssign(alarmRecord.getId(), deviceIp);
|
autoAssign(alarmRecord.getId(), deviceIp, smallType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -246,11 +246,11 @@ public class EventAlarmReportServiceImpl implements IEventAlarmReportService {
|
|||||||
private void handleAlarm(String deviceIp, byte[] img, Integer level, EventSmallTypeEnum smallType, String desc) {
|
private void handleAlarm(String deviceIp, byte[] img, Integer level, EventSmallTypeEnum smallType, String desc) {
|
||||||
// 生成告警记录
|
// 生成告警记录
|
||||||
SisAlarmEvents alarmRecord = alarmEventsService.createAlarmRecord(deviceIp, level, smallType, desc, List.of(img));
|
SisAlarmEvents alarmRecord = alarmEventsService.createAlarmRecord(deviceIp, level, smallType, desc, List.of(img));
|
||||||
autoAssign(alarmRecord.getId(), deviceIp);
|
autoAssign(alarmRecord.getId(), deviceIp, smallType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void autoAssign(Long alarmId, String deviceIp) {
|
private void autoAssign(Long alarmId, String deviceIp, EventSmallTypeEnum smallType) {
|
||||||
SaTokenContextMockUtil.setMockContext(() -> {
|
SaTokenContextMockUtil.setMockContext(() -> {
|
||||||
// 如果当前设备区域存在排班人员,那么惊醒自动指派操作
|
// 如果当前设备区域存在排班人员,那么惊醒自动指派操作
|
||||||
List<RemoteAttendanceUserGroupVo> userGroupVos = remoteAttendanceService.queryAttendByCurrDateAndDeviceIp(new Date(), deviceIp);
|
List<RemoteAttendanceUserGroupVo> userGroupVos = remoteAttendanceService.queryAttendByCurrDateAndDeviceIp(new Date(), deviceIp);
|
||||||
@@ -277,6 +277,7 @@ public class EventAlarmReportServiceImpl implements IEventAlarmReportService {
|
|||||||
bo.setSolveDeptId(userInfo.getDeptId());
|
bo.setSolveDeptId(userInfo.getDeptId());
|
||||||
bo.setSolvePhone(userInfo.getPhonenumber());
|
bo.setSolvePhone(userInfo.getPhonenumber());
|
||||||
bo.setSolveEmail(userInfo.getEmail());
|
bo.setSolveEmail(userInfo.getEmail());
|
||||||
|
bo.setSmallType(smallType);
|
||||||
bo.setRemark("系统自动指派");
|
bo.setRemark("系统自动指派");
|
||||||
alarmEventsService.taskAssignment(bo);
|
alarmEventsService.taskAssignment(bo);
|
||||||
});
|
});
|
||||||
|
@@ -330,7 +330,7 @@ public class SisAlarmEventsServiceImpl implements ISisAlarmEventsService {
|
|||||||
log.info("事件处理信息写入完成,result= {}", insert);
|
log.info("事件处理信息写入完成,result= {}", insert);
|
||||||
// 进行消息推送
|
// 进行消息推送
|
||||||
String title = "视频预警";
|
String title = "视频预警";
|
||||||
String content = "您有一条" + sisAlarmEvents.getSolveName() + "预警数据";
|
String content = "您有一条" + bo.getSmallType().getDesc() + "预警数据";
|
||||||
webSocketMessageService.pushMobileMessage(List.of(bo.getSolveId()), WebSocketMsgType.ALARM_MSG, title, content, JSONObject.toJSONString(sisAlarmEvents));
|
webSocketMessageService.pushMobileMessage(List.of(bo.getSolveId()), WebSocketMsgType.ALARM_MSG, title, content, JSONObject.toJSONString(sisAlarmEvents));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user