| | |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import com.dsh.guns.modular.system.util.GaoDeMapUtil; |
| | | import com.dsh.guns.modular.system.util.HttpRequestUtil; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | // if (!roleid.equals("1")){ |
| | | TOperator operator1 = tOperatorService.getOne(new QueryWrapper<TOperator>().eq("userId", UserExt.getUser().getId())); |
| | | if (operator1!=null){ |
| | | model.addAttribute("operator",operator1.getId()); |
| | | }else { |
| | | model.addAttribute("operator",0); |
| | | } |
| | | // } |
| | | |
| | | model.addAttribute("yysList",list1); |
| | |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object list(TStore tStore,String time,String userName,String userPhone,String ids,Integer type,Integer yyId,String lat,String lon,String pCode1,String cCode1) { |
| | | public Object list(TStore tStore,String time,String userName,String userPhone,String ids,Integer type,Integer yyId,String lat,String lon,String pCode1,String cCode1,String provinceCode,String cityCode) { |
| | | try { |
| | | |
| | | |
| | |
| | | tStore.setLat(lat); |
| | | |
| | | storeService.save(tStore); |
| | | |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("space_id",""); |
| | | map.put("device_id",tStore.getIds()+""); |
| | | map.put("region_id",tStore.getId()+""); |
| | | // 添加门禁 |
| | | String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map); |
| | | |
| | | |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | for (int i = 1; i < 9; i++) { |
| | |
| | | tStore.setLon(lon); |
| | | tStore.setLat(lat); |
| | | storeService.updateById(tStore); |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("space_id",""); |
| | | map.put("device_id",tStore.getIds()); |
| | | map.put("region_id",tStore.getId()+""); |
| | | // 编辑门禁 |
| | | String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/editDevice/ids/82", map); |
| | | JSONObject jsonObject = JSONObject.parseObject(s); |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | | String spaceId = data.getString("space_id"); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |