yxk-20260417-党委会主子表台账后端代码
This commit is contained in:
+306
@@ -0,0 +1,306 @@
|
||||
package org.jeecg.modules.demo.bgpartymatter.controller;
|
||||
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.demo.bgpartymatter.entity.BgPartymatterFeedback;
|
||||
import org.jeecg.modules.demo.bgpartymatter.entity.BgPartymatter;
|
||||
import org.jeecg.modules.demo.bgpartymatter.service.IBgPartymatterService;
|
||||
import org.jeecg.modules.demo.bgpartymatter.service.IBgPartymatterFeedbackService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
/**
|
||||
* @Description: 党委会
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Tag(name="党委会")
|
||||
@RestController
|
||||
@RequestMapping("/bgpartymatter/bgPartymatter")
|
||||
@Slf4j
|
||||
public class BgPartymatterController extends JeecgController<BgPartymatter, IBgPartymatterService> {
|
||||
|
||||
@Autowired
|
||||
private IBgPartymatterService bgPartymatterService;
|
||||
|
||||
@Autowired
|
||||
private IBgPartymatterFeedbackService bgPartymatterFeedbackService;
|
||||
|
||||
|
||||
/*---------------------------------主表处理-begin-------------------------------------*/
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @param bgPartymatter
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "党委会-分页列表查询")
|
||||
@Operation(summary="党委会-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<BgPartymatter>> queryPageList(BgPartymatter bgPartymatter,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<BgPartymatter> queryWrapper = QueryGenerator.initQueryWrapper(bgPartymatter, req.getParameterMap());
|
||||
Page<BgPartymatter> page = new Page<BgPartymatter>(pageNo, pageSize);
|
||||
IPage<BgPartymatter> pageList = bgPartymatterService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param bgPartymatter
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "党委会-添加")
|
||||
@Operation(summary="党委会-添加")
|
||||
@RequiresPermissions("bgpartymatter:bg_partymatter:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody BgPartymatter bgPartymatter) {
|
||||
bgPartymatterService.save(bgPartymatter);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param bgPartymatter
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "党委会-编辑")
|
||||
@Operation(summary="党委会-编辑")
|
||||
@RequiresPermissions("bgpartymatter:bg_partymatter:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody BgPartymatter bgPartymatter) {
|
||||
bgPartymatterService.updateById(bgPartymatter);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "党委会-通过id删除")
|
||||
@Operation(summary="党委会-通过id删除")
|
||||
@RequiresPermissions("bgpartymatter:bg_partymatter:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
bgPartymatterService.delMain(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "党委会-批量删除")
|
||||
@Operation(summary="党委会-批量删除")
|
||||
@RequiresPermissions("bgpartymatter:bg_partymatter:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.bgPartymatterService.delBatchMain(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("bgpartymatter:bg_partymatter:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, BgPartymatter bgPartymatter) {
|
||||
return super.exportXls(request, bgPartymatter, BgPartymatter.class, "党委会");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("bgpartymatter:bg_partymatter:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, BgPartymatter.class);
|
||||
}
|
||||
/*---------------------------------主表处理-end-------------------------------------*/
|
||||
|
||||
|
||||
/*--------------------------------子表处理-党委会反馈表-begin----------------------------------------------*/
|
||||
/**
|
||||
* 通过主表ID查询
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "党委会反馈表-通过主表ID查询")
|
||||
@Operation(summary="党委会反馈表-通过主表ID查询")
|
||||
@GetMapping(value = "/listBgPartymatterFeedbackByMainId")
|
||||
public Result<IPage<BgPartymatterFeedback>> listBgPartymatterFeedbackByMainId(BgPartymatterFeedback bgPartymatterFeedback,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<BgPartymatterFeedback> queryWrapper = QueryGenerator.initQueryWrapper(bgPartymatterFeedback, req.getParameterMap());
|
||||
Page<BgPartymatterFeedback> page = new Page<BgPartymatterFeedback>(pageNo, pageSize);
|
||||
IPage<BgPartymatterFeedback> pageList = bgPartymatterFeedbackService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param bgPartymatterFeedback
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "党委会反馈表-添加")
|
||||
@Operation(summary="党委会反馈表-添加")
|
||||
@PostMapping(value = "/addBgPartymatterFeedback")
|
||||
public Result<String> addBgPartymatterFeedback(@RequestBody BgPartymatterFeedback bgPartymatterFeedback) {
|
||||
bgPartymatterFeedbackService.save(bgPartymatterFeedback);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param bgPartymatterFeedback
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "党委会反馈表-编辑")
|
||||
@Operation(summary="党委会反馈表-编辑")
|
||||
@RequestMapping(value = "/editBgPartymatterFeedback", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> editBgPartymatterFeedback(@RequestBody BgPartymatterFeedback bgPartymatterFeedback) {
|
||||
bgPartymatterFeedbackService.updateById(bgPartymatterFeedback);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "党委会反馈表-通过id删除")
|
||||
@Operation(summary="党委会反馈表-通过id删除")
|
||||
@DeleteMapping(value = "/deleteBgPartymatterFeedback")
|
||||
public Result<String> deleteBgPartymatterFeedback(@RequestParam(name="id",required=true) String id) {
|
||||
bgPartymatterFeedbackService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "党委会反馈表-批量删除")
|
||||
@Operation(summary="党委会反馈表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatchBgPartymatterFeedback")
|
||||
public Result<String> deleteBatchBgPartymatterFeedback(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.bgPartymatterFeedbackService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/exportBgPartymatterFeedback")
|
||||
public ModelAndView exportBgPartymatterFeedback(HttpServletRequest request, BgPartymatterFeedback bgPartymatterFeedback) {
|
||||
// Step.1 组装查询条件
|
||||
QueryWrapper<BgPartymatterFeedback> queryWrapper = QueryGenerator.initQueryWrapper(bgPartymatterFeedback, request.getParameterMap());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
// Step.2 获取导出数据
|
||||
List<BgPartymatterFeedback> pageList = bgPartymatterFeedbackService.list(queryWrapper);
|
||||
List<BgPartymatterFeedback> exportList = null;
|
||||
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
exportList = pageList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
|
||||
} else {
|
||||
exportList = pageList;
|
||||
}
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
//此处设置的filename无效,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "党委会反馈表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, BgPartymatterFeedback.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("党委会反馈表报表", "导出人:" + sysUser.getRealname(), "党委会反馈表"));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importBgPartymatterFeedback/{mainId}")
|
||||
public Result<?> importBgPartymatterFeedback(HttpServletRequest request, HttpServletResponse response, @PathVariable("mainId") String mainId) {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
// 获取上传文件对象
|
||||
MultipartFile file = entity.getValue();
|
||||
ImportParams params = new ImportParams();
|
||||
params.setTitleRows(2);
|
||||
params.setHeadRows(1);
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
List<BgPartymatterFeedback> list = ExcelImportUtil.importExcel(file.getInputStream(), BgPartymatterFeedback.class, params);
|
||||
for (BgPartymatterFeedback temp : list) {
|
||||
temp.setMainId(mainId);
|
||||
}
|
||||
long start = System.currentTimeMillis();
|
||||
bgPartymatterFeedbackService.saveBatch(list);
|
||||
log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
|
||||
return Result.OK("文件导入成功!数据行数:" + list.size());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
return Result.error("文件导入失败:" + e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
file.getInputStream().close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return Result.error("文件导入失败!");
|
||||
}
|
||||
|
||||
/*--------------------------------子表处理-党委会反馈表-end----------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
package org.jeecg.modules.demo.bgpartymatter.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* @Description: 党委会
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bg_partymatter")
|
||||
@Schema(description="党委会")
|
||||
public class BgPartymatter implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description = "主键")
|
||||
private java.lang.String id;
|
||||
/**创建人*/
|
||||
@Schema(description = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
@Schema(description = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@Schema(description = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**年份*/
|
||||
@Excel(name = "年份", width = 15)
|
||||
@Schema(description = "年份")
|
||||
private java.lang.String year;
|
||||
/**序号*/
|
||||
@Excel(name = "序号", width = 15)
|
||||
@Schema(description = "序号")
|
||||
private java.lang.String number;
|
||||
/**会议时间*/
|
||||
@Excel(name = "会议时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@Schema(description = "会议时间")
|
||||
private java.util.Date matterTime;
|
||||
/**事项名称*/
|
||||
@Excel(name = "事项名称", width = 15)
|
||||
@Schema(description = "事项名称")
|
||||
private java.lang.String title;
|
||||
/**会议决议*/
|
||||
@Excel(name = "会议决议", width = 15)
|
||||
@Schema(description = "会议决议")
|
||||
private java.lang.String content;
|
||||
/**事项目录编码*/
|
||||
@Excel(name = "事项目录编码", width = 15)
|
||||
@Schema(description = "事项目录编码")
|
||||
private java.lang.String matterCode;
|
||||
/**责任部门*/
|
||||
@Excel(name = "责任部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||
@Schema(description = "责任部门")
|
||||
private java.lang.String responDeptid;
|
||||
/**实际执行情况*/
|
||||
@Excel(name = "实际执行情况", width = 15)
|
||||
@Schema(description = "实际执行情况")
|
||||
private java.lang.String actualExect;
|
||||
/**完成状态*/
|
||||
@Excel(name = "完成状态", width = 15)
|
||||
@Schema(description = "完成状态")
|
||||
private java.lang.String bpmStatus;
|
||||
/**督办次数*/
|
||||
@Excel(name = "督办次数", width = 15)
|
||||
@Schema(description = "督办次数")
|
||||
private java.lang.String superviseCount;
|
||||
/**要求完成日期*/
|
||||
@Excel(name = "要求完成日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@Schema(description = "要求完成日期")
|
||||
private java.util.Date deadline;
|
||||
/**紧急程度*/
|
||||
@Excel(name = "紧急程度", width = 15)
|
||||
@Schema(description = "紧急程度")
|
||||
private java.lang.String urgencyLevel;
|
||||
/**是否需要所办领导审批*/
|
||||
@Excel(name = "是否需要所办领导审批", width = 15,replace = {"是_Y","否_N"} )
|
||||
@Schema(description = "是否需要所办领导审批")
|
||||
private java.lang.String isNeedAppro;
|
||||
/**是否抄送所领导*/
|
||||
@Excel(name = "是否抄送所领导", width = 15,replace = {"是_Y","否_N"} )
|
||||
@Schema(description = "是否抄送所领导")
|
||||
private java.lang.String isNeedSuoleader;
|
||||
/**抄送所领导*/
|
||||
@Excel(name = "抄送所领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||
@Schema(description = "抄送所领导")
|
||||
private java.lang.String suoleaderid;
|
||||
/**删除标识*/
|
||||
@Excel(name = "删除标识", width = 15)
|
||||
@Schema(description = "删除标识")
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package org.jeecg.modules.demo.bgpartymatter.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
/**
|
||||
* @Description: 党委会反馈表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bg_partymatter_feedback")
|
||||
@Schema(description="党委会反馈表")
|
||||
public class BgPartymatterFeedback implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description = "主键")
|
||||
private java.lang.String id;
|
||||
/**创建人*/
|
||||
@Schema(description = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
@Schema(description = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@Schema(description = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**责任部门id*/
|
||||
@Excel(name = "责任部门id", width = 15)
|
||||
@Schema(description = "责任部门id")
|
||||
private java.lang.String responDeptid;
|
||||
/**责任部门名称*/
|
||||
@Excel(name = "责任部门名称", width = 15)
|
||||
@Schema(description = "责任部门名称")
|
||||
private java.lang.String responDeptname;
|
||||
/**反馈人id*/
|
||||
@Excel(name = "反馈人id", width = 15)
|
||||
@Schema(description = "反馈人id")
|
||||
private java.lang.String responPersonid;
|
||||
/**反馈人姓名*/
|
||||
@Excel(name = "反馈人姓名", width = 15)
|
||||
@Schema(description = "反馈人姓名")
|
||||
private java.lang.String responPersonname;
|
||||
/**实际执行情况*/
|
||||
@Excel(name = "实际执行情况", width = 15)
|
||||
@Schema(description = "实际执行情况")
|
||||
private java.lang.String actualExect;
|
||||
/**实际完成时间*/
|
||||
@Excel(name = "实际完成时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "实际完成时间")
|
||||
private java.util.Date actualTime;
|
||||
/**完成状态*/
|
||||
@Excel(name = "完成状态", width = 15)
|
||||
@Schema(description = "完成状态")
|
||||
private java.lang.String bpmStatus;
|
||||
/**删除标识*/
|
||||
@Excel(name = "删除标识", width = 15)
|
||||
@Schema(description = "删除标识")
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
/**外键*/
|
||||
@Schema(description = "外键")
|
||||
private java.lang.String mainId;
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package org.jeecg.modules.demo.bgpartymatter.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import org.jeecg.modules.demo.bgpartymatter.entity.BgPartymatterFeedback;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 党委会反馈表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BgPartymatterFeedbackMapper extends BaseMapper<BgPartymatterFeedback> {
|
||||
|
||||
/**
|
||||
* 通过主表id删除子表数据
|
||||
*
|
||||
* @param mainId 主表id
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean deleteByMainId(@Param("mainId") String mainId);
|
||||
|
||||
/**
|
||||
* 通过主表id查询子表数据
|
||||
*
|
||||
* @param mainId 主表id
|
||||
* @return List<BgPartymatterFeedback>
|
||||
*/
|
||||
public List<BgPartymatterFeedback> selectByMainId(@Param("mainId") String mainId);
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package org.jeecg.modules.demo.bgpartymatter.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.bgpartymatter.entity.BgPartymatter;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 党委会
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BgPartymatterMapper extends BaseMapper<BgPartymatter> {
|
||||
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<?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="org.jeecg.modules.demo.bgpartymatter.mapper.BgPartymatterFeedbackMapper">
|
||||
|
||||
<delete id="deleteByMainId" parameterType="java.lang.String">
|
||||
DELETE
|
||||
FROM bg_partymatter_feedback
|
||||
WHERE
|
||||
main_id = #{mainId}
|
||||
</delete>
|
||||
|
||||
<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.demo.bgpartymatter.entity.BgPartymatterFeedback">
|
||||
SELECT *
|
||||
FROM bg_partymatter_feedback
|
||||
WHERE
|
||||
main_id = #{mainId}
|
||||
</select>
|
||||
</mapper>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?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="org.jeecg.modules.demo.bgpartymatter.mapper.BgPartymatterMapper">
|
||||
|
||||
</mapper>
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package org.jeecg.modules.demo.bgpartymatter.service;
|
||||
|
||||
import org.jeecg.modules.demo.bgpartymatter.entity.BgPartymatterFeedback;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 党委会反馈表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBgPartymatterFeedbackService extends IService<BgPartymatterFeedback> {
|
||||
|
||||
/**
|
||||
* 通过主表id查询子表数据
|
||||
*
|
||||
* @param mainId
|
||||
* @return List<BgPartymatterFeedback>
|
||||
*/
|
||||
public List<BgPartymatterFeedback> selectByMainId(String mainId);
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package org.jeecg.modules.demo.bgpartymatter.service;
|
||||
|
||||
import org.jeecg.modules.demo.bgpartymatter.entity.BgPartymatterFeedback;
|
||||
import org.jeecg.modules.demo.bgpartymatter.entity.BgPartymatter;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 党委会
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBgPartymatterService extends IService<BgPartymatter> {
|
||||
|
||||
/**
|
||||
* 删除一对多
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void delMain (String id);
|
||||
|
||||
/**
|
||||
* 批量删除一对多
|
||||
*
|
||||
* @param idList
|
||||
*/
|
||||
public void delBatchMain (Collection<? extends Serializable> idList);
|
||||
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package org.jeecg.modules.demo.bgpartymatter.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.bgpartymatter.entity.BgPartymatterFeedback;
|
||||
import org.jeecg.modules.demo.bgpartymatter.mapper.BgPartymatterFeedbackMapper;
|
||||
import org.jeecg.modules.demo.bgpartymatter.service.IBgPartymatterFeedbackService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @Description: 党委会反馈表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BgPartymatterFeedbackServiceImpl extends ServiceImpl<BgPartymatterFeedbackMapper, BgPartymatterFeedback> implements IBgPartymatterFeedbackService {
|
||||
|
||||
@Autowired
|
||||
private BgPartymatterFeedbackMapper bgPartymatterFeedbackMapper;
|
||||
|
||||
@Override
|
||||
public List<BgPartymatterFeedback> selectByMainId(String mainId) {
|
||||
return bgPartymatterFeedbackMapper.selectByMainId(mainId);
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package org.jeecg.modules.demo.bgpartymatter.service.impl;
|
||||
|
||||
import org.jeecg.common.aspect.annotation.CascadeDelete;
|
||||
import org.jeecg.common.aspect.annotation.SonTable;
|
||||
import org.jeecg.modules.demo.bgpartymatter.entity.BgPartymatter;
|
||||
import org.jeecg.modules.demo.bgpartymatter.entity.BgPartymatterFeedback;
|
||||
import org.jeecg.modules.demo.bgpartymatter.mapper.BgPartymatterFeedbackMapper;
|
||||
import org.jeecg.modules.demo.bgpartymatter.mapper.BgPartymatterMapper;
|
||||
import org.jeecg.modules.demo.bgpartymatter.service.IBgPartymatterService;
|
||||
import org.jeecg.modules.test.mapper.TestSonTableMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* @Description: 党委会
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BgPartymatterServiceImpl extends ServiceImpl<BgPartymatterMapper, BgPartymatter> implements IBgPartymatterService {
|
||||
|
||||
@Autowired
|
||||
private BgPartymatterMapper bgPartymatterMapper;
|
||||
@Autowired
|
||||
private BgPartymatterFeedbackMapper bgPartymatterFeedbackMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@CascadeDelete(sons = {
|
||||
// 配置子表1:Mapper类 + 子表中关联主表的字段名
|
||||
@SonTable(mapper = BgPartymatterFeedback.class, joinColumn = "main_id"),
|
||||
})
|
||||
public void delMain(String id) {
|
||||
bgPartymatterFeedbackMapper.deleteByMainId(id);
|
||||
bgPartymatterMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delBatchMain(Collection<? extends Serializable> idList) {
|
||||
for(Serializable id:idList) {
|
||||
bgPartymatterFeedbackMapper.deleteByMainId(id.toString());
|
||||
bgPartymatterMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user