添加供应管理平台和业务平台交互
This commit is contained in:
parent
548818d686
commit
9b8e03dbe2
|
|
@ -296,6 +296,7 @@ public class NuBizSuppliersApplyServiceImpl extends ServiceImpl<NuBizSuppliersAp
|
|||
info.setOpeningBank(one.getOpeningBank());//开户行
|
||||
info.setOpeningBankNo(one.getOpeningBankNo());//开户行账号
|
||||
info.setImgPath(one.getImgPath());//资质照片
|
||||
info.setOpenId(one.getOpenId());
|
||||
nuBizSuppliersInfoMapper.insert(info);
|
||||
apply.setSuppliersId(info.getId());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,10 @@ 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.NuBizSuppliersInfo;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersOrg;
|
||||
import com.nu.modules.bizSuppliers.service.INuBizSuppliersApplyService;
|
||||
import com.nu.modules.bizSuppliers.service.INuBizSuppliersInfoService;
|
||||
import com.nu.modules.bizSuppliers.service.INuBizSuppliersOrgService;
|
||||
import com.nu.modules.wxnotice.IWxNoticeApi;
|
||||
import com.nu.utils.RabbitMQUtil;
|
||||
|
|
@ -23,6 +25,7 @@ import org.springframework.amqp.rabbit.annotation.Exchange;
|
|||
import org.springframework.amqp.rabbit.annotation.Queue;
|
||||
import org.springframework.amqp.rabbit.annotation.QueueBinding;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
|
@ -41,6 +44,8 @@ public class SuppliersMQListener {
|
|||
private IWxNoticeApi wxNoticeApi;
|
||||
@Autowired
|
||||
private RabbitMQUtil rabbitMQUtil;
|
||||
@Autowired
|
||||
private INuBizSuppliersInfoService suppliersInfoService;
|
||||
|
||||
/**
|
||||
* 工单回执
|
||||
|
|
@ -208,4 +213,42 @@ public class SuppliersMQListener {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 工单回执
|
||||
*/
|
||||
@AutoLog(value = "供应商-机构拉取供应商关系")
|
||||
@RabbitListener(
|
||||
bindings = @QueueBinding(
|
||||
value = @Queue(name = "nu.suppliers.suppliersApplyAdd"),
|
||||
exchange = @Exchange(name = "nu.suppliers.suppliersApplyAdd", type = ExchangeTypes.DIRECT),
|
||||
key = "nu.suppliers.suppliersApplyAdd"
|
||||
),
|
||||
errorHandler = "suppliersMQExceptionHandler"
|
||||
)
|
||||
public void suppliersApplyAdd(SuppliersInfoMQDto suppliersInfoMQDto) {
|
||||
log.info("供应商审核回执");
|
||||
log.info("供应商审核回执: {}", suppliersInfoMQDto);
|
||||
log.info("业务处理");
|
||||
|
||||
NuBizSuppliersInfo suppliersInfo = suppliersInfoService.getById(suppliersInfoMQDto.getId());
|
||||
|
||||
NuBizSuppliersOrg nuBizSuppliersOrgYuan = nuBizSuppliersOrgService.getById(suppliersInfo.getId());
|
||||
if(nuBizSuppliersOrgYuan==null){
|
||||
NuBizSuppliersOrg nuBizSuppliersOrg = new NuBizSuppliersOrg();
|
||||
BeanUtils.copyProperties(suppliersInfoMQDto, nuBizSuppliersOrg);
|
||||
nuBizSuppliersOrg.setSuppliersId(suppliersInfo.getId());
|
||||
nuBizSuppliersOrg.setId(null);
|
||||
nuBizSuppliersOrg.setStatus("2");//直接审核通过
|
||||
nuBizSuppliersOrg.setOpenId(suppliersInfo.getOpenId());
|
||||
nuBizSuppliersOrg.setOrgCode(suppliersInfoMQDto.getSysOrgCode());
|
||||
nuBizSuppliersOrgService.save(nuBizSuppliersOrg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,4 +74,29 @@ public class SuppliersInfoMQDto implements Serializable {
|
|||
private java.lang.String status;
|
||||
/**操作类型 (入驻/变更)*/
|
||||
private java.lang.String optType;
|
||||
|
||||
|
||||
|
||||
/**微信id*/
|
||||
@Excel(name = "微信id", width = 15)
|
||||
@ApiModelProperty(value = "微信id")
|
||||
private java.lang.String openId;
|
||||
/**机构编码*/
|
||||
@Excel(name = "机构编码", width = 15)
|
||||
@ApiModelProperty(value = "机构编码")
|
||||
private java.lang.String orgCode;
|
||||
/**审核备注*/
|
||||
@Excel(name = "审核备注", width = 15)
|
||||
@ApiModelProperty(value = "审核备注")
|
||||
private java.lang.String auditContent;
|
||||
/**是否历史数据 Y历史 N当前数据*/
|
||||
@Excel(name = "是否历史数据 Y历史 N当前数据", width = 15)
|
||||
@ApiModelProperty(value = "是否历史数据 Y历史 N当前数据")
|
||||
private java.lang.String izHistory;
|
||||
/**审核机构 */
|
||||
@Excel(name = "审核机构", width = 15)
|
||||
@ApiModelProperty(value = "审核机构")
|
||||
private String applyOrg;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue