| | |
| | | <artifactId>dom4j</artifactId> |
| | | <version>1.6.1</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-data-mongodb</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | </dependency> |
| | | |
| | | |
| | | <!--引入本地工行支付jar start--> |
| | |
| | | TReassign tReassign = tReassignService.selectById(tReassignId); |
| | | ShiroUser user = ShiroKit.getUser(); |
| | | if (1 == optType){ |
| | | //增加推送 |
| | | Map<String,String> map = new HashMap<>(); |
| | | map.put("id", tReassignId.toString()); |
| | | map.put("uid", ShiroKit.getUser().getId().toString()); |
| | | String result = HttpRequestUtil.postRequest(PushURL.refuseReassign, map); |
| | | System.out.println("拒绝改派调用接口:"+result); |
| | | tReassign.setState(5); |
| | | tReassign.setReviewer(user.getId()); |
| | | tReassign.setReviewerType(2); |
| | | tReassignService.updateById(tReassign); |
| | | |
| | | //还原订单状态 |
| | | TOrderCrossCity tOrderCrossCity = itOrderCrossCityService.selectById(tReassign.getOrderId()); |
| | | tOrderCrossCity.setState(tOrderCrossCity.getOldState()); |
| | | itOrderCrossCityService.updateById(tOrderCrossCity); |
| | | |
| | | }else if (2 == optType){ |
| | | tReassign.setState(4); |
| | | tReassign.setReviewer(user.getId()); |
| | |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.IdGenerator; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.TDriverLine; |
| | |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | | import com.stylefeng.guns.modular.system.util.GDMapElectricFenceUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import com.stylefeng.guns.modular.system.util.model.GeoFencingPolygon; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.data.geo.Point; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.data.mongodb.core.geo.GeoJsonPolygon;import org.springframework.data.mongodb.core.query.Criteria;import org.springframework.data.mongodb.core.query.Query;import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | |
| | | @Autowired |
| | | private GDMapElectricFenceUtil gdMapElectricFenceUtil; |
| | | |
| | | |
| | | @Autowired |
| | | private MongoTemplate mongoTemplate; |
| | | |
| | | /** |
| | | * 跳转到跨城站点管理首页 |
| | |
| | | List<TRegion> areaList = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", city.getId())); |
| | | model.addAttribute("areaList",areaList); |
| | | }else{ |
| | | model.addAttribute("areaList",null); |
| | | model.addAttribute("areaList", new ArrayList<>()); |
| | | } |
| | | |
| | | if (SinataUtil.isNotEmpty(tSite.getDistrictCode())) { |
| | | TRegion area = tRegionService.selectOne(new EntityWrapper<TRegion>().eq("code", tSite.getDistrictCode())); |
| | | //乡镇街道 |
| | | List<TRegion> townList = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", area.getId())); |
| | | model.addAttribute("townList", townList); |
| | | } else { |
| | | model.addAttribute("townList", new ArrayList<>()); |
| | | } |
| | | //查询所有的站点区域 |
| | | List<TLocation> locationList = itLocationService.selectList(new EntityWrapper<TLocation>().eq("siteId", tSite.getId()).ne("state", 3)); |
| | | model.addAttribute("locationList",locationList); |
| | | model.addAttribute("locationList1", JSON.toJSONString(locationList)); |
| | | model.addAttribute("disabled","disabled"); |
| | | |
| | | Integer type = itLocationService.selectList(new EntityWrapper<TLocation>().eq("siteId", tSite.getId())).get(0).getType(); |
| | | if (CollectionUtils.isNotEmpty(locationList)) { |
| | | Integer type = locationList.get(0).getType(); |
| | | model.addAttribute("type1", type == 1 ? "block" : "none"); |
| | | model.addAttribute("type2", type == 1 ? "none" : "block"); |
| | | model.addAttribute("checked1", type == 1 ? "checked" : ""); |
| | | model.addAttribute("checked2", type == 1 ? "" : "checked"); |
| | | } |
| | | return PREFIX + "tSite_edit.html"; |
| | | } |
| | | |
| | |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | if (ShiroKit.getUser().getRoleType() == 2){ |
| | | page.setRecords(tSiteService.getCompanySiteList(page, beginTime, endTime, name, insertUser, city, state,ShiroKit.getUser().getId())); |
| | | } |
| | | }else{ |
| | | page.setRecords(tSiteService.getSiteList(page,beginTime,endTime,name,insertUser,city,state)); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 添加站点区域 |
| | | * |
| | | * @param subArr |
| | | * @param id |
| | | */ |
| | |
| | | String coordinate = jsonObject.getString("coordinate"); |
| | | coordinate = coordinate.substring(0, coordinate.length() - 1); |
| | | location.setCoordinate(coordinate); |
| | | //将电子围栏坐标信息存储到MongoDB |
| | | GeoFencingPolygon gfp = new GeoFencingPolygon(); |
| | | gfp.setId(IdGenerator.getId()); |
| | | gfp.setSiteId(id); |
| | | gfp.setName(jsonObject.getString("name")); |
| | | String[] split = coordinate.split(";"); |
| | | List<Point> points = new ArrayList<>(); |
| | | for (String s : split) { |
| | | String[] str = s.split(","); |
| | | Point point = new Point(Double.parseDouble(str[0]), Double.parseDouble(str[1])); |
| | | points.add(point); |
| | | } |
| | | //最后一个点要和第一个点相同 |
| | | points.add(new Point(points.get(0).getX(), points.get(0).getY())); |
| | | gfp.setGeoJsonPolygon(new GeoJsonPolygon(points)); |
| | | mongoTemplate.save(gfp); |
| | | } |
| | | itLocationService.insert(location); |
| | | |
| | | if(type == 2){ |
| | | List<String> fence = gdMapElectricFenceUtil.createFence(location.getId().toString(), location.getCoordinate()); |
| | | TLocation location1 = itLocationService.selectById(location.getId()); |
| | | String s = ""; |
| | | for(String gid : fence){ |
| | | s += gid + "_"; |
| | | } |
| | | location1.setGid(s.substring(0, s.length() - 1)); |
| | | location1.setUpdateTime(new Date()); |
| | | itLocationService.updateById(location1); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | TSite tSite = tSiteService.selectById(tSiteId); |
| | | if (1 == optType){ |
| | | tSite.setState(3); |
| | | //删除mongoDB的区域信息 |
| | | Criteria criteria =Criteria.where("siteId").is(tSite.getId()); |
| | | Query query = new Query(criteria); |
| | | mongoTemplate.remove(query,GeoFencingPolygon.class); |
| | | }else if (2 == optType){ |
| | | tSite.setState(2); |
| | | }else if (3 == optType){ |
| | |
| | | |
| | | //删除站点区域 |
| | | JSONArray jsonArray = JSON.parseArray(subArr); |
| | | //查询站点对应区域数据 |
| | | List<TLocation> siteId = itLocationService.selectList(new EntityWrapper<TLocation>().eq("siteId", tSite.getId())); |
| | | List<TLocation> del = new ArrayList<>(); |
| | | List<Object> add = new ArrayList<>(); |
| | | //遍历区域数据 |
| | | for(TLocation location : siteId){ |
| | | boolean b = true; |
| | | for(int i = 0; i < jsonArray.size(); i++){ |
| | |
| | | } |
| | | for(TLocation location : del){ |
| | | if(location.getType() == 2){ |
| | | String[] s = location.getGid().split("_"); |
| | | for(String gid : s){ |
| | | gdMapElectricFenceUtil.deleteElectricFenc(gid); |
| | | } |
| | | //删除mongoDB的区域信息 |
| | | Criteria criteria =Criteria.where("siteId").is(tSite.getId()); |
| | | Query query = new Query(criteria); |
| | | mongoTemplate.remove(query,GeoFencingPolygon.class); |
| | | } |
| | | itLocationService.deleteById(location.getId()); |
| | | } |
| | |
| | | |
| | | List<TSite> query(@Param("provinceCode") String provinceCode, @Param("cityCode")String cityCode, |
| | | @Param("districtCode")String districtCode); |
| | | |
| | | List<Map<String, Object>> getCompanySiteList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("beginTime") String beginTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("name") String name, |
| | | @Param("insertUser") String insertUser, |
| | | @Param("city") String city, |
| | | @Param("state") Integer state,@Param("id") Integer id); |
| | | } |
| | |
| | | LEFT JOIN t_car_brand as cb on cb.id = ci.carBrandId |
| | | LEFT JOIN t_company as cc on cc.id = ot.companyId |
| | | LEFT JOIN t_server_carmodel as sc on sc.id = ot.serverCarModelId |
| | | LEFT JOIN (SELECT ii.money,ii.incomeId,cc.type FROM t_income as ii |
| | | LEFT JOIN (SELECT sum(ii.money) as money,ii.incomeId,cc.type FROM t_income as ii |
| | | LEFT JOIN t_company as cc on ii.objectId = cc.id |
| | | where ii.userType = 1 and ii.type = 2 and ii.orderType = 1 GROUP BY ii.incomeId) as income1 on income1.incomeId = ot.id |
| | | LEFT JOIN (SELECT * FROM t_income where userType = 2 and type = 2 and orderType = 1 GROUP BY incomeId) as income2 on income2.incomeId = ot.id |
| | | where ii.userType = 1 and ii.type = 2 and ii.orderType = 1 GROUP BY ii.incomeId,cc.type) as income1 on income1.incomeId = ot.id |
| | | LEFT JOIN (SELECT sum(money) as money,incomeId FROM t_income where userType = 2 and type = 2 and orderType = 1 GROUP BY incomeId) as income2 on income2.incomeId = ot.id |
| | | where ot.id = #{orderId} |
| | | </select> |
| | | |
| | |
| | | and districtCode is null |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | <select id="getCompanySiteList" resultType="java.util.Map"> |
| | | SELECT * FROM (SELECT uu.`name` as insertUser,IFNULL(ls.num,0) as lineNum,ss.* FROM t_site as ss |
| | | RIGHT JOIN (select * from sys_user where id=#{id}) as uu on uu.id = ss.insertUserId |
| | | LEFT JOIN (SELECT COUNT(a.id) as num,siteId FROM t_line_site a left join t_line b on (a.lineId = b.id) where b.state != 3 GROUP BY a.siteId) as ls on ls.siteId = ss.id) as o |
| | | <where> |
| | | o.state != 3 |
| | | <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> |
| | | AND (o.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and o.name LIKE CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="insertUser != null and insertUser != ''"> |
| | | and o.insertUser LIKE CONCAT('%',#{insertUser},'%') |
| | | </if> |
| | | <if test="city != null and city != ''"> |
| | | and (o.province LIKE CONCAT('%',#{city},'%') or o.city LIKE CONCAT('%',#{city},'%') or o.district LIKE CONCAT('%',#{city},'%')) |
| | | </if> |
| | | <if test="state != null and state != ''"> |
| | | and o.state = #{state} |
| | | </if> |
| | | </where> |
| | | order by o.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="getUserDetailById" resultType="java.util.Map"> |
| | | SELECT DATE_FORMAT(ui.insertTime,'%Y-%m-%d %H:%i') as insertTimeStr,ci.`name` as companyName, |
| | | case when ui.isAuth = 1 then '否' else '是' end as isAuthStr, |
| | | IFNULL(0,0) as zcNum, |
| | | IFNULL(ot.num,0) as czNum, |
| | | IFNULL(0,0) as kcNum, |
| | | IFNULL(0,0) as wlNum, |
| | | IFNULL(op.num,0) as zcNum, |
| | | IFNULL(0,0) as czNum, |
| | | IFNULL(oc.num,0) as kcNum, |
| | | IFNULL(ol.num,0) as wlNum, |
| | | IFNULL(td.num,0) as consumptionNum, |
| | | IFNULL(ui.balance,0) as balanceStr, |
| | | ui.* from t_user as ui |
| | | LEFT JOIN (select * from t_company where flag != 3) as ci on ci.id = ui.companyId |
| | | LEFT JOIN (SELECT sum(money) as num,userId from t_pub_transaction_details where userType = 1 and type = 1 and state = 2 GROUP BY userId) as td on td.userId = ui.id |
| | | LEFT JOIN (SELECT COUNT(id) as num,userId from t_order_taxi where FIND_IN_SET(state,'8,9') GROUP BY userId) as ot on ot.userId = ui.id |
| | | LEFT JOIN (SELECT COUNT(id) as num,userId from t_order_private_car where FIND_IN_SET(state,'8,9') GROUP BY userId) as op on op.userId = ui.id |
| | | LEFT JOIN (SELECT COUNT(id) as num,userId from t_order_cross_city where FIND_IN_SET(state,'8,9') GROUP BY userId) as oc on oc.userId = ui.id |
| | | LEFT JOIN (SELECT COUNT(id) as num,userId from t_order_logistics where FIND_IN_SET(state,'6') GROUP BY userId) as ol on ol.userId = ui.id |
| | | where ui.id = #{userId} |
| | | </select> |
| | | |
| | |
| | | |
| | | List<TSite> query(@Param("provinceCode") String provinceCode, @Param("cityCode")String cityCode, |
| | | @Param("districtCode")String districtCode); |
| | | |
| | | List<Map<String, Object>> getCompanySiteList(Page<Map<String, Object>> page, String beginTime, String endTime, String name, String insertUser, String city, Integer state, Integer id); |
| | | } |
| | |
| | | @Override |
| | | public List<TSite> query(String provinceCode, String cityCode, String districtCode) { |
| | | return siteMapper.query(provinceCode, cityCode, districtCode); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getCompanySiteList(Page<Map<String, Object>> page, String beginTime, String endTime, String name, String insertUser, String city, Integer state, Integer id) { |
| | | return this.baseMapper.getCompanySiteList(page, beginTime, endTime, name, insertUser, city, state,id); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 每天的凌晨执行的任务 |
| | | */ |
| | | @Scheduled(cron = "0 0 0 * * *") |
| | | public void taskDay(){ |
| | | try { |
| | | locationService.updateFence();//更新线上电子围栏 |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.model; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.data.mongodb.core.geo.GeoJsonPolygon; |
| | | import org.springframework.data.mongodb.core.index.GeoSpatialIndexType; |
| | | import org.springframework.data.mongodb.core.index.GeoSpatialIndexed; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 地理围栏-多边形 |
| | | * @author zhibing.pu |
| | | * @date 2023/4/29 23:53 |
| | | */ |
| | | @Data |
| | | @Document(collection = "geo_fencing") |
| | | public class GeoFencingPolygon implements Serializable { |
| | | private static final long serialVersionUID = 4508868382007529971L; |
| | | |
| | | private String id; |
| | | /** |
| | | * 站点id |
| | | */ |
| | | private Integer siteId; |
| | | /** |
| | | * 站点名称 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 多边形经纬度 |
| | | */ |
| | | @GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE) |
| | | private GeoJsonPolygon geoJsonPolygon; |
| | | |
| | | } |
| | |
| | | alipayPublicKey: 11 #应用公钥 |
| | | alipay_public_key: 111 #支付宝公钥 |
| | | |
| | | |
| | | --- |
| | | |
| | | spring: |
| | | data: |
| | | mongodb: |
| | | uri: mongodb://127.0.0.1:27017/admin |
| | | |
| | | |
| | | --- |
| | | filePath: /root/server/app/orderPostionFile/ #存储订单轨迹文件路径 |
| | | #filePath: C:/orderPostionFile/ #存储订单轨迹文件路径 |
| | |
| | | </div> |
| | | <#avatar id="imgUrl" name="封面:" /> |
| | | <#input id="title" name="标题"/> |
| | | <#select id="isBroadcast" name="是否播报:" > |
| | | <option value="">选择是否播报</option> |
| | | <option value="1">是</option> |
| | | <option value="2">否</option> |
| | | </#select> |
| | | <!-- <#select id="isBroadcast" name="是否播报:" >--> |
| | | <!-- <option value="">选择是否播报</option>--> |
| | | <!-- <option value="1">是</option>--> |
| | | <!-- <option value="2">否</option>--> |
| | | <!-- </#select>--> |
| | | <div class="form-group" id="contentDiv"> |
| | | <label class="col-sm-3 control-label">公告内容:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | <div class="col-sm-11"> |
| | | <#avatar id="imgUrl" name="封面:" avatarImg="${item.imgUrl}"/> |
| | | <#input id="title" name="标题" value="${item.title}"/> |
| | | <#select id="isBroadcast" name="是否播报:" > |
| | | <option value="">选择是否播报</option> |
| | | <option value="1" ${1 == item.isBroadcast ? 'selected=selected' : ''}>是</option> |
| | | <option value="2" ${2 == item.isBroadcast ? 'selected=selected' : ''}>否</option> |
| | | </#select> |
| | | <!-- <#select id="isBroadcast" name="是否播报:" >--> |
| | | <!-- <option value="">选择是否播报</option>--> |
| | | <!-- <option value="1" ${1 == item.isBroadcast ? 'selected=selected' : ''}>是</option>--> |
| | | <!-- <option value="2" ${2 == item.isBroadcast ? 'selected=selected' : ''}>否</option>--> |
| | | <!-- </#select>--> |
| | | <div class="form-group" id="contentDiv"> |
| | | <label class="col-sm-3 control-label">公告内容:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | @if(isNotEmpty(item.orderMoney) && item.orderMoney > 0){ |
| | | <div class="col-sm-6 b-r"> |
| | | <#label id="orderMoney" name="订单总价" value="${item.orderMoney}元"/> |
| | | @if(isNotEmpty(item.couponMoney)){ |
| | | <#label id="couponMoney" name="优惠券抵扣费用" value="${item.couponMoney}元"/> |
| | | @}else{ |
| | | <#label id="couponMoney" name="优惠券抵扣费用" value="0.00元"/> |
| | | @} |
| | | @if(isNotEmpty(item.discountMoney)){ |
| | | <#label id="couponMoney" name="活动优惠金额" value="${item.discountMoney}元"/> |
| | | @}else{ |
| | | <#label id="couponMoney" name="活动优惠金额" value="0.00元"/> |
| | | @} |
| | | @if(isNotEmpty(item.redPacketMoney)){ |
| | | <#label id="couponMoney" name="红包优惠" value="${item.redPacketMoney}元"/> |
| | | @}else{ |
| | | <#label id="couponMoney" name="红包优惠" value="0.00元"/> |
| | | @} |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | @if(isNotEmpty(item.payMoney)){ |
| | |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#label id="typeStr" name="订单类型" value="${item.typeStr}"/> |
| | | <#label id="orderNum" name="订单编号" value="${item.orderNum}"/> |
| | | <#label id="travelTimeStr" name="乘车时间" value="${item.travelTimeStr}"/> |
| | | <#label id="userPhone" name="下单用户手机号" value="${item.userPhone}"/> |
| | |
| | | <!--<input type="radio" name='func' value='polyline'><span class="input-text">画折线</span> --> |
| | | <input type="radio" name='func' value='polygon'><span class="input-text" style='width:5rem;'>画多边形</span> |
| | | <!--<input type="radio" name='func' value='rectangle'><span class="input-text" style='width:5rem;'>画矩形</span> --> |
| | | <input type="radio" name='func' value='circle'><span class="input-text" style='width:5rem;'>画圆</span> |
| | | <!-- <input type="radio" name='func' value='circle'><span class="input-text" style='width:5rem;'>画圆</span>--> |
| | | </div> |
| | | <div class="input-item"> |
| | | <input id="clear" type="button" class="btn" value="清除" /> |
| | |
| | | <!--<input type="radio" name='func' value='polyline'><span class="input-text">画折线</span> --> |
| | | <input type="radio" name='func' value='polygon'><span class="input-text" style='width:5rem;'>画多边形</span> |
| | | <!--<input type="radio" name='func' value='rectangle'><span class="input-text" style='width:5rem;'>画矩形</span> --> |
| | | <input type="radio" name='func' value='circle'><span class="input-text" style='width:5rem;'>画圆</span> |
| | | <!-- <input type="radio" name='func' value='circle'><span class="input-text" style='width:5rem;'>画圆</span>--> |
| | | </div> |
| | | <div class="input-item"> |
| | | <input id="clear" type="button" class="btn" value="清除" /> |
| | |
| | | <input type="radio" id="type2" value="2" name="type" > |
| | | <label for="type2"> 司机端 </label> |
| | | </div> |
| | | <div class="radio radio-primary radio-inline"> |
| | | <input type="radio" id="type3" value="3" name="type" > |
| | | <label for="type3"> 车载端 </label> |
| | | </div> |
| | | <div class="radio radio-primary radio-inline"> |
| | | <input type="radio" id="type4" value="4" name="type" > |
| | | <label for="type4"> 调度端 </label> |
| | | </div> |
| | | <!-- <div class="radio radio-primary radio-inline">--> |
| | | <!-- <input type="radio" id="type3" value="3" name="type" >--> |
| | | <!-- <label for="type3"> 车载端 </label>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="radio radio-primary radio-inline">--> |
| | | <!-- <input type="radio" id="type4" value="4" name="type" >--> |
| | | <!-- <label for="type4"> 调度端 </label>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | | <div id="androidDiv"> |
| | |
| | | case 'circle':{//圆行 |
| | | var center = e.obj.getCenter(); |
| | | var radius = e.obj.getRadius(); |
| | | if(radius > 5000){ |
| | | Feng.error("创建电子围栏失败,圆半径不能大于5000米"); |
| | | return; |
| | | } |
| | | coordinate = center.lng + ',' + center.lat + ';' + radius; |
| | | break; |
| | | } |
| | |
| | | Feng.error("请输入正确金额数!"); |
| | | return; |
| | | } |
| | | if (!re.test($("#num7").val())) { |
| | | Feng.error("请输入正确金额数!"); |
| | | return; |
| | | } |
| | | // if (!re.test($("#num7").val())) { |
| | | // Feng.error("请输入正确金额数!"); |
| | | // return; |
| | | // } |
| | | if (!re.test($("#num9").val())) { |
| | | Feng.error("请输入正确金额数!"); |
| | | return; |
| | |
| | | Feng.error("请输入正确小时数!"); |
| | | return; |
| | | } |
| | | if (!/^[1-9]\d*$/.test($("#num6").val())) { |
| | | Feng.error("请输入正确小时数!"); |
| | | return; |
| | | } |
| | | // if (!/^[1-9]\d*$/.test($("#num6").val())) { |
| | | // Feng.error("请输入正确小时数!"); |
| | | // return; |
| | | // } |
| | | if (!/^[1-9]\d*$/.test($("#num8").val())) { |
| | | Feng.error("请输入正确小时数!"); |
| | | return; |
| | |
| | | ajax.set("num3",$("#num3").val()); |
| | | ajax.set("num4",$("#num4").val()); |
| | | ajax.set("num5",$("#num5").val()); |
| | | ajax.set("num6",$("#num6").val()); |
| | | ajax.set("num7",$("#num7").val()); |
| | | ajax.set("num6",0); |
| | | ajax.set("num7",0); |
| | | ajax.set("num8",$("#num8").val()); |
| | | ajax.set("num9",$("#num9").val()); |
| | | ajax.set("num10",$("#num10").val()); |
| | |
| | | Feng.error("请输入正确金额数!"); |
| | | return; |
| | | } |
| | | if (!re.test($("#num7").val())) { |
| | | Feng.error("请输入正确金额数!"); |
| | | return; |
| | | } |
| | | // if (!re.test($("#num7").val())) { |
| | | // Feng.error("请输入正确金额数!"); |
| | | // return; |
| | | // } |
| | | if (!re.test($("#num9").val())) { |
| | | Feng.error("请输入正确金额数!"); |
| | | return; |
| | |
| | | Feng.error("请输入正确小时数!"); |
| | | return; |
| | | } |
| | | if (!/^[1-9]\d*$/.test($("#num6").val())) { |
| | | Feng.error("请输入正确小时数!"); |
| | | return; |
| | | } |
| | | // if (!/^[1-9]\d*$/.test($("#num6").val())) { |
| | | // Feng.error("请输入正确小时数!"); |
| | | // return; |
| | | // } |
| | | if (!/^[1-9]\d*$/.test($("#num8").val())) { |
| | | Feng.error("请输入正确小时数!"); |
| | | return; |
| | |
| | | ajax.set("num3",$("#num3").val()); |
| | | ajax.set("num4",$("#num4").val()); |
| | | ajax.set("num5",$("#num5").val()); |
| | | ajax.set("num6",$("#num6").val()); |
| | | ajax.set("num7",$("#num7").val()); |
| | | ajax.set("num6",0); |
| | | ajax.set("num7",0); |
| | | ajax.set("num8",$("#num8").val()); |
| | | ajax.set("num9",$("#num9").val()); |
| | | ajax.set("num10",$("#num10").val()); |
| | |
| | | } |
| | | } |
| | | }, |
| | | isBroadcast: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '选择是否播报' |
| | | } |
| | | } |
| | | }, |
| | | // isBroadcast: { |
| | | // validators: { |
| | | // notEmpty: { |
| | | // message: '选择是否播报' |
| | | // } |
| | | // } |
| | | // }, |
| | | isShow: { |
| | | validators: { |
| | | notEmpty: { |
| | |
| | | .set('title') |
| | | .set('sort') |
| | | .set('isShow') |
| | | .set('isBroadcast') |
| | | // .set('isBroadcast') |
| | | .set('type') |
| | | .set('imgUrl') |
| | | .set('flag') |
| | |
| | | case 'circle':{//圆形 |
| | | var center = e.obj.getCenter(); |
| | | var radius = e.obj.getRadius(); |
| | | if(radius > 5000){ |
| | | Feng.error("创建电子围栏失败,圆半径不能大于5000米"); |
| | | return; |
| | | } |
| | | coordinate += center.lng + ',' + center.lat + ';' + radius + "_"; |
| | | objs.circle.push(e.obj); |
| | | break; |
| | |
| | | |
| | | circleEditor.on('adjust', function(e) { |
| | | var radius = e.target.getRadius(); |
| | | if(radius > 5000){ |
| | | Feng.error("创建电子围栏失败,圆半径不能大于5000米"); |
| | | return; |
| | | } |
| | | }) |
| | | |
| | | circleEditor.on('end', function(e) { |