|
@@ -94,8 +94,15 @@ public class RmsConsigneeServiceImpl implements IRmsConsigneeService {
|
|
// 传json格式
|
|
// 传json格式
|
|
// String json = JSONUtils.toJSONString(ssoMap);
|
|
// String json = JSONUtils.toJSONString(ssoMap);
|
|
// String s = HttpUtil.doJsonPost("https://wl.dasteel.cn:32322/icore.icp.web/pass/v1/sysusers/", json, token);
|
|
// String s = HttpUtil.doJsonPost("https://wl.dasteel.cn:32322/icore.icp.web/pass/v1/sysusers/", json, token);
|
|
- // 传formData格式--URL?参数&参数
|
|
|
|
- Map<String, Object> resultMap = ssoFeign.addUser("Bearer " + token,consigneeCompanyName, consigneeCompanyName, "shouhuokehu", "收货客户", "506514577756917769", "713710108567277568", "958023746726268928");
|
|
|
|
|
|
+ Map<String, Object> resultMap;
|
|
|
|
+ if (consigneeCompanyName.length() > 15 ) {
|
|
|
|
+ // 传formData格式--URL?参数&参数
|
|
|
|
+ resultMap = ssoFeign.addUser("Bearer " + token, consigneeCompanyName.substring(0,7), consigneeCompanyName.substring(0,7), "shouhuokehu", "收货客户", "506514577756917769", "713710108567277568", "958023746726268928");
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ // 传formData格式--URL?参数&参数
|
|
|
|
+ resultMap = ssoFeign.addUser("Bearer " + token, consigneeCompanyName, consigneeCompanyName, "shouhuokehu", "收货客户", "506514577756917769", "713710108567277568", "958023746726268928");
|
|
|
|
+ }
|
|
// 赋权
|
|
// 赋权
|
|
String code = (String) resultMap.get("code");
|
|
String code = (String) resultMap.get("code");
|
|
String userId = null;
|
|
String userId = null;
|
|
@@ -106,7 +113,7 @@ public class RmsConsigneeServiceImpl implements IRmsConsigneeService {
|
|
if (userId != null) {
|
|
if (userId != null) {
|
|
ssoFeign.addUserroles("Bearer " + token,userId, consigneeCompanyName, "958038344527384576");
|
|
ssoFeign.addUserroles("Bearer " + token,userId, consigneeCompanyName, "958038344527384576");
|
|
rmsConsignee.setConsigneeSsoId(userId);
|
|
rmsConsignee.setConsigneeSsoId(userId);
|
|
- rmsConsignee.setConsigneeSsoCode(consigneeCompanyName);
|
|
|
|
|
|
+ rmsConsignee.setConsigneeSsoCode(consigneeCompanyName.length() > 15 ? consigneeCompanyName.substring(0,7) : consigneeCompanyName);
|
|
}
|
|
}
|
|
int result = 0;
|
|
int result = 0;
|
|
List<RmsConsignee> rmsRmsConsignees = rmsConsigneeMapper.selectByParameters(map);
|
|
List<RmsConsignee> rmsRmsConsignees = rmsConsigneeMapper.selectByParameters(map);
|