调整
This commit is contained in:
parent
0504b956cc
commit
1c5b890fb2
8
pom.xml
8
pom.xml
@ -431,9 +431,7 @@
|
||||
<properties>
|
||||
<profiles.active>dev</profiles.active>
|
||||
</properties>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
|
||||
</profile>
|
||||
<!--测试环境-->
|
||||
<profile>
|
||||
@ -455,7 +453,9 @@
|
||||
<properties>
|
||||
<profiles.active>prod</profiles.active>
|
||||
</properties>
|
||||
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
|
||||
@ -36,18 +36,18 @@ public class MvcConfig implements WebMvcConfigurer {
|
||||
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void addCorsMappings(CorsRegistry registry) {
|
||||
// registry.addMapping("/**") // 匹配所有的路径
|
||||
// .allowCredentials(true) // 设置允许凭证
|
||||
// .allowedHeaders("*") // 设置请求头
|
||||
// .allowedMethods("GET", "POST", "PUT", "DELETE") // 设置允许的方式
|
||||
// .allowedOriginPatterns("*");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void configurePathMatch(PathMatchConfigurer configurer) {
|
||||
// configurer
|
||||
// .addPathPrefix("/village",c -> c.isAnnotationPresent(RestController.class));
|
||||
// }
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**") // 匹配所有的路径
|
||||
.allowCredentials(true) // 设置允许凭证
|
||||
.allowedHeaders("*") // 设置请求头
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE") // 设置允许的方式
|
||||
.allowedOriginPatterns("*");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configurePathMatch(PathMatchConfigurer configurer) {
|
||||
configurer
|
||||
.addPathPrefix("/village",c -> c.isAnnotationPresent(RestController.class));
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,72 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.controller;
|
||||
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.AffairsAddForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.AffairsQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.AffairsUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.vo.AffairsVO;
|
||||
import net.lab1024.sa.admin.module.business.affairs.service.AffairsService;
|
||||
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 pengjie
|
||||
* @Date 2025-07-17 11:42:43
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@Tag(name = "三务公开信息")
|
||||
public class AffairsController {
|
||||
|
||||
@Resource
|
||||
private AffairsService affairsService;
|
||||
|
||||
@Operation(summary = "分页查询 @author pengjie")
|
||||
@PostMapping("/affairs/queryPage")
|
||||
@SaCheckPermission("affairs:query")
|
||||
public ResponseDTO<PageResult<AffairsVO>> queryPage(@RequestBody @Valid AffairsQueryForm queryForm) {
|
||||
return ResponseDTO.ok(affairsService.queryPage(queryForm));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加 @author pengjie")
|
||||
@PostMapping("/affairs/add")
|
||||
@SaCheckPermission("affairs:add")
|
||||
public ResponseDTO<String> add(@RequestBody @Valid AffairsAddForm addForm) {
|
||||
return affairsService.add(addForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新 @author pengjie")
|
||||
@PostMapping("/affairs/update")
|
||||
@SaCheckPermission("affairs:update")
|
||||
public ResponseDTO<String> update(@RequestBody @Valid AffairsUpdateForm updateForm) {
|
||||
return affairsService.update(updateForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除 @author pengjie")
|
||||
@PostMapping("/affairs/batchDelete")
|
||||
@SaCheckPermission("affairs:delete")
|
||||
public ResponseDTO<String> batchDelete(@RequestBody ValidateList<Long> idList) {
|
||||
return affairsService.batchDelete(idList);
|
||||
}
|
||||
|
||||
@Operation(summary = "单个删除 @author pengjie")
|
||||
@GetMapping("/affairs/delete/{affairsId}")
|
||||
@SaCheckPermission("affairs:delete")
|
||||
public ResponseDTO<String> batchDelete(@PathVariable Long affairsId) {
|
||||
return affairsService.delete(affairsId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.controller;
|
||||
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageFrameworkAddForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageFrameworkQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageFrameworkUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.vo.VillageFrameworkVO;
|
||||
import net.lab1024.sa.admin.module.business.affairs.service.VillageFrameworkService;
|
||||
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 pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@Tag(name = "村庄架构")
|
||||
public class VillageFrameworkController {
|
||||
|
||||
@Resource
|
||||
private VillageFrameworkService villageFrameworkService;
|
||||
|
||||
@Operation(summary = "分页查询 @author pengjie")
|
||||
@PostMapping("/villageFramework/queryPage")
|
||||
@SaCheckPermission("villageFramework:query")
|
||||
public ResponseDTO<PageResult<VillageFrameworkVO>> queryPage(@RequestBody @Valid VillageFrameworkQueryForm queryForm) {
|
||||
return ResponseDTO.ok(villageFrameworkService.queryPage(queryForm));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加 @author pengjie")
|
||||
@PostMapping("/villageFramework/add")
|
||||
@SaCheckPermission("villageFramework:add")
|
||||
public ResponseDTO<String> add(@RequestBody @Valid VillageFrameworkAddForm addForm) {
|
||||
return villageFrameworkService.add(addForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新 @author pengjie")
|
||||
@PostMapping("/villageFramework/update")
|
||||
@SaCheckPermission("villageFramework:update")
|
||||
public ResponseDTO<String> update(@RequestBody @Valid VillageFrameworkUpdateForm updateForm) {
|
||||
return villageFrameworkService.update(updateForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除 @author pengjie")
|
||||
@PostMapping("/villageFramework/batchDelete")
|
||||
@SaCheckPermission("villageFramework:delete")
|
||||
public ResponseDTO<String> batchDelete(@RequestBody ValidateList<Long> idList) {
|
||||
return villageFrameworkService.batchDelete(idList);
|
||||
}
|
||||
|
||||
@Operation(summary = "单个删除 @author pengjie")
|
||||
@GetMapping("/villageFramework/delete/{frameworkId}")
|
||||
@SaCheckPermission("villageFramework:delete")
|
||||
public ResponseDTO<String> batchDelete(@PathVariable Long frameworkId) {
|
||||
return villageFrameworkService.delete(frameworkId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.controller;
|
||||
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageIntroduceAddForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageIntroduceQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageIntroduceUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.vo.VillageIntroduceVO;
|
||||
import net.lab1024.sa.admin.module.business.affairs.service.VillageIntroduceService;
|
||||
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 pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@Tag(name = "村庄介绍")
|
||||
public class VillageIntroduceController {
|
||||
|
||||
@Resource
|
||||
private VillageIntroduceService villageIntroduceService;
|
||||
|
||||
@Operation(summary = "分页查询 @author pengjie")
|
||||
@PostMapping("/villageIntroduce/queryPage")
|
||||
@SaCheckPermission("villageIntroduce:query")
|
||||
public ResponseDTO<PageResult<VillageIntroduceVO>> queryPage(@RequestBody @Valid VillageIntroduceQueryForm queryForm) {
|
||||
return ResponseDTO.ok(villageIntroduceService.queryPage(queryForm));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加 @author pengjie")
|
||||
@PostMapping("/villageIntroduce/add")
|
||||
@SaCheckPermission("villageIntroduce:add")
|
||||
public ResponseDTO<String> add(@RequestBody @Valid VillageIntroduceAddForm addForm) {
|
||||
return villageIntroduceService.add(addForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新 @author pengjie")
|
||||
@PostMapping("/villageIntroduce/update")
|
||||
@SaCheckPermission("villageIntroduce:update")
|
||||
public ResponseDTO<String> update(@RequestBody @Valid VillageIntroduceUpdateForm updateForm) {
|
||||
return villageIntroduceService.update(updateForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除 @author pengjie")
|
||||
@PostMapping("/villageIntroduce/batchDelete")
|
||||
@SaCheckPermission("villageIntroduce:delete")
|
||||
public ResponseDTO<String> batchDelete(@RequestBody ValidateList<Long> idList) {
|
||||
return villageIntroduceService.batchDelete(idList);
|
||||
}
|
||||
|
||||
@Operation(summary = "单个删除 @author pengjie")
|
||||
@GetMapping("/villageIntroduce/delete/{introduceId}")
|
||||
@SaCheckPermission("villageIntroduce:delete")
|
||||
public ResponseDTO<String> batchDelete(@PathVariable Long introduceId) {
|
||||
return villageIntroduceService.delete(introduceId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.controller;
|
||||
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageMailAddForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageMailQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageMailUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.vo.VillageMailVO;
|
||||
import net.lab1024.sa.admin.module.business.affairs.service.VillageMailService;
|
||||
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 pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@Tag(name = "内部邮件")
|
||||
public class VillageMailController {
|
||||
|
||||
@Resource
|
||||
private VillageMailService villageMailService;
|
||||
|
||||
@Operation(summary = "分页查询 @author pengjie")
|
||||
@PostMapping("/villageMail/queryPage")
|
||||
@SaCheckPermission("villageMail:query")
|
||||
public ResponseDTO<PageResult<VillageMailVO>> queryPage(@RequestBody @Valid VillageMailQueryForm queryForm) {
|
||||
return ResponseDTO.ok(villageMailService.queryPage(queryForm));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加 @author pengjie")
|
||||
@PostMapping("/villageMail/add")
|
||||
@SaCheckPermission("villageMail:add")
|
||||
public ResponseDTO<String> add(@RequestBody @Valid VillageMailAddForm addForm) {
|
||||
return villageMailService.add(addForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新 @author pengjie")
|
||||
@PostMapping("/villageMail/update")
|
||||
@SaCheckPermission("villageMail:update")
|
||||
public ResponseDTO<String> update(@RequestBody @Valid VillageMailUpdateForm updateForm) {
|
||||
return villageMailService.update(updateForm);
|
||||
}
|
||||
|
||||
@Operation(summary = "批量删除 @author pengjie")
|
||||
@PostMapping("/villageMail/batchDelete")
|
||||
@SaCheckPermission("villageMail:delete")
|
||||
public ResponseDTO<String> batchDelete(@RequestBody ValidateList<Long> idList) {
|
||||
return villageMailService.batchDelete(idList);
|
||||
}
|
||||
|
||||
@Operation(summary = "单个删除 @author pengjie")
|
||||
@GetMapping("/villageMail/delete/{mailId}")
|
||||
@SaCheckPermission("villageMail:delete")
|
||||
public ResponseDTO<String> batchDelete(@PathVariable Long mailId) {
|
||||
return villageMailService.delete(mailId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.dao;
|
||||
|
||||
import java.util.List;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.entity.AffairsEntity;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.AffairsQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.vo.AffairsVO;
|
||||
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 pengjie
|
||||
* @Date 2025-07-17 11:42:43
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface AffairsDao extends BaseMapper<AffairsEntity> {
|
||||
|
||||
/**
|
||||
* 分页 查询
|
||||
*
|
||||
* @param page
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
List<AffairsVO> queryPage(Page page, @Param("queryForm") AffairsQueryForm queryForm);
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.dao;
|
||||
|
||||
import java.util.List;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.entity.VillageFrameworkEntity;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageFrameworkQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.vo.VillageFrameworkVO;
|
||||
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 pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface VillageFrameworkDao extends BaseMapper<VillageFrameworkEntity> {
|
||||
|
||||
/**
|
||||
* 分页 查询
|
||||
*
|
||||
* @param page
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
List<VillageFrameworkVO> queryPage(Page page, @Param("queryForm") VillageFrameworkQueryForm queryForm);
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.dao;
|
||||
|
||||
import java.util.List;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.entity.VillageIntroduceEntity;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageIntroduceQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.vo.VillageIntroduceVO;
|
||||
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 pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface VillageIntroduceDao extends BaseMapper<VillageIntroduceEntity> {
|
||||
|
||||
/**
|
||||
* 分页 查询
|
||||
*
|
||||
* @param page
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
List<VillageIntroduceVO> queryPage(Page page, @Param("queryForm") VillageIntroduceQueryForm queryForm);
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.dao;
|
||||
|
||||
import java.util.List;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.entity.VillageMailEntity;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageMailQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.vo.VillageMailVO;
|
||||
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 pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface VillageMailDao extends BaseMapper<VillageMailEntity> {
|
||||
|
||||
/**
|
||||
* 分页 查询
|
||||
*
|
||||
* @param page
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
List<VillageMailVO> queryPage(Page page, @Param("queryForm") VillageMailQueryForm queryForm);
|
||||
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 三务公开信息 实体类
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 11:42:43
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("affairs")
|
||||
public class AffairsEntity {
|
||||
|
||||
/**
|
||||
* 三务ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long affairsId;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 可见范围类型(1:人员;2:组织)
|
||||
*/
|
||||
private Integer rangeType;
|
||||
|
||||
/**
|
||||
* 发布范围
|
||||
*/
|
||||
private String range;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 村庄架构 实体类
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("village_framework")
|
||||
public class VillageFrameworkEntity {
|
||||
|
||||
/**
|
||||
* 村庄架构ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long frameworkId;
|
||||
|
||||
/**
|
||||
* 村庄ID
|
||||
*/
|
||||
private Integer villageId;
|
||||
|
||||
/**
|
||||
* 架构图片
|
||||
*/
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 村庄介绍 实体类
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("village_introduce")
|
||||
public class VillageIntroduceEntity {
|
||||
|
||||
/**
|
||||
* 村庄介绍ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long introduceId;
|
||||
|
||||
/**
|
||||
* 村庄ID
|
||||
*/
|
||||
private Integer villageId;
|
||||
|
||||
/**
|
||||
* 面积
|
||||
*/
|
||||
private String area;
|
||||
|
||||
/**
|
||||
* 责任人
|
||||
*/
|
||||
private String chargePerson;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 乡村图片
|
||||
*/
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 内部邮件 实体类
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("village_mail")
|
||||
public class VillageMailEntity {
|
||||
|
||||
/**
|
||||
* 邮件ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long mailId;
|
||||
|
||||
/**
|
||||
* 收件人
|
||||
*/
|
||||
private String recipient;
|
||||
|
||||
/**
|
||||
* 主题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 阅读状态(0:未读;1:已读)
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.form;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 三务公开信息 新建表单
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 11:42:43
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AffairsAddForm {
|
||||
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "可见范围类型(1:人员;2:组织)")
|
||||
private Integer rangeType;
|
||||
|
||||
@Schema(description = "发布范围")
|
||||
private String range;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "附件")
|
||||
private String fileUrl;
|
||||
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.form;
|
||||
|
||||
import net.lab1024.sa.base.common.domain.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 三务公开信息 分页查询表单
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 11:42:43
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class AffairsQueryForm extends PageParam {
|
||||
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private Integer type;
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.form;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 三务公开信息 更新表单
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 11:42:43
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AffairsUpdateForm {
|
||||
|
||||
@Schema(description = "三务ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "三务ID 不能为空")
|
||||
private Long affairsId;
|
||||
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "可见范围类型(1:人员;2:组织)")
|
||||
private Integer rangeType;
|
||||
|
||||
@Schema(description = "发布范围")
|
||||
private String range;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "附件")
|
||||
private String fileUrl;
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.form;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 村庄架构 新建表单
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class VillageFrameworkAddForm {
|
||||
|
||||
@Schema(description = "村庄ID")
|
||||
private Integer villageId;
|
||||
|
||||
@Schema(description = "架构图片")
|
||||
private String fileUrl;
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.form;
|
||||
|
||||
import net.lab1024.sa.base.common.domain.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 村庄架构 分页查询表单
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class VillageFrameworkQueryForm extends PageParam {
|
||||
|
||||
@Schema(description = "村庄ID")
|
||||
private Integer villageId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.form;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 村庄架构 更新表单
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class VillageFrameworkUpdateForm {
|
||||
|
||||
@Schema(description = "村庄架构ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "村庄架构ID 不能为空")
|
||||
private Long frameworkId;
|
||||
|
||||
@Schema(description = "村庄ID")
|
||||
private Integer villageId;
|
||||
|
||||
@Schema(description = "架构图片")
|
||||
private String fileUrl;
|
||||
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.form;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 村庄介绍 新建表单
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class VillageIntroduceAddForm {
|
||||
|
||||
@Schema(description = "村庄ID")
|
||||
private Integer villageId;
|
||||
|
||||
@Schema(description = "面积")
|
||||
private String area;
|
||||
|
||||
@Schema(description = "责任人")
|
||||
private String chargePerson;
|
||||
|
||||
@Schema(description = "电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "乡村图片")
|
||||
private String fileUrl;
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.form;
|
||||
|
||||
import net.lab1024.sa.base.common.domain.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 村庄介绍 分页查询表单
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class VillageIntroduceQueryForm extends PageParam {
|
||||
|
||||
@Schema(description = "村庄ID")
|
||||
private Integer villageId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.form;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 村庄介绍 更新表单
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class VillageIntroduceUpdateForm {
|
||||
|
||||
@Schema(description = "村庄介绍ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "村庄介绍ID 不能为空")
|
||||
private Long introduceId;
|
||||
|
||||
@Schema(description = "村庄ID")
|
||||
private Integer villageId;
|
||||
|
||||
@Schema(description = "面积")
|
||||
private String area;
|
||||
|
||||
@Schema(description = "责任人")
|
||||
private String chargePerson;
|
||||
|
||||
@Schema(description = "电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "乡村图片")
|
||||
private String fileUrl;
|
||||
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.form;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 内部邮件 新建表单
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class VillageMailAddForm {
|
||||
|
||||
@Schema(description = "收件人")
|
||||
private String recipient;
|
||||
|
||||
@Schema(description = "主题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "附件")
|
||||
private String fileUrl;
|
||||
|
||||
@Schema(description = "阅读状态(0:未读;1:已读)")
|
||||
private Integer state;
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.form;
|
||||
|
||||
import net.lab1024.sa.base.common.domain.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 内部邮件 分页查询表单
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class VillageMailQueryForm extends PageParam {
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createBy;
|
||||
|
||||
@Schema(description = "收件人")
|
||||
private String recipient;
|
||||
|
||||
@Schema(description = "主题")
|
||||
private String title;
|
||||
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.form;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 内部邮件 更新表单
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class VillageMailUpdateForm {
|
||||
|
||||
@Schema(description = "邮件ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "邮件ID 不能为空")
|
||||
private Long mailId;
|
||||
|
||||
@Schema(description = "收件人")
|
||||
private String recipient;
|
||||
|
||||
@Schema(description = "主题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "附件")
|
||||
private String fileUrl;
|
||||
|
||||
@Schema(description = "阅读状态(0:未读;1:已读)")
|
||||
private Integer state;
|
||||
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 三务公开信息 列表VO
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 11:42:43
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AffairsVO {
|
||||
|
||||
|
||||
@Schema(description = "三务ID")
|
||||
private Long affairsId;
|
||||
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "类型")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "可见范围类型(1:人员;2:组织)")
|
||||
private Integer rangeType;
|
||||
|
||||
@Schema(description = "发布范围")
|
||||
private String range;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "附件")
|
||||
private String fileUrl;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createBy;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 村庄架构 列表VO
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class VillageFrameworkVO {
|
||||
|
||||
|
||||
@Schema(description = "村庄架构ID")
|
||||
private Long frameworkId;
|
||||
|
||||
@Schema(description = "村庄ID")
|
||||
private Integer villageId;
|
||||
|
||||
@Schema(description = "架构图片")
|
||||
private String fileUrl;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createBy;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 村庄介绍 列表VO
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class VillageIntroduceVO {
|
||||
|
||||
|
||||
@Schema(description = "村庄介绍ID")
|
||||
private Long introduceId;
|
||||
|
||||
@Schema(description = "村庄ID")
|
||||
private Integer villageId;
|
||||
|
||||
@Schema(description = "面积")
|
||||
private String area;
|
||||
|
||||
@Schema(description = "责任人")
|
||||
private String chargePerson;
|
||||
|
||||
@Schema(description = "电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "乡村图片")
|
||||
private String fileUrl;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createBy;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.domain.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 内部邮件 列表VO
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class VillageMailVO {
|
||||
|
||||
|
||||
@Schema(description = "邮件ID")
|
||||
private Long mailId;
|
||||
|
||||
@Schema(description = "收件人")
|
||||
private String recipient;
|
||||
|
||||
@Schema(description = "主题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "附件")
|
||||
private String fileUrl;
|
||||
|
||||
@Schema(description = "阅读状态(0:未读;1:已读)")
|
||||
private Integer state;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createBy;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.manager;
|
||||
|
||||
import net.lab1024.sa.admin.module.business.affairs.dao.AffairsDao;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.entity.AffairsEntity;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 三务公开信息 Manager
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 11:42:43
|
||||
* @Copyright jxj
|
||||
*/
|
||||
@Service
|
||||
public class AffairsManager extends ServiceImpl<AffairsDao, AffairsEntity> {
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.manager;
|
||||
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.entity.VillageFrameworkEntity;
|
||||
import net.lab1024.sa.admin.module.business.affairs.dao.VillageFrameworkDao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 村庄架构 Manager
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
@Service
|
||||
public class VillageFrameworkManager extends ServiceImpl<VillageFrameworkDao, VillageFrameworkEntity> {
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.manager;
|
||||
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.entity.VillageIntroduceEntity;
|
||||
import net.lab1024.sa.admin.module.business.affairs.dao.VillageIntroduceDao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 村庄介绍 Manager
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
@Service
|
||||
public class VillageIntroduceManager extends ServiceImpl<VillageIntroduceDao, VillageIntroduceEntity> {
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.manager;
|
||||
|
||||
import net.lab1024.sa.admin.module.business.affairs.dao.VillageMailDao;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.entity.VillageMailEntity;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 内部邮件 Manager
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
@Service
|
||||
public class VillageMailManager extends ServiceImpl<VillageMailDao, VillageMailEntity> {
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,102 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import net.lab1024.sa.admin.module.business.affairs.dao.AffairsDao;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.entity.AffairsEntity;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.AffairsAddForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.AffairsQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.AffairsUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.vo.AffairsVO;
|
||||
import net.lab1024.sa.base.common.domain.RequestUser;
|
||||
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.common.util.SmartRequestUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 三务公开信息 Service
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-17 11:42:43
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class AffairsService {
|
||||
|
||||
@Resource
|
||||
private AffairsDao affairsDao;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
public PageResult<AffairsVO> queryPage(AffairsQueryForm queryForm) {
|
||||
RequestUser requestUser = SmartRequestUtil.getRequestUser();
|
||||
Page<?> page = SmartPageUtil.convert2PageQuery(queryForm);
|
||||
List<AffairsVO> list = affairsDao.queryPage(page, queryForm);
|
||||
list = list.stream().filter(l -> (l.getRange().contains(requestUser.getUserId().toString()) && l.getRangeType() == 1)
|
||||
|| (l.getRange().contains(requestUser.getVillageId().toString()) && l.getRangeType() == 2))
|
||||
.collect(Collectors.toList());
|
||||
PageResult<AffairsVO> pageResult = SmartPageUtil.convert2PageResult(page, list);
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
public ResponseDTO<String> add(AffairsAddForm addForm) {
|
||||
AffairsEntity affairsEntity = SmartBeanUtil.copy(addForm, AffairsEntity.class);
|
||||
affairsDao.insert(affairsEntity);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param updateForm
|
||||
* @return
|
||||
*/
|
||||
public ResponseDTO<String> update(AffairsUpdateForm updateForm) {
|
||||
AffairsEntity affairsEntity = SmartBeanUtil.copy(updateForm, AffairsEntity.class);
|
||||
affairsDao.updateById(affairsEntity);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
public ResponseDTO<String> batchDelete(List<Long> idList) {
|
||||
if (CollectionUtils.isEmpty(idList)){
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
affairsDao.deleteBatchIds(idList);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 单个删除
|
||||
*/
|
||||
public ResponseDTO<String> delete(Long affairsId) {
|
||||
if (null == affairsId){
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
affairsDao.deleteById(affairsId);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.service;
|
||||
|
||||
import java.util.List;
|
||||
import net.lab1024.sa.admin.module.business.affairs.dao.VillageFrameworkDao;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.entity.VillageFrameworkEntity;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageFrameworkAddForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageFrameworkQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageFrameworkUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.vo.VillageFrameworkVO;
|
||||
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 pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class VillageFrameworkService {
|
||||
|
||||
@Resource
|
||||
private VillageFrameworkDao villageFrameworkDao;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
public PageResult<VillageFrameworkVO> queryPage(VillageFrameworkQueryForm queryForm) {
|
||||
Page<?> page = SmartPageUtil.convert2PageQuery(queryForm);
|
||||
List<VillageFrameworkVO> list = villageFrameworkDao.queryPage(page, queryForm);
|
||||
PageResult<VillageFrameworkVO> pageResult = SmartPageUtil.convert2PageResult(page, list);
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
public ResponseDTO<String> add(VillageFrameworkAddForm addForm) {
|
||||
VillageFrameworkEntity villageFrameworkEntity = SmartBeanUtil.copy(addForm, VillageFrameworkEntity.class);
|
||||
villageFrameworkDao.insert(villageFrameworkEntity);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param updateForm
|
||||
* @return
|
||||
*/
|
||||
public ResponseDTO<String> update(VillageFrameworkUpdateForm updateForm) {
|
||||
VillageFrameworkEntity villageFrameworkEntity = SmartBeanUtil.copy(updateForm, VillageFrameworkEntity.class);
|
||||
villageFrameworkDao.updateById(villageFrameworkEntity);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
public ResponseDTO<String> batchDelete(List<Long> idList) {
|
||||
if (CollectionUtils.isEmpty(idList)){
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
villageFrameworkDao.deleteBatchIds(idList);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 单个删除
|
||||
*/
|
||||
public ResponseDTO<String> delete(Long frameworkId) {
|
||||
if (null == frameworkId){
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
villageFrameworkDao.deleteById(frameworkId);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.service;
|
||||
|
||||
import java.util.List;
|
||||
import net.lab1024.sa.admin.module.business.affairs.dao.VillageIntroduceDao;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.entity.VillageIntroduceEntity;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageIntroduceAddForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageIntroduceQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageIntroduceUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.vo.VillageIntroduceVO;
|
||||
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 pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class VillageIntroduceService {
|
||||
|
||||
@Resource
|
||||
private VillageIntroduceDao villageIntroduceDao;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
public PageResult<VillageIntroduceVO> queryPage(VillageIntroduceQueryForm queryForm) {
|
||||
Page<?> page = SmartPageUtil.convert2PageQuery(queryForm);
|
||||
List<VillageIntroduceVO> list = villageIntroduceDao.queryPage(page, queryForm);
|
||||
PageResult<VillageIntroduceVO> pageResult = SmartPageUtil.convert2PageResult(page, list);
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
public ResponseDTO<String> add(VillageIntroduceAddForm addForm) {
|
||||
VillageIntroduceEntity villageIntroduceEntity = SmartBeanUtil.copy(addForm, VillageIntroduceEntity.class);
|
||||
villageIntroduceDao.insert(villageIntroduceEntity);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param updateForm
|
||||
* @return
|
||||
*/
|
||||
public ResponseDTO<String> update(VillageIntroduceUpdateForm updateForm) {
|
||||
VillageIntroduceEntity villageIntroduceEntity = SmartBeanUtil.copy(updateForm, VillageIntroduceEntity.class);
|
||||
villageIntroduceDao.updateById(villageIntroduceEntity);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
public ResponseDTO<String> batchDelete(List<Long> idList) {
|
||||
if (CollectionUtils.isEmpty(idList)){
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
villageIntroduceDao.deleteBatchIds(idList);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 单个删除
|
||||
*/
|
||||
public ResponseDTO<String> delete(Long introduceId) {
|
||||
if (null == introduceId){
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
villageIntroduceDao.deleteById(introduceId);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package net.lab1024.sa.admin.module.business.affairs.service;
|
||||
|
||||
import java.util.List;
|
||||
import net.lab1024.sa.admin.module.business.affairs.dao.VillageMailDao;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.entity.VillageMailEntity;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageMailAddForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageMailQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.form.VillageMailUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.affairs.domain.vo.VillageMailVO;
|
||||
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 pengjie
|
||||
* @Date 2025-07-17 14:48:56
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class VillageMailService {
|
||||
|
||||
@Resource
|
||||
private VillageMailDao villageMailDao;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
public PageResult<VillageMailVO> queryPage(VillageMailQueryForm queryForm) {
|
||||
Page<?> page = SmartPageUtil.convert2PageQuery(queryForm);
|
||||
List<VillageMailVO> list = villageMailDao.queryPage(page, queryForm);
|
||||
PageResult<VillageMailVO> pageResult = SmartPageUtil.convert2PageResult(page, list);
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
public ResponseDTO<String> add(VillageMailAddForm addForm) {
|
||||
VillageMailEntity villageMailEntity = SmartBeanUtil.copy(addForm, VillageMailEntity.class);
|
||||
villageMailDao.insert(villageMailEntity);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param updateForm
|
||||
* @return
|
||||
*/
|
||||
public ResponseDTO<String> update(VillageMailUpdateForm updateForm) {
|
||||
VillageMailEntity villageMailEntity = SmartBeanUtil.copy(updateForm, VillageMailEntity.class);
|
||||
villageMailDao.updateById(villageMailEntity);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
public ResponseDTO<String> batchDelete(List<Long> idList) {
|
||||
if (CollectionUtils.isEmpty(idList)){
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
villageMailDao.deleteBatchIds(idList);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 单个删除
|
||||
*/
|
||||
public ResponseDTO<String> delete(Long mailId) {
|
||||
if (null == mailId){
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
villageMailDao.deleteById(mailId);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
}
|
||||
@ -53,6 +53,13 @@ public class EventController {
|
||||
return ResponseDTO.ok(eventService.queryPage(queryForm));
|
||||
}
|
||||
|
||||
@Operation(summary = "列表查询 @author pengjie")
|
||||
@PostMapping("/event/queryList")
|
||||
@SaCheckPermission("event:query")
|
||||
public ResponseDTO<List<EventVO>> queryList(@RequestBody @Valid EventQueryForm queryForm) {
|
||||
return ResponseDTO.ok(eventService.queryList(queryForm));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加 @author pengjie")
|
||||
@PostMapping("/event/add")
|
||||
@SaCheckPermission("event:add")
|
||||
|
||||
@ -82,6 +82,18 @@ public class EventService {
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
public List<EventVO> queryList(EventQueryForm queryForm) {
|
||||
List<EventVO> list = eventDao.queryPage(queryForm);
|
||||
build(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
|
||||
@ -19,6 +19,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 党组织 Controller
|
||||
@ -42,6 +43,13 @@ public class PartyOrganizationController {
|
||||
return ResponseDTO.ok(partyOrganizationService.queryPage(queryForm));
|
||||
}
|
||||
|
||||
@Operation(summary = "列表查询 @author pengjie")
|
||||
@PostMapping("/partyOrganization/queryList")
|
||||
@SaCheckPermission("partyOrganization:query")
|
||||
public ResponseDTO<List<PartyOrganizationVO>> queryList(@RequestBody @Valid PartyOrganizationQueryForm queryForm) {
|
||||
return ResponseDTO.ok(partyOrganizationService.queryList(queryForm));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加 @author pengjie")
|
||||
@PostMapping("/partyOrganization/add")
|
||||
@SaCheckPermission("partyOrganization:add")
|
||||
|
||||
@ -33,4 +33,5 @@ public interface PartyOrganizationDao extends BaseMapper<PartyOrganizationEntity
|
||||
*/
|
||||
List<PartyOrganizationVO> queryPage(Page page, @Param("queryForm") PartyOrganizationQueryForm queryForm);
|
||||
|
||||
List<PartyOrganizationVO> queryPage(@Param("queryForm") PartyOrganizationQueryForm queryForm);
|
||||
}
|
||||
|
||||
@ -45,6 +45,17 @@ public class PartyOrganizationService {
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
public List<PartyOrganizationVO> queryList(PartyOrganizationQueryForm queryForm) {
|
||||
List<PartyOrganizationVO> list = partyOrganizationDao.queryPage(queryForm);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
|
||||
@ -3,23 +3,27 @@ package net.lab1024.sa.admin.module.business.village.controller;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.form.AdolescentVillagerAddForm;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.form.AdolescentVillagerQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.form.AdolescentVillagerUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.form.CorrectVillagerQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.vo.AbroadVillagerVO;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.vo.AdolescentVillagerExcelVo;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.vo.AdolescentVillagerVO;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.vo.CorrectVillagerExcelVo;
|
||||
import net.lab1024.sa.admin.module.business.village.service.AdolescentVillagerService;
|
||||
import net.lab1024.sa.base.common.domain.ValidateList;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import net.lab1024.sa.base.common.util.SmartExcelUtil;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
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 org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 青少年人员信息 Controller
|
||||
@ -77,4 +81,25 @@ public class AdolescentVillagerController {
|
||||
public ResponseDTO<AdolescentVillagerVO> queryById(@PathVariable Long adolescentId) {
|
||||
return ResponseDTO.ok(adolescentVillagerService.queryById(adolescentId));
|
||||
}
|
||||
|
||||
@Operation(summary = "下载导入模板")
|
||||
@GetMapping(value = "/adolescentVillager/exportExcel")
|
||||
public void exportExcel(HttpServletResponse response) {
|
||||
adolescentVillagerService.exportExcel(response);
|
||||
}
|
||||
|
||||
@Operation(summary = "导入 ")
|
||||
@PostMapping("/adolescentVillager/import")
|
||||
@SaCheckPermission("adolescentVillager:add")
|
||||
public ResponseDTO<String> importAdolescentVillager(@RequestParam MultipartFile file) {
|
||||
return adolescentVillagerService.importAdolescentVillager(file);
|
||||
}
|
||||
|
||||
@Operation(summary = "导出 ")
|
||||
@PostMapping("/adolescentVillager/export")
|
||||
@SaCheckPermission("adolescentVillager:query")
|
||||
public void export(@RequestBody AdolescentVillagerQueryForm query, HttpServletResponse response) throws IOException {
|
||||
List<AdolescentVillagerExcelVo> adolescentVillagerExcelVos = adolescentVillagerService.export(query);
|
||||
SmartExcelUtil.exportExcel(response,"重点青少年人员列表.xlsx","重点青少年人员", AdolescentVillagerExcelVo.class, adolescentVillagerExcelVos);
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,5 +32,7 @@ public interface AdolescentVillagerDao extends BaseMapper<AdolescentVillagerEnti
|
||||
*/
|
||||
List<AdolescentVillagerVO> queryPage(Page page, @Param("queryForm") AdolescentVillagerQueryForm queryForm);
|
||||
|
||||
List<AdolescentVillagerVO> queryPage(@Param("queryForm") AdolescentVillagerQueryForm queryForm);
|
||||
|
||||
AdolescentVillagerVO queryById(@Param("id") Long id);
|
||||
}
|
||||
|
||||
@ -0,0 +1,64 @@
|
||||
package net.lab1024.sa.admin.module.business.village.domain.form;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 青少年人员信息 实体类
|
||||
*
|
||||
* @Author pengjie
|
||||
* @Date 2025-07-02 16:23:34
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AdolescentVillagerImportForm {
|
||||
|
||||
@ExcelProperty("*姓名")
|
||||
private String villagerName;
|
||||
|
||||
@ExcelProperty("人员类型")
|
||||
private String type;
|
||||
|
||||
@ExcelProperty("家庭情况")
|
||||
private String familyStatus;
|
||||
|
||||
@ExcelProperty("监护人姓名")
|
||||
private String guardianName;
|
||||
|
||||
@ExcelProperty("监护人身份证")
|
||||
private String guardianCard;
|
||||
|
||||
@ExcelProperty("监护人关系")
|
||||
private String guardianRelationship;
|
||||
|
||||
@ExcelProperty("监护人电话")
|
||||
private String guardianPhone;
|
||||
|
||||
@ExcelProperty("监护人住址")
|
||||
private String guardianAddress;
|
||||
|
||||
@ExcelProperty("*是否违法犯罪")
|
||||
private String criminalityFlag;
|
||||
|
||||
@ExcelProperty("犯罪情况")
|
||||
private String criminalityStatus;
|
||||
|
||||
@ExcelProperty("帮扶人姓名")
|
||||
private String assistancePerson;
|
||||
|
||||
@ExcelProperty("帮扶人电话")
|
||||
private String assistancePhone;
|
||||
|
||||
@ExcelProperty("帮扶手段")
|
||||
private String assistanceMeans;
|
||||
|
||||
@ExcelProperty("帮扶情况")
|
||||
private String assistanceSituation;
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
|
||||
package net.lab1024.sa.admin.module.business.village.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AdolescentVillagerExcelVo {
|
||||
|
||||
@ExcelProperty("*姓名")
|
||||
private String villagerName;
|
||||
|
||||
@ExcelProperty("人员类型")
|
||||
private String type;
|
||||
|
||||
@ExcelProperty("家庭情况")
|
||||
private String familyStatus;
|
||||
|
||||
@ExcelProperty("监护人姓名")
|
||||
private String guardianName;
|
||||
|
||||
@ExcelProperty("监护人身份证")
|
||||
private String guardianCard;
|
||||
|
||||
@ExcelProperty("监护人关系")
|
||||
private String guardianRelationship;
|
||||
|
||||
@ExcelProperty("监护人电话")
|
||||
private String guardianPhone;
|
||||
|
||||
@ExcelProperty("监护人住址")
|
||||
private String guardianAddress;
|
||||
|
||||
@ExcelProperty("*是否违法犯罪")
|
||||
private String criminalityFlag;
|
||||
|
||||
@ExcelProperty("犯罪情况")
|
||||
private String criminalityStatus;
|
||||
|
||||
@ExcelProperty("帮扶人姓名")
|
||||
private String assistancePerson;
|
||||
|
||||
@ExcelProperty("帮扶人电话")
|
||||
private String assistancePhone;
|
||||
|
||||
@ExcelProperty("帮扶手段")
|
||||
private String assistanceMeans;
|
||||
|
||||
@ExcelProperty("帮扶情况")
|
||||
private String assistanceSituation;
|
||||
}
|
||||
@ -1,16 +1,24 @@
|
||||
package net.lab1024.sa.admin.module.business.village.service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.lab1024.sa.admin.module.business.village.dao.AdolescentVillagerDao;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.entity.AdolescentVillagerEntity;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.form.AdolescentVillagerAddForm;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.form.AdolescentVillagerQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.form.AdolescentVillagerUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.vo.AbroadVillagerVO;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.vo.AdolescentVillagerVO;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.vo.FlowVillagerVO;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.entity.CorrectVillagerEntity;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.entity.VillagerEntity;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.form.*;
|
||||
import net.lab1024.sa.admin.module.business.village.domain.vo.*;
|
||||
import net.lab1024.sa.admin.module.business.village.manager.AdolescentVillagerManager;
|
||||
import net.lab1024.sa.admin.module.business.village.manager.VillagerManager;
|
||||
import net.lab1024.sa.admin.util.ExcelUtils;
|
||||
import net.lab1024.sa.base.common.exception.BusinessException;
|
||||
import net.lab1024.sa.base.common.util.SmartBeanUtil;
|
||||
import net.lab1024.sa.base.common.util.SmartPageUtil;
|
||||
import net.lab1024.sa.base.common.domain.ResponseDTO;
|
||||
@ -19,9 +27,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import net.lab1024.sa.base.module.support.dict.domain.vo.DictValueVO;
|
||||
import net.lab1024.sa.base.module.support.dict.service.DictCacheService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 青少年人员信息 Service
|
||||
@ -31,15 +42,22 @@ import javax.annotation.Resource;
|
||||
* @Copyright jxj
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class AdolescentVillagerService {
|
||||
|
||||
@Resource
|
||||
private AdolescentVillagerDao adolescentVillagerDao;
|
||||
|
||||
@Resource
|
||||
private AdolescentVillagerManager adolescentVillagerManager;
|
||||
|
||||
@Resource
|
||||
private DictCacheService dictCacheService;
|
||||
|
||||
@Resource
|
||||
private VillagerManager villagerManager;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
@ -54,6 +72,18 @@ public class AdolescentVillagerService {
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
public List<AdolescentVillagerVO> queryList(AdolescentVillagerQueryForm queryForm) {
|
||||
List<AdolescentVillagerVO> list = adolescentVillagerDao.queryPage(queryForm);
|
||||
build(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@ -112,16 +142,94 @@ public class AdolescentVillagerService {
|
||||
return adolescentVillagerDao.queryById(adolescentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出模版
|
||||
*/
|
||||
public void exportExcel(HttpServletResponse response) {
|
||||
List<VillagerEntity> villagerList = villagerManager.list();
|
||||
List<DictValueVO> type = dictCacheService.selectByKeyCode("ADOLESCENT_TYPE");
|
||||
List<DictValueVO> familyStatus = dictCacheService.selectByKeyCode("FAMILY_STATUS");
|
||||
List<DictValueVO> assistanceMeans = dictCacheService.selectByKeyCode("ASSISTANCE_MEANS");
|
||||
ExcelUtils.exportExcelAdolescentVillagerTemplate(response, villagerList, type, familyStatus, assistanceMeans);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入
|
||||
*/
|
||||
public ResponseDTO<String> importAdolescentVillager(MultipartFile file) {
|
||||
List<AdolescentVillagerImportForm> dataList;
|
||||
try {
|
||||
dataList = EasyExcel.read(file.getInputStream()).head(AdolescentVillagerImportForm.class)
|
||||
.sheet()
|
||||
.doReadSync();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
throw new BusinessException("数据格式存在问题,无法读取");
|
||||
}
|
||||
if (CollectionUtils.isEmpty(dataList)) {
|
||||
return ResponseDTO.userErrorParam("数据为空");
|
||||
}
|
||||
List<VillagerEntity> villagerList = villagerManager.list();
|
||||
List<DictValueVO> type = dictCacheService.selectByKeyCode("ADOLESCENT_TYPE");
|
||||
List<DictValueVO> familyStatus = dictCacheService.selectByKeyCode("FAMILY_STATUS");
|
||||
List<DictValueVO> assistanceMeans = dictCacheService.selectByKeyCode("ASSISTANCE_MEANS");
|
||||
List<AdolescentVillagerEntity> adolescentVillagerEntityArrayList = new ArrayList<>();
|
||||
for (AdolescentVillagerImportForm adolescentVillagerImportForm : dataList) {
|
||||
AdolescentVillagerEntity adolescentVillagerEntity = new AdolescentVillagerEntity();
|
||||
BeanUtils.copyProperties(adolescentVillagerImportForm, adolescentVillagerEntity);
|
||||
String[] split = adolescentVillagerImportForm.getVillagerName().split("-");
|
||||
List<VillagerEntity> collect1 = villagerList.stream().filter(v -> v.getName().equals(split[0]) && v.getCardNumber().equals(split[1])).collect(Collectors.toList());
|
||||
adolescentVillagerEntity.setVillagerId(collect1.size() > 0 ? collect1.get(0).getVillagerId() : null);
|
||||
adolescentVillagerEntity.setType(type.stream().filter(g -> g.getValueName().equals(adolescentVillagerImportForm.getType())).collect(Collectors.toList()).get(0).getValueCode());
|
||||
adolescentVillagerEntity.setFamilyStatus(familyStatus.stream().filter(g -> g.getValueName().equals(adolescentVillagerImportForm.getFamilyStatus())).collect(Collectors.toList()).get(0).getValueCode());
|
||||
adolescentVillagerEntity.setAssistanceMeans(assistanceMeans.stream().filter(g -> g.getValueName().equals(adolescentVillagerImportForm.getAssistanceMeans())).collect(Collectors.toList()).get(0).getValueCode());
|
||||
adolescentVillagerEntity.setCriminalityFlag(adolescentVillagerImportForm.getCriminalityFlag().equals("是") ? 1 : 0);
|
||||
adolescentVillagerEntityArrayList.add(adolescentVillagerEntity);
|
||||
}
|
||||
adolescentVillagerManager.saveBatch(adolescentVillagerEntityArrayList);
|
||||
return ResponseDTO.okMsg("成功导入" + dataList.size() + "条,具体数据为:" + JSON.toJSONString(dataList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出查询
|
||||
*
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
public List<AdolescentVillagerExcelVo> export(AdolescentVillagerQueryForm queryForm) {
|
||||
List<AdolescentVillagerVO> list = this.queryList(queryForm);
|
||||
return list.stream()
|
||||
.map(e ->
|
||||
AdolescentVillagerExcelVo.builder()
|
||||
.villagerName(e.getName())
|
||||
.type(e.getTypeName())
|
||||
.familyStatus(e.getFamilyStatusName())
|
||||
.guardianName(e.getGuardianName())
|
||||
.guardianCard(e.getGuardianCard())
|
||||
.guardianRelationship(e.getGuardianRelationship())
|
||||
.guardianPhone(e.getGuardianPhone())
|
||||
.guardianAddress(e.getGuardianAddress())
|
||||
.criminalityFlag(e.getCriminalityFlag() == 1 ? "是" : "否")
|
||||
.criminalityStatus(e.getCriminalityStatus())
|
||||
.assistancePerson(e.getAssistancePerson())
|
||||
.assistancePhone(e.getAssistancePhone())
|
||||
.assistanceMeans(e.getAssistanceMeansName())
|
||||
.assistanceSituation(e.getAssistanceSituation())
|
||||
.build()
|
||||
)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private void build(List<AdolescentVillagerVO> list) {
|
||||
List<DictValueVO> reason = dictCacheService.selectByKeyCode("ADOLESCENT_TYPE");
|
||||
List<DictValueVO> cardType = dictCacheService.selectByKeyCode("FAMILY_STATUS");
|
||||
List<DictValueVO> accommodationType = dictCacheService.selectByKeyCode("ASSISTANCE_MEANS");
|
||||
List<DictValueVO> type = dictCacheService.selectByKeyCode("ADOLESCENT_TYPE");
|
||||
List<DictValueVO> familyStatus = dictCacheService.selectByKeyCode("FAMILY_STATUS");
|
||||
List<DictValueVO> assistanceMeans = dictCacheService.selectByKeyCode("ASSISTANCE_MEANS");
|
||||
for (AdolescentVillagerVO adolescentVillagerVO : list) {
|
||||
List<DictValueVO> collect = reason.stream().filter(d -> d.getValueCode().equals(adolescentVillagerVO.getType())).collect(Collectors.toList());
|
||||
List<DictValueVO> collect = type.stream().filter(d -> d.getValueCode().equals(adolescentVillagerVO.getType())).collect(Collectors.toList());
|
||||
adolescentVillagerVO.setTypeName(collect.size() > 0 ? collect.get(0).getValueName() : "");
|
||||
List<DictValueVO> collect1 = cardType.stream().filter(d -> d.getValueCode().equals(adolescentVillagerVO.getFamilyStatus())).collect(Collectors.toList());
|
||||
List<DictValueVO> collect1 = familyStatus.stream().filter(d -> d.getValueCode().equals(adolescentVillagerVO.getFamilyStatus())).collect(Collectors.toList());
|
||||
adolescentVillagerVO.setFamilyStatusName(collect1.size() > 0 ? collect1.get(0).getValueName() : "");
|
||||
List<DictValueVO> collect2 = accommodationType.stream().filter(d -> d.getValueCode().equals(adolescentVillagerVO.getAssistanceMeans())).collect(Collectors.toList());
|
||||
List<DictValueVO> collect2 = assistanceMeans.stream().filter(d -> d.getValueCode().equals(adolescentVillagerVO.getAssistanceMeans())).collect(Collectors.toList());
|
||||
adolescentVillagerVO.setAssistanceMeansName(collect2.size() > 0 ? collect2.get(0).getValueName() : "");
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,10 +135,10 @@ public class EnterpriseGoalService {
|
||||
*/
|
||||
public EnterpriseGoalVO queryById(EnterpriseGoalQueryForm queryForm) {
|
||||
EnterpriseGoalVO enterpriseGoalVO = enterpriseGoalDao.queryById(queryForm);
|
||||
enterpriseGoalVO.setActualProfit(enterpriseGoalVO.getActualIncome().subtract(enterpriseGoalVO.getActualExpenses()));
|
||||
if (enterpriseGoalVO == null) {
|
||||
enterpriseGoalVO = new EnterpriseGoalVO();
|
||||
} else {
|
||||
enterpriseGoalVO.setActualProfit(enterpriseGoalVO.getActualIncome().subtract(enterpriseGoalVO.getActualExpenses()));
|
||||
if (enterpriseGoalVO.getActualIncome() != null && enterpriseGoalVO.getIncome() != null && enterpriseGoalVO.getIncome().compareTo(new BigDecimal(0)) > 0) {
|
||||
enterpriseGoalVO.setActualIncomeRatio(enterpriseGoalVO.getActualIncome().divide(enterpriseGoalVO.getIncome(), 2, BigDecimal.ROUND_HALF_UP));
|
||||
}
|
||||
|
||||
@ -43,6 +43,12 @@ public class VillageEmployeeController {
|
||||
return villageEmployeeService.queryList();
|
||||
}
|
||||
|
||||
@Operation(summary = "查询当前用户的下属乡村列表 @author pengjie")
|
||||
@GetMapping("/villageEmployee/queryChildrenList")
|
||||
public ResponseDTO<List<VillageEntity>> queryChildrenList() {
|
||||
return villageEmployeeService.queryChildrenList();
|
||||
}
|
||||
|
||||
@Operation(summary = "更新 @author pengjie")
|
||||
@PostMapping("/villageEmployee/update")
|
||||
public ResponseDTO<String> update(@RequestBody @Valid VillageEmployeeUpdateForm updateForm) {
|
||||
|
||||
@ -75,6 +75,12 @@ public class VillageEmployeeService {
|
||||
return ResponseDTO.ok(parentList);
|
||||
}
|
||||
|
||||
public ResponseDTO<List<VillageEntity>> queryChildrenList() {
|
||||
Integer villageId = SmartRequestUtil.getRequestUser().getVillageId();
|
||||
List<VillageEntity> villageList = villageManager.list(Wrappers.<VillageEntity>lambdaQuery().apply("find_in_set({0}, ancestors)", villageId));
|
||||
return ResponseDTO.ok(villageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
|
||||
@ -608,6 +608,59 @@ public class ExcelUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void exportExcelAdolescentVillagerTemplate(HttpServletResponse response, List<VillagerEntity> villagerList, List<DictValueVO> type
|
||||
, List<DictValueVO> familyStatus, List<DictValueVO> assistanceMeans) {
|
||||
try {
|
||||
ClassPathResource classPathResource = new ClassPathResource("excel/重点青少年人员导入模板.xlsx");
|
||||
InputStream inputStream = classPathResource.getInputStream();
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||
|
||||
XSSFSheet sheet = workbook.getSheet("人员类型");
|
||||
if (type.size() > 0) {
|
||||
for (int i = 0; i < type.size(); i++) {
|
||||
XSSFRow row1 = sheet.createRow(i + type.size());
|
||||
XSSFCell cell1 = row1.createCell(0);
|
||||
cell1.setCellType(CellType.STRING);
|
||||
cell1.setCellValue(type.get(i).getValueName());
|
||||
}
|
||||
}
|
||||
|
||||
XSSFSheet sheet1 = workbook.getSheet("家庭情况");
|
||||
if (familyStatus.size() > 0) {
|
||||
for (int i = 0; i < familyStatus.size(); i++) {
|
||||
XSSFRow row1 = sheet1.createRow(i + familyStatus.size());
|
||||
XSSFCell cell1 = row1.createCell(0);
|
||||
cell1.setCellType(CellType.STRING);
|
||||
cell1.setCellValue(familyStatus.get(i).getValueName());
|
||||
}
|
||||
}
|
||||
|
||||
XSSFSheet sheet2 = workbook.getSheet("帮扶手段");
|
||||
if (assistanceMeans.size() > 0) {
|
||||
for (int i = 0; i < assistanceMeans.size(); i++) {
|
||||
XSSFRow row1 = sheet2.createRow(i + assistanceMeans.size());
|
||||
XSSFCell cell1 = row1.createCell(0);
|
||||
cell1.setCellType(CellType.STRING);
|
||||
cell1.setCellValue(assistanceMeans.get(i).getValueName());
|
||||
}
|
||||
}
|
||||
|
||||
XSSFSheet sheet5 = workbook.getSheet("姓名");
|
||||
if (villagerList.size() > 0) {
|
||||
for (int i = 0; i < villagerList.size(); i++) {
|
||||
XSSFRow row1 = sheet5.createRow(i + villagerList.size());
|
||||
XSSFCell cell1 = row1.createCell(0);
|
||||
cell1.setCellType(CellType.STRING);
|
||||
cell1.setCellValue(villagerList.get(i).getName() + "-" + villagerList.get(0).getCardNumber());
|
||||
}
|
||||
}
|
||||
|
||||
downLoadExcel("重点青少年人员导入模板.xlsx", response, workbook);
|
||||
} catch (IOException e) {
|
||||
log.error("error:", e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void picture(String path, XSSFSheet sheet, int startRow, int endRow, int startCol, int endCol) {
|
||||
try {
|
||||
InputStream inputStreamPic = new FileInputStream(path);
|
||||
|
||||
BIN
sa-admin/src/main/resources/excel/重点青少年人员导入模板.xlsx
Normal file
BIN
sa-admin/src/main/resources/excel/重点青少年人员导入模板.xlsx
Normal file
Binary file not shown.
@ -0,0 +1,37 @@
|
||||
<?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.business.affairs.dao.AffairsDao">
|
||||
|
||||
<!-- 查询结果列 -->
|
||||
<sql id="base_columns">
|
||||
affairs.affairs_id,
|
||||
affairs.title,
|
||||
affairs.type,
|
||||
affairs.range_type,
|
||||
affairs.range,
|
||||
affairs.content,
|
||||
affairs.file_url,
|
||||
affairs.create_time,
|
||||
affairs.create_by,
|
||||
affairs.update_time
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="queryPage" resultType="net.lab1024.sa.admin.module.business.affairs.domain.vo.AffairsVO">
|
||||
SELECT
|
||||
<include refid="base_columns"/>
|
||||
FROM affairs
|
||||
<where>
|
||||
<!--标题-->
|
||||
<if test="queryForm.title != null and queryForm.title != ''">
|
||||
AND INSTR(affairs.title,#{queryForm.title})
|
||||
</if>
|
||||
<!--类型-->
|
||||
<if test="queryForm.type != null">
|
||||
AND affairs.type = #{queryForm.type}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,29 @@
|
||||
<?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.business.affairs.dao.VillageFrameworkDao">
|
||||
|
||||
<!-- 查询结果列 -->
|
||||
<sql id="base_columns">
|
||||
village_framework.framework_id,
|
||||
village_framework.village_id,
|
||||
village_framework.file_url,
|
||||
village_framework.create_time,
|
||||
village_framework.create_by,
|
||||
village_framework.update_time
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="queryPage" resultType="net.lab1024.sa.admin.module.business.affairs.domain.vo.VillageFrameworkVO">
|
||||
SELECT
|
||||
<include refid="base_columns"/>
|
||||
FROM village_framework
|
||||
<where>
|
||||
<!--村庄ID-->
|
||||
<if test="queryForm.villageId != null">
|
||||
AND village_framework.village_id = #{queryForm.villageId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,33 @@
|
||||
<?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.business.affairs.dao.VillageIntroduceDao">
|
||||
|
||||
<!-- 查询结果列 -->
|
||||
<sql id="base_columns">
|
||||
village_introduce.introduce_id,
|
||||
village_introduce.village_id,
|
||||
village_introduce.area,
|
||||
village_introduce.charge_person,
|
||||
village_introduce.phone,
|
||||
village_introduce.content,
|
||||
village_introduce.file_url,
|
||||
village_introduce.create_time,
|
||||
village_introduce.create_by,
|
||||
village_introduce.update_time
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="queryPage" resultType="net.lab1024.sa.admin.module.business.affairs.domain.vo.VillageIntroduceVO">
|
||||
SELECT
|
||||
<include refid="base_columns"/>
|
||||
FROM village_introduce
|
||||
<where>
|
||||
<!--村庄ID-->
|
||||
<if test="queryForm.villageId != null">
|
||||
AND village_introduce.village_id = #{queryForm.villageId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,40 @@
|
||||
<?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.business.affairs.dao.VillageMailDao">
|
||||
|
||||
<!-- 查询结果列 -->
|
||||
<sql id="base_columns">
|
||||
village_mail.mail_id,
|
||||
village_mail.recipient,
|
||||
village_mail.title,
|
||||
village_mail.content,
|
||||
village_mail.file_url,
|
||||
village_mail.state,
|
||||
village_mail.create_time,
|
||||
village_mail.create_by,
|
||||
village_mail.update_time
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="queryPage" resultType="net.lab1024.sa.admin.module.business.affairs.domain.vo.VillageMailVO">
|
||||
SELECT
|
||||
<include refid="base_columns"/>
|
||||
FROM village_mail
|
||||
<where>
|
||||
<!--创建人-->
|
||||
<if test="queryForm.createBy != null">
|
||||
AND village_mail.create_by = #{queryForm.createBy}
|
||||
</if>
|
||||
<!--收件人-->
|
||||
<if test="queryForm.recipient != null">
|
||||
AND village_mail.recipient = #{queryForm.recipient}
|
||||
</if>
|
||||
<!--主题-->
|
||||
<if test="queryForm.title != null and queryForm.title != ''">
|
||||
AND INSTR(village_mail.title,#{queryForm.title})
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Loading…
x
Reference in New Issue
Block a user