WzHouseInCustomerServiceImpl.java 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package com.example.service.impl;
  2. import com.example.dao.WzHouseInCustomerDao;
  3. import com.example.entity.OtnAreaEntity;
  4. import com.example.entity.WzHouseInCustomerEntity;
  5. import com.example.service.WzHouseInCustomerService;
  6. import com.example.service.WzOtnAreaService;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.stereotype.Service;
  9. import java.util.List;
  10. import java.util.Map;
  11. @Service
  12. public class WzHouseInCustomerServiceImpl implements WzHouseInCustomerService {
  13. @Autowired
  14. private WzOtnAreaService otnAreaService;
  15. @Autowired
  16. private WzHouseInCustomerDao wzHouseInCustomerDao;
  17. @Override
  18. public List<WzHouseInCustomerEntity> queryList(Map<String, Object> map) {
  19. dealMap(map);
  20. return wzHouseInCustomerDao.queryList(map);
  21. }
  22. public void dealMap(Map<String, Object> map){
  23. if(map.get("city")!=null&&!map.get("city").toString().equals("全省")&&!map.get("city").toString().equals("")){
  24. OtnAreaEntity city = otnAreaService.queryObjectById(map.get("city").toString());
  25. map.put("city",city.getName());
  26. }
  27. if(map.get("city")!=null&&map.get("city").toString().equals("全省")){
  28. map.remove("city");
  29. }
  30. if(map.get("city")!=null&&map.get("city").toString().equals("")){
  31. map.remove("city");
  32. }
  33. if(map.get("county")!=null&&!map.get("county").toString().equals("区县")&&!map.get("county").toString().equals("")){
  34. OtnAreaEntity city = otnAreaService.queryObjectById(map.get("county").toString());
  35. map.put("county",city.getName());
  36. }
  37. if(map.get("county")!=null&&map.get("county").toString().equals("区县")){
  38. map.remove("county");
  39. }
  40. if(map.get("county")!=null&&map.get("county").toString().equals("")){
  41. map.remove("county");
  42. }
  43. if(map.get("statisticalMonth")!=null&&!map.get("statisticalMonth").toString().equals("")&&!map.get("statisticalMonth").toString().equals("账期")){
  44. map.put("statisticalMonth",Integer.valueOf(map.get("statisticalMonth").toString()));
  45. }else{
  46. map.remove("statisticalMonth");
  47. }
  48. }
  49. }