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

修改气瓶tag

parent fcc82b8f
...@@ -174,6 +174,7 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind ...@@ -174,6 +174,7 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
TzCylinderProduceDto tzCylinderProduceDto = tzCylinderMapper.getTzCylinderProduceDto(orgCode); TzCylinderProduceDto tzCylinderProduceDto = tzCylinderMapper.getTzCylinderProduceDto(orgCode);
TzCylinderTagsDto tzCylinderTagsDto = tzCylinderMapper.getTzCylinderTagsDto(orgCode); TzCylinderTagsDto tzCylinderTagsDto = tzCylinderMapper.getTzCylinderTagsDto(orgCode);
CylinderFileUrlDto dto =new CylinderFileUrlDto(); CylinderFileUrlDto dto =new CylinderFileUrlDto();
if (!ValidationUtil.isEmpty(tzCylinderProduceDto)) {
if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getProductQualified())) { if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getProductQualified())) {
String productQualified = tzCylinderProduceDto.getProductQualified(); String productQualified = tzCylinderProduceDto.getProductQualified();
List<Map> productQualifiedList = getMaps(productQualified); List<Map> productQualifiedList = getMaps(productQualified);
...@@ -183,7 +184,6 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind ...@@ -183,7 +184,6 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
String proofQuality = tzCylinderProduceDto.getProofQuality(); String proofQuality = tzCylinderProduceDto.getProofQuality();
List<Map> proofQualityList = getMaps(proofQuality); List<Map> proofQualityList = getMaps(proofQuality);
dto.setProofQuality(proofQualityList); dto.setProofQuality(proofQualityList);
} }
if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getSupervisionInspec())) { if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getSupervisionInspec())) {
String supervisionInspec = tzCylinderProduceDto.getSupervisionInspec(); String supervisionInspec = tzCylinderProduceDto.getSupervisionInspec();
...@@ -195,7 +195,8 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind ...@@ -195,7 +195,8 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
List<Map> typeExperimentsList = getMaps(typeExperiments); List<Map> typeExperimentsList = getMaps(typeExperiments);
dto.setTypeExperiments(typeExperimentsList); dto.setTypeExperiments(typeExperimentsList);
} }
if (!ValidationUtil.isEmpty(tzCylinderTagsDto.getGasCylinderStamp())) { }
if (!ValidationUtil.isEmpty(tzCylinderTagsDto)&&!ValidationUtil.isEmpty(tzCylinderTagsDto.getGasCylinderStamp())) {
String gasCylinderStamp = tzCylinderTagsDto.getGasCylinderStamp(); String gasCylinderStamp = tzCylinderTagsDto.getGasCylinderStamp();
List<Map> gasCylinderStampList = getMaps(gasCylinderStamp); List<Map> gasCylinderStampList = getMaps(gasCylinderStamp);
dto.setGasCylinderStamp(gasCylinderStampList); dto.setGasCylinderStamp(gasCylinderStampList);
...@@ -205,15 +206,16 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind ...@@ -205,15 +206,16 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
public List<Map> getMaps(String o){ public List<Map> getMaps(String o){
List list=new ArrayList(); List list=new ArrayList();
JSONArray jsonArray = JSONArray.parseArray(o); if (!ValidationUtil.isEmpty(o)) {
for (Object li : jsonArray) { JSONArray jsonArray = JSONArray.parseArray(o);
JSONObject objects = JSONObject.parseObject(li.toString()); for (Object li : jsonArray) {
HashMap<String, String> map= new HashMap<>(); JSONObject objects = JSONObject.parseObject(li.toString());
map.put("url",objects.getString("fileUrl")); HashMap<String, String> map= new HashMap<>();
map.put("name",objects.getString("fileName")); map.put("url",objects.getString("fileUrl"));
list.add(map); map.put("name",objects.getString("fileName"));
list.add(map);
}
} }
return list; 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