Compare commits
27 Commits
bd1690cea5
...
0ec51c4702
Author | SHA1 | Date |
---|---|---|
|
0ec51c4702 | |
|
6050e94b49 | |
|
f7cc015363 | |
|
3fdd6ee1e6 | |
|
bd4185fcb7 | |
|
25752ec5ef | |
|
d39cf3da87 | |
|
39f19b3526 | |
|
cbd2c424dc | |
|
e61cb0b9ea | |
|
415bfd3086 | |
|
e932aacc86 | |
|
32899c9531 | |
|
c2068c6ebd | |
|
9169d4c15e | |
|
b8dec5280c | |
|
b7b228f4b6 | |
|
b319779e4e | |
|
7925ea2a61 | |
|
dc0e4f4374 | |
|
7e2077cc48 | |
|
2e517e44a3 | |
|
1cb6ce1c95 | |
|
6e9a25d7f4 | |
|
692140c131 | |
|
6bc2d02cae | |
|
4c6aa7d8ff |
src/main
java/com/zcloud
controller
firemanager/app
system
service
accident
map/impl
syncData
util/hk
|
@ -0,0 +1,187 @@
|
|||
package com.zcloud.controller.door;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.door.MkmjRelationService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/mkmjRelation")
|
||||
public class MkmjRelationController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private MkmjRelationService mkmjRelationService;
|
||||
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("mkmjDoor:add")
|
||||
@ResponseBody
|
||||
public Object add() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 添加人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("ISDELETE", "0"); //是否删除
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
|
||||
return mkmjRelationService.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("mkmjDoor:del")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
return mkmjRelationService.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("mkmjDoor:edit")
|
||||
@ResponseBody
|
||||
public Object edit() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
|
||||
return mkmjRelationService.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/list")
|
||||
@RequiresPermissions("mkmjDoor:list")
|
||||
@ResponseBody
|
||||
public Object list(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = mkmjRelationService.list(page); //列出Coursectk列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value="/listAllForArea")
|
||||
@RequiresPermissions("mkmjDoor:list")
|
||||
@ResponseBody
|
||||
public Object listAllForArea() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> varList = mkmjRelationService.listAllForArea(pd); //列出Coursectk列表
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**去修改页面获取数据
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEdit")
|
||||
@RequiresPermissions("mkmjDoor:edit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = mkmjRelationService.findById(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**去修改页面获取数据
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/findById")
|
||||
@RequiresPermissions("mkmjDoor:edit")
|
||||
@ResponseBody
|
||||
public Object findById() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = mkmjRelationService.findById(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**定位
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/savePosition")
|
||||
@ResponseBody
|
||||
public Object savePosition() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
return mkmjRelationService.savePosition(pd); //根据ID读取
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/getInfoList")
|
||||
@RequiresPermissions("mkmjDoor:list")
|
||||
@ResponseBody
|
||||
public Object getInfoList(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
varList = mkmjRelationService.getCarAndPeopleInfolistPage(page); //列出人闸机信息列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value="/getAllCarAndPeopleInfoCountByArea")
|
||||
@ResponseBody
|
||||
public Object getAllCarAndPeopleInfoCountByArea() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
List<PageData> varList = mkmjRelationService.getAllCarAndPeopleInfoCountByArea(pd); //列出人闸机信息列表
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,207 @@
|
|||
package com.zcloud.controller.door;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.door.PlatformDoorVideoService;
|
||||
import com.zcloud.util.Tools;
|
||||
import com.zcloud.util.hk.HKPostApiUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:平台门禁管理
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/platform/door/video")
|
||||
public class PlatformDoorVideoController extends BaseController {
|
||||
@Autowired
|
||||
private PlatformDoorVideoService platformDoorVideoService;
|
||||
|
||||
private static final String door_host = "192.168.164.50:443";
|
||||
// 秘钥appkey
|
||||
private static final String door_appKey = "24307012";
|
||||
// 秘钥appSecret
|
||||
private static final String door_appSecret = "SLsUPf6WVR4uzu8NPdqq";
|
||||
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@ResponseBody
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("PLATFORMDOORVIDEO_ID", this.get32UUID()); //主键
|
||||
platformDoorVideoService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/savePosition")
|
||||
@ResponseBody
|
||||
public Object savePosition() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if(pd.get("PLATFORMDOORVIDEO_ID") != null){
|
||||
platformDoorVideoService.edit(pd);
|
||||
}else{
|
||||
pd.put("PLATFORMDOORVIDEO_ID", this.get32UUID()); //主键
|
||||
platformDoorVideoService.save(pd);
|
||||
}
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/getHlsPathById")
|
||||
@ResponseBody
|
||||
public Object getHlsPathById() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
PageData pd =this.getPageData();
|
||||
pd = platformDoorVideoService.findById(pd);
|
||||
map = HKPostApiUtil.camerasPreviewURLs(door_host,door_appKey,door_appSecret,pd.getString("INDEXCODE"),"hls");
|
||||
map.put("pd",pd);
|
||||
map.put("result", "success");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/getHlsPath")
|
||||
@ResponseBody
|
||||
public Object getHlsPath() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
PageData pd =this.getPageData();
|
||||
map = HKPostApiUtil.camerasPreviewURLs(door_host,door_appKey,door_appSecret,pd.getString("INDEXCODE"),"hls");
|
||||
map.put("result", "success");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/getRtspPath")
|
||||
@ResponseBody
|
||||
public Object getRtspPath() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
PageData pd =this.getPageData();
|
||||
map = HKPostApiUtil.camerasPreviewURLs(door_host,door_appKey,door_appSecret,pd.getString("INDEXCODE"),"rtsp");
|
||||
map.put("result", "success");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/platformList")
|
||||
@ResponseBody
|
||||
public Object platformList() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
PageData pd =this.getPageData();
|
||||
map = HKPostApiUtil.cameraSearch(door_host,door_appKey,door_appSecret,pd);
|
||||
map.put("result", "success");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/list")
|
||||
@ResponseBody
|
||||
public Object list(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = platformDoorVideoService.list(page); //列出Platformvideomanagement列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/listByPosition")
|
||||
@ResponseBody
|
||||
public Object listByPosition(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
double LONGITUDE = Double.parseDouble(pd.getString("LONGITUDE"));
|
||||
double LATITUDE = Double.parseDouble(pd.getString("LATITUDE"));
|
||||
pd.put("LONGITUDEONE", String.valueOf(LONGITUDE + 0.05));
|
||||
pd.put("LONGITUDETWO", String.valueOf(LONGITUDE - 0.05));
|
||||
pd.put("LATITUDEONE", String.valueOf(LATITUDE + 0.05));
|
||||
pd.put("LATITUDETWO", String.valueOf(LATITUDE - 0.05));
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = platformDoorVideoService.listByPosition(page); //列出Platformvideomanagement列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/listAll")
|
||||
@ResponseBody
|
||||
public Object listAll() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
varList = platformDoorVideoService.listAll(pd); //列出Platformvideomanagement列表
|
||||
for (PageData data : varList) {
|
||||
data.put("MAP_POINT_NAME", data.getString("NAME"));
|
||||
}
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delLocation")
|
||||
@ResponseBody
|
||||
public Object delLocation() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
platformDoorVideoService.delLocation(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -209,6 +209,7 @@ public class AppFireRecordController extends BaseController {
|
|||
map.put("varList", res);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 清单下的检查记录
|
||||
* @Author: dearLin
|
||||
|
|
|
@ -797,6 +797,76 @@ public class AppGFBlindBoardController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/singleUpload/editAcceptStatus")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object suEditAcceptStatus(MultipartRequest request) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFblindboardService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
PageData log = new PageData();
|
||||
log.put("BLINDBOARDLOG_ID", this.get32UUID());
|
||||
// log.put("ACTION", "审核打回");
|
||||
log.put("BLINDBOARD_ID", pd.get("BLINDBOARD_ID"));
|
||||
log.put("CREATOR",pd.get("ACTION_USER"));
|
||||
log.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
|
||||
String status = pd.get("STATUS").toString();
|
||||
String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
|
||||
(StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;");
|
||||
|
||||
//打回清空数据
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", "");
|
||||
switch (status) {
|
||||
|
||||
|
||||
case "6"://验收人
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveAcceptImg(fileList.toArray(fileArr),signertime,pd.getString("BLINDBOARD_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_USER_ID"),pd.getString("ACCEPT_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES);
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
GFblindboardService.edit(pd2);
|
||||
log.put("ACTION", "验收通过");
|
||||
// 发短信
|
||||
this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2);
|
||||
|
||||
break;
|
||||
|
||||
case "-6"://验收人打回
|
||||
log.put("ACTION", "验收人打回");
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
GFblindboardService.edit(pd2);
|
||||
|
||||
// 发短信
|
||||
this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
GFblindBoardLogService.save(log);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
private void saveAcceptImg(MultipartFile[] files,String signertime, String BLINDBOARD_ID, String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID) throws Exception{
|
||||
if (files != null && files.length > 0) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
|
@ -1172,6 +1242,39 @@ public class AppGFBlindBoardController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/singleUpload/editAcceptconfess")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object suEditAcceptconfess(
|
||||
MultipartRequest request
|
||||
) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFblindboardService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveImg(fileList.toArray(fileArr),signertime,pd.getString("BLINDBOARD_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
private void saveImg(MultipartFile[] files,String signertime, String BLINDBOARD_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception{
|
||||
if (files != null && files.length > 0) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
|
@ -1179,7 +1282,12 @@ public class AppGFBlindBoardController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
MultipartFile file = files[i];
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName;
|
||||
if (file.getOriginalFilename() == null) {
|
||||
fileName = ".PNG";
|
||||
}else {
|
||||
fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
}
|
||||
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
|
||||
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
|
||||
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());
|
||||
|
|
|
@ -256,6 +256,36 @@ public class AppGFBreakGroundController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/singleUpload/editAcceptconfess")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object suEditAcceptconfess(MultipartRequest request) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFbreakGroundService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveImg(fileList.toArray(fileArr),signertime,pd.getString("BREAKGROUND_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
private void saveImg(MultipartFile[] files,String signertime, String BREAKGROUND_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception{
|
||||
if (files != null && files.length > 0) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
|
@ -263,7 +293,12 @@ public class AppGFBreakGroundController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
MultipartFile file = files[i];
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName;
|
||||
if (file.getOriginalFilename() == null) {
|
||||
fileName = ".PNG";
|
||||
}else {
|
||||
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
}
|
||||
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
|
||||
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
|
||||
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());
|
||||
|
@ -507,6 +542,80 @@ public class AppGFBreakGroundController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/singleUpload/editAcceptStatus")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object suEditAcceptStatus(MultipartRequest request) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFbreakGroundService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
|
||||
PageData log = new PageData();
|
||||
log.put("BREAKGROUNDLOG_ID", this.get32UUID());
|
||||
// log.put("ACTION", "审核打回");
|
||||
log.put("BREAKGROUND_ID", pd.get("BREAKGROUND_ID"));
|
||||
log.put("CREATOR",pd.get("ACTION_USER"));
|
||||
log.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
|
||||
String status = pd.get("STATUS").toString();
|
||||
String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
|
||||
(StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;");
|
||||
String HAZARD_IDENTIFICATION = (StringUtils.isNotBlank(pd2.getString("HAZARD_IDENTIFICATION")) ? pd2.getString("HAZARD_IDENTIFICATION") : "") +
|
||||
(StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? (pd.getString("HAZARD_IDENTIFICATION") + ";_;") : ";_;");
|
||||
//打回清空数据
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", "");
|
||||
pd2.put("HAZARD_IDENTIFICATION", "");
|
||||
switch (status) {
|
||||
|
||||
case "6"://验收人
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveAcceptImg(fileList.toArray(fileArr),signertime,pd.getString("BREAKGROUND_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_USER_ID"),pd.getString("ACCEPT_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES);
|
||||
pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION);
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
GFbreakGroundService.edit(pd2);
|
||||
log.put("ACTION", "验收通过");
|
||||
|
||||
|
||||
// 发短信
|
||||
this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2);
|
||||
break;
|
||||
|
||||
case "-6"://审批打回
|
||||
log.put("ACTION", "验收人打回");
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
GFbreakGroundService.edit(pd2);
|
||||
// 发短信
|
||||
this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
GFbreakGroundLogService.save(log);
|
||||
this.sendNotice(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
private void saveAcceptImg(MultipartFile[] files,String signertime, String BREAKGROUND_ID, String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID) throws Exception{
|
||||
if (files != null && files.length > 0) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
|
|
|
@ -735,6 +735,37 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改(单个文件上传接口)
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/singleUpload/editAcceptconfess")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object suEditAcceptconfess(MultipartRequest request) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFconfinedspaceService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveImg(fileList.toArray(fileArr),signertime,pd.getString("CONFINEDSPACE_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
private void saveImg(MultipartFile[] files,String signertime, String CONFINEDSPACE_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception{
|
||||
if (files != null && files.length > 0) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
|
@ -742,7 +773,12 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
MultipartFile file = files[i];
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName;
|
||||
if (file.getOriginalFilename() == null) {
|
||||
fileName = ".PNG";
|
||||
} else {
|
||||
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
}
|
||||
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
|
||||
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
|
||||
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());
|
||||
|
@ -868,6 +904,115 @@ public class AppGFConfinedSpaceController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value="/singleUpload/editAcceptStatus")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object suEditAcceptStatus(MultipartRequest request) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFconfinedspaceService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
PageData log = new PageData();
|
||||
log.put("CONFINEDSPACELOG_ID", this.get32UUID());
|
||||
// log.put("ACTION", "审核打回");
|
||||
log.put("CONFINEDSPACE_ID", pd.get("CONFINEDSPACE_ID"));
|
||||
log.put("CREATOR",pd.get("ACTION_USER"));
|
||||
log.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
|
||||
String status = pd.get("STATUS").toString();
|
||||
if ("2".equals(status) || "3".equals(status) || "4".equals(status) || "5".equals(status)) {
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
|
||||
(StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;"));
|
||||
} else if ("-2".equals(status) || "-3".equals(status) || "-4".equals(status) || "-5".equals(status) || "-6".equals(status)) {
|
||||
//打回清空数据
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", "");
|
||||
}
|
||||
|
||||
switch (status) {
|
||||
case "6"://验收人
|
||||
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveAcceptImg(fileList.toArray(fileArr),signertime,pd.getString("CONFINEDSPACE_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_USER_ID"),pd.getString("ACCEPT_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
GFconfinedspaceService.edit(pd2);
|
||||
log.put("ACTION", "验收通过");
|
||||
|
||||
// 发短信
|
||||
PageData mes = new PageData();
|
||||
mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid
|
||||
mes.put("templateCode", "YX_Y06");// 短信模板编码
|
||||
mes.put("SMSCode", "SMS_227250920");// 短信模板编码
|
||||
mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params1 = new PageData();
|
||||
params1.put("name", "number");// 存入短信模板中的参数名称
|
||||
params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList.add(params1);
|
||||
// 第2个参数
|
||||
PageData params2 = new PageData();
|
||||
params2.put("name", "type");// 存入短信模板中的参数名称
|
||||
params2.put("value", "有限空间作业");// 存入上面参数名称所传递的值
|
||||
paramsList.add(params2);
|
||||
sendMessageUtil.sendMessages(mes, paramsList);
|
||||
break;
|
||||
case "-6"://验收人打回
|
||||
log.put("ACTION", "验收人打回");
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
GFconfinedspaceService.edit(pd2);
|
||||
|
||||
// 发短信
|
||||
PageData mes4 = new PageData();
|
||||
mes4.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid
|
||||
mes4.put("templateCode", "YX_N06");// 短信模板编码
|
||||
mes4.put("SMSCode", "SMS_223580715");// 短信模板编码
|
||||
mes4.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList4 = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params13 = new PageData();
|
||||
params13.put("name", "params1");// 存入短信模板中的参数名称
|
||||
params13.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList4.add(params13);
|
||||
// 第2个参数
|
||||
PageData params14 = new PageData();
|
||||
params14.put("name", "params2");// 存入短信模板中的参数名称
|
||||
params14.put("value", "有限空间作业");// 存入上面参数名称所传递的值
|
||||
paramsList4.add(params14);
|
||||
// 第3个参数
|
||||
PageData params15 = new PageData();
|
||||
params15.put("name", "params3");// 存入短信模板中的参数名称
|
||||
params15.put("value", "验收人");// 存入上面参数名称所传递的值
|
||||
paramsList4.add(params15);
|
||||
sendMessageUtil.sendMessages(mes4, paramsList4);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
GFconfinedspaceLogService.save(log);
|
||||
this.sendNotice(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
private void saveAcceptImg(MultipartFile[] files,String signertime, String CONFINEDSPACE_ID, String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID) throws Exception{
|
||||
if (files != null && files.length > 0) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
|
|
|
@ -613,6 +613,35 @@ public class AppGFCutRoadController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/singleUpload/editAcceptconfess")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object suEditAcceptconfess(MultipartRequest request) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFcutRoadService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveImg(fileList.toArray(fileArr),signertime,pd.getString("CUTROAD_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
private void saveImg(MultipartFile[] files,String signertime, String CUTROAD_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception{
|
||||
if (files != null && files.length > 0) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
|
@ -620,7 +649,12 @@ public class AppGFCutRoadController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
MultipartFile file = files[i];
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName;
|
||||
if (file.getOriginalFilename() == null) {
|
||||
fileName = ".PNG";
|
||||
}else {
|
||||
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
}
|
||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
|
||||
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
|
||||
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());
|
||||
|
@ -714,6 +748,80 @@ public class AppGFCutRoadController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/singleUpload/editAcceptStatus")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object suEditAcceptStatus(MultipartRequest request) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFcutRoadService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
|
||||
PageData log = new PageData();
|
||||
log.put("CUTROADLOG_ID", this.get32UUID());
|
||||
// log.put("ACTION", "审核打回");
|
||||
log.put("CUTROAD_ID", pd.get("CUTROAD_ID"));
|
||||
log.put("CREATOR",pd.get("ACTION_USER"));
|
||||
log.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
|
||||
String status = pd.get("STATUS").toString();
|
||||
String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
|
||||
(StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;");
|
||||
// String HAZARD_IDENTIFICATION = (StringUtils.isNotBlank(pd2.getString("HAZARD_IDENTIFICATION")) ? pd2.getString("HAZARD_IDENTIFICATION") : "") +
|
||||
// (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? (pd.getString("HAZARD_IDENTIFICATION") + ";_;") : ";_;");
|
||||
//打回清空数据
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", "");
|
||||
// pd2.put("HAZARD_IDENTIFICATION", "");
|
||||
switch (status) {
|
||||
|
||||
case "6"://验收人
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveAcceptImg(fileList.toArray(fileArr),signertime,pd.getString("BREAKGROUND_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_USER_ID"),pd.getString("ACCEPT_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES);
|
||||
// pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION);
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
GFcutRoadService.edit(pd2);
|
||||
log.put("ACTION", "验收通过");
|
||||
|
||||
|
||||
// 发短信
|
||||
this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2);
|
||||
|
||||
break;
|
||||
|
||||
case "-6"://审批打回
|
||||
log.put("ACTION", "验收人打回");
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
GFcutRoadService.edit(pd2);
|
||||
// 发短信
|
||||
this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
GFcutRoadLogService.save(log);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
private void saveAcceptImg(MultipartFile[] files,String signertime, String BREAKGROUND_ID, String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID) throws Exception{
|
||||
if (files != null && files.length > 0) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
|
|
|
@ -554,6 +554,35 @@ public class AppGFElectricityController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/singleUpload/editAcceptconfess")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object suEditAcceptconfess(MultipartRequest request) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFelectricityService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveImg(fileList.toArray(fileArr),signertime,pd.getString("ELECTRICITY_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
private void saveImg(MultipartFile[] files,String signertime, String ELECTRICITY_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception{
|
||||
if (files != null && files.length > 0) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
|
@ -561,7 +590,12 @@ public class AppGFElectricityController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
MultipartFile file = files[i];
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName;
|
||||
if (file.getOriginalFilename() == null) {
|
||||
fileName = ".PNG";
|
||||
}else {
|
||||
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
}
|
||||
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
|
||||
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
|
||||
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());
|
||||
|
@ -693,6 +727,119 @@ public class AppGFElectricityController extends BaseController {
|
|||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/singleUpload/editAcceptStatus")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object suEditAcceptStatus(MultipartRequest request) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFelectricityService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
PageData log = new PageData();
|
||||
log.put("ELECTRICITYLOG_ID", this.get32UUID());
|
||||
// log.put("ACTION", "审核打回");
|
||||
log.put("ELECTRICITY_ID", pd.get("ELECTRICITY_ID"));
|
||||
log.put("CREATOR",pd.get("ACTION_USER"));
|
||||
log.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
|
||||
String status = pd.get("STATUS").toString();
|
||||
if ("2".equals(status) || "3".equals(status) || "4".equals(status)) {
|
||||
String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
|
||||
(StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;");
|
||||
pd.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES);
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES);
|
||||
} else if ("-2".equals(status) || "-3".equals(status) || "-4".equals(status) || "-5".equals(status)) {
|
||||
//打回清空数据
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", "");
|
||||
}
|
||||
|
||||
switch (status) {
|
||||
|
||||
case "5"://验收人
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveAcceptImg(fileList.toArray(fileArr),signertime,pd.getString("ELECTRICITY_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_USER_ID"),pd.getString("ACCEPT_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
GFelectricityService.edit(pd2);
|
||||
log.put("ACTION", "验收通过");
|
||||
|
||||
// 发短信
|
||||
PageData mes = new PageData();
|
||||
mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid
|
||||
mes.put("templateCode", "YD_Y05");// 短信模板编码
|
||||
mes.put("SMSCode", "SMS_227250920");// 短信模板编码
|
||||
mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params1 = new PageData();
|
||||
params1.put("name", "number");// 存入短信模板中的参数名称
|
||||
params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList.add(params1);
|
||||
// 第2个参数
|
||||
PageData params2 = new PageData();
|
||||
params2.put("name", "type");// 存入短信模板中的参数名称
|
||||
params2.put("value", "临时用电安全作业");// 存入上面参数名称所传递的值
|
||||
paramsList.add(params2);
|
||||
sendMessageUtil.sendMessages(mes, paramsList);
|
||||
break;
|
||||
|
||||
case "-5"://验收打回
|
||||
log.put("ACTION", "验收人打回");
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
GFelectricityService.edit(pd2);
|
||||
|
||||
PageData mes3 = new PageData();
|
||||
mes3.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid
|
||||
mes3.put("templateCode", "YD_N05");// 短信模板编码
|
||||
mes3.put("SMSCode", "SMS_223580715");// 短信模板编码
|
||||
mes3.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList3 = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData paramsc1 = new PageData();
|
||||
paramsc1.put("name", "params1");// 存入短信模板中的参数名称
|
||||
paramsc1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList3.add(paramsc1);
|
||||
|
||||
// 第2个参数
|
||||
PageData paramsc2 = new PageData();
|
||||
paramsc2.put("name", "params2");// 存入短信模板中的参数名称
|
||||
paramsc2.put("value", "临时用电安全作业");// 存入上面参数名称所传递的值
|
||||
paramsList3.add(paramsc2);
|
||||
// 第3个参数
|
||||
PageData paramsc3 = new PageData();
|
||||
paramsc3.put("name", "params3");// 存入短信模板中的参数名称
|
||||
paramsc3.put("value", "验收");// 存入上面参数名称所传递的值
|
||||
paramsList3.add(paramsc3);
|
||||
sendMessageUtil.sendMessages(mes3, paramsList3);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
GFelectricityLogService.save(log);
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
private void saveAcceptImg(MultipartFile[] files,String signertime, String ELECTRICITY_ID, String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID) throws Exception{
|
||||
if (files != null && files.length > 0) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
|
|
|
@ -542,10 +542,10 @@ public class AppGFHighWorkController extends BaseController {
|
|||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/editAcceptconfess")
|
||||
@RequestMapping(value="/singleUpload/editAcceptconfess")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object editAcceptconfess(MultipartRequest request) throws Exception {
|
||||
public Object suEditAcceptconfess(MultipartRequest request) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
|
@ -556,15 +556,14 @@ public class AppGFHighWorkController extends BaseController {
|
|||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME[] = pd.getString("SIGNTIME").split(",");
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveImg(fileList.toArray(fileArr),signertime,pd.getString("HIGHWORK_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
for (int i = 0; i < SIGNTIME.length; i++) {
|
||||
signertime = SIGNTIME[i];
|
||||
fileList.add(request.getFile("file"+i));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveImg(fileList.toArray(fileArr),signertime,pd.getString("HIGHWORK_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
@ -575,7 +574,12 @@ public class AppGFHighWorkController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
MultipartFile file = files[i];
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName;
|
||||
if (file.getOriginalFilename() == null) {
|
||||
fileName = ".PNG";
|
||||
}else {
|
||||
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
}
|
||||
smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
|
||||
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
|
||||
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());
|
||||
|
@ -681,6 +685,126 @@ public class AppGFHighWorkController extends BaseController {
|
|||
GFhighworkService.edit(pd2);
|
||||
|
||||
|
||||
// 发短信
|
||||
PageData mes3 = new PageData();
|
||||
mes3.put("RECEIVER_ID", pd2.get("CREATOR"));// 收信人userid
|
||||
mes3.put("templateCode", "GK_N06");// 短信模板编码
|
||||
mes3.put("SMSCode", "SMS_223580715");// 短信模板编码
|
||||
mes3.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList3 = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params10 = new PageData();
|
||||
params10.put("name", "params1");// 存入短信模板中的参数名称
|
||||
params10.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList3.add(params10);
|
||||
// 第2个参数
|
||||
PageData params11 = new PageData();
|
||||
params11.put("name", "params2");// 存入短信模板中的参数名称
|
||||
params11.put("value", "高空作业");// 存入上面参数名称所传递的值
|
||||
paramsList3.add(params11);
|
||||
// 第3个参数
|
||||
PageData params12 = new PageData();
|
||||
params12.put("name", "params3");// 存入短信模板中的参数名称
|
||||
params12.put("value", "验收人");// 存入上面参数名称所传递的值
|
||||
paramsList3.add(params12);
|
||||
sendMessageUtil.sendMessages(mes3, paramsList3);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
GFhighWorkLogService.save(log);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/singleUpload/editAcceptStatus")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object suEditAcceptStatus(MultipartRequest request) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFhighworkService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
// pd2.put("OTHER_PROTECTIVE_MEASURES", pd.get("OTHER_PROTECTIVE_MEASURES")); //修改人
|
||||
// pd2.put("HAZARD_IDENTIFICATION", pd.get("HAZARD_IDENTIFICATION")); //修改人
|
||||
PageData log = new PageData();
|
||||
log.put("HIGHWORKLOG_ID", this.get32UUID());
|
||||
// log.put("ACTION", "审核打回");
|
||||
log.put("HIGHWORK_ID", pd.get("HIGHWORK_ID"));
|
||||
log.put("CREATOR",pd.get("ACTION_USER"));
|
||||
log.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
|
||||
String status = pd.get("STATUS").toString();
|
||||
String OTHER_PROTECTIVE_MEASURES = pd2.getString("OTHER_PROTECTIVE_MEASURES");
|
||||
if ("2".equals(status) || "3".equals(status) || "4".equals(status) || "5".equals(status)) {
|
||||
OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
|
||||
(StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;");
|
||||
// pd2.put("OTHER_PROTECTIVE_MEASURES", (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
|
||||
// (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;"));
|
||||
// pd2.put("HAZARD_IDENTIFICATION", (StringUtils.isNotBlank(pd2.getString("HAZARD_IDENTIFICATION")) ? pd2.getString("HAZARD_IDENTIFICATION") : "") +
|
||||
// (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? (pd.getString("HAZARD_IDENTIFICATION") + ";_;") : ";_;"));
|
||||
} else if ("-2".equals(status) || "-3".equals(status) || "-4".equals(status) || "-5".equals(status) || "-6".equals(status)) {
|
||||
//打回清空数据
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", "");
|
||||
// pd2.put("HAZARD_IDENTIFICATION", "");
|
||||
}
|
||||
switch (status) {
|
||||
|
||||
case "6"://验收人
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveAcceptImg(fileList.toArray(fileArr),signertime,pd.getString("HIGHWORK_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_USER_ID"),pd.getString("ACCEPT_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES);
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
GFhighworkService.edit(pd2);
|
||||
log.put("ACTION", "验收通过");
|
||||
|
||||
// 发短信
|
||||
PageData mes = new PageData();
|
||||
mes.put("RECEIVER_ID", pd2.get("CREATOR"));// 收信人userid
|
||||
mes.put("templateCode", "GK_Y06");// 短信模板编码
|
||||
mes.put("SMSCode", "SMS_227250920");// 短信模板编码
|
||||
mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params1 = new PageData();
|
||||
params1.put("name", "number");// 存入短信模板中的参数名称
|
||||
params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList.add(params1);
|
||||
// 第2个参数
|
||||
PageData params2 = new PageData();
|
||||
params2.put("name", "type");// 存入短信模板中的参数名称
|
||||
params2.put("value", "高空作业");// 存入上面参数名称所传递的值
|
||||
paramsList.add(params2);
|
||||
sendMessageUtil.sendMessages(mes, paramsList);
|
||||
|
||||
break;
|
||||
case "-6"://验收人打回
|
||||
log.put("ACTION", "验收人打回");
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
GFhighworkService.edit(pd2);
|
||||
|
||||
|
||||
// 发短信
|
||||
PageData mes3 = new PageData();
|
||||
mes3.put("RECEIVER_ID", pd2.get("CREATOR"));// 收信人userid
|
||||
|
|
|
@ -519,6 +519,35 @@ public class AppGFHoistingController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/singleUpload/editAcceptconfess")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object suEditAcceptconfess(MultipartRequest request) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFhoistingService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveImg(fileList.toArray(fileArr),signertime,pd.getString("HOISTING_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
private void saveImg(MultipartFile[] files,String signertime, String HOISTING_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception{
|
||||
if (files != null && files.length > 0) {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
|
@ -526,7 +555,12 @@ public class AppGFHoistingController extends BaseController {
|
|||
pd = this.getPageData();
|
||||
MultipartFile file = files[i];
|
||||
String ffile = DateUtil.getDays();
|
||||
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
String fileName;
|
||||
if (file.getOriginalFilename() == null) {
|
||||
fileName = ".PNG";
|
||||
}else {
|
||||
fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
||||
}
|
||||
Smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile);
|
||||
pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime);
|
||||
pd.put("ACCEPT_CONFESS_ID", this.get32UUID());
|
||||
|
@ -622,6 +656,121 @@ public class AppGFHoistingController extends BaseController {
|
|||
break;
|
||||
|
||||
|
||||
case "-6"://审批打回
|
||||
log.put("ACTION", "验收人打回");
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
GFhoistingService.edit(pd2);
|
||||
|
||||
|
||||
// 发短信
|
||||
PageData mes3 = new PageData();
|
||||
mes3.put("RECEIVER_ID", pd2.get("CREATOR"));// 收信人userid
|
||||
mes3.put("templateCode", "DZ_N06");// 短信模板编码
|
||||
mes3.put("SMSCode", "SMS_223580715");// 短信模板编码
|
||||
mes3.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList3 = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params10 = new PageData();
|
||||
params10.put("name", "params1");// 存入短信模板中的参数名称
|
||||
params10.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList3.add(params10);
|
||||
// 第2个参数
|
||||
PageData params11 = new PageData();
|
||||
params11.put("name", "params2");// 存入短信模板中的参数名称
|
||||
params11.put("value", "吊装作业");// 存入上面参数名称所传递的值
|
||||
paramsList3.add(params11);
|
||||
// 第3个参数
|
||||
PageData params12 = new PageData();
|
||||
params12.put("name", "params3");// 存入短信模板中的参数名称
|
||||
params12.put("value", "验收");// 存入上面参数名称所传递的值
|
||||
paramsList3.add(params12);
|
||||
sendMessageUtil.sendMessages(mes3, paramsList3);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
GFhighWorkLogService.save(log);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/singleUpload/editAcceptStatus")
|
||||
@ResponseBody
|
||||
@Transactional
|
||||
public Object suEditAcceptStatus(MultipartRequest request) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd2 = new PageData();
|
||||
pd2 = GFhoistingService.findById(pd);
|
||||
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
|
||||
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
// pd2.put("OTHER_PROTECTIVE_MEASURES", pd.get("OTHER_PROTECTIVE_MEASURES")); //修改人
|
||||
// pd2.put("HAZARD_IDENTIFICATION", pd.get("HAZARD_IDENTIFICATION")); //修改人
|
||||
PageData log = new PageData();
|
||||
log.put("HOISTINGLOG_ID", this.get32UUID());
|
||||
// log.put("ACTION", "审核打回");
|
||||
log.put("HOISTING_ID", pd.get("HOISTING_ID"));
|
||||
log.put("CREATOR",pd.get("ACTION_USER"));
|
||||
log.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
|
||||
String status = pd.get("STATUS").toString();
|
||||
String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") +
|
||||
(StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;");
|
||||
// String HAZARD_IDENTIFICATION = (StringUtils.isNotBlank(pd2.getString("HAZARD_IDENTIFICATION")) ? pd2.getString("HAZARD_IDENTIFICATION") : "") +
|
||||
// (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? (pd.getString("HAZARD_IDENTIFICATION") + ";_;") : ";_;");
|
||||
|
||||
//打回清空数据
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", "");
|
||||
// pd2.put("HAZARD_IDENTIFICATION", "");
|
||||
switch (status) {
|
||||
|
||||
case "6"://验收人
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String signertime = "";
|
||||
String SIGNTIME = pd.getString("SIGNTIME");
|
||||
|
||||
signertime = SIGNTIME;
|
||||
fileList.add(request.getFile("file"));
|
||||
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
|
||||
saveAcceptImg(fileList.toArray(fileArr),signertime,pd.getString("HOISTING_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_USER_ID"),pd.getString("ACCEPT_DEPARTMENT_ID"));
|
||||
fileList.clear();
|
||||
|
||||
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
|
||||
pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES);
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
GFhoistingService.edit(pd2);
|
||||
log.put("ACTION", "验收通过");
|
||||
|
||||
// 发短信
|
||||
PageData mes = new PageData();
|
||||
mes.put("RECEIVER_ID", pd2.get("CREATOR"));// 收信人userid
|
||||
mes.put("templateCode", "DZ_Y06");// 短信模板编码
|
||||
mes.put("SMSCode", "SMS_227250920");// 短信模板编码
|
||||
mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
|
||||
// 参数集合
|
||||
List<PageData> paramsList = new ArrayList<PageData>();
|
||||
// 第1个参数
|
||||
PageData params1 = new PageData();
|
||||
params1.put("name", "number");// 存入短信模板中的参数名称
|
||||
params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
|
||||
paramsList.add(params1);
|
||||
// 第2个参数
|
||||
PageData params2 = new PageData();
|
||||
params2.put("name", "type");// 存入短信模板中的参数名称
|
||||
params2.put("value", "吊装作业");// 存入上面参数名称所传递的值
|
||||
paramsList.add(params2);
|
||||
sendMessageUtil.sendMessages(mes, paramsList);
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case "-6"://审批打回
|
||||
log.put("ACTION", "验收人打回");
|
||||
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
|
||||
|
|
|
@ -7,6 +7,10 @@ import com.zcloud.controller.map.testDto.TestDto;
|
|||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.bus.CorpInfoService;
|
||||
import com.zcloud.service.door.MkmjDeviceService;
|
||||
import com.zcloud.service.door.MkmjPathService;
|
||||
import com.zcloud.service.door.MkmjRelationService;
|
||||
import com.zcloud.service.door.PlatformDoorVideoService;
|
||||
import com.zcloud.service.dw.DwService;
|
||||
import com.zcloud.service.dw.dto.*;
|
||||
import com.zcloud.service.keyProjects.VideoManagerService;
|
||||
|
@ -30,6 +34,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
@ -81,7 +86,14 @@ public class MapController extends BaseController {
|
|||
private WeatherUtil weatherUtil;
|
||||
@Resource
|
||||
private DwService dwService;
|
||||
|
||||
@Autowired
|
||||
private MkmjRelationService mkmjRelationService;
|
||||
@Autowired
|
||||
private MkmjDeviceService mkmjDeviceService;
|
||||
@Autowired
|
||||
private PlatformDoorVideoService platformDoorVideoService;
|
||||
@Autowired
|
||||
private MkmjPathService mkmjPathService;
|
||||
@ResponseBody
|
||||
@RequestMapping("/getCorpInfo")
|
||||
public Object getCorpInfo() throws Exception {
|
||||
|
@ -745,11 +757,24 @@ public class MapController extends BaseController {
|
|||
*/
|
||||
@RequestMapping("/getGatesInAndOutListById")
|
||||
@ResponseBody
|
||||
public ReturnMap getGatesInAndOutListById(Page page) {
|
||||
public ReturnMap getGatesInAndOutListById(Page page) throws Exception {
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("DOOR_ID", pd.get("GATE_AREA_ID"));
|
||||
page.setPd(pd);
|
||||
List<PageData> recordAllList = gateMachineService.getPersonRecordListAllByEId(page);
|
||||
List<PageData> recordAllList = Collections.emptyList();
|
||||
if (!Tools.isEmpty(pd.getString("CORPINFO_ID"))) { //各公司的二级口门门禁记录
|
||||
page.setCurrentPage(1);
|
||||
page.setShowCount(10);
|
||||
recordAllList = mkmjPathService.getPeopleInfolistPageByMap(page); //列出人闸机信息列表
|
||||
// 车辆进出记录
|
||||
List<PageData> carRecordAllList = mkmjPathService.getCraInfolistPageByMap(page);
|
||||
returnMap.put("carRecordAllList", carRecordAllList);
|
||||
}else{
|
||||
recordAllList = gateMachineService.getPersonRecordListAllByEId(page);
|
||||
}
|
||||
|
||||
|
||||
returnMap.put("recordAllList", recordAllList);
|
||||
return returnMap;
|
||||
}
|
||||
|
@ -1168,4 +1193,65 @@ public class MapController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 闸机位置
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/23/023 9:04
|
||||
* @Param:
|
||||
* @Return:
|
||||
*/
|
||||
@RequestMapping("/getDoorCount")
|
||||
@ResponseBody
|
||||
public ReturnMap getDoorCount() throws Exception {
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData data = new PageData();
|
||||
PageData pageData = this.getPageData();
|
||||
//人闸机
|
||||
pageData.put("DEVICE_TYPE", 0);
|
||||
List<PageData> personMachine = mkmjDeviceService.listAll(pageData);
|
||||
data.put("personMachineCount", personMachine.size());
|
||||
//车闸机
|
||||
pageData.put("DEVICE_TYPE", 1);
|
||||
List<PageData> carMachine = mkmjDeviceService.listAll(pageData);
|
||||
data.put("carMachineCount", carMachine.size());
|
||||
//摄像头数
|
||||
List<PageData> camera = platformDoorVideoService.listAll(pageData);
|
||||
data.put("cameraCount", camera.size());
|
||||
returnMap.put("data", data);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 闸机位置
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/23/023 9:04
|
||||
* @Param:
|
||||
* @Return:
|
||||
*/
|
||||
@RequestMapping("/getDoorRecord")
|
||||
@ResponseBody
|
||||
public ReturnMap getDoorRecord() {
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pageData = this.getPageData();
|
||||
List<PageData> dataList = new ArrayList<>();
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String fendDate = format.format(new Date());
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0); // 将时设置为0
|
||||
calendar.set(Calendar.MINUTE, 0); // 将分设置为0
|
||||
calendar.set(Calendar.SECOND, 0); // 将秒设置为0
|
||||
calendar.set(Calendar.MILLISECOND, 0); // 将毫秒设置为0
|
||||
Date currDay = calendar.getTime();
|
||||
String fstartDate = format.format(currDay);
|
||||
if (pageData.get("TYPE").equals("0")) {
|
||||
pageData.put("eventTime", fstartDate);
|
||||
dataList = mkmjRelationService.findPersonRecord(pageData);
|
||||
} else {
|
||||
pageData.put("CROSSTIME", fstartDate);
|
||||
dataList = mkmjRelationService.findCarRecord(pageData);
|
||||
}
|
||||
returnMap.put("varList", dataList);
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -778,7 +778,7 @@ public class UsersController extends BaseController {
|
|||
}
|
||||
map.put("result", errInfo);
|
||||
map.put("code","0");
|
||||
map.put("syncInfo", JSONUtil.toJsonStr(usersService.findById(pd)));
|
||||
// map.put("syncInfo", JSONUtil.toJsonStr(usersService.findById(pd)));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -798,7 +798,7 @@ public class UsersController extends BaseController {
|
|||
usersService.editUserFuns(pd); //执行修改
|
||||
map.put("result", errInfo);
|
||||
map.put("code", "0");
|
||||
map.put("syncInfo", JSONUtil.toJsonStr(usersService.findById(pd)));
|
||||
// map.put("syncInfo", JSONUtil.toJsonStr(usersService.findById(pd)));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -830,7 +830,7 @@ public class UsersController extends BaseController {
|
|||
FHLOG.save(Jurisdiction.getUsername(), "从个人资料中修改" + pd.getString("USERNAME") + "的资料"); //记录日志
|
||||
map.put("result", errInfo);
|
||||
map.put("code", "0");
|
||||
map.put("syncInfo", JSONUtil.toJsonStr(usersService.findById(pd)));
|
||||
// map.put("syncInfo", JSONUtil.toJsonStr(usersService.findById(pd)));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -915,11 +915,14 @@ public class UsersController extends BaseController {
|
|||
pd.put("IP", ""); //IP
|
||||
pd.put("STATUS", "0"); //状态
|
||||
pd.put("ISMAIN", "0"); //状态
|
||||
pd.put("ISDELETE", "1"); //是否删除,0表示不删除
|
||||
// pd.put("ISDELETE", "1"); //是否删除,0表示不删除
|
||||
// 人员中台暂时不用
|
||||
pd.put("ISDELETE", "0"); //是否删除,0表示不删除
|
||||
pd.put("SKIN", "pcoded-navbar navbar-image-3,navbar pcoded-header navbar-expand-lg navbar-light header-dark,"); //用户默认皮肤
|
||||
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), pd.getString("PASSWORD")).toString()); //密码加密
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("ISPUSH", "0");
|
||||
// 人员中台暂时不用
|
||||
Map<String, String> resultMap = doCheck(pd.getString("USERNAME"), pd.getString("USER_ID_CARD"), "");
|
||||
if (resultMap.get("result").equals("success")) {
|
||||
if (null == usersService.findByUsername(pd)) { //判断用户名是否存在
|
||||
|
@ -1029,7 +1032,7 @@ public class UsersController extends BaseController {
|
|||
map.put("USER_ID",ID);
|
||||
map.put("result", errInfo); //返回结果
|
||||
map.put("code", "0");
|
||||
map.put("syncInfo", JSONUtil.toJsonStr(userinfo));
|
||||
// map.put("syncInfo", JSONUtil.toJsonStr(userinfo));
|
||||
} else {
|
||||
map.put("result", "您输入的身份证号和用户名二次校验失败,请确认后重新申请"); //返回结果
|
||||
}
|
||||
|
@ -1049,7 +1052,7 @@ public class UsersController extends BaseController {
|
|||
PageData pd = new PageData();
|
||||
String errInfo = "success";
|
||||
pd = this.getPageData();
|
||||
Map<String, String> returnMap = null;
|
||||
Map<String, String> returnMap = new HashMap<String, String>();
|
||||
if (pd.getString("ISPUSH").equals("1")) {
|
||||
|
||||
// ------联通人员定位删除人员用------
|
||||
|
@ -1063,9 +1066,11 @@ public class UsersController extends BaseController {
|
|||
for (Object key : set) {
|
||||
param.put(key.toString(),pd.getString(key.toString()));
|
||||
}
|
||||
String UserDto = JSON.toJSONString(param);
|
||||
String result = HttpClientUtilDoGet.sendHttpPost(tongBuUrl + "/docking/core/user/addOrUpdate", UserDto,param);
|
||||
returnMap = (Map<String, String>) JSON.parse(result);
|
||||
// String UserDto = JSON.toJSONString(param);
|
||||
// String result = HttpClientUtilDoGet.sendHttpPost(tongBuUrl + "/docking/core/user/addOrUpdate", UserDto,param);
|
||||
// returnMap = (Map<String, String>) JSON.parse(result);
|
||||
// TODO com.alibaba.fastjson.JSONException: syntax error, pos 1 暂时不用人员中台
|
||||
returnMap.put("result", "success");
|
||||
}
|
||||
|
||||
if (pd.getString("ISPUSH").equals("0") || returnMap.get("result").equals("success")) {
|
||||
|
@ -2499,8 +2504,11 @@ public class UsersController extends BaseController {
|
|||
}
|
||||
|
||||
public Map<String, String> doCheck(String USERNAME, String CARD_NO, String USER_ID) throws Exception {
|
||||
String result = HttpClientUtilDoGet.sendHttpGet(tongBuUrl + "/docking/core/user/getCheck"+"?USERNAME="+USERNAME+"&CARD_NO="+CARD_NO+"&USER_ID="+USER_ID);
|
||||
Map<String, String> returnMap = (Map<String, String>) JSON.parse(result);
|
||||
// String result = HttpClientUtilDoGet.sendHttpGet(tongBuUrl + "/docking/core/user/getCheck"+"?USERNAME="+USERNAME+"&CARD_NO="+CARD_NO+"&USER_ID="+USER_ID);
|
||||
// Map<String, String> returnMap = (Map<String, String>) JSON.parse(result);
|
||||
// 人员中台暂时不用
|
||||
Map<String, String> returnMap = new HashMap<>();
|
||||
returnMap.put("result", "success");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
|
@ -2590,115 +2598,4 @@ public class UsersController extends BaseController {
|
|||
}
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
static String CREATOR = null;
|
||||
static String OPERATOR = null;
|
||||
@RequestMapping(value = "/initCore")
|
||||
@ResponseBody
|
||||
public Object initCore() throws Exception {
|
||||
|
||||
PageData p1d = new PageData();
|
||||
// pd = this.getPageData();
|
||||
if (CREATOR == null) {
|
||||
CREATOR = Jurisdiction.getUSER_ID();
|
||||
OPERATOR = Jurisdiction.getUSER_ID();
|
||||
}
|
||||
List<PageData> pageData = usersService.listAllUser(p1d);
|
||||
|
||||
for (PageData pd : pageData) {
|
||||
try {
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
|
||||
pd.put("CREATOR", CREATOR); //创建人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
pd.put("OPERATOR", OPERATOR); //修改人
|
||||
PageData sexPd = new PageData();
|
||||
if (Tools.notEmpty(pd.getString("SEX"))) {
|
||||
sexPd.put("DICTIONARIES_ID", pd.getString("SEX"));
|
||||
PageData byId = dictionariesService.findById(sexPd);
|
||||
if (Tools.notEmpty(byId)) {
|
||||
pd.put("SEX", byId.getString("NAME"));
|
||||
}
|
||||
}
|
||||
StringBuilder ORG_PATH = new StringBuilder();
|
||||
boolean hasPid = true;
|
||||
PageData department = departmentService.findById(pd);
|
||||
if (department != null) {
|
||||
ORG_PATH.insert(0, department.getString("NAME"));
|
||||
String deptId = department.getString("PARENT_ID");
|
||||
PageData deptPd = new PageData();
|
||||
deptPd.put("DEPARTMENT_ID", deptId);
|
||||
if (!"0".equals(department.get("PARENT_ID"))) {
|
||||
while (hasPid) {
|
||||
PageData dept = departmentService.findById(deptPd);
|
||||
if ("0".equals(dept.get("PARENT_ID"))) {
|
||||
hasPid = false;
|
||||
} else {
|
||||
deptId = dept.getString("PARENT_ID");
|
||||
deptPd.put("DEPARTMENT_ID", deptId);
|
||||
}
|
||||
ORG_PATH.insert(0, dept.getString("NAME") + "/");
|
||||
}
|
||||
}
|
||||
pd.put("ORG_PATH", ORG_PATH);
|
||||
} else {
|
||||
ORG_PATH.insert(0, "");
|
||||
|
||||
|
||||
}
|
||||
PageData CorpName = corpInfoService.findById(pd);
|
||||
|
||||
|
||||
pd.put("CORPINFO_NAME", CorpName == null ? "" : CorpName.getString("CORP_NAME"));
|
||||
pd.put("USER_TYPE", "1");
|
||||
|
||||
HashMap<String, Object> param = new HashMap<>();
|
||||
Set set = pd.keySet();
|
||||
for (Object key : set) {
|
||||
param.put(key.toString(), pd.getString(key.toString()));
|
||||
}
|
||||
|
||||
|
||||
//要推送的照片集合
|
||||
List<PageData> userPhotoDTOList = new ArrayList<>();
|
||||
//人脸照片
|
||||
PageData photoPd = new PageData();
|
||||
photoPd.put("USER_PHOTO_ID", pd.getString("IMGFILES_ID"));
|
||||
photoPd.put("USER_ID", pd.getString("FOREIGN_KEY"));
|
||||
photoPd.put("PHOTO_URL", pd.getString("FILEPATH"));
|
||||
photoPd.put("PHOTO_TYPE", "1");
|
||||
photoPd.put("ISDELETE", "0");
|
||||
userPhotoDTOList.add(photoPd);
|
||||
param.put("userPhotoDTOList", userPhotoDTOList);
|
||||
String userResult = HttpClientUtilDoGet.sendHttpGet(tongBuUrl + "/docking/core/user/getUserInfoById" + "?USER_ID=" + pd.getString("USER_ID"));
|
||||
Map<String, Object> userReturnMap = (Map<String, Object>) JSON.parse(userResult);
|
||||
if (userReturnMap.get("USERINFO") != null) { //有用户数据获取修改信息
|
||||
PageData userInfoPd = JSON.parseObject(userReturnMap.get("USERINFO").toString(), PageData.class);
|
||||
String updateDescription = UpdateEnum.getUpdateDescription(userInfoPd, pd);
|
||||
param.put("REMARKS", updateDescription);
|
||||
|
||||
} else { //没有数据则获取新增信息
|
||||
String insertDescription = UpdateEnum.getInsertDescription(pd);
|
||||
param.put("REMARKS", insertDescription);
|
||||
}
|
||||
String UserDto = JSON.toJSONString(param);
|
||||
String result = HttpClientUtilDoGet.sendHttpPost(tongBuUrl + "/docking/core/user/addOrUpdate", UserDto, null);
|
||||
Map<String, String> returnMap = (Map<String, String>) JSON.parse(result);
|
||||
if (returnMap.get("result").equals("success")) {
|
||||
PageData pushPd = new PageData();
|
||||
pushPd.put("ISPUSH", "1");
|
||||
if (!Tools.isEmpty(pd.get("operateType")) && pd.getString("operateType").equals("delete")) {
|
||||
pushPd.put("ISDELETE", "1");
|
||||
} else {
|
||||
pushPd.put("ISDELETE", "0");
|
||||
}
|
||||
pushPd.put("USER_ID", pd.getString("USER_ID"));
|
||||
usersService.editPushStatus(pushPd);
|
||||
}
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
package com.zcloud.mapper.dsno2.door;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface DoorAreaMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
List<PageData> batchDevicelistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
/**.
|
||||
* 校验名称是否重复 修改时传入数据id
|
||||
* @param pageData
|
||||
* @return
|
||||
*/
|
||||
PageData findByOnly(PageData pageData);
|
||||
|
||||
List<PageData> carAndPersonInOutCount(PageData pd);
|
||||
|
||||
List<PageData> getAllByMap(PageData pageData);
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
|
||||
package com.zcloud.mapper.dsno2.door;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjDeviceMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
List<PageData> listAllForArea(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
/**.
|
||||
* 校验名称是否重复 修改时传入数据id
|
||||
* @param pageData
|
||||
* @return
|
||||
*/
|
||||
PageData findByOnly(PageData pageData);
|
||||
|
||||
/**
|
||||
* 定位
|
||||
* @param pd
|
||||
*/
|
||||
void savePosition(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.zcloud.mapper.dsno2.door;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 说明:门口门禁闸机摄像头
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjDoorVideoMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
/**
|
||||
* 定位
|
||||
* @param pd
|
||||
*/
|
||||
void savePosition(PageData pd);
|
||||
|
||||
/**.
|
||||
* 校验名称是否重复 修改时传入数据id
|
||||
* @param pageData
|
||||
* @return
|
||||
*/
|
||||
PageData findByOnly(PageData pageData);
|
||||
|
||||
List<PageData> getRelevanceDoor(PageData pd);
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
package com.zcloud.mapper.dsno2.door;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjPathMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
List<PageData> getPeopleInfolistPage(Page page);
|
||||
|
||||
List<PageData> getCarInfolistPage(Page page);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
/**.
|
||||
* 校验名称是否重复 修改时传入数据id
|
||||
* @param pageData
|
||||
* @return
|
||||
*/
|
||||
PageData findByOnly(PageData pageData);
|
||||
|
||||
/**
|
||||
* 定位
|
||||
* @param pd
|
||||
*/
|
||||
void savePosition(PageData pd);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.zcloud.mapper.dsno2.door;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjRelationMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
List<PageData> listAllForArea(PageData pd);
|
||||
|
||||
List<PageData> getAllCarAndPeopleInfoCountByArea(PageData pd);
|
||||
|
||||
List<PageData> getCarAndPeopleInfolistPage(Page page);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
/**.
|
||||
* 校验名称是否重复 修改时传入数据id
|
||||
* @param pageData
|
||||
* @return
|
||||
*/
|
||||
PageData findByOnly(PageData pageData);
|
||||
|
||||
/**
|
||||
* 定位
|
||||
* @param pd
|
||||
*/
|
||||
void savePosition(PageData pd);
|
||||
|
||||
List<PageData> findPersonRecord(PageData pageData);
|
||||
|
||||
List<PageData> findCarRecord(PageData pageData);
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.zcloud.mapper.dsno2.door;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:平台视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-07-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface PlatformDoorVideoMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listByPositionlistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**通过indexcode获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByCode(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
/**清空坐标
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delLocation(PageData pd);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -2,7 +2,6 @@ package com.zcloud.service.accident;
|
|||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.accident.AccidentRecords;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -29,16 +28,16 @@ public interface AccidentRecordsService {
|
|||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param accidentRecords 要保存的实体
|
||||
* @param pageData 要保存的实体
|
||||
*/
|
||||
void save(AccidentRecords accidentRecords);
|
||||
void save(PageData pageData);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param bean 要修改的实体
|
||||
*/
|
||||
void update(AccidentRecords bean);
|
||||
void update(PageData pageData);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
package com.zcloud.service.door;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface DoorAreaService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
public List<PageData> listForDevice(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> carAndPersonInOutCount(PageData pd)throws Exception;
|
||||
|
||||
|
||||
List<PageData> getAllByMap(PageData pageData);
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.zcloud.service.door;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjDeviceService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> listAllForArea(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
/**
|
||||
* 定位
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
Object savePosition(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package com.zcloud.service.door;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjPathService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> getPeopleInfolistPage(Page page)throws Exception;
|
||||
|
||||
public List<PageData> getCarInfolistPage(Page page)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
/**
|
||||
* 定位
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
Object savePosition(PageData pd);
|
||||
|
||||
|
||||
List<PageData> getPeopleInfolistPageByMap(Page page)throws Exception;
|
||||
|
||||
List<PageData> getCraInfolistPageByMap(Page page)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package com.zcloud.service.door;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjRelationService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> listAllForArea(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> getAllCarAndPeopleInfoCountByArea(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> getCarAndPeopleInfolistPage(Page page)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
/**
|
||||
* 定位
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
Object savePosition(PageData pd);
|
||||
|
||||
List<PageData> findPersonRecord(PageData pageData);
|
||||
|
||||
List<PageData> findCarRecord(PageData pageData);
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
package com.zcloud.service.door;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:平台视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-07-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface PlatformDoorVideoService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listByPosition(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**通过indexcode获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByCode(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
/**清空坐标
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delLocation(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
package com.zcloud.service.door.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.door.DoorAreaMapper;
|
||||
import com.zcloud.mapper.dsno2.door.MkmjPathMapper;
|
||||
import com.zcloud.service.door.DoorAreaService;
|
||||
import com.zcloud.util.UuidUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class DoorAreaServiceImpl implements DoorAreaService {
|
||||
|
||||
@Autowired
|
||||
private DoorAreaMapper doorAreaMapper;
|
||||
|
||||
@Autowired
|
||||
private MkmjPathMapper mkmjAreaGateMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object save(PageData pd)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
//保存校验名称不重复
|
||||
PageData pageData = doorAreaMapper.findByOnly(pd);
|
||||
//查询不到重复数据 开始走业务
|
||||
if(ObjectUtils.isEmpty(pageData)){
|
||||
pd.put("AREA_ID", UuidUtil.get32UUID());
|
||||
}else {
|
||||
map.put("result", "fail");
|
||||
map.put("msg", "名称已存在,请修改后重新提交");
|
||||
return map;
|
||||
}
|
||||
doorAreaMapper.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "保存成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object delete(PageData pd)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
//校验区域下是否存在口门,存在则不让删除
|
||||
List<PageData> gateList = mkmjAreaGateMapper.listAll(pd);
|
||||
if(gateList.size()>0){
|
||||
map.put("result", "fail");
|
||||
map.put("msg", "当前区域还存在闸机,请删除当前区域的所有闸机后进行删除");
|
||||
return map;
|
||||
}
|
||||
//两个校验都不存在 则可以删除
|
||||
doorAreaMapper.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "删除成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object edit(PageData pd)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pageData = doorAreaMapper.findByOnly(pd);
|
||||
//查询不到重复数据 开始走业务
|
||||
if(!ObjectUtils.isEmpty(pageData)){
|
||||
map.put("result", "fail");
|
||||
map.put("msg", "名称已存在,请修改后重新提交");
|
||||
return map;
|
||||
}
|
||||
doorAreaMapper.edit(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "编辑成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return doorAreaMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listForDevice(Page page)throws Exception{
|
||||
return doorAreaMapper.batchDevicelistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return doorAreaMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return doorAreaMapper.findById(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> carAndPersonInOutCount(PageData pd) throws Exception {
|
||||
return doorAreaMapper.carAndPersonInOutCount(pd);
|
||||
}
|
||||
/**
|
||||
* 方法名称:地图显示本公司的口门信息和坐标信息
|
||||
* 方法描述:
|
||||
* 创建人:guoyuepeng
|
||||
* 时间:2024/9/5 14:46
|
||||
* @param pageData
|
||||
* @return java.util.List<com.zcloud.entity.PageData>
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> getAllByMap(PageData pageData) {
|
||||
List<PageData> list = doorAreaMapper.getAllByMap(pageData);
|
||||
List<PageData> valueList = new ArrayList<>();
|
||||
for (PageData pd : list){ //整理成通用List
|
||||
PageData valueMap = new PageData();
|
||||
valueMap.put("GATE_AREA_NAME",pd.getString("DOOR_NAME"));
|
||||
valueMap.put("LATITUDE",pd.getString("LATITUDE"));
|
||||
valueMap.put("LONGITUDE",pd.getString("LONGITUDE"));
|
||||
valueMap.put("GATE_NAME",pd.getString("DOOR_NAME"));
|
||||
valueMap.put("MAP_POINT_NAME",pd.getString("DOOR_NAME"));
|
||||
valueMap.put("CORPINFO_ID",pd.getString("CORPINFO_ID"));
|
||||
valueMap.put("id",pd.getString("DOOR_ID"));
|
||||
valueList.add(valueMap);
|
||||
}
|
||||
return valueList;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
|
||||
package com.zcloud.service.door.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.door.MkmjDeviceMapper;
|
||||
import com.zcloud.service.door.MkmjDeviceService;
|
||||
import com.zcloud.util.UuidUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class MkmjDeviceServiceImpl implements MkmjDeviceService {
|
||||
|
||||
@Autowired
|
||||
private MkmjDeviceMapper mkmjDeviceMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object save(PageData pd)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
//保存校验名称不重复
|
||||
PageData pageData = mkmjDeviceMapper.findByOnly(pd);
|
||||
//查询不到重复数据 开始走业务
|
||||
if(ObjectUtils.isEmpty(pageData)){
|
||||
pd.put("DEVICE_ID", UuidUtil.get32UUID());
|
||||
}else {
|
||||
map.put("result", "fail");
|
||||
map.put("msg", "名称已存在,请修改后重新提交");
|
||||
return map;
|
||||
}
|
||||
mkmjDeviceMapper.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "保存成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object delete(PageData pd)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
mkmjDeviceMapper.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "删除成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object edit(PageData pd)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pageData = mkmjDeviceMapper.findByOnly(pd);
|
||||
//查询不到重复数据 开始走业务
|
||||
if(!ObjectUtils.isEmpty(pageData)){
|
||||
map.put("result", "fail");
|
||||
map.put("msg", "名称已存在,请修改后重新提交");
|
||||
return map;
|
||||
}
|
||||
mkmjDeviceMapper.edit(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "编辑成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return mkmjDeviceMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return mkmjDeviceMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllForArea(PageData pd)throws Exception{
|
||||
return mkmjDeviceMapper.listAllForArea(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return mkmjDeviceMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
mkmjDeviceMapper.deleteAll(ArrayDATA_IDS);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "删除成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object savePosition(PageData pd) {
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
mkmjDeviceMapper.savePosition(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "定位成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,200 @@
|
|||
package com.zcloud.service.door.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.door.MkmjPathMapper;
|
||||
import com.zcloud.service.door.MkmjPathService;
|
||||
import com.zcloud.util.UuidUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class MkmjPathServiceImpl implements MkmjPathService {
|
||||
|
||||
@Autowired
|
||||
private MkmjPathMapper mkmjPathMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object save(PageData pd)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
//保存校验名称不重复
|
||||
PageData pageData = mkmjPathMapper.findByOnly(pd);
|
||||
//查询不到重复数据 开始走业务
|
||||
if(ObjectUtils.isEmpty(pageData)){
|
||||
pd.put("PATH_ID", UuidUtil.get32UUID());
|
||||
}else {
|
||||
map.put("result", "fail");
|
||||
map.put("msg", "名称已存在,请修改后重新提交");
|
||||
return map;
|
||||
}
|
||||
mkmjPathMapper.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "保存成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object delete(PageData pd)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
mkmjPathMapper.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "删除成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object edit(PageData pd)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pageData = mkmjPathMapper.findByOnly(pd);
|
||||
//查询不到重复数据 开始走业务
|
||||
if(!ObjectUtils.isEmpty(pageData)){
|
||||
map.put("result", "fail");
|
||||
map.put("msg", "名称已存在,请修改后重新提交");
|
||||
return map;
|
||||
}
|
||||
mkmjPathMapper.edit(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "编辑成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return mkmjPathMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return mkmjPathMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getPeopleInfolistPage(Page page)throws Exception{
|
||||
return mkmjPathMapper.getPeopleInfolistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getCarInfolistPage(Page page)throws Exception{
|
||||
return mkmjPathMapper.getCarInfolistPage(page);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return mkmjPathMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
mkmjPathMapper.deleteAll(ArrayDATA_IDS);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "删除成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object savePosition(PageData pd) {
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
mkmjPathMapper.savePosition(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "定位成功");
|
||||
return map;
|
||||
}
|
||||
/**
|
||||
* 方法名称:地图的记录查询,主要是地图已经写好插件,准备把二级口门门禁的字段写入原来的系统中
|
||||
* 方法描述:
|
||||
* 创建人:guoyuepeng
|
||||
* 时间:2024/9/5 15:18
|
||||
* @param page
|
||||
* @return java.util.List<com.zcloud.entity.PageData>
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> getPeopleInfolistPageByMap(Page page) throws Exception {
|
||||
List<PageData> peopleInfolistPage = mkmjPathMapper.getPeopleInfolistPage(page);
|
||||
List<PageData> valueList = new ArrayList<>();
|
||||
for (PageData pageData : peopleInfolistPage){
|
||||
PageData valueMap = new PageData();
|
||||
valueMap.put("CARDTYPE", pageData.getString("NAME"));
|
||||
valueMap.put("USERNAME", pageData.getString("NAME"));
|
||||
valueMap.put("acc_last_update_date", pageData.getString("TIME"));
|
||||
valueMap.put("TIME", pageData.getString("TIME"));
|
||||
valueMap.put("COMING_REASON", pageData.getString("BAYNAME"));
|
||||
valueMap.put("EQUIPMENTNAME", pageData.getString("BAYNAME"));
|
||||
if("出".equals(pageData.getString("STATUS"))){
|
||||
valueMap.put("STATE", "1");
|
||||
}else{
|
||||
valueMap.put("STATE", "0");
|
||||
}
|
||||
valueList.add(valueMap);
|
||||
}
|
||||
return valueList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getCraInfolistPageByMap(Page page) throws Exception {
|
||||
|
||||
List<PageData> peopleInfolistPage = mkmjPathMapper.getCarInfolistPage(page);
|
||||
List<PageData> valueList = new ArrayList<>();
|
||||
for (PageData pageData : peopleInfolistPage){
|
||||
PageData valueMap = new PageData();
|
||||
valueMap.put("LICENSE_PLATE", pageData.getString("NAME"));
|
||||
valueMap.put("TIME", pageData.getString("TIME"));
|
||||
valueMap.put("COMING_REASON", pageData.getString("BAYNAME"));
|
||||
if("出".equals(pageData.getString("STATUS"))){
|
||||
valueMap.put("STATE", "1");
|
||||
}else{
|
||||
valueMap.put("STATE", "0");
|
||||
}
|
||||
valueList.add(valueMap);
|
||||
}
|
||||
return valueList;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
package com.zcloud.service.door.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.door.MkmjRelationMapper;
|
||||
import com.zcloud.service.door.MkmjRelationService;
|
||||
import com.zcloud.util.UuidUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class MkmjRelationServiceImpl implements MkmjRelationService {
|
||||
|
||||
@Autowired
|
||||
private MkmjRelationMapper mkmjRelationMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object save(PageData pd)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
pd.put("RELATION_ID", UuidUtil.get32UUID());
|
||||
mkmjRelationMapper.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "保存成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object delete(PageData pd)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
mkmjRelationMapper.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "删除成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object edit(PageData pd)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
mkmjRelationMapper.edit(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "编辑成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return mkmjRelationMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return mkmjRelationMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllForArea(PageData pd)throws Exception{
|
||||
return mkmjRelationMapper.listAllForArea(pd);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getAllCarAndPeopleInfoCountByArea(PageData pd)throws Exception{
|
||||
return mkmjRelationMapper.getAllCarAndPeopleInfoCountByArea(pd);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getCarAndPeopleInfolistPage(Page page)throws Exception{
|
||||
return mkmjRelationMapper.getCarAndPeopleInfolistPage(page);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return mkmjRelationMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
mkmjRelationMapper.deleteAll(ArrayDATA_IDS);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "删除成功");
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object savePosition(PageData pd) {
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
mkmjRelationMapper.savePosition(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "定位成功");
|
||||
return map;
|
||||
}
|
||||
@Override
|
||||
public List<PageData> findPersonRecord(PageData pageData){
|
||||
return mkmjRelationMapper.findPersonRecord(pageData);
|
||||
}
|
||||
@Override
|
||||
public List<PageData> findCarRecord(PageData pageData){
|
||||
return mkmjRelationMapper.findCarRecord(pageData);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
package com.zcloud.service.door.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.door.PlatformDoorVideoMapper;
|
||||
import com.zcloud.service.door.PlatformDoorVideoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:平台视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-07-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class PlatformDoorVideoServiceImpl implements PlatformDoorVideoService {
|
||||
|
||||
@Autowired
|
||||
private PlatformDoorVideoMapper platformDoorVideoMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
platformDoorVideoMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
platformDoorVideoMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
platformDoorVideoMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return platformDoorVideoMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listByPosition(Page page)throws Exception{
|
||||
return platformDoorVideoMapper.listByPositionlistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return platformDoorVideoMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return platformDoorVideoMapper.findById(pd);
|
||||
}
|
||||
|
||||
public PageData findByCode(PageData pd)throws Exception{
|
||||
return platformDoorVideoMapper.findByCode(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
platformDoorVideoMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delLocation(PageData pd) {
|
||||
platformDoorVideoMapper.delLocation(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -5,9 +5,12 @@ import com.zcloud.entity.PageData;
|
|||
import com.zcloud.mapper.datasource.map.GateAreaMapper;
|
||||
import com.zcloud.mapper.datasource.map.GateMachineMapper;
|
||||
import com.zcloud.mapper.datasource.map.GateVideoMapper;
|
||||
import com.zcloud.mapper.dsno2.door.MkmjDoorVideoMapper;
|
||||
import com.zcloud.service.door.DoorAreaService;
|
||||
import com.zcloud.service.keyProjects.VideoManagerService;
|
||||
import com.zcloud.service.map.GateMachineService;
|
||||
import com.zcloud.util.InitPageDataUtil;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
@ -34,8 +37,10 @@ public class GateMachineServiceImpl implements GateMachineService {
|
|||
|
||||
@Resource
|
||||
private InitPageDataUtil initPageDataUtil;
|
||||
|
||||
|
||||
@Resource
|
||||
private MkmjDoorVideoMapper mkmjDoorVideoMapper;
|
||||
@Resource
|
||||
private DoorAreaService doorAreaService;
|
||||
@Override
|
||||
public ArrayList<PageData> getDatalistpage(Page page) {
|
||||
return gateMachineMapper.getDatalistPage(page);
|
||||
|
@ -82,22 +87,41 @@ public class GateMachineServiceImpl implements GateMachineService {
|
|||
|
||||
@Override
|
||||
public List<PageData> getGatePosition(PageData pageData) {
|
||||
// todo 需求变更,现在闸机变成了区域
|
||||
if (pageData.getString("TYPE").equals("PERSON")) {
|
||||
pageData.put("GATE_AREA_TYPE", 0);
|
||||
// 人闸机定位
|
||||
}
|
||||
|
||||
if (pageData.getString("TYPE").equals("CAR")) {
|
||||
// 车闸机定位
|
||||
pageData.put("GATE_AREA_TYPE", 1);
|
||||
}
|
||||
if (pageData.getString("TYPE").equals("CAMERA")) {
|
||||
// 摄像头定位
|
||||
return gateVideoMapper.getCameraPosition(pageData);
|
||||
}
|
||||
if (pageData.getString("CORPINFO_ID").equals("035958e685cf4850bc40151c5e0617a6")) { //一公司的口门门禁系统
|
||||
// todo 需求变更,现在闸机变成了区域
|
||||
if (pageData.getString("TYPE").equals("PERSON")) {
|
||||
pageData.put("GATE_AREA_TYPE", 0);
|
||||
// 人闸机定位
|
||||
}
|
||||
|
||||
return gateAreaMapper.getGatePosition(pageData);
|
||||
if (pageData.getString("TYPE").equals("CAR")) {
|
||||
// 车闸机定位
|
||||
pageData.put("GATE_AREA_TYPE", 1);
|
||||
}
|
||||
if (pageData.getString("TYPE").equals("CAMERA")) {
|
||||
// 摄像头定位
|
||||
return gateVideoMapper.getCameraPosition(pageData);
|
||||
}
|
||||
|
||||
return gateAreaMapper.getGatePosition(pageData);
|
||||
} else if (!Tools.isEmpty(pageData.getString("CORPINFO_ID"))) { //如果有企业信息,就是要显示二级口门门禁系统信息
|
||||
if (pageData.getString("TYPE").equals("CAMERA")) {
|
||||
return mkmjDoorVideoMapper.listAll(pageData);
|
||||
}
|
||||
|
||||
if (pageData.getString("TYPE").equals("PERSON_MACHINE")) {
|
||||
pageData.put("DOOR_TYPE", "0");
|
||||
// 人闸机定位
|
||||
}
|
||||
|
||||
if (pageData.getString("TYPE").equals("CAR_MACHINE")) {
|
||||
// 车闸机定位
|
||||
pageData.put("DOOR_TYPE", 1);
|
||||
}
|
||||
return doorAreaService.getAllByMap(pageData);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,8 +25,8 @@ import java.util.Map;
|
|||
* 作者:water_xu
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
//@Aspect
|
||||
//@Component
|
||||
@SuppressWarnings("all")
|
||||
public class SyncDataAdviceAspect {
|
||||
|
||||
|
|
|
@ -0,0 +1,268 @@
|
|||
package com.zcloud.util.hk;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hikvision.artemis.sdk.Client;
|
||||
import com.hikvision.artemis.sdk.Request;
|
||||
import com.hikvision.artemis.sdk.Response;
|
||||
import com.hikvision.artemis.sdk.constant.Constants;
|
||||
import com.hikvision.artemis.sdk.enums.Method;
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author fangjiakai
|
||||
* @date 2023/09/12 10:16
|
||||
*/
|
||||
public class HKPostApiUtil {
|
||||
/**
|
||||
* 能力开放平台的网站路径
|
||||
* TODO 路径不用修改,就是/artemis
|
||||
*/
|
||||
private static final String ARTEMIS_PATH = "/artemis";
|
||||
|
||||
/**
|
||||
* 通用海康接口
|
||||
* 调用POST请求类型(application/json)接口*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Object> publicHkInterface(String host, String appKey, String appSecret, JSONObject jsonBody, String url) {
|
||||
final String getCamsApi = ARTEMIS_PATH + url;
|
||||
Map<String, String> path = new HashMap<String, String>(2);
|
||||
path.put("https://", getCamsApi);
|
||||
// post请求application/json类型参数
|
||||
String result = doPostStringArtemis(host, appKey, appSecret, path, jsonBody.toJSONString(), null, null, "application/json", null);
|
||||
JSONObject parseObject = JSONArray.parseObject(result);
|
||||
return parseObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监控点预览取流URL
|
||||
*
|
||||
* @param id 设备编号
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Object> camerasPreviewURLs(String host, String appKey, String appSecret, String id, String type) {
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("cameraIndexCode", id);
|
||||
// jsonBody.put("netZoneCode", "1");
|
||||
jsonBody.put("transmode", 1);
|
||||
jsonBody.put("streamType", 0);
|
||||
jsonBody.put("protocol", type);
|
||||
// jsonBody.put("expireTime", -1);
|
||||
jsonBody.put("expand", "transcode=1&streamform=rtp");
|
||||
Map<String, Object> returnMap = publicHkInterface(host, appKey, appSecret, jsonBody, "/api/video/v2/cameras/previewURLs");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有区域数
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Object> getAllArea(String host, String appKey, String appSecret) {
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("parentIndexCode", "root000000");
|
||||
jsonBody.put("resourceType", "camera");
|
||||
jsonBody.put("pageNo", 1);
|
||||
jsonBody.put("pageSize", 100);
|
||||
jsonBody.put("cascadeFlag", 0);
|
||||
Map<String, Object> returnMap = publicHkInterface(host, appKey, appSecret, jsonBody, "/api/resource/v2/regions/subRegions");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取区域内摄像头数
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Object> getAreaCamera(String host, String appKey, String appSecret, String indexCode) {
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("regionIndexCode", indexCode);
|
||||
jsonBody.put("resourceType", "camera");
|
||||
jsonBody.put("pageNo", 1);
|
||||
jsonBody.put("pageSize", 100);
|
||||
Map<String, Object> returnMap = publicHkInterface(host, appKey, appSecret, jsonBody, "/api/irds/v2/resource/subResources");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* API名称:
|
||||
* 查询监控点列表v2
|
||||
* 分组:
|
||||
* 视频资源接口
|
||||
* 提供方名称:
|
||||
* 资源目录服务
|
||||
* qps:
|
||||
* 描述:根据条件查询目录下有权限的监控点列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Object> cameraSearch(String host, String appKey, String appSecret, PageData pd) {
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("pageNo", pd.get("pageNo"));
|
||||
jsonBody.put("pageSize", pd.get("pageSize"));
|
||||
if (pd.get("name") != null && !"".equals(pd.getString("name")))
|
||||
jsonBody.put("name", pd.get("name"));
|
||||
jsonBody.put("orderBy", "name");
|
||||
jsonBody.put("orderType", "desc");
|
||||
jsonBody.put("resourceType", "camera");
|
||||
Map<String, Object> returnMap = publicHkInterface(host, appKey, appSecret, jsonBody, "/api/resource/v2/camera/search");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订阅事件
|
||||
*
|
||||
* @param ids 事件编号 131588
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Object> subscribeEvent(String host, String appKey, String appSecret, String[] ids) {
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("eventTypes", ids);
|
||||
jsonBody.put("eventDest", "1");
|
||||
Map<String, Object> returnMap = publicHkInterface(host, appKey, appSecret, jsonBody, "/api/eventService/v1/eventSubscriptionByEventTypes");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* API名称:
|
||||
* 闸机信息获取v2
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Object> getCarDoorList(String host, String appKey, String appSecret, PageData pd) {
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
Map<String, Object> returnMap = publicHkInterface(host, appKey, appSecret, jsonBody, "/api/resource/v1/park/parkList");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* API名称:
|
||||
* 闸机信息获取v2
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Object> getCarDoorInfo(String host, String appKey, String appSecret, String parkIndexCodes) {
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("parkIndexCodes", parkIndexCodes);
|
||||
Map<String, Object> returnMap = publicHkInterface(host, appKey, appSecret, jsonBody, "/api/resource/v1/entrance/entranceList");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
public static Map<String,Object> getCarPathByDoor(String host, String appKey, String appSecret,String parkIndexCodes){
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("parkIndexCodes",parkIndexCodes);
|
||||
Map<String,Object> returnMap = publicHkInterface(host, appKey, appSecret, jsonBody,"/api/resource/v1/entrance/entranceList");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
public static Map<String,Object> getCarDevice(String host, String appKey, String appSecret,String entranceIndexCodes){
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("entranceIndexCodes",entranceIndexCodes);
|
||||
Map<String,Object> returnMap = publicHkInterface(host, appKey, appSecret, jsonBody,"/api/resource/v1/roadway/roadwayList");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* API名称:
|
||||
* 查询门禁设备列表v2
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,Object> acsDeviceSearch(String host, String appKey, String appSecret,PageData pd){
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("pageNo", pd.get("pageNo"));
|
||||
jsonBody.put("pageSize", pd.get("pageSize"));
|
||||
if(pd.get("name")!=null && !"".equals(pd.getString("name")))
|
||||
jsonBody.put("name", pd.get("name"));
|
||||
jsonBody.put("orderBy", "name");
|
||||
jsonBody.put("orderType", "desc");
|
||||
Map<String,Object> returnMap=publicHkInterface(host, appKey, appSecret,jsonBody,"/api/resource/v2/acsDevice/search");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* API名称:
|
||||
* 闸机信息获取v2
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,Object> getGateMachineInfo(String host, String appKey, String appSecret, PageData pd){
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("pageNo", pd.get("pageNo"));
|
||||
jsonBody.put("pageSize", pd.get("pageSize"));
|
||||
Map<String,Object> returnMap = publicHkInterface(host, appKey, appSecret, jsonBody,"/api/resource/v2/door/search");
|
||||
return returnMap;
|
||||
}
|
||||
public static String doPostStringArtemis(String host, String appKey, String appSecret, Map<String, String> path, String body, Map<String, String> querys, String accept, String contentType, Map<String, String> header) {
|
||||
String httpSchema = (String) path.keySet().toArray()[0];
|
||||
if (httpSchema != null && !StringUtils.isEmpty(httpSchema)) {
|
||||
String responseStr = null;
|
||||
|
||||
try {
|
||||
Map<String, String> headers = new HashMap();
|
||||
if (StringUtils.isNotBlank(accept)) {
|
||||
headers.put("Accept", accept);
|
||||
} else {
|
||||
headers.put("Accept", "*/*");
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(contentType)) {
|
||||
headers.put("Content-Type", contentType);
|
||||
} else {
|
||||
headers.put("Content-Type", "application/text;charset=UTF-8");
|
||||
}
|
||||
|
||||
if (header != null) {
|
||||
headers.putAll(header);
|
||||
}
|
||||
|
||||
Request request = new Request(Method.POST_STRING, httpSchema + host, (String) path.get(httpSchema), appKey, appSecret, Constants.DEFAULT_TIMEOUT);
|
||||
request.setHeaders(headers);
|
||||
request.setQuerys(querys);
|
||||
request.setStringBody(body);
|
||||
Response response = Client.execute(request);
|
||||
responseStr = getResponseResult(response);
|
||||
} catch (Exception var11) {
|
||||
var11.printStackTrace();
|
||||
}
|
||||
return responseStr;
|
||||
} else {
|
||||
throw new RuntimeException("http和https参数错误httpSchema: " + httpSchema);
|
||||
}
|
||||
}
|
||||
|
||||
private static String getResponseResult(Response response) {
|
||||
String responseStr = null;
|
||||
int statusCode = response.getStatusCode();
|
||||
if (!String.valueOf(statusCode).startsWith("2") && !String.valueOf(statusCode).startsWith("3")) {
|
||||
String msg = response.getErrorMessage();
|
||||
responseStr = response.getBody();
|
||||
System.out.println("the Artemis Request is Failed,statusCode:" + statusCode + " errorMsg:" + msg);
|
||||
} else {
|
||||
responseStr = response.getBody();
|
||||
System.out.println("the Artemis Request is Success,statusCode:" + statusCode + " SuccessMsg:" + response.getBody());
|
||||
}
|
||||
|
||||
return responseStr;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String door_host = "192.168.164.50:443";
|
||||
String door_appKey = "24307012";
|
||||
String door_appSecret = "SLsUPf6WVR4uzu8NPdqq";
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("pageNo", 1);
|
||||
jsonBody.put("pageSize", 10);
|
||||
// jsonBody.put("orderBy", "name");
|
||||
// jsonBody.put("orderType", "desc");
|
||||
// jsonBody.put("resourceType", "region");
|
||||
// jsonBody.put("parkIndexCodes","34849cb85867447cbd2f0682aac4379a");
|
||||
Map<String, Object> returnMap = publicHkInterface(door_host, door_appKey, door_appSecret, jsonBody, "/api/resource/v2/door/search");
|
||||
System.out.println(returnMap);
|
||||
}
|
||||
|
||||
}
|
|
@ -58,14 +58,14 @@ spring.main.banner-mode=off
|
|||
#preventionxgf.api.url=http://127.0.0.1:8088/
|
||||
#
|
||||
#qa-regulatory-gwj.api.url=http://192.168.0.79:8008
|
||||
preventionxgf.api.url=http://39.100.115.58:8082/qa-prevention-xgf/
|
||||
qa-regulatory-gwj.api.url=http://39.100.115.58:8081/qa-regulatory-gwj/
|
||||
preventionxgf.api.url=https://qggf.qhdsafety.com/xgfApi/
|
||||
qa-regulatory-gwj.api.url=https://qggf.qhdsafety.com/jgApi/
|
||||
dw.url=http://192.168.192.201:8888/qa-dingWei-gwj/
|
||||
#?????
|
||||
smb.host=39.101.130.96
|
||||
smb.host=172.24.151.13
|
||||
smb.port=22
|
||||
smb.user=root
|
||||
smb.password=Zcloud@zcloud88888
|
||||
smb.password=0#MGi=dgtbU$r26_
|
||||
smb.basePath=/mnt/wwag/file/
|
||||
|
||||
#Mq\u914D\u7F6E
|
||||
|
@ -106,7 +106,6 @@ perLoc.url=http://192.168.210.32:8084
|
|||
perLoc.userName=qaaqadmin
|
||||
perLoc.pwd=Cfd2023@
|
||||
baseimgpath =http://192.168.192.201:8991/file/
|
||||
tongbu.url=http://127.0.0.1:8094
|
||||
|
||||
mq.csy.data.topic=csy_docking
|
||||
mq.csy.data.group=scheduled_tasks_csy_docking
|
||||
|
@ -145,6 +144,7 @@ gongJiangXueYuanProdUrl=https://gjxy.bjttsx.com
|
|||
gongJiangXueYuanGetImgUrl=https://wwag.qhdsafety.com/file/
|
||||
|
||||
# \u4E2D\u53F0
|
||||
tongbu.url=http://127.0.0.1:8094
|
||||
# \u6D88\u8D39\u4E2D\u53F0\u901A\u77E5
|
||||
mq.consumer.dataChange.tongbu-data-change.topic=tongbu_dataChange_docking
|
||||
mq.consumer.dataChange.tongbu-data-change.group=tongbu_dataChange_group
|
||||
|
|
|
@ -391,46 +391,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!-- 修改 -->
|
||||
<update id="editUser" parameterType="pd" >
|
||||
update <include refid="tableName"></include>
|
||||
set
|
||||
<if test="NAME != null and NAME != ''">
|
||||
NAME = #{NAME}
|
||||
</if>
|
||||
<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''">
|
||||
,DEPARTMENT_ID = #{DEPARTMENT_ID}
|
||||
</if>
|
||||
<if test="POST_ID != null and POST_ID != ''">
|
||||
,POST_ID = #{POST_ID}
|
||||
</if>
|
||||
<if test="ROLE_ID != null and ROLE_ID != ''">
|
||||
,ROLE_ID = #{ROLE_ID}
|
||||
</if>
|
||||
<if test="ROLE_IDS != null and ROLE_IDS != ''">
|
||||
,ROLE_IDS = #{ROLE_IDS}
|
||||
</if>
|
||||
<if test="BZ != null and BZ != ''">
|
||||
,BZ = #{BZ}
|
||||
</if>
|
||||
<if test="EMAIL != null and EMAIL != ''">
|
||||
,EMAIL = #{EMAIL}
|
||||
</if>
|
||||
<if test="NUMBER != null and NUMBER != ''">
|
||||
,NUMBER = #{NUMBER}
|
||||
</if>
|
||||
<if test="SORT != null">
|
||||
,SORT = #{SORT}
|
||||
</if>
|
||||
<if test="PERSON_TYPE != null and PERSON_TYPE != ''">
|
||||
,PERSON_TYPE = #{PERSON_TYPE}
|
||||
</if>
|
||||
<if test="IS_HAZARDCONFIRMER != null and IS_HAZARDCONFIRMER != ''">
|
||||
,IS_HAZARDCONFIRMER = #{IS_HAZARDCONFIRMER}
|
||||
</if>
|
||||
<if test="IS_ONLINELEARNING != null and IS_ONLINELEARNING != ''">
|
||||
,IS_ONLINELEARNING = #{IS_ONLINELEARNING}
|
||||
</if>
|
||||
<if test="PHONE != null and PHONE != ''">
|
||||
,PHONE = #{PHONE}
|
||||
</if>
|
||||
set NAME = #{NAME},
|
||||
DEPARTMENT_ID = #{DEPARTMENT_ID},
|
||||
POST_ID =#{POST_ID},
|
||||
ROLE_ID = #{ROLE_ID},
|
||||
ROLE_IDS = #{ROLE_IDS},
|
||||
BZ = #{BZ},
|
||||
EMAIL = #{EMAIL},
|
||||
NUMBER = #{NUMBER},
|
||||
SORT = #{SORT},
|
||||
PERSON_TYPE = #{PERSON_TYPE},
|
||||
IS_HAZARDCONFIRMER = #{IS_HAZARDCONFIRMER},
|
||||
IS_ONLINELEARNING = #{IS_ONLINELEARNING},
|
||||
PHONE = #{PHONE}
|
||||
<if test="ISPUSH != null and ISPUSH != ''">
|
||||
,ISPUSH = #{ISPUSH}
|
||||
</if>
|
||||
|
@ -661,10 +634,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and (u.ISPUSH = "1" or u.ISMAIN = "1")
|
||||
and u.ISDELETE = '0'
|
||||
</if>
|
||||
<if test='pd.ISPUSH == "2"'>
|
||||
AND u.ISDELETE = '0'
|
||||
</if>
|
||||
<!--
|
||||
<if test='pd.ISPUSH != "1"'>
|
||||
AND (u.ISPUSH != "1" or u.ISPUSH is null)
|
||||
AND (u.ISDELETE != "1" or u.ISPUSH = "0" )
|
||||
</if>
|
||||
-->
|
||||
</if>
|
||||
<if test="pd.IS_HAZARDCONFIRMER != null and pd.IS_HAZARDCONFIRMER != ''"><!-- 关键词检索 -->
|
||||
AND
|
||||
|
@ -797,9 +775,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<!-- 用户列表(全部) -->
|
||||
<select id="listAllUser" parameterType="pd" resultType="pd" >
|
||||
select u.*,
|
||||
select u.USER_ID,
|
||||
u.USERNAME,
|
||||
u.PASSWORD,
|
||||
u.LAST_LOGIN,
|
||||
u.NAME,
|
||||
u.IP,
|
||||
u.EMAIL,
|
||||
u.NUMBER,
|
||||
u.PHONE,
|
||||
r.ROLE_ID,
|
||||
|
||||
u.DEPARTMENT_ID,
|
||||
o.NAME as PID_NAME,
|
||||
o.PARENT_ID,
|
||||
d.NAME as DEPARTMENT_NAME,
|
||||
|
@ -810,7 +796,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join OA_DEPARTMENT o ON o.DEPARTMENT_ID = d.PARENT_ID
|
||||
where u.ROLE_ID = r.ROLE_ID
|
||||
and u.USERNAME != 'admin' and u.ISDELETE = '0'
|
||||
and (u.ISPUSH != '1' or u.ISPUSH is null)
|
||||
<!-- and r.PARENT_ID = '1' -->
|
||||
<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
|
|
|
@ -218,182 +218,65 @@
|
|||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
<set>
|
||||
<if test="XGF_USER_DETAILS_ID != null and XGF_USER_DETAILS_ID != ''">
|
||||
XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID},
|
||||
</if>
|
||||
<if test="XGF_USER_ID != null and XGF_USER_ID != ''">
|
||||
XGF_USER_ID = #{XGF_USER_ID},
|
||||
</if>
|
||||
<if test="XGF_USER_NAME != null and XGF_USER_NAME != ''">
|
||||
XGF_USER_NAME = #{XGF_USER_NAME},
|
||||
</if>
|
||||
<if test="BELONG_TO_CORP != null and BELONG_TO_CORP != ''">
|
||||
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||||
</if>
|
||||
<if test="BELONG_TO_CORP_NAME != null and BELONG_TO_CORP_NAME != ''">
|
||||
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||||
</if>
|
||||
<if test="PHONE != null and PHONE != ''">
|
||||
PHONE = #{PHONE},
|
||||
</if>
|
||||
<if test="CREATE_TIME != null and CREATE_TIME != ''">
|
||||
CREATE_TIME = #{CREATE_TIME},
|
||||
</if>
|
||||
<if test="DEPART_STATE != null and DEPART_STATE != ''">
|
||||
DEPART_STATE = #{DEPART_STATE},
|
||||
</if>
|
||||
<if test="IS_DELETE != null and IS_DELETE != ''">
|
||||
IS_DELETE = #{IS_DELETE},
|
||||
</if>
|
||||
<if test="AGE != null and AGE != ''">
|
||||
AGE = #{AGE},
|
||||
</if>
|
||||
<if test="HKLOCAL != null and HKLOCAL != ''">
|
||||
HKLOCAL = #{HKLOCAL},
|
||||
</if>
|
||||
<if test="ADDRESS != null and ADDRESS != ''">
|
||||
ADDRESS = #{ADDRESS},
|
||||
</if>
|
||||
<if test="DEGREE_OF_EDUCATION != null and DEGREE_OF_EDUCATION != ''">
|
||||
DEGREE_OF_EDUCATION = #{DEGREE_OF_EDUCATION},
|
||||
</if>
|
||||
<if test="DEGREE_OF_EDUCATION_NAME != null and DEGREE_OF_EDUCATION_NAME != ''">
|
||||
DEGREE_OF_EDUCATION_NAME = #{DEGREE_OF_EDUCATION_NAME},
|
||||
</if>
|
||||
<if test="CORP_START_DATE != null and CORP_START_DATE != ''">
|
||||
CORP_START_DATE = #{CORP_START_DATE},
|
||||
</if>
|
||||
<if test="POST_ID != null and POST_ID != ''">
|
||||
POST_ID = #{POST_ID},
|
||||
</if>
|
||||
<if test="POST_NAME != null and POST_NAME != ''">
|
||||
POST_NAME = #{POST_NAME},
|
||||
</if>
|
||||
<if test="WORK_SIGN != null and WORK_SIGN != ''">
|
||||
WORK_SIGN = #{WORK_SIGN},
|
||||
</if>
|
||||
<if test="JOINED_DATE != null and JOINED_DATE != ''">
|
||||
JOINED_DATE = #{JOINED_DATE},
|
||||
</if>
|
||||
<if test="WORK_DATE != null and WORK_DATE != ''">
|
||||
WORK_DATE = #{WORK_DATE},
|
||||
</if>
|
||||
<if test="PHOTO != null and PHOTO != ''">
|
||||
PHOTO = #{PHOTO},
|
||||
</if>
|
||||
<if test="DATE_OF_BIRTH != null and DATE_OF_BIRTH != ''">
|
||||
DATE_OF_BIRTH = #{DATE_OF_BIRTH},
|
||||
</if>
|
||||
<if test="ISPAY != null and ISPAY != ''">
|
||||
ISPAY = #{ISPAY},
|
||||
</if>
|
||||
<if test="ISPAY_NUMBER != null and ISPAY_NUMBER != ''">
|
||||
ISPAY_NUMBER = #{ISPAY_NUMBER},
|
||||
</if>
|
||||
<if test="IS_SAFETY_TELL != null and IS_SAFETY_TELL != ''">
|
||||
IS_SAFETY_TELL = #{IS_SAFETY_TELL},
|
||||
</if>
|
||||
<if test="IS_SAFETY_TIME != null and IS_SAFETY_TIME != ''">
|
||||
IS_SAFETY_TIME = #{IS_SAFETY_TIME},
|
||||
</if>
|
||||
<if test="IS_INJURIES_PAY != null and IS_INJURIES_PAY != ''">
|
||||
IS_INJURIES_PAY = #{IS_INJURIES_PAY},
|
||||
</if>
|
||||
<if test="IS_SIGN_LABOR != null and IS_SIGN_LABOR != ''">
|
||||
IS_SIGN_LABOR = #{IS_SIGN_LABOR},
|
||||
</if>
|
||||
<if test="SEX != null and SEX != ''">
|
||||
SEX = #{SEX},
|
||||
</if>
|
||||
<if test="ENTRY_DATE != null and ENTRY_DATE != ''">
|
||||
ENTRY_DATE = #{ENTRY_DATE},
|
||||
</if>
|
||||
<if test="PERSON_WORK_TYPE != null and PERSON_WORK_TYPE != ''">
|
||||
PERSON_WORK_TYPE = #{PERSON_WORK_TYPE},
|
||||
</if>
|
||||
<if test="PERSON_WORK_TYPE_NAME != null and PERSON_WORK_TYPE_NAME != ''">
|
||||
PERSON_WORK_TYPE_NAME = #{PERSON_WORK_TYPE_NAME},
|
||||
</if>
|
||||
<if test="NATIONALITY != null and NATIONALITY != ''">
|
||||
NATIONALITY = #{NATIONALITY},
|
||||
</if>
|
||||
<if test="NATIONALITY_NAME != null and NATIONALITY_NAME != ''">
|
||||
NATIONALITY_NAME = #{NATIONALITY_NAME},
|
||||
</if>
|
||||
<if test="POLITICAL_TIME != null and POLITICAL_TIME != ''">
|
||||
POLITICAL_TIME = #{POLITICAL_TIME},
|
||||
</if>
|
||||
<if test="POLITICAL_STATUS != null and POLITICAL_STATUS != ''">
|
||||
POLITICAL_STATUS = #{POLITICAL_STATUS},
|
||||
</if>
|
||||
<if test="POLITICAL_STATUS_NAME != null and POLITICAL_STATUS_NAME != ''">
|
||||
POLITICAL_STATUS_NAME = #{POLITICAL_STATUS_NAME},
|
||||
</if>
|
||||
<if test="IS_INJURIES_PAY_TIME != null and IS_INJURIES_PAY_TIME != ''">
|
||||
IS_INJURIES_PAY_TIME = #{IS_INJURIES_PAY_TIME},
|
||||
</if>
|
||||
<if test="IS_LEVEL_THREE != null and IS_LEVEL_THREE != ''">
|
||||
IS_LEVEL_THREE = #{IS_LEVEL_THREE},
|
||||
</if>
|
||||
<if test="IS_BODY_ADAPT != null and IS_BODY_ADAPT != ''">
|
||||
IS_BODY_ADAPT = #{IS_BODY_ADAPT},
|
||||
</if>
|
||||
<if test="IS_SPECIAL_JOB != null and IS_SPECIAL_JOB != ''">
|
||||
IS_SPECIAL_JOB = #{IS_SPECIAL_JOB},
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
</if>
|
||||
<if test="MANAGER_DEPARTMENT_ID != null and MANAGER_DEPARTMENT_ID != ''">
|
||||
MANAGER_DEPARTMENT_ID = #{MANAGER_DEPARTMENT_ID},
|
||||
</if>
|
||||
<if test="MANAGER_DEPARTMENT_NAME != null and MANAGER_DEPARTMENT_NAME != ''">
|
||||
MANAGER_DEPARTMENT_NAME = #{MANAGER_DEPARTMENT_NAME},
|
||||
</if>
|
||||
<if test="COMPETENT_DEPARTMENT_ID != null and COMPETENT_DEPARTMENT_ID != ''">
|
||||
COMPETENT_DEPARTMENT_ID = #{COMPETENT_DEPARTMENT_ID},
|
||||
</if>
|
||||
<if test="COMPETENT_DEPARTMENT_NAME != null and COMPETENT_DEPARTMENT_NAME != ''">
|
||||
COMPETENT_DEPARTMENT_NAME = #{COMPETENT_DEPARTMENT_NAME},
|
||||
</if>
|
||||
<if test="MAIN_DEPARTMENT_ID != null and MAIN_DEPARTMENT_ID != ''">
|
||||
MAIN_DEPARTMENT_ID = #{MAIN_DEPARTMENT_ID},
|
||||
</if>
|
||||
<if test="MAIN_DEPARTMENT_NAME != null and MAIN_DEPARTMENT_NAME != ''">
|
||||
MAIN_DEPARTMENT_NAME = #{MAIN_DEPARTMENT_NAME},
|
||||
</if>
|
||||
<if test="CARD_ID != null and CARD_ID != ''">
|
||||
CARD_ID = #{CARD_ID},
|
||||
</if>
|
||||
<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''">
|
||||
DEPARTMENT_ID = #{DEPARTMENT_ID},
|
||||
</if>
|
||||
<if test="DEPARTMENT_NAME != null and DEPARTMENT_NAME != ''">
|
||||
DEPARTMENT_NAME = #{DEPARTMENT_NAME},
|
||||
</if>
|
||||
<if test="IS_BF != null and IS_BF != ''">
|
||||
IS_BF = #{IS_BF},
|
||||
</if>
|
||||
<if test="IS_SOCIAL != null and IS_SOCIAL != ''">
|
||||
IS_SOCIAL = #{IS_SOCIAL},
|
||||
</if>
|
||||
<if test="SOCIAL_NUMBER != null and SOCIAL_NUMBER != ''">
|
||||
SOCIAL_NUMBER = #{SOCIAL_NUMBER},
|
||||
</if>
|
||||
<if test="zzName != null and zzName != ''">
|
||||
zzName = #{zzName},
|
||||
</if>
|
||||
<if test="ANNEX != null and ANNEX != ''">
|
||||
ANNEX = #{ANNEX},
|
||||
</if>
|
||||
<if test="ATTORNEY != null and ATTORNEY != ''">
|
||||
ATTORNEY = #{ATTORNEY},
|
||||
</if>
|
||||
<if test="COMMITMENT_LETTER != null and COMMITMENT_LETTER != ''">
|
||||
COMMITMENT_LETTER = #{COMMITMENT_LETTER}
|
||||
</if>
|
||||
</set>
|
||||
set
|
||||
XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID},
|
||||
XGF_USER_ID = #{XGF_USER_ID},
|
||||
XGF_USER_NAME = #{XGF_USER_NAME},
|
||||
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||||
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||||
PHONE = #{PHONE},
|
||||
CREATE_TIME = #{CREATE_TIME},
|
||||
DEPART_STATE = #{DEPART_STATE},
|
||||
IS_DELETE = #{IS_DELETE},
|
||||
AGE = #{AGE},
|
||||
HKLOCAL = #{HKLOCAL},
|
||||
ADDRESS = #{ADDRESS},
|
||||
DEGREE_OF_EDUCATION = #{DEGREE_OF_EDUCATION},
|
||||
DEGREE_OF_EDUCATION_NAME = #{DEGREE_OF_EDUCATION_NAME},
|
||||
CORP_START_DATE = #{CORP_START_DATE},
|
||||
POST_ID = #{POST_ID},
|
||||
POST_NAME = #{POST_NAME},
|
||||
WORK_SIGN = #{WORK_SIGN},
|
||||
JOINED_DATE = #{JOINED_DATE},
|
||||
WORK_DATE = #{WORK_DATE},
|
||||
PHOTO = #{PHOTO},
|
||||
DATE_OF_BIRTH = #{DATE_OF_BIRTH},
|
||||
ISPAY = #{ISPAY},
|
||||
ISPAY_NUMBER = #{ISPAY_NUMBER},
|
||||
IS_SAFETY_TELL = #{IS_SAFETY_TELL},
|
||||
IS_SAFETY_TIME = #{IS_SAFETY_TIME},
|
||||
IS_INJURIES_PAY = #{IS_INJURIES_PAY},
|
||||
IS_SIGN_LABOR = #{IS_SIGN_LABOR},
|
||||
SEX = #{SEX},
|
||||
ENTRY_DATE = #{ENTRY_DATE},
|
||||
PERSON_WORK_TYPE = #{PERSON_WORK_TYPE},
|
||||
PERSON_WORK_TYPE_NAME = #{PERSON_WORK_TYPE_NAME},
|
||||
NATIONALITY = #{NATIONALITY},
|
||||
NATIONALITY_NAME = #{NATIONALITY_NAME},
|
||||
POLITICAL_TIME = #{POLITICAL_TIME},
|
||||
POLITICAL_STATUS = #{POLITICAL_STATUS},
|
||||
POLITICAL_STATUS_NAME = #{POLITICAL_STATUS_NAME},
|
||||
IS_INJURIES_PAY_TIME = #{IS_INJURIES_PAY_TIME},
|
||||
IS_LEVEL_THREE = #{IS_LEVEL_THREE},
|
||||
IS_BODY_ADAPT = #{IS_BODY_ADAPT},
|
||||
IS_SPECIAL_JOB = #{IS_SPECIAL_JOB},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
MANAGER_DEPARTMENT_ID = #{MANAGER_DEPARTMENT_ID},
|
||||
MANAGER_DEPARTMENT_NAME = #{MANAGER_DEPARTMENT_NAME},
|
||||
COMPETENT_DEPARTMENT_ID = #{COMPETENT_DEPARTMENT_ID},
|
||||
COMPETENT_DEPARTMENT_NAME = #{COMPETENT_DEPARTMENT_NAME},
|
||||
MAIN_DEPARTMENT_ID = #{MAIN_DEPARTMENT_ID},
|
||||
MAIN_DEPARTMENT_NAME = #{MAIN_DEPARTMENT_NAME},
|
||||
CARD_ID = #{CARD_ID},
|
||||
DEPARTMENT_ID = #{DEPARTMENT_ID},
|
||||
DEPARTMENT_NAME = #{DEPARTMENT_NAME},
|
||||
IS_BF = #{IS_BF},
|
||||
IS_SOCIAL = #{IS_SOCIAL},
|
||||
SOCIAL_NUMBER = #{SOCIAL_NUMBER},
|
||||
zzName = #{zzName},
|
||||
ANNEX = #{ANNEX},
|
||||
ATTORNEY = #{ATTORNEY},
|
||||
COMMITMENT_LETTER = #{COMMITMENT_LETTER}
|
||||
where
|
||||
XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID}
|
||||
</update>
|
||||
|
|
|
@ -92,53 +92,22 @@
|
|||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
<set>
|
||||
<if test="USERNAME != null and USERNAME != ''">
|
||||
USERNAME = #{USERNAME},
|
||||
</if>
|
||||
<if test="NAME != null and NAME != ''">
|
||||
NAME = #{NAME},
|
||||
</if>
|
||||
<if test="VALID_FLAG != null and VALID_FLAG != ''">
|
||||
VALID_FLAG = #{VALID_FLAG},
|
||||
</if>
|
||||
<if test="BELONG_TO_CORP != null and BELONG_TO_CORP != ''">
|
||||
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||||
</if>
|
||||
<if test="BELONG_TO_CORP_NAME != null and BELONG_TO_CORP_NAME != ''">
|
||||
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||||
</if>
|
||||
<if test="IS_DELETE != null and IS_DELETE != ''">
|
||||
IS_DELETE = #{IS_DELETE},
|
||||
</if>
|
||||
<if test="CREATE_TIME != null and CREATE_TIME != ''">
|
||||
CREATE_TIME = #{CREATE_TIME},
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
</if>
|
||||
<if test="STATUS != null and STATUS != ''">
|
||||
STATUS = #{STATUS},
|
||||
</if>
|
||||
<if test="OPERATOR_TIME != null and OPERATOR_TIME != ''">
|
||||
OPERATOR_TIME = #{OPERATOR_TIME},
|
||||
</if>
|
||||
<if test="ISFLOW != null and ISFLOW != ''">
|
||||
ISFLOW = #{ISFLOW},
|
||||
</if>
|
||||
<if test="STUDY_STATUS != null and STUDY_STATUS != ''">
|
||||
STUDY_STATUS = #{STUDY_STATUS},
|
||||
</if>
|
||||
<if test="CHECK_STATUS != null and CHECK_STATUS != ''">
|
||||
CHECK_STATUS = #{CHECK_STATUS},
|
||||
</if>
|
||||
<if test="CHECK_STEP != null and CHECK_STEP != ''">
|
||||
CHECK_STEP = #{CHECK_STEP},
|
||||
</if>
|
||||
<if test="LIMIT_END_TIME != null and LIMIT_END_TIME != ''">
|
||||
LIMIT_END_TIME = #{LIMIT_END_TIME}
|
||||
</if>
|
||||
</set>
|
||||
set
|
||||
USERNAME = #{USERNAME},
|
||||
NAME = #{NAME},
|
||||
VALID_FLAG = #{VALID_FLAG},
|
||||
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||||
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||||
IS_DELETE = #{IS_DELETE},
|
||||
CREATE_TIME = #{CREATE_TIME},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
STATUS = #{STATUS},
|
||||
OPERATOR_TIME = #{OPERATOR_TIME},
|
||||
ISFLOW = #{ISFLOW},
|
||||
STUDY_STATUS = #{STUDY_STATUS},
|
||||
CHECK_STATUS = #{CHECK_STATUS},
|
||||
CHECK_STEP = #{CHECK_STEP},
|
||||
LIMIT_END_TIME = #{LIMIT_END_TIME}
|
||||
where
|
||||
XGF_USER_ID = #{XGF_USER_ID}
|
||||
</update>
|
||||
|
|
|
@ -0,0 +1,228 @@
|
|||
<?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="com.zcloud.mapper.dsno2.door.DoorAreaMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
MKMJ_AREA
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.AREA_ID,
|
||||
f.DEVICE_IDS,
|
||||
f.AREA_NAME,
|
||||
f.CORPINFO_ID,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
AREA_ID,
|
||||
DEVICE_IDS,
|
||||
AREA_NAME,
|
||||
CORPINFO_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{AREA_ID},
|
||||
#{DEVICE_IDS},
|
||||
#{AREA_NAME},
|
||||
#{CORPINFO_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
AREA_ID = #{AREA_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
AREA_ID=AREA_ID
|
||||
<if test="AREA_NAME != null and AREA_NAME != ''"><!-- 关键词检索 -->
|
||||
,AREA_NAME=#{AREA_NAME}
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
,CORPINFO_ID=#{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="CREATOR != null and CREATOR != ''"><!-- 关键词检索 -->
|
||||
,CREATOR=#{CREATOR}
|
||||
</if>
|
||||
<if test="CREATTIME != null and CREATTIME != ''"><!-- 关键词检索 -->
|
||||
,CREATTIME=#{CREATTIME}
|
||||
</if>
|
||||
<if test="OPERATOR != null and OPERATOR != ''"><!-- 关键词检索 -->
|
||||
,OPERATOR=#{OPERATOR}
|
||||
</if>
|
||||
<if test="OPERATTIME != null and OPERATTIME != ''"><!-- 关键词检索 -->
|
||||
,OPERATTIME=#{OPERATTIME}
|
||||
</if>
|
||||
<if test="ISDELETE != null and ISDELETE != ''"><!-- 关键词检索 -->
|
||||
,ISDELETE=#{ISDELETE}
|
||||
</if>
|
||||
<if test="DEVICE_IDS != null and DEVICE_IDS != ''"><!-- 关键词检索 -->
|
||||
,DEVICE_IDS=#{DEVICE_IDS}
|
||||
</if>
|
||||
where
|
||||
AREA_ID=#{AREA_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.AREA_ID=#{AREA_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
COUNT( DISTINCT r.RELATION_ID ) DEVICE_COUNT
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN mkmj_relation r ON r.AREA_ID = f.AREA_ID AND r.ISDELETE = '0'
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
f.AREA_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
GROUP BY
|
||||
f.AREA_ID
|
||||
ORDER BY
|
||||
f.CREATTIME DESC
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="batchDevicelistPage" parameterType="page" resultType="pd">
|
||||
SELECT
|
||||
d.*,
|
||||
f.RELATION_ID,
|
||||
f.TYPE,
|
||||
de.DEVICE_NAME DOCK_DEVICE_NAME,
|
||||
de.DOOR_NAME DOCK_DOOR_NAME,
|
||||
de.PATH_NAME DOCK_PATH_NAME
|
||||
FROM
|
||||
mkmj_relation f
|
||||
LEFT JOIN mkmj_device d ON d.DEVICE_ID = f.DEVICE_ID
|
||||
LEFT JOIN mkmj_dock_device de ON de.DOCK_DEVICE_ID = d.DOCK_DEVICE_ID
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND
|
||||
f.AREA_ID = #{pd.AREA_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
AREA_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 校验名称是否重复 -->
|
||||
<select id="findByOnly" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.ISDELETE = '0'
|
||||
AND f.AREA_NAME = #{AREA_NAME}
|
||||
<if test="AREA_ID!='' and AREA_ID != null">
|
||||
and f.AREA_ID != #{AREA_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 校验名称是否重复 -->
|
||||
<select id="carAndPersonInOutCount" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
f.AREA_ID AREA_ID,
|
||||
f.AREA_NAME AREA_NAME,
|
||||
COUNT( CASE WHEN c.entrystatusStr = '进港' THEN c.car_log_id END ) CARINCOUNT,
|
||||
COUNT( CASE WHEN c.entrystatusStr = '出港' THEN c.car_log_id END ) CAROUTCOUNT,
|
||||
COUNT( CASE WHEN p.entrystatusStr = '进入' THEN p.person_log_id END ) PERSONINCOUNT,
|
||||
COUNT( CASE WHEN p.entrystatusStr = '离开' THEN p.person_log_id END ) PERSONOUTCOUNT
|
||||
FROM
|
||||
mkmj_area f
|
||||
LEFT JOIN mkmj_door d ON FIND_IN_SET(d.DOOR_ID,f.DEVICE_IDS)
|
||||
LEFT JOIN dj_car_log c ON c.accId = d.SOURCE_ID AND DATE(c.chtime) = CURDATE()
|
||||
LEFT JOIN dj_person_log p ON p.accId = d.SOURCE_ID AND DATE(p.chtime) = CURDATE()
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
GROUP BY f.AREA_ID
|
||||
</select>
|
||||
|
||||
<!-- 校验名称是否重复 -->
|
||||
<select id="getAllByMap" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
f.*
|
||||
FROM
|
||||
mkmj_door f
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="DOOR_TYPE != null and DOOR_TYPE != ''">
|
||||
and f.DOOR_TYPE = #{DOOR_TYPE}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,217 @@
|
|||
<?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="com.zcloud.mapper.dsno2.door.MkmjDeviceMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
MKMJ_DEVICE
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.DEVICE_ID,
|
||||
f.DOCK_DEVICE_ID,
|
||||
f.DOOR_ID,
|
||||
f.PATH_ID,
|
||||
f.DEVICE_NAME,
|
||||
f.DEVICE_TYPE,
|
||||
f.STATUS,
|
||||
f.CORPINFO_ID,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
DEVICE_ID,
|
||||
DOCK_DEVICE_ID,
|
||||
DOOR_ID,
|
||||
PATH_ID,
|
||||
DEVICE_NAME,
|
||||
DEVICE_TYPE,
|
||||
STATUS,
|
||||
CORPINFO_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{DEVICE_ID},
|
||||
#{DOCK_DEVICE_ID},
|
||||
#{DOOR_ID},
|
||||
#{PATH_ID},
|
||||
#{DEVICE_NAME},
|
||||
#{DEVICE_TYPE},
|
||||
#{STATUS},
|
||||
#{CORPINFO_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
DEVICE_ID = #{DEVICE_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
DOCK_DEVICE_ID = #{DOCK_DEVICE_ID},
|
||||
DOOR_ID = #{DOOR_ID},
|
||||
PATH_ID = #{PATH_ID},
|
||||
DEVICE_NAME = #{DEVICE_NAME},
|
||||
DEVICE_TYPE = #{DEVICE_TYPE},
|
||||
STATUS = #{STATUS},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
CREATOR = #{CREATOR},
|
||||
CREATTIME = #{CREATTIME},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
ISDELETE = #{ISDELETE}
|
||||
where
|
||||
DEVICE_ID=#{DEVICE_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
d.DEVICE_NAME DOCK_DEVICE_NAME,
|
||||
d.DOOR_NAME DOCK_DOOR_NAME,
|
||||
d.PATH_NAME DOCK_PATH_NAME,
|
||||
r.TYPE
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN mkmj_dock_device d ON f.DOCK_DEVICE_ID = d.DOCK_DEVICE_ID
|
||||
LEFT JOIN mkmj_relation r ON r.DEVICE_ID = f.DEVICE_ID
|
||||
where
|
||||
f.DEVICE_ID=#{DEVICE_ID}
|
||||
GROUP BY DEVICE_ID
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
d.DEVICE_NAME DOCK_DEVICE_NAME,
|
||||
d.DOOR_NAME DOCK_DOOR_NAME,
|
||||
d.PATH_NAME DOCK_PATH_NAME,
|
||||
d.DEVICE_TYPE DOCK_DEVICE_TYPE
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN mkmj_dock_device d ON f.DOCK_DEVICE_ID = d.DOCK_DEVICE_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
f.DEVICE_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="pd.PATH_ID != null and pd.PATH_ID != ''"><!-- 关键词检索 -->
|
||||
and f.PATH_ID=#{pd.PATH_ID}
|
||||
</if>
|
||||
ORDER BY f.CREATTIME DESC
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN mkmj_dock_device d ON f.DOCK_DEVICE_ID = d.DOCK_DEVICE_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="PATH_ID!='' and PATH_ID != null">
|
||||
and f.PATH_ID = #{PATH_ID}
|
||||
</if>
|
||||
<if test="DEVICE_TYPE!='' and DEVICE_TYPE != null">
|
||||
and d.DEVICE_TYPE = #{DEVICE_TYPE}
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAllForArea" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
DEVICE_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 校验名称是否重复 -->
|
||||
<select id="findByOnly" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.ISDELETE = '0'
|
||||
AND f.DEVICE_NAME = #{DEVICE_NAME}
|
||||
<if test="DEVICE_ID!='' and DEVICE_ID != null">
|
||||
and f.DEVICE_ID != #{DEVICE_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 定位 -->
|
||||
<update id="savePosition" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
LATITUDE = #{LATITUDE},
|
||||
LONGITUDE = #{LONGITUDE}
|
||||
where
|
||||
DEVICE_ID = #{DEVICE_ID}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,202 @@
|
|||
<?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="com.zcloud.mapper.dsno2.door.MkmjDoorVideoMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
MKMJ_DOOR_VIDEO
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.DOOR_VIDEO_ID,
|
||||
f.DOOR_ID,
|
||||
f.PLATFORMVIDEOMANAGEMENT_ID,
|
||||
f.LONGITUDE,
|
||||
f.LATITUDE,
|
||||
f.CORPINFO_ID,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
DOOR_VIDEO_ID,
|
||||
DOOR_ID,
|
||||
PLATFORMVIDEOMANAGEMENT_ID,
|
||||
LONGITUDE,
|
||||
LATITUDE,
|
||||
CORPINFO_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{DOOR_VIDEO_ID},
|
||||
#{DOOR_ID},
|
||||
#{PLATFORMVIDEOMANAGEMENT_ID},
|
||||
#{LONGITUDE},
|
||||
#{LATITUDE},
|
||||
#{CORPINFO_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
DOOR_VIDEO_ID = #{DOOR_VIDEO_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
DOOR_VIDEO_ID= DOOR_VIDEO_ID,
|
||||
DOOR_ID=#{DOOR_ID},
|
||||
PLATFORMVIDEOMANAGEMENT_ID=#{PLATFORMVIDEOMANAGEMENT_ID},
|
||||
LONGITUDE=#{LONGITUDE},
|
||||
LATITUDE=#{LATITUDE},
|
||||
CORPINFO_ID=#{CORPINFO_ID},
|
||||
CREATOR=#{CREATOR},
|
||||
CREATTIME=#{CREATTIME},
|
||||
OPERATOR=#{OPERATOR},
|
||||
OPERATTIME=#{OPERATTIME},
|
||||
ISDELETE=#{ISDELETE}
|
||||
where
|
||||
DOOR_VIDEO_ID=#{DOOR_VIDEO_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.DOOR_VIDEO_ID=#{DOOR_VIDEO_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
r.NAME,
|
||||
r.INDEXCODE
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN bus_platform_door_video r on r.PLATFORMDOORVIDEO_ID = f.PLATFORMVIDEOMANAGEMENT_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
r.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
<!-- 根据需求自己加检索条件
|
||||
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
-->
|
||||
)
|
||||
</if>
|
||||
<if test="pd.DOOR_ID != null and pd.DOOR_ID != ''">
|
||||
AND f.DOOR_ID = #{pd.DOOR_ID}
|
||||
</if>
|
||||
ORDER BY f.CREATTIME DESC
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
r.NAME,
|
||||
r.INDEXCODE,
|
||||
'DOOR_VIDEO' VIDEO_TYPE
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN bus_platform_door_video r on r.PLATFORMDOORVIDEO_ID = f.PLATFORMVIDEOMANAGEMENT_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
DOOR_VIDEO_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 定位 -->
|
||||
<update id="savePosition" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
LATITUDE = #{LATITUDE},
|
||||
LONGITUDE = #{LONGITUDE}
|
||||
where
|
||||
DOOR_VIDEO_ID = #{DOOR_VIDEO_ID}
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 校验名称是否重复 -->
|
||||
<select id="findByOnly" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.ISDELETE = '0'
|
||||
AND f.PLATFORMVIDEOMANAGEMENT_ID = #{PLATFORMVIDEOMANAGEMENT_ID}
|
||||
AND f.DOOR_ID = #{DOOR_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="getRelevanceDoor" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.DOOR_NAME,
|
||||
f.STATUS,
|
||||
v.DOOR_VIDEO_ID
|
||||
from mkmj_door f
|
||||
left join mkmj_door_video v on v.DOOR_ID = f.DOOR_ID
|
||||
where v.ISDELETE = '0'
|
||||
and v.PLATFORMVIDEOMANAGEMENT_ID = #{VIDEO_ID}
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,244 @@
|
|||
<?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="com.zcloud.mapper.dsno2.door.MkmjPathMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
MKMJ_PATH
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.PATH_ID,
|
||||
f.DOOR_ID,
|
||||
f.PATH_NAME,
|
||||
f.PATH_TYPE,
|
||||
f.STATUS,
|
||||
f.CORPINFO_ID,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
PATH_ID,
|
||||
DOOR_ID,
|
||||
PATH_NAME,
|
||||
PATH_TYPE,
|
||||
STATUS,
|
||||
CORPINFO_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{PATH_ID},
|
||||
#{DOOR_ID},
|
||||
#{PATH_NAME},
|
||||
#{PATH_TYPE},
|
||||
#{STATUS},
|
||||
#{CORPINFO_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
PATH_ID = #{PATH_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
DOOR_ID = #{DOOR_ID},
|
||||
PATH_NAME = #{PATH_NAME},
|
||||
PATH_TYPE = #{PATH_TYPE},
|
||||
STATUS = #{STATUS},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
CREATOR = #{CREATOR},
|
||||
CREATTIME = #{CREATTIME},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
ISDELETE = #{ISDELETE}
|
||||
where
|
||||
PATH_ID=#{PATH_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.PATH_ID=#{PATH_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
COUNT(DISTINCT d.DEVICE_ID) DEVICECOUNT
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN mkmj_device d ON d.PATH_ID = f.PATH_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
f.PATH_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="pd.DOOR_ID != null and pd.DOOR_ID != ''"><!-- 关键词检索 -->
|
||||
and f.DOOR_ID = #{pd.DOOR_ID}
|
||||
</if>
|
||||
GROUP BY f.PATH_ID
|
||||
ORDER BY f.CREATTIME DESC
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
MKMJ_AREA f
|
||||
LEFT JOIN
|
||||
MKMJ_RELATION r ON r.AREA_ID = f.AREA_ID
|
||||
WHERE
|
||||
f.ISDELETE = '0' and r.ISDELETE = '0'
|
||||
<if test="AREA_ID!='' and AREA_ID != null">
|
||||
and f.AREA_ID = #{AREA_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(人闸机记录) -->
|
||||
<select id="getPeopleInfolistPage" parameterType="page" resultType="pd">
|
||||
SELECT
|
||||
p.personName NAME,
|
||||
( CASE WHEN p.devName LIKE CONCAT( CONCAT( '%', '入' ), '%' ) THEN '进' WHEN p.devName LIKE CONCAT( CONCAT( '%', '出' ), '%' ) THEN '出' END ) STATUS,
|
||||
p.eventTime TIME,
|
||||
p.readerDevName BAYNAME,
|
||||
p.devName DOORNAME
|
||||
FROM
|
||||
mkmj_door f
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
GROUP_CONCAT( d.DEVICE_NAME SEPARATOR ',' ) devNames,
|
||||
f.DOOR_ID
|
||||
FROM
|
||||
mkmj_device f
|
||||
LEFT JOIN mkmj_dock_device d ON f.DOCK_DEVICE_ID = d.DOCK_DEVICE_ID
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
GROUP BY
|
||||
f.DOOR_ID) d ON d.DOOR_ID = f.DOOR_ID
|
||||
LEFT JOIN mk_gate_person_machine_info p ON FIND_IN_SET(p.devName,d.devNames)
|
||||
WHERE p.ISDELETE = '0' AND f.DOOR_ID = #{pd.DOOR_ID}
|
||||
GROUP BY p.MACHINE_INFO_ID
|
||||
ORDER BY p.eventTime desc
|
||||
</select>
|
||||
|
||||
<!-- 列表(车闸机记录) -->
|
||||
<select id="getCarInfolistPage" parameterType="page" resultType="pd">
|
||||
SELECT
|
||||
c.PLATENO NAME,
|
||||
( CASE WHEN c.ROADWAYNAME LIKE CONCAT( CONCAT( '%', '入' ), '%' ) THEN '进' WHEN c.ROADWAYNAME LIKE CONCAT( CONCAT( '%', '出' ), '%' ) THEN '出' END ) STATUS,
|
||||
DATE_FORMAT(c.CROSSTIME, '%Y-%m-%d %H:%i:%s') TIME,
|
||||
c.ENTRANCENAME BAYNAME,
|
||||
c.ROADWAYNAME DOORNAME
|
||||
FROM
|
||||
mkmj_door f
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
GROUP_CONCAT( d.DEVICE_NAME SEPARATOR ',' ) devNames,
|
||||
f.DOOR_ID
|
||||
FROM
|
||||
mkmj_device f
|
||||
LEFT JOIN mkmj_dock_device d ON f.DOCK_DEVICE_ID = d.DOCK_DEVICE_ID
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
GROUP BY
|
||||
f.DOOR_ID
|
||||
) d ON d.DOOR_ID = f.DOOR_ID
|
||||
LEFT JOIN mk_gate_car_machine_info c ON FIND_IN_SET( c.ROADWAYNAME, d.devNames )
|
||||
WHERE
|
||||
c.ISDELETE = '0'
|
||||
AND
|
||||
f.DOOR_ID = #{pd.DOOR_ID}
|
||||
GROUP BY
|
||||
c.CAR_MACHINE_INFO_ID
|
||||
ORDER BY
|
||||
TIME DESC
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
PATH_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 校验名称是否重复 -->
|
||||
<select id="findByOnly" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.ISDELETE = '0'
|
||||
AND f.PATH_NAME = #{PATH_NAME}
|
||||
<if test="PATH_ID!='' and PATH_ID != null">
|
||||
and f.PATH_ID != #{PATH_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 定位 -->
|
||||
<update id="savePosition" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
LATITUDE = #{LATITUDE},
|
||||
LONGITUDE = #{LONGITUDE}
|
||||
where
|
||||
PATH_ID = #{PATH_ID}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,325 @@
|
|||
<?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="com.zcloud.mapper.dsno2.door.MkmjRelationMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
MKMJ_RELATION
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.RELATION_ID,
|
||||
f.AREA_ID,
|
||||
f.DEVICE_ID,
|
||||
f.TYPE,
|
||||
f.CORPINFO_ID,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
RELATION_ID,
|
||||
AREA_ID,
|
||||
DEVICE_ID,
|
||||
TYPE,
|
||||
CORPINFO_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{RELATION_ID},
|
||||
#{AREA_ID},
|
||||
#{DEVICE_ID},
|
||||
#{TYPE},
|
||||
#{CORPINFO_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
RELATION_ID = #{RELATION_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
RELATION_ID = RELATION_ID,
|
||||
AREA_ID = #{AREA_ID},
|
||||
DEVICE_ID = #{DEVICE_ID},
|
||||
TYPE = #{TYPE},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
CREATOR = #{CREATOR},
|
||||
CREATTIME = #{CREATTIME},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
ISDELETE = #{ISDELETE}
|
||||
where
|
||||
RELATION_ID=#{RELATION_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.RELATION_ID=#{RELATION_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.AREA_ID != null and pd.AREA_ID != ''"><!-- 关键词检索 -->
|
||||
and f.AREA_ID=#{AREA_ID}
|
||||
</if>
|
||||
ORDER BY f.CREATTIME DESC
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="AREA_ID!='' and AREA_ID != null">
|
||||
and f.AREA_ID = #{AREA_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAllForArea" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="getCarAndPeopleInfolistPage" parameterType="page" resultType="pd">
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
i.personName NAME,
|
||||
(CASE WHEN r.TYPE = '0' THEN '入口' ELSE '出口' END) STATUS,
|
||||
DATE_FORMAT(i.eventTime,'%Y-%m-%d %H:%i:%s') TIME,
|
||||
i.readerDevName BAYNAME,
|
||||
i.devName DOORNAME,
|
||||
'person' AS TYPE
|
||||
FROM
|
||||
mkmj_area f
|
||||
LEFT JOIN mkmj_relation r ON f.AREA_ID = r.AREA_ID AND r.ISDELETE = '0'
|
||||
LEFT JOIN mkmj_device d ON r.DEVICE_ID = d.DEVICE_ID AND d.ISDELETE = '0'
|
||||
LEFT JOIN mkmj_dock_device de ON d.DOCK_DEVICE_ID = de.DOCK_DEVICE_ID AND de.ISDELETE = '0'
|
||||
LEFT JOIN mk_gate_person_machine_info i ON i.devName = de.DEVICE_NAME AND i.ISDELETE = '0'
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND
|
||||
f.AREA_ID = #{pd.AREA_ID}
|
||||
AND
|
||||
i.MACHINE_INFO_ID IS NOT NULL
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
i.personName LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
GROUP BY i.MACHINE_INFO_ID UNION ALL
|
||||
SELECT
|
||||
i.PLATENO NAME,
|
||||
(CASE WHEN r.TYPE = '0' THEN '入口' ELSE '出口' END) STATUS,
|
||||
DATE_FORMAT(i.CROSSTIME,'%Y-%m-%d %H:%i:%s') TIME,
|
||||
ENTRANCENAME BAYNAME,
|
||||
ROADWAYNAME DOORNAME,
|
||||
'car' AS TYPE
|
||||
FROM
|
||||
mkmj_area f
|
||||
LEFT JOIN mkmj_relation r ON f.AREA_ID = r.AREA_ID AND r.ISDELETE = '0'
|
||||
LEFT JOIN mkmj_device d ON r.DEVICE_ID = d.DEVICE_ID AND d.ISDELETE = '0'
|
||||
LEFT JOIN mkmj_dock_device de ON d.DOCK_DEVICE_ID = de.DOCK_DEVICE_ID AND de.ISDELETE = '0'
|
||||
LEFT JOIN mk_gate_car_machine_info i ON i.ROADWAYNAME = de.DEVICE_NAME AND i.ISDELETE = '0'
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND
|
||||
f.AREA_ID = #{pd.AREA_ID}
|
||||
AND
|
||||
i.CAR_MACHINE_INFO_ID IS NOT NULL
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
i.PLATENO LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
GROUP BY i.CAR_MACHINE_INFO_ID
|
||||
) info
|
||||
ORDER BY DATE_FORMAT(TIME,'%Y-%m-%d %H:%i:%s') DESC
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="getAllCarAndPeopleInfoCountByArea" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
AREA_ID,
|
||||
AREA_NAME,
|
||||
count( CASE WHEN TYPE = 'person' AND STATUS = '入口' AND NAME IS NOT NULL THEN '1' END ) INPERSONCOUNT,
|
||||
count( CASE WHEN TYPE = 'person' AND STATUS = '出口' AND NAME IS NOT NULL THEN '1' END ) OUTPERSONCOUNT,
|
||||
count( CASE WHEN TYPE = 'car' AND STATUS = '入口' AND NAME IS NOT NULL THEN '1' END ) INCARCOUNT,
|
||||
count( CASE WHEN TYPE = 'car' AND STATUS = '出口' AND NAME IS NOT NULL THEN '1' END ) OUTCARCOUNT,
|
||||
TYPE
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
f.AREA_ID,
|
||||
f.AREA_NAME,
|
||||
i.personName NAME,
|
||||
( CASE WHEN r.TYPE = '0' THEN '入口' ELSE '出口' END ) STATUS,
|
||||
DATE_FORMAT( i.eventTime, '%Y-%m-%d %H:%i:%s' ) TIME,
|
||||
i.readerDevName BAYNAME,
|
||||
i.devName DOORNAME,
|
||||
'person' AS TYPE
|
||||
FROM
|
||||
mkmj_area f
|
||||
LEFT JOIN mkmj_relation r ON f.AREA_ID = r.AREA_ID
|
||||
AND r.ISDELETE = '0'
|
||||
LEFT JOIN mkmj_device d ON r.DEVICE_ID = d.DEVICE_ID
|
||||
AND d.ISDELETE = '0'
|
||||
LEFT JOIN mkmj_dock_device de ON d.DOCK_DEVICE_ID = de.DOCK_DEVICE_ID
|
||||
AND de.ISDELETE = '0'
|
||||
LEFT JOIN mk_gate_person_machine_info i ON i.devName = de.DEVICE_NAME
|
||||
AND i.ISDELETE = '0' AND i.eventTime > DATE_FORMAT( NOW( ), '%Y-%m-%d' )
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
and f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
GROUP BY
|
||||
f.AREA_ID,
|
||||
i.MACHINE_INFO_ID UNION ALL
|
||||
SELECT
|
||||
f.AREA_ID,
|
||||
f.AREA_NAME,
|
||||
i.PLATENO NAME,
|
||||
( CASE WHEN r.TYPE = '0' THEN '入口' ELSE '出口' END ) STATUS,
|
||||
DATE_FORMAT( i.CROSSTIME, '%Y-%m-%d %H:%i:%s' ) TIME,
|
||||
ENTRANCENAME BAYNAME,
|
||||
ROADWAYNAME DOORNAME,
|
||||
'car' AS TYPE
|
||||
FROM
|
||||
mkmj_area f
|
||||
LEFT JOIN mkmj_relation r ON f.AREA_ID = r.AREA_ID
|
||||
AND r.ISDELETE = '0'
|
||||
LEFT JOIN mkmj_device d ON r.DEVICE_ID = d.DEVICE_ID
|
||||
AND d.ISDELETE = '0'
|
||||
LEFT JOIN mkmj_dock_device de ON d.DOCK_DEVICE_ID = de.DOCK_DEVICE_ID
|
||||
AND de.ISDELETE = '0'
|
||||
LEFT JOIN mk_gate_car_machine_info i ON i.ROADWAYNAME = de.DEVICE_NAME
|
||||
AND i.ISDELETE = '0' AND i.CROSSTIME > DATE_FORMAT( NOW( ), '%Y-%m-%d' )
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
and f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
GROUP BY
|
||||
f.AREA_ID,
|
||||
i.CAR_MACHINE_INFO_ID
|
||||
) info
|
||||
GROUP BY
|
||||
AREA_ID,
|
||||
TYPE
|
||||
ORDER BY
|
||||
AREA_NAME, TYPE
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
DEVICE_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="findPersonRecord" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
i.personName NAME,
|
||||
(CASE WHEN r.TYPE = '0' THEN '入' ELSE '出' END) STATUS,
|
||||
DATE_FORMAT(i.eventTime,'%Y-%m-%d %H:%i:%s') TIME,
|
||||
i.readerDevName BAYNAME,
|
||||
i.devName DOORNAME
|
||||
FROM
|
||||
mkmj_area f
|
||||
LEFT JOIN mkmj_relation r ON f.AREA_ID = r.AREA_ID AND r.ISDELETE = '0'
|
||||
LEFT JOIN mkmj_device d ON r.DEVICE_ID = d.DEVICE_ID AND d.ISDELETE = '0'
|
||||
LEFT JOIN mkmj_dock_device de ON d.DOCK_DEVICE_ID = de.DOCK_DEVICE_ID AND de.ISDELETE = '0'
|
||||
LEFT JOIN mk_gate_person_machine_info i ON i.devName = de.DEVICE_NAME AND i.ISDELETE = '0'
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND
|
||||
f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
AND
|
||||
i.MACHINE_INFO_ID IS NOT NULL
|
||||
ORDER BY DATE_FORMAT(i.eventTime,'%Y-%m-%d %H:%i:%s') DESC
|
||||
</select>
|
||||
|
||||
<select id="findCarRecord" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
ifnull(i.PLATENO,i.CARDNO) NAME,
|
||||
(CASE WHEN r.TYPE = '0' THEN '入' ELSE '出' END) STATUS,
|
||||
DATE_FORMAT(i.CROSSTIME,'%Y-%m-%d %H:%i:%s') TIME,
|
||||
ENTRANCENAME BAYNAME,
|
||||
ROADWAYNAME DOORNAME
|
||||
FROM
|
||||
mkmj_area f
|
||||
LEFT JOIN mkmj_relation r ON f.AREA_ID = r.AREA_ID AND r.ISDELETE = '0'
|
||||
LEFT JOIN mkmj_device d ON r.DEVICE_ID = d.DEVICE_ID AND d.ISDELETE = '0'
|
||||
LEFT JOIN mkmj_dock_device de ON d.DOCK_DEVICE_ID = de.DOCK_DEVICE_ID AND de.ISDELETE = '0'
|
||||
LEFT JOIN mk_gate_car_machine_info i ON i.ROADWAYNAME = de.DEVICE_NAME AND i.ISDELETE = '0'
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
AND
|
||||
f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
ORDER BY DATE_FORMAT(TIME,'%Y-%m-%d %H:%i:%s') DESC
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,236 @@
|
|||
<?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="com.zcloud.mapper.dsno2.door.PlatformDoorVideoMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_PLATFORM_DOOR_VIDEO
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.CORPINFO_ID,
|
||||
f.INDEXCODE,
|
||||
f.REGIONINDEXCODE,
|
||||
f.EXTERNALINDEXCODE,
|
||||
f.NAME,
|
||||
f.LONGITUDE,
|
||||
f.LATITUDE,
|
||||
f.CAMERATYPE,
|
||||
f.CASCADECODE,
|
||||
f.DECODETAG,
|
||||
f.RESOURCETYPE,
|
||||
f.CREATETIME,
|
||||
f.UPDATETIME,
|
||||
f.SORT,
|
||||
f.DISORDER,
|
||||
f.RECORDLOCATION,
|
||||
f.CASCADETYPE,
|
||||
f.REGIONNAME,
|
||||
f.REGIONPATH,
|
||||
f.REGIONPATHNAME,
|
||||
f.PLATFORMDOORVIDEO_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
CORPINFO_ID,
|
||||
INDEXCODE,
|
||||
REGIONINDEXCODE,
|
||||
EXTERNALINDEXCODE,
|
||||
NAME,
|
||||
LONGITUDE,
|
||||
LATITUDE,
|
||||
CAMERATYPE,
|
||||
CASCADECODE,
|
||||
DECODETAG,
|
||||
RESOURCETYPE,
|
||||
CREATETIME,
|
||||
UPDATETIME,
|
||||
SORT,
|
||||
DISORDER,
|
||||
RECORDLOCATION,
|
||||
CASCADETYPE,
|
||||
REGIONNAME,
|
||||
REGIONPATH,
|
||||
REGIONPATHNAME,
|
||||
PLATFORMDOORVIDEO_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{CORPINFO_ID},
|
||||
#{INDEXCODE},
|
||||
#{REGIONINDEXCODE},
|
||||
#{EXTERNALINDEXCODE},
|
||||
#{NAME},
|
||||
#{LONGITUDE},
|
||||
#{LATITUDE},
|
||||
#{CAMERATYPE},
|
||||
#{CASCADECODE},
|
||||
#{DECODETAG},
|
||||
#{RESOURCETYPE},
|
||||
#{CREATETIME},
|
||||
#{UPDATETIME},
|
||||
#{SORT},
|
||||
#{DISORDER},
|
||||
#{RECORDLOCATION},
|
||||
#{CASCADETYPE},
|
||||
#{REGIONNAME},
|
||||
#{REGIONPATH},
|
||||
#{REGIONPATHNAME},
|
||||
#{PLATFORMDOORVIDEO_ID}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
PLATFORMDOORVIDEO_ID = #{PLATFORMDOORVIDEO_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
INDEXCODE = #{INDEXCODE},
|
||||
REGIONINDEXCODE = #{REGIONINDEXCODE},
|
||||
EXTERNALINDEXCODE = #{EXTERNALINDEXCODE},
|
||||
NAME = #{NAME},
|
||||
LONGITUDE = #{LONGITUDE},
|
||||
LATITUDE = #{LATITUDE},
|
||||
CAMERATYPE = #{CAMERATYPE},
|
||||
CASCADECODE = #{CASCADECODE},
|
||||
DECODETAG = #{DECODETAG},
|
||||
RESOURCETYPE = #{RESOURCETYPE},
|
||||
CREATETIME = #{CREATETIME},
|
||||
UPDATETIME = #{UPDATETIME},
|
||||
SORT = #{SORT},
|
||||
DISORDER = #{DISORDER},
|
||||
RECORDLOCATION = #{RECORDLOCATION},
|
||||
CASCADETYPE = #{CASCADETYPE},
|
||||
REGIONNAME = #{REGIONNAME},
|
||||
REGIONPATH = #{REGIONPATH},
|
||||
REGIONPATHNAME = #{REGIONPATHNAME},
|
||||
PLATFORMDOORVIDEO_ID = PLATFORMDOORVIDEO_ID
|
||||
where
|
||||
PLATFORMDOORVIDEO_ID = #{PLATFORMDOORVIDEO_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.PLATFORMDOORVIDEO_ID = #{PLATFORMDOORVIDEO_ID}
|
||||
</select>
|
||||
|
||||
<select id="findByCode" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.INDEXCODE = #{INDEXCODE}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where 1=1
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
f.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="listByPositionlistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where 1=1
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
f.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="pd.LONGITUDE != null and pd.LONGITUDE != ''"><!-- 关键词检索 -->
|
||||
and CONVERT(#{pd.LONGITUDEONE}, DECIMAL ( 9, 5 )) > CONVERT(f.LONGITUDE, DECIMAL ( 9, 5 ))
|
||||
and CONVERT(f.LONGITUDE, DECIMAL ( 9, 5 )) > CONVERT(#{pd.LONGITUDETWO}, DECIMAL ( 9, 5 ))
|
||||
and CONVERT(#{pd.LATITUDEONE}, DECIMAL ( 9, 5 )) > CONVERT(f.LATITUDE, DECIMAL ( 9, 5 ))
|
||||
and CONVERT(f.LATITUDE, DECIMAL ( 9, 5 )) > CONVERT(#{pd.LATITUDETWO}, DECIMAL ( 9, 5 ))
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,PLATFORMDOORVIDEO_ID as id
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where 1=1
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
PLATFORMDOORVIDEO_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- 清空坐标 -->
|
||||
<update id="delLocation" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
LONGITUDE = null,
|
||||
LATITUDE = null,
|
||||
CORPINFO_ID = null
|
||||
where
|
||||
PLATFORMDOORVIDEO_ID = #{PLATFORMDOORVIDEO_ID}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue