This commit is contained in:
YY
2025-08-05 20:04:52 +08:00
6 changed files with 33 additions and 12 deletions

View File

@ -31,15 +31,13 @@ public class FileController {
String baseUrl = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();
String oldName= file.getOriginalFilename();
Map<String, Object> response = new HashMap<>();
if(!file.isEmpty()){
String filename = fileStorageService.storeFile(file);
String fileUrl = baseUrl+"/files/" + filename;
response.put("fileName", oldName);
response.put("fileType", file.getContentType());
response.put("fileSize", file.getSize());
response.put("url", fileUrl);
response.put("filePath", uploadDir + "/"+filename);
}
String filename = fileStorageService.storeFile(file);
String fileUrl = baseUrl+"/files/" + filename;
response.put("fileName", oldName);
response.put("fileType", file.getContentType());
response.put("fileSize", file.getSize());
response.put("url", fileUrl);
response.put("filePath", uploadDir + "/"+filename);
return response;

View File

@ -106,6 +106,20 @@ public class CoscoSupplierBaseController extends BaseController {
@ApiOperation("新增数据")
@PostMapping("/addAgent")
public BaseResponse addAgent(@ApiParam(value = "对象数据", required = true) @RequestBody @Valid CoscoSupplierVo vo){
if(CoscoType.SUPPLIER_TYPE_OVS.equals(vo.getCoscoSupplierBase().getSupplierType())){
//如果是境外企业
boolean valid = supplierRegistrationService.verifySmsCode(vo.getCoscoSupplierBase().getContactsEmail(),vo.getEncryptValue());
if (!valid) {
return BaseResponse.fail("验证码错误");
}
}
if(CoscoType.SUPPLIER_TYPE_DVS.equals(vo.getCoscoSupplierBase().getSupplierType())){
//如果是境内企业
boolean valid = supplierRegistrationService.verifySmsCode(vo.getCoscoSupplierBase().getContactsPhone(),vo.getEncryptValue());
if (!valid) {
return BaseResponse.fail("验证码错误");
}
}
BaseCacheUser currentUser = TokenUtil.getCurrentUser();
String userId = currentUser.getUserId();//登录人id
CoscoSupplierBase coscoSupplierBase = vo.getCoscoSupplierBase();

View File

@ -204,7 +204,10 @@ public class CoscoSupplierBaseServiceImpl extends BaseServiceImpl<CoscoSupplierB
supplierBase.setOrgName(org.getCuCompanyName());// 设置单位名称
}
if(!ObjectUtils.isEmpty(supplierBase.getCreateBy())){
supplierBase.setCreateName(userService.getUserInfo(supplierBase.getCreateBy()).getName());
SysUser sysUser = userService.getUserInfo(supplierBase.getCreateBy());
if(!ObjectUtils.isEmpty(sysUser)){
supplierBase.setCreateName(sysUser.getName());
}
}
}
}

View File

@ -64,4 +64,9 @@ public class SupplierQualificationExpireVo {
private BasePageRequest basePageRequest;
private String categoryIds;
/**
* 资质名称
*/
private String qualificationsName;
}

View File

@ -150,11 +150,11 @@
cosco_access_supplier_category c
left join cosco_supplier_base s on c.supplier_id = s.id and s.del_flag = 'normal'
left join (
select cssc.category_id from cosco_supplierexit_supplier_category cssc
select cssc.category_id,cssc.supplier_id from cosco_supplierexit_supplier_category cssc
left join cosco_supplierexit cs on cs.id = cssc.supplierexit_id
where cs.approve_status in (0) and cs.del_flag = 'normal'
and cs.org_id = #{vo.orgId}
) as exc on c.category_id = exc.category_id
) as exc on c.category_id = exc.category_id and exc.supplier_id = s.id
where c.del_flag = 'normal' and s.access_status = 1 and exc.category_id is null
<if test="vo.supplierName != null and vo.supplierName != ''">
and s.name like concat('%', #{vo.supplierName}, '%')

View File

@ -260,6 +260,7 @@
<select id="getSupplierExitStatistics" parameterType="map"
resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificationExpireVo">
SELECT
csq.name as qualificationsName,
csq.authority,
csq.term_of_validity,
csb.NAME supplierName,