forked from Gitlink/microservices
Merge pull request '完成专项项目会议报告' (#734) from otto/microservices:master into master
This commit is contained in:
commit
9fe9745caf
|
|
@ -37,12 +37,18 @@ import com.microservices.zone.resource.service.IZoneResourceService;
|
|||
import com.microservices.zone.resource.service.IZoneResourceTypeService;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProject;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectRelevancy;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectReport;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectType;
|
||||
import com.microservices.zone.specialProject.domain.vo.CommonTypeVo;
|
||||
import com.microservices.zone.specialProject.domain.vo.ZoneSpecialProjectRelevancySearchVo;
|
||||
import com.microservices.zone.specialProject.domain.vo.ZoneSpecialProjectReportSearchVo;
|
||||
import com.microservices.zone.specialProject.service.IZoneSpecialProjectRelevancyService;
|
||||
import com.microservices.zone.specialProject.service.IZoneSpecialProjectReportService;
|
||||
import com.microservices.zone.specialProject.service.IZoneSpecialProjectService;
|
||||
import com.microservices.zone.specialProject.service.IZoneSpecialProjectTypeService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
|
@ -82,6 +88,8 @@ public class OpenController extends BaseController {
|
|||
private IZoneSpecialProjectService zoneSpecialProjectService;
|
||||
@Autowired
|
||||
private IZoneSpecialProjectRelevancyService zoneSpecialProjectRelevancyService;
|
||||
@Autowired
|
||||
private IZoneSpecialProjectReportService zoneSpecialProjectReportService;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -364,11 +372,28 @@ public class OpenController extends BaseController {
|
|||
@GetMapping("/specialProject/{specialProjectId}/specialProjectRelevancyList")
|
||||
@ApiOperation("获取特色专区专项项目关联关系列表")
|
||||
public GenericsTableDataInfo<ZoneSpecialProjectRelevancy> selectZoneSpecialProjectRelevancyList(
|
||||
@ApiParam(name = "specialProjectId", value = "专项项目Id", required = true) @PathVariable("specialProjectId") Long specialProjectId) {
|
||||
ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy = new ZoneSpecialProjectRelevancy();
|
||||
zoneSpecialProjectRelevancy.setSpecialProjectId(specialProjectId);
|
||||
@ApiParam(name = "specialProjectId", value = "专项项目Id", required = true) @PathVariable("specialProjectId") Long specialProjectId,
|
||||
@Validated ZoneSpecialProjectRelevancySearchVo zoneSpecialProjectRelevancySearchVo) {
|
||||
zoneSpecialProjectRelevancySearchVo.setSpecialProjectId(specialProjectId);
|
||||
startPage();
|
||||
List<ZoneSpecialProjectRelevancy> list = zoneSpecialProjectRelevancyService.selectZoneSpecialProjectRelevancyList(zoneSpecialProjectRelevancy);
|
||||
List<ZoneSpecialProjectRelevancy> list = zoneSpecialProjectRelevancyService.selectZoneSpecialProjectRelevancyList(zoneSpecialProjectRelevancySearchVo.toZoneSpecialProjectRelevancySearchVo());
|
||||
return getGenericsDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("/ZoneSpecialProjectRelevancyType/list")
|
||||
@ApiOperation(value = "获取专项项目关联类型列表")
|
||||
public List<CommonTypeVo> zoneSpecialProjectRelevancyTypeList() {
|
||||
return zoneSpecialProjectRelevancyService.selectZoneSpecialProjectRelevancyTypeList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询专项项目会议报告列表
|
||||
*/
|
||||
@GetMapping("/ZoneSpecialProjectReport/list")
|
||||
@ApiOperation("查询专项项目会议报告列表")
|
||||
public GenericsTableDataInfo<ZoneSpecialProjectReport> list(@Validated ZoneSpecialProjectReportSearchVo zoneSpecialProjectReportSearchVo) {
|
||||
startPage();
|
||||
List<ZoneSpecialProjectReport> list = zoneSpecialProjectReportService.selectZoneSpecialProjectReportList(zoneSpecialProjectReportSearchVo.toZoneSpecialProjectReport());
|
||||
return getGenericsDataTable(list);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.microservices.zone.specialProject.controller;
|
|||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.domain.GenericsAjaxResult;
|
||||
import com.microservices.common.core.web.page.GenericsTableDataInfo;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
|
|
@ -54,8 +55,8 @@ public class ZoneSpecialProjectRelevancyController extends BaseController {
|
|||
@RequiresPermissions("zone:specialProjectRelevancy:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取特色专区专项项目关联关系详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(zoneSpecialProjectRelevancyService.selectZoneSpecialProjectRelevancyById(id));
|
||||
public GenericsAjaxResult<ZoneSpecialProjectRelevancy> getInfo(@PathVariable("id") Long id) {
|
||||
return genericsSuccess(zoneSpecialProjectRelevancyService.selectZoneSpecialProjectRelevancyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,90 @@
|
|||
package com.microservices.zone.specialProject.controller;
|
||||
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.domain.GenericsAjaxResult;
|
||||
import com.microservices.common.core.web.page.GenericsTableDataInfo;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
import com.microservices.common.security.annotation.RequiresPermissions;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectReport;
|
||||
import com.microservices.zone.specialProject.domain.vo.ZoneSpecialProjectReportInputVo;
|
||||
import com.microservices.zone.specialProject.domain.vo.ZoneSpecialProjectReportSearchVo;
|
||||
import com.microservices.zone.specialProject.domain.vo.ZoneSpecialProjectReportUpdateVo;
|
||||
import com.microservices.zone.specialProject.service.IZoneSpecialProjectReportService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 专项项目会议报告Controller
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-11-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/zoneSpecialProjectReport")
|
||||
@Api(tags = "特色专区专项项目会议报告接口")
|
||||
public class ZoneSpecialProjectReportController extends BaseController {
|
||||
@Autowired
|
||||
private IZoneSpecialProjectReportService zoneSpecialProjectReportService;
|
||||
|
||||
/**
|
||||
* 查询专项项目会议报告列表
|
||||
*/
|
||||
@RequiresPermissions("zone:zoneSpecialProjectReport:list")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询专项项目会议报告列表")
|
||||
public GenericsTableDataInfo<ZoneSpecialProjectReport> list(@Validated ZoneSpecialProjectReportSearchVo zoneSpecialProjectReportSearchVo) {
|
||||
startPage();
|
||||
List<ZoneSpecialProjectReport> list = zoneSpecialProjectReportService.selectZoneSpecialProjectReportList(zoneSpecialProjectReportSearchVo.toZoneSpecialProjectReport());
|
||||
return getGenericsDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专项项目会议报告详细信息
|
||||
*/
|
||||
@RequiresPermissions("zone:zoneSpecialProjectReport:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取专项项目会议报告详细信息")
|
||||
public GenericsAjaxResult<ZoneSpecialProjectReport> getInfo(@PathVariable("id") Long id) {
|
||||
return genericsSuccess(zoneSpecialProjectReportService.selectZoneSpecialProjectReportById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增专项项目会议报告
|
||||
*/
|
||||
@RequiresPermissions("zone:zoneSpecialProjectReport:add")
|
||||
@Log(title = "专项项目会议报告", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增专项项目会议报告")
|
||||
public AjaxResult add(@RequestBody @Validated ZoneSpecialProjectReportInputVo zoneSpecialProjectReportInputVo) {
|
||||
return toAjax(zoneSpecialProjectReportService.insertZoneSpecialProjectReport(zoneSpecialProjectReportInputVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改专项项目会议报告
|
||||
*/
|
||||
@RequiresPermissions("zone:zoneSpecialProjectReport:edit")
|
||||
@Log(title = "专项项目会议报告", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
@ApiOperation("修改专项项目会议报告")
|
||||
public AjaxResult edit(@RequestBody @Validated ZoneSpecialProjectReportUpdateVo zoneSpecialProjectReportUpdateVo) {
|
||||
return toAjax(zoneSpecialProjectReportService.updateZoneSpecialProjectReport(zoneSpecialProjectReportUpdateVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除专项项目会议报告
|
||||
*/
|
||||
@RequiresPermissions("zone:zoneSpecialProjectReport:remove")
|
||||
@Log(title = "专项项目会议报告", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除专项项目会议报告")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(zoneSpecialProjectReportService.deleteZoneSpecialProjectReportByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.microservices.zone.specialProject.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.microservices.zone.detail.domain.ZoneSort;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 专项项目会议报告对象 zone_special_project_report
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-11-14
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("特色专区专项项目会议报告对象")
|
||||
public class ZoneSpecialProjectReport extends ZoneSort {
|
||||
public static final String table_name = "zone_special_project_report";
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 报告名称
|
||||
*/
|
||||
@ApiModelProperty(value = "报告名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 报告人
|
||||
*/
|
||||
@ApiModelProperty(value = "报告人")
|
||||
private String author;
|
||||
|
||||
/**
|
||||
* 报告链接
|
||||
*/
|
||||
@ApiModelProperty(value = "报告链接")
|
||||
private String link;
|
||||
|
||||
/**
|
||||
* 报告备注
|
||||
*/
|
||||
@ApiModelProperty(value = "报告备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 专项项目id
|
||||
*/
|
||||
@ApiModelProperty(value = "专项项目id")
|
||||
private Long specialProjectId;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 专区id
|
||||
*/
|
||||
@ApiModelProperty(value = "专区id")
|
||||
private Long zoneId;
|
||||
|
||||
/**
|
||||
* 所属组织Id
|
||||
*/
|
||||
@ApiModelProperty(value = "所属组织Id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
@JsonIgnore
|
||||
private String reservedField1;
|
||||
|
||||
@JsonIgnore
|
||||
private String reservedField2;
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ import javax.validation.constraints.Size;
|
|||
* @author OTTO
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("专项项目关联关系输入对象")
|
||||
@ApiModel("专项项目关联关系更新对象")
|
||||
public class ZoneSpecialProjectRelevancyUpdateVo {
|
||||
@ApiModelProperty(value = "专项项目关联关系的id", required = true)
|
||||
@NotNull
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
package com.microservices.zone.specialProject.domain.vo;
|
||||
|
||||
import com.microservices.common.core.utils.bean.BeanUtils;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectReport;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
* @author OTTO
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("专项项目会议报告输入对象")
|
||||
public class ZoneSpecialProjectReportInputVo {
|
||||
@ApiModelProperty(value = "专项项目id", required = true)
|
||||
@NotNull
|
||||
private Long specialProjectId;
|
||||
@ApiModelProperty(value = "会议报告名称", required = true)
|
||||
@Size(max = 300, message = "会议报告名称长度不能超过300个字符")
|
||||
@NotNull
|
||||
private String name;
|
||||
@ApiModelProperty(value = "会议报告报告人", required = true)
|
||||
@Size(max = 100, message = "会议报告报告人长度不能超过100个字符")
|
||||
@NotNull
|
||||
private String author;
|
||||
@ApiModelProperty(value = "会议报告链接")
|
||||
@Size(max = 300, message = "会议报告链接长度不能超过300个字符")
|
||||
private String link;
|
||||
@ApiModelProperty(value = "会议报告备注")
|
||||
@Size(max = 300, message = "会议报告备注长度不能超过300个字符")
|
||||
private String remark;
|
||||
|
||||
|
||||
public ZoneSpecialProjectReport toZoneSpecialProjectReport() {
|
||||
ZoneSpecialProjectReport target = new ZoneSpecialProjectReport();
|
||||
BeanUtils.copyProperties(this, target);
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.microservices.zone.specialProject.domain.vo;
|
||||
|
||||
import com.microservices.common.core.utils.bean.BeanUtils;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectReport;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author OTTO
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("专项项目会议报告搜索对象")
|
||||
public class ZoneSpecialProjectReportSearchVo {
|
||||
|
||||
@ApiModelProperty(value = "专项项目id", required = true)
|
||||
@NotNull
|
||||
private Long specialProjectId;
|
||||
@ApiModelProperty(value = "报告名称")
|
||||
private String name;
|
||||
|
||||
|
||||
public ZoneSpecialProjectReport toZoneSpecialProjectReport() {
|
||||
ZoneSpecialProjectReport target = new ZoneSpecialProjectReport();
|
||||
BeanUtils.copyProperties(this, target);
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.microservices.zone.specialProject.domain.vo;
|
||||
|
||||
import com.microservices.common.core.utils.bean.BeanUtils;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectReport;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
* @author OTTO
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("专项项目会议报告更新对象")
|
||||
public class ZoneSpecialProjectReportUpdateVo {
|
||||
@ApiModelProperty(value = "专项项目会议报告id", required = true)
|
||||
@NotNull
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "会议报告名称")
|
||||
@Size(max = 300, message = "会议报告名称长度不能超过300个字符")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "会议报告报告人")
|
||||
@Size(max = 100, message = "会议报告报告人长度不能超过100个字符")
|
||||
private String author;
|
||||
@ApiModelProperty(value = "会议报告链接")
|
||||
@Size(max = 300, message = "会议报告链接长度不能超过300个字符")
|
||||
private String link;
|
||||
@ApiModelProperty(value = "会议报告备注")
|
||||
@Size(max = 300, message = "会议报告备注长度不能超过300个字符")
|
||||
private String remark;
|
||||
@ApiModelProperty(value = "顺序")
|
||||
private Integer order;
|
||||
|
||||
|
||||
public ZoneSpecialProjectReport toZoneSpecialProjectReport() {
|
||||
ZoneSpecialProjectReport target = new ZoneSpecialProjectReport();
|
||||
BeanUtils.copyProperties(this, target);
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.microservices.zone.specialProject.mapper;
|
||||
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectReport;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 专项项目会议报告Mapper接口
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-11-14
|
||||
*/
|
||||
@Mapper
|
||||
public interface ZoneSpecialProjectReportMapper {
|
||||
/**
|
||||
* 查询专项项目会议报告
|
||||
*
|
||||
* @param id 专项项目会议报告主键
|
||||
* @return 专项项目会议报告
|
||||
*/
|
||||
public ZoneSpecialProjectReport selectZoneSpecialProjectReportById(Long id);
|
||||
|
||||
/**
|
||||
* 查询专项项目会议报告列表
|
||||
*
|
||||
* @param zoneSpecialProjectReport 专项项目会议报告
|
||||
* @return 专项项目会议报告集合
|
||||
*/
|
||||
public List<ZoneSpecialProjectReport> selectZoneSpecialProjectReportList(ZoneSpecialProjectReport zoneSpecialProjectReport);
|
||||
|
||||
/**
|
||||
* 新增专项项目会议报告
|
||||
*
|
||||
* @param zoneSpecialProjectReport 专项项目会议报告
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZoneSpecialProjectReport(ZoneSpecialProjectReport zoneSpecialProjectReport);
|
||||
|
||||
/**
|
||||
* 修改专项项目会议报告
|
||||
*
|
||||
* @param zoneSpecialProjectReport 专项项目会议报告
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZoneSpecialProjectReport(ZoneSpecialProjectReport zoneSpecialProjectReport);
|
||||
|
||||
/**
|
||||
* 删除专项项目会议报告
|
||||
*
|
||||
* @param id 专项项目会议报告主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectReportById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除专项项目会议报告
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectReportByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.microservices.zone.specialProject.service;
|
||||
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectReport;
|
||||
import com.microservices.zone.specialProject.domain.vo.ZoneSpecialProjectReportInputVo;
|
||||
import com.microservices.zone.specialProject.domain.vo.ZoneSpecialProjectReportUpdateVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 专项项目会议报告Service接口
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-11-14
|
||||
*/
|
||||
public interface IZoneSpecialProjectReportService {
|
||||
/**
|
||||
* 查询专项项目会议报告
|
||||
*
|
||||
* @param id 专项项目会议报告主键
|
||||
* @return 专项项目会议报告
|
||||
*/
|
||||
public ZoneSpecialProjectReport selectZoneSpecialProjectReportById(Long id);
|
||||
|
||||
/**
|
||||
* 查询专项项目会议报告列表
|
||||
*
|
||||
* @param zoneSpecialProjectReport 专项项目会议报告
|
||||
* @return 专项项目会议报告集合
|
||||
*/
|
||||
public List<ZoneSpecialProjectReport> selectZoneSpecialProjectReportList(ZoneSpecialProjectReport zoneSpecialProjectReport);
|
||||
|
||||
/**
|
||||
* 新增专项项目会议报告
|
||||
*
|
||||
* @param zoneSpecialProjectReportInputVo 专项项目会议报告
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZoneSpecialProjectReport(ZoneSpecialProjectReportInputVo zoneSpecialProjectReportInputVo);
|
||||
|
||||
/**
|
||||
* 修改专项项目会议报告
|
||||
*
|
||||
* @param zoneSpecialProjectReportUpdateVo 专项项目会议报告
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZoneSpecialProjectReport(ZoneSpecialProjectReportUpdateVo zoneSpecialProjectReportUpdateVo);
|
||||
|
||||
/**
|
||||
* 批量删除专项项目会议报告
|
||||
*
|
||||
* @param ids 需要删除的专项项目会议报告主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectReportByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除专项项目会议报告信息
|
||||
*
|
||||
* @param id 专项项目会议报告主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectReportById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
package com.microservices.zone.specialProject.service.impl;
|
||||
|
||||
import com.microservices.common.core.exception.ServiceException;
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.microservices.common.security.utils.SecurityUtils;
|
||||
import com.microservices.zone.common.service.IZoneSortService;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProject;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectReport;
|
||||
import com.microservices.zone.specialProject.domain.vo.ZoneSpecialProjectReportInputVo;
|
||||
import com.microservices.zone.specialProject.domain.vo.ZoneSpecialProjectReportUpdateVo;
|
||||
import com.microservices.zone.specialProject.mapper.ZoneSpecialProjectReportMapper;
|
||||
import com.microservices.zone.specialProject.service.IZoneSpecialProjectReportService;
|
||||
import com.microservices.zone.specialProject.service.IZoneSpecialProjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 专项项目会议报告Service业务层处理
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-11-14
|
||||
*/
|
||||
@Service
|
||||
public class ZoneSpecialProjectReportServiceImpl implements IZoneSpecialProjectReportService {
|
||||
@Autowired
|
||||
private ZoneSpecialProjectReportMapper zoneSpecialProjectReportMapper;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private IZoneSpecialProjectService zoneSpecialProjectService;
|
||||
@Autowired
|
||||
private IZoneSortService zoneSortService;
|
||||
|
||||
/**
|
||||
* 查询专项项目会议报告
|
||||
*
|
||||
* @param id 专项项目会议报告主键
|
||||
* @return 专项项目会议报告
|
||||
*/
|
||||
@Override
|
||||
public ZoneSpecialProjectReport selectZoneSpecialProjectReportById(Long id) {
|
||||
ZoneSpecialProjectReport zoneSpecialProjectReport = zoneSpecialProjectReportMapper.selectZoneSpecialProjectReportById(id);
|
||||
if (zoneSpecialProjectReport == null) {
|
||||
throw new ServiceException("该专项项目会议报告不存在或无权限访问(专项项目会议报告id[" + id + "])");
|
||||
}
|
||||
return zoneSpecialProjectReport;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询专项项目会议报告列表
|
||||
*
|
||||
* @param zoneSpecialProjectReport 专项项目会议报告
|
||||
* @return 专项项目会议报告
|
||||
*/
|
||||
@Override
|
||||
public List<ZoneSpecialProjectReport> selectZoneSpecialProjectReportList(ZoneSpecialProjectReport zoneSpecialProjectReport) {
|
||||
return zoneSpecialProjectReportMapper.selectZoneSpecialProjectReportList(zoneSpecialProjectReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增专项项目会议报告
|
||||
*
|
||||
* @param zoneSpecialProjectReportInputVo 专项项目会议报告
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertZoneSpecialProjectReport(ZoneSpecialProjectReportInputVo zoneSpecialProjectReportInputVo) {
|
||||
ZoneSpecialProject zoneSpecialProject = zoneSpecialProjectService.selectZoneSpecialProjectById(zoneSpecialProjectReportInputVo.getSpecialProjectId());
|
||||
ZoneSpecialProjectReport zoneSpecialProjectReport = zoneSpecialProjectReportInputVo.toZoneSpecialProjectReport();
|
||||
zoneSpecialProjectReport.setCreateTime(DateUtils.getNowDate());
|
||||
zoneSpecialProjectReport.setCreateBy(SecurityUtils.getUsername());
|
||||
zoneSpecialProjectReport.setDeptId(zoneSpecialProject.getDeptId());
|
||||
zoneSpecialProjectReport.setZoneId(zoneSpecialProject.getZoneId());
|
||||
Integer maxSort = zoneSortService.getMaxSort(zoneSpecialProject.getZoneId(), ZoneSpecialProjectReport.table_name);
|
||||
zoneSpecialProjectReport.setSort(maxSort);
|
||||
return zoneSpecialProjectReportMapper.insertZoneSpecialProjectReport(zoneSpecialProjectReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改专项项目会议报告
|
||||
*
|
||||
* @param zoneSpecialProjectReportUpdateVo 专项项目会议报告
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateZoneSpecialProjectReport(ZoneSpecialProjectReportUpdateVo zoneSpecialProjectReportUpdateVo) {
|
||||
ZoneSpecialProjectReport oldZoneSpecialProjectReport = selectZoneSpecialProjectReportById(zoneSpecialProjectReportUpdateVo.getId());
|
||||
ZoneSpecialProjectReport zoneSpecialProjectReport = zoneSpecialProjectReportUpdateVo.toZoneSpecialProjectReport();
|
||||
zoneSpecialProjectReport.setUpdateTime(DateUtils.getNowDate());
|
||||
zoneSpecialProjectReport.setUpdateBy(SecurityUtils.getUsername());
|
||||
if (zoneSpecialProjectReportUpdateVo.getOrder() != null) {
|
||||
Integer setSort =
|
||||
zoneSortService.setSortByOrder(oldZoneSpecialProjectReport, zoneSpecialProjectReportUpdateVo.getOrder(), ZoneSpecialProjectReport.table_name);
|
||||
zoneSpecialProjectReport.setSort(setSort);
|
||||
}
|
||||
return zoneSpecialProjectReportMapper.updateZoneSpecialProjectReport(zoneSpecialProjectReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除专项项目会议报告
|
||||
*
|
||||
* @param ids 需要删除的专项项目会议报告主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZoneSpecialProjectReportByIds(Long[] ids) {
|
||||
return zoneSpecialProjectReportMapper.deleteZoneSpecialProjectReportByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除专项项目会议报告信息
|
||||
*
|
||||
* @param id 专项项目会议报告主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZoneSpecialProjectReportById(Long id) {
|
||||
return zoneSpecialProjectReportMapper.deleteZoneSpecialProjectReportById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
<?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="com.microservices.zone.specialProject.mapper.ZoneSpecialProjectReportMapper">
|
||||
|
||||
<resultMap type="ZoneSpecialProjectReport" id="ZoneSpecialProjectReportResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="author" column="author"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="link" column="link"/>
|
||||
<result property="specialProjectId" column="special_project_id"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="zoneId" column="zone_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="reservedField1" column="reserved_field_1"/>
|
||||
<result property="reservedField2" column="reserved_field_2"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZoneSpecialProjectReportVo">
|
||||
select id,
|
||||
name,
|
||||
author,
|
||||
remark,
|
||||
link,
|
||||
special_project_id,
|
||||
sort,
|
||||
zone_id,
|
||||
dept_id,
|
||||
del_flag,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
reserved_field_1,
|
||||
reserved_field_2
|
||||
from zone_special_project_report
|
||||
</sql>
|
||||
|
||||
<select id="selectZoneSpecialProjectReportList" parameterType="ZoneSpecialProjectReport"
|
||||
resultMap="ZoneSpecialProjectReportResult">
|
||||
<include refid="selectZoneSpecialProjectReportVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="author != null and author != ''">and author = #{author}</if>
|
||||
<if test="link != null and link != ''">and link = #{link}</if>
|
||||
<if test="specialProjectId != null ">and special_project_id = #{specialProjectId}</if>
|
||||
<if test="sort != null ">and sort = #{sort}</if>
|
||||
<if test="zoneId != null ">and zone_id = #{zoneId}</if>
|
||||
<if test="deptId != null ">and dept_id = #{deptId}</if>
|
||||
<if test="reservedField1 != null and reservedField1 != ''">and reserved_field_1 = #{reservedField1}</if>
|
||||
<if test="reservedField2 != null and reservedField2 != ''">and reserved_field_2 = #{reservedField2}</if>
|
||||
</where>
|
||||
ORDER BY sort ASC
|
||||
</select>
|
||||
|
||||
<select id="selectZoneSpecialProjectReportById" parameterType="Long" resultMap="ZoneSpecialProjectReportResult">
|
||||
<include refid="selectZoneSpecialProjectReportVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZoneSpecialProjectReport" parameterType="ZoneSpecialProjectReport" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zone_special_project_report
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="author != null and author != ''">author,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="link != null and link != ''">link,</if>
|
||||
<if test="specialProjectId != null">special_project_id,</if>
|
||||
<if test="sort != null">sort,</if>
|
||||
<if test="zoneId != null">zone_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="reservedField1 != null">reserved_field_1,</if>
|
||||
<if test="reservedField2 != null">reserved_field_2,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="author != null and author != ''">#{author},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="link != null and link != ''">#{link},</if>
|
||||
<if test="specialProjectId != null">#{specialProjectId},</if>
|
||||
<if test="sort != null">#{sort},</if>
|
||||
<if test="zoneId != null">#{zoneId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="reservedField1 != null">#{reservedField1},</if>
|
||||
<if test="reservedField2 != null">#{reservedField2},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZoneSpecialProjectReport" parameterType="ZoneSpecialProjectReport">
|
||||
update zone_special_project_report
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="author != null and author != ''">author = #{author},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="link != null and link != ''">link = #{link},</if>
|
||||
<if test="specialProjectId != null">special_project_id = #{specialProjectId},</if>
|
||||
<if test="sort != null">sort = #{sort},</if>
|
||||
<if test="zoneId != null">zone_id = #{zoneId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="reservedField1 != null">reserved_field_1 = #{reservedField1},</if>
|
||||
<if test="reservedField2 != null">reserved_field_2 = #{reservedField2},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZoneSpecialProjectReportById" parameterType="Long">
|
||||
delete
|
||||
from zone_special_project_report
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZoneSpecialProjectReportByIds" parameterType="String">
|
||||
delete from zone_special_project_report where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue