xufenglei
2019-02-13 1bd6a5e7678477f5b1fab449c6d618aae9041611
src/main/java/com/moral/service/impl/HistoryServiceImpl.java
@@ -30,10 +30,10 @@
import com.moral.entity.Sensor;
import com.moral.mapper.DeviceMapper;
import com.moral.mapper.HistoryMapper;
import com.moral.mapper.ProfessionMapper;
import com.moral.mapper.SensorMapper;
import com.moral.service.AccountService;
import com.moral.service.HistoryService;
import com.moral.service.ProfessionService;
@Service
public class HistoryServiceImpl implements HistoryService {
@@ -51,7 +51,7 @@
   private SensorMapper sensorMapper;
    @Resource
    private ProfessionMapper professionMapper;
    private ProfessionService professionService;
   @Override
   public Map<String, Object> getAllSensorAverageByDevice(Map<String, Object> parameters) throws Exception {
@@ -111,6 +111,7 @@
      ValidateUtil.notNull(parameters.get("accountId"), "param.is.null");
      String regionCode = parameters.get("regionCode").toString();
      parameters.put("provinceCode", regionCode.substring(0,2).concat("0000"));
      String regionType = "village";
      String nextLevel = "";
      if (regionCode.length() == 6) {
@@ -168,7 +169,7 @@
         }
      }
      if ("profession".equals(parameters.get("dimension"))) {
         List<Profession> professions = professionMapper.selectAll();
         List<Profession> professions = professionService.getProfessiontList(parameters);
         for (Map<String, Object> map : result) {
            for (Profession profession : professions) {
               if (map.get("name").equals(profession.getName())) {