Browse Source

证书管理接口修改

zhongwei
ty 1 year ago
parent
commit
e86240c57c
  1. 11
      hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/PersonManagemetMapper.xml
  2. 4
      hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/impl/PresonManagementServiceImpl.java

11
hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/mapper/PersonManagemetMapper.xml

@ -28,11 +28,12 @@
<select id="getPersonManagemetEntity" resultMap="PersonManagemetMap"> <select id="getPersonManagemetEntity" resultMap="PersonManagemetMap">
select a.id ,a.name,a.unit_name ,a.sex,a.job ,a.academic_title,a.phone ,a.CREATE_TIME, select a.id ,a.name,a.unit_name ,a.sex,a.job ,a.academic_title,a.phone ,a.CREATE_TIME,
b.id as certificatetId,b.person_id,b.type,b.dead_time,b.pic,b.CREATE_TIME,b.status,b.create_dept, b.id as certificatetId,b.person_id,b.type,b.dead_time,b.pic,b.CREATE_TIME,b.status,b.create_dept,
case when b.dead_time &lt; NOW() then "过期" else "未过期" end as isDead case when b.dead_time is null then ""
when b.dead_time &lt; NOW() then "过期" else "未过期" end as isDead
from hzims_person_managemet as a from hzims_person_managemet as a
left join hzims_certificatet as b left join hzims_certificatet as b
on a.id=b.person_id on a.id=b.person_id and b.is_deleted = 0
where a.is_deleted = 0 and b.is_deleted = 0 where a.is_deleted = 0
<if test="type != null and type != ''"> <if test="type != null and type != ''">
and b.type = #{type} and b.type = #{type}
</if> </if>
@ -64,8 +65,8 @@
select count(*) select count(*)
from hzims_person_managemet as a from hzims_person_managemet as a
left join hzims_certificatet as b left join hzims_certificatet as b
on a.id=b.person_id on a.id=b.person_id and b.is_deleted = 0
where a.is_deleted = 0 and b.is_deleted = 0 where a.is_deleted = 0
<if test="type != null and type != ''"> <if test="type != null and type != ''">
and b.type = #{type} and b.type = #{type}
</if> </if>

4
hzims-service/hzims-basic/src/main/java/com/hnac/hzims/basic/service/impl/PresonManagementServiceImpl.java

@ -45,10 +45,10 @@ public class PresonManagementServiceImpl extends BaseServiceImpl<PersonManagemet
public IPage<PersonManagemetVo> getPersonManagemetEntity(PersonManagemetVo personManagemetVo, Query query) { public IPage<PersonManagemetVo> getPersonManagemetEntity(PersonManagemetVo personManagemetVo, Query query) {
List<PersonManagemetVo> personManagemetEntity = baseMapper.getPersonManagemetEntity(personManagemetVo.getType(), personManagemetVo.getDeadStartTime(), personManagemetVo.getDeadTime(), List<PersonManagemetVo> personManagemetEntity = baseMapper.getPersonManagemetEntity(personManagemetVo.getType(), personManagemetVo.getDeadStartTime(), personManagemetVo.getDeadTime(),
personManagemetVo.getName(), personManagemetVo.getUnitName(), personManagemetVo.getSex(), personManagemetVo.getJob(), personManagemetVo.getName(), personManagemetVo.getUnitName(), personManagemetVo.getSex(), personManagemetVo.getJob(),
personManagemetVo.getAcademicTitle(), personManagemetVo.getStatus(), query.getCurrent(), query.getSize()); personManagemetVo.getAcademicTitle(), personManagemetVo.getStatus(), (query.getCurrent()-1)*query.getSize(), query.getSize());
Integer count = baseMapper.getCountByPersonManagemetEntity(personManagemetVo.getType(), personManagemetVo.getDeadStartTime(), personManagemetVo.getDeadTime(), Integer count = baseMapper.getCountByPersonManagemetEntity(personManagemetVo.getType(), personManagemetVo.getDeadStartTime(), personManagemetVo.getDeadTime(),
personManagemetVo.getName(), personManagemetVo.getUnitName(), personManagemetVo.getSex(), personManagemetVo.getJob(), personManagemetVo.getName(), personManagemetVo.getUnitName(), personManagemetVo.getSex(), personManagemetVo.getJob(),
personManagemetVo.getAcademicTitle(), personManagemetVo.getStatus(), query.getCurrent(), query.getSize()); personManagemetVo.getAcademicTitle(), personManagemetVo.getStatus(), (query.getCurrent()-1)*query.getSize(), query.getSize());
IPage<PersonManagemetVo> res = new Page<>(); IPage<PersonManagemetVo> res = new Page<>();
res.setCurrent(query.getCurrent()); res.setCurrent(query.getCurrent());
res.setSize(query.getSize()); res.setSize(query.getSize());

Loading…
Cancel
Save