|
@@ -26,6 +26,7 @@ import com.fdkankan.contro.bean.SendCallAlgorithmDetail;
|
|
|
import com.fdkankan.contro.common.Result;
|
|
|
import com.fdkankan.contro.constant.RedisConstants;
|
|
|
import com.fdkankan.contro.entity.*;
|
|
|
+import com.fdkankan.contro.httpclient.MyClient;
|
|
|
import com.fdkankan.contro.mapper.ISceneFileBuildMapper;
|
|
|
import com.fdkankan.contro.service.*;
|
|
|
import com.fdkankan.contro.vo.ResponseSceneFile;
|
|
@@ -86,6 +87,8 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
|
|
|
private static final String zipPassword = "a3ad34136de359536af553f9e7f3cefd";
|
|
|
|
|
|
+ private static final String URL_ADD_UCENTER_USER = "/service/manage/inner/addUcenterUser";
|
|
|
+
|
|
|
@Value("${main.url}")
|
|
|
private String mainUrl;
|
|
|
@Value("${fyun.type}")
|
|
@@ -118,6 +121,9 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
@Value("${build.notSupport.beforeTime:202203}")
|
|
|
private String jgNotSupportBuildTime;
|
|
|
|
|
|
+ @Value("${4dkk.fdService.basePath}")
|
|
|
+ private String fdServiceUrl;
|
|
|
+
|
|
|
@Autowired
|
|
|
private RedisUtil redisUtil;
|
|
|
|
|
@@ -206,6 +212,9 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
@Autowired
|
|
|
private IFdkkLaserService fdkkLaserService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private MyClient myClient;
|
|
|
+
|
|
|
@Override
|
|
|
public SceneFileBuild findByFileId(String fileId) {
|
|
|
|
|
@@ -2086,6 +2095,8 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
JSONObject configJson = JSONObject.parseObject(FileUtils.readFile(configJsonPath));
|
|
|
String folderName = configJson.getString("id");
|
|
|
String customUserId = configJson.getString("customUserId");
|
|
|
+ String customUserName = configJson.getString("customUserName");
|
|
|
+ String customUserPwd = configJson.getString("customUserPwd");
|
|
|
if(StrUtil.isBlank(folderName) || StrUtil.isBlank(snCode)){
|
|
|
throw new RuntimeException("config.json 文件有误!");
|
|
|
}
|
|
@@ -2113,6 +2124,19 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
scenePre.setUpdateTime(new Date());
|
|
|
scenePreService.updateById(scenePre);
|
|
|
log.info("文件上传成功,开始通知计算");
|
|
|
+
|
|
|
+ //如果用户不存在,则注册用户
|
|
|
+ User user = userService.getByUserName(customUserName);
|
|
|
+ if(Objects.isNull(user)){
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
+ params.put("ryId", customUserId);
|
|
|
+ params.put("ryNo", customUserName);
|
|
|
+ params.put("nickName", customUserName);
|
|
|
+ params.put("password", customUserName);
|
|
|
+ String url = fdServiceUrl.concat(URL_ADD_UCENTER_USER);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
// 通知计算
|
|
|
this.copyDataAndBuild(null, dataSource, "V4", null, customUserId);
|
|
|
log.info("通知计算成功");
|