diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntEmEquipmentMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntEmEquipmentMapper.java new file mode 100644 index 0000000..6c9db87 --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntEmEquipmentMapper.java @@ -0,0 +1,16 @@ +package com.rzyc.mapper; + +import com.rzyc.model.EntEmEquipment; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 企业应急资源表 Mapper 接口 + *

+ * + * @author + * @since 2022-11-09 + */ +public interface EntEmEquipmentMapper extends BaseMapper { + +} diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntEmExpertMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntEmExpertMapper.java new file mode 100644 index 0000000..3b7a8e8 --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntEmExpertMapper.java @@ -0,0 +1,16 @@ +package com.rzyc.mapper; + +import com.rzyc.model.EntEmExpert; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 企业应急专家 Mapper 接口 + *

+ * + * @author + * @since 2022-11-09 + */ +public interface EntEmExpertMapper extends BaseMapper { + +} diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntEmRehearsalMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntEmRehearsalMapper.java new file mode 100644 index 0000000..4e190cb --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntEmRehearsalMapper.java @@ -0,0 +1,16 @@ +package com.rzyc.mapper; + +import com.rzyc.model.EntEmRehearsal; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 应急演练 Mapper 接口 + *

+ * + * @author + * @since 2022-11-09 + */ +public interface EntEmRehearsalMapper extends BaseMapper { + +} diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/EntEmReservePlanMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/EntEmReservePlanMapper.java new file mode 100644 index 0000000..6b36779 --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/mapper/EntEmReservePlanMapper.java @@ -0,0 +1,16 @@ +package com.rzyc.mapper; + +import com.rzyc.model.EntEmReservePlan; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 企业应急预警 Mapper 接口 + *

+ * + * @author + * @since 2022-11-09 + */ +public interface EntEmReservePlanMapper extends BaseMapper { + +} diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntEmEquipment.java b/inventory-dao/src/main/java/com/rzyc/model/EntEmEquipment.java new file mode 100644 index 0000000..d4514f7 --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/model/EntEmEquipment.java @@ -0,0 +1,147 @@ +package com.rzyc.model; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableField; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + *

+ * 企业应急资源表 + *

+ * + * @author + * @since 2022-11-09 + */ +@TableName("ent_em_equipment") +@ApiModel(value="EntEmEquipment对象", description="企业应急资源表") +public class EntEmEquipment implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "企业应急资源id") + @TableId("ent_em_equipment_id") + private String entEmEquipmentId; + + @ApiModelProperty(value = "应急资源数量") + @TableField("ent_em_equipment_number") + private Integer entEmEquipmentNumber; + + @ApiModelProperty(value = "应急资源类型") + @TableField("ent_em_equipment_type") + private String entEmEquipmentType; + + @ApiModelProperty(value = "应急资源位置") + @TableField("ent_em_equipment_storage_location") + private String entEmEquipmentStorageLocation; + + @ApiModelProperty(value = "应急资源名") + @TableField("ent_em_equipment_name") + private String entEmEquipmentName; + + @ApiModelProperty(value = "企业id") + @TableField("enterprise_id") + private String enterpriseId; + + @TableField("create_time") + private Date createTime; + + @TableField("create_by") + private String createBy; + + @TableField("modify_time") + private Date modifyTime; + + @TableField("modify_by") + private String modifyBy; + + public String getEntEmEquipmentId() { + return entEmEquipmentId; + } + + public void setEntEmEquipmentId(String entEmEquipmentId) { + this.entEmEquipmentId = entEmEquipmentId; + } + public Integer getEntEmEquipmentNumber() { + return entEmEquipmentNumber; + } + + public void setEntEmEquipmentNumber(Integer entEmEquipmentNumber) { + this.entEmEquipmentNumber = entEmEquipmentNumber; + } + public String getEntEmEquipmentType() { + return entEmEquipmentType; + } + + public void setEntEmEquipmentType(String entEmEquipmentType) { + this.entEmEquipmentType = entEmEquipmentType; + } + public String getEntEmEquipmentStorageLocation() { + return entEmEquipmentStorageLocation; + } + + public void setEntEmEquipmentStorageLocation(String entEmEquipmentStorageLocation) { + this.entEmEquipmentStorageLocation = entEmEquipmentStorageLocation; + } + public String getEntEmEquipmentName() { + return entEmEquipmentName; + } + + public void setEntEmEquipmentName(String entEmEquipmentName) { + this.entEmEquipmentName = entEmEquipmentName; + } + public String getEnterpriseId() { + return enterpriseId; + } + + public void setEnterpriseId(String enterpriseId) { + this.enterpriseId = enterpriseId; + } + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + public String getModifyBy() { + return modifyBy; + } + + public void setModifyBy(String modifyBy) { + this.modifyBy = modifyBy; + } + + @Override + public String toString() { + return "EntEmEquipment{" + + "entEmEquipmentId=" + entEmEquipmentId + + ", entEmEquipmentNumber=" + entEmEquipmentNumber + + ", entEmEquipmentType=" + entEmEquipmentType + + ", entEmEquipmentStorageLocation=" + entEmEquipmentStorageLocation + + ", entEmEquipmentName=" + entEmEquipmentName + + ", enterpriseId=" + enterpriseId + + ", createTime=" + createTime + + ", createBy=" + createBy + + ", modifyTime=" + modifyTime + + ", modifyBy=" + modifyBy + + "}"; + } +} diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntEmExpert.java b/inventory-dao/src/main/java/com/rzyc/model/EntEmExpert.java new file mode 100644 index 0000000..020a55b --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/model/EntEmExpert.java @@ -0,0 +1,183 @@ +package com.rzyc.model; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableField; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + *

+ * 企业应急专家 + *

+ * + * @author + * @since 2022-11-09 + */ +@TableName("ent_em_expert") +@ApiModel(value="EntEmExpert对象", description="企业应急专家") +public class EntEmExpert implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "企业应急专家id") + @TableId("ent_em_expert_id") + private String entEmExpertId; + + @ApiModelProperty(value = "企业id") + @TableField("enterprise_id") + private String enterpriseId; + + @ApiModelProperty(value = "专家名字") + @TableField("ent_em_expert_name") + private String entEmExpertName; + + @ApiModelProperty(value = "性别") + @TableField("ent_em_expert_sex") + private Integer entEmExpertSex; + + @ApiModelProperty(value = "专家电话") + @TableField("ent_em_expert_phone") + private String entEmExpertPhone; + + @ApiModelProperty(value = "专家所在行业领域") + @TableField("ent_em_expert_class") + private String entEmExpertClass; + + @ApiModelProperty(value = "专家专业") + @TableField("ent_em_expert_major") + private String entEmExpertMajor; + + @ApiModelProperty(value = "专家类别") + @TableField("ent_em_expert_category") + private String entEmExpertCategory; + + @ApiModelProperty(value = "专家住址") + @TableField("ent_em_expert_address") + private String entEmExpertAddress; + + @TableField("create_by") + private String createBy; + + @TableField("create_time") + private Date createTime; + + @TableField("modify_by") + private String modifyBy; + + @TableField("modify_time") + private Date modifyTime; + + public String getEntEmExpertId() { + return entEmExpertId; + } + + public void setEntEmExpertId(String entEmExpertId) { + this.entEmExpertId = entEmExpertId; + } + public String getEnterpriseId() { + return enterpriseId; + } + + public void setEnterpriseId(String enterpriseId) { + this.enterpriseId = enterpriseId; + } + public String getEntEmExpertName() { + return entEmExpertName; + } + + public void setEntEmExpertName(String entEmExpertName) { + this.entEmExpertName = entEmExpertName; + } + public Integer getEntEmExpertSex() { + return entEmExpertSex; + } + + public void setEntEmExpertSex(Integer entEmExpertSex) { + this.entEmExpertSex = entEmExpertSex; + } + public String getEntEmExpertPhone() { + return entEmExpertPhone; + } + + public void setEntEmExpertPhone(String entEmExpertPhone) { + this.entEmExpertPhone = entEmExpertPhone; + } + public String getEntEmExpertClass() { + return entEmExpertClass; + } + + public void setEntEmExpertClass(String entEmExpertClass) { + this.entEmExpertClass = entEmExpertClass; + } + public String getEntEmExpertMajor() { + return entEmExpertMajor; + } + + public void setEntEmExpertMajor(String entEmExpertMajor) { + this.entEmExpertMajor = entEmExpertMajor; + } + public String getEntEmExpertCategory() { + return entEmExpertCategory; + } + + public void setEntEmExpertCategory(String entEmExpertCategory) { + this.entEmExpertCategory = entEmExpertCategory; + } + public String getEntEmExpertAddress() { + return entEmExpertAddress; + } + + public void setEntEmExpertAddress(String entEmExpertAddress) { + this.entEmExpertAddress = entEmExpertAddress; + } + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + public String getModifyBy() { + return modifyBy; + } + + public void setModifyBy(String modifyBy) { + this.modifyBy = modifyBy; + } + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + + @Override + public String toString() { + return "EntEmExpert{" + + "entEmExpertId=" + entEmExpertId + + ", enterpriseId=" + enterpriseId + + ", entEmExpertName=" + entEmExpertName + + ", entEmExpertSex=" + entEmExpertSex + + ", entEmExpertPhone=" + entEmExpertPhone + + ", entEmExpertClass=" + entEmExpertClass + + ", entEmExpertMajor=" + entEmExpertMajor + + ", entEmExpertCategory=" + entEmExpertCategory + + ", entEmExpertAddress=" + entEmExpertAddress + + ", createBy=" + createBy + + ", createTime=" + createTime + + ", modifyBy=" + modifyBy + + ", modifyTime=" + modifyTime + + "}"; + } +} diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntEmRehearsal.java b/inventory-dao/src/main/java/com/rzyc/model/EntEmRehearsal.java new file mode 100644 index 0000000..6071c0d --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/model/EntEmRehearsal.java @@ -0,0 +1,135 @@ +package com.rzyc.model; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableField; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + *

+ * 应急演练 + *

+ * + * @author + * @since 2022-11-09 + */ +@TableName("ent_em_rehearsal") +@ApiModel(value="EntEmRehearsal对象", description="应急演练") +public class EntEmRehearsal implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "应急演练id") + @TableId("ent_em_rehearsal_id") + private String entEmRehearsalId; + + @ApiModelProperty(value = "应急演练开始时间") + @TableField("ent_em_rehearsal_start_time") + private Date entEmRehearsalStartTime; + + @ApiModelProperty(value = "应急演练开始时间") + @TableField("ent_em_rehearsal_end_time") + private Date entEmRehearsalEndTime; + + @ApiModelProperty(value = "应急演练项目") + @TableField("ent_em_rehearsal_project") + private String entEmRehearsalProject; + + @ApiModelProperty(value = "备注") + @TableField("ent_em_rehearsal_remark") + private String entEmRehearsalRemark; + + @TableField("create_by") + private String createBy; + + @TableField("modify_by") + private String modifyBy; + + @TableField("create_time") + private Date createTime; + + @TableField("modify_time") + private Date modifyTime; + + public String getEntEmRehearsalId() { + return entEmRehearsalId; + } + + public void setEntEmRehearsalId(String entEmRehearsalId) { + this.entEmRehearsalId = entEmRehearsalId; + } + public Date getEntEmRehearsalStartTime() { + return entEmRehearsalStartTime; + } + + public void setEntEmRehearsalStartTime(Date entEmRehearsalStartTime) { + this.entEmRehearsalStartTime = entEmRehearsalStartTime; + } + public Date getEntEmRehearsalEndTime() { + return entEmRehearsalEndTime; + } + + public void setEntEmRehearsalEndTime(Date entEmRehearsalEndTime) { + this.entEmRehearsalEndTime = entEmRehearsalEndTime; + } + public String getEntEmRehearsalProject() { + return entEmRehearsalProject; + } + + public void setEntEmRehearsalProject(String entEmRehearsalProject) { + this.entEmRehearsalProject = entEmRehearsalProject; + } + public String getEntEmRehearsalRemark() { + return entEmRehearsalRemark; + } + + public void setEntEmRehearsalRemark(String entEmRehearsalRemark) { + this.entEmRehearsalRemark = entEmRehearsalRemark; + } + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + public String getModifyBy() { + return modifyBy; + } + + public void setModifyBy(String modifyBy) { + this.modifyBy = modifyBy; + } + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + + @Override + public String toString() { + return "EntEmRehearsal{" + + "entEmRehearsalId=" + entEmRehearsalId + + ", entEmRehearsalStartTime=" + entEmRehearsalStartTime + + ", entEmRehearsalEndTime=" + entEmRehearsalEndTime + + ", entEmRehearsalProject=" + entEmRehearsalProject + + ", entEmRehearsalRemark=" + entEmRehearsalRemark + + ", createBy=" + createBy + + ", modifyBy=" + modifyBy + + ", createTime=" + createTime + + ", modifyTime=" + modifyTime + + "}"; + } +} diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntEmReservePlan.java b/inventory-dao/src/main/java/com/rzyc/model/EntEmReservePlan.java new file mode 100644 index 0000000..0346b74 --- /dev/null +++ b/inventory-dao/src/main/java/com/rzyc/model/EntEmReservePlan.java @@ -0,0 +1,123 @@ +package com.rzyc.model; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableField; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + *

+ * 企业应急预警 + *

+ * + * @author + * @since 2022-11-09 + */ +@TableName("ent_em_reserve_plan") +@ApiModel(value="EntEmReservePlan对象", description="企业应急预警") +public class EntEmReservePlan implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "企业应急预案id") + @TableId("ent_em_reserve_plan_id") + private String entEmReservePlanId; + + @ApiModelProperty(value = "应急预案名") + @TableField("ent_em_reserve_plan_name") + private String entEmReservePlanName; + + @ApiModelProperty(value = "应急预案类型") + @TableField("ent_em_reserve_plan_type") + private String entEmReservePlanType; + + @ApiModelProperty(value = "企业id") + @TableField("enterprise_id") + private String enterpriseId; + + @TableField("create_time") + private Date createTime; + + @TableField("create_by") + private String createBy; + + @TableField("modify_time") + private Date modifyTime; + + @TableField("modify_by") + private String modifyBy; + + public String getEntEmReservePlanId() { + return entEmReservePlanId; + } + + public void setEntEmReservePlanId(String entEmReservePlanId) { + this.entEmReservePlanId = entEmReservePlanId; + } + public String getEntEmReservePlanName() { + return entEmReservePlanName; + } + + public void setEntEmReservePlanName(String entEmReservePlanName) { + this.entEmReservePlanName = entEmReservePlanName; + } + public String getEntEmReservePlanType() { + return entEmReservePlanType; + } + + public void setEntEmReservePlanType(String entEmReservePlanType) { + this.entEmReservePlanType = entEmReservePlanType; + } + public String getEnterpriseId() { + return enterpriseId; + } + + public void setEnterpriseId(String enterpriseId) { + this.enterpriseId = enterpriseId; + } + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + public Date getModifyTime() { + return modifyTime; + } + + public void setModifyTime(Date modifyTime) { + this.modifyTime = modifyTime; + } + public String getModifyBy() { + return modifyBy; + } + + public void setModifyBy(String modifyBy) { + this.modifyBy = modifyBy; + } + + @Override + public String toString() { + return "EntEmReservePlan{" + + "entEmReservePlanId=" + entEmReservePlanId + + ", entEmReservePlanName=" + entEmReservePlanName + + ", entEmReservePlanType=" + entEmReservePlanType + + ", enterpriseId=" + enterpriseId + + ", createTime=" + createTime + + ", createBy=" + createBy + + ", modifyTime=" + modifyTime + + ", modifyBy=" + modifyBy + + "}"; + } +} diff --git a/inventory-dao/src/main/java/com/rzyc/model/EntUserCredential.java b/inventory-dao/src/main/java/com/rzyc/model/EntUserCredential.java index f364fca..ed07aab 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/EntUserCredential.java +++ b/inventory-dao/src/main/java/com/rzyc/model/EntUserCredential.java @@ -5,6 +5,8 @@ import java.util.Date; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -42,9 +44,11 @@ public class EntUserCredential implements Serializable { @TableField("ent_user_id") private String entUserId; + @JsonFormat(pattern = "yyyy-MM-dd") @TableField("credential_start_time") private Date credentialStartTime; + @JsonFormat(pattern = "yyyy-MM-dd") @TableField("credential_end_time") private Date credentialEndTime; diff --git a/inventory-dao/src/main/java/com/rzyc/model/ent/EntUser.java b/inventory-dao/src/main/java/com/rzyc/model/ent/EntUser.java index 05c2f4d..7303fcd 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/ent/EntUser.java +++ b/inventory-dao/src/main/java/com/rzyc/model/ent/EntUser.java @@ -2,7 +2,6 @@ package com.rzyc.model.ent; import com.baomidou.mybatisplus.annotation.TableName; -import java.time.LocalTime; import java.util.Date; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableField; diff --git a/inventory-dao/src/main/resources/mapper/EntEmEquipmentMapper.xml b/inventory-dao/src/main/resources/mapper/EntEmEquipmentMapper.xml new file mode 100644 index 0000000..bc0c29c --- /dev/null +++ b/inventory-dao/src/main/resources/mapper/EntEmEquipmentMapper.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + ent_em_equipment_id, ent_em_equipment_number, ent_em_equipment_type, ent_em_equipment_storage_location, ent_em_equipment_name, enterprise_id, create_time, create_by, modify_time, modify_by + + + diff --git a/inventory-dao/src/main/resources/mapper/EntEmExpertMapper.xml b/inventory-dao/src/main/resources/mapper/EntEmExpertMapper.xml new file mode 100644 index 0000000..2b9db9a --- /dev/null +++ b/inventory-dao/src/main/resources/mapper/EntEmExpertMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + ent_em_expert_id, enterprise_id, ent_em_expert_name, ent_em_expert_sex, ent_em_expert_phone, ent_em_expert_class, ent_em_expert_major, ent_em_expert_category, ent_em_expert_address, create_by, create_time, modify_by, modify_time + + + diff --git a/inventory-dao/src/main/resources/mapper/EntEmRehearsalMapper.xml b/inventory-dao/src/main/resources/mapper/EntEmRehearsalMapper.xml new file mode 100644 index 0000000..4ae9d42 --- /dev/null +++ b/inventory-dao/src/main/resources/mapper/EntEmRehearsalMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + ent_em_rehearsal_id, ent_em_rehearsal_start_time, ent_em_rehearsal_end_time, ent_em_rehearsal_project, ent_em_rehearsal_remark, create_by, modify_by, create_time, modify_time + + + diff --git a/inventory-dao/src/main/resources/mapper/EntEmReservePlanMapper.xml b/inventory-dao/src/main/resources/mapper/EntEmReservePlanMapper.xml new file mode 100644 index 0000000..8676059 --- /dev/null +++ b/inventory-dao/src/main/resources/mapper/EntEmReservePlanMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + ent_em_reserve_plan_id, ent_em_reserve_plan_name, ent_em_reserve_plan_type, enterprise_id, create_time, create_by, modify_time, modify_by + + + diff --git a/inventory-dao/src/main/resources/mapper/ent/EntUserMapper.xml b/inventory-dao/src/main/resources/mapper/ent/EntUserMapper.xml index 5a1fad9..59e36cd 100644 --- a/inventory-dao/src/main/resources/mapper/ent/EntUserMapper.xml +++ b/inventory-dao/src/main/resources/mapper/ent/EntUserMapper.xml @@ -42,9 +42,7 @@ - - @@ -53,28 +51,33 @@ + diff --git a/inventory-ent/src/main/java/com/rzyc/controller/PersonalController.java b/inventory-ent/src/main/java/com/rzyc/controller/PersonalController.java index 0219a9d..35f3cec 100644 --- a/inventory-ent/src/main/java/com/rzyc/controller/PersonalController.java +++ b/inventory-ent/src/main/java/com/rzyc/controller/PersonalController.java @@ -266,9 +266,6 @@ public class PersonalController extends BaseController{ * @throws Exception */ @ApiOperation(value = "企业用户证照表-新增,修改", notes = "企业用户证照表-新增,修改") - @ApiImplicitParams({ - @ApiImplicitParam(name = "entUserId", value = "企业用户id",required = true, dataType = "string"), - }) @PostMapping(value = "/entUserCredentialUpdate") @PreAuthorize("hasAnyAuthority('entUserCredentialUpdate:update')") @MethodAnnotation(authorizations = {"entUserCredentialUpdate:update"},name = "企业用户证照表-新增,修改") diff --git a/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java b/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java index 0dde357..1b3d566 100644 --- a/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java +++ b/inventory-ent/src/main/java/com/rzyc/service/PcBusinessService.java @@ -162,12 +162,12 @@ public class PcBusinessService extends BaseController { for (EntUserCredentialUpdateDto e:entUserCredentialUpdateDto) { EntUserCredential entUserCredential = new EntUserCredential(); BeanUtils.copyProperties(e,entUserCredential); - if (StringUtils.isNotBlank(entUserCredential.getCredentialId())) { + EntUserCredential credential = entUserCredentialMapper.selectById(entUserCredential.getCredentialId()); + if (null != credential) { entUserCredential.setModifyBy(getUserId()); entUserCredential.setModifyTime(new Date()); result += entUserCredentialMapper.updateEntUserCredential(entUserCredential); }else { - entUserCredential.setCredentialId(RandomNumber.getUUid()); entUserCredential.setCreateBy(getUserId()); entUserCredential.setCreateTime(new Date()); result += entUserCredentialMapper.insertEntUserCredential(entUserCredential); @@ -217,6 +217,9 @@ public class PcBusinessService extends BaseController { singleResult.setMessage(Message.MOBILE_IS_ILLEGAL); return singleResult; } + if (null != addOrUpdateEntUserDto.getPostId() && addOrUpdateEntUserDto.getPostId().equals("company")){ + throw new CustomException(Message.CANT_ADD_IN_COMPANY_LEVEL); + } //验证数据重复 EntUser entUser = new EntUser(); BeanUtils.copyProperties(addOrUpdateEntUserDto,entUser); @@ -229,14 +232,15 @@ public class PcBusinessService extends BaseController { if (StringUtils.isNotBlank(entUser.getEntUserId())){ EntUser phone = entUserMapper.validMobile(entUser.getMobile(),entUser.getEntUserId()); if (null != phone){ - throw new CustomException("手机号已经存在"); + throw new CustomException(Message.HAS_MOBILE); } result = entUserMapper.updateEntUser(entUser); }else { EntUser phone = entUserMapper.validMobile(entUser.getMobile(),null); if (null != phone){ - throw new CustomException("手机号已经存在"); + throw new CustomException(Message.HAS_MOBILE); } + entUser.setEntUserId(RandomNumber.getUUid()); result = entUserMapper.insert(entUser); } if (result != 1){ @@ -245,6 +249,9 @@ public class PcBusinessService extends BaseController { } //插入证件图 if (null != addOrUpdateEntUserDto.getEntUserCredentialUpdateDtos() && addOrUpdateEntUserDto.getEntUserCredentialUpdateDtos().size() > 0 ){ + for (EntUserCredentialUpdateDto d:addOrUpdateEntUserDto.getEntUserCredentialUpdateDtos()) { + d.setEntUserId(entUser.getEntUserId()); + } singleResult = this.entUserCredentialUpdate(addOrUpdateEntUserDto.getEntUserCredentialUpdateDtos()); } @@ -348,7 +355,7 @@ public class PcBusinessService extends BaseController { entPost.setPostId(uuid); entPost.setCreateTime(new Date()); entPost.setCreateBy(getUserId()); - EntPost post = entPostMapper.getParentPost(addOrUpdateEntPostDto.getPostId()); + EntPost post = entPostMapper.getParentPost(addOrUpdateEntPostDto.getParentId()); entPost.setPostPath(post.getPostPath() + "," + uuid); result = entPostMapper.insertEntPost(entPost); } diff --git a/utils/src/main/java/com/common/utils/model/Message.java b/utils/src/main/java/com/common/utils/model/Message.java index 3904597..01e9321 100644 --- a/utils/src/main/java/com/common/utils/model/Message.java +++ b/utils/src/main/java/com/common/utils/model/Message.java @@ -97,7 +97,7 @@ public class Message { public static final String COUPON_ERROT = "优惠券出错"; - public static final String HAS_MOBILE = "已绑定手机号"; + public static final String HAS_MOBILE = "已绑定的手机号"; public static final String HAS_USERNAME = "用户名已存在"; @@ -170,4 +170,6 @@ public class Message { public static final String AUTHORIZATION_FAILED="无权限操作"; public static final String MOBILE_IS_ILLEGAL="手机号非法"; + + public static final String CANT_ADD_IN_COMPANY_LEVEL = "不允许在公司下直接编辑人员"; }