新增重点场所功能。

This commit is contained in:
Renpc-kilig 2021-11-16 15:15:55 +08:00
parent b0eb55eaa0
commit f1b152ca05
19 changed files with 3979 additions and 4 deletions

View File

@ -0,0 +1,111 @@
package cn.com.tenlion.systembase.controller.api.keyplace;
import cn.com.tenlion.systembase.pojo.dtos.keyplace.KeyPlaceDTO;
import cn.com.tenlion.systembase.pojo.vos.keyplace.KeyPlaceVO;
import cn.com.tenlion.systembase.service.keyplace.IKeyPlaceService;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultData;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @ClassName: KeyPlaceController
* @Description: 重点场所
* @Author: CodeFactory
* @Date: 2021-11-16 11:25:17
* @Version: 3.0
**/
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "重点场所接口")
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/keyplace")
public class KeyPlaceController extends DefaultBaseController {
@Autowired
private IKeyPlaceService keyPlaceService;
@ApiOperation(value = "新增重点场所", notes = "新增重点场所接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
@CheckRequestBodyAnnotation
public SuccessResult save(@RequestBody KeyPlaceVO keyPlaceVO) {
keyPlaceService.save(keyPlaceVO);
return new SuccessResult();
}
@ApiOperation(value = "删除重点场所", notes = "删除重点场所接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "ids", value = "ID列表用下划线分隔", paramType = "path", example = "1_2_3")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
keyPlaceService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
@ApiOperation(value = "修改重点场所", notes = "修改重点场所接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "keyPlaceId", value = "重点场所ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{keyPlaceId}")
@CheckRequestBodyAnnotation
public SuccessResult update(@PathVariable("keyPlaceId") String keyPlaceId, @RequestBody KeyPlaceVO keyPlaceVO) {
keyPlaceService.update(keyPlaceId, keyPlaceVO);
return new SuccessResult();
}
@ApiOperation(value = "重点场所详情", notes = "重点场所详情接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "keyPlaceId", value = "重点场所ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get/{keyPlaceId}")
public KeyPlaceDTO get(@PathVariable("keyPlaceId") String keyPlaceId) {
return keyPlaceService.get(keyPlaceId);
}
@ApiOperation(value = "重点场所列表", notes = "重点场所列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list")
public List<KeyPlaceDTO> list() {
Map<String, Object> params = requestParams();
return keyPlaceService.list(params);
}
@ApiOperation(value = "重点场所分页列表", notes = "重点场所分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpage")
public SuccessResultList<List<KeyPlaceDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return keyPlaceService.listPage(page);
}
@ApiOperation(value = "重点场所统计", notes = "重点场所统计接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("count")
SuccessResultData<Integer> count() {
Map<String, Object> params = requestParams();
return new SuccessResultData<>(keyPlaceService.count(params));
}
}

View File

@ -0,0 +1,121 @@
package cn.com.tenlion.systembase.controller.app.api.keyplace;
import cn.com.tenlion.systembase.pojo.dtos.keyplace.KeyPlaceDTO;
import cn.com.tenlion.systembase.pojo.vos.keyplace.KeyPlaceVO;
import cn.com.tenlion.systembase.service.keyplace.IKeyPlaceService;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultData;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @ClassName: KeyPlaceAppController
* @Description: 重点场所
* @Author: CodeFactory
* @Date: 2021-11-16 11:25:17
* @Version: 3.0
**/
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "重点场所接口")
@RestController
@RequestMapping(ISystemConstant.APP_PREFIX + "/keyplace")
public class KeyPlaceAppController extends DefaultBaseController {
@Autowired
private IKeyPlaceService keyPlaceService;
@ApiOperation(value = "新增重点场所", notes = "新增重点场所接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
@CheckRequestBodyAnnotation
public SuccessResult save(@RequestHeader("token") String token, @RequestBody KeyPlaceVO keyPlaceVO) {
keyPlaceService.save(token, keyPlaceVO);
return new SuccessResult();
}
@ApiOperation(value = "删除重点场所(id列表)", notes = "删除重点场所(id列表)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "ids", value = "ID列表用下划线分隔", paramType = "path", example = "1_2_3")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@RequestHeader("token") String token, @PathVariable("ids") String ids) {
keyPlaceService.remove(token, Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
@ApiOperation(value = "修改重点场所", notes = "修改重点场所接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "keyPlaceId", value = "重点场所ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("updatekeyplace/{keyPlaceId}")
@CheckRequestBodyAnnotation
public SuccessResult updateKeyPlace(@RequestHeader("token") String token, @PathVariable("keyPlaceId") String keyPlaceId, @RequestBody KeyPlaceVO keyPlaceVO) {
keyPlaceService.update(token, keyPlaceId, keyPlaceVO);
return new SuccessResult();
}
@ApiOperation(value = "重点场所详情(通过ID)", notes = "重点场所详情(通过ID)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "keyPlaceId", value = "重点场所ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get/{keyPlaceId}")
public KeyPlaceDTO get(@RequestHeader("token") String token, @PathVariable("keyPlaceId") String keyPlaceId) {
return keyPlaceService.get(keyPlaceId);
}
@ApiOperation(value = "重点场所列表", notes = "重点场所列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list")
public List<KeyPlaceDTO> list(@RequestHeader("token") String token) {
Map<String, Object> params = requestParams();
return keyPlaceService.list(params);
}
@ApiOperation(value = "重点场所分页列表", notes = "重点场所分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpagekeyplace")
public SuccessResultList<List<KeyPlaceDTO>> listPage(@RequestHeader("token") String token, ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return keyPlaceService.listPage(page);
}
@ApiOperation(value = "重点场所统计", notes = "重点场所统计接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("count")
SuccessResultData<Integer> count() {
Map<String, Object> params = requestParams();
return new SuccessResultData<>(keyPlaceService.count(params));
}
}

View File

@ -0,0 +1,121 @@
package cn.com.tenlion.systembase.controller.resource.keyplace;
import cn.com.tenlion.systembase.pojo.dtos.keyplace.KeyPlaceDTO;
import cn.com.tenlion.systembase.pojo.vos.keyplace.KeyPlaceVO;
import cn.com.tenlion.systembase.service.keyplace.IKeyPlaceService;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultData;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @ClassName: KeyPlaceResourceController
* @Description: 重点场所
* @Author: CodeFactory
* @Date: 2021-11-16 11:25:17
* @Version: 3.0
**/
@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "重点场所接口")
@RestController
@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/keyplace")
public class KeyPlaceResourceController extends DefaultBaseController {
@Autowired
private IKeyPlaceService keyPlaceService;
@ApiOperation(value = "新增重点场所", notes = "新增重点场所接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
@CheckRequestBodyAnnotation
public SuccessResult save(@RequestBody KeyPlaceVO keyPlaceVO) {
keyPlaceService.save(keyPlaceVO);
return new SuccessResult();
}
@ApiOperation(value = "删除重点场所(id列表)", notes = "删除重点场所(id列表)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
@ApiImplicitParam(name = "ids", value = "ID列表用下划线分隔", paramType = "path", example = "1_2_3")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
keyPlaceService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
@ApiOperation(value = "修改重点场所", notes = "修改重点场所接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
@ApiImplicitParam(name = "keyPlaceId", value = "重点场所ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{keyPlaceId}")
@CheckRequestBodyAnnotation
public SuccessResult update(@PathVariable("keyPlaceId") String keyPlaceId, @RequestBody KeyPlaceVO keyPlaceVO) {
keyPlaceService.update(keyPlaceId, keyPlaceVO);
return new SuccessResult();
}
@ApiOperation(value = "重点场所详情", notes = "重点场所详情接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
@ApiImplicitParam(name = "keyPlaceId", value = "重点场所ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get/{keyPlaceId}")
public KeyPlaceDTO get(@PathVariable("keyPlaceId") String keyPlaceId) {
return keyPlaceService.get(keyPlaceId);
}
@ApiOperation(value = "重点场所列表", notes = "重点场所列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list")
public List<KeyPlaceDTO> list() {
Map<String, Object> params = requestParams();
return keyPlaceService.list(params);
}
@ApiOperation(value = "重点场所分页列表", notes = "重点场所分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpage")
public SuccessResultList<List<KeyPlaceDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return keyPlaceService.listPage(page);
}
@ApiOperation(value = "重点场所统计", notes = "重点场所统计接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("count")
SuccessResultData<Integer> count() {
Map<String, Object> params = requestParams();
return new SuccessResultData<>(keyPlaceService.count(params));
}
}

View File

@ -0,0 +1,36 @@
package cn.com.tenlion.systembase.controller.route.keyplace;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
/**
* @ClassName: KeyPlaceController
* @Description: 重点场所
* @Author: CodeFactory
* @Date: 2021-11-16 11:25:17
* @Version: 3.0
**/
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "重点场所路由")
@RestController
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/keyplace")
public class KeyPlaceRouteController extends DefaultBaseController {
@GetMapping("save")
public ModelAndView save() {
return new ModelAndView("keyplace/save");
}
@GetMapping("update")
public ModelAndView update() {
return new ModelAndView("keyplace/update");
}
@GetMapping("list")
public ModelAndView list() {
return new ModelAndView("keyplace/list");
}
}

View File

@ -0,0 +1,120 @@
package cn.com.tenlion.systembase.dao.keyplace;
import cn.com.tenlion.systembase.pojo.bos.keyplace.KeyPlaceBO;
import cn.com.tenlion.systembase.pojo.dtos.keyplace.KeyPlaceDTO;
import cn.com.tenlion.systembase.pojo.pos.keyplace.KeyPlacePO;
import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.exceptions.UpdateException;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* @ClassName: IKeyPlaceDao
* @Description: 重点场所
* @Author: CodeFactory
* @Date: 2021-11-16 11:25:17
* @Version: 3.0
**/
@Repository
public interface IKeyPlaceDao {
/**
* 新增重点场所
*
* @param params
* @throws SaveException
*/
void save(Map<String, Object> params) throws SaveException;
/**
* 删除重点场所
*
* @param params
* @throws RemoveException
*/
void remove(Map<String, Object> params) throws RemoveException;
/**
* 删除重点场所物理
*
* @param params
* @throws RemoveException
*/
void delete(Map<String, Object> params) throws RemoveException;
/**
* 修改重点场所
*
* @param params
* @throws UpdateException
*/
void update(Map<String, Object> params) throws UpdateException;
/**
* 重点场所详情
*
* @param params
* @return
* @throws SearchException
*/
KeyPlaceDTO get(Map<String, Object> params) throws SearchException;
/**
* 重点场所详情
*
* @param params
* @return
* @throws SearchException
*/
KeyPlaceBO getBO(Map<String, Object> params) throws SearchException;
/**
* 重点场所详情
*
* @param params
* @return
* @throws SearchException
*/
KeyPlacePO getPO(Map<String, Object> params) throws SearchException;
/**
* 重点场所列表
*
* @param params
* @return
* @throws SearchException
*/
List<KeyPlaceDTO> list(Map<String, Object> params) throws SearchException;
/**
* 重点场所列表
*
* @param params
* @return
* @throws SearchException
*/
List<KeyPlaceBO> listBO(Map<String, Object> params) throws SearchException;
/**
* 重点场所列表
*
* @param params
* @return
* @throws SearchException
*/
List<KeyPlacePO> listPO(Map<String, Object> params) throws SearchException;
/**
* 重点场所统计
*
* @param params
* @return
* @throws SearchException
*/
Integer count(Map<String, Object> params) throws SearchException;
}

View File

@ -0,0 +1,186 @@
package cn.com.tenlion.systembase.pojo.bos.keyplace;
/**
*
* @ClassName: KeyPlaceBO
* @Description: 重点场所
* @Author: CodeFactory
* @Date: 2021-11-16 15:06:28
* @Version: 3.0
**/
public class KeyPlaceBO {
private String keyPlaceId;
private String placeName;
private String placeType;
private String placeTypeName;
private String detailType;
private String detailTypeName;
private String areaCode;
private String areaName;
private String address;
private String linkMan;
private String linkPhone;
private String phone;
private String longitude;
private String latitude;
private String creator;
private String gmtCreate;
private String modifier;
private String gmtModified;
private Integer isDelete;
public String getKeyPlaceId() {
return keyPlaceId == null ? "" : keyPlaceId.trim();
}
public void setKeyPlaceId(String keyPlaceId) {
this.keyPlaceId = keyPlaceId;
}
public String getPlaceName() {
return placeName == null ? "" : placeName.trim();
}
public void setPlaceName(String placeName) {
this.placeName = placeName;
}
public String getPlaceType() {
return placeType == null ? "" : placeType.trim();
}
public void setPlaceType(String placeType) {
this.placeType = placeType;
}
public String getPlaceTypeName() {
return placeTypeName == null ? "" : placeTypeName.trim();
}
public void setPlaceTypeName(String placeTypeName) {
this.placeTypeName = placeTypeName;
}
public String getDetailType() {
return detailType == null ? "" : detailType.trim();
}
public void setDetailType(String detailType) {
this.detailType = detailType;
}
public String getDetailTypeName() {
return detailTypeName == null ? "" : detailTypeName.trim();
}
public void setDetailTypeName(String detailTypeName) {
this.detailTypeName = detailTypeName;
}
public String getAreaCode() {
return areaCode == null ? "" : areaCode.trim();
}
public void setAreaCode(String areaCode) {
this.areaCode = areaCode;
}
public String getAreaName() {
return areaName == null ? "" : areaName.trim();
}
public void setAreaName(String areaName) {
this.areaName = areaName;
}
public String getAddress() {
return address == null ? "" : address.trim();
}
public void setAddress(String address) {
this.address = address;
}
public String getLinkMan() {
return linkMan == null ? "" : linkMan.trim();
}
public void setLinkMan(String linkMan) {
this.linkMan = linkMan;
}
public String getLinkPhone() {
return linkPhone == null ? "" : linkPhone.trim();
}
public void setLinkPhone(String linkPhone) {
this.linkPhone = linkPhone;
}
public String getPhone() {
return phone == null ? "" : phone.trim();
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getLongitude() {
return longitude == null ? "" : longitude.trim();
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude == null ? "" : latitude.trim();
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getCreator() {
return creator == null ? "" : creator.trim();
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getGmtCreate() {
return gmtCreate == null ? "" : gmtCreate.trim();
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
public String getModifier() {
return modifier == null ? "" : modifier.trim();
}
public void setModifier(String modifier) {
this.modifier = modifier;
}
public String getGmtModified() {
return gmtModified == null ? "" : gmtModified.trim();
}
public void setGmtModified(String gmtModified) {
this.gmtModified = gmtModified;
}
public Integer getIsDelete() {
return isDelete == null ? 0 : isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
}

View File

@ -0,0 +1,209 @@
package cn.com.tenlion.systembase.pojo.dtos.keyplace;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @ClassName: KeyPlaceDTO
* @Description: 重点场所
* @Author: CodeFactory
* @Date: 2021-11-16 15:06:28
* @Version: 3.0
**/
@ApiModel
public class KeyPlaceDTO {
@ApiModelProperty(name = "keyPlaceId", value = "主键UUID")
private String keyPlaceId;
@ApiModelProperty(name = "placeName", value = "场所名称")
private String placeName;
@ApiModelProperty(name = "placeType", value = "场所类型")
private String placeType;
@ApiModelProperty(name = "placeTypeName", value = "场所类型名称")
private String placeTypeName;
@ApiModelProperty(name = "detailType", value = "详细类型")
private String detailType;
@ApiModelProperty(name = "detailTypeName", value = "详细类型名称")
private String detailTypeName;
@ApiModelProperty(name = "areaCode", value = "地址编码")
private String areaCode;
@ApiModelProperty(name = "areaName", value = "地址名称")
private String areaName;
@ApiModelProperty(name = "address", value = "详细地址")
private String address;
@ApiModelProperty(name = "linkMan", value = "负责人")
private String linkMan;
@ApiModelProperty(name = "linkPhone", value = "负责人联系方式")
private String linkPhone;
@ApiModelProperty(name = "phone", value = "联系方式")
private String phone;
@ApiModelProperty(name = "longitude", value = "经度")
private String longitude;
@ApiModelProperty(name = "latitude", value = "纬度")
private String latitude;
@ApiModelProperty(name = "creator", value = "")
private String creator;
@ApiModelProperty(name = "gmtCreate", value = "")
private String gmtCreate;
@ApiModelProperty(name = "modifier", value = "")
private String modifier;
@ApiModelProperty(name = "gmtModified", value = "")
private String gmtModified;
@ApiModelProperty(name = "isDelete", value = "")
private Integer isDelete;
public String getKeyPlaceId() {
return keyPlaceId == null ? "" : keyPlaceId.trim();
}
public void setKeyPlaceId(String keyPlaceId) {
this.keyPlaceId = keyPlaceId;
}
public String getPlaceName() {
return placeName == null ? "" : placeName.trim();
}
public void setPlaceName(String placeName) {
this.placeName = placeName;
}
public String getPlaceType() {
return placeType == null ? "" : placeType.trim();
}
public void setPlaceType(String placeType) {
this.placeType = placeType;
}
public String getPlaceTypeName() {
return placeTypeName == null ? "" : placeTypeName.trim();
}
public void setPlaceTypeName(String placeTypeName) {
this.placeTypeName = placeTypeName;
}
public String getDetailType() {
return detailType == null ? "" : detailType.trim();
}
public void setDetailType(String detailType) {
this.detailType = detailType;
}
public String getDetailTypeName() {
return detailTypeName == null ? "" : detailTypeName.trim();
}
public void setDetailTypeName(String detailTypeName) {
this.detailTypeName = detailTypeName;
}
public String getAreaCode() {
return areaCode == null ? "" : areaCode.trim();
}
public void setAreaCode(String areaCode) {
this.areaCode = areaCode;
}
public String getAreaName() {
return areaName == null ? "" : areaName.trim();
}
public void setAreaName(String areaName) {
this.areaName = areaName;
}
public String getAddress() {
return address == null ? "" : address.trim();
}
public void setAddress(String address) {
this.address = address;
}
public String getLinkMan() {
return linkMan == null ? "" : linkMan.trim();
}
public void setLinkMan(String linkMan) {
this.linkMan = linkMan;
}
public String getLinkPhone() {
return linkPhone == null ? "" : linkPhone.trim();
}
public void setLinkPhone(String linkPhone) {
this.linkPhone = linkPhone;
}
public String getPhone() {
return phone == null ? "" : phone.trim();
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getLongitude() {
return longitude == null ? "" : longitude.trim();
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude == null ? "" : latitude.trim();
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getCreator() {
return creator == null ? "" : creator.trim();
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getGmtCreate() {
return gmtCreate == null ? "" : gmtCreate.trim();
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
public String getModifier() {
return modifier == null ? "" : modifier.trim();
}
public void setModifier(String modifier) {
this.modifier = modifier;
}
public String getGmtModified() {
return gmtModified == null ? "" : gmtModified.trim();
}
public void setGmtModified(String gmtModified) {
this.gmtModified = gmtModified;
}
public Integer getIsDelete() {
return isDelete == null ? 0 : isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
}

View File

@ -0,0 +1,186 @@
package cn.com.tenlion.systembase.pojo.pos.keyplace;
/**
*
* @ClassName: KeyPlacePO
* @Description: 重点场所
* @Author: CodeFactory
* @Date: 2021-11-16 15:06:28
* @Version: 3.0
**/
public class KeyPlacePO {
private String keyPlaceId;
private String placeName;
private String placeType;
private String placeTypeName;
private String detailType;
private String detailTypeName;
private String areaCode;
private String areaName;
private String address;
private String linkMan;
private String linkPhone;
private String phone;
private String longitude;
private String latitude;
private String creator;
private String gmtCreate;
private String modifier;
private String gmtModified;
private Integer isDelete;
public String getKeyPlaceId() {
return keyPlaceId == null ? "" : keyPlaceId.trim();
}
public void setKeyPlaceId(String keyPlaceId) {
this.keyPlaceId = keyPlaceId;
}
public String getPlaceName() {
return placeName == null ? "" : placeName.trim();
}
public void setPlaceName(String placeName) {
this.placeName = placeName;
}
public String getPlaceType() {
return placeType == null ? "" : placeType.trim();
}
public void setPlaceType(String placeType) {
this.placeType = placeType;
}
public String getPlaceTypeName() {
return placeTypeName == null ? "" : placeTypeName.trim();
}
public void setPlaceTypeName(String placeTypeName) {
this.placeTypeName = placeTypeName;
}
public String getDetailType() {
return detailType == null ? "" : detailType.trim();
}
public void setDetailType(String detailType) {
this.detailType = detailType;
}
public String getDetailTypeName() {
return detailTypeName == null ? "" : detailTypeName.trim();
}
public void setDetailTypeName(String detailTypeName) {
this.detailTypeName = detailTypeName;
}
public String getAreaCode() {
return areaCode == null ? "" : areaCode.trim();
}
public void setAreaCode(String areaCode) {
this.areaCode = areaCode;
}
public String getAreaName() {
return areaName == null ? "" : areaName.trim();
}
public void setAreaName(String areaName) {
this.areaName = areaName;
}
public String getAddress() {
return address == null ? "" : address.trim();
}
public void setAddress(String address) {
this.address = address;
}
public String getLinkMan() {
return linkMan == null ? "" : linkMan.trim();
}
public void setLinkMan(String linkMan) {
this.linkMan = linkMan;
}
public String getLinkPhone() {
return linkPhone == null ? "" : linkPhone.trim();
}
public void setLinkPhone(String linkPhone) {
this.linkPhone = linkPhone;
}
public String getPhone() {
return phone == null ? "" : phone.trim();
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getLongitude() {
return longitude == null ? "" : longitude.trim();
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude == null ? "" : latitude.trim();
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getCreator() {
return creator == null ? "" : creator.trim();
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getGmtCreate() {
return gmtCreate == null ? "" : gmtCreate.trim();
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
public String getModifier() {
return modifier == null ? "" : modifier.trim();
}
public void setModifier(String modifier) {
this.modifier = modifier;
}
public String getGmtModified() {
return gmtModified == null ? "" : gmtModified.trim();
}
public void setGmtModified(String gmtModified) {
this.gmtModified = gmtModified;
}
public Integer getIsDelete() {
return isDelete == null ? 0 : isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
}

View File

@ -0,0 +1,151 @@
package cn.com.tenlion.systembase.pojo.vos.keyplace;
import ink.wgink.annotation.CheckEmptyAnnotation;
import ink.wgink.annotation.CheckNumberAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @ClassName: KeyPlaceVO
* @Description: 重点场所
* @Author: CodeFactory
* @Date: 2021-11-16 15:06:28
* @Version: 3.0
**/
@ApiModel
public class KeyPlaceVO {
@ApiModelProperty(name = "placeName", value = "场所名称")
private String placeName;
@ApiModelProperty(name = "placeType", value = "场所类型")
private String placeType;
@ApiModelProperty(name = "placeTypeName", value = "场所类型名称")
private String placeTypeName;
@ApiModelProperty(name = "detailType", value = "详细类型")
private String detailType;
@ApiModelProperty(name = "detailTypeName", value = "详细类型名称")
private String detailTypeName;
@ApiModelProperty(name = "areaCode", value = "地址编码")
private String areaCode;
@ApiModelProperty(name = "areaName", value = "地址名称")
private String areaName;
@ApiModelProperty(name = "address", value = "详细地址")
private String address;
@ApiModelProperty(name = "linkMan", value = "负责人")
private String linkMan;
@ApiModelProperty(name = "linkPhone", value = "负责人联系方式")
private String linkPhone;
@ApiModelProperty(name = "phone", value = "联系方式")
private String phone;
@ApiModelProperty(name = "longitude", value = "经度")
private String longitude;
@ApiModelProperty(name = "latitude", value = "纬度")
private String latitude;
public String getPlaceName() {
return placeName == null ? "" : placeName.trim();
}
public void setPlaceName(String placeName) {
this.placeName = placeName;
}
public String getPlaceType() {
return placeType == null ? "" : placeType.trim();
}
public void setPlaceType(String placeType) {
this.placeType = placeType;
}
public String getPlaceTypeName() {
return placeTypeName == null ? "" : placeTypeName.trim();
}
public void setPlaceTypeName(String placeTypeName) {
this.placeTypeName = placeTypeName;
}
public String getDetailType() {
return detailType == null ? "" : detailType.trim();
}
public void setDetailType(String detailType) {
this.detailType = detailType;
}
public String getDetailTypeName() {
return detailTypeName == null ? "" : detailTypeName.trim();
}
public void setDetailTypeName(String detailTypeName) {
this.detailTypeName = detailTypeName;
}
public String getAreaCode() {
return areaCode == null ? "" : areaCode.trim();
}
public void setAreaCode(String areaCode) {
this.areaCode = areaCode;
}
public String getAreaName() {
return areaName == null ? "" : areaName.trim();
}
public void setAreaName(String areaName) {
this.areaName = areaName;
}
public String getAddress() {
return address == null ? "" : address.trim();
}
public void setAddress(String address) {
this.address = address;
}
public String getLinkMan() {
return linkMan == null ? "" : linkMan.trim();
}
public void setLinkMan(String linkMan) {
this.linkMan = linkMan;
}
public String getLinkPhone() {
return linkPhone == null ? "" : linkPhone.trim();
}
public void setLinkPhone(String linkPhone) {
this.linkPhone = linkPhone;
}
public String getPhone() {
return phone == null ? "" : phone.trim();
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getLongitude() {
return longitude == null ? "" : longitude.trim();
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude == null ? "" : latitude.trim();
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
}

View File

@ -10,12 +10,15 @@ import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.date.DateUtil;
import ink.wgink.util.map.HashMapUtil;
import ink.wgink.util.UUIDUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;
import java.util.*;
@ -53,10 +56,24 @@ public class KeyAreaCheckRenovationPatrolServiceImpl extends DefaultBaseService
String keyAreaCheckRenovationPatrolId = UUIDUtil.getUUID();
Map<String, Object> params = HashMapUtil.beanToMap(keyAreaCheckRenovationPatrolVO);
params.put("keyAreaCheckRenovationPatrolId", keyAreaCheckRenovationPatrolId);
if (StringUtils.isBlank(token)) {
setSaveInfo(params);
} else {
setAppSaveInfo(token, params);
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
try {
if (null != authentication) {
if (StringUtils.isBlank(token)) {
setSaveInfo(params);
} else {
setAppSaveInfo(token, params);
}
} else {
String currentDate = DateUtil.getTime();
params.put("creator", 1);
params.put("gmtCreate", currentDate);
params.put("modifier", 1);
params.put("gmtModified", currentDate);
params.put("isDelete", 0);
}
}catch (Exception e) {
}
keyAreaCheckRenovationPatrolDao.save(params);
return keyAreaCheckRenovationPatrolId;

View File

@ -0,0 +1,188 @@
package cn.com.tenlion.systembase.service.keyplace;
import cn.com.tenlion.systembase.pojo.bos.keyplace.KeyPlaceBO;
import cn.com.tenlion.systembase.pojo.dtos.keyplace.KeyPlaceDTO;
import cn.com.tenlion.systembase.pojo.pos.keyplace.KeyPlacePO;
import cn.com.tenlion.systembase.pojo.vos.keyplace.KeyPlaceVO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.List;
import java.util.Map;
/**
* @ClassName: IKeyPlaceService
* @Description: 重点场所
* @Author: CodeFactory
* @Date: 2021-11-16 11:25:17
* @Version: 3.0
**/
public interface IKeyPlaceService {
/**
* 新增重点场所
*
* @param keyPlaceVO
* @return
*/
void save(KeyPlaceVO keyPlaceVO);
/**
* 新增重点场所
*
* @param token
* @param keyPlaceVO
* @return
*/
void save(String token, KeyPlaceVO keyPlaceVO);
/**
* 新增重点场所
*
* @param keyPlaceVO
* @return keyPlaceId
*/
String saveReturnId(KeyPlaceVO keyPlaceVO);
/**
* 新增重点场所
*
* @param token
* @param keyPlaceVO
* @return keyPlaceId
*/
String saveReturnId(String token, KeyPlaceVO keyPlaceVO);
/**
* 删除重点场所
*
* @param ids id列表
* @return
*/
void remove(List<String> ids);
/**
* 删除重点场所
*
* @param token
* @param ids id列表
* @return
*/
void remove(String token, List<String> ids);
/**
* 删除重点场所物理删除
*
* @param ids id列表
*/
void delete(List<String> ids);
/**
* 修改重点场所
*
* @param keyPlaceId
* @param keyPlaceVO
* @return
*/
void update(String keyPlaceId, KeyPlaceVO keyPlaceVO);
/**
* 修改重点场所
*
* @param token
* @param keyPlaceId
* @param keyPlaceVO
* @return
*/
void update(String token, String keyPlaceId, KeyPlaceVO keyPlaceVO);
/**
* 重点场所详情
*
* @param params 参数Map
* @return
*/
KeyPlaceDTO get(Map<String, Object> params);
/**
* 重点场所详情
*
* @param keyPlaceId
* @return
*/
KeyPlaceDTO get(String keyPlaceId);
/**
* 重点场所详情
*
* @param params 参数Map
* @return
*/
KeyPlaceBO getBO(Map<String, Object> params);
/**
* 重点场所详情
*
* @param keyPlaceId
* @return
*/
KeyPlaceBO getBO(String keyPlaceId);
/**
* 重点场所详情
*
* @param params 参数Map
* @return
*/
KeyPlacePO getPO(Map<String, Object> params);
/**
* 重点场所详情
*
* @param keyPlaceId
* @return
*/
KeyPlacePO getPO(String keyPlaceId);
/**
* 重点场所列表
*
* @param params
* @return
*/
List<KeyPlaceDTO> list(Map<String, Object> params);
/**
* 重点场所列表
*
* @param params
* @return
*/
List<KeyPlaceBO> listBO(Map<String, Object> params);
/**
* 重点场所列表
*
* @param params
* @return
*/
List<KeyPlacePO> listPO(Map<String, Object> params);
/**
* 重点场所分页列表
*
* @param page
* @return
*/
SuccessResultList<List<KeyPlaceDTO>> listPage(ListPage page);
/**
* 重点场所统计
*
* @param params
* @return
*/
Integer count(Map<String, Object> params);
}

View File

@ -0,0 +1,170 @@
package cn.com.tenlion.systembase.service.keyplace.impl;
import cn.com.tenlion.systembase.dao.keyplace.IKeyPlaceDao;
import cn.com.tenlion.systembase.pojo.bos.keyplace.KeyPlaceBO;
import cn.com.tenlion.systembase.pojo.dtos.keyplace.KeyPlaceDTO;
import cn.com.tenlion.systembase.pojo.pos.keyplace.KeyPlacePO;
import cn.com.tenlion.systembase.pojo.vos.keyplace.KeyPlaceVO;
import cn.com.tenlion.systembase.service.keyplace.IKeyPlaceService;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.map.HashMapUtil;
import ink.wgink.util.UUIDUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
/**
* @ClassName: KeyPlaceServiceImpl
* @Description: 重点场所
* @Author: CodeFactory
* @Date: 2021-11-16 11:25:17
* @Version: 3.0
**/
@Service
public class KeyPlaceServiceImpl extends DefaultBaseService implements IKeyPlaceService {
@Autowired
private IKeyPlaceDao keyPlaceDao;
@Override
public void save(KeyPlaceVO keyPlaceVO) {
saveReturnId(keyPlaceVO);
}
@Override
public void save(String token, KeyPlaceVO keyPlaceVO) {
saveReturnId(token, keyPlaceVO);
}
@Override
public String saveReturnId(KeyPlaceVO keyPlaceVO) {
return saveReturnId(null, keyPlaceVO);
}
@Override
public String saveReturnId(String token, KeyPlaceVO keyPlaceVO) {
String keyPlaceId = UUIDUtil.getUUID();
Map<String, Object> params = HashMapUtil.beanToMap(keyPlaceVO);
params.put("keyPlaceId", keyPlaceId);
if (StringUtils.isBlank(token)) {
setSaveInfo(params);
} else {
setAppSaveInfo(token, params);
}
keyPlaceDao.save(params);
return keyPlaceId;
}
@Override
public void remove(List<String> ids) {
remove(null, ids);
}
@Override
public void remove(String token, List<String> ids) {
Map<String, Object> params = getHashMap(2);
params.put("keyPlaceIds", ids);
if (StringUtils.isBlank(token)) {
setUpdateInfo(params);
} else {
setAppUpdateInfo(token, params);
}
keyPlaceDao.remove(params);
}
@Override
public void delete(List<String> ids) {
Map<String, Object> params = getHashMap(2);
params.put("keyPlaceIds", ids);
keyPlaceDao.delete(params);
}
@Override
public void update(String keyPlaceId, KeyPlaceVO keyPlaceVO) {
update(null, keyPlaceId, keyPlaceVO);
}
@Override
public void update(String token, String keyPlaceId, KeyPlaceVO keyPlaceVO) {
Map<String, Object> params = HashMapUtil.beanToMap(keyPlaceVO);
params.put("keyPlaceId", keyPlaceId);
if (StringUtils.isBlank(token)) {
setUpdateInfo(params);
} else {
setAppUpdateInfo(token, params);
}
keyPlaceDao.update(params);
}
@Override
public KeyPlaceDTO get(Map<String, Object> params) {
return keyPlaceDao.get(params);
}
@Override
public KeyPlaceDTO get(String keyPlaceId) {
Map<String, Object> params = super.getHashMap(2);
params.put("keyPlaceId", keyPlaceId);
return get(params);
}
@Override
public KeyPlaceBO getBO(Map<String, Object> params) {
return keyPlaceDao.getBO(params);
}
@Override
public KeyPlaceBO getBO(String keyPlaceId) {
Map<String, Object> params = super.getHashMap(2);
params.put("keyPlaceId", keyPlaceId);
return getBO(params);
}
@Override
public KeyPlacePO getPO(Map<String, Object> params) {
return keyPlaceDao.getPO(params);
}
@Override
public KeyPlacePO getPO(String keyPlaceId) {
Map<String, Object> params = super.getHashMap(2);
params.put("keyPlaceId", keyPlaceId);
return getPO(params);
}
@Override
public List<KeyPlaceDTO> list(Map<String, Object> params) {
return keyPlaceDao.list(params);
}
@Override
public List<KeyPlaceBO> listBO(Map<String, Object> params) {
return keyPlaceDao.listBO(params);
}
@Override
public List<KeyPlacePO> listPO(Map<String, Object> params) {
return keyPlaceDao.listPO(params);
}
@Override
public SuccessResultList<List<KeyPlaceDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<KeyPlaceDTO> keyPlaceDTOs = list(page.getParams());
PageInfo<KeyPlaceDTO> pageInfo = new PageInfo<>(keyPlaceDTOs);
return new SuccessResultList<>(keyPlaceDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public Integer count(Map<String, Object> params) {
Integer count = keyPlaceDao.count(params);
return count == null ? 0 : count;
}
}

View File

@ -0,0 +1,442 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.com.tenlion.systembase.dao.keyplace.IKeyPlaceDao">
<resultMap id="keyPlaceDTO" type="cn.com.tenlion.systembase.pojo.dtos.keyplace.KeyPlaceDTO">
<result column="key_place_id" property="keyPlaceId"/>
<result column="place_name" property="placeName"/>
<result column="place_type" property="placeType"/>
<result column="place_type_name" property="placeTypeName"/>
<result column="detail_type" property="detailType"/>
<result column="detail_type_name" property="detailTypeName"/>
<result column="area_code" property="areaCode"/>
<result column="area_name" property="areaName"/>
<result column="address" property="address"/>
<result column="link_man" property="linkMan"/>
<result column="link_phone" property="linkPhone"/>
<result column="phone" property="phone"/>
<result column="longitude" property="longitude"/>
<result column="latitude" property="latitude"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="is_delete" property="isDelete"/>
</resultMap>
<resultMap id="keyPlaceBO" type="cn.com.tenlion.systembase.pojo.bos.keyplace.KeyPlaceBO">
<result column="key_place_id" property="keyPlaceId"/>
<result column="place_name" property="placeName"/>
<result column="place_type" property="placeType"/>
<result column="place_type_name" property="placeTypeName"/>
<result column="detail_type" property="detailType"/>
<result column="detail_type_name" property="detailTypeName"/>
<result column="area_code" property="areaCode"/>
<result column="area_name" property="areaName"/>
<result column="address" property="address"/>
<result column="link_man" property="linkMan"/>
<result column="link_phone" property="linkPhone"/>
<result column="phone" property="phone"/>
<result column="longitude" property="longitude"/>
<result column="latitude" property="latitude"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="is_delete" property="isDelete"/>
</resultMap>
<resultMap id="keyPlacePO" type="cn.com.tenlion.systembase.pojo.pos.keyplace.KeyPlacePO">
<result column="key_place_id" property="keyPlaceId"/>
<result column="place_name" property="placeName"/>
<result column="place_type" property="placeType"/>
<result column="place_type_name" property="placeTypeName"/>
<result column="detail_type" property="detailType"/>
<result column="detail_type_name" property="detailTypeName"/>
<result column="area_code" property="areaCode"/>
<result column="area_name" property="areaName"/>
<result column="address" property="address"/>
<result column="link_man" property="linkMan"/>
<result column="link_phone" property="linkPhone"/>
<result column="phone" property="phone"/>
<result column="longitude" property="longitude"/>
<result column="latitude" property="latitude"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="is_delete" property="isDelete"/>
</resultMap>
<!-- 新增重点场所 -->
<insert id="save" parameterType="map">
INSERT INTO data_key_place(
key_place_id,
place_name,
place_type,
place_type_name,
detail_type,
detail_type_name,
area_code,
area_name,
address,
link_man,
link_phone,
phone,
longitude,
latitude,
creator,
gmt_create,
modifier,
gmt_modified,
is_delete
) VALUES(
#{keyPlaceId},
#{placeName},
#{placeType},
#{placeTypeName},
#{detailType},
#{detailTypeName},
#{areaCode},
#{areaName},
#{address},
#{linkMan},
#{linkPhone},
#{phone},
#{longitude},
#{latitude},
#{creator},
#{gmtCreate},
#{modifier},
#{gmtModified},
#{isDelete}
)
</insert>
<!-- 删除重点场所 -->
<update id="remove" parameterType="map">
UPDATE
data_key_place
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
key_place_id IN
<foreach collection="keyPlaceIds" index="index" open="(" separator="," close=")">
#{keyPlaceIds[${index}]}
</foreach>
</update>
<!-- 删除重点场所(物理) -->
<update id="delete" parameterType="map">
DELETE FROM
data_key_place
WHERE
key_place_id IN
<foreach collection="keyPlaceIds" index="index" open="(" separator="," close=")">
#{keyPlaceIds[${index}]}
</foreach>
</update>
<!-- 修改重点场所 -->
<update id="update" parameterType="map">
UPDATE
data_key_place
SET
<if test="placeName != null and placeName != ''">
place_name = #{placeName},
</if>
<if test="placeType != null and placeType != ''">
place_type = #{placeType},
</if>
<if test="placeTypeName != null and placeTypeName != ''">
place_type_name = #{placeTypeName},
</if>
<if test="detailType != null and detailType != ''">
detail_type = #{detailType},
</if>
<if test="detailTypeName != null and detailTypeName != ''">
detail_type_name = #{detailTypeName},
</if>
<if test="areaCode != null and areaCode != ''">
area_code = #{areaCode},
</if>
<if test="areaName != null and areaName != ''">
area_name = #{areaName},
</if>
<if test="address != null and address != ''">
address = #{address},
</if>
<if test="linkMan != null and linkMan != ''">
link_man = #{linkMan},
</if>
<if test="linkPhone != null and linkPhone != ''">
link_phone = #{linkPhone},
</if>
<if test="phone != null and phone != ''">
phone = #{phone},
</if>
<if test="longitude != null and longitude != ''">
longitude = #{longitude},
</if>
<if test="latitude != null and latitude != ''">
latitude = #{latitude},
</if>
gmt_modified = #{gmtModified},
modifier = #{modifier},
key_place_id = key_place_id
WHERE
key_place_id = #{keyPlaceId}
</update>
<!-- 重点场所详情 -->
<select id="get" parameterType="map" resultMap="keyPlaceDTO">
SELECT
t1.place_name,
t1.place_type,
t1.place_type_name,
t1.detail_type,
t1.detail_type_name,
t1.area_code,
t1.area_name,
t1.address,
t1.link_man,
t1.link_phone,
t1.phone,
t1.longitude,
t1.latitude,
t1.key_place_id
FROM
data_key_place t1
WHERE
t1.is_delete = 0
<if test="keyPlaceId != null and keyPlaceId != ''">
AND
t1.key_place_id = #{keyPlaceId}
</if>
</select>
<!-- 重点场所详情 -->
<select id="getBO" parameterType="map" resultMap="keyPlaceBO">
SELECT
t1.key_place_id,
t1.place_name,
t1.place_type,
t1.place_type_name,
t1.detail_type,
t1.detail_type_name,
t1.area_code,
t1.area_name,
t1.address,
t1.link_man,
t1.link_phone,
t1.phone,
t1.longitude,
t1.latitude,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete
FROM
data_key_place t1
WHERE
t1.is_delete = 0
<if test="keyPlaceId != null and keyPlaceId != ''">
AND
t1.key_place_id = #{keyPlaceId}
</if>
</select>
<!-- 重点场所详情 -->
<select id="getPO" parameterType="map" resultMap="keyPlacePO">
SELECT
t1.key_place_id,
t1.place_name,
t1.place_type,
t1.place_type_name,
t1.detail_type,
t1.detail_type_name,
t1.area_code,
t1.area_name,
t1.address,
t1.link_man,
t1.link_phone,
t1.phone,
t1.longitude,
t1.latitude,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete
FROM
data_key_place t1
WHERE
t1.is_delete = 0
<if test="keyPlaceId != null and keyPlaceId != ''">
AND
t1.key_place_id = #{keyPlaceId}
</if>
</select>
<!-- 重点场所列表 -->
<select id="list" parameterType="map" resultMap="keyPlaceDTO">
SELECT
t1.key_place_id,
t1.place_name,
t1.place_type,
t1.place_type_name,
t1.detail_type,
t1.detail_type_name,
t1.area_code,
t1.area_name,
t1.address,
t1.link_man,
t1.link_phone,
t1.phone,
t1.longitude,
t1.latitude,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete,
1
FROM
data_key_place t1
WHERE
t1.is_delete = 0
<if test="keywords != null and keywords != ''">
AND (
<!-- 这里添加其他条件 -->
t1.id LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="startTime != null and startTime != ''">
AND
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
</if>
<if test="keyPlaceIds != null and keyPlaceIds.size > 0">
AND
t1.key_place_id IN
<foreach collection="keyPlaceIds" index="index" open="(" separator="," close=")">
#{keyPlaceIds[${index}]}
</foreach>
</if>
</select>
<!-- 重点场所列表 -->
<select id="listBO" parameterType="map" resultMap="keyPlaceBO">
SELECT
t1.key_place_id,
t1.place_name,
t1.place_type,
t1.place_type_name,
t1.detail_type,
t1.detail_type_name,
t1.area_code,
t1.area_name,
t1.address,
t1.link_man,
t1.link_phone,
t1.phone,
t1.longitude,
t1.latitude,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete
FROM
data_key_place t1
WHERE
t1.is_delete = 0
<if test="keywords != null and keywords != ''">
AND (
<!-- 这里添加其他条件 -->
t1.id LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="startTime != null and startTime != ''">
AND
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
</if>
<if test="keyPlaceIds != null and keyPlaceIds.size > 0">
AND
t1.key_place_id IN
<foreach collection="keyPlaceIds" index="index" open="(" separator="," close=")">
#{keyPlaceIds[${index}]}
</foreach>
</if>
</select>
<!-- 重点场所列表 -->
<select id="listPO" parameterType="map" resultMap="keyPlacePO">
SELECT
t1.key_place_id,
t1.place_name,
t1.place_type,
t1.place_type_name,
t1.detail_type,
t1.detail_type_name,
t1.area_code,
t1.area_name,
t1.address,
t1.link_man,
t1.link_phone,
t1.phone,
t1.longitude,
t1.latitude,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete
FROM
data_key_place t1
WHERE
t1.is_delete = 0
<if test="keywords != null and keywords != ''">
AND (
<!-- 这里添加其他条件 -->
t1.id LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="startTime != null and startTime != ''">
AND
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
</if>
<if test="keyPlaceIds != null and keyPlaceIds.size > 0">
AND
t1.key_place_id IN
<foreach collection="keyPlaceIds" index="index" open="(" separator="," close=")">
#{keyPlaceIds[${index}]}
</foreach>
</if>
</select>
<!-- 重点场所统计 -->
<select id="count" parameterType="map" resultType="Integer">
SELECT
COUNT(*)
FROM
data_key_place t1
WHERE
t1.is_delete = 0
</select>
</mapper>

View File

@ -0,0 +1,390 @@
<!doctype html>
<html lang="en">
<head>
<base href="/usercenter/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-inline">
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
</div>
<div class="layui-inline">
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
</div>
<div class="layui-inline">
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
</div>
<button type="button" id="search" class="layui-btn layui-btn-sm">
<i class="fa fa-lg fa-search"></i> 搜索
</button>
</div>
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
<!-- 表头按钮组 -->
<script type="text/html" id="headerToolBar">
<div class="layui-btn-group">
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
<i class="fa fa-lg fa-plus"></i> 新增
</button>
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<i class="fa fa-lg fa-edit"></i> 编辑
</button>
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
<i class="fa fa-lg fa-trash"></i> 删除
</button>
</div>
</script>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laydate', 'common'], function() {
var $ = layui.$;
var $win = $(window);
var table = layui.table;
var admin = layui.admin;
var laydate = layui.laydate;
var common = layui.common;
var resizeTimeout = null;
var tableUrl = 'api/keyplace/listpage';
// 初始化表格
function initTable() {
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, []),
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 90,
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
toolbar: '#headerToolBar',
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [
[
{type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'keyPlace', width: 180, title: '主键UUID', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'placeName', width: 180, title: '场所名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'placeType', width: 180, title: '场所类型', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'placeTypeName', width: 180, title: '场所类型名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'detailType', width: 180, title: '详细类型', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'detailTypeName', width: 180, title: '详细类型名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'areaCode', width: 180, title: '地址编码', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'areaName', width: 180, title: '地址名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'address', width: 180, title: '详细地址', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'linkMan', width: 180, title: '负责人', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'linkPhone', width: 180, title: '负责人联系方式', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'phone', width: 180, title: '联系方式', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'longitude', width: 180, title: '经度', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'latitude', width: 180, title: '纬度', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'creator', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'gmtCreate', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'modifier', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'gmtModified', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'isDelete', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
]
],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
}
});
}
// 重载表格
function reloadTable(currentPage) {
table.reload('dataTable', {
url: top.restAjax.path(tableUrl, []),
where: {
keywords: $('#keywords').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val()
},
page: {
curr: currentPage
},
height: $win.height() - 90,
});
}
// 初始化日期
function initDate() {
// 日期选择
laydate.render({
elem: '#startTime',
format: 'yyyy-MM-dd'
});
laydate.render({
elem: '#endTime',
format: 'yyyy-MM-dd'
});
}
// 删除
function removeData(ids) {
top.dialog.msg(top.dataMessage.delete, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function (index) {
top.dialog.close(index);
var layIndex;
top.restAjax.delete(top.restAjax.path('api/keyplace/remove/{ids}', [ids]), {}, null, function (code, data) {
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
reloadTable();
}, function (code, data) {
top.dialog.msg(data.msg);
}, function () {
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
}, function () {
top.dialog.close(layIndex);
});
}
});
}
initTable();
initDate();
// 事件 - 页面变化
$win.on('resize', function() {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() {
reloadTable();
}, 500);
});
// 事件 - 搜索
$(document).on('click', '#search', function() {
reloadTable(1);
});
// 事件 - 增删改
table.on('toolbar(dataTable)', function(obj) {
var layEvent = obj.event;
var checkStatus = table.checkStatus('dataTable');
var checkDatas = checkStatus.data;
if(layEvent === 'saveEvent') {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/keyplace/save.html', []),
end: function() {
reloadTable();
}
});
} else if(layEvent === 'updateEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectEdit);
} else if(checkDatas.length > 1) {
top.dialog.msg(top.dataMessage.table.selectOneEdit);
} else {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/keyplace/update.html?keyPlaceId={keyPlaceId}', [checkDatas[0].keyPlaceId]),
end: function() {
reloadTable();
}
});
}
} else if(layEvent === 'removeEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectDelete);
} else {
var ids = '';
for(var i = 0, item; item = checkDatas[i++];) {
if(i > 1) {
ids += '_';
}
ids += item['keyPlaceId'];
}
removeData(ids);
}
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,276 @@
<!doctype html>
<html lang="en">
<head>
<base href="/usercenter/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-card">
<div class="layui-card-header">
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
<a href="javascript:void(0);"><cite>新增内容</cite></a>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item">
<label class="layui-form-label">主键UUID</label>
<div class="layui-input-block">
<input type="text" id="keyPlace" name="keyPlace" class="layui-input" value="" placeholder="请输入主键UUID" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">场所名称</label>
<div class="layui-input-block">
<input type="text" id="placeName" name="placeName" class="layui-input" value="" placeholder="请输入场所名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">场所类型</label>
<div class="layui-input-block layui-form" id="placeTypeSelectTemplateBox" lay-filter="placeTypeSelectTemplateBox"></div>
<script id="placeTypeSelectTemplate" type="text/html">
<select id="placeType" name="placeType">
<option value="">请选择场所类型</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.selectId}}">{{item.selectName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-form-item">
<label class="layui-form-label">场所类型名称</label>
<div class="layui-input-block">
<input type="text" id="placeTypeName" name="placeTypeName" class="layui-input" value="" placeholder="请输入场所类型名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">详细类型</label>
<div class="layui-input-block layui-form" id="detailTypeSelectTemplateBox" lay-filter="detailTypeSelectTemplateBox"></div>
<script id="detailTypeSelectTemplate" type="text/html">
<select id="detailType" name="detailType">
<option value="">请选择详细类型</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.selectId}}">{{item.selectName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-form-item">
<label class="layui-form-label">详细类型名称</label>
<div class="layui-input-block">
<input type="text" id="detailTypeName" name="detailTypeName" class="layui-input" value="" placeholder="请输入详细类型名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">地址编码</label>
<div class="layui-input-block">
<input type="text" id="areaCode" name="areaCode" class="layui-input" value="" placeholder="请输入地址编码" maxlength="12">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">地址名称</label>
<div class="layui-input-block">
<input type="text" id="areaName" name="areaName" class="layui-input" value="" placeholder="请输入地址名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">详细地址</label>
<div class="layui-input-block">
<input type="text" id="address" name="address" class="layui-input" value="" placeholder="请输入详细地址" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">负责人</label>
<div class="layui-input-block">
<input type="text" id="linkMan" name="linkMan" class="layui-input" value="" placeholder="请输入负责人" maxlength="50">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">负责人联系方式</label>
<div class="layui-input-block">
<input type="text" id="linkPhone" name="linkPhone" class="layui-input" value="" placeholder="请输入负责人联系方式" maxlength="20">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">联系方式</label>
<div class="layui-input-block">
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系方式" maxlength="20">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">经度</label>
<div class="layui-input-block">
<input type="text" id="longitude" name="longitude" class="layui-input" value="" placeholder="请输入经度" maxlength="50">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">纬度</label>
<div class="layui-input-block">
<input type="text" id="latitude" name="latitude" class="layui-input" value="" placeholder="请输入纬度" maxlength="50">
</div>
</div>
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var viewerObj = {};
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
function refreshDownloadTemplet(fileName, file) {
var dataRander = {};
dataRander[fileName] = file;
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
document.getElementById(fileName +'FileBox').innerHTML = html;
});
}
// 初始化文件列表
function initFileList(fileName, ids, callback) {
var dataForm = {};
dataForm[fileName] = ids;
form.val('dataForm', dataForm);
if(!ids) {
refreshDownloadTemplet(fileName, []);
if(callback) {
callback(fileName, []);
}
return;
}
top.restAjax.get(top.restAjax.path('api/file/list', []), {
ids: ids
}, null, function(code, data) {
refreshDownloadTemplet(fileName, data);
if(callback) {
callback(fileName, data);
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化视频
function initVideo(fileName, data) {
for(var i = 0, item; item = data[i++];) {
var player = new ckplayer({
container: '#'+ fileName + i,
variable: 'player',
flashplayer: false,
video: {
file: 'route/file/download/true/'+ item.fileId,
type: 'video/mp4'
}
});
}
}
// 初始化场所类型下拉选择
function initPlaceTypeSelect() {
top.restAjax.get(top.restAjax.path('api/url/selectUrl', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('placeTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('placeTypeSelectTemplateBox').innerHTML = html;
});
form.render('select', 'placeTypeSelectTemplateBox');
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化详细类型下拉选择
function initDetailTypeSelect() {
top.restAjax.get(top.restAjax.path('api/url/selectUrl', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('detailTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('detailTypeSelectTemplateBox').innerHTML = html;
});
form.render('select', 'detailTypeSelectTemplateBox');
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化内容
function initData() {
initPlaceTypeSelect();
initDetailTypeSelect();
}
initData();
// 提交表单
form.on('submit(submitForm)', function(formData) {
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.post(top.restAjax.path('api/keyplace/save', []), formData.field, null, function(code, data) {
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function(index) {
top.dialog.close(index);
window.location.reload();
},
btn2: function() {
closeBox();
}
});
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
});
return false;
});
$('.close').on('click', function() {
closeBox();
});
// 校验
form.verify({
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,301 @@
<!doctype html>
<html lang="en">
<head>
<base href="/usercenter/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-card">
<div class="layui-card-header">
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
<a href="javascript:void(0);"><cite>编辑内容</cite></a>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item">
<label class="layui-form-label">主键UUID</label>
<div class="layui-input-block">
<input type="text" id="keyPlace" name="keyPlace" class="layui-input" value="" placeholder="请输入主键UUID" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">场所名称</label>
<div class="layui-input-block">
<input type="text" id="placeName" name="placeName" class="layui-input" value="" placeholder="请输入场所名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">场所类型</label>
<div class="layui-input-block layui-form" id="placeTypeSelectTemplateBox" lay-filter="placeTypeSelectTemplateBox"></div>
<script id="placeTypeSelectTemplate" type="text/html">
<select id="placeType" name="placeType">
<option value="">请选择场所类型</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.selectId}}">{{item.selectName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-form-item">
<label class="layui-form-label">场所类型名称</label>
<div class="layui-input-block">
<input type="text" id="placeTypeName" name="placeTypeName" class="layui-input" value="" placeholder="请输入场所类型名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">详细类型</label>
<div class="layui-input-block layui-form" id="detailTypeSelectTemplateBox" lay-filter="detailTypeSelectTemplateBox"></div>
<script id="detailTypeSelectTemplate" type="text/html">
<select id="detailType" name="detailType">
<option value="">请选择详细类型</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.selectId}}">{{item.selectName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-form-item">
<label class="layui-form-label">详细类型名称</label>
<div class="layui-input-block">
<input type="text" id="detailTypeName" name="detailTypeName" class="layui-input" value="" placeholder="请输入详细类型名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">地址编码</label>
<div class="layui-input-block">
<input type="text" id="areaCode" name="areaCode" class="layui-input" value="" placeholder="请输入地址编码" maxlength="12">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">地址名称</label>
<div class="layui-input-block">
<input type="text" id="areaName" name="areaName" class="layui-input" value="" placeholder="请输入地址名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">详细地址</label>
<div class="layui-input-block">
<input type="text" id="address" name="address" class="layui-input" value="" placeholder="请输入详细地址" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">负责人</label>
<div class="layui-input-block">
<input type="text" id="linkMan" name="linkMan" class="layui-input" value="" placeholder="请输入负责人" maxlength="50">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">负责人联系方式</label>
<div class="layui-input-block">
<input type="text" id="linkPhone" name="linkPhone" class="layui-input" value="" placeholder="请输入负责人联系方式" maxlength="20">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">联系方式</label>
<div class="layui-input-block">
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系方式" maxlength="20">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">经度</label>
<div class="layui-input-block">
<input type="text" id="longitude" name="longitude" class="layui-input" value="" placeholder="请输入经度" maxlength="50">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">纬度</label>
<div class="layui-input-block">
<input type="text" id="latitude" name="latitude" class="layui-input" value="" placeholder="请输入纬度" maxlength="50">
</div>
</div>
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var keyPlaceId = top.restAjax.params(window.location.href).keyPlaceId;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var viewerObj = {};
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
function refreshDownloadTemplet(fileName, file) {
var dataRander = {};
dataRander[fileName] = file;
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
document.getElementById(fileName +'FileBox').innerHTML = html;
});
}
// 初始化文件列表
function initFileList(fileName, ids, callback) {
var dataForm = {};
dataForm[fileName] = ids;
form.val('dataForm', dataForm);
if(!ids) {
refreshDownloadTemplet(fileName, []);
if(callback) {
callback(fileName, []);
}
return;
}
top.restAjax.get(top.restAjax.path('api/file/list', []), {
ids: ids
}, null, function(code, data) {
refreshDownloadTemplet(fileName, data);
if(callback) {
callback(fileName, data);
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化视频
function initVideo(fileName, data) {
for(var i = 0, item; item = data[i++];) {
var player = new ckplayer({
container: '#'+ fileName + i,
variable: 'player',
flashplayer: false,
video: {
file: 'route/file/download/true/'+ item.fileId,
type: 'video/mp4'
}
});
}
}
// 初始化场所类型下拉选择
function initPlaceTypeSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/url/selectUrl', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('placeTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('placeTypeSelectTemplateBox').innerHTML = html;
});
form.render('select', 'placeTypeSelectTemplateBox');
var selectObj = {};
selectObj['placeType'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化详细类型下拉选择
function initDetailTypeSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/url/selectUrl', []), {}, null, function(code, data, args) {
laytpl(document.getElementById('detailTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('detailTypeSelectTemplateBox').innerHTML = html;
});
form.render('select', 'detailTypeSelectTemplateBox');
var selectObj = {};
selectObj['detailType'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化内容
function initData() {
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/keyplace/get/{keyPlaceId}', [keyPlaceId]), {}, null, function(code, data) {
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
}
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
initPlaceTypeSelect(data['placeType']);
initDetailTypeSelect(data['detailType']);
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}
initData();
// 提交表单
form.on('submit(submitForm)', function(formData) {
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.put(top.restAjax.path('api/keyplace/update/{keyPlaceId}', [keyPlaceId]), formData.field, null, function(code, data) {
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function(index) {
top.dialog.close(index);
window.location.reload();
},
btn2: function() {
closeBox();
}
});
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
});
return false;
});
$('.close').on('click', function() {
closeBox();
});
// 校验
form.verify({
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,338 @@
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="${#request.getContextPath() + '/'}">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-inline">
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
</div>
<div class="layui-inline">
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
</div>
<div class="layui-inline">
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
</div>
<button type="button" id="search" class="layui-btn layui-btn-sm">
<i class="fa fa-lg fa-search"></i> 搜索
</button>
</div>
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
<!-- 表头按钮组 -->
<script type="text/html" id="headerToolBar">
<div class="layui-btn-group">
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
<i class="fa fa-lg fa-plus"></i> 新增
</button>
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<i class="fa fa-lg fa-edit"></i> 编辑
</button>
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
<i class="fa fa-lg fa-trash"></i> 删除
</button>
</div>
</script>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laydate', 'common'], function() {
var $ = layui.$;
var $win = $(window);
var table = layui.table;
var admin = layui.admin;
var laydate = layui.laydate;
var common = layui.common;
var resizeTimeout = null;
var tableUrl = 'api/keyplace/listpage';
// 初始化表格
function initTable() {
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, []),
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 90,
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
toolbar: '#headerToolBar',
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [
[
{type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'placeName', width: 180, title: '场所名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'placeTypeName', width: 180, title: '场所类型名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'detailTypeName', width: 180, title: '详细类型名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'areaCode', width: 180, title: '地址编码', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'areaName', width: 180, title: '地址名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'address', width: 180, title: '详细地址', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'linkMan', width: 180, title: '负责人', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'linkPhone', width: 180, title: '负责人联系方式', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'phone', width: 180, title: '场所联系方式', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'longitude', width: 180, title: '经度', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'latitude', width: 180, title: '纬度', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'addCamera', fixed: 'right', width: 150, title: '绑定摄像头', align:'center',
templet: function(row) {
var rowData = '<a class="layui-btn layui-btn-xs" lay-event="addCamera">绑定摄像头</a>';
return rowData;
}
}
]
],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
}
});
}
//监听行单击事件
table.on('tool(dataTable)', function(obj){
var data = obj.data;
// 任务转派
if('patrolHis' == obj.event) {
console.log(data)
patrolHis(data);
}else if('addCamera' == obj.event) {
top.dialog.msg('功能正在开发中');
// addCamera(data);
}
});
// 重载表格
function reloadTable(currentPage) {
table.reload('dataTable', {
url: top.restAjax.path(tableUrl, []),
where: {
keywords: $('#keywords').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val()
},
page: {
curr: currentPage
},
height: $win.height() - 90,
});
}
// 初始化日期
function initDate() {
// 日期选择
laydate.render({
elem: '#startTime',
format: 'yyyy-MM-dd'
});
laydate.render({
elem: '#endTime',
format: 'yyyy-MM-dd'
});
}
// 删除
function removeData(ids) {
top.dialog.msg(top.dataMessage.delete, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function (index) {
top.dialog.close(index);
var layIndex;
top.restAjax.delete(top.restAjax.path('api/keyplace/remove/{ids}', [ids]), {}, null, function (code, data) {
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
reloadTable();
}, function (code, data) {
top.dialog.msg(data.msg);
}, function () {
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
}, function () {
top.dialog.close(layIndex);
});
}
});
}
initTable();
initDate();
// 事件 - 页面变化
$win.on('resize', function() {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() {
reloadTable();
}, 500);
});
// 事件 - 搜索
$(document).on('click', '#search', function() {
reloadTable(1);
});
// 事件 - 增删改
table.on('toolbar(dataTable)', function(obj) {
var layEvent = obj.event;
var checkStatus = table.checkStatus('dataTable');
var checkDatas = checkStatus.data;
if(layEvent === 'saveEvent') {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/keyplace/save', []),
end: function() {
reloadTable();
}
});
} else if(layEvent === 'updateEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectEdit);
} else if(checkDatas.length > 1) {
top.dialog.msg(top.dataMessage.table.selectOneEdit);
} else {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/keyplace/update?keyPlaceId={keyPlaceId}', [checkDatas[0].keyPlaceId]),
end: function() {
reloadTable();
}
});
}
} else if(layEvent === 'removeEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectDelete);
} else {
var ids = '';
for(var i = 0, item; item = checkDatas[i++];) {
if(i > 1) {
ids += '_';
}
ids += item['keyPlaceId'];
}
removeData(ids);
}
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,291 @@
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="${#request.getContextPath() + '/'}">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-card">
<div class="layui-card-header">
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
<a href="javascript:void(0);"><cite>新增内容</cite></a>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item">
<label class="layui-form-label">场所名称</label>
<div class="layui-input-block">
<input type="text" id="placeName" name="placeName" class="layui-input" value="" placeholder="请输入场所名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">场所类型</label>
<input type="hidden" id="placeTypeName" name="placeTypeName" class="layui-input" value="" placeholder="请输入场所类型名称" maxlength="255">
<div class="layui-input-block layui-form" id="placeTypeSelectTemplateBox" lay-filter="placeTypeSelectTemplateBox"></div>
<script id="placeTypeSelectTemplate" type="text/html">
<select id="placeType" name="placeType" lay-filter="placeType" lay-verify="required">
<option value="">请选择场所类型</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dataId}}">{{item.dataName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-form-item" id="detailTypeDiv" style="display: none;">
<label class="layui-form-label">详细类型</label>
<input type="hidden" id="detailTypeName" name="detailTypeName" class="layui-input" value="" placeholder="请输入详细类型名称" maxlength="255">
<div class="layui-input-block layui-form" id="detailTypeSelectTemplateBox" lay-filter="detailTypeSelectTemplateBox"></div>
<script id="detailTypeSelectTemplate" type="text/html">
<select id="detailType" name="detailType" lay-filter="detailType" lay-verify="required">
<option value="">请选择详细类型</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dataId}}">{{item.dataName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-form-item">
<label class="layui-form-label">地址</label>
<input type="hidden" id="areaCode" name="areaCode" class="layui-input" value="" placeholder="请输入地址编码" maxlength="12">
<div class="layui-input-block">
<input type="text" id="areaName" name="areaName" class="layui-input" value="" placeholder="请输入地址名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">详细地址</label>
<div class="layui-input-block">
<input type="text" id="address" name="address" class="layui-input" value="" placeholder="请输入详细地址" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">负责人</label>
<div class="layui-input-block">
<input type="text" id="linkMan" name="linkMan" class="layui-input" value="" placeholder="请输入负责人" maxlength="50">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label" style="width: 130px;">负责人联系方式</label>
<div class="layui-input-block" style="margin-left: 130px;">
<input type="text" id="linkPhone" name="linkPhone" class="layui-input" value="" placeholder="请输入负责人联系方式" maxlength="20">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label" style="width: 120px;">场所联系方式</label>
<div class="layui-input-block" style="margin-left: 120px;">
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系方式" maxlength="20">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">经度</label>
<div class="layui-input-block">
<input type="text" id="longitude" name="longitude" class="layui-input" value="" placeholder="请输入经度" maxlength="50">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">纬度</label>
<div class="layui-input-block">
<input type="text" id="latitude" name="latitude" class="layui-input" value="" placeholder="请输入纬度" maxlength="50">
</div>
</div>
<div class="layui-row" id="mapDiv">
<div class="layui-col-md12 layui-col-sm12" style="padding: 0 0px;">
<div id="mapContainer" style="width: 100%;height: 350px;"></div>
</div>
</div>
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=oWU9RD4ihDHAafexgI6XOrTK8lDatRju"></script>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var viewerObj = {};
//初始化百度地图
function initMap(longitude, latitude) {
map = new BMap.Map("mapContainer", {enableMapClick: false,});
var point = new BMap.Point(longitude, latitude);
map.centerAndZoom(point, 13);
map.disableDoubleClickZoom();
map.addControl(new BMap.NavigationControl());
map.addControl(new BMap.ScaleControl());
map.addControl(new BMap.OverviewMapControl());
map.addControl(new BMap.MapTypeControl());
map.enableScrollWheelZoom();//启用地图滚轮放大缩小
map.enableContinuousZoom();//开启缩放平滑
// 点击获取地址
var geocoder= new BMap.Geocoder();
mapMarkPoint(map, point);
map.addEventListener("click", function(e) {
map.clearOverlays();
$('#longitude').val(e.point.lng);
$('#latitude').val(e.point.lat);
point = new BMap.Point(e.point.lng, e.point.lat);
mapMarkPoint(map, point);
geocoder.getLocation(e.point, function(rs) {
$('#shopAddress').val(rs.address);
});
});
}
function mapMarkPoint(map, point) {
var marker = new BMap.Marker(point);
map.addOverlay(marker);
}
// 选择所在地
$(document).on('click', '#areaName', function() {
top.dialog.open({
title: '选择地区',
url: top.restAjax.path('route/area/get-select?areaName={areaName}', [encodeURI($('#areaName').val())]),
width: '800px',
height: '225px',
onClose: function () {
var selectedAreaArray = top.dialog.dialogData.selectedAreaArray;
var areaCode = '';
var areaName = '';
if (selectedAreaArray.length > 0) {
areaCode = selectedAreaArray[selectedAreaArray.length - 1].areaCode;
for (var i = 0, item; item = selectedAreaArray[i++];) {
if (areaName) {
areaName += ',';
}
areaName += item.areaName;
}
}
$('#areaCode').val(areaCode);
$('#areaName').val(areaName);
}
})
});
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
form.on('select(placeType)', function(data){
if(!data.value) {
$('#detailTypeDiv').hide();
}else {
$('#detailTypeDiv').show();
var value = data.value;
initDetailTypeSelect(value);
var name = $('#placeType option:selected').text();
$('#placeTypeName').val(name);
}
form.render("select");
});
form.on('select(detailType)', function(data){
if(!data.value) {
}else {
var value = data.value;
var name = $('#detailType option:selected').text();
$('#detailTypeName').val(name);
}
form.render("select");
});
// 初始化场所类型下拉选择
function initPlaceTypeSelect() {
top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['aef51b83-80e0-44a8-88ba-b6bb987b3474']), {}, null, function(code, data, args) {
laytpl(document.getElementById('placeTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('placeTypeSelectTemplateBox').innerHTML = html;
});
form.render('select', 'placeTypeSelectTemplateBox');
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化详细类型下拉选择
function initDetailTypeSelect(value) {
top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', [value]), {}, null, function(code, data, args) {
laytpl(document.getElementById('detailTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('detailTypeSelectTemplateBox').innerHTML = html;
});
form.render('select', 'detailTypeSelectTemplateBox');
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化内容
function initData() {
initPlaceTypeSelect();
var lng = '113.137743';
var lat = '41.002057';
initMap(lng, lat);
}
initData();
// 提交表单
form.on('submit(submitForm)', function(formData) {
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.post(top.restAjax.path('api/keyplace/save', []), formData.field, null, function(code, data) {
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function(index) {
top.dialog.close(index);
window.location.reload();
},
btn2: function() {
closeBox();
}
});
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
});
return false;
});
$('.close').on('click', function() {
closeBox();
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,321 @@
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="${#request.getContextPath() + '/'}">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-card">
<div class="layui-card-header">
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
<a href="javascript:void(0);"><cite>编辑内容</cite></a>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item">
<label class="layui-form-label">场所名称</label>
<div class="layui-input-block">
<input type="text" id="placeName" name="placeName" class="layui-input" value="" placeholder="请输入场所名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">场所类型</label>
<input type="hidden" id="placeTypeName" name="placeTypeName" class="layui-input" value="" placeholder="请输入场所类型名称" maxlength="255">
<div class="layui-input-block layui-form" id="placeTypeSelectTemplateBox" lay-filter="placeTypeSelectTemplateBox"></div>
<script id="placeTypeSelectTemplate" type="text/html">
<select id="placeType" name="placeType" lay-filter="placeType" lay-verify="required">
<option value="">请选择场所类型</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dataId}}">{{item.dataName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-form-item" id="detailTypeDiv" style="display: none;">
<label class="layui-form-label">详细类型</label>
<input type="hidden" id="detailTypeName" name="detailTypeName" class="layui-input" value="" placeholder="请输入详细类型名称" maxlength="255">
<div class="layui-input-block layui-form" id="detailTypeSelectTemplateBox" lay-filter="detailTypeSelectTemplateBox"></div>
<script id="detailTypeSelectTemplate" type="text/html">
<select id="detailType" name="detailType" lay-filter="detailType" lay-verify="required">
<option value="">请选择详细类型</option>
{{# for(var i = 0, item; item = d[i++];) { }}
<option value="{{item.dataId}}">{{item.dataName}}</option>
{{# } }}
</select>
</script>
</div>
<div class="layui-form-item">
<label class="layui-form-label">地址</label>
<input type="hidden" id="areaCode" name="areaCode" class="layui-input" value="" placeholder="请输入地址编码" maxlength="12">
<div class="layui-input-block">
<input type="text" id="areaName" name="areaName" class="layui-input" value="" placeholder="请输入地址名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">详细地址</label>
<div class="layui-input-block">
<input type="text" id="address" name="address" class="layui-input" value="" placeholder="请输入详细地址" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">负责人</label>
<div class="layui-input-block">
<input type="text" id="linkMan" name="linkMan" class="layui-input" value="" placeholder="请输入负责人" maxlength="50">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">负责人联系方式</label>
<div class="layui-input-block">
<input type="text" id="linkPhone" name="linkPhone" class="layui-input" value="" placeholder="请输入负责人联系方式" maxlength="20">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">联系方式</label>
<div class="layui-input-block">
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系方式" maxlength="20">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">经度</label>
<div class="layui-input-block">
<input type="text" id="longitude" name="longitude" class="layui-input" value="" placeholder="请输入经度" maxlength="50">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">纬度</label>
<div class="layui-input-block">
<input type="text" id="latitude" name="latitude" class="layui-input" value="" placeholder="请输入纬度" maxlength="50">
</div>
</div>
<div class="layui-row" id="mapDiv">
<div class="layui-col-md12 layui-col-sm12" style="padding: 0 0px;">
<div id="mapContainer" style="width: 100%;height: 350px;"></div>
</div>
</div>
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=oWU9RD4ihDHAafexgI6XOrTK8lDatRju"></script>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var keyPlaceId = top.restAjax.params(window.location.href).keyPlaceId;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var viewerObj = {};
//初始化百度地图
function initMap(longitude, latitude) {
map = new BMap.Map("mapContainer", {enableMapClick: false,});
var point = new BMap.Point(longitude, latitude);
map.centerAndZoom(point, 13);
map.disableDoubleClickZoom();
map.addControl(new BMap.NavigationControl());
map.addControl(new BMap.ScaleControl());
map.addControl(new BMap.OverviewMapControl());
map.addControl(new BMap.MapTypeControl());
map.enableScrollWheelZoom();//启用地图滚轮放大缩小
map.enableContinuousZoom();//开启缩放平滑
// 点击获取地址
var geocoder= new BMap.Geocoder();
mapMarkPoint(map, point);
map.addEventListener("click", function(e) {
map.clearOverlays();
$('#longitude').val(e.point.lng);
$('#latitude').val(e.point.lat);
point = new BMap.Point(e.point.lng, e.point.lat);
mapMarkPoint(map, point);
geocoder.getLocation(e.point, function(rs) {
$('#shopAddress').val(rs.address);
});
});
}
function mapMarkPoint(map, point) {
var marker = new BMap.Marker(point);
map.addOverlay(marker);
}
// 选择所在地
$(document).on('click', '#areaName', function() {
top.dialog.open({
title: '选择地区',
url: top.restAjax.path('route/area/get-select?areaName={areaName}', [encodeURI($('#areaName').val())]),
width: '800px',
height: '225px',
onClose: function () {
var selectedAreaArray = top.dialog.dialogData.selectedAreaArray;
var areaCode = '';
var areaName = '';
if (selectedAreaArray.length > 0) {
areaCode = selectedAreaArray[selectedAreaArray.length - 1].areaCode;
for (var i = 0, item; item = selectedAreaArray[i++];) {
if (areaName) {
areaName += ',';
}
areaName += item.areaName;
}
}
$('#areaCode').val(areaCode);
$('#areaName').val(areaName);
}
})
});
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
form.on('select(placeType)', function(data){
if(!data.value) {
$('#detailTypeDiv').hide();
}else {
$('#detailTypeDiv').show();
var value = data.value;
initDetailTypeSelect(value, '');
var name = $('#placeType option:selected').text();
$('#placeTypeName').val(name);
}
form.render("select");
});
form.on('select(detailType)', function(data){
if(!data.value) {
}else {
var value = data.value;
var name = $('#detailType option:selected').text();
$('#detailTypeName').val(name);
}
form.render("select");
});
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
// 初始化场所类型下拉选择
function initPlaceTypeSelect(selectValue) {
top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['aef51b83-80e0-44a8-88ba-b6bb987b3474']), {}, null, function(code, data, args) {
laytpl(document.getElementById('placeTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('placeTypeSelectTemplateBox').innerHTML = html;
});
form.render('select', 'placeTypeSelectTemplateBox');
var selectObj = {};
selectObj['placeType'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化详细类型下拉选择
function initDetailTypeSelect(parentValue, selectValue) {
top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', [parentValue]), {}, null, function(code, data, args) {
laytpl(document.getElementById('detailTypeSelectTemplate').innerHTML).render(data, function(html) {
document.getElementById('detailTypeSelectTemplateBox').innerHTML = html;
});
form.render('select', 'detailTypeSelectTemplateBox');
var selectObj = {};
selectObj['detailType'] = selectValue;
form.val('dataForm', selectObj);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化内容
function initData() {
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/keyplace/get/{keyPlaceId}', [keyPlaceId]), {}, null, function(code, data) {
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
}
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
initPlaceTypeSelect(data['placeType']);
if(null != data['placeType'] && '' != data['placeType'] && typeof(data['placeType']) != 'undefined') {
$('#detailTypeDiv').show();
initDetailTypeSelect(data['placeType'], data['detailType']);
}
initMap(data['longitude'], data['latitude']);
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}
initData();
// 提交表单
form.on('submit(submitForm)', function(formData) {
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.put(top.restAjax.path('api/keyplace/update/{keyPlaceId}', [keyPlaceId]), formData.field, null, function(code, data) {
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function(index) {
top.dialog.close(index);
window.location.reload();
},
btn2: function() {
closeBox();
}
});
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
});
return false;
});
$('.close').on('click', function() {
closeBox();
});
});
</script>
</body>
</html>