Browse Source

fix:修改服务

master
wang 3 months ago
parent
commit
6fffaf7686
  1. 7
      yun-admin/src/main/java/net/lab1024/sa/admin/module/business/goods/domain/entity/GoodsEntity.java
  2. 7
      yun-admin/src/main/java/net/lab1024/sa/admin/module/business/goods/domain/form/GoodsAddForm.java
  3. 2
      yun-admin/src/main/java/net/lab1024/sa/admin/module/business/goods/domain/form/GoodsImportForm.java
  4. 2
      yun-admin/src/main/java/net/lab1024/sa/admin/module/business/goods/domain/vo/GoodsExcelVO.java
  5. 5
      yun-admin/src/main/java/net/lab1024/sa/admin/module/business/goods/domain/vo/GoodsVO.java
  6. 12
      yun-admin/src/main/java/net/lab1024/sa/admin/module/service/dao/ServiceApplicationsDao.java
  7. 2
      yun-admin/src/main/java/net/lab1024/sa/admin/module/service/domain/entity/ServiceApplicationsEntity.java
  8. 19
      yun-admin/src/main/java/net/lab1024/sa/admin/module/service/domain/form/ServiceApplicationsAddForm.java
  9. 14
      yun-admin/src/main/java/net/lab1024/sa/admin/module/service/domain/form/ServiceApplicationsUpdateForm.java
  10. 91
      yun-admin/src/main/java/net/lab1024/sa/admin/module/service/service/ServiceApplicationsService.java
  11. 2
      yun-admin/src/main/resources/dev/application.yaml
  12. 86
      yun-admin/src/main/resources/mapper/service/ServiceApplicationsMapper.xml
  13. 2
      yun-base/src/main/java/net/lab1024/sa/base/common/code/UserErrorCode.java
  14. 6
      yun-base/src/main/java/net/lab1024/sa/base/listener/Ip2RegionListener.java
  15. 20
      yun-base/src/main/java/net/lab1024/sa/base/module/support/datamasking/SmartDataMaskingUtil.java
  16. 6
      yun-base/src/main/java/net/lab1024/sa/base/module/support/datatracer/service/DataTracerChangeContentService.java
  17. 22
      yun-base/src/main/resources/dev/yun-base.yaml

7
yun-admin/src/main/java/net/lab1024/sa/admin/module/business/goods/domain/entity/GoodsEntity.java

@ -34,12 +34,15 @@ public class GoodsEntity {
*/ */
private String goodsName; private String goodsName;
/** /**
* 商品价格 * 商品价格
*/ */
private BigDecimal price; private String price;
/**
* 成本计算类型时间类型字典金额
*/
private String timeType;
/** /**
* 上架状态 * 上架状态

7
yun-admin/src/main/java/net/lab1024/sa/admin/module/business/goods/domain/form/GoodsAddForm.java

@ -28,14 +28,15 @@ public class GoodsAddForm {
private String goodsName; private String goodsName;
@Schema(description = "商品价格") @Schema(description = "商品价格")
@NotNull(message = "商品价格不能为空") private String price;
@DecimalMin(value = "0", message = "商品价格最低0")
private BigDecimal price;
@Schema(description = "上架状态") @Schema(description = "上架状态")
@NotNull(message = "上架状态不能为空") @NotNull(message = "上架状态不能为空")
private Boolean shelvesFlag; private Boolean shelvesFlag;
@Schema(description = "计算类型")
private String timeType;
@Schema(description = "备注|可选") @Schema(description = "备注|可选")
private String remark; private String remark;
} }

2
yun-admin/src/main/java/net/lab1024/sa/admin/module/business/goods/domain/form/GoodsImportForm.java

@ -18,7 +18,7 @@ public class GoodsImportForm {
private String goodsName; private String goodsName;
@ExcelProperty("商品价格") @ExcelProperty("商品价格")
private BigDecimal price; private String price;
@ExcelProperty("备注") @ExcelProperty("备注")
private String remark; private String remark;

2
yun-admin/src/main/java/net/lab1024/sa/admin/module/business/goods/domain/vo/GoodsExcelVO.java

@ -36,7 +36,7 @@ public class GoodsExcelVO {
private String place; private String place;
@ExcelProperty("商品价格") @ExcelProperty("商品价格")
private BigDecimal price; private String price;
@ExcelProperty("备注") @ExcelProperty("备注")
private String remark; private String remark;

5
yun-admin/src/main/java/net/lab1024/sa/admin/module/business/goods/domain/vo/GoodsVO.java

@ -24,7 +24,10 @@ public class GoodsVO {
private Integer goodsStatus; private Integer goodsStatus;
@Schema(description = "商品价格") @Schema(description = "商品价格")
private BigDecimal price; private String price;
@Schema(description = "计算类型")
private String timeType;
@Schema(description = "上架状态") @Schema(description = "上架状态")
private Boolean shelvesFlag; private Boolean shelvesFlag;

12
yun-admin/src/main/java/net/lab1024/sa/admin/module/service/dao/ServiceApplicationsDao.java

@ -1,5 +1,6 @@
package net.lab1024.sa.admin.module.service.dao; package net.lab1024.sa.admin.module.service.dao;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import net.lab1024.sa.admin.module.service.domain.entity.ServiceApplicationsEntity; import net.lab1024.sa.admin.module.service.domain.entity.ServiceApplicationsEntity;
import net.lab1024.sa.admin.module.service.domain.form.*; import net.lab1024.sa.admin.module.service.domain.form.*;
@ -123,4 +124,15 @@ public interface ServiceApplicationsDao extends BaseMapper<ServiceApplicationsEn
void batchReviewByDepartmentId(@Param("queryForm") ServiceApplicationsUpdateForm updateForm); void batchReviewByDepartmentId(@Param("queryForm") ServiceApplicationsUpdateForm updateForm);
List<ServiceLawyerImportForm> getLawyerStatisticsByMonth(@Param("queryForm") ServiceLawyerQueryForm serviceLawyerQueryForm); List<ServiceLawyerImportForm> getLawyerStatisticsByMonth(@Param("queryForm") ServiceLawyerQueryForm serviceLawyerQueryForm);
/**
* 统计金额
*/
BigDecimal getServiceApplicationsAmount(@Param("queryForm") ServiceLawyerQueryForm queryForm);
List<ServiceApplicationsVO> selectByRecordNo(@Param("recordNo") String recordNo);
BigDecimal getServiceAmount(@Param("queryForm") LawyerStatisticsQueryForm queryForm);
List<ServiceApplicationsVO> selectByRecordNoNotMy(@Param("userId") Long userId, @Param("recordNo") String recordNo);
} }

2
yun-admin/src/main/java/net/lab1024/sa/admin/module/service/domain/entity/ServiceApplicationsEntity.java

@ -78,7 +78,7 @@ public class ServiceApplicationsEntity {
private String serviceContent; private String serviceContent;
/** /**
* 工作量换算得分 * 工作量换算得分 -金额
*/ */
private BigDecimal workloadScore; private BigDecimal workloadScore;

19
yun-admin/src/main/java/net/lab1024/sa/admin/module/service/domain/form/ServiceApplicationsAddForm.java

@ -27,15 +27,15 @@ public class ServiceApplicationsAddForm {
private Long firmId; private Long firmId;
@Schema(description = "服务开始时间", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "服务开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "服务开始时间 不能为空") //@NotNull(message = "服务开始时间 不能为空")
private LocalDateTime serviceStart; private LocalDateTime serviceStart;
@Schema(description = "服务结束时间", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "服务结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "服务结束时间 不能为空") //@NotNull(message = "服务结束时间 不能为空")
private LocalDateTime serviceEnd; private LocalDateTime serviceEnd;
@Schema(description = "服务时长(小时)", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "服务时长(小时)", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "服务时长(小时) 不能为空") //@NotNull(message = "服务时长(小时) 不能为空")
private Double serviceDuration; private Double serviceDuration;
@Schema(description = "受益人数", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "受益人数", requiredMode = Schema.RequiredMode.REQUIRED)
@ -76,4 +76,17 @@ public class ServiceApplicationsAddForm {
* 职务id * 职务id
*/ */
private Long positionId; private Long positionId;
/**
* 工作量换算得分 -金额
*/
private BigDecimal workloadScore;
/**
* 备案编号
*/
private String recordNo;
/**
* 申报服务类型
*/
private String serviceType;
} }

14
yun-admin/src/main/java/net/lab1024/sa/admin/module/service/domain/form/ServiceApplicationsUpdateForm.java

@ -6,6 +6,7 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
/** /**
@ -79,5 +80,16 @@ public class ServiceApplicationsUpdateForm{
* 职务id * 职务id
*/ */
private Long positionId; private Long positionId;
/**
* 工作量换算得分 -金额
*/
private BigDecimal workloadScore;
/**
* 备案编号
*/
private String recordNo;
/**
* 申报服务类型
*/
private String serviceType;
} }

91
yun-admin/src/main/java/net/lab1024/sa/admin/module/service/service/ServiceApplicationsService.java

@ -226,10 +226,24 @@ public class ServiceApplicationsService {
* 添加 * 添加
*/ */
public ResponseDTO<String> add(ServiceApplicationsAddForm addForm) { public ResponseDTO<String> add(ServiceApplicationsAddForm addForm) {
ServiceApplicationsEntity serviceApplicationsEntity = SmartBeanUtil.copy(addForm, ServiceApplicationsEntity.class); ServiceApplicationsEntity serviceApplicationsEntity = SmartBeanUtil.copy(addForm, ServiceApplicationsEntity.class);
if(addForm.getApplicationId() == null) { if(addForm.getApplicationId() == null) {
//新增的时候判断活动类型查询案号有没有存在
if("TIME".equals(addForm.getServiceType())) {
List<ServiceApplicationsVO> serviceApplicationsVOS = serviceApplicationsDao.selectByRecordNo(addForm.getRecordNo());
if (!serviceApplicationsVOS.isEmpty()){
throw new BusinessException(UserErrorCode.HAS_EXIST.getMsg()+serviceApplicationsVOS.get(0).getUserName()+UserErrorCode.HAS_EXIST1.getMsg());
}
}
serviceApplicationsDao.insert(serviceApplicationsEntity); serviceApplicationsDao.insert(serviceApplicationsEntity);
}else { }else {
//修改的时候判断活动类型查询案号别人有没有创建
if("TIME".equals(addForm.getServiceType())) {
//当前登录人的ID
Long userId = AdminRequestUtil.getRequestUser().getEmployeeId();
List<ServiceApplicationsVO> applicationsVOS = serviceApplicationsDao.selectByRecordNoNotMy(userId,addForm.getRecordNo());
}
serviceApplicationsDao.updateById(serviceApplicationsEntity); serviceApplicationsDao.updateById(serviceApplicationsEntity);
} }
return ResponseDTO.ok(); return ResponseDTO.ok();
@ -240,6 +254,16 @@ public class ServiceApplicationsService {
* *
*/ */
public ResponseDTO<String> update(ServiceApplicationsUpdateForm updateForm) { public ResponseDTO<String> update(ServiceApplicationsUpdateForm updateForm) {
//判断活动类型查询案号有没有存在
if("TIME".equals(updateForm.getServiceType())) {
//当前登录人的ID
Long userId = AdminRequestUtil.getRequestUser().getEmployeeId();
List<ServiceApplicationsVO> serviceApplicationsEntity = serviceApplicationsDao.selectByRecordNoNotMy(userId, updateForm.getRecordNo());
if (!serviceApplicationsEntity.isEmpty()){
throw new BusinessException(UserErrorCode.HAS_EXIST.getMsg()+serviceApplicationsEntity.get(0).getUserName()+UserErrorCode.HAS_EXIST1.getMsg());
}
}
ServiceApplicationsEntity serviceApplicationsEntity = SmartBeanUtil.copy(updateForm, ServiceApplicationsEntity.class); ServiceApplicationsEntity serviceApplicationsEntity = SmartBeanUtil.copy(updateForm, ServiceApplicationsEntity.class);
//serviceApplicationsEntity.setFirmAuditStatus(ReviewEnum.APPROVAL.getValue()); //serviceApplicationsEntity.setFirmAuditStatus(ReviewEnum.APPROVAL.getValue());
serviceApplicationsDao.updateById(serviceApplicationsEntity); serviceApplicationsDao.updateById(serviceApplicationsEntity);
@ -250,12 +274,20 @@ public class ServiceApplicationsService {
* 提交 * 提交
* *
*/ */
public ResponseDTO<String> submit(Long applicationId) { public ResponseDTO<String> submit(ServiceApplicationsAddForm addForm) {
if (null == applicationId){ if (null == addForm.getApplicationId()){
return ResponseDTO.ok(); return ResponseDTO.ok();
} }
if("TIME".equals(addForm.getServiceType())) {
//当前登录人的ID
Long userId = AdminRequestUtil.getRequestUser().getEmployeeId();
List<ServiceApplicationsVO> serviceApplicationsEntity = serviceApplicationsDao.selectByRecordNoNotMy(userId, addForm.getRecordNo());
ServiceApplicationsEntity serviceApplicationsEntity = serviceApplicationsDao.selectById(applicationId); if (!serviceApplicationsEntity.isEmpty()){
throw new BusinessException(UserErrorCode.HAS_EXIST.getMsg()+serviceApplicationsEntity.get(0).getUserName()+UserErrorCode.HAS_EXIST1.getMsg());
}
}
ServiceApplicationsEntity serviceApplications = serviceApplicationsDao.selectById(addForm.getApplicationId());
// 检查当前用户角色是否为CEO // 检查当前用户角色是否为CEO
/*RequestUser requestUser = AdminRequestUtil.getRequestUser(); /*RequestUser requestUser = AdminRequestUtil.getRequestUser();
@ -272,10 +304,11 @@ public class ServiceApplicationsService {
serviceApplicationsEntity.setAssociationAuditTime(LocalDateTime.now()); serviceApplicationsEntity.setAssociationAuditTime(LocalDateTime.now());
} }
}else {*/ }else {*/
serviceApplicationsEntity.setFirmAuditStatus(ReviewEnum.APPROVAL.getValue()); SmartBeanUtil.copyProperties(addForm, serviceApplications);
serviceApplicationsEntity.setReportTime(LocalDateTime.now()); serviceApplications.setFirmAuditStatus(ReviewEnum.APPROVAL.getValue());
serviceApplications.setReportTime(LocalDateTime.now());
//} //}
serviceApplicationsDao.updateById(serviceApplicationsEntity); serviceApplicationsDao.updateById(serviceApplications);
return ResponseDTO.ok(); return ResponseDTO.ok();
} }
/** /**
@ -523,6 +556,13 @@ public class ServiceApplicationsService {
} }
public ResponseDTO<String> addSubmit(@Valid ServiceApplicationsAddForm addForm) { public ResponseDTO<String> addSubmit(@Valid ServiceApplicationsAddForm addForm) {
//判断活动类型查询案号有没有存在
if("TIME".equals(addForm.getServiceType())) {
List<ServiceApplicationsVO> serviceApplicationsEntity = serviceApplicationsDao.selectByRecordNo(addForm.getRecordNo());
if (!serviceApplicationsEntity.isEmpty()){
throw new BusinessException(UserErrorCode.HAS_EXIST.getMsg()+serviceApplicationsEntity.get(0).getUserName()+UserErrorCode.HAS_EXIST1.getMsg());
}
}
ServiceApplicationsEntity serviceApplicationsEntity = SmartBeanUtil.copy(addForm, ServiceApplicationsEntity.class); ServiceApplicationsEntity serviceApplicationsEntity = SmartBeanUtil.copy(addForm, ServiceApplicationsEntity.class);
serviceApplicationsEntity.setFirmAuditStatus(ReviewEnum.APPROVAL.getValue()); serviceApplicationsEntity.setFirmAuditStatus(ReviewEnum.APPROVAL.getValue());
//serviceApplicationsEntity.setReportTime(LocalDateTime.now()); //serviceApplicationsEntity.setReportTime(LocalDateTime.now());
@ -614,10 +654,19 @@ public class ServiceApplicationsService {
List<ServiceLawyerImportForm> lawyerImportForms = serviceApplicationsDao.getLawyerStatisticsByMonth(serviceLawyerQueryForm); List<ServiceLawyerImportForm> lawyerImportForms = serviceApplicationsDao.getLawyerStatisticsByMonth(serviceLawyerQueryForm);
lawyerServiceVO.setQuarterlyServiceCost(BigDecimal.valueOf(Long.valueOf(dictItem.getRemark()) * lawyerImportForms.get(0).getQuarterlyServiceDuration())); lawyerServiceVO.setQuarterlyServiceCost(BigDecimal.valueOf(Long.valueOf(dictItem.getRemark()) * lawyerImportForms.get(0).getQuarterlyServiceDuration()));
lawyerServiceVO.setQuarterlyServiceDuration(lawyerImportForms.get(0).getQuarterlyServiceDuration()); lawyerServiceVO.setQuarterlyServiceDuration(lawyerImportForms.get(0).getQuarterlyServiceDuration());
//查询amount类型的金额,然后添加到服务成本中
queryForm.setUserId(lawyerServiceVO.getUserId());
BigDecimal amount = serviceApplicationsDao.getServiceAmount(queryForm);
lawyerServiceVO.setQuarterlyServiceCost(lawyerServiceVO.getQuarterlyServiceCost().add(amount));
}); });
}else { }else {
lawyerServiceVOList.forEach(lawyerServiceVO -> { lawyerServiceVOList.forEach(lawyerServiceVO -> {
lawyerServiceVO.setAnnualServiceCost(BigDecimal.valueOf(Long.valueOf(dictItem.getRemark()) * lawyerServiceVO.getAnnualServiceDuration())); lawyerServiceVO.setAnnualServiceCost(BigDecimal.valueOf(Long.valueOf(dictItem.getRemark()) * lawyerServiceVO.getAnnualServiceDuration()));
//查询amount类型的金额,然后添加到服务成本中
queryForm.setUserId(lawyerServiceVO.getUserId());
BigDecimal amount = serviceApplicationsDao.getServiceAmount(queryForm);
lawyerServiceVO.setAnnualServiceCost(lawyerServiceVO.getAnnualServiceCost().add(amount));
}); });
} }
lawyerStatisticsVO.setLawyerServiceVOList(lawyerServiceVOList); lawyerStatisticsVO.setLawyerServiceVOList(lawyerServiceVOList);
@ -728,14 +777,16 @@ public class ServiceApplicationsService {
if (dictItem == null){ if (dictItem == null){
return BigDecimal.valueOf(0L); return BigDecimal.valueOf(0L);
} }
// 获取是否有amount类型的的案件数据,获取金额
BigDecimal workloadScore = serviceApplicationsDao.getServiceApplicationsAmount(queryForm);
//除1w //除1w
if (time != null && time != 0L) { if (time != null && time != 0L) {
Long timeCost = time * Long.valueOf(dictItem.getRemark()); Long timeCost = time * Long.valueOf(dictItem.getRemark());
//取两位小数
// 将long类型转换为BigDecimal // 将long类型转换为BigDecimal
BigDecimal bigDecimalDividend = BigDecimal.valueOf(timeCost); BigDecimal bigDecimalDividend = BigDecimal.valueOf(timeCost);
// 将获取到的金额加到时间金额上
bigDecimalDividend = workloadScore.add(bigDecimalDividend);
BigDecimal bigDecimalDivisor = BigDecimal.valueOf(10000); BigDecimal bigDecimalDivisor = BigDecimal.valueOf(10000);
// 执行除法运算 // 执行除法运算
@ -1009,6 +1060,10 @@ public class ServiceApplicationsService {
if (!lawyerStatisticsVOPageResult.getList().isEmpty()) { if (!lawyerStatisticsVOPageResult.getList().isEmpty()) {
for (LawyerStatisticsVO statisticsVO : lawyerStatisticsWithParamYear) { for (LawyerStatisticsVO statisticsVO : lawyerStatisticsWithParamYear) {
statisticsVO.setAnnualServiceCost(BigDecimal.valueOf(statisticsVO.getAnnualServiceDuration() * Long.valueOf(one.getRemark()))); statisticsVO.setAnnualServiceCost(BigDecimal.valueOf(statisticsVO.getAnnualServiceDuration() * Long.valueOf(one.getRemark())));
//统计金额
queryForm.setUserId(statisticsVO.getUserId());
BigDecimal amount = serviceApplicationsDao.getServiceAmount(queryForm);
statisticsVO.setAnnualServiceCost(statisticsVO.getAnnualServiceCost().add(amount));
} }
monthStatistics(queryForm, lawyerStatisticsVOPageResult.getList(),null); monthStatistics(queryForm, lawyerStatisticsVOPageResult.getList(),null);
} }
@ -1088,6 +1143,9 @@ public class ServiceApplicationsService {
if (quarterStatisticsVO != null && quarterStatisticsVO.getQuarterlyServiceDuration() != null) { if (quarterStatisticsVO != null && quarterStatisticsVO.getQuarterlyServiceDuration() != null) {
statisticsVO.setQuarterlyServiceDuration(quarterStatisticsVO.getQuarterlyServiceDuration()); statisticsVO.setQuarterlyServiceDuration(quarterStatisticsVO.getQuarterlyServiceDuration());
statisticsVO.setQuarterlyServiceCost(BigDecimal.valueOf(quarterStatisticsVO.getQuarterlyServiceDuration() * Long.valueOf(one.getRemark()))); statisticsVO.setQuarterlyServiceCost(BigDecimal.valueOf(quarterStatisticsVO.getQuarterlyServiceDuration() * Long.valueOf(one.getRemark())));
//统计金额
BigDecimal amount = serviceApplicationsDao.getServiceAmount(queryForm);
statisticsVO.setQuarterlyServiceCost(statisticsVO.getQuarterlyServiceCost().add(amount));
} }
} }
}else if (lawyerStatisticsWithParamYear != null) { }else if (lawyerStatisticsWithParamYear != null) {
@ -1115,7 +1173,9 @@ public class ServiceApplicationsService {
if (quarterStatisticsVO != null && quarterStatisticsVO.getQuarterlyServiceDuration() != null) { if (quarterStatisticsVO != null && quarterStatisticsVO.getQuarterlyServiceDuration() != null) {
statisticsVO.setQuarterlyServiceDuration(quarterStatisticsVO.getQuarterlyServiceDuration()); statisticsVO.setQuarterlyServiceDuration(quarterStatisticsVO.getQuarterlyServiceDuration());
statisticsVO.setQuarterlyServiceCost(BigDecimal.valueOf(quarterStatisticsVO.getQuarterlyServiceDuration() * Long.valueOf(one.getRemark()))); statisticsVO.setQuarterlyServiceCost(BigDecimal.valueOf(quarterStatisticsVO.getQuarterlyServiceDuration() * Long.valueOf(one.getRemark())));
//统计金额
BigDecimal amount = serviceApplicationsDao.getServiceAmount(queryForm);
statisticsVO.setQuarterlyServiceCost(statisticsVO.getQuarterlyServiceCost().add(amount));
} }
} }
} }
@ -1145,6 +1205,8 @@ public class ServiceApplicationsService {
queryForm.setUserId(statisticsVO.getUserId()); queryForm.setUserId(statisticsVO.getUserId());
//计算年度累计服务成本 //计算年度累计服务成本
statisticsVO.setAnnualServiceCost(BigDecimal.valueOf(statisticsVO.getAnnualServiceDuration() * Long.valueOf(dictItem.getRemark()))); statisticsVO.setAnnualServiceCost(BigDecimal.valueOf(statisticsVO.getAnnualServiceDuration() * Long.valueOf(dictItem.getRemark())));
//查询amount类型的金额,然后添加到服务成本中
BigDecimal amount = serviceApplicationsDao.getServiceAmount(queryForm);
//季度服务时间范围 //季度服务时间范围
LawyerStatisticsVO quarterStatisticsVO = serviceApplicationsDao.getdepartmentMothStatistic(queryForm); LawyerStatisticsVO quarterStatisticsVO = serviceApplicationsDao.getdepartmentMothStatistic(queryForm);
if (quarterStatisticsVO != null && quarterStatisticsVO.getQuarterlyServiceDuration() != null) { if (quarterStatisticsVO != null && quarterStatisticsVO.getQuarterlyServiceDuration() != null) {
@ -1152,6 +1214,11 @@ public class ServiceApplicationsService {
//计算季度累计服务成本 //计算季度累计服务成本
statisticsVO.setQuarterlyServiceCost(BigDecimal.valueOf(quarterStatisticsVO.getQuarterlyServiceDuration() * Long.valueOf(dictItem.getRemark()))); statisticsVO.setQuarterlyServiceCost(BigDecimal.valueOf(quarterStatisticsVO.getQuarterlyServiceDuration() * Long.valueOf(dictItem.getRemark())));
} }
if (queryForm.getQuarter() == null) {
statisticsVO.setAnnualServiceCost(statisticsVO.getAnnualServiceCost().add(amount));
}else {
statisticsVO.setQuarterlyServiceCost(statisticsVO.getQuarterlyServiceCost().add(amount));
}
} }
}else if (lawyerStatisticsWithParamYear != null) { }else if (lawyerStatisticsWithParamYear != null) {
for (ServiceDepartmentImportForm statisticsVO : lawyerStatisticsWithParamYear) { for (ServiceDepartmentImportForm statisticsVO : lawyerStatisticsWithParamYear) {
@ -1175,6 +1242,7 @@ public class ServiceApplicationsService {
queryForm.setFirmId(statisticsVO.getFirmId()); queryForm.setFirmId(statisticsVO.getFirmId());
//计算年度累计服务成本 //计算年度累计服务成本
statisticsVO.setAnnualServiceCost(BigDecimal.valueOf(statisticsVO.getAnnualServiceDuration() * Long.valueOf(dictItem.getRemark()))); statisticsVO.setAnnualServiceCost(BigDecimal.valueOf(statisticsVO.getAnnualServiceDuration() * Long.valueOf(dictItem.getRemark())));
BigDecimal amount = serviceApplicationsDao.getServiceAmount(queryForm);
//季度服务时间范围 //季度服务时间范围
LawyerStatisticsVO quarterStatisticsVO = serviceApplicationsDao.getdepartmentMothStatistic(queryForm); LawyerStatisticsVO quarterStatisticsVO = serviceApplicationsDao.getdepartmentMothStatistic(queryForm);
if (quarterStatisticsVO != null && quarterStatisticsVO.getQuarterlyServiceDuration() != null) { if (quarterStatisticsVO != null && quarterStatisticsVO.getQuarterlyServiceDuration() != null) {
@ -1182,6 +1250,11 @@ public class ServiceApplicationsService {
//计算季度累计服务成本 //计算季度累计服务成本
statisticsVO.setQuarterlyServiceCost(BigDecimal.valueOf(quarterStatisticsVO.getQuarterlyServiceDuration() * Long.valueOf(dictItem.getRemark()))); statisticsVO.setQuarterlyServiceCost(BigDecimal.valueOf(quarterStatisticsVO.getQuarterlyServiceDuration() * Long.valueOf(dictItem.getRemark())));
} }
if (queryForm.getQuarter() == null) {
statisticsVO.setAnnualServiceCost(statisticsVO.getAnnualServiceCost().add(amount));
}else {
statisticsVO.setQuarterlyServiceCost(statisticsVO.getQuarterlyServiceCost().add(amount));
}
} }
} }
} }

2
yun-admin/src/main/resources/dev/application.yaml

@ -8,7 +8,7 @@
# 项目配置: 名称、日志目录 # 项目配置: 名称、日志目录
project: project:
name: yun-admin name: yun-admin
log-directory: ${localPath:/home}/logs/smart_admin_v3/${project.name}/${spring.profiles.active} log-directory: ${localPath:/Users/wang}/logs/smart_admin_v3/${project.name}/${spring.profiles.active}
# 项目端口和url根路径 # 项目端口和url根路径
server: server:

86
yun-admin/src/main/resources/mapper/service/ServiceApplicationsMapper.xml

@ -476,4 +476,90 @@
</if> </if>
</where> </where>
</select> </select>
<select id="getServiceApplicationsAmount" resultType="java.math.BigDecimal">
SELECT
sum(tsa.workload_score) as workloadScore
FROM t_service_applications tsa
LEFT JOIN t_department d ON tsa.firm_id = d.department_id
<where>
tsa.deleted_flag = 0
AND tsa.association_audit_status = 3
<if test="queryForm.startTime != null and queryForm.startTime != ''">
AND tsa.association_audit_time &gt;= #{queryForm.startTime}
</if>
<if test="queryForm.endTime != null and queryForm.endTime != ''">
AND tsa.association_audit_time &lt;= #{queryForm.endTime}
</if>
<if test="queryForm.userId != null and queryForm.userId != ''">
and tsa.user_id = #{queryForm.userId}
</if>
<if test="queryForm.firmId != null and queryForm.firmId != ''">
and d.department_id = #{queryForm.firmId}
</if>
</where>
</select>
<select id="selectByRecordNo"
resultType="net.lab1024.sa.admin.module.service.domain.vo.ServiceApplicationsVO">
SELECT
tsa.application_id AS applicationId,
tsa.user_id AS userId,
te.actual_name AS userName,
tsa.firm_id AS firmId,
tsa.service_start AS serviceStart,
tsa.service_end AS serviceEnd,
tsa.service_duration AS serviceDuration,
tsa.beneficiary_count AS beneficiaryCount,
tsa.organizer_name AS organizerName,
tsa.organizer_contact AS organizerContact,
tsa.organizer_phone AS organizerPhone
FROM t_service_applications tsa left join t_employee te on tsa.user_id = te.employee_id
WHERE tsa.deleted_flag = 0 tsa.record_no = #{recordNo}
</select>
<select id="getServiceAmount" resultType="java.math.BigDecimal">
SELECT
sum(tsa.workload_score)
FROM t_service_applications tsa
LEFT JOIN t_department d ON tsa.firm_id = d.department_id
<where>
tsa.deleted_flag = 0
AND tsa.association_audit_status = 3
<if test="queryForm.startTime != null and queryForm.startTime != ''">
AND tsa.association_audit_time &gt;= #{queryForm.startTime}
</if>
<if test="queryForm.endTime != null and queryForm.endTime != ''">
AND tsa.association_audit_time &lt;= #{queryForm.endTime}
</if>
<if test="queryForm.userId != null and queryForm.userId != ''">
and tsa.user_id = #{queryForm.userId}
</if>
<if test="queryForm.firmId != null and queryForm.firmId != ''">
and d.department_id = #{queryForm.firmId}
</if>
</where>
</select>
<select id="selectByRecordNoNotMy"
resultType="net.lab1024.sa.admin.module.service.domain.vo.ServiceApplicationsVO">
SELECT
tsa.application_id AS applicationId,
tsa.user_id AS userId,
te.actual_name AS userName,
tsa.firm_id AS firmId,
tsa.service_start AS serviceStart,
tsa.service_end AS serviceEnd,
tsa.service_duration AS serviceDuration,
tsa.beneficiary_count AS beneficiaryCount,
tsa.organizer_name AS organizerName,
tsa.organizer_contact AS organizerContact,
tsa.organizer_phone AS organizerPhone
FROM t_service_applications tsa left join t_employee te on tsa.user_id = te.employee_id
<where>
tsa.deleted_flag = 0
<if test="userId != null">
and tsa.user_id != #{userId}
</if>
<if test="recordNo != null">
and tsa.record_no = #{recordNo}
</if>
</where>
</select>
</mapper> </mapper>

2
yun-base/src/main/java/net/lab1024/sa/base/common/code/UserErrorCode.java

@ -39,6 +39,8 @@ public enum UserErrorCode implements ErrorCode {
FORM_REPEAT_SUBMIT_PENALTY(30013, "有处罚记录,无法申请证明开具"), FORM_REPEAT_SUBMIT_PENALTY(30013, "有处罚记录,无法申请证明开具"),
HAS_EXIST(30014, "本案仅限一人申报,已由"),
HAS_EXIST1(30015, "律师申报"),
LOGIN_ACTIVE_TIMEOUT(30012, "长时间未操作系统,需要重新登录"); LOGIN_ACTIVE_TIMEOUT(30012, "长时间未操作系统,需要重新登录");
private final int code; private final int code;

6
yun-base/src/main/java/net/lab1024/sa/base/listener/Ip2RegionListener.java

@ -22,7 +22,7 @@ import java.io.IOException;
* @Email lab1024@163.com * @Email lab1024@163.com
* @Copyright <a href="https://1024lab.net">1024创新实验室</a> * @Copyright <a href="https://1024lab.net">1024创新实验室</a>
*/ */
@Order(value = LoggingApplicationListener.DEFAULT_ORDER) //@Order(value = LoggingApplicationListener.DEFAULT_ORDER)
@Slf4j @Slf4j
public class Ip2RegionListener implements ApplicationListener<ApplicationEnvironmentPreparedEvent> { public class Ip2RegionListener implements ApplicationListener<ApplicationEnvironmentPreparedEvent> {
@ -54,7 +54,7 @@ public class Ip2RegionListener implements ApplicationListener<ApplicationEnviron
} }
File tempFile = new File(tempFilePath); File tempFile = new File(tempFilePath);
try { /*try {
FileUtils.copyInputStreamToFile(new ClassPathResource(IP_FILE_NAME).getInputStream(), tempFile); FileUtils.copyInputStreamToFile(new ClassPathResource(IP_FILE_NAME).getInputStream(), tempFile);
// 2、初始化 // 2、初始化
@ -69,7 +69,7 @@ public class Ip2RegionListener implements ApplicationListener<ApplicationEnviron
tempFile.delete(); tempFile.delete();
} }
} }
*/
} }

20
yun-base/src/main/java/net/lab1024/sa/base/module/support/datamasking/SmartDataMaskingUtil.java

@ -107,12 +107,12 @@ public class SmartDataMaskingUtil {
field.setAccessible(true); field.setAccessible(true);
String fieldValue = ""; String fieldValue = "";
try { try {
PropertyDescriptor pd = new PropertyDescriptor(field.getName(), tClass); //PropertyDescriptor pd = new PropertyDescriptor(field.getName(), tClass);
Method getMethod = pd.getReadMethod(); //Method getMethod = pd.getReadMethod();
Object value = getMethod.invoke(object); //Object value = getMethod.invoke(object);
if (value != null) { //if (value != null) {
fieldValue = value.toString(); // fieldValue = value.toString();
} //}
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
@ -187,10 +187,10 @@ public class SmartDataMaskingUtil {
for (Field field : declaredFields) { for (Field field : declaredFields) {
boolean stringField = false; boolean stringField = false;
try { try {
PropertyDescriptor pd = new PropertyDescriptor(field.getName(), tClass); //PropertyDescriptor pd = new PropertyDescriptor(field.getName(), tClass);
Method getMethod = pd.getReadMethod(); // Method getMethod = pd.getReadMethod();
Type returnType = getMethod.getGenericReturnType(); //Type returnType = getMethod.getGenericReturnType();
stringField = "java.lang.String".equals(returnType.getTypeName()); //stringField = "java.lang.String".equals(returnType.getTypeName());
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }

6
yun-base/src/main/java/net/lab1024/sa/base/module/support/datatracer/service/DataTracerChangeContentService.java

@ -291,9 +291,9 @@ public class DataTracerChangeContentService {
Object fieldValue = ""; Object fieldValue = "";
Class clazz = object.getClass(); Class clazz = object.getClass();
try { try {
PropertyDescriptor pd = new PropertyDescriptor(field.getName(), clazz); //PropertyDescriptor pd = new PropertyDescriptor(field.getName(), clazz);
Method get = pd.getReadMethod(); //Method get = pd.getReadMethod();
fieldValue = get.invoke(object); //fieldValue = get.invoke(object);
} catch (Exception e) { } catch (Exception e) {
log.error("bean operate log: reflect field value error " + field.getName()); log.error("bean operate log: reflect field value error " + field.getName());
return null; return null;

22
yun-base/src/main/resources/dev/yun-base.yaml

@ -1,9 +1,9 @@
spring: spring:
# 数据库连接信息 # 数据库连接信息
datasource: datasource:
url: jdbc:p6spy:mysql://127.0.0.1:3306/smart_admin_v3?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&connectionCollation=utf8mb4_general_ci url: jdbc:p6spy:mysql://8.148.67.92:3306/lawyer_welfare?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&connectionCollation=utf8mb4_general_ci
username: root username: root
password: root password: sdy@2025#
driver-class-name: com.p6spy.engine.spy.P6SpyDriver driver-class-name: com.p6spy.engine.spy.P6SpyDriver
initial-size: 2 initial-size: 2
min-idle: 2 min-idle: 2
@ -23,9 +23,9 @@ spring:
# redis 连接池配置信息 # redis 连接池配置信息
redis: redis:
database: 1 database: 1
host: 127.0.0.1 host: 8.148.67.92
port: 6379 port: 6379
password: password: sdy@2025#
timeout: 10000ms timeout: 10000ms
lettuce: lettuce:
pool: pool:
@ -96,17 +96,17 @@ server:
# 文件上传 配置 # 文件上传 配置
file: file:
storage: storage:
mode: local mode: cloud
local: local:
upload-path: /home/smart_admin_v3/upload/ #文件上传目录 upload-path: /home/laywer/upload/ #文件上传目录
url-prefix: url-prefix:
cloud: cloud:
region: oss-cn-hangzhou region: oss-cn-hangzhou
endpoint: oss-cn-hangzhou.aliyuncs.com endpoint: 8.148.67.92:9000
bucket-name: 1024lab-smart-admin bucket-name: file
access-key: access-key: minioadmin
secret-key: secret-key: 12345678
url-prefix: https://${file.storage.cloud.bucket-name}.${file.storage.cloud.endpoint}/ url-prefix: http://${file.storage.cloud.endpoint}/${file.storage.cloud.bucket-name}/
private-url-expire-seconds: 3600 private-url-expire-seconds: 3600
# open api配置 # open api配置

Loading…
Cancel
Save