人员修改

This commit is contained in:
pengjie 2024-06-05 19:47:55 +08:00
parent ccdc9ca8ab
commit f39abe1c86

View File

@ -267,7 +267,7 @@ public class XzWorkerInfoAuditRecordController {
if (i > 0) { if (i > 0) {
builder.append(","); builder.append(",");
} }
builder.append(contract.getJSONObject(i).getString("name") + "*" + object.getJSONArray("contract").getJSONObject(0).getString("url")); builder.append(contract.getJSONObject(i).getString("name") + "*" + contract.getJSONObject(i).getString("url"));
} }
WorkerContract workerContract = new WorkerContract(); WorkerContract workerContract = new WorkerContract();
workerContract.setImageUrl(builder.toString()); workerContract.setImageUrl(builder.toString());
@ -282,10 +282,11 @@ public class XzWorkerInfoAuditRecordController {
if (i > 0) { if (i > 0) {
builder.append(","); builder.append(",");
} }
builder.append(insurance.getJSONObject(i).getString("name") + "*" + object.getJSONArray("insurance").getJSONObject(0).getString("url")); builder.append(insurance.getJSONObject(i).getString("name") + "*" + insurance.getJSONObject(i).getString("url"));
} }
WorkerInsurance workerInsurance = new WorkerInsurance(); WorkerInsurance workerInsurance = new WorkerInsurance();
workerInsurance.setPhotoUrl(builder.toString()); workerInsurance.setPhotoUrl(builder.toString());
insuranceList.add(workerInsurance);
} }
infoAuditRecord.setInsuranceInfo(JSON.toJSONString(insuranceList)); infoAuditRecord.setInsuranceInfo(JSON.toJSONString(insuranceList));
List<WorkerCertificate> certificateList = new ArrayList<>(); List<WorkerCertificate> certificateList = new ArrayList<>();
@ -295,13 +296,21 @@ public class XzWorkerInfoAuditRecordController {
WorkerCertificate workerCertificate = new WorkerCertificate(); WorkerCertificate workerCertificate = new WorkerCertificate();
JSONObject jsonObject = certificate.getJSONObject(i); JSONObject jsonObject = certificate.getJSONObject(i);
for (String s : jsonObject.keySet()) { for (String s : jsonObject.keySet()) {
Object o1 = jsonObject.getJSONArray(s).get(0); JSONArray o1 = jsonObject.getJSONArray(s);
if (o1 instanceof JSONObject) { StringBuilder phoneUrl = new StringBuilder();
System.out.println("====json"); for (int j = 0; j < o1.size(); j++) {
workerCertificate.setPhotoUrl(jsonObject.getJSONArray(s).getJSONObject(0).getString("name") + "*" + jsonObject.getJSONArray(s).getJSONObject(0).getString("url")); if (o1.get(j) instanceof JSONObject) {
} else { if (i > 0) {
System.out.println("====number"); phoneUrl.append(",");
workerCertificate.setCertificateType(Integer.parseInt(jsonObject.getJSONArray(s).get(0).toString())); }
JSONObject object1 = JSONObject.parseObject(JSON.toJSONString(o1.get(j)));
phoneUrl.append(object1.getString("name") + "*" + object1.getString("url"));
} else {
workerCertificate.setCertificateType(Integer.parseInt(o1.get(j).toString()));
}
}
if (phoneUrl.length() > 0) {
workerCertificate.setPhotoUrl(phoneUrl.toString());
} }
} }
certificateList.add(workerCertificate); certificateList.add(workerCertificate);