diff --git a/laws-modules/src/main/java/com/jero/modules/laws/bindPart/controller/LawsBindPartController.java b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/controller/LawsBindPartController.java new file mode 100644 index 00000000..464dd2ed --- /dev/null +++ b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/controller/LawsBindPartController.java @@ -0,0 +1,126 @@ +package com.jero.modules.laws.bindPart.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jero.common.api.vo.Result; +import com.jero.common.api.vo.ResultCommon; +import com.jero.common.aspect.annotation.AutoLog; +import com.jero.common.aspect.annotation.DictPoint; +import com.jero.common.exception.JeroBootException; +import com.jero.common.util.MessageUtils; +import com.jero.modules.laws.bindPart.entity.LawsBindPart; +import com.jero.modules.laws.bindPart.service.ILawsBindPartService; +import com.jero.modules.laws.common.service.ILawsCommonService; +import com.jero.modules.laws.common.vo.LawsDictModel; +import com.jero.modules.laws.common.vo.ManyStandardSelectionBox; +import com.jero.modules.laws.common.vo.ManyStandardSelectionBoxVO; +import com.jero.modules.laws.enterprise.entity.EnterpriseStandardInspectContent; +import com.jero.modules.laws.enterprise.entity.dto.ESQueryCommonDTO; +import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardDeclareVo; +import com.jero.modules.split.entity.SarFileSplitInfoEO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.ss.formula.functions.T; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +@Slf4j +@Api(tags="绑定零部件") +@RestController +@RequestMapping("/laws/bindPart") +public class LawsBindPartController { + + @Autowired + private ILawsBindPartService lawsBindPartService; + + /** + * 分页列表查询 + * + * @return + */ + @RequiresPermissions("enterpriseStandardLibrary:publicize:search") + @AutoLog(value = "绑定零部件-分页列表查询") + @ApiOperation(value="绑定零部件-分页列表查询", notes="绑定零部件-分页列表查询") + @GetMapping(value = "/page") + public Result> queryPageList(LawsBindPart lawsBindPart, + @RequestParam(name="pageNo", defaultValue="1") @ApiParam("页码") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") @ApiParam("页面显示数量") Integer pageSize, + HttpServletRequest req) { + IPage pageList= lawsBindPartService.queryPage(lawsBindPart, pageNo, pageSize, req); + return Result.OK(pageList); + } + + + /** + * 添加 + * + * @param lawsBindPart + * @return + */ + @AutoLog(value = "绑定零部件-添加") + @ApiOperation(value="绑定零部件-添加", notes="绑定零部件-添加") + @PostMapping(value = "/add") + public Result add(@Validated @RequestBody LawsBindPart lawsBindPart) { + lawsBindPartService.add(lawsBindPart); + return Result.OK("操作成功!"); + } + + /** + * 编辑 + * + * @param lawsBindPart + * @return + */ + @AutoLog(value = "绑定零部件-编辑") + @ApiOperation(value="绑定零部件-编辑", notes="绑定零部件-编辑") + @PostMapping(value = "/edit") + public Result edit(@Validated @RequestBody LawsBindPart lawsBindPart) { + lawsBindPartService.editById(lawsBindPart); + return Result.OK("操作成功!"); + } + + /** + * 通过id删除 + * + * @param map + * @return + */ + @AutoLog(value = "绑定零部件-通过id删除") + @ApiOperation(value="绑定零部件-通过id删除", notes="绑定零部件-通过id删除") + @PostMapping(value = "/delete") + public Result delete(@RequestBody Map map) { + if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){ + return Result.error("请选择数据!"); + } + lawsBindPartService.deleteById(map.get("id")); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param map + * @return + */ + @AutoLog(value = "绑定零部件-批量删除") + @ApiOperation(value="绑定零部件-批量删除", notes="绑定零部件-批量删除") + @PostMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestBody Map map) { + if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){ + return Result.error("请选择数据!"); + } + this.lawsBindPartService.deleteByIds(Arrays.asList(map.get("ids").split(","))); + return Result.OK("批量删除成功!"); + } + +} diff --git a/laws-modules/src/main/java/com/jero/modules/laws/bindPart/entity/LawsBindPart.java b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/entity/LawsBindPart.java new file mode 100644 index 00000000..28165e2e --- /dev/null +++ b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/entity/LawsBindPart.java @@ -0,0 +1,130 @@ +package com.jero.modules.laws.bindPart.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 java.io.Serializable; +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.jero.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * + * @TableName laws_bind_part + */ +@TableName(value ="laws_bind_part") +@Data +public class LawsBindPart implements Serializable { + /** + * 主键ID + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键ID") + private String id; + + /** + * 创建人 + */ + @ApiModelProperty(value = "创建人") + private String createBy; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private Date createTime; + + /** + * 更新人 + */ + @ApiModelProperty(value = "更新人") + private String updateBy; + + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private Date updateTime; + + /** + * 所属部门 + */ + @ApiModelProperty(value = "所属部门") + private String orgCode; + + /** + * 零部件号 + */ + @ApiModelProperty(value = "零部件号") + private String partNo; + + /** + * 零部件名称 + */ + @ApiModelProperty(value = "零部件名称") + private String partName; + + /** + * 零部件标准绑定关系表id + */ + @ApiModelProperty(value = "零部件标准绑定关系表id") + private String sarFileSplitInfoId; + + /** + * 绑定人员 + */ + @ApiModelProperty(value = "绑定人员") + @Dict(dicCode = "id", dictTable = "sys_user", dicText = "realname") + private String bindUser; + + /** + * 绑定时间 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm") + @ApiModelProperty(value = "绑定时间") + private Date bindTime; + + /** + * 文档拆分Id + */ + @ApiModelProperty(value = "文档拆分Id") + @TableField(exist = false) + private String docSplitId; + + /** + * 条款Id + */ + @ApiModelProperty(value = "条款Id(多个逗号拼接)") + @TableField(exist = false) + private String clauseIds; + + /** + * 条款号 + */ + @ApiModelProperty(value = "条款号(多个逗号拼接)") + @TableField(exist = false) + private String clauseNos; + + /** + * 标准编号 + */ + @ApiModelProperty(value = "标准编号") + @TableField(exist = false) + private String standardNo; + + /** + * 标准名称 + */ + @ApiModelProperty(value = "标准名称") + @TableField(exist = false) + private String standardName; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/laws-modules/src/main/java/com/jero/modules/laws/bindPart/entity/LawsBindPartDoc.java b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/entity/LawsBindPartDoc.java new file mode 100644 index 00000000..f94fb872 --- /dev/null +++ b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/entity/LawsBindPartDoc.java @@ -0,0 +1,70 @@ +package com.jero.modules.laws.bindPart.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 java.io.Serializable; +import java.util.Date; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * + * @TableName laws_bind_part_doc + */ +@TableName(value ="laws_bind_part_doc") +@Data +public class LawsBindPartDoc implements Serializable { + /** + * 主键ID + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键ID") + private String id; + + + /**创建人*/ + @ApiModelProperty(value = "创建人") + private String createBy; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private Date createTime; + + /** + * 更新人 + */ + @ApiModelProperty(value = "更新人") + private String updateBy; + + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private Date updateTime; + + /** + * 所属部门 + */ + @ApiModelProperty(value = "所属部门") + private String orgCode; + + /** + * 绑定id + */ + @ApiModelProperty(value = "绑定id") + private String bindId; + + /** + * 条款id + */ + @ApiModelProperty(value = "条款id") + private String docId; + + @TableField(exist = false) + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/laws-modules/src/main/java/com/jero/modules/laws/bindPart/mapper/LawsBindPartDocMapper.java b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/mapper/LawsBindPartDocMapper.java new file mode 100644 index 00000000..abda866b --- /dev/null +++ b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/mapper/LawsBindPartDocMapper.java @@ -0,0 +1,18 @@ +package com.jero.modules.laws.bindPart.mapper; + +import com.jero.modules.laws.bindPart.entity.LawsBindPartDoc; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** +* @author ThinkBook +* @description 针对表【laws_bind_part_doc】的数据库操作Mapper +* @createDate 2024-04-15 11:27:29 +* @Entity com.jero.modules.laws.bindPart.entity.LawsBindPartDoc +*/ +public interface LawsBindPartDocMapper extends BaseMapper { + +} + + + + diff --git a/laws-modules/src/main/java/com/jero/modules/laws/bindPart/mapper/LawsBindPartMapper.java b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/mapper/LawsBindPartMapper.java new file mode 100644 index 00000000..5879f7a7 --- /dev/null +++ b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/mapper/LawsBindPartMapper.java @@ -0,0 +1,22 @@ +package com.jero.modules.laws.bindPart.mapper; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jero.modules.laws.bindPart.entity.LawsBindPart; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardPlanVo; +import org.apache.ibatis.annotations.Param; + +/** +* @author ThinkBook +* @description 针对表【laws_bind_part】的数据库操作Mapper +* @createDate 2024-04-15 11:27:06 +* @Entity com.jero.modules.laws.bindPart.entity.LawsBindPart +*/ +public interface LawsBindPartMapper extends BaseMapper { + + IPage page(IPage page, @Param("param") LawsBindPart lawsBindPart); +} + + + + diff --git a/laws-modules/src/main/java/com/jero/modules/laws/bindPart/mapper/xml/LawsBindPartDocMapper.xml b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/mapper/xml/LawsBindPartDocMapper.xml new file mode 100644 index 00000000..9db3bc9b --- /dev/null +++ b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/mapper/xml/LawsBindPartDocMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + id,create_by,create_time, + update_by,update_time,org_code, + bind_id,doc_id + + diff --git a/laws-modules/src/main/java/com/jero/modules/laws/bindPart/mapper/xml/LawsBindPartMapper.xml b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/mapper/xml/LawsBindPartMapper.xml new file mode 100644 index 00000000..55a63a8f --- /dev/null +++ b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/mapper/xml/LawsBindPartMapper.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + id,create_by,create_time, + update_by,update_time,org_code, + part_no,part_name,standard_id, + bind_user,bind_time + + + + diff --git a/laws-modules/src/main/java/com/jero/modules/laws/bindPart/service/ILawsBindPartDocService.java b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/service/ILawsBindPartDocService.java new file mode 100644 index 00000000..5927e9cc --- /dev/null +++ b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/service/ILawsBindPartDocService.java @@ -0,0 +1,13 @@ +package com.jero.modules.laws.bindPart.service; + +import com.jero.modules.laws.bindPart.entity.LawsBindPartDoc; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author ThinkBook +* @description 针对表【laws_bind_part_doc】的数据库操作Service +* @createDate 2024-04-15 11:27:29 +*/ +public interface ILawsBindPartDocService extends IService { + +} diff --git a/laws-modules/src/main/java/com/jero/modules/laws/bindPart/service/ILawsBindPartService.java b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/service/ILawsBindPartService.java new file mode 100644 index 00000000..8b765886 --- /dev/null +++ b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/service/ILawsBindPartService.java @@ -0,0 +1,78 @@ +package com.jero.modules.laws.bindPart.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jero.modules.laws.bindPart.entity.LawsBindPart; +import com.baomidou.mybatisplus.extension.service.IService; +import com.jero.modules.laws.system.entity.LawsContactManage; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +/** +* @author ThinkBook +* @description 针对表【laws_bind_part】的数据库操作Service +* @createDate 2024-04-15 11:27:06 +*/ +public interface ILawsBindPartService extends IService { + + /** + * 分页查询 + * + * @param lawsBindPart + * @param pageNo + * @param pageSize + * @param req + * @return + */ + IPage queryPage(LawsBindPart lawsBindPart, Integer pageNo, Integer pageSize, HttpServletRequest req); + + /** + * 列表查询 + * + * @param lawsBindPart + * @param req + * @return + */ + List queryList(LawsBindPart lawsBindPart, HttpServletRequest req); + + /** + * 保存 + * + * @param lawsBindPart + * @return + */ + void add(LawsBindPart lawsBindPart); + + /** + * 更新 + * + * @param lawsBindPart + * @return + */ + void editById(LawsBindPart lawsBindPart); + + /** + * 通过id删除 + * + * @param id + * @return + */ + void deleteById(String id); + + /** + * 批量删除 + * + * @param ids + * @return + */ + void deleteByIds(List ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + LawsBindPart queryById(String id); + +} diff --git a/laws-modules/src/main/java/com/jero/modules/laws/bindPart/service/impl/LawsBindPartDocServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/service/impl/LawsBindPartDocServiceImpl.java new file mode 100644 index 00000000..c0eff358 --- /dev/null +++ b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/service/impl/LawsBindPartDocServiceImpl.java @@ -0,0 +1,22 @@ +package com.jero.modules.laws.bindPart.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jero.modules.laws.bindPart.entity.LawsBindPartDoc; +import com.jero.modules.laws.bindPart.service.ILawsBindPartDocService; +import com.jero.modules.laws.bindPart.mapper.LawsBindPartDocMapper; +import org.springframework.stereotype.Service; + +/** +* @author ThinkBook +* @description 针对表【laws_bind_part_doc】的数据库操作Service实现 +* @createDate 2024-04-15 11:27:29 +*/ +@Service +public class LawsBindPartDocServiceImpl extends ServiceImpl + implements ILawsBindPartDocService { + +} + + + + diff --git a/laws-modules/src/main/java/com/jero/modules/laws/bindPart/service/impl/LawsBindPartServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/service/impl/LawsBindPartServiceImpl.java new file mode 100644 index 00000000..b07db727 --- /dev/null +++ b/laws-modules/src/main/java/com/jero/modules/laws/bindPart/service/impl/LawsBindPartServiceImpl.java @@ -0,0 +1,71 @@ +package com.jero.modules.laws.bindPart.service.impl; + +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.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jero.common.system.query.QueryGenerator; +import com.jero.modules.laws.bindPart.entity.LawsBindPart; +import com.jero.modules.laws.bindPart.service.ILawsBindPartService; +import com.jero.modules.laws.bindPart.mapper.LawsBindPartMapper; +import com.jero.modules.laws.enterprise.entity.vo.EnterpriseStandardPlanVo; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +/** +* @author ThinkBook +* @description 针对表【laws_bind_part】的数据库操作Service实现 +* @createDate 2024-04-15 11:27:06 +*/ +@Service +public class LawsBindPartServiceImpl extends ServiceImpl + implements ILawsBindPartService { + + @Resource + private LawsBindPartMapper lawsBindPartMapper; + + @Override + public IPage queryPage(LawsBindPart lawsBindPart, Integer pageNo, Integer pageSize, HttpServletRequest req) { + IPage page = new Page<>(pageNo, pageSize); + lawsBindPartMapper.page(page, lawsBindPart); + return page; + } + + @Override + public List queryList(LawsBindPart lawsBindPart, HttpServletRequest req) { + return null; + } + + @Override + public void add(LawsBindPart lawsBindPart) { + save(lawsBindPart); + } + + @Override + public void editById(LawsBindPart lawsBindPart) { + updateById(lawsBindPart); + } + + @Override + public void deleteById(String id) { + removeById(id); + } + + @Override + public void deleteByIds(List ids) { + removeByIds(ids); + } + + @Override + public LawsBindPart queryById(String id) { + return getById(id); + } + +} + + + +