Commit 12fa0cb8 authored by 曹盼盼's avatar 曹盼盼

修改气瓶tag

parent fcc82b8f
......@@ -174,6 +174,7 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
TzCylinderProduceDto tzCylinderProduceDto = tzCylinderMapper.getTzCylinderProduceDto(orgCode);
TzCylinderTagsDto tzCylinderTagsDto = tzCylinderMapper.getTzCylinderTagsDto(orgCode);
CylinderFileUrlDto dto =new CylinderFileUrlDto();
if (!ValidationUtil.isEmpty(tzCylinderProduceDto)) {
if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getProductQualified())) {
String productQualified = tzCylinderProduceDto.getProductQualified();
List<Map> productQualifiedList = getMaps(productQualified);
......@@ -183,7 +184,6 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
String proofQuality = tzCylinderProduceDto.getProofQuality();
List<Map> proofQualityList = getMaps(proofQuality);
dto.setProofQuality(proofQualityList);
}
if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getSupervisionInspec())) {
String supervisionInspec = tzCylinderProduceDto.getSupervisionInspec();
......@@ -195,7 +195,8 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
List<Map> typeExperimentsList = getMaps(typeExperiments);
dto.setTypeExperiments(typeExperimentsList);
}
if (!ValidationUtil.isEmpty(tzCylinderTagsDto.getGasCylinderStamp())) {
}
if (!ValidationUtil.isEmpty(tzCylinderTagsDto)&&!ValidationUtil.isEmpty(tzCylinderTagsDto.getGasCylinderStamp())) {
String gasCylinderStamp = tzCylinderTagsDto.getGasCylinderStamp();
List<Map> gasCylinderStampList = getMaps(gasCylinderStamp);
dto.setGasCylinderStamp(gasCylinderStampList);
......@@ -205,15 +206,16 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
public List<Map> getMaps(String o){
List list=new ArrayList();
JSONArray jsonArray = JSONArray.parseArray(o);
for (Object li : jsonArray) {
JSONObject objects = JSONObject.parseObject(li.toString());
HashMap<String, String> map= new HashMap<>();
map.put("url",objects.getString("fileUrl"));
map.put("name",objects.getString("fileName"));
list.add(map);
if (!ValidationUtil.isEmpty(o)) {
JSONArray jsonArray = JSONArray.parseArray(o);
for (Object li : jsonArray) {
JSONObject objects = JSONObject.parseObject(li.toString());
HashMap<String, String> map= new HashMap<>();
map.put("url",objects.getString("fileUrl"));
map.put("name",objects.getString("fileName"));
list.add(map);
}
}
return list;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment