MESDataServiceImpl.java 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. package com.uas.eis.serviceImpl;
  2. import com.uas.eis.core.config.SpObserver;
  3. import com.uas.eis.dao.BaseDao;
  4. import com.uas.eis.entity.ErrorMessage;
  5. import com.uas.eis.exception.ApiSystemException;
  6. import com.uas.eis.sdk.entity.ApiResult;
  7. import com.uas.eis.sdk.resp.ApiResponse;
  8. import com.uas.eis.service.MESDataService;
  9. import com.uas.eis.utils.*;
  10. import org.apache.commons.io.FileUtils;
  11. import org.apache.commons.lang.StringUtils;
  12. import org.springframework.beans.factory.annotation.Autowired;
  13. import org.springframework.beans.factory.annotation.Value;
  14. import org.springframework.stereotype.Service;
  15. import org.springframework.transaction.annotation.Transactional;
  16. import org.springframework.web.multipart.MultipartFile;
  17. import java.io.File;
  18. import java.io.IOException;
  19. import java.sql.Timestamp;
  20. import java.util.*;
  21. @Service
  22. public class MESDataServiceImpl implements MESDataService {
  23. @Autowired
  24. private BaseDao baseDao;
  25. @Value("${spring.datasource.username}")
  26. private String username;
  27. @Override
  28. public List<Map<Object,Object>> snStepPass(String accessKey, String requestId, String data) {
  29. String AE_MASTER = checkAccessKey(accessKey, requestId);
  30. List<Map<Object, Object>> maps = BaseUtil.parseGridStoreToMaps(data);
  31. SpObserver.putSp(AE_MASTER);
  32. List<Map<Object, Object>> relist = new ArrayList<>();
  33. for (Map<Object, Object> map : maps) {
  34. Map<Object, Object> remap = new HashMap<>();
  35. String remark = "";
  36. int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from TEMP_STEPPASSED where sp_id=? and nvl(t_status,'W')='W' ",Integer.class,map.get("SP_ID"));
  37. remap.put("id",map.get("SP_ID"));
  38. if(cn>0){
  39. map.put("T_STATUS","D");
  40. map.put("T_REMAKR","重复");
  41. remark = "重复";
  42. }else{
  43. map.put("T_STATUS","W");
  44. }
  45. map.put("T_KEY",accessKey);
  46. map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
  47. try {
  48. baseDao.execute(SqlUtil.getInsertSqlByMap(map,"TEMP_STEPPASSED"));
  49. remap.put("result","OK");
  50. remap.put("remark",remark);
  51. }catch (Exception e){
  52. remap.put("result","NG");
  53. remap.put("remark",e.getMessage());
  54. e.printStackTrace();
  55. }
  56. relist.add(remap);
  57. }
  58. //baseDao.execute(SqlUtil.getInsertSqlbyGridStore(maps, "TEMP_STEPPASSED"));
  59. //baseDao.execute("update temp_steppassed set t_status='D',T_REMAKR='重复' where t_id in (select t_id from (select temp_steppassed.*,row_number()over(partition by sp_id order by t_id desc) cn from temp_steppassed where nvl(t_status,'W')='W' ) where cn>1)");
  60. SpObserver.putSp(username);
  61. return relist;
  62. }
  63. @Override
  64. public List<Map<Object,Object>> snInfo(String accessKey, String requestId, String data) {
  65. String AE_MASTER = checkAccessKey(accessKey, requestId);
  66. List<Map<Object, Object>> maps = BaseUtil.parseGridStoreToMaps(data);
  67. SpObserver.putSp(AE_MASTER);
  68. List<Map<Object, Object>> relist = new ArrayList<>();
  69. for (Map<Object, Object> map : maps) {
  70. Map<Object, Object> remap = new HashMap<>();
  71. String remark = "";
  72. int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from TEMP_SNINFO where SI_ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("SI_ID"));
  73. remap.put("id",map.get("SI_ID"));
  74. if(cn>0){
  75. map.put("T_STATUS","D");
  76. map.put("T_REMAKR","重复");
  77. remark = "重复";
  78. }else{
  79. map.put("T_STATUS","W");
  80. }
  81. map.put("T_KEY",accessKey);
  82. map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
  83. try {
  84. baseDao.execute(SqlUtil.getInsertSqlByMap(map,"TEMP_SNINFO"));
  85. remap.put("result","OK");
  86. remap.put("remark",remark);
  87. }catch (Exception e){
  88. remap.put("result","NG");
  89. remap.put("remark",e.getMessage());
  90. e.printStackTrace();
  91. }
  92. relist.add(remap);
  93. }
  94. SpObserver.putSp(username);
  95. return relist;
  96. }
  97. @Override
  98. public List<Map<Object,Object>> makeSnRelation(String accessKey, String requestId, String data) {
  99. String AE_MASTER = checkAccessKey(accessKey, requestId);
  100. List<Map<Object, Object>> maps = BaseUtil.parseGridStoreToMaps(data);
  101. SpObserver.putSp(AE_MASTER);
  102. List<Map<Object, Object>> relist = new ArrayList<>();
  103. for (Map<Object, Object> map : maps) {
  104. Map<Object, Object> remap = new HashMap<>();
  105. String remark = "";
  106. int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from TEMP_MAKESNRELATION where ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("ID"));
  107. remap.put("id",map.get("ID"));
  108. if(cn>0){
  109. map.put("T_STATUS","D");
  110. map.put("T_REMAKR","重复");
  111. remark = "重复";
  112. }else{
  113. map.put("T_STATUS","W");
  114. }
  115. map.put("T_KEY",accessKey);
  116. map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
  117. try {
  118. baseDao.execute(SqlUtil.getInsertSqlByMap(map,"TEMP_MAKESNRELATION"));
  119. remap.put("result","OK");
  120. remap.put("remark",remark);
  121. }catch (Exception e){
  122. remap.put("result","NG");
  123. remap.put("remark",e.getMessage());
  124. e.printStackTrace();
  125. }
  126. relist.add(remap);
  127. }
  128. SpObserver.putSp(username);
  129. return relist;
  130. }
  131. @Override
  132. public List<Map<Object,Object>> MAKEBAD(String accessKey, String requestId, String data) {
  133. String AE_MASTER = checkAccessKey(accessKey, requestId);
  134. List<Map<Object, Object>> maps = BaseUtil.parseGridStoreToMaps(data);
  135. SpObserver.putSp(AE_MASTER);
  136. List<Map<Object, Object>> relist = new ArrayList<>();
  137. for (Map<Object, Object> map : maps) {
  138. Map<Object, Object> remap = new HashMap<>();
  139. String remark = "";
  140. int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from TEMP_MAKEBAD where MB_CODE=? and nvl(t_status,'W')='W' ",Integer.class,map.get("MB_CODE"));
  141. remap.put("id",map.get("MB_CODE"));
  142. if(cn>0){
  143. map.put("T_STATUS","D");
  144. map.put("T_REMAKR","重复");
  145. remark = "重复";
  146. }else{
  147. map.put("T_STATUS","W");
  148. }
  149. map.put("T_KEY",accessKey);
  150. map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
  151. try {
  152. baseDao.execute(SqlUtil.getInsertSqlByMap(map,"TEMP_MAKEBAD"));
  153. remap.put("result","OK");
  154. remap.put("remark",remark);
  155. }catch (Exception e){
  156. remap.put("result","NG");
  157. remap.put("remark",e.getMessage());
  158. e.printStackTrace();
  159. }
  160. relist.add(remap);
  161. }
  162. SpObserver.putSp(username);
  163. return relist;
  164. }
  165. @Override
  166. public List<Map<Object,Object>> makeBadReason(String accessKey, String requestId, String data) {
  167. String AE_MASTER = checkAccessKey(accessKey, requestId);
  168. List<Map<Object, Object>> maps = BaseUtil.parseGridStoreToMaps(data);
  169. SpObserver.putSp(AE_MASTER);
  170. List<Map<Object, Object>> relist = new ArrayList<>();
  171. for (Map<Object, Object> map : maps) {
  172. Map<Object, Object> remap = new HashMap<>();
  173. String remark = "";
  174. int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from TEMP_MAKEBADREASON where MBR_ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("MBR_ID"));
  175. remap.put("id",map.get("MBR_ID"));
  176. if(cn>0){
  177. map.put("T_STATUS","D");
  178. map.put("T_REMAKR","重复");
  179. remark = "重复";
  180. }else{
  181. map.put("T_STATUS","W");
  182. }
  183. map.put("T_KEY",accessKey);
  184. map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
  185. try {
  186. baseDao.execute(SqlUtil.getInsertSqlByMap(map,"TEMP_MAKEBADREASON"));
  187. remap.put("result","OK");
  188. remap.put("remark",remark);
  189. }catch (Exception e){
  190. remap.put("result","NG");
  191. remap.put("remark",e.getMessage());
  192. e.printStackTrace();
  193. }
  194. relist.add(remap);
  195. }
  196. SpObserver.putSp(username);
  197. return relist;
  198. }
  199. @Override
  200. public List<Map<Object,Object>> packageDetail(String accessKey, String requestId, String data) {
  201. String AE_MASTER = checkAccessKey(accessKey, requestId);
  202. List<Map<Object, Object>> maps = BaseUtil.parseGridStoreToMaps(data);
  203. SpObserver.putSp(AE_MASTER);
  204. List<Map<Object, Object>> relist = new ArrayList<>();
  205. for (Map<Object, Object> map : maps) {
  206. Map<Object, Object> remap = new HashMap<>();
  207. String remark = "";
  208. int cn = baseDao.getJdbcTemplate().queryForObject("select count(1) from TEMP_PACKAGEDETAIL where PD_ID=? and nvl(t_status,'W')='W' ",Integer.class,map.get("MBR_ID"));
  209. remap.put("id",map.get("PD_ID"));
  210. if(cn>0){
  211. map.put("T_STATUS","D");
  212. map.put("T_REMAKR","重复");
  213. remark = "重复";
  214. }else{
  215. map.put("T_STATUS","W");
  216. }
  217. map.put("T_KEY",accessKey);
  218. map.put("T_INDATE", Timestamp.valueOf(DateUtil.currentDateString(Constant.YMD_HMS)));
  219. try {
  220. baseDao.execute(SqlUtil.getInsertSqlByMap(map,"TEMP_PACKAGEDETAIL"));
  221. remap.put("result","OK");
  222. remap.put("remark",remark);
  223. }catch (Exception e){
  224. remap.put("result","NG");
  225. remap.put("remark",e.getMessage());
  226. e.printStackTrace();
  227. }
  228. relist.add(remap);
  229. }
  230. SpObserver.putSp(username);
  231. return relist;
  232. }
  233. @Override
  234. public ApiResult<List<Map<String,Object>>> getQRCode(String data) {
  235. Map<Object, Object> map = BaseUtil.parseFormStoreToMap(data);
  236. String veCode = StringUtil.nvl(map.get("veCode"), "");
  237. if ("".equals(veCode)){
  238. return ApiResponse.failRsp("10011","供应商代码不能为空!");
  239. }
  240. String prodCode = StringUtil.nvl(map.get("prodCode"), "");
  241. if ("".equals(prodCode)){
  242. return ApiResponse.failRsp("10012","物料代码不能为空!");
  243. }
  244. String machineCode = StringUtil.nvl(map.get("machineCode"), "");
  245. if ("".equals(machineCode)){
  246. return ApiResponse.failRsp("10013","机台号不能为空!");
  247. }
  248. String version = StringUtil.nvl(map.get("version"), "");
  249. if ("".equals(version)){
  250. return ApiResponse.failRsp("10014","版本号不能为空!");
  251. }
  252. String indate = StringUtil.nvl(map.get("indate"), "");
  253. if ("".equals(indate)){
  254. return ApiResponse.failRsp("10015","请确认获取条码的具体时间!");
  255. }
  256. if (baseDao.checkIf("ProdQRCode","qr_vecode='" + veCode + "' and qr_prodcode='" + prodCode + "' and qr_machinecode='" + machineCode + "' and qr_version='" + version + "' and to_char(qr_date,'yyyy-MM-dd')='"+indate+"' and nvl(qr_isobtained,0)=0")) {
  257. List<Map<String, Object>> maps = baseDao.queryForList("select to_char(qr_date,'yyyy-MM-dd') qr_date, qr_prodcode, qr_vecode, qr_version, qr_machinecode, qr_qty, qr_serianum, qr_code from ProdQRCode where qr_vecode='" + veCode + "' and qr_prodcode='" + prodCode + "' and qr_machinecode='" + machineCode + "' and qr_version='" + version + "' and to_char(qr_date,'yyyy-MM-dd')='"+indate+"' and nvl(qr_isobtained,0)=0");
  258. baseDao.execute("update ProdQRCode set qr_isobtained=-1 where qr_vecode='" + veCode + "' and qr_prodcode='" + prodCode + "' and qr_machinecode='" + machineCode + "' and qr_version='" + version + "' and to_char(qr_date,'yyyy-MM-dd')='"+indate+"' and nvl(qr_isobtained,0)=0");
  259. return ApiResponse.successRsp("0", "Success", "", maps);
  260. }else
  261. return ApiResponse.failRsp("10015","获取失败,请检查参数!");
  262. }
  263. @Override
  264. public ApiResult<String> checkQRCode(String data) {
  265. Map<Object, Object> map = BaseUtil.parseFormStoreToMap(data);
  266. String veCode = StringUtil.nvl(map.get("veCode"), "");
  267. if ("".equals(veCode)){
  268. return ApiResponse.failRsp("10011","供应商代码不能为空!");
  269. }
  270. String prodCode = StringUtil.nvl(map.get("prodCode"), "");
  271. if ("".equals(prodCode)){
  272. return ApiResponse.failRsp("10012","物料代码不能为空!");
  273. }
  274. String machineCode = StringUtil.nvl(map.get("machineCode"), "");
  275. if ("".equals(machineCode)){
  276. return ApiResponse.failRsp("10013","机台号不能为空!");
  277. }
  278. String version = StringUtil.nvl(map.get("version"), "");
  279. if ("".equals(version)){
  280. return ApiResponse.failRsp("10014","版本号不能为空!");
  281. }
  282. String indate = StringUtil.nvl(map.get("indate"), "");
  283. if ("".equals(indate)){
  284. return ApiResponse.failRsp("10015","请确认获取条码的具体时间!");
  285. }
  286. String QRCode = StringUtil.nvl(map.get("QRCode"), "");
  287. if ("".equals(QRCode)){
  288. return ApiResponse.failRsp("10016","条码不能为空!");
  289. }
  290. if (baseDao.checkIf("ProdQRCode","qr_code='"+QRCode+"' and qr_vecode='" + veCode + "' and qr_prodcode='" + prodCode + "' and qr_machinecode='" + machineCode + "' and qr_version='" + version + "' and to_char(qr_date,'yyyy-MM-dd')='"+indate+"' and nvl(qr_isobtained,0)<>0")){
  291. baseDao.execute("update ProdQRCode set qr_ldischeck=-1,qr_ldcheckres='OK',qr_ldcheckdate=sysdate where qr_code='"+QRCode+"' and qr_vecode='" + veCode + "' and qr_prodcode='" + prodCode + "' and qr_machinecode='" + machineCode + "' and qr_version='" + version + "' and to_char(qr_date,'yyyy-MM-dd')='"+indate+"' and nvl(qr_isobtained,0)<>0");
  292. return ApiResponse.successRsp("0","Success","","OK");
  293. }else {
  294. baseDao.execute("update ProdQRCode set qr_ldischeck=-1,qr_ldcheckres='NG',qr_ldcheckdate=sysdate where qr_code='"+QRCode+"' and qr_vecode='" + veCode + "' and qr_prodcode='" + prodCode + "' and qr_machinecode='" + machineCode + "' and qr_version='" + version + "' and to_char(qr_date,'yyyy-MM-dd')='"+indate+"' and nvl(qr_isobtained,0)<>0");
  295. return ApiResponse.successRsp("0", "Success", "", "NG");
  296. }
  297. }
  298. @Override
  299. public ApiResult<String> checkDCRQRCode(String accessKey, String requestId, String data) {
  300. String AE_MASTER = checkAccessKey(accessKey, requestId);
  301. SpObserver.putSp(AE_MASTER);
  302. Map<Object, Object> map = BaseUtil.parseFormStoreToMap(data);
  303. String veCode = StringUtil.nvl(map.get("veCode"), "");
  304. if ("".equals(veCode)){
  305. return ApiResponse.failRsp("10011","供应商代码不能为空!");
  306. }
  307. String prodCode = StringUtil.nvl(map.get("prodCode"), "");
  308. if ("".equals(prodCode)){
  309. return ApiResponse.failRsp("10012","物料代码不能为空!");
  310. }
  311. String machineCode = StringUtil.nvl(map.get("machineCode"), "");
  312. if ("".equals(machineCode)){
  313. return ApiResponse.failRsp("10013","机台号不能为空!");
  314. }
  315. String version = StringUtil.nvl(map.get("version"), "");
  316. if ("".equals(version)){
  317. return ApiResponse.failRsp("10014","版本号不能为空!");
  318. }
  319. String indate = StringUtil.nvl(map.get("indate"), "");
  320. if ("".equals(indate)){
  321. return ApiResponse.failRsp("10015","请确认获取条码的具体时间!");
  322. }
  323. String QRCode = StringUtil.nvl(map.get("QRCode"), "");
  324. if ("".equals(QRCode)){
  325. return ApiResponse.failRsp("10016","条码不能为空!");
  326. }
  327. if (baseDao.checkIf("ProdQRCode","qr_code='"+QRCode+"' and qr_vecode='" + veCode + "' and qr_prodcode='" + prodCode + "' and qr_machinecode='" + machineCode + "' and qr_version='" + version + "' and to_char(qr_date,'yyyy-MM-dd')='"+indate+"' and nvl(qr_isobtained,0)<>0")){
  328. baseDao.execute("update ProdQRCode set qr_dcrischeck=-1,qr_dcrcheckres='OK',qr_dcrcheckdate=sysdate where qr_code='"+QRCode+"' and qr_vecode='" + veCode + "' and qr_prodcode='" + prodCode + "' and qr_machinecode='" + machineCode + "' and qr_version='" + version + "' and to_char(qr_date,'yyyy-MM-dd')='"+indate+"' and nvl(qr_isobtained,0)<>0");
  329. return ApiResponse.successRsp("0","Success",requestId,"OK");
  330. }else {
  331. baseDao.execute("update ProdQRCode set qr_dcrischeck=-1,qr_dcrcheckres='OK',qr_dcrcheckdate=sysdate where qr_code='"+QRCode+"' and qr_vecode='" + veCode + "' and qr_prodcode='" + prodCode + "' and qr_machinecode='" + machineCode + "' and qr_version='" + version + "' and to_char(qr_date,'yyyy-MM-dd')='"+indate+"' and nvl(qr_isobtained,0)<>0");
  332. return ApiResponse.successRsp("0", "Success", requestId, "NG");
  333. }
  334. }
  335. @Override
  336. @Transactional
  337. public int saveFilePath(String accessKey, String requestId,String path, int size, String filename) {
  338. String AE_MASTER = checkAccessKey(accessKey, requestId);
  339. SpObserver.putSp(AE_MASTER);
  340. int id = baseDao.getSeqId("filepath_seq");
  341. /**
  342. * 文件名含单引号无法下载*/
  343. filename=filename.replaceAll(",", ",");
  344. baseDao.execute("INSERT INTO filepath(fp_id,fp_path,fp_size,fp_man,fp_date,fp_name) values(" + id + ",'" + path + "'," + size
  345. + ",'" + accessKey+ "'," + DateUtil.parseDateToOracleString(Constant.YMD_HMS, new Date()) + ",'" + filename
  346. + "')");
  347. baseDao.execute("insert into DCRFILEDATA (DF_ID ,DF_DATE,DF_INMAN,DF_ATTACH,DF_FILENAME)" +
  348. " select DCRFILEDATA_seq.nextval,sysdate,?,?,? from dual ",accessKey,id,filename);
  349. return id;
  350. }
  351. @Override
  352. public ApiResult<String> uploadDCRFile(String accessKey, String requestId, MultipartFile file) throws IOException {
  353. try {
  354. String filename = file.getOriginalFilename();
  355. String path = saveFile(file);
  356. int id = saveFilePath(accessKey, requestId,path, (int) file.getSize(), filename);
  357. return ApiResponse.successRsp("0", "Success", requestId, "");
  358. }catch (Exception e) {
  359. e.printStackTrace();
  360. return ApiResponse.failRsp( "10011","上传失败"+(e.getMessage().length()>400 ? e.getMessage().substring(0,400):e.getMessage()));
  361. }
  362. }
  363. @Override
  364. public ApiResult<String> DCRLogExcel(String accessKey, String requestId, String data) {
  365. try {
  366. String AE_MASTER = checkAccessKey(accessKey, requestId);
  367. SpObserver.putSp(AE_MASTER);
  368. Map<Object, Object> store = BaseUtil.parseFormStoreToMap(data);
  369. store.put("dle_id",baseDao.getSeqId("dcrlogexcel_seq"));
  370. String formSql = SqlUtil.getInsertSqlByMap(store, "DCRLogExcel");
  371. baseDao.execute(formSql);
  372. return ApiResponse.successRsp("0", "Success", requestId, "传输成功!");
  373. }catch (Exception e) {
  374. e.printStackTrace();
  375. return ApiResponse.failRsp( "10020","传输失败"+(e.getMessage().length()>400 ? e.getMessage().substring(0,400):e.getMessage()));
  376. }
  377. }
  378. private String saveFile(MultipartFile file) throws IOException {
  379. String path = "/dcr";
  380. File filep = new File(path);
  381. String fileName = file.getOriginalFilename();
  382. if (!filep.isDirectory()) {
  383. filep.mkdir();
  384. }
  385. path = path+File.separator +fileName;
  386. FileUtils.copyInputStreamToFile(file.getInputStream(),new File(path));
  387. return path;
  388. }
  389. private String checkAccessKey(String accessKey,String requestId){
  390. Object accessSecret_O = baseDao.getFieldDataByCondition("APIEMPLOYEE", "AE_SECRET", "AE_KEY='" + accessKey + "'");
  391. Object AE_MASTER = baseDao.getFieldDataByCondition("APIEMPLOYEE", "AE_MASTER", "AE_KEY='" + accessKey + "'");
  392. String accessSecret = accessSecret_O == null ? "" : accessSecret_O.toString();
  393. // 检查KEY是否合理
  394. if (StringUtils.isEmpty(accessKey) || StringUtils.isEmpty(accessSecret) || AE_MASTER== null || "".equals(AE_MASTER.toString())) {
  395. ApiResult apiResult = new ApiResult();
  396. apiResult.setCode(ErrorMessage.ACCESSKEY_ILLEGAL.getCode());
  397. apiResult.setMessage(ErrorMessage.ACCESSKEY_ILLEGAL.getMessage());
  398. apiResult.setRequestId(requestId);
  399. throw new ApiSystemException(apiResult);
  400. }
  401. return AE_MASTER.toString();
  402. }
  403. }