Commit f5df4d7d authored by kongfm's avatar kongfm

FLC 企业人员相关代码

parent 62d37c8d
...@@ -278,4 +278,6 @@ public interface IOrgUsrService { ...@@ -278,4 +278,6 @@ public interface IOrgUsrService {
OrgUsrDto saveOrgPersonFlc(OrgPersonDto OrgPersonDto) throws Exception; OrgUsrDto saveOrgPersonFlc(OrgPersonDto OrgPersonDto) throws Exception;
void updateByIdOrgPersonFlc(OrgPersonDto OrgPersonVo, Long id) throws Exception;
} }
...@@ -56,4 +56,8 @@ public class PersonQualityDto extends BaseDto { ...@@ -56,4 +56,8 @@ public class PersonQualityDto extends BaseDto {
@ApiModelProperty(value = "证书信息") @ApiModelProperty(value = "证书信息")
private List<AttachmentDto> licenceInfo; private List<AttachmentDto> licenceInfo;
@ApiModelProperty(value = "发证日期")
private Date licenceDate;
} }
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.entity; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
...@@ -82,4 +83,11 @@ public class PersonQuality extends BaseEntity { ...@@ -82,4 +83,11 @@ public class PersonQuality extends BaseEntity {
@TableField("remark") @TableField("remark")
private String remark; private String remark;
/**
* 发证日期
*/
@TableField("licence_date")
private Date licenceDate;
} }
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitPersonInfoDto; import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitPersonInfoDto;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -14,5 +15,13 @@ public interface IUnitPersonService { ...@@ -14,5 +15,13 @@ public interface IUnitPersonService {
UnitPersonInfoDto getPersonById(Long sequenceNbr); UnitPersonInfoDto getPersonById(Long sequenceNbr);
Object pagePerson(Long parentId, String pageNum, String pageSize, Map<String, Object> requestBody); Object pagePerson(List<Long> parentId, String pageNum, String pageSize, Map<String, Object> requestBody);
Boolean removeById(Long sequenceNbr);
Boolean batchDelete(List<Long> sequenceNbrList);
UnitPersonInfoDto saveSupUser(UnitPersonInfoDto unitPersonInfoDto);
UnitPersonInfoDto updateUser(UnitPersonInfoDto unitPersonInfoDto);
} }
...@@ -7,8 +7,11 @@ ...@@ -7,8 +7,11 @@
select count(1) from ( select count(1) from (
SELECT SELECT
DISTINCT DISTINCT
u.sequence_nbr AS sequenceNbr,
u.*, u.*,
replace(CONCAT(u.org_expand_attr6->'$.province',u.org_expand_attr6->'$.city',u.org_expand_attr6->'$.district',u.org_expand_attr6->'$.address'),'"','') fulladdress ,
g.*, g.*,
p.biz_org_name as parentName,
TIMESTAMPDIFF(YEAR, g.birthday, CURDATE()) as ages , TIMESTAMPDIFF(YEAR, g.birthday, CURDATE()) as ages ,
case case
when count(q.sequence_nbr) > 0 then '有' when count(q.sequence_nbr) > 0 then '有'
...@@ -18,19 +21,15 @@ ...@@ -18,19 +21,15 @@
LEFT JOIN LEFT JOIN
( SELECT ( SELECT
v.`instance_id`, v.`instance_id`,
max(case v.field_code when 'person_type' then IFNULL(v.field_value_label,v.field_value) end) personType, max(case v.field_code when 'person_type' then IFNULL(v.field_value_label,v.field_value) end) person_type,
max(case v.field_code when 'sex' then IFNULL(v.field_value_label,v.field_value) end) sex, max(case v.field_code when 'sex' then IFNULL(v.field_value_label,v.field_value) end) sex,
max(case v.field_code when 'birthday' then IFNULL(v.field_value_label,v.field_value) end) birthday, max(case v.field_code when 'birthday' then IFNULL(v.field_value_label,v.field_value) end) birthday,
max(case v.field_code when 'licence_type' then IFNULL(v.field_value_label,v.field_value) end) licenceType, max(case v.field_code when 'licence_type' then IFNULL(v.field_value_label,v.field_value) end) licence_type,
max(case v.field_code when 'licence_code' then IFNULL(v.field_value_label,v.field_value) end) licenceCode, max(case v.field_code when 'licence_code' then IFNULL(v.field_value_label,v.field_value) end) licence_code,
max(case v.field_code when 'education' then IFNULL(v.field_value_label,v.field_value) end) education, max(case v.field_code when 'education' then IFNULL(v.field_value_label,v.field_value) end) education,
max(case v.field_code when 'major' then IFNULL(v.field_value_label,v.field_value) end) major, max(case v.field_code when 'major' then IFNULL(v.field_value_label,v.field_value) end) major,
max(case v.field_code when 'phone' then IFNULL(v.field_value_label,v.field_value) end) phone, max(case v.field_code when 'phone' then IFNULL(v.field_value_label,v.field_value) end) phone,
max(case v.field_code when 'email' then IFNULL(v.field_value_label,v.field_value) end) email, max(case v.field_code when 'email' then IFNULL(v.field_value_label,v.field_value) end) email
max(case v.field_code when 'province' then IFNULL(v.field_value_label,v.field_value) end) province,
max(case v.field_code when 'city' then IFNULL(v.field_value_label,v.field_value) end) city,
max(case v.field_code when 'district' then IFNULL(v.field_value_label,v.field_value) end) district,
max(case v.field_code when 'address' then IFNULL(v.field_value_label,v.field_value) end) address
FROM FROM
`cb_dynamic_form_instance` v `cb_dynamic_form_instance` v
WHERE WHERE
...@@ -39,12 +38,16 @@ ...@@ -39,12 +38,16 @@
v.`instance_id` v.`instance_id`
) g ) g
on u.sequence_nbr = g.instance_id on u.sequence_nbr = g.instance_id
LEFT JOIN tz_flc_person_quality q on q.sequence_nbr = u.sequence_nbr LEFT JOIN tz_flc_person_quality q on q.pserson_id = u.sequence_nbr
LEFT JOIN cb_org_usr p on p.sequence_nbr = u.parent_id
where where
u.biz_org_type = 'person' u.biz_org_type = 'person'
AND AND
u.is_delete = 0 u.is_delete = 0
AND u.parent_id = #{map.parentId} <if test="map.parentId != null">
AND u.parent_id in
<foreach collection="map.parentId" item="item" open="(" close=")" separator=","> ${item} </foreach>
</if>
GROUP BY GROUP BY
u.sequence_nbr , u.sequence_nbr ,
u.biz_org_name , u.biz_org_name ,
...@@ -84,8 +87,11 @@ ...@@ -84,8 +87,11 @@
select * from ( select * from (
SELECT SELECT
DISTINCT DISTINCT
u.sequence_nbr AS sequenceNbr,
u.*, u.*,
replace(CONCAT(u.org_expand_attr6->'$.province',u.org_expand_attr6->'$.city',u.org_expand_attr6->'$.district',u.org_expand_attr6->'$.address'),'"','') fulladdress ,
g.*, g.*,
p.biz_org_name as parentName,
TIMESTAMPDIFF(YEAR, g.birthday, CURDATE()) as ages , TIMESTAMPDIFF(YEAR, g.birthday, CURDATE()) as ages ,
case case
when count(q.sequence_nbr) > 0 then '有' when count(q.sequence_nbr) > 0 then '有'
...@@ -95,19 +101,15 @@ ...@@ -95,19 +101,15 @@
LEFT JOIN LEFT JOIN
( SELECT ( SELECT
v.`instance_id`, v.`instance_id`,
max(case v.field_code when 'person_type' then IFNULL(v.field_value_label,v.field_value) end) personType, max(case v.field_code when 'person_type' then IFNULL(v.field_value_label,v.field_value) end) person_type,
max(case v.field_code when 'sex' then IFNULL(v.field_value_label,v.field_value) end) sex, max(case v.field_code when 'sex' then IFNULL(v.field_value_label,v.field_value) end) sex,
max(case v.field_code when 'birthday' then IFNULL(v.field_value_label,v.field_value) end) birthday, max(case v.field_code when 'birthday' then IFNULL(v.field_value_label,v.field_value) end) birthday,
max(case v.field_code when 'licence_type' then IFNULL(v.field_value_label,v.field_value) end) licenceType, max(case v.field_code when 'licence_type' then IFNULL(v.field_value_label,v.field_value) end) licence_type,
max(case v.field_code when 'licence_code' then IFNULL(v.field_value_label,v.field_value) end) licenceCode, max(case v.field_code when 'licence_code' then IFNULL(v.field_value_label,v.field_value) end) licence_code,
max(case v.field_code when 'education' then IFNULL(v.field_value_label,v.field_value) end) education, max(case v.field_code when 'education' then IFNULL(v.field_value_label,v.field_value) end) education,
max(case v.field_code when 'major' then IFNULL(v.field_value_label,v.field_value) end) major, max(case v.field_code when 'major' then IFNULL(v.field_value_label,v.field_value) end) major,
max(case v.field_code when 'phone' then IFNULL(v.field_value_label,v.field_value) end) phone, max(case v.field_code when 'phone' then IFNULL(v.field_value_label,v.field_value) end) phone,
max(case v.field_code when 'email' then IFNULL(v.field_value_label,v.field_value) end) email, max(case v.field_code when 'email' then IFNULL(v.field_value_label,v.field_value) end) email
max(case v.field_code when 'province' then IFNULL(v.field_value_label,v.field_value) end) province,
max(case v.field_code when 'city' then IFNULL(v.field_value_label,v.field_value) end) city,
max(case v.field_code when 'district' then IFNULL(v.field_value_label,v.field_value) end) district,
max(case v.field_code when 'address' then IFNULL(v.field_value_label,v.field_value) end) address
FROM FROM
`cb_dynamic_form_instance` v `cb_dynamic_form_instance` v
WHERE WHERE
...@@ -116,12 +118,16 @@ ...@@ -116,12 +118,16 @@
v.`instance_id` v.`instance_id`
) g ) g
on u.sequence_nbr = g.instance_id on u.sequence_nbr = g.instance_id
LEFT JOIN tz_flc_person_quality q on q.sequence_nbr = u.sequence_nbr LEFT JOIN tz_flc_person_quality q on q.pserson_id = u.sequence_nbr
LEFT JOIN cb_org_usr p on p.sequence_nbr = u.parent_id
where where
u.biz_org_type = 'person' u.biz_org_type = 'person'
AND AND
u.is_delete = 0 u.is_delete = 0
AND u.parent_id = #{map.parentId} <if test="map.parentId != null">
AND u.parent_id in
<foreach collection="map.parentId" item="item" open="(" close=")" separator=","> ${item} </foreach>
</if>
GROUP BY GROUP BY
u.sequence_nbr , u.sequence_nbr ,
u.biz_org_name , u.biz_org_name ,
......
...@@ -2025,4 +2025,16 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -2025,4 +2025,16 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return result; return result;
} }
@Override
public void updateByIdOrgPersonFlc(OrgPersonDto OrgPersonVo, Long id) throws Exception {
// 修改人员信息
OrgUsr orgUsr = new OrgUsr();
OrgUsr oriOrgUsr = getById(id);
BeanUtils.copyProperties(OrgPersonVo, orgUsr);
orgUsr.setSequenceNbr(id);
updateById(orgUsr);
// 保存动态表单数据
updateDynamicFormInstance(orgUsr.getSequenceNbr(), OrgPersonVo.getDynamicFormValue());
}
} }
...@@ -448,4 +448,5 @@ public class UnitInfoController extends BaseController { ...@@ -448,4 +448,5 @@ public class UnitInfoController extends BaseController {
} }
...@@ -444,6 +444,29 @@ ...@@ -444,6 +444,29 @@
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="kongfm" id="2021-11-25-01">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="1">select count(*) from cb_dynamic_form_column where sequence_nbr = 10</sqlCheck>
</preConditions>
<comment>delete person record </comment>
<sql>
delete FROM cb_dynamic_form_column where sequence_nbr = 10;
delete FROM cb_dynamic_form_column where sequence_nbr = 11;
delete FROM cb_dynamic_form_column where sequence_nbr = 12;
delete FROM cb_dynamic_form_column where sequence_nbr = 13;
</sql>
</changeSet>
<changeSet author="kongfm" id="2021-11-26-01">
<preConditions onFail="MARK_RAN">
<tableExists tableName="tz_flc_person_quality"/>
</preConditions>
<comment>modify table tz_flc_person_quality add licence_date columns</comment>
<sql>
ALTER TABLE `tz_flc_person_quality` add licence_date datetime COMMENT '发证日期';
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment