供应商审核整体流程变更
This commit is contained in:
parent
1b17c6ffa0
commit
62c37c01fa
|
|
@ -220,9 +220,10 @@ public class NuConfigSuppliersApplyController extends JeecgController<NuConfigSu
|
|||
@ApiOperation(value="供应商入驻申请-变更审核", notes="供应商入驻申请-变更审核")
|
||||
@RequestMapping(value = "/audit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> audit(@RequestBody NuConfigSuppliersApply nuConfigSuppliersApply) {
|
||||
nuConfigSuppliersApplyService.audit(nuConfigSuppliersApply);
|
||||
String orgCode = nuConfigSuppliersApplyService.audit(nuConfigSuppliersApply);
|
||||
SuppliersInfoMQDto suppliersInfoMQDto = new SuppliersInfoMQDto();
|
||||
BeanUtils.copyProperties(nuConfigSuppliersApply, suppliersInfoMQDto);
|
||||
suppliersInfoMQDto.setSysOrgCode(orgCode);
|
||||
rabbitMQUtil.sendToExchange("nu.suppliers.updateAuditResult", "nu.suppliers.updateAuditResult", suppliersInfoMQDto);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,5 +16,5 @@ public interface INuConfigSuppliersApplyService extends IService<NuConfigSupplie
|
|||
|
||||
List<Map<String, Object>> getModifyInfo(NuConfigSuppliersApply suppliersApply);
|
||||
|
||||
void audit(NuConfigSuppliersApply nuConfigSuppliersApply);
|
||||
String audit(NuConfigSuppliersApply nuConfigSuppliersApply);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public class NuConfigSuppliersApplyServiceImpl extends ServiceImpl<NuConfigSuppl
|
|||
}
|
||||
|
||||
@Override
|
||||
public void audit(NuConfigSuppliersApply nuConfigSuppliersApply) {
|
||||
public String audit(NuConfigSuppliersApply nuConfigSuppliersApply) {
|
||||
//变更后数据
|
||||
NuConfigSuppliersApply one = baseMapper.selectById(nuConfigSuppliersApply.getId());
|
||||
|
||||
|
|
@ -134,5 +134,7 @@ public class NuConfigSuppliersApplyServiceImpl extends ServiceImpl<NuConfigSuppl
|
|||
apply.setApplyContent(nuConfigSuppliersApply.getApplyContent());
|
||||
}
|
||||
baseMapper.updateById(apply);
|
||||
|
||||
return one.getSysOrgCode();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,4 +39,18 @@ public class DynamicQueueNameProvider {
|
|||
public String getEditSuppApply() {
|
||||
return getEditSuppliersApply();
|
||||
}
|
||||
|
||||
public String getUpSuppliersInfo() {
|
||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
String orgCode = deptInfo.getString("code");
|
||||
if (StringUtils.isNotBlank(orgCode)) {
|
||||
return orgCode + ".suppliers.upSuppliersInfo";
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public String getUpSuppApplyInfoKey() {
|
||||
return getUpSuppliersInfo();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,6 +114,33 @@ public class SuppliersMQListener {
|
|||
|
||||
}
|
||||
|
||||
@AutoLog(value = "供应商-信息变更通过")
|
||||
@RabbitListener(
|
||||
bindings = @QueueBinding(
|
||||
value = @Queue(name = "#{suppliersDQNP.getUpSuppliersInfo()}"),
|
||||
exchange = @Exchange(name = "nu.suppliers.upSuppliersInfo", type = ExchangeTypes.DIRECT),
|
||||
key = "#{suppliersDQNP.getUpSuppApplyInfoKey()}"
|
||||
),
|
||||
errorHandler = "suppliersMQExceptionHandler"
|
||||
)
|
||||
public void upSuppliersInfo(SuppliersInfoMQDto suppliersInfoMQDto) {
|
||||
try {
|
||||
ConfigSuppliersInfo configSuppliersInfo = new ConfigSuppliersInfo();
|
||||
configSuppliersInfo.setId(suppliersInfoMQDto.getSuppliersId());
|
||||
configSuppliersInfo.setSuppliersName(suppliersInfoMQDto.getSuppliersName());//供应商名称
|
||||
configSuppliersInfo.setSuppliersNature(suppliersInfoMQDto.getSuppliersNature());//供应商性质
|
||||
configSuppliersInfo.setSuppliersAddress(suppliersInfoMQDto.getSuppliersAddress());//供应商地址
|
||||
configSuppliersInfo.setPersonInCharge(suppliersInfoMQDto.getPersonInCharge());//负责人
|
||||
configSuppliersInfo.setContactNumber(suppliersInfoMQDto.getContactNumber());//联系电话
|
||||
configSuppliersInfo.setOpeningBank(suppliersInfoMQDto.getOpeningBank());//开户行
|
||||
configSuppliersInfo.setOpeningBankNo(suppliersInfoMQDto.getOpeningBankNo());//开户行账号
|
||||
configSuppliersInfo.setImgPath(suppliersInfoMQDto.getImgPath());//资质照片
|
||||
configSuppliersInfoService.updateById(configSuppliersInfo);
|
||||
System.out.println("保存成功");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue