|
@@ -13,6 +13,7 @@ import com.cqut.stack.bn.pojo.dto.characteristicThing.ImportCharacteristicThingD
|
|
import com.cqut.stack.bn.pojo.dto.fourOfficeInfo.FourOfficeImportDTO;
|
|
import com.cqut.stack.bn.pojo.dto.fourOfficeInfo.FourOfficeImportDTO;
|
|
import com.cqut.stack.bn.pojo.entity.CharacteristicThing;
|
|
import com.cqut.stack.bn.pojo.entity.CharacteristicThing;
|
|
import com.cqut.stack.bn.pojo.entity.EfficientThing;
|
|
import com.cqut.stack.bn.pojo.entity.EfficientThing;
|
|
|
|
+import com.cqut.stack.bn.pojo.enums.GovernmentServiceEnum;
|
|
import com.cqut.stack.bn.pojo.listener.CharacteristicThingListener;
|
|
import com.cqut.stack.bn.pojo.listener.CharacteristicThingListener;
|
|
import com.cqut.stack.bn.pojo.listener.FourOfficeListener;
|
|
import com.cqut.stack.bn.pojo.listener.FourOfficeListener;
|
|
import com.cqut.stack.bn.pojo.vo.characteristicThing.GetCharacteristicThingInfoVO;
|
|
import com.cqut.stack.bn.pojo.vo.characteristicThing.GetCharacteristicThingInfoVO;
|
|
@@ -43,10 +44,7 @@ public class CharacteristicThingServiceImpl extends ServiceImpl<CharacteristicTh
|
|
@Override
|
|
@Override
|
|
public GetCharacteristicThingInfoVO getCharacteristicThingInfo(GetCharacteristicThingInfoDTO dto) {
|
|
public GetCharacteristicThingInfoVO getCharacteristicThingInfo(GetCharacteristicThingInfoDTO dto) {
|
|
LambdaQueryWrapper<CharacteristicThing> queryWrapper = Wrappers.lambdaQuery();
|
|
LambdaQueryWrapper<CharacteristicThing> queryWrapper = Wrappers.lambdaQuery();
|
|
- queryWrapper.eq(ObjectUtil.isNotEmpty(dto.getAreaName()),CharacteristicThing::getDirectoryName,dto.getAreaName())
|
|
|
|
- .like(CharacteristicThing::getStatDate,dto.getYear())
|
|
|
|
- .orderByDesc(CharacteristicThing::getApplyCount);
|
|
|
|
- PageHelper.startPage(1,5);
|
|
|
|
|
|
+ queryWrapper.like(ObjectUtil.isNotEmpty(dto.getYear()),CharacteristicThing::getStatDate,dto.getYear());
|
|
List<CharacteristicThing> characteristicThingList = this.list(queryWrapper);
|
|
List<CharacteristicThing> characteristicThingList = this.list(queryWrapper);
|
|
|
|
|
|
List<String> xAxisData = new ArrayList<>();
|
|
List<String> xAxisData = new ArrayList<>();
|
|
@@ -54,7 +52,7 @@ public class CharacteristicThingServiceImpl extends ServiceImpl<CharacteristicTh
|
|
List<Integer> processCount = new ArrayList<>();
|
|
List<Integer> processCount = new ArrayList<>();
|
|
List<Integer> completeCount = new ArrayList<>();
|
|
List<Integer> completeCount = new ArrayList<>();
|
|
for (CharacteristicThing characteristicThing : characteristicThingList) {
|
|
for (CharacteristicThing characteristicThing : characteristicThingList) {
|
|
- xAxisData.add(characteristicThing.getDirectoryName());
|
|
|
|
|
|
+ xAxisData.add(GovernmentServiceEnum.DistrictEnum.getNameByCode(characteristicThing.getDistrictName()));
|
|
applyCount.add(characteristicThing.getApplyCount());
|
|
applyCount.add(characteristicThing.getApplyCount());
|
|
processCount.add(characteristicThing.getProcessCount());
|
|
processCount.add(characteristicThing.getProcessCount());
|
|
completeCount.add(characteristicThing.getCompleteCount());
|
|
completeCount.add(characteristicThing.getCompleteCount());
|
|
@@ -74,10 +72,9 @@ public class CharacteristicThingServiceImpl extends ServiceImpl<CharacteristicTh
|
|
// 删除所有旧数据
|
|
// 删除所有旧数据
|
|
characteristicThingMapper.deleteAll();
|
|
characteristicThingMapper.deleteAll();
|
|
CharacteristicThingListener characteristicThingListener = new CharacteristicThingListener();
|
|
CharacteristicThingListener characteristicThingListener = new CharacteristicThingListener();
|
|
- FourOfficeListener fourOfficeListener = new FourOfficeListener();
|
|
|
|
try {
|
|
try {
|
|
EasyExcel.read(dto.getMultipartFile().getInputStream(), CharacteristicThingImportDTO.class, characteristicThingListener)
|
|
EasyExcel.read(dto.getMultipartFile().getInputStream(), CharacteristicThingImportDTO.class, characteristicThingListener)
|
|
- .headRowNumber(2).sheet().doRead();
|
|
|
|
|
|
+ .headRowNumber(1).sheet().doRead();
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
throw new RuntimeException(e);
|
|
throw new RuntimeException(e);
|
|
}
|
|
}
|