17 changed files with 557 additions and 1 deletions
@ -0,0 +1,80 @@ |
|||
package net.lab1024.sa.admin.module.penalty.controller; |
|||
|
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyLawyerAddForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyLawyerQueryForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyLawyerQueryFormNoPage; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyLawyerUpdateForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.vo.PenaltyLawyerVO; |
|||
import net.lab1024.sa.admin.module.penalty.service.PenaltyLawyerService; |
|||
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-09 10:53:07 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@RestController |
|||
@Tag(name = "处罚人") |
|||
public class PenaltyLawyerController { |
|||
|
|||
@Resource |
|||
private PenaltyLawyerService penaltyLawyerService; |
|||
/* |
|||
@Operation(summary = "详情查询 @author wzh") |
|||
@PostMapping("/penaltyLawyer/query") |
|||
//@SaCheckPermission("penaltyLawyer:query")
|
|||
public ResponseDTO<Boolean> query(@RequestBody @Valid PenaltyLawyerQueryFormNoPage queryForm) { |
|||
return ResponseDTO.ok(penaltyLawyerService.query(queryForm)); |
|||
}*/ |
|||
|
|||
@Operation(summary = "分页查询 @author wzh") |
|||
@PostMapping("/penaltyLawyer/queryPage") |
|||
@SaCheckPermission("penaltyLawyer:query") |
|||
public ResponseDTO<PageResult<PenaltyLawyerVO>> queryPage(@RequestBody @Valid PenaltyLawyerQueryForm queryForm) { |
|||
return ResponseDTO.ok(penaltyLawyerService.queryPage(queryForm)); |
|||
} |
|||
|
|||
@Operation(summary = "添加 @author wzh") |
|||
@PostMapping("/penaltyLawyer/add") |
|||
@SaCheckPermission("penaltyLawyer:add") |
|||
public ResponseDTO<String> add(@RequestBody @Valid PenaltyLawyerAddForm addForm) { |
|||
return penaltyLawyerService.add(addForm); |
|||
} |
|||
|
|||
@Operation(summary = "更新 @author wzh") |
|||
@PostMapping("/penaltyLawyer/update") |
|||
@SaCheckPermission("penaltyLawyer:update") |
|||
public ResponseDTO<String> update(@RequestBody @Valid PenaltyLawyerUpdateForm updateForm) { |
|||
return penaltyLawyerService.update(updateForm); |
|||
} |
|||
|
|||
@Operation(summary = "批量删除 @author wzh") |
|||
@PostMapping("/penaltyLawyer/batchDelete") |
|||
@SaCheckPermission("penaltyLawyer:delete") |
|||
public ResponseDTO<String> batchDelete(@RequestBody ValidateList<Integer> idList) { |
|||
return penaltyLawyerService.batchDelete(idList); |
|||
} |
|||
|
|||
@Operation(summary = "单个删除 @author wzh") |
|||
@GetMapping("/penaltyLawyer/delete/{id}") |
|||
@SaCheckPermission("penaltyLawyer:delete") |
|||
public ResponseDTO<String> batchDelete(@PathVariable Integer id) { |
|||
return penaltyLawyerService.delete(id); |
|||
} |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
package net.lab1024.sa.admin.module.penalty.dao; |
|||
|
|||
import java.util.List; |
|||
import net.lab1024.sa.admin.module.penalty.domain.entity.PenaltyLawyerEntity; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyLawyerQueryForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.vo.PenaltyLawyerVO; |
|||
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-09 10:53:07 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Mapper |
|||
public interface PenaltyLawyerDao extends BaseMapper<PenaltyLawyerEntity> { |
|||
|
|||
/** |
|||
* 分页 查询 |
|||
* |
|||
* @param page |
|||
* @param queryForm |
|||
* @return |
|||
*/ |
|||
List<PenaltyLawyerVO> queryPage(Page page, @Param("queryForm") PenaltyLawyerQueryForm queryForm); |
|||
|
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
package net.lab1024.sa.admin.module.penalty.dao; |
|||
|
|||
import net.lab1024.sa.admin.module.penalty.domain.entity.PenaltyLawyerEntity; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 处罚人 Manager |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-09 10:53:07 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
@Service |
|||
public class PenaltyLawyerManager extends ServiceImpl<PenaltyLawyerDao, PenaltyLawyerEntity> { |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,112 @@ |
|||
package net.lab1024.sa.admin.module.penalty.domain.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import java.time.LocalDateTime; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 处罚人 实体类 |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-09 10:53:07 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
@TableName("t_penalty_lawyer") |
|||
public class PenaltyLawyerEntity { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@TableId(type = IdType.AUTO) |
|||
private Integer id; |
|||
|
|||
/** |
|||
* 机构名称 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 负责人 |
|||
*/ |
|||
private String principal; |
|||
|
|||
/** |
|||
* 执业证号 |
|||
*/ |
|||
private String licenseNo; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String phone; |
|||
|
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 统一信用代码 |
|||
*/ |
|||
private String unifiedCreditCode; |
|||
|
|||
/** |
|||
* 主管机关 |
|||
*/ |
|||
private String governingBody; |
|||
|
|||
/** |
|||
* 组织形式 |
|||
*/ |
|||
private String organizationalForm; |
|||
|
|||
/** |
|||
* 总分所形式 |
|||
*/ |
|||
private String branchForm; |
|||
|
|||
/** |
|||
* 党员人数 |
|||
*/ |
|||
private Integer partyMemberCount; |
|||
|
|||
/** |
|||
* 党组织名称 |
|||
*/ |
|||
private String partyOrganizationName; |
|||
|
|||
/** |
|||
* 党组织形式 |
|||
*/ |
|||
private String partyOrganizationForm; |
|||
|
|||
/** |
|||
* 党支部负责人 |
|||
*/ |
|||
private String partyBranchPrincipal; |
|||
|
|||
/** |
|||
* 所属地市 |
|||
*/ |
|||
private String city; |
|||
|
|||
/** |
|||
* 所属区划 |
|||
*/ |
|||
private String district; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private LocalDateTime createdAt; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private LocalDateTime updatedAt; |
|||
|
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
package net.lab1024.sa.admin.module.penalty.domain.form; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 处罚人 新建表单 |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-09 10:53:07 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
public class PenaltyLawyerAddForm { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "主键ID 不能为空") |
|||
private Integer id; |
|||
|
|||
@Schema(description = "机构名称", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotBlank(message = "机构名称 不能为空") |
|||
private String name; |
|||
|
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
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-09 10:53:07 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
public class PenaltyLawyerQueryForm extends PageParam { |
|||
/** |
|||
* 执业证号 |
|||
*/ |
|||
private String licenseNo; |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package net.lab1024.sa.admin.module.penalty.domain.form; |
|||
|
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import net.lab1024.sa.base.common.domain.PageParam; |
|||
|
|||
/** |
|||
* 处罚人 分页查询表单 |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-09 10:53:07 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
public class PenaltyLawyerQueryFormNoPage{ |
|||
/** |
|||
* 执业证号 |
|||
*/ |
|||
private String licenseNo; |
|||
} |
|||
@ -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-09 10:53:07 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
public class PenaltyLawyerUpdateForm { |
|||
|
|||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "主键ID 不能为空") |
|||
private Integer id; |
|||
|
|||
} |
|||
@ -0,0 +1,73 @@ |
|||
package net.lab1024.sa.admin.module.penalty.domain.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import java.time.LocalDateTime; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 处罚人 列表VO |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-09 10:53:07 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
public class PenaltyLawyerVO { |
|||
|
|||
|
|||
@Schema(description = "主键ID") |
|||
private Integer id; |
|||
|
|||
@Schema(description = "机构名称") |
|||
private String name; |
|||
|
|||
@Schema(description = "负责人") |
|||
private String principal; |
|||
|
|||
@Schema(description = "执业证号") |
|||
private String licenseNo; |
|||
|
|||
@Schema(description = "联系电话") |
|||
private String phone; |
|||
|
|||
@Schema(description = "地址") |
|||
private String address; |
|||
|
|||
@Schema(description = "统一信用代码") |
|||
private String unifiedCreditCode; |
|||
|
|||
@Schema(description = "主管机关") |
|||
private String governingBody; |
|||
|
|||
@Schema(description = "组织形式") |
|||
private String organizationalForm; |
|||
|
|||
@Schema(description = "总分所形式") |
|||
private String branchForm; |
|||
|
|||
@Schema(description = "党员人数") |
|||
private Integer partyMemberCount; |
|||
|
|||
@Schema(description = "党组织名称") |
|||
private String partyOrganizationName; |
|||
|
|||
@Schema(description = "党组织形式") |
|||
private String partyOrganizationForm; |
|||
|
|||
@Schema(description = "党支部负责人") |
|||
private String partyBranchPrincipal; |
|||
|
|||
@Schema(description = "所属地市") |
|||
private String city; |
|||
|
|||
@Schema(description = "所属区划") |
|||
private String district; |
|||
|
|||
@Schema(description = "创建时间") |
|||
private LocalDateTime createdAt; |
|||
|
|||
@Schema(description = "更新时间") |
|||
private LocalDateTime updatedAt; |
|||
|
|||
} |
|||
@ -0,0 +1,97 @@ |
|||
package net.lab1024.sa.admin.module.penalty.service; |
|||
|
|||
import java.util.List; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import net.lab1024.sa.admin.module.penalty.dao.PenaltyLawyerDao; |
|||
import net.lab1024.sa.admin.module.penalty.domain.entity.PenaltyLawyerEntity; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyLawyerAddForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyLawyerQueryForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyLawyerQueryFormNoPage; |
|||
import net.lab1024.sa.admin.module.penalty.domain.form.PenaltyLawyerUpdateForm; |
|||
import net.lab1024.sa.admin.module.penalty.domain.vo.PenaltyLawyerVO; |
|||
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; |
|||
import javax.validation.Valid; |
|||
|
|||
/** |
|||
* 处罚人 Service |
|||
* |
|||
* @Author wzh |
|||
* @Date 2026-01-09 10:53:07 |
|||
* @Copyright 1.0 |
|||
*/ |
|||
|
|||
@Service |
|||
public class PenaltyLawyerService { |
|||
|
|||
@Resource |
|||
private PenaltyLawyerDao penaltyLawyerDao; |
|||
|
|||
/** |
|||
* 分页查询 |
|||
*/ |
|||
public PageResult<PenaltyLawyerVO> queryPage(PenaltyLawyerQueryForm queryForm) { |
|||
Page<?> page = SmartPageUtil.convert2PageQuery(queryForm); |
|||
List<PenaltyLawyerVO> list = penaltyLawyerDao.queryPage(page, queryForm); |
|||
return SmartPageUtil.convert2PageResult(page, list); |
|||
} |
|||
|
|||
/** |
|||
* 添加 |
|||
*/ |
|||
public ResponseDTO<String> add(PenaltyLawyerAddForm addForm) { |
|||
PenaltyLawyerEntity penaltyLawyerEntity = SmartBeanUtil.copy(addForm, PenaltyLawyerEntity.class); |
|||
penaltyLawyerDao.insert(penaltyLawyerEntity); |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
/** |
|||
* 更新 |
|||
* |
|||
*/ |
|||
public ResponseDTO<String> update(PenaltyLawyerUpdateForm updateForm) { |
|||
PenaltyLawyerEntity penaltyLawyerEntity = SmartBeanUtil.copy(updateForm, PenaltyLawyerEntity.class); |
|||
penaltyLawyerDao.updateById(penaltyLawyerEntity); |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除 |
|||
*/ |
|||
public ResponseDTO<String> batchDelete(List<Integer> idList) { |
|||
if (CollectionUtils.isEmpty(idList)){ |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
penaltyLawyerDao.deleteBatchIds(idList); |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
/** |
|||
* 单个删除 |
|||
*/ |
|||
public ResponseDTO<String> delete(Integer id) { |
|||
if (null == id){ |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
penaltyLawyerDao.deleteById(id); |
|||
return ResponseDTO.ok(); |
|||
} |
|||
|
|||
public Boolean query(@Valid String licenseNo) { |
|||
List<PenaltyLawyerEntity> penaltyLawyerEntities = penaltyLawyerDao.selectList(new LambdaQueryWrapper<PenaltyLawyerEntity>().eq(PenaltyLawyerEntity::getLicenseNo, licenseNo)); |
|||
if (CollectionUtils.isNotEmpty(penaltyLawyerEntities)) { |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
<?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.PenaltyLawyerDao"> |
|||
|
|||
<!-- 查询结果列 --> |
|||
<sql id="base_columns"> |
|||
t_penalty_lawyer.id, |
|||
t_penalty_lawyer.name, |
|||
t_penalty_lawyer.principal, |
|||
t_penalty_lawyer.license_no, |
|||
t_penalty_lawyer.phone, |
|||
t_penalty_lawyer.address, |
|||
t_penalty_lawyer.unified_credit_code, |
|||
t_penalty_lawyer.governing_body, |
|||
t_penalty_lawyer.organizational_form, |
|||
t_penalty_lawyer.branch_form, |
|||
t_penalty_lawyer.party_member_count, |
|||
t_penalty_lawyer.party_organization_name, |
|||
t_penalty_lawyer.party_organization_form, |
|||
t_penalty_lawyer.party_branch_principal, |
|||
t_penalty_lawyer.city, |
|||
t_penalty_lawyer.district, |
|||
t_penalty_lawyer.created_at, |
|||
t_penalty_lawyer.updated_at |
|||
</sql> |
|||
|
|||
<!-- 分页查询 --> |
|||
<select id="queryPage" resultType="net.lab1024.sa.admin.module.penalty.domain.vo.PenaltyLawyerVO"> |
|||
SELECT |
|||
<include refid="base_columns"/> |
|||
FROM t_penalty_lawyer |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
Loading…
Reference in new issue