|
|
@@ -1375,6 +1375,64 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
|
|
|
List<OrgPhysicalDefenseConstructionDetailExport> detailExports= null;
|
|
|
detailExports = baseMapper.exportDefenseDetailExtend(dept, typeList);
|
|
|
|
|
|
+ try {
|
|
|
+ //营业网点需要单独处理:机构类型为营业网点,GA38没有营业网点数据的需要单独生成一条空的数据
|
|
|
+ List<OrgPhysicalDefenseConstructionDetailExport> yywdList = new ArrayList<>();
|
|
|
+ yywdList.addAll(detailExports);
|
|
|
+ Iterator<OrgPhysicalDefenseConstructionDetailExport> yywdIterator = yywdList.iterator();
|
|
|
+ while (yywdIterator.hasNext()){
|
|
|
+ OrgPhysicalDefenseConstructionDetailExport next = yywdIterator.next();
|
|
|
+ if (next.getOrgType() != 4){
|
|
|
+ yywdIterator.remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<OrgPhysicalDefenseConstructionDetailExport> needCreateList = yywdList;
|
|
|
+ if (needCreateList != null && needCreateList.size() > 0) {
|
|
|
+ //ga38信息根据机构分组
|
|
|
+ HashMap<Long, List<OrgPhysicalDefenseConstructionDetailExport>> map = new HashMap<>();
|
|
|
+ for (OrgPhysicalDefenseConstructionDetailExport e : needCreateList) {
|
|
|
+ List<OrgPhysicalDefenseConstructionDetailExport> list = map.get(e.getOrgId());
|
|
|
+ if (list == null) {
|
|
|
+ list = new ArrayList<>();
|
|
|
+ }
|
|
|
+ list.add(e);
|
|
|
+ map.put(e.getOrgId(), list);
|
|
|
+ }
|
|
|
+
|
|
|
+ Iterator<Map.Entry<Long, List<OrgPhysicalDefenseConstructionDetailExport>>> iterator = map.entrySet().iterator();
|
|
|
+ while (iterator.hasNext()) {
|
|
|
+ Map.Entry<Long, List<OrgPhysicalDefenseConstructionDetailExport>> next = iterator.next();
|
|
|
+ List<OrgPhysicalDefenseConstructionDetailExport> exports = next.getValue();
|
|
|
+ for (OrgPhysicalDefenseConstructionDetailExport e : exports) {
|
|
|
+ if (e.getGa38Type() == null || e.getGa38Type() == 1) {
|
|
|
+ iterator.remove();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!map.isEmpty()) {
|
|
|
+ Iterator<Map.Entry<Long, List<OrgPhysicalDefenseConstructionDetailExport>>> createIterator = map.entrySet().iterator();
|
|
|
+ while (createIterator.hasNext()) {
|
|
|
+ Map.Entry<Long, List<OrgPhysicalDefenseConstructionDetailExport>> next = createIterator.next();
|
|
|
+ List<OrgPhysicalDefenseConstructionDetailExport> exports = next.getValue();
|
|
|
+ if (exports != null && exports.size() > 0) {
|
|
|
+ OrgPhysicalDefenseConstructionDetailExport detail = new OrgPhysicalDefenseConstructionDetailExport();
|
|
|
+ BeanUtils.copyProperties(exports.get(0), detail);
|
|
|
+ detail.setExtendTypeName(null);
|
|
|
+ detail.setStandard(null);
|
|
|
+ detail.setDateOfComplete(null);
|
|
|
+ detail.setDateOfCompliance(null);
|
|
|
+ detail.setReason(null);
|
|
|
+ detailExports.add(detail);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
AtomicInteger xh = new AtomicInteger();
|
|
|
xh.getAndIncrement();
|
|
|
detailExports.forEach(e -> {
|