Browse Source

代码暂存

dev_shibei_match
jianjun 4 years ago
parent
commit
e45b0edce8
  1. 7
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectGridDailyDTO.java
  2. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java
  3. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java
  4. 26
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/EIDimServiceImpl.java

7
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenProjectGridDailyDTO.java

@ -55,6 +55,11 @@ public class ScreenProjectGridDailyDTO implements Serializable {
*/ */
private String gridId; private String gridId;
/**
* 网格id
*/
private String gridName;
/** /**
* 网格所属的组织id * 网格所属的组织id
*/ */
@ -149,4 +154,4 @@ public class ScreenProjectGridDailyDTO implements Serializable {
this.delFlag = NumConstant.ZERO_STR; this.delFlag = NumConstant.ZERO_STR;
this.revision = NumConstant.ZERO; this.revision = NumConstant.ZERO;
} }
} }

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java

@ -23,6 +23,7 @@ import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.extract.form.*; import com.epmet.dto.extract.form.*;
import com.epmet.dto.extract.result.GridInfoResultDTO; import com.epmet.dto.extract.result.GridInfoResultDTO;
import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO;
import com.epmet.dto.screen.ScreenProjectGridDailyDTO;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity;
import com.epmet.entity.org.CustomerGridEntity; import com.epmet.entity.org.CustomerGridEntity;
@ -104,4 +105,6 @@ public interface ScreenCustomerGridService extends BaseService<ScreenCustomerGri
List<ScreenCustomerGridDTO> selectBelongGridInfo(String customerId,String level); List<ScreenCustomerGridDTO> selectBelongGridInfo(String customerId,String level);
Integer updateCenterPointByName(String customerId, String title, List<Double> center); Integer updateCenterPointByName(String customerId, String title, List<Double> center);
List<ScreenProjectGridDailyDTO> selectGridInfoByCustomerId(String customerId);
} }

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java

@ -30,6 +30,7 @@ import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.extract.form.*; import com.epmet.dto.extract.form.*;
import com.epmet.dto.extract.result.GridInfoResultDTO; import com.epmet.dto.extract.result.GridInfoResultDTO;
import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO; import com.epmet.dto.indexcollect.form.CustomerBizOrgFormDTO;
import com.epmet.dto.screen.ScreenProjectGridDailyDTO;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity;
import com.epmet.entity.org.CustomerGridEntity; import com.epmet.entity.org.CustomerGridEntity;
import com.epmet.service.evaluationindex.screen.ScreenCustomerGridService; import com.epmet.service.evaluationindex.screen.ScreenCustomerGridService;
@ -199,4 +200,9 @@ public class ScreenCustomerGridServiceImpl extends BaseServiceImpl<ScreenCustome
.set(ScreenCustomerGridEntity::getCenterMark, array.toString()); .set(ScreenCustomerGridEntity::getCenterMark, array.toString());
return baseDao.update(null,tWrapper); return baseDao.update(null,tWrapper);
} }
@Override
public List<ScreenProjectGridDailyDTO> selectGridInfoByCustomerId(String customerId) {
return baseDao.selectGridInfoByCustomerId(customerId);
}
} }

26
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/EIDimServiceImpl.java

@ -1,6 +1,6 @@
package com.epmet.service.impl; package com.epmet.service.impl;
import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO; import com.epmet.dto.screen.ScreenProjectGridDailyDTO;
import com.epmet.dto.screen.form.GridCenterPointForm; import com.epmet.dto.screen.form.GridCenterPointForm;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity;
@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
@Service @Service
public class EIDimServiceImpl implements EIDimService { public class EIDimServiceImpl implements EIDimService {
@ -132,14 +133,29 @@ public class EIDimServiceImpl implements EIDimService {
@Override @Override
public Map<String,Integer> updateCenterPointByName(GridCenterPointForm param) { public Map<String,Integer> updateCenterPointByName(GridCenterPointForm param) {
//todo 怎么反向判断 左匹配 //todo 怎么反向判断 左匹配
List<GovernAbilityGridMonthlyFormDTO> gridInfoList = screenCustomerGridService.selectAllGridInfo(param.getCustomerId()); List<ScreenProjectGridDailyDTO> gridInfos = screenCustomerGridService.selectGridInfoByCustomerId(param.getCustomerId());
Map<String,Integer> result = new HashMap<>(); Map<String,Integer> result = new HashMap<>();
param.getCenterDataList().forEach(o ->{
Integer integer = screenCustomerGridService.updateCenterPointByName(param.getCustomerId(), o.getTitle(), o.getCenter());
gridInfos.forEach(grid->{
//客户id 和组织id 都相等 且 名字 包含关系时才修改
if (grid.getCustomerId().equals(param.getCustomerId())){
AtomicInteger integer = new AtomicInteger(0);
param.getCenterDataList().forEach(o ->{
if (grid.getGridName().contains(o.getTitle())) {
Integer effectRow = screenCustomerGridService.updateCenterPointByName(param.getCustomerId(), o.getTitle(), o.getCenter());
integer.addAndGet(effectRow);
}
result.put(grid.getGridId(),integer.intValue());
});
}
});
/*param.getCenterDataList().forEach(o ->{
Integer integer = screenCustomerGridService.updateCenterPointByName(param.getCustomerId(),param.getAgencyId(), o.getTitle(), o.getCenter());
if (integer == 0 || integer > 1){ if (integer == 0 || integer > 1){
result.put(o.getTitle(),integer); result.put(o.getTitle(),integer);
} }
}); });*/
return result; return result;
} }

Loading…
Cancel
Save