1.修复实有人员重复提交照片的问题
This commit is contained in:
gaoben 2021-06-28 11:06:44 +08:00
parent 522dc2d1ba
commit 3ca221446f
1 changed files with 37 additions and 0 deletions

View File

@ -1,5 +1,6 @@
package net.shapelight.modules.job.task;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -618,10 +619,36 @@ public class XaImageTask implements ITask {
// tenPersonService.updateNonal(personEntity);
// }
// }
/*
{
"sta":{
"code":"9999",
"des":"失败",
"ErrorLineParameter":"1,2,3,4,5 "
},
"datas":[
{
"Result":"第1条记录出错储过程出错ORA-20001 该人员照片已超出上报张数!ORA-06512 at TC_SZPT.PROC_T_BUILD_SYRKCBXX_PHOTO, line 32ORA-06512 at line 1"
},
{
"Result":"接收成功"
}
],
"pages":[
{
"psize":"1",
"tcount":"10",
"pno":"1",
"tsize":"0"
}
]
}
*/
if(resJson.contains("ErrorLineParameter")){
resJson = resJson.replace("(\"T","");
JSONObject resJsonObject = JSONObject.parseObject(resJson);
String errLine = resJsonObject.getJSONObject("sta").getString("ErrorLineParameter").trim();
JSONArray datas = resJsonObject.getJSONArray("datas");
if(errLine.equals("empty")){
for (TenPersonEntity recordEntity : updatePersons) {
recordEntity.setXaSyncImage(1);
@ -640,6 +667,16 @@ public class XaImageTask implements ITask {
}
}
}
if(datas!=null){
for(int i = 0;i<datas.size();i++){
JSONObject resData = (JSONObject) datas.get(i);
if(((String)resData.get("Result")).indexOf("该人员照片已超出上报张数")>0){
TenPersonEntity recordEntity = updatePersons.get(i);
recordEntity.setXaSyncImage(1);
tenPersonService.updateById(recordEntity);
}
}
}
}
}
}