fix: 提交
This commit is contained in:
		
							parent
							
								
									3ee1b98b43
								
							
						
					
					
						commit
						55155a370b
					
				| @ -1,8 +1,11 @@ | ||||
| import { getSyncData } from '../common/service/initable'; | ||||
| import request from "../common/utils/request" | ||||
| 
 | ||||
| let baseHost = globalThis.host; | ||||
| import FileUtil from '../common/utils/File'; | ||||
| import FileLog from '../pages/judgeSDK/utils/fileLog'; | ||||
| import pasteboard from '@ohos.pasteboard'; | ||||
| import Want from '@ohos.app.ability.Want'; | ||||
| 
 | ||||
| //监管接口序列号映射
 | ||||
| const gjxlhObj = { | ||||
| @ -14,31 +17,36 @@ const gjxlhObj = { | ||||
|   '17C56': '02-21-000014', | ||||
| } | ||||
| 
 | ||||
| interface WR{ | ||||
|   message?:string | ||||
|   code:number | ||||
| interface WR { | ||||
|   message?: string | ||||
|   code: number | ||||
| } | ||||
| 
 | ||||
| export default async function writeObjectOutNew(data,filePath): Promise<WR> { | ||||
| export default async function writeObjectOutNew(data, filePath, externalTransmission): Promise<WR> { | ||||
|   const fileUtil = new FileUtil(globalThis.context); | ||||
|   const {jkid , drvexam} = data; | ||||
|   const basic = await getBasicConfig(jkid); | ||||
|   const params = await getParams(jkid, drvexam); | ||||
|   const {wglb,jkxlh,glbm,jgbh,sjbs} = basic; | ||||
| 
 | ||||
|   if(filePath){ | ||||
|     await fileUtil.editFile(`${filePath}/wuxi_exam_data.txt`,JSON.stringify({ | ||||
|       wglb,jkxlh,glbm,jgbh,sjbs, | ||||
|       data:params.data, | ||||
|       file:{...params.file,param:[]}, | ||||
|   if (filePath) { | ||||
|     await fileUtil.editFile(`${filePath}/wuxi_exam_data.txt`, JSON.stringify({ | ||||
|       wglb, | ||||
|       jkxlh, | ||||
|       glbm, | ||||
|       jgbh, | ||||
|       sjbs, | ||||
|       data: params.data, | ||||
|       file: { | ||||
|         ...params.file, param: [] | ||||
|       }, | ||||
|     })); | ||||
|   } | ||||
| 
 | ||||
|   // let connectTimeout = sjbs === '02-21-000014' ?60000:1
 | ||||
|   console.info('surenjun','调用新监管') | ||||
|   console.info('surenjun', '调用新监管') | ||||
|   let temp | ||||
|   try { | ||||
|     temp = await request({ | ||||
|   let requestData = { | ||||
|     host: globalThis.JGHOST, | ||||
|     method: 'post', | ||||
|     //是否是新中心
 | ||||
| @ -63,17 +71,29 @@ export default async function writeObjectOutNew(data,filePath): Promise<WR> { | ||||
|                     </writeObjectOut> | ||||
|                  </SOAP-ENV:Body> | ||||
|                </SOAP-ENV:Envelope>`, | ||||
|     }) | ||||
|   } | ||||
|   try { | ||||
|     if (!externalTransmission) { | ||||
|       temp = await request(requestData) | ||||
|     } else { | ||||
|       let systemPasteboard = pasteboard.getSystemPasteboard() | ||||
|       let pasteData = pasteboard.createData(pasteboard.MIMETYPE_TEXT_PLAIN, JSON.stringify(requestData)) | ||||
|       await systemPasteboard.clear() | ||||
|       await systemPasteboard.setData(pasteData) | ||||
| 
 | ||||
|       temp = { | ||||
|         code: 1 | ||||
|       } | ||||
|     } | ||||
|   } catch (e) { | ||||
|     console.log("新监管错误") | ||||
|     temp = e | ||||
|   } | ||||
|   console.log("temp message: ", JSON.stringify(temp)) | ||||
|   if(filePath){ | ||||
|    await fileUtil.editFile(`${filePath}/wuxi_exam_data.txt`,JSON.stringify(temp) +`\n`); | ||||
|   if (filePath) { | ||||
|     await fileUtil.editFile(`${filePath}/wuxi_exam_data.txt`, JSON.stringify(temp) + `\n`); | ||||
|   } | ||||
|   return temp | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| export async function getParams(jkid, drvexam) { | ||||
|  | ||||
| @ -1094,7 +1094,7 @@ struct UserInfo { | ||||
|       jkid: '17C51', | ||||
|     } | ||||
|     console.info('surenjunjianguan', JSON.stringify(param)) | ||||
|     const temp = await writeObjectOut(param); | ||||
|     const temp = await writeObjectOut(param,false); | ||||
|     globalThis.lsh = this.currentUser.lsh | ||||
|     globalThis.ksyh = this.currentUser.ksy1sfzmhm | ||||
|     return temp | ||||
|  | ||||
| @ -226,7 +226,7 @@ export default struct DeductedPopup { | ||||
|         kssj: time | ||||
|       }, | ||||
|     } | ||||
|     const code = await writeObjectOut(beginData) | ||||
|     const code = await writeObjectOut(beginData,false) | ||||
|     //TODO code待处理 | ||||
|     // if (code == 1) { | ||||
|     // | ||||
| @ -257,7 +257,7 @@ export default struct DeductedPopup { | ||||
|         ksdd: decodeURI(ksdd) | ||||
|       } | ||||
|     }; | ||||
|     const code = await writeObjectOut(photoData); | ||||
|     const code = await writeObjectOut(photoData,false); | ||||
|     console.info('surenjun uploadProgressPhoto end',) | ||||
|   } | ||||
| 
 | ||||
| @ -285,7 +285,7 @@ export default struct DeductedPopup { | ||||
|         kfsj: time | ||||
|       } | ||||
|     } | ||||
|     const code = await writeObjectOut(kfData); | ||||
|     const code = await writeObjectOut(kfData,false); | ||||
|   } | ||||
| 
 | ||||
|   // 项目结束 | ||||
| @ -309,7 +309,7 @@ export default struct DeductedPopup { | ||||
|         jssj: time | ||||
|       } | ||||
|     } | ||||
|     const code = await writeObjectOut(endProjectData); | ||||
|     const code = await writeObjectOut(endProjectData,false); | ||||
|   } | ||||
| 
 | ||||
|   //考试结束 | ||||
| @ -335,7 +335,7 @@ export default struct DeductedPopup { | ||||
|         dwlc: '', | ||||
|       } | ||||
|     } | ||||
|     const code = await writeObjectOut(endData); | ||||
|     const code = await writeObjectOut(endData,false); | ||||
|   } | ||||
| 
 | ||||
|   //获取sysset表数据 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user