12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- package com.example.service.impl;
- import com.example.dao.WzHouseInCustomerDao;
- import com.example.entity.OtnAreaEntity;
- import com.example.entity.WzHouseInCustomerEntity;
- import com.example.service.WzHouseInCustomerService;
- import com.example.service.WzOtnAreaService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import java.util.List;
- import java.util.Map;
- @Service
- public class WzHouseInCustomerServiceImpl implements WzHouseInCustomerService {
- @Autowired
- private WzOtnAreaService otnAreaService;
- @Autowired
- private WzHouseInCustomerDao wzHouseInCustomerDao;
- @Override
- public List<WzHouseInCustomerEntity> queryList(Map<String, Object> map) {
- dealMap(map);
- return wzHouseInCustomerDao.queryList(map);
- }
- public void dealMap(Map<String, Object> map){
- if(map.get("city")!=null&&!map.get("city").toString().equals("全省")&&!map.get("city").toString().equals("")){
- OtnAreaEntity city = otnAreaService.queryObjectById(map.get("city").toString());
- map.put("city",city.getName());
- }
- if(map.get("city")!=null&&map.get("city").toString().equals("全省")){
- map.remove("city");
- }
- if(map.get("city")!=null&&map.get("city").toString().equals("")){
- map.remove("city");
- }
- if(map.get("county")!=null&&!map.get("county").toString().equals("区县")&&!map.get("county").toString().equals("")){
- OtnAreaEntity city = otnAreaService.queryObjectById(map.get("county").toString());
- map.put("county",city.getName());
- }
- if(map.get("county")!=null&&map.get("county").toString().equals("区县")){
- map.remove("county");
- }
- if(map.get("county")!=null&&map.get("county").toString().equals("")){
- map.remove("county");
- }
- if(map.get("statisticalMonth")!=null&&!map.get("statisticalMonth").toString().equals("")&&!map.get("statisticalMonth").toString().equals("账期")){
- map.put("statisticalMonth",Integer.valueOf(map.get("statisticalMonth").toString()));
- }else{
- map.remove("statisticalMonth");
- }
- }
- }
|