Browse Source

人员新增类型搜索

develop
wangsixiang 9 months ago
parent
commit
0c52c579bc
  1. 22
      zc-business/src/main/java/com/zc/business/domain/DcEmployees.java
  2. 26
      zc-business/src/main/java/com/zc/business/domain/DcOrganization.java
  3. 11
      zc-business/src/main/resources/mapper/business/DcEmployeesMapper.xml

22
zc-business/src/main/java/com/zc/business/domain/DcEmployees.java

@ -8,7 +8,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
/** /**
* 值班人员信息对象 dc_employees * 值班人员信息对象 dc_employees
* *
* @author ruoyi * @author ruoyi
* @date 2024-01-04 * @date 2024-01-04
*/ */
@ -50,7 +50,7 @@ public class DcEmployees extends BaseEntity
private Long parentId; private Long parentId;
//人员类型1为路管人员2为应急人员 //人员类型1为路管人员2为应急人员
@Excel(name = "人员类型 1-路管人员 2-交警人员") @Excel(name = "人员类型",readConverterExp = "1=路管人员,2=交警人员")
private Long employeesType; private Long employeesType;
//类型参数 //类型参数
private String type; private String type;
@ -100,43 +100,43 @@ public class DcEmployees extends BaseEntity
this.id = id; this.id = id;
} }
public Long getId() public Long getId()
{ {
return id; return id;
} }
public void setPostId(String postId) public void setPostId(String postId)
{ {
this.postId = postId; this.postId = postId;
} }
public String getPostId() public String getPostId()
{ {
return postId; return postId;
} }
public void setOrganizationId(Long organizationId) public void setOrganizationId(Long organizationId)
{ {
this.organizationId = organizationId; this.organizationId = organizationId;
} }
public Long getOrganizationId() public Long getOrganizationId()
{ {
return organizationId; return organizationId;
} }
public void setName(String name) public void setName(String name)
{ {
this.name = name; this.name = name;
} }
public String getName() public String getName()
{ {
return name; return name;
} }
public void setContactNumber(String contactNumber) public void setContactNumber(String contactNumber)
{ {
this.contactNumber = contactNumber; this.contactNumber = contactNumber;
} }
public String getContactNumber() public String getContactNumber()
{ {
return contactNumber; return contactNumber;
} }

26
zc-business/src/main/java/com/zc/business/domain/DcOrganization.java

@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.TreeEntity;
/** /**
* 机构管理对象 dc_organization * 机构管理对象 dc_organization
* *
* @author ruoyi * @author ruoyi
* @date 2024-01-04 * @date 2024-01-04
*/ */
@ -23,7 +23,7 @@ public class DcOrganization extends TreeEntity
/** 1-运管中心2-驻点 */ /** 1-运管中心2-驻点 */
@ApiModelProperty(value = "类型1-运管中心 2-驻点", required = true) @ApiModelProperty(value = "类型1-运管中心 2-驻点", required = true)
@Excel(name = "1-运管中心 2-驻点") @Excel(name = "类型",readConverterExp = "1=运管中心,2=驻点")
private Integer organizationType; private Integer organizationType;
/** 名称 */ /** 名称 */
@ -88,34 +88,34 @@ public class DcOrganization extends TreeEntity
this.id = id; this.id = id;
} }
public Long getId() public Long getId()
{ {
return id; return id;
} }
public void setOrganizationType(Integer organizationType) public void setOrganizationType(Integer organizationType)
{ {
this.organizationType = organizationType; this.organizationType = organizationType;
} }
public Integer getOrganizationType() public Integer getOrganizationType()
{ {
return organizationType; return organizationType;
} }
public void setOrganizationName(String organizationName) public void setOrganizationName(String organizationName)
{ {
this.organizationName = organizationName; this.organizationName = organizationName;
} }
public String getOrganizationName() public String getOrganizationName()
{ {
return organizationName; return organizationName;
} }
public void setOrganizationAddress(String organizationAddress) public void setOrganizationAddress(String organizationAddress)
{ {
this.organizationAddress = organizationAddress; this.organizationAddress = organizationAddress;
} }
public String getOrganizationAddress() public String getOrganizationAddress()
{ {
return organizationAddress; return organizationAddress;
} }
@ -128,21 +128,21 @@ public class DcOrganization extends TreeEntity
{ {
return stakeMark; return stakeMark;
} }
public void setRescueUnit(String rescueUnit) public void setRescueUnit(String rescueUnit)
{ {
this.rescueUnit = rescueUnit; this.rescueUnit = rescueUnit;
} }
public String getRescueUnit() public String getRescueUnit()
{ {
return rescueUnit; return rescueUnit;
} }
public void setDescription(String description) public void setDescription(String description)
{ {
this.description = description; this.description = description;
} }
public String getDescription() public String getDescription()
{ {
return description; return description;
} }

11
zc-business/src/main/resources/mapper/business/DcEmployeesMapper.xml

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zc.business.mapper.DcEmployeesMapper"> <mapper namespace="com.zc.business.mapper.DcEmployeesMapper">
<resultMap type="DcEmployees" id="DcEmployeesResult"> <resultMap type="DcEmployees" id="DcEmployeesResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="postId" column="post_id" /> <result property="postId" column="post_id" />
@ -33,13 +33,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDcEmployeesList" parameterType="DcEmployees" resultMap="DcEmployeesResult"> <select id="selectDcEmployeesList" parameterType="DcEmployees" resultMap="DcEmployeesResult">
<include refid="selectDcEmployeesVo"/> <include refid="selectDcEmployeesVo"/>
<where> <where>
<if test="postId != null and postId != ''"> and employees.post_id = #{postId}</if> <if test="postId != null and postId != ''"> and employees.post_id = #{postId}</if>
<if test="organizationId != null "> and employees.organization_id = #{organizationId}</if> <if test="organizationId != null "> and employees.organization_id = #{organizationId}</if>
<if test="name != null and name != ''"> and CONCAT(employees.name,employees.contact_number) like concat('%', #{name}, '%')</if> <if test="name != null and name != ''"> and CONCAT(employees.name,employees.contact_number) like concat('%', #{name}, '%')</if>
<if test="employeesType != null "> and employees.employees_type = #{employeesType}</if>
</where> </where>
</select> </select>
<select id="selectDcEmployeesById" parameterType="Long" resultMap="DcEmployeesResult"> <select id="selectDcEmployeesById" parameterType="Long" resultMap="DcEmployeesResult">
<include refid="selectDcEmployeesVo"/> <include refid="selectDcEmployeesVo"/>
where employees.id = #{id} where employees.id = #{id}
@ -90,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteDcEmployeesByIds" parameterType="String"> <delete id="deleteDcEmployeesByIds" parameterType="String">
delete from dc_employees where id in delete from dc_employees where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
@ -126,4 +127,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateJobInformation"> <update id="updateJobInformation">
update dc_employees set organization_id=#{station} where employees_id=#{employeesId} update dc_employees set organization_id=#{station} where employees_id=#{employeesId}
</update> </update>
</mapper> </mapper>

Loading…
Cancel
Save