Merge remote-tracking branch 'origin/wb' into qa
| | |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | } |
| | | |
| | | Map<String, Object> map = dustldService.dailyDustlds(null,params); |
| | | test(map,response); |
| | | Map<String, Object> map = dustldService.dailyDustlds(params); |
| | | if (ObjectUtils.isEmpty(map)){ |
| | | return ResultMessage.fail(ResponseCodeEnum.TARGET_IS_NULL.getCode(), ResponseCodeEnum.TARGET_IS_NULL.getMsg()); |
| | | } |
| | | test(map,response); |
| | | // return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(),ResponseCodeEnum.SUCCESS.getMsg(),map); |
| | | return ResultMessage.ok(); |
| | | } |
| | |
| | | RowRenderData row = RowRenderData.build(i + 1 + "", map1.get("road").toString(), map1.get("value1").toString(), map1.get("value2").toString(), map1.get("value3").toString()); |
| | | rsList3.add(row); |
| | | } |
| | | |
| | | if (!ObjectUtils.isEmpty(mapArrayList)){ |
| | | map.put("table3", new MiniTableRenderData(rsList3)); |
| | | } |
| | | map.put("table1", new MiniTableRenderData(header1, rsList1)); |
| | | map.put("table3", new MiniTableRenderData(rsList3)); |
| | | map.put("data",params.get("data").toString()); |
| | | map.put("time",params.get("time").toString()); |
| | | map.put("date1",params.get("date1").toString()); |
| | |
| | | *ZHC_RANGE |
| | | */ |
| | | SYS_SECOND_CRUISER_RANGE("ZHCRANGE","走航车组织范围"), |
| | | /** |
| | | *UAV_RANGE |
| | | */ |
| | | SYS_SECOND_UAV_RANGE("UAVRANGE","无人机组织范围"), |
| | | |
| | | /** |
| | | *WIND |
| | |
| | | Map<String,Object> dailyDustld(Integer id ,List<MultipartFile> file); |
| | | |
| | | |
| | | Map<String,Object> dailyDustlds(List<MultipartFile> file,Map<String, Object> params); |
| | | Map<String,Object> dailyDustlds(Map<String, Object> params); |
| | | |
| | | |
| | | Map<String,Object> selectDust(Integer id ); |
| | |
| | | SysDictData listOne(String code, String dataKey); |
| | | |
| | | List<SysDictData> listWindAll(String code, List<String> dataKey); |
| | | |
| | | List<Integer> dateValueList(String code); |
| | | //获取某个类型数据 |
| | | SysDictType slectFind(String name); |
| | | |
| | | } |
| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public Map<String, Object> dailyDustlds(List<MultipartFile> file,Map<String, Object> params) { |
| | | public Map<String, Object> dailyDustlds(Map<String, Object> params) { |
| | | |
| | | Map<String, Object> userInfo = (Map<String, Object>) TokenUtils.getUserInfo(); |
| | | Map<String, Object> orgInfo = (Map<String, Object>) userInfo.get("organization"); |
| | |
| | | HashMap<String, Object> rsMap = new HashMap<>(); |
| | | List<Map<String, Object>> dusts = historySecondCruiserMapper.getDusts(params); |
| | | Map<String, List<DustldDTO>> collect = manageCoordinateMapper.CompareTo(orgId).stream().collect(Collectors.groupingBy(o -> o.getName())); |
| | | if (ObjectUtils.isEmpty(dusts) || ObjectUtils.isEmpty(collect)){ |
| | | return null; |
| | | } |
| | | Set<String> strings = collect.keySet(); |
| | | ArrayList<DustForm> list1 = new ArrayList<>(); |
| | | //所有的高值路段 |
| | |
| | | } |
| | | } |
| | | } |
| | | rsMap.put("data",builder); |
| | | rsMap.put("data",ObjectUtils.isEmpty(builder)?"暂无高值路段":builder); |
| | | rsMap.put("list3",list3); |
| | | rsMap.put("time",rsTime1+"-"+rsTime2); |
| | | rsMap.put("date1",dateString3.substring(5,10)); |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.moral.api.entity.*; |
| | | import com.moral.api.mapper.HistorySecondUavMapper; |
| | | import com.moral.api.pojo.dto.uav.UAVQueryTimeSlotDTO; |
| | | import com.moral.api.pojo.enums.SysDictTypeEnum; |
| | | import com.moral.api.pojo.form.uav.UAVQueryTimeSlotForm; |
| | | import com.moral.api.service.HistorySecondUavService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.moral.api.service.OrganizationService; |
| | | import com.moral.api.service.SpecialDeviceService; |
| | | import com.moral.api.service.SysDictTypeService; |
| | | import com.moral.api.utils.UnitConvertUtils; |
| | | import com.moral.constant.RedisConstants; |
| | | import com.moral.util.DateUtils; |
| | |
| | | @Autowired |
| | | SpecialDeviceService specialDeviceService; |
| | | @Autowired |
| | | private SysDictTypeService sysDictTypeService; |
| | | @Autowired |
| | | RedisTemplate redisTemplate; |
| | | |
| | | @Override |
| | |
| | | public List<UAVQueryTimeSlotDTO> queryTimeSlot(UAVQueryTimeSlotForm form) { |
| | | //取参 |
| | | Integer organizationId = form.getOrganizationId(); |
| | | |
| | | List<Integer> integerList = sysDictTypeService.dateValueList(SysDictTypeEnum.SYS_SECOND_UAV_RANGE.getValue()); |
| | | Date startDate = form.getStartDate(); |
| | | Date endDate = form.getEndDate(); |
| | | QueryWrapper<HistorySecondUav> wrapper = new QueryWrapper<>(); |
| | |
| | | childrenId.add(child.getId()); |
| | | } |
| | | childrenId.add(organizationId); |
| | | childrenId.addAll(integerList); |
| | | wrapper.in("organization_id", childrenId); |
| | | //查询根据batch查,因为可能会有跨天飞行的情况。 |
| | | wrapper.between("batch", startDate, endDate); |
| | |
| | | package com.moral.api.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.moral.api.config.Interceptor.UserHelper; |
| | | import com.moral.api.entity.SysDictData; |
| | | import com.moral.api.entity.SysDictType; |
| | | import com.moral.api.mapper.SysDictTypeMapper; |
| | | import com.moral.api.pojo.enums.SysDictTypeEnum; |
| | | import com.moral.api.pojo.vo.user.QxUser; |
| | | import com.moral.api.service.SysDictTypeService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.moral.constant.Constants; |
| | | |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.web.config.QuerydslWebConfiguration; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Integer> dateValueList(String code) { |
| | | QxUser user = UserHelper.getCurrentUser(); |
| | | List<Integer> integerList = new ArrayList<>(); |
| | | SysDictData listSys = this.listOne(code,user.getUserId().toString()); |
| | | if(listSys.getDataValue().contains(",")){ |
| | | List<Integer> resultStr = Arrays.asList(listSys.getDataValue().split(",")).stream().map(Integer::parseInt).collect(Collectors.toList()); |
| | | integerList.addAll(resultStr); |
| | | }else { |
| | | Integer dataValue = Objects.nonNull(listSys.getDataValue())?Integer.parseInt(listSys.getDataValue()):0; |
| | | integerList.add(dataValue); |
| | | } |
| | | return integerList; |
| | | } |
| | | |
| | | @Override |
| | | public SysDictType slectFind(String name) { |
| | | SysDictType sysDictType = this.baseMapper.selectFind(name); |
| | | return sysDictType; |