From cdaaee5a36b2785dbd9434dfb178d6001c218ab3 Mon Sep 17 00:00:00 2001 From: "1378012178@qq.com" <1378012178@qq.com> Date: Mon, 26 Jan 2026 10:55:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nu/modules/suppliers/ISuppliersApi.java | 2 +- .../entity/NuBizSuppliersApply.java | 4 + .../entity/NuBizSuppliersOrg.java | 4 + .../mapper/xml/NuBizSuppliersApplyMapper.xml | 6 +- .../impl/NuBizSuppliersApplyServiceImpl.java | 145 ++++++++++++------ .../listener/SuppliersMQListener.java | 97 +++++++++++- .../wechat/suppliers/SuppliersApi.java | 4 +- .../java/com/nu/dto/SuppliersInfoMQDto.java | 2 + .../com/nu/entity/SuppliersApplyEntity.java | 2 + .../com/nu/entity/SuppliersOrgEntity.java | 29 +--- 10 files changed, 214 insertions(+), 81 deletions(-) diff --git a/nursing-unit-admin/nu-admin-api/nu-admin-local-api/src/main/java/com/nu/modules/suppliers/ISuppliersApi.java b/nursing-unit-admin/nu-admin-api/nu-admin-local-api/src/main/java/com/nu/modules/suppliers/ISuppliersApi.java index 166d1f7..0eec834 100644 --- a/nursing-unit-admin/nu-admin-api/nu-admin-local-api/src/main/java/com/nu/modules/suppliers/ISuppliersApi.java +++ b/nursing-unit-admin/nu-admin-api/nu-admin-local-api/src/main/java/com/nu/modules/suppliers/ISuppliersApi.java @@ -25,5 +25,5 @@ public interface ISuppliersApi { IPage getSuppliersAuditLog(Integer pageNo, Integer pageSize, String openId); - boolean nameDuplicateChecked(String suppliersName); + boolean nameDuplicateChecked(SuppliersApplyEntity suppliersApplyEntity); } diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/entity/NuBizSuppliersApply.java b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/entity/NuBizSuppliersApply.java index 3bfb8d0..4b10128 100644 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/entity/NuBizSuppliersApply.java +++ b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/entity/NuBizSuppliersApply.java @@ -110,4 +110,8 @@ public class NuBizSuppliersApply implements Serializable { @Excel(name = "openId", width = 15) @ApiModelProperty(value = "openId") private java.lang.String openId; + /**是否被拒 Y被拒绝(申请审核驳回) N除了申请被驳回以外的所有情况*/ + @Excel(name = "是否被拒 Y被拒绝(申请审核驳回) N除了申请被驳回以外的所有情况", width = 15) + @ApiModelProperty(value = "是否被拒 Y被拒绝(申请审核驳回) N除了申请被驳回以外的所有情况") + private java.lang.String izRejected; } diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/entity/NuBizSuppliersOrg.java b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/entity/NuBizSuppliersOrg.java index c53fdb1..04cb040 100644 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/entity/NuBizSuppliersOrg.java +++ b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/entity/NuBizSuppliersOrg.java @@ -82,4 +82,8 @@ public class NuBizSuppliersOrg implements Serializable { @Excel(name = "是否历史数据 Y历史 N当前数据", width = 15) @ApiModelProperty(value = "是否历史数据 Y历史 N当前数据") private java.lang.String izHistory; + /**审核机构 */ + @Excel(name = "审核机构", width = 15) + @ApiModelProperty(value = "审核机构") + private String applyOrg; } diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/mapper/xml/NuBizSuppliersApplyMapper.xml b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/mapper/xml/NuBizSuppliersApplyMapper.xml index 5d3e9c1..350fd64 100644 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/mapper/xml/NuBizSuppliersApplyMapper.xml +++ b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/mapper/xml/NuBizSuppliersApplyMapper.xml @@ -15,7 +15,7 @@ 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 and s.iz_history = 'N' and s.open_id = #{openId} - where 1=1 and d.server_url is not null and o.status = '2' and d.del_flag = '0' + where 1=1 and d.server_url is not null and o.status = '2' and d.del_flag = '0' and d.org_code IN @@ -40,7 +40,7 @@ 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 - where 1=1 and o.status = '2' and d.del_flag = '0' and d.server_url is not null and s.iz_history = 'N' + 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' and s.open_id = #{openId} and d.org_code IN @@ -70,4 +70,4 @@ where 1=1 and o.status = '2' and d.del_flag = '0' and d.server_url is not null and s.open_id = #{openId} - \ No newline at end of file + diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/service/impl/NuBizSuppliersApplyServiceImpl.java b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/service/impl/NuBizSuppliersApplyServiceImpl.java index f06734a..b1d7f64 100644 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/service/impl/NuBizSuppliersApplyServiceImpl.java +++ b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/modules/bizSuppliers/service/impl/NuBizSuppliersApplyServiceImpl.java @@ -15,10 +15,12 @@ import com.nu.modules.bizSuppliers.entity.NuBizSuppliersOrg; import com.nu.modules.bizSuppliers.mapper.NuBizSuppliersApplyMapper; import com.nu.modules.bizSuppliers.mapper.NuBizSuppliersOrgMapper; import com.nu.modules.bizSuppliers.service.INuBizSuppliersApplyService; +import com.nu.modules.bizSuppliers.service.INuBizSuppliersOrgService; import com.nu.modules.orgapplyinfo.entity.OrgAllInfo; import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity; import com.nu.modules.suppliers.ISuppliersApi; import com.nu.utils.RabbitMQUtil; +import org.apache.commons.lang.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -31,7 +33,7 @@ import java.util.List; /** * @Description: 供应商信息 * @Author: jeecg-boot - * @Date: 2025-12-22 + * @Date: 2025-12-22 * @Version: V1.0 */ @Service @@ -42,25 +44,36 @@ public class NuBizSuppliersApplyServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("open_id", suppliersApplyEntity.getOpenId()); - List list = baseMapper.selectList(queryWrapper); - if (list.size() > 0) { - BeanUtils.copyProperties(list.get(0), suppliersApplyEntity); - return suppliersApplyEntity; - } +// QueryWrapper queryWrapper = new QueryWrapper<>(); +// queryWrapper.eq("open_id", suppliersApplyEntity.getOpenId()); +// List list = baseMapper.selectList(queryWrapper); +// if (list.size() > 0) { +// BeanUtils.copyProperties(list.get(0), suppliersApplyEntity); +// return suppliersApplyEntity; +// } NuBizSuppliersApply nuBizSuppliersApply = new NuBizSuppliersApply(); - BeanUtils.copyProperties(suppliersApplyEntity, nuBizSuppliersApply); - baseMapper.insert(nuBizSuppliersApply); + if (StringUtils.isNotBlank(suppliersApplyEntity.getId())) { + //上次申请被拒绝 + BeanUtils.copyProperties(suppliersApplyEntity, nuBizSuppliersApply); + nuBizSuppliersApply.setIzRejected("N"); + baseMapper.updateById(nuBizSuppliersApply); + } else { + //第一次申请 + BeanUtils.copyProperties(suppliersApplyEntity, nuBizSuppliersApply); + nuBizSuppliersApply.setIzRejected("N"); + baseMapper.insert(nuBizSuppliersApply); + } - //修改此用户信息咨询表iz_jg标识为Y(是机构) + //修改此用户信息咨询表iz_gys(是否供应商)置为Y EmployeesAdvisoryInfoEntity edEntity = new EmployeesAdvisoryInfoEntity(); edEntity.setOpenId(suppliersApplyEntity.getOpenId()); edEntity.setIzGys("Y"); @@ -93,7 +106,7 @@ public class NuBizSuppliersApplyServiceImpl extends ServiceImpl 0) { BeanUtils.copyProperties(listOrg.get(0), suppliersOrgEntity); return suppliersOrgEntity; - }else{ + } else { //修改原来的数据都改为历史数据 UpdateWrapper updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("open_id", suppliersOrgEntity.getOpenId()); @@ -111,9 +124,9 @@ public class NuBizSuppliersApplyServiceImpl extends ServiceImpl uw = new UpdateWrapper<>(); + uw.eq("suppliers_id",suppliersApplyEntity.getId()); + NuBizSuppliersOrg soDto = new NuBizSuppliersOrg(); + soDto.setIzHistory("Y"); + suppliersOrgService.update(soDto,uw); + + //插入新的数据 + NuBizSuppliersOrg addDto = new NuBizSuppliersOrg(); + addDto.setOpenId(suppliersApplyEntity.getOpenId()); + addDto.setSuppliersId(suppliersApplyEntity.getId()); + addDto.setOrgCode(suppliersApplyEntity.getApplyOrg()); + addDto.setStatus("4");//变更申请 + addDto.setApplyOrg(suppliersApplyEntity.getApplyOrg()); + addDto.setIzHistory("N"); + + suppliersOrgService.save(addDto); + + //通知业务平台去审核 + SuppliersInfoMQDto suppliersInfoMQDto = new SuppliersInfoMQDto(); + suppliersInfoMQDto.setSuppliersName(suppliersApplyEntity.getSuppliersName()); + suppliersInfoMQDto.setSuppliersNature(suppliersApplyEntity.getSuppliersNature()); + suppliersInfoMQDto.setSuppliersAddress(suppliersApplyEntity.getSuppliersAddress()); + suppliersInfoMQDto.setPersonInCharge(suppliersApplyEntity.getPersonInCharge()); + suppliersInfoMQDto.setContactNumber(suppliersApplyEntity.getContactNumber()); + suppliersInfoMQDto.setSupplyState(suppliersApplyEntity.getSupplyState()); + suppliersInfoMQDto.setOpeningBank(suppliersApplyEntity.getOpeningBank()); + suppliersInfoMQDto.setOpeningBankNo(suppliersApplyEntity.getOpeningBankNo()); + suppliersInfoMQDto.setImgPath(suppliersApplyEntity.getImgPath()); + suppliersInfoMQDto.setSysOrgCode(suppliersApplyEntity.getApplyOrg()); + suppliersInfoMQDto.setSuppliersId(suppliersApplyEntity.getId()); + suppliersInfoMQDto.setApplyId(addDto.getSuppliersId()); + //TODO 删掉解开 + rabbitMQUtil.sendToExchange("nu.suppliers.editSuppliersApply", "101.suppliers.editSuppliersApply", suppliersInfoMQDto); +// rabbitMQUtil.sendToExchange("nu.suppliers.editSuppliersApply", suppliersApplyEntity.getApplyOrg() + ".suppliers.editSuppliersApply", suppliersInfoMQDto); + return null; + +// baseMapper.updateById(nuBizSuppliersApply); - - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("status", "2"); - queryWrapper.eq("iz_history", "N"); - List list = nuBizSuppliersOrgMapper.selectList(queryWrapper); - for(NuBizSuppliersOrg nuBizSuppliersOrg:list){ - //todo 修改对应机构的供应商数据 - SuppliersInfoMQDto suppliersInfoMQDto = new SuppliersInfoMQDto(); - suppliersInfoMQDto.setSuppliersName(nuBizSuppliersApply.getSuppliersName()); - suppliersInfoMQDto.setSuppliersNature(nuBizSuppliersApply.getSuppliersNature()); - suppliersInfoMQDto.setSuppliersAddress(nuBizSuppliersApply.getSuppliersAddress()); - suppliersInfoMQDto.setPersonInCharge(nuBizSuppliersApply.getPersonInCharge()); - suppliersInfoMQDto.setContactNumber(nuBizSuppliersApply.getContactNumber()); - suppliersInfoMQDto.setSupplyState(nuBizSuppliersApply.getSupplyState()); - suppliersInfoMQDto.setOpeningBank(nuBizSuppliersApply.getOpeningBank()); - suppliersInfoMQDto.setOpeningBankNo(nuBizSuppliersApply.getOpeningBankNo()); - suppliersInfoMQDto.setImgPath(nuBizSuppliersApply.getImgPath()); -// suppliersInfoMQDto.setApplyStatus("1"); - suppliersInfoMQDto.setSysOrgCode(nuBizSuppliersOrg.getOrgCode()); - suppliersInfoMQDto.setSuppliersId(nuBizSuppliersApply.getId()); - rabbitMQUtil.sendToExchange("nu.suppliers.editSuppliersApply", nuBizSuppliersOrg.getOrgCode() + ".suppliers.editSuppliersApply", suppliersInfoMQDto); - } - - - - BeanUtils.copyProperties(nuBizSuppliersApply, suppliersApplyEntity); - return suppliersApplyEntity; +// QueryWrapper queryWrapper = new QueryWrapper<>(); +// queryWrapper.eq("status", "2"); +// queryWrapper.eq("iz_history", "N"); +// List list = nuBizSuppliersOrgMapper.selectList(queryWrapper); +// for (NuBizSuppliersOrg nuBizSuppliersOrg : list) { +// //todo 修改对应机构的供应商数据 +// SuppliersInfoMQDto suppliersInfoMQDto = new SuppliersInfoMQDto(); +// suppliersInfoMQDto.setSuppliersName(nuBizSuppliersApply.getSuppliersName()); +// suppliersInfoMQDto.setSuppliersNature(nuBizSuppliersApply.getSuppliersNature()); +// suppliersInfoMQDto.setSuppliersAddress(nuBizSuppliersApply.getSuppliersAddress()); +// suppliersInfoMQDto.setPersonInCharge(nuBizSuppliersApply.getPersonInCharge()); +// suppliersInfoMQDto.setContactNumber(nuBizSuppliersApply.getContactNumber()); +// suppliersInfoMQDto.setSupplyState(nuBizSuppliersApply.getSupplyState()); +// suppliersInfoMQDto.setOpeningBank(nuBizSuppliersApply.getOpeningBank()); +// suppliersInfoMQDto.setOpeningBankNo(nuBizSuppliersApply.getOpeningBankNo()); +// suppliersInfoMQDto.setImgPath(nuBizSuppliersApply.getImgPath()); +//// suppliersInfoMQDto.setApplyStatus("1"); +// suppliersInfoMQDto.setSysOrgCode(nuBizSuppliersOrg.getOrgCode()); +// suppliersInfoMQDto.setSuppliersId(nuBizSuppliersApply.getId()); +// rabbitMQUtil.sendToExchange("nu.suppliers.editSuppliersApply", nuBizSuppliersOrg.getOrgCode() + ".suppliers.editSuppliersApply", suppliersInfoMQDto); +// } +// +// +// BeanUtils.copyProperties(nuBizSuppliersApply, suppliersApplyEntity); +// return suppliersApplyEntity; } @Override @@ -199,13 +245,18 @@ public class NuBizSuppliersApplyServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("suppliers_name",suppliersName); + if (StringUtils.isNotBlank(suppliersApplyEntity.getId())) { + queryWrapper.ne("id", suppliersApplyEntity.getId()); + } + queryWrapper.eq("suppliers_name", suppliersApplyEntity.getSuppliersName()); + queryWrapper.eq("iz_rejected", "N");//不包含已拒绝供应商 List nuBizSuppliersApplies = baseMapper.selectList(queryWrapper); - if(CollectionUtils.isEmpty(nuBizSuppliersApplies)){ + if (CollectionUtils.isEmpty(nuBizSuppliersApplies)) { return false; - }else{ + } else { return true; } } diff --git a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/mq/suppliers/listener/SuppliersMQListener.java b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/mq/suppliers/listener/SuppliersMQListener.java index 51b3681..ffe85ce 100644 --- a/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/mq/suppliers/listener/SuppliersMQListener.java +++ b/nursing-unit-admin/nu-admin-biz/src/main/java/com/nu/mq/suppliers/listener/SuppliersMQListener.java @@ -2,13 +2,16 @@ package com.nu.mq.suppliers.listener; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.google.common.collect.Maps; import com.nu.dto.SuppliersInfoMQDto; import com.nu.dto.WorkOrderMQDto; import com.nu.entity.NuWxNoticeEntity; import com.nu.entity.WxNoticeEntity; import com.nu.enums.WxClientType; +import com.nu.modules.bizSuppliers.entity.NuBizSuppliersApply; import com.nu.modules.bizSuppliers.entity.NuBizSuppliersOrg; +import com.nu.modules.bizSuppliers.service.INuBizSuppliersApplyService; import com.nu.modules.bizSuppliers.service.INuBizSuppliersOrgService; import com.nu.modules.wxnotice.IWxNoticeApi; import lombok.extern.slf4j.Slf4j; @@ -30,7 +33,8 @@ public class SuppliersMQListener { @Autowired private INuBizSuppliersOrgService nuBizSuppliersOrgService; - + @Autowired + private INuBizSuppliersApplyService applyService; @Autowired private IWxNoticeApi wxNoticeApi; @@ -59,6 +63,16 @@ public class SuppliersMQListener { nuBizSuppliersOrg = nuBizSuppliersOrgService.getById(nuBizSuppliersOrg.getId()); + NuBizSuppliersApply apply = new NuBizSuppliersApply(); + apply.setId(suppliersInfoMQDto.getSuppliersId()); + if (StringUtils.equals("2", nuBizSuppliersOrg.getStatus())) { + apply.setIzRejected("N"); + } else { + apply.setIzRejected("Y"); + } + if (StringUtils.isNotBlank(apply.getIzRejected())) { + applyService.updateById(apply); + } String content1 = ""; @@ -67,10 +81,10 @@ public class SuppliersMQListener { // queryWrapper.eq("org_code", nuBizSuppliersOrg.getOrgCode()); // SysDepart dto = sysDepartService.getOne(queryWrapper); //审核通过 - if(StringUtils.equals("2",nuBizSuppliersOrg.getStatus())){ + if (StringUtils.equals("2", nuBizSuppliersOrg.getStatus())) { content1 = "您好,您提交的入驻信息已通过"; content2 = "审核通过"; - }else if(StringUtils.equals("3",nuBizSuppliersOrg.getStatus())){ + } else if (StringUtils.equals("3", nuBizSuppliersOrg.getStatus())) { content1 = "您好,您提交的入驻信息已驳回"; content2 = "审核驳回"; } @@ -96,4 +110,81 @@ public class SuppliersMQListener { } + /** + * 变更审核结果 + */ + @RabbitListener( + bindings = @QueueBinding( + value = @Queue(name = "nu.suppliers.updateAuditResult"), + exchange = @Exchange(name = "nu.suppliers.updateAuditResult", type = ExchangeTypes.DIRECT), + key = "nu.suppliers.updateAuditResult" + ), + errorHandler = "suppliersMQExceptionHandler" + ) + public void updateAuditResult(SuppliersInfoMQDto suppliersInfoMQDto) { + try{ + log.info("变更审核结果: {}", suppliersInfoMQDto); + + UpdateWrapper orgUW = new UpdateWrapper<>(); + orgUW.eq("suppliers_id",suppliersInfoMQDto.getSuppliersId()); + orgUW.eq("iz_history","N"); + NuBizSuppliersOrg nuBizSuppliersOrg = new NuBizSuppliersOrg(); + if (StringUtils.equals("modifyPass", suppliersInfoMQDto.getStatus())) { + nuBizSuppliersOrg.setStatus("2"); + } else { + nuBizSuppliersOrg.setStatus("4"); + } + nuBizSuppliersOrg.setAuditContent(suppliersInfoMQDto.getApplyContent()); + nuBizSuppliersOrgService.update(nuBizSuppliersOrg,orgUW); + + if (StringUtils.equals("modifyPass", suppliersInfoMQDto.getStatus())) { + NuBizSuppliersApply apply = new NuBizSuppliersApply(); + apply.setId(suppliersInfoMQDto.getSuppliersId()); + apply.setSuppliersName(suppliersInfoMQDto.getSuppliersName());//供应商名称 + apply.setSuppliersNature(suppliersInfoMQDto.getSuppliersNature());//供应商性质 + apply.setSuppliersAddress(suppliersInfoMQDto.getSuppliersAddress());//供应商地址 + apply.setPersonInCharge(suppliersInfoMQDto.getPersonInCharge());//负责人 + apply.setContactNumber(suppliersInfoMQDto.getContactNumber());//联系电话 + apply.setOpeningBank(suppliersInfoMQDto.getOpeningBank());//开户行 + apply.setOpeningBankNo(suppliersInfoMQDto.getOpeningBankNo());//开户行账号 + apply.setImgPath(suppliersInfoMQDto.getImgPath());//资质照片 + applyService.updateById(apply); + } + + String content1 = ""; + String content2 = ""; +// QueryWrapper queryWrapper = new QueryWrapper<>(); +// queryWrapper.eq("org_code", nuBizSuppliersOrg.getOrgCode()); +// SysDepart dto = sysDepartService.getOne(queryWrapper); + //审核通过 + if (StringUtils.equals("modifyPass", suppliersInfoMQDto.getStatus())) { + content1 = "您好,您提交的信息变更已通过"; + content2 = "信息变更审核通过"; + } else if (StringUtils.equals("modifyFail", suppliersInfoMQDto.getStatus())) { + content1 = "您好,您提交的信息变更未通过"; + content2 = "信息变更审核未通过"; + } + NuWxNoticeEntity nuWxNotice = new NuWxNoticeEntity(); + nuWxNotice.setOpenId(nuBizSuppliersOrg.getOpenId()); + nuWxNotice.setIzRead("N"); + nuWxNotice.setOrgCode(nuBizSuppliersOrg.getOrgCode()); + nuWxNotice.setTitle("供应商信息变更审核"); + nuWxNotice.setContent(content1); + nuWxNotice.setType("suppliers_ausit_status"); + Map extend = Maps.newHashMap(); + extend.put("orgCode", nuBizSuppliersOrg.getOrgCode()); + extend.put("suppliersId", nuBizSuppliersOrg.getSuppliersId()); + nuWxNotice.setExtend(JSONObject.toJSONString(extend)); + nuWxNotice.setClientType(WxClientType.SUPPLIERS.getCode()); + wxNoticeApi.addNotice(nuWxNotice); + WxNoticeEntity wxNotice = new WxNoticeEntity(); + wxNotice.setPageRoute("pages/supplierindex/index"); + wxNotice.setThing2("供应商信息变更审核"); + wxNotice.setPhrase1(content2); + wxNotice.setLogMainInfo("供应商信息变更审核"); + wxNoticeApi.sendWechartMessage_SHENHE(wxNotice, nuWxNotice); + }catch(Exception e){ + e.printStackTrace(); + } + } } diff --git a/nursing-unit-api/src/main/java/com/nu/modules/wechat/suppliers/SuppliersApi.java b/nursing-unit-api/src/main/java/com/nu/modules/wechat/suppliers/SuppliersApi.java index 22f7b15..a27a07d 100644 --- a/nursing-unit-api/src/main/java/com/nu/modules/wechat/suppliers/SuppliersApi.java +++ b/nursing-unit-api/src/main/java/com/nu/modules/wechat/suppliers/SuppliersApi.java @@ -31,7 +31,7 @@ public class SuppliersApi { */ @PostMapping(value = "/addSuppliers") public Result addSuppliers(@RequestBody SuppliersApplyEntity suppliersApplyEntity) { - if(!suppliersApi.nameDuplicateChecked(suppliersApplyEntity.getSuppliersName())){ + if(suppliersApi.nameDuplicateChecked(suppliersApplyEntity)){ return Result.error("供应商名称重复"); } SuppliersApplyEntity suppliersApplyEntity1 = suppliersApi.addSuppliers(suppliersApplyEntity); @@ -46,7 +46,7 @@ public class SuppliersApi { */ @PostMapping(value = "/editSuppliers") public Result editSuppliers(@RequestBody SuppliersApplyEntity suppliersApplyEntity) { - if(!suppliersApi.nameDuplicateChecked(suppliersApplyEntity.getSuppliersName())){ + if(suppliersApi.nameDuplicateChecked(suppliersApplyEntity)){ return Result.error("供应商名称重复"); } SuppliersApplyEntity suppliersApplyEntity1 = suppliersApi.editSuppliers(suppliersApplyEntity); diff --git a/nursing-unit-common/src/main/java/com/nu/dto/SuppliersInfoMQDto.java b/nursing-unit-common/src/main/java/com/nu/dto/SuppliersInfoMQDto.java index 9519cd4..b7829dd 100644 --- a/nursing-unit-common/src/main/java/com/nu/dto/SuppliersInfoMQDto.java +++ b/nursing-unit-common/src/main/java/com/nu/dto/SuppliersInfoMQDto.java @@ -70,4 +70,6 @@ public class SuppliersInfoMQDto implements Serializable { private String applyId; /**供应商id*/ private String suppliersId; + /**变更审核结果*/ + private java.lang.String status; } diff --git a/nursing-unit-common/src/main/java/com/nu/entity/SuppliersApplyEntity.java b/nursing-unit-common/src/main/java/com/nu/entity/SuppliersApplyEntity.java index bb4736c..5bd179b 100644 --- a/nursing-unit-common/src/main/java/com/nu/entity/SuppliersApplyEntity.java +++ b/nursing-unit-common/src/main/java/com/nu/entity/SuppliersApplyEntity.java @@ -65,4 +65,6 @@ public class SuppliersApplyEntity implements Serializable { private Date updateTime; /**openId*/ private String openId; + + private String applyOrg; } diff --git a/nursing-unit-common/src/main/java/com/nu/entity/SuppliersOrgEntity.java b/nursing-unit-common/src/main/java/com/nu/entity/SuppliersOrgEntity.java index 18bca87..f72769d 100644 --- a/nursing-unit-common/src/main/java/com/nu/entity/SuppliersOrgEntity.java +++ b/nursing-unit-common/src/main/java/com/nu/entity/SuppliersOrgEntity.java @@ -16,65 +16,44 @@ import java.io.Serializable; import java.util.Date; /** - * @Description: 供应商-机构中间表 + * @Description: 供应商-机构中间表 nu_biz_suppliers_org * @Author: jeecg-boot * @Date: 2025-12-22 * @Version: V1.0 */ @Data -@TableName("nu_biz_suppliers_org") -@Accessors(chain = true) -@EqualsAndHashCode(callSuper = false) -@ApiModel(value="nu_biz_suppliers_org对象", description="供应商-机构中间表") public class SuppliersOrgEntity implements Serializable { private static final long serialVersionUID = 1L; /**id*/ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value = "id") private String id; /**微信id*/ - @Excel(name = "微信id", width = 15) - @ApiModelProperty(value = "微信id") private String openId; /**供应商nu_biz_suppliers_apply.id*/ - @Excel(name = "供应商nu_biz_suppliers_apply.id", width = 15) - @ApiModelProperty(value = "供应商nu_biz_suppliers_apply.id") private String suppliersId; /**机构编码*/ - @Excel(name = "机构编码", width = 15) - @ApiModelProperty(value = "机构编码") private String orgCode; /**创建人*/ - @ApiModelProperty(value = "创建人") private String createBy; /**创建日期*/ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "创建日期") private Date createTime; /**更新人*/ - @ApiModelProperty(value = "更新人") private String updateBy; /**更新日期*/ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @ApiModelProperty(value = "更新日期") private Date updateTime; /**是否在线 Y在线 N不在线*/ - @Excel(name = "是否在线 Y在线 N不在线", width = 15) - @ApiModelProperty(value = "是否在线 Y在线 N不在线") private String izOnline; /**申请状态 1申请中 2通过 3驳回*/ - @Excel(name = "申请状态 1申请中 2通过 3驳回", width = 15) - @ApiModelProperty(value = "申请状态 1申请中 2通过 3驳回") private String status; /**审核备注*/ - @Excel(name = "审核备注", width = 15) - @ApiModelProperty(value = "审核备注") private String auditContent; /**是否历史数据 Y历史 N当前数据*/ - @Excel(name = "是否历史数据 Y历史 N当前数据", width = 15) - @ApiModelProperty(value = "是否历史数据 Y历史 N当前数据") private String izHistory; + /**审核机构 */ + private String applyOrg; + }