供应商审核整体流程变更

This commit is contained in:
1378012178@qq.com 2026-01-27 14:56:58 +08:00
parent baf92d1b81
commit d8fb32525b
7 changed files with 65 additions and 25 deletions

View File

@ -21,7 +21,7 @@ public interface ISuppliersApi {
SuppliersApplyEntity editSuppliers(SuppliersApplyEntity suppliersApplyEntity); SuppliersApplyEntity editSuppliers(SuppliersApplyEntity suppliersApplyEntity);
SuppliersApplyEntity getSupInfoByOpenId(String openId); SuppliersApplyEntity getSupInfoByOpenId(String openId, String orgCode);
IPage<SuppliersOrgAllEntity> getSuppliersAuditLog(Integer pageNo, Integer pageSize, String openId); IPage<SuppliersOrgAllEntity> getSuppliersAuditLog(Integer pageNo, Integer pageSize, String openId);

View File

@ -40,7 +40,7 @@
from sys_depart d from sys_depart d
left join nu_org_apply_info o on d.id = o.pk_id 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 in ('2','4','5') and d.del_flag = '0' and d.server_url is not null and s.iz_history = 'N' where 1=1 and o.status = '2' and d.del_flag = '0' and d.server_url is not null and s.iz_history = 'N'
and s.open_id = #{openId} and s.open_id = #{openId}
<if test="orgCode != null and orgCode != ''"> <if test="orgCode != null and orgCode != ''">
and d.org_code IN and d.org_code IN

View File

@ -160,6 +160,7 @@ public class NuBizSuppliersApplyServiceImpl extends ServiceImpl<NuBizSuppliersAp
//先把管理平台中间表变更为历史状态 //先把管理平台中间表变更为历史状态
UpdateWrapper<NuBizSuppliersOrg> uw = new UpdateWrapper<>(); UpdateWrapper<NuBizSuppliersOrg> uw = new UpdateWrapper<>();
uw.eq("suppliers_id", suppliersApplyEntity.getId()); uw.eq("suppliers_id", suppliersApplyEntity.getId());
uw.eq("org_code", suppliersApplyEntity.getOrgCode());
NuBizSuppliersOrg soDto = new NuBizSuppliersOrg(); NuBizSuppliersOrg soDto = new NuBizSuppliersOrg();
soDto.setIzHistory("Y"); soDto.setIzHistory("Y");
suppliersOrgService.update(soDto, uw); suppliersOrgService.update(soDto, uw);
@ -189,8 +190,7 @@ public class NuBizSuppliersApplyServiceImpl extends ServiceImpl<NuBizSuppliersAp
suppliersInfoMQDto.setSysOrgCode(suppliersApplyEntity.getApplyOrg()); suppliersInfoMQDto.setSysOrgCode(suppliersApplyEntity.getApplyOrg());
suppliersInfoMQDto.setSuppliersId(suppliersApplyEntity.getId()); suppliersInfoMQDto.setSuppliersId(suppliersApplyEntity.getId());
suppliersInfoMQDto.setApplyId(addDto.getSuppliersId()); suppliersInfoMQDto.setApplyId(addDto.getSuppliersId());
//TODO 删掉解开 rabbitMQUtil.sendToExchange("nu.suppliers.editSuppliersApply", suppliersApplyEntity.getApplyOrg() + ".suppliers.editSuppliersApply", suppliersInfoMQDto);
rabbitMQUtil.sendToExchange("nu.suppliers.editSuppliersApply", "101.suppliers.editSuppliersApply", suppliersInfoMQDto);
// rabbitMQUtil.sendToExchange("nu.suppliers.editSuppliersApply", suppliersApplyEntity.getApplyOrg() + ".suppliers.editSuppliersApply", suppliersInfoMQDto); // rabbitMQUtil.sendToExchange("nu.suppliers.editSuppliersApply", suppliersApplyEntity.getApplyOrg() + ".suppliers.editSuppliersApply", suppliersInfoMQDto);
return null; return null;
@ -225,7 +225,7 @@ public class NuBizSuppliersApplyServiceImpl extends ServiceImpl<NuBizSuppliersAp
} }
@Override @Override
public SuppliersApplyEntity getSupInfoByOpenId(String openId) { public SuppliersApplyEntity getSupInfoByOpenId(String openId, String orgCode) {
QueryWrapper<NuBizSuppliersApply> queryWrapper = new QueryWrapper<>(); QueryWrapper<NuBizSuppliersApply> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("open_id", openId); queryWrapper.eq("open_id", openId);
List<NuBizSuppliersApply> list = baseMapper.selectList(queryWrapper); List<NuBizSuppliersApply> list = baseMapper.selectList(queryWrapper);
@ -235,9 +235,21 @@ public class NuBizSuppliersApplyServiceImpl extends ServiceImpl<NuBizSuppliersAp
QueryWrapper<NuBizSuppliersOrg> qw = new QueryWrapper<>(); QueryWrapper<NuBizSuppliersOrg> qw = new QueryWrapper<>();
qw.eq("suppliers_id", list.get(0).getId()); qw.eq("suppliers_id", list.get(0).getId());
qw.eq("iz_history", "N"); qw.eq("iz_history", "N");
NuBizSuppliersOrg so = suppliersOrgService.getOne(qw); // qw.eq("org_code", orgCode);
List<NuBizSuppliersOrg> soList = suppliersOrgService.list(qw);
if (!CollectionUtils.isEmpty(soList)) {
for (int i = 0; i < soList.size(); i++) {
NuBizSuppliersOrg so = soList.get(i);
if (so.getOrgCode().equals(orgCode)) {
suppliersApplyEntity.setSuppliersStatus(so.getStatus()); suppliersApplyEntity.setSuppliersStatus(so.getStatus());
suppliersApplyEntity.setAuditContent(so.getAuditContent()); suppliersApplyEntity.setAuditContent(so.getAuditContent());
suppliersApplyEntity.setOrgCode(orgCode);
}
if("4".equals(so.getStatus())){
suppliersApplyEntity.setIzModify(true);
}
}
}
return suppliersApplyEntity; return suppliersApplyEntity;
} }
return null; return null;

View File

@ -58,7 +58,7 @@ public class WxNoticeServiceImpl extends ServiceImpl<WxNoticeMapper, WxNotice> i
QueryWrapper<WxNotice> qw = new QueryWrapper<>(); QueryWrapper<WxNotice> qw = new QueryWrapper<>();
qw.eq("open_id", openId); qw.eq("open_id", openId);
qw.eq("client_type", clientType);//哪个端(机构?员工家属) qw.eq("client_type", clientType);//哪个端(机构?员工家属)
qw.orderByDesc("iz_read");//未读在前 qw.orderByAsc("CASE WHEN iz_read = 'N' THEN 1 WHEN iz_read = 'Y' THEN 2 ELSE 3 END");//未读在前
qw.orderByDesc("create_time");//按照时间倒序 qw.orderByDesc("create_time");//按照时间倒序
List<WxNotice> wxNotices = baseMapper.selectList(page, qw); List<WxNotice> wxNotices = baseMapper.selectList(page, qw);
List<NuWxNoticeEntity> result = BeanUtil.copyToList(wxNotices, NuWxNoticeEntity.class); List<NuWxNoticeEntity> result = BeanUtil.copyToList(wxNotices, NuWxNoticeEntity.class);

View File

@ -14,6 +14,7 @@ import com.nu.modules.bizSuppliers.entity.NuBizSuppliersOrg;
import com.nu.modules.bizSuppliers.service.INuBizSuppliersApplyService; import com.nu.modules.bizSuppliers.service.INuBizSuppliersApplyService;
import com.nu.modules.bizSuppliers.service.INuBizSuppliersOrgService; import com.nu.modules.bizSuppliers.service.INuBizSuppliersOrgService;
import com.nu.modules.wxnotice.IWxNoticeApi; import com.nu.modules.wxnotice.IWxNoticeApi;
import com.nu.utils.RabbitMQUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
@ -25,6 +26,7 @@ import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map; import java.util.Map;
@Slf4j @Slf4j
@ -37,6 +39,8 @@ public class SuppliersMQListener {
private INuBizSuppliersApplyService applyService; private INuBizSuppliersApplyService applyService;
@Autowired @Autowired
private IWxNoticeApi wxNoticeApi; private IWxNoticeApi wxNoticeApi;
@Autowired
private RabbitMQUtil rabbitMQUtil;
/** /**
* 工单回执 * 工单回执
@ -132,7 +136,7 @@ public class SuppliersMQListener {
if (StringUtils.equals("modifyPass", suppliersInfoMQDto.getStatus())) { if (StringUtils.equals("modifyPass", suppliersInfoMQDto.getStatus())) {
nuBizSuppliersOrg.setStatus("2"); nuBizSuppliersOrg.setStatus("2");
} else { } else {
nuBizSuppliersOrg.setStatus("4"); nuBizSuppliersOrg.setStatus("5");
} }
nuBizSuppliersOrg.setAuditContent(suppliersInfoMQDto.getApplyContent()); nuBizSuppliersOrg.setAuditContent(suppliersInfoMQDto.getApplyContent());
nuBizSuppliersOrgService.update(nuBizSuppliersOrg, orgUW); nuBizSuppliersOrgService.update(nuBizSuppliersOrg, orgUW);
@ -151,6 +155,20 @@ public class SuppliersMQListener {
applyService.updateById(apply); applyService.updateById(apply);
} }
if (StringUtils.equals("modifyPass", suppliersInfoMQDto.getStatus())) {
//给此供应商已入住机构发通知修改信息
QueryWrapper<NuBizSuppliersOrg> qw = new QueryWrapper<>();
qw.eq("suppliers_id",suppliersInfoMQDto.getSuppliersId());
qw.groupBy("org_code");
qw.select("org_code");
List<NuBizSuppliersOrg> orgList = nuBizSuppliersOrgService.list(qw);
orgList.stream().forEach(item -> {
if(!suppliersInfoMQDto.getSysOrgCode().equals(item.getOrgCode())){
rabbitMQUtil.sendToExchange("nu.suppliers.upSuppliersInfo", item.getOrgCode() + ".suppliers.upSuppliersInfo", suppliersInfoMQDto);
}
});
}
String content1 = ""; String content1 = "";
String content2 = ""; String content2 = "";
// QueryWrapper<SysDepart> queryWrapper = new QueryWrapper<>(); // QueryWrapper<SysDepart> queryWrapper = new QueryWrapper<>();

View File

@ -26,6 +26,7 @@ public class SuppliersApi {
/** /**
* 入驻供应商 * 入驻供应商
*
* @param suppliersApplyEntity * @param suppliersApplyEntity
* @return * @return
*/ */
@ -41,6 +42,7 @@ public class SuppliersApi {
/** /**
* 修改供应商信息 * 修改供应商信息
*
* @param suppliersApplyEntity * @param suppliersApplyEntity
* @return * @return
*/ */
@ -55,6 +57,7 @@ public class SuppliersApi {
/** /**
* 获取供应商已经入驻机构的信息 * 获取供应商已经入驻机构的信息
*
* @param pageNo * @param pageNo
* @param pageSize * @param pageSize
* @param orgCode * @param orgCode
@ -79,6 +82,7 @@ public class SuppliersApi {
/** /**
* 供应商入驻机构 * 供应商入驻机构
*
* @param suppliersOrgEntity * @param suppliersOrgEntity
* @return * @return
*/ */
@ -91,6 +95,7 @@ public class SuppliersApi {
/** /**
* 获取供应商可入驻机构信息 * 获取供应商可入驻机构信息
*
* @param pageNo * @param pageNo
* @param pageSize * @param pageSize
* @param orgCode * @param orgCode
@ -115,13 +120,14 @@ public class SuppliersApi {
/** /**
* 根据openId获取供应商信息 * 根据openId获取供应商信息
*
* @param openId * @param openId
* @return * @return
*/ */
@GetMapping(value = "/getSupInfoByOpenId") @GetMapping(value = "/getSupInfoByOpenId")
public Result<SuppliersApplyEntity> getSupInfoByOpenId( public Result<SuppliersApplyEntity> getSupInfoByOpenId(
@RequestParam(value = "openId") String openId) { @RequestParam(value = "openId") String openId, @RequestParam(value = "orgCode") String orgCode) {
SuppliersApplyEntity result = suppliersApi.getSupInfoByOpenId(openId); SuppliersApplyEntity result = suppliersApi.getSupInfoByOpenId(openId, orgCode);
return Result.OK(result); return Result.OK(result);
} }

View File

@ -71,4 +71,8 @@ public class SuppliersApplyEntity implements Serializable {
private String suppliersStatus; private String suppliersStatus;
/**审核备注*/ /**审核备注*/
private java.lang.String auditContent; private java.lang.String auditContent;
private String orgCode;
public Boolean izModify;
} }