|
|
@@ -24,6 +24,7 @@ import com.yc.ship.framework.security.core.util.SecurityFrameworkUtils;
|
|
|
import com.yc.ship.framework.tenant.core.aop.TenantIgnore;
|
|
|
import com.yc.ship.framework.tenant.core.context.TenantContextHolder;
|
|
|
import com.yc.ship.framework.tenant.core.util.TenantUtils;
|
|
|
+import com.yc.ship.module.infra.api.config.ConfigApi;
|
|
|
import com.yc.ship.module.ota.controller.admin.distributor.vo.*;
|
|
|
import com.yc.ship.module.ota.controller.admin.distributorauditlog.vo.DistributorAuditLogSaveReqVO;
|
|
|
import com.yc.ship.module.ota.api.dto.DistributorRespDTO;
|
|
|
@@ -98,6 +99,9 @@ public class DistributorServiceImpl implements DistributorService {
|
|
|
@Resource
|
|
|
private OtaAuthUtils otaAuthUtils;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private ConfigApi configApi;
|
|
|
+
|
|
|
|
|
|
@Resource
|
|
|
private DistributorTypeService distributorTypeService;
|
|
|
@@ -205,9 +209,23 @@ public class DistributorServiceImpl implements DistributorService {
|
|
|
}
|
|
|
|
|
|
private String createChildNo(DistributorDO distributor) {
|
|
|
- String host = "10.1.10.105";
|
|
|
+ String host = configApi.getPlatformConfigValueByKey("dgConfig_ip");
|
|
|
+ String portStr = configApi.getPlatformConfigValueByKey("dgConfig_port");
|
|
|
+ String name = configApi.getPlatformConfigValueByKey("dgConfig_name");
|
|
|
+ String yqtNo = configApi.getPlatformConfigValueByKey("dgConfig_no");
|
|
|
+ String yqtPro = configApi.getPlatformConfigValueByKey("dgConfig_pro");
|
|
|
+ String yqtCard = configApi.getPlatformConfigValueByKey("dgConfig_card");
|
|
|
+
|
|
|
+// String host = "10.1.10.105";
|
|
|
int port = 15999;
|
|
|
- String name = "宜畅式东士煌本孔凰于慊官送";
|
|
|
+ if(StringUtils.isNotBlank(portStr)){
|
|
|
+ try {
|
|
|
+ port = Integer.parseInt(portStr);
|
|
|
+ }catch (Exception ignored){
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+// String name = "宜畅式东士煌本孔凰于慊官送";
|
|
|
Random random = new Random();
|
|
|
int randomNumber = random.nextInt(90000) + 10000;
|
|
|
String cardNo = distributor.getUserId().toString()+""+randomNumber;
|
|
|
@@ -224,7 +242,7 @@ public class DistributorServiceImpl implements DistributorService {
|
|
|
" <CCTransCode>CMLT40</CCTransCode>\n" +
|
|
|
" <ProductID>ICC</ProductID>\n" +
|
|
|
" <ChannelType>ERP</ChannelType>\n" +
|
|
|
- " <CorpNo>17999953800000028</CorpNo>\n" +
|
|
|
+ " <CorpNo>"+yqtNo+"</CorpNo>\n" +
|
|
|
" <OpNo></OpNo>\n" +
|
|
|
" <AuthNo></AuthNo>\n" +
|
|
|
" <ReqSeqNo>" + reqSeqNo + "</ReqSeqNo>\n" +
|
|
|
@@ -250,8 +268,8 @@ public class DistributorServiceImpl implements DistributorService {
|
|
|
" <ActInf>0</ActInf>\n" +
|
|
|
" </Corp>\n" +
|
|
|
" <Cmp>\n" +
|
|
|
- " <DbProv>17</DbProv>\n" +
|
|
|
- " <DbAccNo>342101046484369</DbAccNo>\n" +
|
|
|
+ " <DbProv>"+yqtPro+"</DbProv>\n" +
|
|
|
+ " <DbAccNo>"+yqtCard+"</DbAccNo>\n" +
|
|
|
" <DbLogAccNo>"+cardNo+"</DbLogAccNo>\n" +
|
|
|
" <DbCur>01</DbCur>\n" +
|
|
|
" <CrLogAccNo>0000000000</CrLogAccNo>\n" +
|