30 changed files with 1061 additions and 19 deletions
@ -0,0 +1,72 @@ |
|||
package net.lab1024.sa.admin.module.cost.controller; |
|||
|
|||
import net.lab1024.sa.admin.module.cost.domain.form.FirmReportsAddForm; |
|||
import net.lab1024.sa.admin.module.cost.domain.form.FirmReportsQueryForm; |
|||
import net.lab1024.sa.admin.module.cost.domain.form.FirmReportsUpdateForm; |
|||
import net.lab1024.sa.admin.module.cost.domain.vo.FirmReportsVO; |
|||
import net.lab1024.sa.admin.module.cost.service.FirmReportsService; |
|||
import net.lab1024.sa.base.common.domain.ValidateList; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import cn.dev33.satoken.annotation.SaCheckPermission; |
|||
import net.lab1024.sa.base.common.domain.ResponseDTO; |
|||
import net.lab1024.sa.base.common.domain.PageResult; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
|
|||
/** |
|||
* 律师事务所年度经营报表 Controller |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 15:57:43 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@RestController |
|||
@Tag(name = "律师事务所年度经营报表") |
|||
public class FirmReportsController { |
|||
|
|||
@Resource |
|||
private FirmReportsService firmReportsService; |
|||
|
|||
@Operation(summary = "分页查询 @author wzh") |
|||
@PostMapping("/firmReports/queryPage") |
|||
@SaCheckPermission("firmReports:query") |
|||
public ResponseDTO<PageResult<FirmReportsVO>> queryPage(@RequestBody @Valid FirmReportsQueryForm queryForm) { |
|||
return ResponseDTO.ok(firmReportsService.queryPage(queryForm)); |
|||
} |
|||
|
|||
@Operation(summary = "添加 @author wzh") |
|||
@PostMapping("/firmReports/add") |
|||
@SaCheckPermission("firmReports:add") |
|||
public ResponseDTO<String> add(@RequestBody @Valid FirmReportsAddForm addForm) { |
|||
return firmReportsService.add(addForm); |
|||
} |
|||
|
|||
@Operation(summary = "更新 @author wzh") |
|||
@PostMapping("/firmReports/update") |
|||
@SaCheckPermission("firmReports:update") |
|||
public ResponseDTO<String> update(@RequestBody @Valid FirmReportsUpdateForm updateForm) { |
|||
return firmReportsService.update(updateForm); |
|||
} |
|||
|
|||
@Operation(summary = "批量删除 @author wzh") |
|||
@PostMapping("/firmReports/batchDelete") |
|||
@SaCheckPermission("firmReports:delete") |
|||
public ResponseDTO<String> batchDelete(@RequestBody ValidateList<Integer> idList) { |
|||
return firmReportsService.batchDelete(idList); |
|||
} |
|||
|
|||
@Operation(summary = "单个删除 @author wzh") |
|||
@GetMapping("/firmReports/delete/{id}") |
|||
@SaCheckPermission("firmReports:delete") |
|||
public ResponseDTO<String> batchDelete(@PathVariable Integer id) { |
|||
return firmReportsService.delete(id); |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
package net.lab1024.sa.admin.module.cost.dao; |
|||
|
|||
import java.util.List; |
|||
import net.lab1024.sa.admin.module.cost.domain.entity.FirmReportsEntity; |
|||
import net.lab1024.sa.admin.module.cost.domain.form.FirmReportsQueryForm; |
|||
import net.lab1024.sa.admin.module.cost.domain.vo.FirmReportsVO; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 律师事务所年度经营报表 Dao |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 15:57:43 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Mapper |
|||
public interface FirmReportsDao extends BaseMapper<FirmReportsEntity> { |
|||
|
|||
/** |
|||
* 分页 查询 |
|||
* |
|||
* @param page |
|||
* @param queryForm |
|||
* @return |
|||
*/ |
|||
List<FirmReportsVO> queryPage(Page page, @Param("queryForm") FirmReportsQueryForm queryForm); |
|||
|
|||
} |
|||
@ -0,0 +1,97 @@ |
|||
package net.lab1024.sa.admin.module.cost.domain.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.FieldFill; |
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 律师事务所年度经营报表 实体类 |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 15:57:43 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
@TableName("t_firm_reports") |
|||
public class FirmReportsEntity { |
|||
|
|||
/** |
|||
* 主键ID,唯一标识每条记录 |
|||
*/ |
|||
@TableId(type = IdType.AUTO) |
|||
private Integer id; |
|||
|
|||
/** |
|||
* 律师事务所全称id |
|||
*/ |
|||
private Integer firmId; |
|||
|
|||
/** |
|||
* 申报人id |
|||
*/ |
|||
private Long userId; |
|||
|
|||
/** |
|||
* 报表所属年份 |
|||
*/ |
|||
private Integer declareYear; |
|||
|
|||
/** |
|||
* 报表所属季度 |
|||
*/ |
|||
private String declareQuarter; |
|||
|
|||
/** |
|||
* 营业收入(单位:万元) |
|||
*/ |
|||
private BigDecimal revenue; |
|||
|
|||
/** |
|||
* 总成本支出(单位:万元) |
|||
*/ |
|||
private BigDecimal totalCost; |
|||
|
|||
/** |
|||
* 公益成本支出(单位:万元) |
|||
*/ |
|||
private BigDecimal publicWelfareCost; |
|||
|
|||
/** |
|||
* 成本收入比(%),计算公式:总成本/收入×100% |
|||
*/ |
|||
private BigDecimal costIncomeRatio; |
|||
|
|||
/** |
|||
* 审批状态(存储当前审批人姓名,"-"表示待审批) |
|||
*/ |
|||
private Integer approvalStatus; |
|||
|
|||
/** |
|||
* 报表提交时间 |
|||
*/ |
|||
private LocalDateTime submissionTime; |
|||
|
|||
/** |
|||
* 最终审批人姓名(预留字段,当前数据为空) |
|||
*/ |
|||
private Integer approverId; |
|||
private Integer delFlag; |
|||
/** |
|||
* |
|||
*/ |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private LocalDateTime createTime; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@TableField(fill = FieldFill.INSERT_UPDATE) |
|||
private LocalDateTime updateTime; |
|||
|
|||
} |
|||
@ -0,0 +1,54 @@ |
|||
package net.lab1024.sa.admin.module.cost.domain.form; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import javax.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 律师事务所年度经营报表 新建表单 |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 15:57:43 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
public class FirmReportsAddForm { |
|||
|
|||
@Schema(description = "律师事务所全称id", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "律师事务所全称id 不能为空") |
|||
private Integer firmId; |
|||
|
|||
/** |
|||
* 报表所属年份 |
|||
*/ |
|||
private Integer declareYear; |
|||
|
|||
/** |
|||
* 报表所属季度 |
|||
*/ |
|||
private String declareQuarter; |
|||
|
|||
/** |
|||
* 营业收入(单位:万元) |
|||
*/ |
|||
private BigDecimal revenue; |
|||
|
|||
/** |
|||
* 总成本支出(单位:万元) |
|||
*/ |
|||
private BigDecimal totalCost; |
|||
|
|||
/** |
|||
* 公益成本支出(单位:万元) |
|||
*/ |
|||
private BigDecimal publicWelfareCost; |
|||
|
|||
/** |
|||
* 成本收入比(%),计算公式:总成本/收入×100% |
|||
*/ |
|||
private BigDecimal costIncomeRatio; |
|||
} |
|||
@ -0,0 +1,52 @@ |
|||
package net.lab1024.sa.admin.module.cost.domain.form; |
|||
|
|||
import net.lab1024.sa.base.common.domain.PageParam; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 律师事务所年度经营报表 分页查询表单 |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 15:57:43 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
public class FirmReportsQueryForm extends PageParam { |
|||
/** |
|||
* 律师事务所全称id |
|||
*/ |
|||
private Integer firmId; |
|||
|
|||
/** |
|||
* 申报人id |
|||
*/ |
|||
private Long userId; |
|||
|
|||
/** |
|||
* 报表所属年份 |
|||
*/ |
|||
private Integer declareYear; |
|||
|
|||
/** |
|||
* 报表所属季度 |
|||
*/ |
|||
private String declareQuarter; |
|||
|
|||
|
|||
/** |
|||
* 审批状态(存储当前审批人姓名,"-"表示待审批) |
|||
*/ |
|||
private Integer approvalStatus; |
|||
|
|||
/** |
|||
* 报表提交时间 |
|||
*/ |
|||
private LocalDateTime submissionTime; |
|||
|
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package net.lab1024.sa.admin.module.cost.domain.form; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import javax.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 律师事务所年度经营报表 更新表单 |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 15:57:43 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
public class FirmReportsUpdateForm { |
|||
|
|||
@Schema(description = "主键ID,唯一标识每条记录", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "主键ID,唯一标识每条记录 不能为空") |
|||
private Integer id; |
|||
|
|||
} |
|||
@ -0,0 +1,58 @@ |
|||
package net.lab1024.sa.admin.module.cost.domain.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 律师事务所年度经营报表 列表VO |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 15:57:43 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
public class FirmReportsVO { |
|||
|
|||
|
|||
@Schema(description = "主键ID,唯一标识每条记录") |
|||
private Long id; |
|||
|
|||
private Long firmId; |
|||
@Schema(description = "律师事务所") |
|||
private String firmName; |
|||
|
|||
private String userId; |
|||
@Schema(description = "申报人") |
|||
private String userName; |
|||
|
|||
@Schema(description = "报表所属年份") |
|||
private Integer declareYear; |
|||
|
|||
@Schema(description = "报表所属季度") |
|||
private String declareQuarter; |
|||
|
|||
@Schema(description = "营业收入(单位:万元)") |
|||
private BigDecimal revenue; |
|||
|
|||
@Schema(description = "总成本支出(单位:万元)") |
|||
private BigDecimal totalCost; |
|||
|
|||
@Schema(description = "公益成本支出(单位:万元)") |
|||
private BigDecimal publicWelfareCost; |
|||
|
|||
@Schema(description = "成本收入比(%),计算公式:总成本/收入×100%") |
|||
private BigDecimal costIncomeRatio; |
|||
|
|||
@Schema(description = "审批状态(存储当前审批人姓名,-表示待审批)") |
|||
private Integer approvalStatus; |
|||
|
|||
@Schema(description = "报表提交时间") |
|||
private LocalDateTime submissionTime; |
|||
|
|||
@Schema(description = "最终审批人姓名(预留字段,当前数据为空)") |
|||
private String approverName; |
|||
|
|||
} |
|||
@ -0,0 +1,113 @@ |
|||
package net.lab1024.sa.admin.module.cost.service; |
|||
|
|||
import java.time.LocalDateTime; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
import net.lab1024.sa.admin.common.enums.ReviewEnum; |
|||
import net.lab1024.sa.admin.module.cost.dao.FirmReportsDao; |
|||
import net.lab1024.sa.admin.module.cost.domain.entity.FirmReportsEntity; |
|||
import net.lab1024.sa.admin.module.cost.domain.form.FirmReportsAddForm; |
|||
import net.lab1024.sa.admin.module.cost.domain.form.FirmReportsQueryForm; |
|||
import net.lab1024.sa.admin.module.cost.domain.form.FirmReportsUpdateForm; |
|||
import net.lab1024.sa.admin.module.cost.domain.vo.FirmReportsVO; |
|||
import net.lab1024.sa.admin.module.system.department.service.DepartmentService; |
|||
import net.lab1024.sa.admin.util.AdminRequestUtil; |
|||
import net.lab1024.sa.admin.util.DateTimeUtil; |
|||
import net.lab1024.sa.base.common.util.SmartBeanUtil; |
|||
import net.lab1024.sa.base.common.util.SmartPageUtil; |
|||
import net.lab1024.sa.base.common.domain.ResponseDTO; |
|||
import net.lab1024.sa.base.common.domain.PageResult; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import net.lab1024.sa.base.module.support.dict.service.DictService; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
/** |
|||
* 律师事务所年度经营报表 Service |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 15:57:43 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Service |
|||
public class FirmReportsService { |
|||
|
|||
@Resource |
|||
private FirmReportsDao firmReportsDao; |
|||
@Resource |
|||
private DictService dictService; |
|||
@Resource |
|||
private DepartmentService departmentService; |
|||
/** |
|||
* 分页查询 |
|||
*/ |
|||
public PageResult<FirmReportsVO> queryPage(FirmReportsQueryForm queryForm) { |
|||
Page<?> page = SmartPageUtil.convert2PageQuery(queryForm); |
|||
List<FirmReportsVO> list = firmReportsDao.queryPage(page, queryForm); |
|||
//查询字典值
|
|||
|
|||
PageResult<FirmReportsVO> firmReportsVOPageResult = SmartPageUtil.convert2PageResult(page, list); |
|||
firmReportsVOPageResult.getList().forEach(item -> { |
|||
if (item.getDeclareQuarter() != null) { |
|||
String quarter = dictService.getDictDataLabelByDictCode("QUARTER", item.getDeclareQuarter()); |
|||
item.setDeclareQuarter(quarter); |
|||
} |
|||
if (item.getFirmId() != null) { |
|||
item.setFirmName(departmentService.queryByFirmId(item.getFirmId()).getDepartmentName()); |
|||
} |
|||
|
|||
}); |
|||
return SmartPageUtil.convert2PageResult(page, list); |
|||
} |
|||
|
|||
/** |
|||
* 添加 |
|||
*/ |
|||
public ResponseDTO<String> add(FirmReportsAddForm addForm) { |
|||
Long userId = AdminRequestUtil.getRequestUser().getUserId(); |
|||
FirmReportsEntity firmReportsEntity = SmartBeanUtil.copy(addForm, FirmReportsEntity.class); |
|||
firmReportsEntity.setUserId(userId); |
|||
firmReportsEntity.setApprovalStatus(ReviewEnum.NOSUBMIT.getValue()); |
|||
firmReportsEntity.setSubmissionTime(LocalDateTime.now()); |
|||
firmReportsDao.insert(firmReportsEntity); |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
/** |
|||
* 更新 |
|||
* |
|||
*/ |
|||
public ResponseDTO<String> update(FirmReportsUpdateForm updateForm) { |
|||
FirmReportsEntity firmReportsEntity = SmartBeanUtil.copy(updateForm, FirmReportsEntity.class); |
|||
firmReportsDao.updateById(firmReportsEntity); |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除 |
|||
*/ |
|||
public ResponseDTO<String> batchDelete(List<Integer> idList) { |
|||
if (CollectionUtils.isEmpty(idList)){ |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
firmReportsDao.deleteBatchIds(idList); |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
/** |
|||
* 单个删除 |
|||
*/ |
|||
public ResponseDTO<String> delete(Integer id) { |
|||
if (null == id){ |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
firmReportsDao.deleteById(id); |
|||
return ResponseDTO.ok(); |
|||
} |
|||
} |
|||
@ -0,0 +1,72 @@ |
|||
package net.lab1024.sa.admin.module.penalty.controller; |
|||
|
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyApplyAddForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyApplyQueryForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyApplyUpdateForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.vo.PenaltyApplyVO; |
|||
import net.lab1024.sa.admin.module.penalty.service.PenaltyApplyService; |
|||
import net.lab1024.sa.base.common.domain.ValidateList; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import cn.dev33.satoken.annotation.SaCheckPermission; |
|||
import net.lab1024.sa.base.common.domain.ResponseDTO; |
|||
import net.lab1024.sa.base.common.domain.PageResult; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.validation.Valid; |
|||
|
|||
/** |
|||
* 无处罚证明申请主表 Controller |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 21:36:44 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@RestController |
|||
@Tag(name = "无处罚证明申请主表") |
|||
public class PenaltyApplyController { |
|||
|
|||
@Resource |
|||
private PenaltyApplyService penaltyApplyService; |
|||
|
|||
@Operation(summary = "分页查询 @author wzh") |
|||
@PostMapping("/penaltyApply/queryPage") |
|||
@SaCheckPermission("penaltyApply:query") |
|||
public ResponseDTO<PageResult<PenaltyApplyVO>> queryPage(@RequestBody @Valid PenaltyApplyQueryForm queryForm) { |
|||
return ResponseDTO.ok(penaltyApplyService.queryPage(queryForm)); |
|||
} |
|||
|
|||
@Operation(summary = "添加 @author wzh") |
|||
@PostMapping("/penaltyApply/add") |
|||
@SaCheckPermission("penaltyApply:add") |
|||
public ResponseDTO<String> add(@RequestBody @Valid PenaltyApplyAddForm addForm) { |
|||
return penaltyApplyService.add(addForm); |
|||
} |
|||
|
|||
@Operation(summary = "更新 @author wzh") |
|||
@PostMapping("/penaltyApply/update") |
|||
@SaCheckPermission("penaltyApply:update") |
|||
public ResponseDTO<String> update(@RequestBody @Valid PenaltyApplyUpdateForm updateForm) { |
|||
return penaltyApplyService.update(updateForm); |
|||
} |
|||
|
|||
@Operation(summary = "批量删除 @author wzh") |
|||
@PostMapping("/penaltyApply/batchDelete") |
|||
@SaCheckPermission("penaltyApply:delete") |
|||
public ResponseDTO<String> batchDelete(@RequestBody ValidateList<Long> idList) { |
|||
return penaltyApplyService.batchDelete(idList); |
|||
} |
|||
|
|||
@Operation(summary = "单个删除 @author wzh") |
|||
@GetMapping("/penaltyApply/delete/{id}") |
|||
@SaCheckPermission("penaltyApply:delete") |
|||
public ResponseDTO<String> batchDelete(@PathVariable Long id) { |
|||
return penaltyApplyService.delete(id); |
|||
} |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
package net.lab1024.sa.admin.module.penalty.dao; |
|||
|
|||
import java.util.List; |
|||
import net.lab1024.sa.admin.module.penalty.domain.entity.PenaltyApplyEntity; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyApplyQueryForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.vo.PenaltyApplyVO; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* 无处罚证明申请主表 Dao |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 21:36:44 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Mapper |
|||
public interface PenaltyApplyDao extends BaseMapper<PenaltyApplyEntity> { |
|||
|
|||
/** |
|||
* 分页 查询 |
|||
* |
|||
* @param page |
|||
* @param queryForm |
|||
* @return |
|||
*/ |
|||
List<PenaltyApplyVO> queryPage(Page page, @Param("queryForm") PenaltyApplyQueryForm queryForm); |
|||
|
|||
/** |
|||
* 更新删除状态 |
|||
*/ |
|||
long updateDeleted(@Param("id")Long id,@Param("deletedFlag")boolean deletedFlag); |
|||
|
|||
/** |
|||
* 批量更新删除状态 |
|||
*/ |
|||
void batchUpdateDeleted(@Param("idList")List<Long> idList,@Param("deletedFlag")boolean deletedFlag); |
|||
|
|||
} |
|||
@ -0,0 +1,67 @@ |
|||
package net.lab1024.sa.admin.module.penalty.domain.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.FieldFill; |
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import java.time.LocalDate; |
|||
import java.time.LocalDateTime; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 无处罚证明申请主表 实体类 |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 21:36:44 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
@TableName("t_penalty_apply") |
|||
public class PenaltyApplyEntity { |
|||
|
|||
/** |
|||
* 申请ID |
|||
*/ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** |
|||
* 申请人ID |
|||
*/ |
|||
private Long userId; |
|||
|
|||
/** |
|||
* 申请日期 |
|||
*/ |
|||
private LocalDateTime applyDate; |
|||
|
|||
/** |
|||
* 使用用途 |
|||
*/ |
|||
private String usePurpose; |
|||
|
|||
/** |
|||
* 状态(0-未提交,1-已提交,2-审核中,3-已批准,5-已驳回) |
|||
*/ |
|||
private Integer status; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private LocalDateTime createTime; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
@TableField(fill = FieldFill.INSERT_UPDATE) |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** |
|||
* 删除标志(0-正常,1-已删除) |
|||
*/ |
|||
private Integer deletedFlag; |
|||
|
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
package net.lab1024.sa.admin.module.penalty.domain.form; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import java.time.LocalDate; |
|||
import java.time.LocalDateTime; |
|||
import javax.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 无处罚证明申请主表 新建表单 |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 21:36:44 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
public class PenaltyApplyAddForm { |
|||
|
|||
@Schema(description = "申请人用途", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "申请人用途 不能为空") |
|||
private String usePurpose; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
package net.lab1024.sa.admin.module.penalty.domain.form; |
|||
|
|||
import net.lab1024.sa.base.common.domain.PageParam; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 无处罚证明申请主表 分页查询表单 |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 21:36:44 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
public class PenaltyApplyQueryForm extends PageParam { |
|||
|
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package net.lab1024.sa.admin.module.penalty.domain.form; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import javax.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 无处罚证明申请主表 更新表单 |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 21:36:44 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
public class PenaltyApplyUpdateForm { |
|||
|
|||
@Schema(description = "申请ID", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "申请ID 不能为空") |
|||
private Long id; |
|||
|
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
package net.lab1024.sa.admin.module.penalty.domain.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import java.time.LocalDate; |
|||
import java.time.LocalDateTime; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 无处罚证明申请主表 列表VO |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 21:36:44 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
public class PenaltyApplyVO { |
|||
|
|||
|
|||
@Schema(description = "申请ID") |
|||
private Long id; |
|||
|
|||
@Schema(description = "申请人ID") |
|||
private Long userId; |
|||
|
|||
@Schema(description = "申请日期") |
|||
private LocalDate applyDate; |
|||
|
|||
@Schema(description = "使用用途") |
|||
private String usePurpose; |
|||
|
|||
@Schema(description = "状态(0-未提交,1-已提交,2-审核中,3-已批准,5-已驳回)") |
|||
private Integer status; |
|||
|
|||
@Schema(description = "创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "更新时间") |
|||
private LocalDateTime updateTime; |
|||
|
|||
@Schema(description = "删除标志(0-正常,1-已删除)") |
|||
private Integer deletedFlag; |
|||
|
|||
} |
|||
@ -0,0 +1,93 @@ |
|||
package net.lab1024.sa.admin.module.penalty.service; |
|||
|
|||
import java.time.LocalDateTime; |
|||
import java.util.List; |
|||
|
|||
import net.lab1024.sa.admin.common.enums.ReviewEnum; |
|||
import net.lab1024.sa.admin.module.penalty.dao.PenaltyApplyDao; |
|||
import net.lab1024.sa.admin.module.penalty.domain.entity.PenaltyApplyEntity; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyApplyAddForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyApplyQueryForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyApplyUpdateForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.vo.PenaltyApplyVO; |
|||
import net.lab1024.sa.admin.util.AdminRequestUtil; |
|||
import net.lab1024.sa.base.common.util.SmartBeanUtil; |
|||
import net.lab1024.sa.base.common.util.SmartPageUtil; |
|||
import net.lab1024.sa.base.common.domain.ResponseDTO; |
|||
import net.lab1024.sa.base.common.domain.PageResult; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
/** |
|||
* 无处罚证明申请主表 Service |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-07 21:36:44 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Service |
|||
public class PenaltyApplyService { |
|||
|
|||
@Resource |
|||
private PenaltyApplyDao penaltyApplyDao; |
|||
|
|||
/** |
|||
* 分页查询 |
|||
*/ |
|||
public PageResult<PenaltyApplyVO> queryPage(PenaltyApplyQueryForm queryForm) { |
|||
Page<?> page = SmartPageUtil.convert2PageQuery(queryForm); |
|||
List<PenaltyApplyVO> list = penaltyApplyDao.queryPage(page, queryForm); |
|||
return SmartPageUtil.convert2PageResult(page, list); |
|||
} |
|||
|
|||
/** |
|||
* 添加 |
|||
*/ |
|||
public ResponseDTO<String> add(PenaltyApplyAddForm addForm) { |
|||
Long userId = AdminRequestUtil.getRequestUser().getUserId(); |
|||
PenaltyApplyEntity penaltyApplyEntity = SmartBeanUtil.copy(addForm, PenaltyApplyEntity.class); |
|||
penaltyApplyEntity.setUserId(userId); |
|||
penaltyApplyEntity.setStatus(ReviewEnum.APPROVAL.getValue()); |
|||
penaltyApplyEntity.setApplyDate(LocalDateTime.now()); |
|||
penaltyApplyDao.insert(penaltyApplyEntity); |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
/** |
|||
* 更新 |
|||
* |
|||
*/ |
|||
public ResponseDTO<String> update(PenaltyApplyUpdateForm updateForm) { |
|||
PenaltyApplyEntity penaltyApplyEntity = SmartBeanUtil.copy(updateForm, PenaltyApplyEntity.class); |
|||
penaltyApplyDao.updateById(penaltyApplyEntity); |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除 |
|||
*/ |
|||
public ResponseDTO<String> batchDelete(List<Long> idList) { |
|||
if (CollectionUtils.isEmpty(idList)){ |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
penaltyApplyDao.batchUpdateDeleted(idList, true); |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
/** |
|||
* 单个删除 |
|||
*/ |
|||
public ResponseDTO<String> delete(Long id) { |
|||
if (null == id){ |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
penaltyApplyDao.updateDeleted(id, true); |
|||
return ResponseDTO.ok(); |
|||
} |
|||
} |
|||
@ -0,0 +1,49 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="net.lab1024.sa.admin.module.cost.dao.FirmReportsDao"> |
|||
|
|||
<!-- 查询结果列 --> |
|||
<sql id="base_columns"> |
|||
t_firm_reports.id, |
|||
t_firm_reports.firm_id as firmId, |
|||
t_firm_reports.user_id as userId, |
|||
t_firm_reports.declare_year as declareYear, |
|||
t_firm_reports.declare_quarter as declareQuarter, |
|||
t_firm_reports.revenue as revenue, |
|||
t_firm_reports.total_cost as totalCost, |
|||
t_firm_reports.public_welfare_cost as publicWelfareCost, |
|||
t_firm_reports.cost_income_ratio as costIncomeRatio, |
|||
t_firm_reports.approval_status as approvalStatus, |
|||
t_firm_reports.submission_time as submissionTime, |
|||
t_firm_reports.approver_id as approverId, |
|||
t_firm_reports.create_time as createTime, |
|||
t_firm_reports.update_time as updateTime, |
|||
t_firm_reports.del_flag as delFlag |
|||
</sql> |
|||
|
|||
<!-- 分页查询 --> |
|||
<select id="queryPage" resultType="net.lab1024.sa.admin.module.cost.domain.vo.FirmReportsVO"> |
|||
SELECT |
|||
<include refid="base_columns"/> |
|||
FROM t_firm_reports |
|||
<where> |
|||
del_flag = 0 |
|||
<if test="queryForm.firmId != null and queryForm.firmId != ''"> |
|||
AND t_firm_reports.firm_id = #{queryForm.firmId} |
|||
</if> |
|||
<if test="queryForm.userId != null"> |
|||
AND t_firm_reports.user_id = #{queryForm.userId} |
|||
</if> |
|||
<if test="queryForm.declareYear != null"> |
|||
AND t_firm_reports.declare_year = #{queryForm.declareYear} |
|||
</if> |
|||
<if test="queryForm.declareQuarter != null"> |
|||
AND t_firm_reports.declare_quarter = #{queryForm.declareQuarter} |
|||
</if> |
|||
<if test="queryForm.approvalStatus != null"> |
|||
AND t_firm_reports.approval_status = #{queryForm.approvalStatus} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
|||
@ -0,0 +1,38 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="net.lab1024.sa.admin.module.penalty.dao.PenaltyApplyDao"> |
|||
|
|||
<!-- 查询结果列 --> |
|||
<sql id="base_columns"> |
|||
t_penalty_apply.id, |
|||
t_penalty_apply.user_id, |
|||
t_penalty_apply.apply_date, |
|||
t_penalty_apply.use_purpose, |
|||
t_penalty_apply.status, |
|||
t_penalty_apply.create_time, |
|||
t_penalty_apply.update_time, |
|||
t_penalty_apply.deleted_flag |
|||
</sql> |
|||
|
|||
<!-- 分页查询 --> |
|||
<select id="queryPage" resultType="net.lab1024.sa.admin.module.penalty.domain.vo.PenaltyApplyVO"> |
|||
SELECT |
|||
<include refid="base_columns"/> |
|||
FROM t_penalty_apply |
|||
|
|||
</select> |
|||
|
|||
<update id="batchUpdateDeleted"> |
|||
update t_penalty_apply set deleted_flag = #{deletedFlag} |
|||
where id in |
|||
<foreach collection="idList" open="(" close=")" separator="," item="item"> |
|||
#{item} |
|||
</foreach> |
|||
</update> |
|||
|
|||
<update id="updateDeleted"> |
|||
update t_penalty_apply set deleted_flag = #{deletedFlag} |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
</mapper> |
|||
Loading…
Reference in new issue