diff --git a/hzims-service-api/basic-api/pom.xml b/hzims-service-api/basic-api/pom.xml
new file mode 100644
index 0000000..ab3c5b0
--- /dev/null
+++ b/hzims-service-api/basic-api/pom.xml
@@ -0,0 +1,13 @@
+
+
+
+ hzims-service-api
+ com.hnac.hzims
+ 4.0.0-SNAPSHOT
+
+ 4.0.0
+ basic-api
+ jar
+
diff --git a/hzims-service-api/basic-api/src/main/java/com/hnac/hzims/basic/constants/BasicConstants.java b/hzims-service-api/basic-api/src/main/java/com/hnac/hzims/basic/constants/BasicConstants.java
new file mode 100644
index 0000000..b317c7b
--- /dev/null
+++ b/hzims-service-api/basic-api/src/main/java/com/hnac/hzims/basic/constants/BasicConstants.java
@@ -0,0 +1,11 @@
+package com.hnac.hzims.basic.constants;
+
+/**
+ * @author ysj
+ */
+public interface BasicConstants {
+
+ String APP_NAME = "hzims-basic";
+
+
+}
diff --git a/hzims-service-api/basic-api/src/main/java/com/hnac/hzims/basic/entity/CertificatetEntity.java b/hzims-service-api/basic-api/src/main/java/com/hnac/hzims/basic/entity/CertificatetEntity.java
new file mode 100644
index 0000000..79b29ce
--- /dev/null
+++ b/hzims-service-api/basic-api/src/main/java/com/hnac/hzims/basic/entity/CertificatetEntity.java
@@ -0,0 +1,59 @@
+package com.hnac.hzims.basic.entity;
+
+import com.baomidou.mybatisplus.annotation.SqlCondition;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.support.QueryField;
+import org.springblade.core.tenant.mp.TenantEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+
+/**
+ * 实体类
+ * @author Chill
+ */
+@Data
+@TableName("hzims_certificatet")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "档案管理表", description = "档案管理表")
+public class CertificatetEntity extends TenantEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 用户ID
+ */
+ @ApiModelProperty(value = "用户ID")
+ @QueryField(condition = SqlCondition.EQUAL)
+ private String personId;
+ /**
+ * 档案类型
+ */
+ @ApiModelProperty(value = "档案类型")
+ @QueryField(condition = SqlCondition.LIKE)
+ private String type;
+ /**
+ * 到期时间
+ */
+ @DateTimeFormat(
+ pattern = "yyyy-MM-dd HH:mm:ss"
+ )
+ @JsonFormat(
+ pattern = "yyyy-MM-dd HH:mm:ss"
+ )
+ @ApiModelProperty(value = "到期时间")
+ private Date deadTime;
+ /**
+ * 图片地址
+ */
+ @ApiModelProperty(value = "图片地址")
+ private String pic;
+
+
+}
diff --git a/hzims-service-api/basic-api/src/main/java/com/hnac/hzims/basic/entity/PersonManagemetEntity.java b/hzims-service-api/basic-api/src/main/java/com/hnac/hzims/basic/entity/PersonManagemetEntity.java
new file mode 100644
index 0000000..7dec2fa
--- /dev/null
+++ b/hzims-service-api/basic-api/src/main/java/com/hnac/hzims/basic/entity/PersonManagemetEntity.java
@@ -0,0 +1,68 @@
+package com.hnac.hzims.basic.entity;
+
+import com.baomidou.mybatisplus.annotation.SqlCondition;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.support.QueryField;
+import org.springblade.core.tenant.mp.TenantEntity;
+
+
+/**
+ * 实体类
+ * @author Chill
+ */
+@Data
+@TableName("hzims_person_managemet")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "人员管理表", description = "人员管理表")
+public class PersonManagemetEntity extends TenantEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 用户ID
+ */
+ @ApiModelProperty(value = "用户ID")
+ @QueryField(condition = SqlCondition.EQUAL)
+ private String userId;
+ /**
+ * 用户名称
+ */
+ @ApiModelProperty(value = "用户名称")
+ @QueryField(condition = SqlCondition.LIKE)
+ private String name;
+ /**
+ * 单位名称
+ */
+ @ApiModelProperty(value = "单位名称")
+ @QueryField(condition = SqlCondition.LIKE)
+ private String unitName;
+ /**
+ * 性别
+ */
+ @ApiModelProperty(value = "性别")
+ @QueryField(condition = SqlCondition.EQUAL)
+ private String sex;
+ /**
+ * 性别
+ */
+ @ApiModelProperty(value = "职位")
+ @QueryField(condition = SqlCondition.EQUAL)
+ private String job;
+ /**
+ * 职称
+ */
+ @ApiModelProperty(value = "职称")
+ @QueryField(condition = SqlCondition.EQUAL)
+ private String academicTitle;
+ /**
+ * 电话号码
+ */
+ @ApiModelProperty(value = "电话号码")
+ @QueryField(condition = SqlCondition.EQUAL)
+ private String phone;
+
+}
diff --git a/hzims-service-api/basic-api/src/main/java/com/hnac/hzims/basic/vo/PersonManagemetVo.java b/hzims-service-api/basic-api/src/main/java/com/hnac/hzims/basic/vo/PersonManagemetVo.java
new file mode 100644
index 0000000..ef5fdef
--- /dev/null
+++ b/hzims-service-api/basic-api/src/main/java/com/hnac/hzims/basic/vo/PersonManagemetVo.java
@@ -0,0 +1,87 @@
+package com.hnac.hzims.basic.vo;
+
+import com.baomidou.mybatisplus.annotation.SqlCondition;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.hnac.hzims.basic.entity.CertificatetEntity;
+import com.hnac.hzims.basic.entity.PersonManagemetEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.support.QueryField;
+import org.springblade.core.tenant.mp.TenantEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * 实体类
+ * @author Chill
+ */
+@Data
+@ApiModel(value = "档案管理实体类",description = "档案管理实体类")
+public class PersonManagemetVo extends PersonManagemetEntity {
+
+ private static final long serialVersionUID = 1L;
+ /**
+ * 用户ID
+ */
+ @ApiModelProperty(value = "用户ID")
+ @QueryField(condition = SqlCondition.EQUAL)
+ private String personId;
+ /**
+ * 档案类型
+ */
+ @ApiModelProperty(value = "档案类型")
+ @QueryField(condition = SqlCondition.LIKE)
+ private String type;
+ /**
+ * 到期开始时间
+ */
+ @DateTimeFormat(
+ pattern = "yyyy-MM-dd HH:mm:ss"
+ )
+ @JsonFormat(
+ pattern = "yyyy-MM-dd HH:mm:ss"
+ )
+ @ApiModelProperty(value = "到期开始时间")
+ private Date deadStartTime;
+ /**
+ * 到期时间
+ */
+ @DateTimeFormat(
+ pattern = "yyyy-MM-dd HH:mm:ss"
+ )
+ @JsonFormat(
+ pattern = "yyyy-MM-dd HH:mm:ss"
+ )
+ @ApiModelProperty(value = "到期时间")
+ private Date deadTime;
+ /**
+ * 图片地址
+ */
+ @ApiModelProperty(value = "图片地址")
+ private String pic;
+
+ /**
+ * 档案编号
+ */
+ @ApiModelProperty(value = "档案编号")
+ private List certificatetIds;
+ /**
+ * 用户ID
+ */
+ @ApiModelProperty(value = "用户IDs")
+ private List personIds;
+ /**
+ * 档案
+ */
+ @ApiModelProperty(value = "档案")
+ private List certificatetEntityList;
+
+}
diff --git a/hzims-service-api/pom.xml b/hzims-service-api/pom.xml
index 531ec3f..745a48f 100644
--- a/hzims-service-api/pom.xml
+++ b/hzims-service-api/pom.xml
@@ -19,6 +19,7 @@
topvision-api
equipment-api
+ basic-api
safeproduct-api
hzims-operational-api
inspect-api
diff --git a/hzims-service/hzims-basic/pom.xml b/hzims-service/hzims-basic/pom.xml
new file mode 100644
index 0000000..a542199
--- /dev/null
+++ b/hzims-service/hzims-basic/pom.xml
@@ -0,0 +1,173 @@
+
+
+
+ com.hnac.hzims
+ hzims-service
+ 4.0.0-SNAPSHOT
+
+ 4.0.0
+ hzims-basic
+ jar
+
+
+ 1.8
+ UTF-8
+ UTF-8
+ 2.6.13
+ 1.9.6
+
+
+
+
+ org.springblade
+ blade-common
+
+
+
+ org.springblade
+ blade-core-boot
+
+
+ org.springblade
+ blade-starter-redis
+
+
+
+
+
+
+ org.springblade
+ blade-starter-redis
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ io.lettuce
+ lettuce-core
+
+
+
+
+
+
+ redis.clients
+ jedis
+
+
+
+ org.springblade
+ blade-starter-swagger
+
+
+ org.springblade
+ blade-core-test
+ test
+
+
+ org.springblade
+ blade-core-auto
+ provided
+
+
+
+ org.springframework.boot
+ spring-boot-starter-websocket
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+
+
+
+ org.java-websocket
+ Java-WebSocket
+
+
+
+ com.baomidou
+ mybatis-plus-generator
+
+
+
+
+ org.apache.velocity
+ velocity-engine-core
+ 2.2
+
+
+
+
+
+ com.github.xiaoymin
+ swagger-bootstrap-ui
+ ${swagger-bootstrap-ui.version}
+
+
+ com.hnac.hzims
+ alarm-api
+ 4.0.0-SNAPSHOT
+ compile
+
+
+ com.hnac.hzims
+ basic-api
+ 4.0.0-SNAPSHOT
+ compile
+
+
+ com.hnac.hzims
+ equipment-api
+
+
+ com.hnac.hzims
+ hzims-operational-api
+
+
+ com.hnac.hzims
+ message-api
+
+
+ com.xuxueli
+ xxl-job-core
+
+
+ org.eclipse.paho
+ org.eclipse.paho.client.mqttv3
+
+
+
+
+ ${project.name}-${project.version}
+
+
+ com.spotify
+ dockerfile-maven-plugin
+
+ ${docker.username}
+ ${docker.password}
+ ${docker.registry.url}/${docker.namespace}/${project.artifactId}
+ ${project.version}
+ true
+
+ target/${project.build.finalName}.jar
+
+ false
+
+
+
+
+
diff --git a/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/BasicApplication.java b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/BasicApplication.java
new file mode 100644
index 0000000..3962111
--- /dev/null
+++ b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/BasicApplication.java
@@ -0,0 +1,32 @@
+package com.hnac.hzims.basic;
+
+import com.hnac.hzims.basic.constants.BasicConstants;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springblade.core.cloud.feign.EnableBladeFeign;
+import org.springblade.core.launch.BladeApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+import org.springframework.cloud.client.SpringCloudApplication;
+import org.springframework.context.annotation.ComponentScan;
+
+import javax.annotation.Resource;
+
+/**
+ * @author ty
+ */
+@EnableBladeFeign
+@SpringCloudApplication
+@MapperScan("com.hnac.hzims.**.mapper.**")
+@ComponentScan(basePackages = {"com.hnac.hzims.basic.*"})
+@Resource
+public class BasicApplication extends SpringBootServletInitializer {
+ public static void main(String[] args) {
+ BladeApplication.run(BasicConstants.APP_NAME, BasicApplication.class, args);
+}
+
+ @Override
+ protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
+ return BladeApplication.createSpringApplicationBuilder(builder, BasicConstants.APP_NAME, BasicApplication.class);
+ }
+
+}
diff --git a/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/controller/PresonManagementController.java b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/controller/PresonManagementController.java
new file mode 100644
index 0000000..c68768d
--- /dev/null
+++ b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/controller/PresonManagementController.java
@@ -0,0 +1,87 @@
+package com.hnac.hzims.basic.controller;
+
+import com.alibaba.spring.util.BeanUtils;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.hnac.hzims.basic.entity.PersonManagemetEntity;
+import com.hnac.hzims.basic.service.IImsPresonManagementService;
+import com.hnac.hzims.basic.vo.PersonManagemetVo;
+import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
+import com.hnac.hzims.common.logs.enums.BusinessType;
+import com.hnac.hzims.common.logs.enums.OperatorType;
+import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.CollectionUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
+
+
+/**
+ * 控制器
+ *
+ * @author Chill
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/presonManagement")
+@Api(value = "人员档案", tags = "人员档案页面")
+public class PresonManagementController extends BladeController {
+
+ private final IImsPresonManagementService iImsPresonManagementService;
+
+ /**
+ * 分页 代码自定义代号
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入imsDutyClass")
+ @OperationAnnotation(moduleName = "档案管理",title = "档案管理",operatorType = OperatorType.MOBILE,businessType =
+ BusinessType.GENCODE,action
+ = "档案管理")
+ public R> list(PersonManagemetVo personManagemetVo, Query query) {
+ IPage page=iImsPresonManagementService.getPersonManagemetEntity(personManagemetVo,query);
+ return R.data(page);
+ }
+
+ /**
+ * 新增或修改
+ */
+ @PostMapping ("/submit")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "增加", notes = "传入imsDutyClass")
+ public R submit(@RequestBody PersonManagemetVo personManagemetVo) {
+ Boolean submit = iImsPresonManagementService.submit(personManagemetVo);
+ if (submit){
+ return R.success("保存成功");
+ }
+ return R.fail("保存失败");
+ }
+
+ /**
+ * 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "删除", notes = "传入imsDutyClass")
+ public R remove(@RequestBody PersonManagemetVo personManagemetVo) {
+ Boolean flag = iImsPresonManagementService.removeByPersonManagemetVo(personManagemetVo);
+ if (flag){
+ return R.success("删除成功");
+ }
+ return R.fail("删除失败");
+ }
+
+
+}
diff --git a/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/CertificatetMapper.java b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/CertificatetMapper.java
new file mode 100644
index 0000000..79c2c5b
--- /dev/null
+++ b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/CertificatetMapper.java
@@ -0,0 +1,15 @@
+package com.hnac.hzims.basic.mapper;
+
+import com.hnac.hzims.basic.entity.CertificatetEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
+
+/**
+ * Mapper 接口
+ *
+ * @author Chill
+ */
+@Mapper
+public interface CertificatetMapper extends UserDataScopeBaseMapper {
+
+}
diff --git a/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/CertificatetMapper.xml b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/CertificatetMapper.xml
new file mode 100644
index 0000000..d12ecfc
--- /dev/null
+++ b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/CertificatetMapper.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/PersonManagemetMapper.java b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/PersonManagemetMapper.java
new file mode 100644
index 0000000..708bb7f
--- /dev/null
+++ b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/PersonManagemetMapper.java
@@ -0,0 +1,30 @@
+package com.hnac.hzims.basic.mapper;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.hnac.hzims.basic.entity.PersonManagemetEntity;
+import com.hnac.hzims.basic.vo.PersonManagemetVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Mapper 接口
+ *
+ * @author Chill
+ */
+@Mapper
+public interface PersonManagemetMapper extends UserDataScopeBaseMapper {
+
+ List getPersonManagemetEntity(
+ @Param(value = "type")String type, @Param(value = "deadStartTime") Date deadStartTime, @Param(value = "deadTime")Date deadTime,
+ @Param(value = "name")String name, @Param(value = "unitName")String unitName, @Param(value = "sex")String sex, @Param(value = "job")String job,
+ @Param(value = "academicTitle")String academicTitle, @Param(value = "status")Integer status, @Param(value = "current")Integer current, @Param(value = "size")Integer size) ;
+ Integer getCountByPersonManagemetEntity(
+ @Param(value = "type")String type, @Param(value = "deadStartTime") Date deadStartTime, @Param(value = "deadTime")Date deadTime,
+ @Param(value = "name")String name, @Param(value = "unitName")String unitName, @Param(value = "sex")String sex, @Param(value = "job")String job,
+ @Param(value = "academicTitle")String academicTitle, @Param(value = "status")Integer status, @Param(value = "current")Integer current, @Param(value = "size")Integer size) ;
+
+}
diff --git a/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/PersonManagemetMapper.xml b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/PersonManagemetMapper.xml
new file mode 100644
index 0000000..3a4091e
--- /dev/null
+++ b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/PersonManagemetMapper.xml
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/IImsCertificatetService.java b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/IImsCertificatetService.java
new file mode 100644
index 0000000..5042f15
--- /dev/null
+++ b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/IImsCertificatetService.java
@@ -0,0 +1,13 @@
+package com.hnac.hzims.basic.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.hnac.hzims.basic.entity.CertificatetEntity;
+
+/**
+ * 服务类
+ *
+ * @author Chill
+ */
+public interface IImsCertificatetService extends IService {
+}
diff --git a/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/IImsPresonManagementService.java b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/IImsPresonManagementService.java
new file mode 100644
index 0000000..928b01d
--- /dev/null
+++ b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/IImsPresonManagementService.java
@@ -0,0 +1,21 @@
+package com.hnac.hzims.basic.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.hnac.hzims.basic.entity.PersonManagemetEntity;
+import com.hnac.hzims.basic.vo.PersonManagemetVo;
+import org.springblade.core.mp.support.Query;
+
+/**
+ * 服务类
+ *
+ * @author Chill
+ */
+public interface IImsPresonManagementService extends IService {
+
+ IPage getPersonManagemetEntity(PersonManagemetVo personManagemetVo, Query query);
+
+ Boolean submit(PersonManagemetVo personManagemetVo);
+
+ Boolean removeByPersonManagemetVo(PersonManagemetVo personManagemetVo);
+}
diff --git a/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/impl/CertificatetServiceImpl.java b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/impl/CertificatetServiceImpl.java
new file mode 100644
index 0000000..bbd8081
--- /dev/null
+++ b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/impl/CertificatetServiceImpl.java
@@ -0,0 +1,21 @@
+package com.hnac.hzims.basic.service.impl;
+
+import com.hnac.hzims.basic.entity.CertificatetEntity;
+import com.hnac.hzims.basic.mapper.CertificatetMapper;
+import com.hnac.hzims.basic.service.IImsCertificatetService;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+
+
+
+/**
+ * 证书实现类
+ * @author ty
+ */
+@Service
+@Slf4j
+@RequiredArgsConstructor
+public class CertificatetServiceImpl extends BaseServiceImpl implements IImsCertificatetService {
+}
diff --git a/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/impl/PresonManagementServiceImpl.java b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/impl/PresonManagementServiceImpl.java
new file mode 100644
index 0000000..1149df8
--- /dev/null
+++ b/hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/impl/PresonManagementServiceImpl.java
@@ -0,0 +1,124 @@
+package com.hnac.hzims.basic.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.hnac.hzims.basic.entity.CertificatetEntity;
+import com.hnac.hzims.basic.entity.PersonManagemetEntity;
+import com.hnac.hzims.basic.mapper.PersonManagemetMapper;
+import com.hnac.hzims.basic.service.IImsCertificatetService;
+import com.hnac.hzims.basic.service.IImsPresonManagementService;
+import com.hnac.hzims.basic.vo.PersonManagemetVo;
+import com.hnac.hzims.common.logs.utils.StringUtils;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.CollectionUtil;
+import org.springblade.core.tool.utils.ObjectUtil;
+import org.springblade.system.feign.ISysClient;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import java.util.List;
+import java.util.stream.Collectors;
+
+
+/**
+ * 人员信息实现类
+ *
+ * @author ty
+ */
+@Service
+@Slf4j
+@RequiredArgsConstructor
+public class PresonManagementServiceImpl extends BaseServiceImpl implements IImsPresonManagementService {
+
+
+ private ISysClient sysClient;
+ private final IImsCertificatetService certificatetService;
+
+
+ @Override
+ public IPage getPersonManagemetEntity(PersonManagemetVo personManagemetVo, Query query) {
+ List personManagemetEntity = baseMapper.getPersonManagemetEntity(personManagemetVo.getType(), personManagemetVo.getDeadStartTime(), personManagemetVo.getDeadTime(),
+ personManagemetVo.getName(), personManagemetVo.getUnitName(), personManagemetVo.getSex(), personManagemetVo.getJob(),
+ personManagemetVo.getAcademicTitle(), personManagemetVo.getStatus(), query.getCurrent(), query.getSize());
+ Integer count = baseMapper.getCountByPersonManagemetEntity(personManagemetVo.getType(), personManagemetVo.getDeadStartTime(), personManagemetVo.getDeadTime(),
+ personManagemetVo.getName(), personManagemetVo.getUnitName(), personManagemetVo.getSex(), personManagemetVo.getJob(),
+ personManagemetVo.getAcademicTitle(), personManagemetVo.getStatus(), query.getCurrent(), query.getSize());
+ IPage res = new Page<>();
+ res.setCurrent(query.getCurrent());
+ res.setSize(query.getSize());
+ res.setTotal(Long.valueOf(count));
+ res.setRecords(personManagemetEntity);
+ return res;
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public Boolean submit(PersonManagemetVo personManagemetVo) {
+ try {
+ if (ObjectUtil.isNotEmpty(personManagemetVo)) {
+ PersonManagemetEntity personManagemetEntity = new PersonManagemetEntity();
+ BeanUtil.copy(personManagemetVo, personManagemetEntity);
+ if (StringUtils.isBlank(personManagemetEntity.getUnitName())){
+ String deptId = AuthUtil.getDeptId();
+ R deptName = sysClient.getDeptName(Long.valueOf(deptId));
+ if (deptName.isSuccess()&&StringUtils.isBlank(deptName.getData())){
+ personManagemetEntity.setUnitName(deptName.getData());
+ }
+ }
+ if (ObjectUtil.isNotEmpty(personManagemetEntity)) {
+ this.saveOrUpdate(personManagemetEntity);
+ }
+ if (CollectionUtil.isNotEmpty(personManagemetVo.getCertificatetEntityList())) {
+ List certificatetList = personManagemetVo.getCertificatetEntityList().stream().map(
+ s -> {
+ s.setPersonId(personManagemetEntity.getId().toString());
+ if (System.currentTimeMillis() > s.getDeadTime().getTime()){
+ s.setStatus(2);
+ }else {
+ s.setStatus(1);
+ }
+ return s;
+ }
+ ).collect(Collectors.toList());
+ certificatetService.saveOrUpdateBatch(certificatetList);
+ }
+ return true;
+ }
+ return false;
+ } catch (Exception e) {
+ log.error("入参 personManagemetVo" + personManagemetVo + ":" + e);
+ return false;
+ }
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public Boolean removeByPersonManagemetVo(PersonManagemetVo personManagemetVo) {
+ try {
+ if (ObjectUtil.isNotEmpty(personManagemetVo)) {
+ if (ObjectUtil.isNotEmpty(personManagemetVo.getPersonIds())) {
+ this.removeByIds(personManagemetVo.getPersonIds());
+ certificatetService.remove(new LambdaQueryWrapper() {{
+ in(CertificatetEntity::getPersonId, personManagemetVo.getPersonIds());
+ }});
+ }
+ if (CollectionUtil.isNotEmpty(personManagemetVo.getCertificatetIds())) {
+ certificatetService.removeByIds(personManagemetVo.getCertificatetIds());
+ }
+ return true;
+ }
+ return false;
+ } catch (Exception e) {
+ log.error("removeByPersonManagemetVo 入参 personManagemetVo" + personManagemetVo + ":" + e);
+ return false;
+ }
+ }
+
+
+}
diff --git a/hzims-service/hzims-basic/src/main/resources/application.yml b/hzims-service/hzims-basic/src/main/resources/application.yml
new file mode 100644
index 0000000..71b4cf6
--- /dev/null
+++ b/hzims-service/hzims-basic/src/main/resources/application.yml
@@ -0,0 +1,41 @@
+#服务器端口
+server:
+ port: 8430
+
+
+#数据源配置
+spring:
+ main:
+ allow-bean-definition-overriding: true
+ #排除DruidDataSourceAutoConfigure
+ autoconfigure:
+ exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
+ datasource:
+ url: jdbc:mysql://192.168.60.34:3576/hzims_basic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+ username: hzinfo
+ password: 1qaz2WSX!
+
+
+#mybatis-plus配置
+mybatis-plus:
+ mapper-locations: classpath:com/hnac/hzims/**/mapper/*Mapper.xml
+ #实体扫描,多个package用逗号或者分号分隔
+ typeAliasesPackage: com.hnac.hzims.**.entity
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+#swagger扫描路径配置
+swagger:
+ base-packages:
+ - org.springbalde
+ - com.hnac
+
+blade:
+ data-scope:
+ enabled: false
+ lock:
+ enabled: true
+ address: redis://192.168.1.20:3577
+ password: 1qaz2WSX@redis
+ database: 0
+ ssl: false
diff --git a/hzims-service/hzims-basic/src/main/resources/bootstrap.yml b/hzims-service/hzims-basic/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..0abf99a
--- /dev/null
+++ b/hzims-service/hzims-basic/src/main/resources/bootstrap.yml
@@ -0,0 +1,7 @@
+spring:
+ cloud:
+ nacos:
+ discovery:
+ server-addr: 175.6.40.67:10042
+
+
diff --git a/hzims-service/hzims-basic/src/test/java/com/hnac/hzims/basic/BasicApplicationTests.java b/hzims-service/hzims-basic/src/test/java/com/hnac/hzims/basic/BasicApplicationTests.java
new file mode 100644
index 0000000..97918a4
--- /dev/null
+++ b/hzims-service/hzims-basic/src/test/java/com/hnac/hzims/basic/BasicApplicationTests.java
@@ -0,0 +1,15 @@
+package com.hnac.hzims.basic;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest(classes = BasicApplication.class)
+class BasicApplicationTests {
+
+ @Test
+ void contextLoads() {
+
+ System.out.println("1");
+ }
+
+}
diff --git a/hzims-service/pom.xml b/hzims-service/pom.xml
index 9b2d8ca..05c9914 100644
--- a/hzims-service/pom.xml
+++ b/hzims-service/pom.xml
@@ -27,6 +27,7 @@
hzims-middle
hzims-scheduled
hzims-alarm
+ hzims-basic
diff --git a/pom.xml b/pom.xml
index edc678b..9997f99 100644
--- a/pom.xml
+++ b/pom.xml
@@ -93,6 +93,11 @@
com.hnac.hzims
+ basic-api
+ ${hzims.project.version}
+
+
+ com.hnac.hzims
hzims-operational-api
${hzims.project.version}