Merge remote-tracking branch 'origin/guoshengxiong' into guoshengxiong
This commit is contained in:
commit
6a6459e07c
@ -94,6 +94,7 @@ public class CarInfoController {
|
||||
@ApiOperation(value = "添加车辆黑白名单管理信息", notes = "添加车辆黑白名单管理信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/save")
|
||||
public Result<CarInfo> save(@RequestBody Map<String, Object> map) {
|
||||
log.info("开始添加车辆" + map);
|
||||
Object alarmPushWorkerId = map.get("alarmPushWorkerId");
|
||||
String userId = map.get("enterpriseId").toString();
|
||||
Object driverWorkerName = map.get("driverWorkerName");
|
||||
|
||||
@ -253,6 +253,7 @@ public class XzWorkerInfoAuditRecordController {
|
||||
}
|
||||
workerInfo.add(detailObj);
|
||||
}
|
||||
log.info("开始人员下发设备解析信息" + workerInfo);
|
||||
for (Object o : workerInfo) {
|
||||
JSONObject object = JSONObject.parseObject(JSON.toJSONString(o));
|
||||
String workerId = object.getJSONArray("workerId").get(0).toString();
|
||||
@ -268,21 +269,21 @@ public class XzWorkerInfoAuditRecordController {
|
||||
workerInsurance.setPhotoUrl(object.getJSONArray("insurance").getJSONObject(0).getString("name") + "*" + object.getJSONArray("insurance").getJSONObject(0).getString("url"));
|
||||
insuranceList.add(workerInsurance);
|
||||
infoAuditRecord.setInsuranceInfo(JSON.toJSONString(insuranceList));
|
||||
|
||||
List<WorkerCertificate> certificateList = new ArrayList<>();
|
||||
JSONArray certificate = object.getJSONArray("certificate");
|
||||
if (certificate != null) {
|
||||
for (int i = 0; i < certificate.size(); i++) {
|
||||
WorkerCertificate workerCertificate = new WorkerCertificate();
|
||||
JSONObject jsonObject = certificate.getJSONObject(i);
|
||||
int p = 0;
|
||||
for (String s : jsonObject.keySet()) {
|
||||
if (p == 0) {
|
||||
workerCertificate.setCertificateType(Integer.parseInt(jsonObject.getJSONArray(s).get(0).toString()));
|
||||
} else {
|
||||
Object o1 = jsonObject.getJSONArray(s).get(0);
|
||||
if (o1 instanceof JSONObject) {
|
||||
System.out.println("====json");
|
||||
workerCertificate.setPhotoUrl(jsonObject.getJSONArray(s).getJSONObject(0).getString("name") + "*" + jsonObject.getJSONArray(s).getJSONObject(0).getString("url"));
|
||||
} else {
|
||||
System.out.println("====number");
|
||||
workerCertificate.setCertificateType(Integer.parseInt(jsonObject.getJSONArray(s).get(0).toString()));
|
||||
}
|
||||
p ++;
|
||||
}
|
||||
certificateList.add(workerCertificate);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user