diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportTitleTemplateEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportTitleTemplateEOController.java new file mode 100644 index 000000000..55495b7ba --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportTitleTemplateEOController.java @@ -0,0 +1,170 @@ +package com.jero.modules.report.controller; + +import java.util.Arrays; +import java.util.List; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import com.jero.common.api.vo.Result; +import com.jero.common.system.query.QueryGenerator; +import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO; +import com.jero.modules.report.service.ILawsMonthlyReportTitleTemplateEOService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import com.jero.common.system.base.controller.JeroController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import com.jero.common.aspect.annotation.AutoLog; + + + /** + * @Description: 月报标题模板 + * @Author: jero-boot + * @Date: 2022-06-29 + * @Version: V1.0 + */ +@Api(tags="月报标题模板") +@RestController +@RequestMapping("/report/lawsMonthlyReportTitleTemplateEO") +@Slf4j +public class LawsMonthlyReportTitleTemplateEOController extends JeroController { + @Autowired + private ILawsMonthlyReportTitleTemplateEOService lawsMonthlyReportTitleTemplateEOService; + + /** + * 分页列表查询 + * + * @param lawsMonthlyReportTitleTemplateEO + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "月报标题模板-分页列表查询") + @ApiOperation(value="月报标题模板-分页列表查询", notes="月报标题模板-分页列表查询") + @GetMapping(value = "/page") + public Result queryPageList(LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lawsMonthlyReportTitleTemplateEO, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = lawsMonthlyReportTitleTemplateEOService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "月报标题模板-列表查询") + @ApiOperation(value="月报标题模板-列表查询", notes="月报标题模板-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { + List list = lawsMonthlyReportTitleTemplateEOService.queryList(); + return Result.OK(list); + } + + /** + * 添加 + * + * @param lawsMonthlyReportTitleTemplateEO + * @return + */ + @AutoLog(value = "月报标题模板-添加") + @ApiOperation(value="月报标题模板-添加", notes="月报标题模板-添加") + @PostMapping(value = "/add") + public Result add(@Validated @RequestBody LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO) { + lawsMonthlyReportTitleTemplateEOService.add(lawsMonthlyReportTitleTemplateEO); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param lawsMonthlyReportTitleTemplateEO + * @return + */ + @AutoLog(value = "月报标题模板-编辑") + @ApiOperation(value="月报标题模板-编辑", notes="月报标题模板-编辑") + @GetMapping(value = "/edit") + public Result edit(@Validated @RequestBody LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO) { + lawsMonthlyReportTitleTemplateEOService.editById(lawsMonthlyReportTitleTemplateEO); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "月报标题模板-通过id删除") + @ApiOperation(value="月报标题模板-通过id删除", notes="月报标题模板-通过id删除") + @GetMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + lawsMonthlyReportTitleTemplateEOService.deleteById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "月报标题模板-批量删除") + @ApiOperation(value="月报标题模板-批量删除", notes="月报标题模板-批量删除") + @GetMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.lawsMonthlyReportTitleTemplateEOService.deleteByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "月报标题模板-通过id查询") + @ApiOperation(value="月报标题模板-通过id查询", notes="月报标题模板-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO = lawsMonthlyReportTitleTemplateEOService.queryById(id); + if(lawsMonthlyReportTitleTemplateEO==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(lawsMonthlyReportTitleTemplateEO); + } + + /** + * 导出excel + * + * @param request + * @param lawsMonthlyReportTitleTemplateEO + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO) { + return super.exportXls(request, lawsMonthlyReportTitleTemplateEO, LawsMonthlyReportTitleTemplateEO.class, "月报标题模板"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, LawsMonthlyReportTitleTemplateEO.class); + } + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/LawsMonthlyReportTitleTemplateEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/LawsMonthlyReportTitleTemplateEO.java new file mode 100644 index 000000000..2d7084e0c --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/entity/LawsMonthlyReportTitleTemplateEO.java @@ -0,0 +1,79 @@ +package com.jero.modules.report.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import com.jero.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + + +/** + * @Description: 月报标题模板 + * @Author: jero-boot + * @Date: 2022-06-29 + * @Version: V1.0 + */ +@Data +@TableName("laws_monthly_report_title_template") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="laws_monthly_report_title_template对象", description="月报标题模板") +public class LawsMonthlyReportTitleTemplateEO implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + + /**父id*/ + @Excel(name = "父id", width = 15) + @ApiModelProperty(value = "父id") + private java.lang.String parentId; + + /**中文标题*/ + @Excel(name = "中文标题", width = 15) + @ApiModelProperty(value = "中文标题") + private java.lang.String titleCn; + + /**英文标题*/ + @Excel(name = "英文标题", width = 15) + @ApiModelProperty(value = "英文标题") + private java.lang.String titleEn; + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/LawsMonthlyReportTitleTemplateEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/LawsMonthlyReportTitleTemplateEOMapper.java new file mode 100644 index 000000000..1820a8a3d --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/LawsMonthlyReportTitleTemplateEOMapper.java @@ -0,0 +1,17 @@ +package com.jero.modules.report.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 月报标题模板 + * @Author: jero-boot + * @Date: 2022-06-29 + * @Version: V1.0 + */ +public interface LawsMonthlyReportTitleTemplateEOMapper extends BaseMapper { + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/LawsMonthlyReportTitleTemplateEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/LawsMonthlyReportTitleTemplateEOMapper.xml new file mode 100644 index 000000000..5ce76fae5 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/mapper/xml/LawsMonthlyReportTitleTemplateEOMapper.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/ILawsMonthlyReportTitleTemplateEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/ILawsMonthlyReportTitleTemplateEOService.java new file mode 100644 index 000000000..63b28c44f --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/ILawsMonthlyReportTitleTemplateEOService.java @@ -0,0 +1,61 @@ +package com.jero.modules.report.service; + +import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 月报标题模板 + * @Author: jero-boot + * @Date: 2022-06-29 + * @Version: V1.0 + */ +public interface ILawsMonthlyReportTitleTemplateEOService extends IService { + + /** + * 保存 + * + * @param lawsMonthlyReportTitleTemplateEO + * @return + */ + void add(LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO); + + /** + * 更新 + * + * @param lawsMonthlyReportTitleTemplateEO + * @return + */ + void editById(LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO); + + /** + * 通过id删除 + * + * @param id + * @return + */ + void deleteById(String id); + + /** + * 批量删除 + * + * @param ids + * @return + */ + void deleteByIds(List ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + LawsMonthlyReportTitleTemplateEO queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(); +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportTitleTemplateEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportTitleTemplateEOServiceImpl.java new file mode 100644 index 000000000..e0509e457 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportTitleTemplateEOServiceImpl.java @@ -0,0 +1,89 @@ +package com.jero.modules.report.service.impl; + +import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO; +import com.jero.modules.report.mapper.LawsMonthlyReportTitleTemplateEOMapper; +import com.jero.modules.report.service.ILawsMonthlyReportTitleTemplateEOService; +import org.springframework.stereotype.Service; +import java.util.List; +import java.util.Date; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 月报标题模板 + * @Author: jero-boot + * @Date: 2022-06-29 + * @Version: V1.0 + */ +@Service +public class LawsMonthlyReportTitleTemplateEOServiceImpl extends ServiceImpl implements ILawsMonthlyReportTitleTemplateEOService { + + /** + * 保存 + * + * @param lawsMonthlyReportTitleTemplateEO + * @return + */ + @Override + public void add(LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO) { + Date now = new Date(); + lawsMonthlyReportTitleTemplateEO.setCreateTime(now); + lawsMonthlyReportTitleTemplateEO.setUpdateTime(now); + save(lawsMonthlyReportTitleTemplateEO); + } + + /** + * 更新 + * + * @param lawsMonthlyReportTitleTemplateEO + * @return + */ + @Override + public void editById(LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO) { + Date now = new Date(); + lawsMonthlyReportTitleTemplateEO.setUpdateTime(now); + saveOrUpdate(lawsMonthlyReportTitleTemplateEO); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @Override + public void deleteById(String id) { + removeById(id); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @Override + public void deleteByIds(List ids) { + removeByIds(ids); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @Override + public LawsMonthlyReportTitleTemplateEO queryById(String id) { + return getById(id); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList() { + return list(); + } +}