add 功能安全中心基础代码
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
drop table if exists pay_functional_safety_center;
|
||||
create table pay_functional_safety_center
|
||||
(
|
||||
id varchar(36) not null comment 'id',
|
||||
parent_id varchar(36) not null comment '父级id',
|
||||
project_type int null comment '项目类型(1功能安全中心,2研究组,3项目组)',
|
||||
project_name varchar(50) null comment '项目名称',
|
||||
principal_id varchar(32) null comment '负责人id',
|
||||
mission_and_objectives varchar(200) null comment '任务及目标',
|
||||
remarks varchar(200) null comment '备注',
|
||||
create_by varchar(32) null comment '创建人',
|
||||
create_time datetime null comment '创建时间',
|
||||
update_by varchar(32) null comment '更新人',
|
||||
update_time datetime null comment '更新时间',
|
||||
constraint Index_1
|
||||
unique (id)
|
||||
)
|
||||
comment '功能安全中心';
|
||||
|
||||
alter table pay_functional_safety_center
|
||||
add primary key (id);
|
||||
drop table if exists pay_functional_safety_center_subitem;
|
||||
create table pay_functional_safety_center_subitem
|
||||
(
|
||||
id varchar(36) not null comment 'id',
|
||||
project_id varchar(36) not null comment '项目id',
|
||||
company_id varchar(32) null comment '成员单位id',
|
||||
remarks varchar(50) null comment '备注',
|
||||
create_by varchar(32) null comment '创建人',
|
||||
create_time datetime null comment '创建时间',
|
||||
update_by varchar(32) null comment '更新人',
|
||||
update_time datetime null comment '更新时间',
|
||||
constraint Index_1
|
||||
unique (id)
|
||||
)
|
||||
comment '功能安全中心成员';
|
||||
|
||||
alter table pay_functional_safety_center_subitem
|
||||
add primary key (id);
|
||||
drop table if exists pay_functional_safety_center_subitem_contacts;
|
||||
create table pay_functional_safety_center_subitem_contacts
|
||||
(
|
||||
id varchar(36) not null comment 'id',
|
||||
project_id varchar(36) not null comment '项目id',
|
||||
subitem_id varchar(36) not null comment '项目成员id',
|
||||
company_id varchar(32) null comment '成员单位id',
|
||||
contacts_id varchar(32) null comment '企业联系人id',
|
||||
remarks varchar(50) null comment '备注',
|
||||
order_num int null comment '序号',
|
||||
create_by varchar(32) null comment '创建人',
|
||||
create_time datetime null comment '创建时间',
|
||||
update_by varchar(32) null comment '更新人',
|
||||
update_time datetime null comment '更新时间',
|
||||
constraint Index_1
|
||||
unique (id)
|
||||
)
|
||||
comment '功能安全中心成员-联系人';
|
||||
|
||||
alter table pay_functional_safety_center_subitem_contacts
|
||||
add primary key (id);
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.jero.common.api.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author liJiaRao
|
||||
* @date 2023-11-17 15:27
|
||||
*/
|
||||
@Data
|
||||
public class IdsMapBody {
|
||||
/**id*/
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
/**ids*/
|
||||
@ApiModelProperty(value = "ids")
|
||||
private String ids;
|
||||
}
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
package com.jero.functionalsafetycenter.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.IdsMapBody;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.functionalsafetycenter.entity.FunctionalSafetyCenter;
|
||||
import com.jero.functionalsafetycenter.service.FunctionalSafetyCenterService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 功能安全中心(pay_functional_safety_center)表控制层
|
||||
*
|
||||
* @author xxxxx
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "功能安全中心")
|
||||
@RestController
|
||||
@RequestMapping("FunctionalSafetyCenter")
|
||||
public class FunctionalSafetyCenterController extends JeroController<FunctionalSafetyCenter, FunctionalSafetyCenterService> {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private FunctionalSafetyCenterService functionalSafetyCenterService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@ApiOperation(value = "功能安全中心-分页列表查询", notes = "功能安全中心-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<FunctionalSafetyCenter>> queryPageList(FunctionalSafetyCenter functionalSafetyCenter,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<FunctionalSafetyCenter> queryWrapper = QueryGenerator.initQueryWrapper(functionalSafetyCenter, req.getParameterMap());
|
||||
Page<FunctionalSafetyCenter> page = new Page<>(pageNo, pageSize);
|
||||
IPage<FunctionalSafetyCenter> pageList = functionalSafetyCenterService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@ApiOperation(value = "功能安全中心-列表查询", notes = "功能安全中心-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<FunctionalSafetyCenter>> queryList(FunctionalSafetyCenter functionalSafetyCenter,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<FunctionalSafetyCenter> queryWrapper = QueryGenerator.initQueryWrapper(functionalSafetyCenter, req.getParameterMap());
|
||||
List<FunctionalSafetyCenter> list = functionalSafetyCenterService.list(queryWrapper);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@AutoLog(value = "功能安全中心-添加")
|
||||
@ApiOperation(value = "功能安全中心-添加", notes = "功能安全中心-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@Validated @RequestBody FunctionalSafetyCenter functionalSafetyCenter) {
|
||||
functionalSafetyCenterService.add(functionalSafetyCenter);
|
||||
return Result.OK(Result.ADD_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@AutoLog(value = "功能安全中心-编辑")
|
||||
@ApiOperation(value = "功能安全中心-编辑", notes = "功能安全中心-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<String> edit(@Validated @RequestBody FunctionalSafetyCenter functionalSafetyCenter) {
|
||||
functionalSafetyCenterService.editById(functionalSafetyCenter);
|
||||
return Result.OK(Result.EDIT_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@AutoLog(value = "功能安全中心-通过id删除")
|
||||
@ApiOperation(value = "功能安全中心-通过id删除", notes = "功能安全中心-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<Object> delete(@RequestBody IdsMapBody map) {
|
||||
String id = map.getId();
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return Result.error(Result.NULL_ID);
|
||||
}
|
||||
functionalSafetyCenterService.deleteById(id);
|
||||
return Result.OK(Result.DELETE_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
@AutoLog(value = "功能安全中心-批量删除")
|
||||
@ApiOperation(value = "功能安全中心-批量删除", notes = "功能安全中心-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<Object> deleteBatch(@RequestBody IdsMapBody map) {
|
||||
String ids = map.getIds();
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
return Result.error(Result.NULL_ID);
|
||||
}
|
||||
List<String> idList = Arrays.asList(map.getIds().split(","));
|
||||
this.functionalSafetyCenterService.deleteByIds(idList);
|
||||
return Result.OK(Result.DELETE_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*/
|
||||
@AutoLog(value = "功能安全中心-通过id查询")
|
||||
@ApiOperation(value = "功能安全中心-通过id查询", notes = "功能安全中心-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<FunctionalSafetyCenter> queryById(@RequestParam(name = "id") String id) {
|
||||
FunctionalSafetyCenter functionalSafetyCenter = functionalSafetyCenterService.queryById(id);
|
||||
if (functionalSafetyCenter == null) {
|
||||
throw new JeroBootException(Result.NULL_DATA);
|
||||
}
|
||||
return Result.OK(functionalSafetyCenter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
@ApiOperation(value = "功能安全中心-导出excel")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, FunctionalSafetyCenter functionalSafetyCenter) {
|
||||
return super.exportXls(request, functionalSafetyCenter, FunctionalSafetyCenter.class, "功能安全中心");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
package com.jero.functionalsafetycenter.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.IdsMapBody;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.functionalsafetycenter.entity.FunctionalSafetyCenterSubitem;
|
||||
import com.jero.functionalsafetycenter.service.FunctionalSafetyCenterSubitemService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 功能安全中心成员(pay_functional_safety_center_subitem)表控制层
|
||||
*
|
||||
* @author xxxxx
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "功能安全中心成员")
|
||||
@RestController
|
||||
@RequestMapping("FunctionalSafetyCenterSubitem")
|
||||
public class FunctionalSafetyCenterSubitemController extends JeroController<FunctionalSafetyCenterSubitem, FunctionalSafetyCenterSubitemService> {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private FunctionalSafetyCenterSubitemService functionalSafetyCenterSubitemService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@ApiOperation(value = "功能安全中心成员-分页列表查询", notes = "功能安全中心成员-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<FunctionalSafetyCenterSubitem>> queryPageList(FunctionalSafetyCenterSubitem functionalSafetyCenterSubitem,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<FunctionalSafetyCenterSubitem> queryWrapper = QueryGenerator.initQueryWrapper(functionalSafetyCenterSubitem, req.getParameterMap());
|
||||
Page<FunctionalSafetyCenterSubitem> page = new Page<>(pageNo, pageSize);
|
||||
IPage<FunctionalSafetyCenterSubitem> pageList = functionalSafetyCenterSubitemService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@ApiOperation(value = "功能安全中心成员-列表查询", notes = "功能安全中心成员-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<FunctionalSafetyCenterSubitem>> queryList(FunctionalSafetyCenterSubitem functionalSafetyCenterSubitem,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<FunctionalSafetyCenterSubitem> queryWrapper = QueryGenerator.initQueryWrapper(functionalSafetyCenterSubitem, req.getParameterMap());
|
||||
List<FunctionalSafetyCenterSubitem> list = functionalSafetyCenterSubitemService.list(queryWrapper);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@AutoLog(value = "功能安全中心成员-添加")
|
||||
@ApiOperation(value = "功能安全中心成员-添加", notes = "功能安全中心成员-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@Validated @RequestBody FunctionalSafetyCenterSubitem functionalSafetyCenterSubitem) {
|
||||
functionalSafetyCenterSubitemService.add(functionalSafetyCenterSubitem);
|
||||
return Result.OK(Result.ADD_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@AutoLog(value = "功能安全中心成员-编辑")
|
||||
@ApiOperation(value = "功能安全中心成员-编辑", notes = "功能安全中心成员-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<String> edit(@Validated @RequestBody FunctionalSafetyCenterSubitem functionalSafetyCenterSubitem) {
|
||||
functionalSafetyCenterSubitemService.editById(functionalSafetyCenterSubitem);
|
||||
return Result.OK(Result.EDIT_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@AutoLog(value = "功能安全中心成员-通过id删除")
|
||||
@ApiOperation(value = "功能安全中心成员-通过id删除", notes = "功能安全中心成员-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<Object> delete(@RequestBody IdsMapBody map) {
|
||||
String id = map.getId();
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return Result.error(Result.NULL_ID);
|
||||
}
|
||||
functionalSafetyCenterSubitemService.deleteById(id);
|
||||
return Result.OK(Result.DELETE_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
@AutoLog(value = "功能安全中心成员-批量删除")
|
||||
@ApiOperation(value = "功能安全中心成员-批量删除", notes = "功能安全中心成员-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<Object> deleteBatch(@RequestBody IdsMapBody map) {
|
||||
String ids = map.getIds();
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
return Result.error(Result.NULL_ID);
|
||||
}
|
||||
List<String> idList = Arrays.asList(map.getIds().split(","));
|
||||
this.functionalSafetyCenterSubitemService.deleteByIds(idList);
|
||||
return Result.OK(Result.DELETE_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*/
|
||||
@AutoLog(value = "功能安全中心成员-通过id查询")
|
||||
@ApiOperation(value = "功能安全中心成员-通过id查询", notes = "功能安全中心成员-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<FunctionalSafetyCenterSubitem> queryById(@RequestParam(name = "id") String id) {
|
||||
FunctionalSafetyCenterSubitem functionalSafetyCenterSubitem = functionalSafetyCenterSubitemService.queryById(id);
|
||||
if (functionalSafetyCenterSubitem == null) {
|
||||
throw new JeroBootException(Result.NULL_DATA);
|
||||
}
|
||||
return Result.OK(functionalSafetyCenterSubitem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
@ApiOperation(value = "功能安全中心成员-导出excel")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, FunctionalSafetyCenterSubitem functionalSafetyCenterSubitem) {
|
||||
return super.exportXls(request, functionalSafetyCenterSubitem, FunctionalSafetyCenterSubitem.class, "功能安全中心成员");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*/
|
||||
@ApiOperation(value = "功能安全中心成员-通过excel导入数据")
|
||||
@PostMapping(value = "/importExcel")
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, FunctionalSafetyCenterSubitem.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
package com.jero.functionalsafetycenter.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*@author liJiaRao
|
||||
*@date 2024-06-12 15:13
|
||||
*/
|
||||
/**
|
||||
* 功能安全中心
|
||||
*/
|
||||
@ApiModel(description="功能安全中心")
|
||||
@Data
|
||||
@TableName(value = "pay_functional_safety_center")
|
||||
public class FunctionalSafetyCenter {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value="id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 父级id
|
||||
*/
|
||||
@TableField(value = "parent_id")
|
||||
@ApiModelProperty(value="父级id")
|
||||
private String parentId;
|
||||
|
||||
/**
|
||||
* 项目类型(1功能安全中心,2研究组,3项目组)
|
||||
*/
|
||||
@TableField(value = "project_type")
|
||||
@ApiModelProperty(value="项目类型(1功能安全中心,2研究组,3项目组)")
|
||||
private Integer projectType;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@TableField(value = "project_name")
|
||||
@ApiModelProperty(value="项目名称")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 负责人id
|
||||
*/
|
||||
@TableField(value = "principal_id")
|
||||
@ApiModelProperty(value="负责人id")
|
||||
private String principalId;
|
||||
|
||||
/**
|
||||
* 任务及目标
|
||||
*/
|
||||
@TableField(value = "mission_and_objectives")
|
||||
@ApiModelProperty(value="任务及目标")
|
||||
private String missionAndObjectives;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField(value = "remarks")
|
||||
@ApiModelProperty(value="备注")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "create_by")
|
||||
@ApiModelProperty(value="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@ApiModelProperty(value="创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(value = "update_by")
|
||||
@ApiModelProperty(value="更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
@ApiModelProperty(value="更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
package com.jero.functionalsafetycenter.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*@author liJiaRao
|
||||
*@date 2024-06-12 16:40
|
||||
*/
|
||||
|
||||
/**
|
||||
* 功能安全中心成员
|
||||
*/
|
||||
@ApiModel(description = "功能安全中心成员")
|
||||
@Data
|
||||
@TableName(value = "pay_functional_safety_center_subitem")
|
||||
public class FunctionalSafetyCenterSubitem {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@TableField(value = "project_id")
|
||||
@ApiModelProperty(value = "项目id")
|
||||
private String projectId;
|
||||
|
||||
/**
|
||||
* 成员单位id
|
||||
*/
|
||||
@TableField(value = "company_id")
|
||||
@ApiModelProperty(value = "成员单位id")
|
||||
private String companyId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField(value = "remarks")
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "create_by")
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(value = "update_by")
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
package com.jero.functionalsafetycenter.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*@author liJiaRao
|
||||
*@date 2024-06-12 15:13
|
||||
*/
|
||||
/**
|
||||
* 功能安全中心成员-联系人
|
||||
*/
|
||||
@ApiModel(description="功能安全中心成员-联系人")
|
||||
@Data
|
||||
@TableName(value = "pay_functional_safety_center_subitem_contacts")
|
||||
public class FunctionalSafetyCenterSubitemContacts {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value="id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@TableField(value = "project_id")
|
||||
@ApiModelProperty(value="项目id")
|
||||
private String projectId;
|
||||
|
||||
/**
|
||||
* 项目成员id
|
||||
*/
|
||||
@TableField(value = "subitem_id")
|
||||
@ApiModelProperty(value="项目成员id")
|
||||
private String subitemId;
|
||||
|
||||
/**
|
||||
* 成员单位id
|
||||
*/
|
||||
@TableField(value = "company_id")
|
||||
@ApiModelProperty(value="成员单位id")
|
||||
private String companyId;
|
||||
|
||||
/**
|
||||
* 企业联系人id
|
||||
*/
|
||||
@TableField(value = "contacts_id")
|
||||
@ApiModelProperty(value="企业联系人id")
|
||||
private String contactsId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField(value = "remarks")
|
||||
@ApiModelProperty(value="备注")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
@TableField(value = "order_num")
|
||||
@ApiModelProperty(value="序号")
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "create_by")
|
||||
@ApiModelProperty(value="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@ApiModelProperty(value="创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(value = "update_by")
|
||||
@ApiModelProperty(value="更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
@ApiModelProperty(value="更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.functionalsafetycenter.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.functionalsafetycenter.entity.FunctionalSafetyCenter;
|
||||
|
||||
/**
|
||||
*
|
||||
*@author liJiaRao
|
||||
*@date 2024-06-12 15:13
|
||||
*/
|
||||
public interface FunctionalSafetyCenterMapper extends BaseMapper<FunctionalSafetyCenter> {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.functionalsafetycenter.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.functionalsafetycenter.entity.FunctionalSafetyCenterSubitemContacts;
|
||||
|
||||
/**
|
||||
*
|
||||
*@author liJiaRao
|
||||
*@date 2024-06-12 15:13
|
||||
*/
|
||||
public interface FunctionalSafetyCenterSubitemContactsMapper extends BaseMapper<FunctionalSafetyCenterSubitemContacts> {
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.jero.functionalsafetycenter.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.functionalsafetycenter.entity.FunctionalSafetyCenterSubitem;
|
||||
|
||||
/**
|
||||
* @author liJiaRao
|
||||
* @date 2024-06-12 16:40
|
||||
*/
|
||||
public interface FunctionalSafetyCenterSubitemMapper extends BaseMapper<FunctionalSafetyCenterSubitem> {
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<?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.jero.functionalsafetycenter.mapper.FunctionalSafetyCenterMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jero.functionalsafetycenter.entity.FunctionalSafetyCenter">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table pay_functional_safety_center-->
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="parent_id" jdbcType="VARCHAR" property="parentId" />
|
||||
<result column="project_type" jdbcType="INTEGER" property="projectType" />
|
||||
<result column="project_name" jdbcType="VARCHAR" property="projectName" />
|
||||
<result column="principal_id" jdbcType="VARCHAR" property="principalId" />
|
||||
<result column="mission_and_objectives" jdbcType="VARCHAR" property="missionAndObjectives" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, parent_id, project_type, project_name, principal_id, mission_and_objectives,
|
||||
remarks, create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<?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.jero.functionalsafetycenter.mapper.FunctionalSafetyCenterSubitemContactsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jero.functionalsafetycenter.entity.FunctionalSafetyCenterSubitemContacts">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table pay_functional_safety_center_subitem_contacts-->
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="subitem_id" jdbcType="VARCHAR" property="subitemId" />
|
||||
<result column="company_id" jdbcType="VARCHAR" property="companyId" />
|
||||
<result column="contacts_id" jdbcType="VARCHAR" property="contactsId" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="order_num" jdbcType="INTEGER" property="orderNum" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, project_id, subitem_id, company_id, contacts_id, remarks, order_num, create_by,
|
||||
create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
<?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.jero.functionalsafetycenter.mapper.FunctionalSafetyCenterSubitemMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jero.functionalsafetycenter.entity.FunctionalSafetyCenterSubitem">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table pay_functional_safety_center_subitem-->
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="company_id" jdbcType="VARCHAR" property="companyId" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, project_id, company_id, remarks, create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.jero.functionalsafetycenter.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.functionalsafetycenter.entity.FunctionalSafetyCenter;
|
||||
import com.jero.functionalsafetycenter.mapper.FunctionalSafetyCenterMapper;
|
||||
/**
|
||||
*
|
||||
*@author liJiaRao
|
||||
*@date 2024-06-12 15:13
|
||||
*/
|
||||
@Service
|
||||
public class FunctionalSafetyCenterService extends ServiceImpl<FunctionalSafetyCenterMapper, FunctionalSafetyCenter> {
|
||||
public void add(FunctionalSafetyCenter functionalSafetyCenter) {
|
||||
this.save(functionalSafetyCenter);
|
||||
}
|
||||
|
||||
public void editById(FunctionalSafetyCenter functionalSafetyCenter) {
|
||||
this.updateById(functionalSafetyCenter);
|
||||
}
|
||||
|
||||
public void deleteById(String id) {
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
public void deleteByIds(List<String> idList) {
|
||||
for (String id : idList) {
|
||||
deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
public FunctionalSafetyCenter queryById(String id) {
|
||||
FunctionalSafetyCenter functionalSafetyCenter = this.getById(id);
|
||||
return functionalSafetyCenter;
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.jero.functionalsafetycenter.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.functionalsafetycenter.entity.FunctionalSafetyCenterSubitemContacts;
|
||||
import com.jero.functionalsafetycenter.mapper.FunctionalSafetyCenterSubitemContactsMapper;
|
||||
/**
|
||||
*
|
||||
*@author liJiaRao
|
||||
*@date 2024-06-12 15:13
|
||||
*/
|
||||
@Service
|
||||
public class FunctionalSafetyCenterSubitemContactsService extends ServiceImpl<FunctionalSafetyCenterSubitemContactsMapper, FunctionalSafetyCenterSubitemContacts> {
|
||||
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.jero.functionalsafetycenter.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.functionalsafetycenter.mapper.FunctionalSafetyCenterSubitemMapper;
|
||||
import com.jero.functionalsafetycenter.entity.FunctionalSafetyCenterSubitem;
|
||||
/**
|
||||
*
|
||||
*@author liJiaRao
|
||||
*@date 2024-06-12 15:13
|
||||
*/
|
||||
@Service
|
||||
public class FunctionalSafetyCenterSubitemService extends ServiceImpl<FunctionalSafetyCenterSubitemMapper, FunctionalSafetyCenterSubitem> {
|
||||
public void add(FunctionalSafetyCenterSubitem functionalSafetyCenterSubitem) {
|
||||
this.save(functionalSafetyCenterSubitem);
|
||||
}
|
||||
|
||||
public void editById(FunctionalSafetyCenterSubitem functionalSafetyCenterSubitem) {
|
||||
this.updateById(functionalSafetyCenterSubitem);
|
||||
}
|
||||
|
||||
public void deleteById(String id) {
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
public void deleteByIds(List<String> idList) {
|
||||
for (String id : idList) {
|
||||
deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
public FunctionalSafetyCenterSubitem queryById(String id) {
|
||||
FunctionalSafetyCenterSubitem functionalSafetyCenterSubitem = this.getById(id);
|
||||
return functionalSafetyCenterSubitem;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user