1、小程序各端机构名称、负责人、电话获取方式调整
2、长者、监护人信息变更审核驳回后 小程序开发的通知里增加驳回原因
This commit is contained in:
parent
4141174946
commit
5af01152fc
|
|
@ -23,7 +23,7 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="title != null and title != ''">
|
<if test="title != null and title != ''">
|
||||||
and o.com_name like concat('%',#{title},'%')
|
and d.depart_name like concat('%',#{title},'%')
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="getSuppliersOrgInfo" resultType="com.nu.entity.SuppliersOrgAllEntity">
|
<select id="getSuppliersOrgInfo" resultType="com.nu.entity.SuppliersOrgAllEntity">
|
||||||
|
|
@ -57,19 +57,18 @@
|
||||||
select
|
select
|
||||||
s.id as id,
|
s.id as id,
|
||||||
d.id as org_id,
|
d.id as org_id,
|
||||||
o.com_name as depart_name,
|
d.depart_name,
|
||||||
d.org_code,
|
d.org_code,
|
||||||
concat(d.url,d.context_path) as server_url,
|
concat(d.url,d.context_path) as server_url,
|
||||||
o.org_leader,
|
d.org_leader,
|
||||||
o.org_leader_phone,
|
d.org_leader_phone,
|
||||||
o.org_address
|
d.org_address
|
||||||
,s.`status` as suppliers_status
|
,s.`status` as suppliers_status
|
||||||
,s.audit_content
|
,s.audit_content
|
||||||
,s.create_time
|
,s.create_time
|
||||||
from sys_depart d
|
from sys_depart d
|
||||||
left join nu_org_apply_info o on d.id = o.pk_id
|
|
||||||
left join nu_biz_suppliers_org s on d.org_code = s.org_code
|
left join nu_biz_suppliers_org s on d.org_code = s.org_code
|
||||||
where 1=1 and o.status = '2' and d.del_flag = '0'
|
where d.del_flag = '0'
|
||||||
and s.open_id = #{openId}
|
and s.open_id = #{openId}
|
||||||
order by s.create_time desc
|
order by s.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
||||||
//已经申请通过的机构 查这个表是因为需要最新的机构数据 apply的数据可能是变更中的数据
|
//已经申请通过的机构 查这个表是因为需要最新的机构数据 apply的数据可能是变更中的数据
|
||||||
SysDepartEntity queryParams = new SysDepartEntity();
|
SysDepartEntity queryParams = new SysDepartEntity();
|
||||||
queryParams.setOpenId(openId);
|
queryParams.setOpenId(openId);
|
||||||
List<OrgAllInfoApiEntity> orgApplyInfoApiEntities = BeanUtil.copyToList(sysBaseAPI.queryAllAuditPassOrg(queryParams), OrgAllInfoApiEntity.class);
|
List<OrgAllInfoApiEntity> orgApplyInfoApiEntities = BeanUtil.copyToList(sysBaseAPI.queryAllOrgInfo(queryParams), OrgAllInfoApiEntity.class);
|
||||||
if (!CollectionUtils.isEmpty(orgApplyInfoApiEntities)) {
|
if (!CollectionUtils.isEmpty(orgApplyInfoApiEntities)) {
|
||||||
orgApplyInfoApiEntities.stream().forEach(item -> {
|
orgApplyInfoApiEntities.stream().forEach(item -> {
|
||||||
item.setPkId(item.getId());
|
item.setPkId(item.getId());
|
||||||
|
|
@ -385,7 +385,7 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
||||||
sysDepartEntity.setDelFlag("0");//未删除
|
sysDepartEntity.setDelFlag("0");//未删除
|
||||||
//机构信息
|
//机构信息
|
||||||
sysDepartEntity.setOpenId(orgApplyInfo.getOpenId());//openid
|
sysDepartEntity.setOpenId(orgApplyInfo.getOpenId());//openid
|
||||||
sysDepartEntity.setTel(orgApplyInfo.getTel());//联系电话
|
sysDepartEntity.setTel(orgApplyInfo.getOrgLeaderPhone());//联系电话
|
||||||
sysDepartEntity.setWechatName(orgApplyInfo.getWechatName());//微信名称(空字段)
|
sysDepartEntity.setWechatName(orgApplyInfo.getWechatName());//微信名称(空字段)
|
||||||
sysDepartEntity.setName(orgApplyInfo.getName());//咨询人姓名
|
sysDepartEntity.setName(orgApplyInfo.getName());//咨询人姓名
|
||||||
sysDepartEntity.setSex(orgApplyInfo.getSex());//性别
|
sysDepartEntity.setSex(orgApplyInfo.getSex());//性别
|
||||||
|
|
@ -452,7 +452,7 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
||||||
nuWxNotice.setIzRead("N");
|
nuWxNotice.setIzRead("N");
|
||||||
nuWxNotice.setOrgCode(null);
|
nuWxNotice.setOrgCode(null);
|
||||||
nuWxNotice.setTitle("机构加盟审核");
|
nuWxNotice.setTitle("机构加盟审核");
|
||||||
nuWxNotice.setContent("您好,您提交的" + orgApplyInfo.getComName() + "机构加盟申请未通过");
|
nuWxNotice.setContent("您好,您提交的" + orgApplyInfo.getComName() + "机构加盟申请未通过,驳回原因:" + orgApplyInfo.getContent());
|
||||||
nuWxNotice.setType("org_apply_audit_list");
|
nuWxNotice.setType("org_apply_audit_list");
|
||||||
nuWxNotice.setClientType(WxClientType.INSTITUTION.getCode());
|
nuWxNotice.setClientType(WxClientType.INSTITUTION.getCode());
|
||||||
wxNoticeApi.addNotice(nuWxNotice);
|
wxNoticeApi.addNotice(nuWxNotice);
|
||||||
|
|
@ -577,7 +577,7 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
||||||
sysDepartEntity.setId(orgApplyInfo.getPkId());
|
sysDepartEntity.setId(orgApplyInfo.getPkId());
|
||||||
sysDepartEntity.setDepartName(orgApplyInfo.getComName());//机构名称
|
sysDepartEntity.setDepartName(orgApplyInfo.getComName());//机构名称
|
||||||
//机构信息
|
//机构信息
|
||||||
sysDepartEntity.setTel(orgApplyInfo.getTel());//联系电话
|
sysDepartEntity.setTel(orgApplyInfo.getOrgLeaderPhone());//联系电话
|
||||||
sysDepartEntity.setWechatName(orgApplyInfo.getWechatName());//微信名称(空字段)
|
sysDepartEntity.setWechatName(orgApplyInfo.getWechatName());//微信名称(空字段)
|
||||||
sysDepartEntity.setName(orgApplyInfo.getName());//咨询人姓名
|
sysDepartEntity.setName(orgApplyInfo.getName());//咨询人姓名
|
||||||
sysDepartEntity.setSex(orgApplyInfo.getSex());//性别
|
sysDepartEntity.setSex(orgApplyInfo.getSex());//性别
|
||||||
|
|
@ -636,7 +636,7 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
||||||
nuWxNotice.setIzRead("N");
|
nuWxNotice.setIzRead("N");
|
||||||
nuWxNotice.setOrgCode(null);
|
nuWxNotice.setOrgCode(null);
|
||||||
nuWxNotice.setTitle("机构信息变更审核");
|
nuWxNotice.setTitle("机构信息变更审核");
|
||||||
nuWxNotice.setContent("您好,您提交的" + orgApplyInfo.getComName() + "机构信息变更申请未通过");
|
nuWxNotice.setContent("您好,您提交的" + orgApplyInfo.getComName() + "机构信息变更申请未通过,驳回原因:" + orgApplyInfo.getContent());
|
||||||
nuWxNotice.setType("org_apply_audit_list");
|
nuWxNotice.setType("org_apply_audit_list");
|
||||||
nuWxNotice.setClientType(WxClientType.INSTITUTION.getCode());
|
nuWxNotice.setClientType(WxClientType.INSTITUTION.getCode());
|
||||||
wxNoticeApi.addNotice(nuWxNotice);
|
wxNoticeApi.addNotice(nuWxNotice);
|
||||||
|
|
@ -650,7 +650,7 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
||||||
//修改数据
|
//修改数据
|
||||||
baseMapper.updateById(orgApplyInfo);
|
baseMapper.updateById(orgApplyInfo);
|
||||||
|
|
||||||
//TODO 通知运维平台去修改
|
//运维平台不改 就留第一次的入驻的信息
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,17 @@ import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.nu.dto.ElderInfoMQDto;
|
|
||||||
import com.nu.entity.ElderInfoEntity;
|
import com.nu.entity.ElderInfoEntity;
|
||||||
import com.nu.entity.EmployeesAdvisoryInfoEntity;
|
|
||||||
import com.nu.modules.baseinfo.api.INuBaseInfoApi;
|
|
||||||
import com.nu.modules.elder.api.IElderInfoApi;
|
import com.nu.modules.elder.api.IElderInfoApi;
|
||||||
import com.nu.modules.elderinfo.entity.ElderInfo;
|
import com.nu.modules.elderinfo.entity.ElderInfo;
|
||||||
import com.nu.modules.elderinfo.mapper.ElderInfoMapper;
|
import com.nu.modules.elderinfo.mapper.ElderInfoMapper;
|
||||||
import com.nu.modules.elderinfo.service.IElderInfoService;
|
import com.nu.modules.elderinfo.service.IElderInfoService;
|
||||||
import com.nu.modules.employees.entity.NuEmployeesAdvisoryInfo;
|
|
||||||
import com.nu.modules.nubaseelder.entity.NuBaseElder;
|
import com.nu.modules.nubaseelder.entity.NuBaseElder;
|
||||||
import com.nu.modules.nubaseelder.service.INuBaseElderService;
|
import com.nu.modules.nubaseelder.service.INuBaseElderService;
|
||||||
import org.apache.commons.compress.utils.Lists;
|
import org.apache.commons.compress.utils.Lists;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
|
import org.jeecg.common.system.entity.SysDepartEntity;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -25,6 +23,7 @@ import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -37,7 +36,7 @@ import java.util.stream.Collectors;
|
||||||
@Service
|
@Service
|
||||||
public class ElderInfoServiceImpl extends ServiceImpl<ElderInfoMapper, ElderInfo> implements IElderInfoService, IElderInfoApi {
|
public class ElderInfoServiceImpl extends ServiceImpl<ElderInfoMapper, ElderInfo> implements IElderInfoService, IElderInfoApi {
|
||||||
@Autowired
|
@Autowired
|
||||||
private INuBaseInfoApi nuBaseInfoApi;
|
private ISysBaseAPI sysBaseAPI;
|
||||||
@Autowired
|
@Autowired
|
||||||
private INuBaseElderService baseElderService;
|
private INuBaseElderService baseElderService;
|
||||||
|
|
||||||
|
|
@ -136,8 +135,8 @@ public class ElderInfoServiceImpl extends ServiceImpl<ElderInfoMapper, ElderInfo
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
//TODO 获取到所有机构的负责人和联系方式 改版后从depart拿
|
SysDepartEntity queryParams = new SysDepartEntity();
|
||||||
|
List<SysDepartEntity> sysDepartList = sysBaseAPI.queryAllOrgInfo(queryParams);
|
||||||
|
|
||||||
List<ElderInfoEntity> his = Lists.newArrayList();
|
List<ElderInfoEntity> his = Lists.newArrayList();
|
||||||
for (String orgCode : orgCodes) {
|
for (String orgCode : orgCodes) {
|
||||||
|
|
@ -159,6 +158,31 @@ public class ElderInfoServiceImpl extends ServiceImpl<ElderInfoMapper, ElderInfo
|
||||||
.sorted(Comparator.comparing(ElderInfoEntity::getUpdateTime, Comparator.nullsLast(Comparator.reverseOrder())))
|
.sorted(Comparator.comparing(ElderInfoEntity::getUpdateTime, Comparator.nullsLast(Comparator.reverseOrder())))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据orgCode将机构信息转为Map,方便快速查找
|
||||||
|
Map<String, SysDepartEntity> orgInfoMap = sysDepartList.stream()
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.filter(depart -> StringUtils.isNotBlank(depart.getOrgCode()))
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
SysDepartEntity::getOrgCode,
|
||||||
|
depart -> depart
|
||||||
|
));
|
||||||
|
|
||||||
|
// 补充his数据中的机构负责人和负责人电话
|
||||||
|
if (!CollectionUtils.isEmpty(his) && !CollectionUtils.isEmpty(sysDepartList)) {
|
||||||
|
for (ElderInfoEntity elderInfo : his) {
|
||||||
|
if (StringUtils.isNotBlank(elderInfo.getSysOrgCode())) {
|
||||||
|
SysDepartEntity departEntity = orgInfoMap.get(elderInfo.getSysOrgCode());
|
||||||
|
if (departEntity != null) {
|
||||||
|
// 设置机构负责人 (对应SysDepartEntity的orgLeader字段)
|
||||||
|
elderInfo.setDepartFzr(departEntity.getOrgLeader());
|
||||||
|
// 设置机构负责人电话 (对应SysDepartEntity的orgLeaderPhone字段)
|
||||||
|
elderInfo.setDepartPhone(departEntity.getOrgLeaderPhone());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return his;
|
return his;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,7 @@ public class ElderTaggMQListener {
|
||||||
nuWxNotice.setIzRead("N");
|
nuWxNotice.setIzRead("N");
|
||||||
nuWxNotice.setOrgCode(dto.getOrgCode());
|
nuWxNotice.setOrgCode(dto.getOrgCode());
|
||||||
nuWxNotice.setTitle("监护人信息变更审批");
|
nuWxNotice.setTitle("监护人信息变更审批");
|
||||||
nuWxNotice.setContent("您好,您提交的" + dto.getName() + "长者的监护人信息变更申请未通过");
|
nuWxNotice.setContent("您好,您提交的" + dto.getName() + "长者的监护人信息变更申请未通过,驳回原因:" + dto.getAuditContent());
|
||||||
nuWxNotice.setType("elder_jhr_info_update_list");
|
nuWxNotice.setType("elder_jhr_info_update_list");
|
||||||
Map<String, Object> extend = Maps.newHashMap();
|
Map<String, Object> extend = Maps.newHashMap();
|
||||||
extend.put("orgCode", dto.getOrgCode());
|
extend.put("orgCode", dto.getOrgCode());
|
||||||
|
|
@ -200,7 +200,7 @@ public class ElderTaggMQListener {
|
||||||
nuWxNotice.setIzRead("N");
|
nuWxNotice.setIzRead("N");
|
||||||
nuWxNotice.setOrgCode(dto.getOrgCode());
|
nuWxNotice.setOrgCode(dto.getOrgCode());
|
||||||
nuWxNotice.setTitle("长者信息变更审批");
|
nuWxNotice.setTitle("长者信息变更审批");
|
||||||
nuWxNotice.setContent("您好,您提交的" + dto.getName() + "长者信息变更申请未通过");
|
nuWxNotice.setContent("您好,您提交的" + dto.getName() + "长者信息变更申请未通过,驳回原因:" + dto.getAuditContent());
|
||||||
nuWxNotice.setType("elder_info_update_list");
|
nuWxNotice.setType("elder_info_update_list");
|
||||||
Map<String, Object> extend = Maps.newHashMap();
|
Map<String, Object> extend = Maps.newHashMap();
|
||||||
extend.put("orgCode", dto.getOrgCode());
|
extend.put("orgCode", dto.getOrgCode());
|
||||||
|
|
|
||||||
|
|
@ -643,7 +643,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||||
*/
|
*/
|
||||||
SysDepartEntity selectDepartById(String id);
|
SysDepartEntity selectDepartById(String id);
|
||||||
|
|
||||||
List<SysDepartEntity> queryAllAuditPassOrg(SysDepartEntity queryParams);
|
List<SysDepartEntity> queryAllOrgInfo(SysDepartEntity queryParams);
|
||||||
|
|
||||||
void updateById(SysDepartEntity sysDepartEntity);
|
void updateById(SysDepartEntity sysDepartEntity);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -245,5 +245,5 @@ public interface ISysDepartService extends IService<SysDepart>{
|
||||||
|
|
||||||
void changeElderTagMain(String orgCode);
|
void changeElderTagMain(String orgCode);
|
||||||
|
|
||||||
List<SysDepartEntity> queryAllAuditPassOrg(SysDepartEntity queryParams);
|
List<SysDepartEntity> queryAllOrgInfo(SysDepartEntity queryParams);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1981,8 +1981,8 @@ public class SysBaseApiImpl implements ISysBaseAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysDepartEntity> queryAllAuditPassOrg(SysDepartEntity queryParams){
|
public List<SysDepartEntity> queryAllOrgInfo(SysDepartEntity queryParams){
|
||||||
return sysDepartService.queryAllAuditPassOrg(queryParams);
|
return sysDepartService.queryAllOrgInfo(queryParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -1415,11 +1415,14 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysDepartEntity> queryAllAuditPassOrg(SysDepartEntity queryParams) {
|
public List<SysDepartEntity> queryAllOrgInfo(SysDepartEntity queryParams) {
|
||||||
QueryWrapper<SysDepart> qw = new QueryWrapper<>();
|
QueryWrapper<SysDepart> qw = new QueryWrapper<>();
|
||||||
qw.eq("org_category", "1");
|
qw.eq("org_category", "1");
|
||||||
qw.eq("org_type", "1");
|
qw.eq("org_type", "1");
|
||||||
qw.eq("del_flag", "0");
|
qw.eq("del_flag", "0");
|
||||||
|
if (StringUtils.isNotBlank(queryParams.getStatus())) {
|
||||||
|
qw.eq("status", queryParams.getStatus());
|
||||||
|
}
|
||||||
if (StringUtils.isNotBlank(queryParams.getOpenId())) {
|
if (StringUtils.isNotBlank(queryParams.getOpenId())) {
|
||||||
qw.eq("open_id", queryParams.getOpenId());
|
qw.eq("open_id", queryParams.getOpenId());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue