兴安优化提交
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package com.dcsoft.system.controller;
|
package com.dcsoft.system.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.http.HttpResponse;
|
import cn.hutool.http.HttpResponse;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
@@ -39,10 +41,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
@@ -140,7 +139,11 @@ public class SysPeopleController extends BaseController
|
|||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
{
|
{
|
||||||
return success(sysPeopleService.selectSysPeopleById(id));
|
SysPeople sysPeople = sysPeopleService.selectSysPeopleById(id);
|
||||||
|
if (StrUtil.isNotBlank(sysPeople.getCarryStuffExamine())) {
|
||||||
|
sysPeople.setCarryStuffExamineList(Arrays.asList(sysPeople.getCarryStuffExamine().split(",")));
|
||||||
|
}
|
||||||
|
return success(sysPeople);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -292,6 +295,9 @@ public class SysPeopleController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CollUtil.isNotEmpty(sysPeople.getCarryStuffExamineList())) {
|
||||||
|
sysPeople.setCarryStuffExamine(String.join(",", sysPeople.getCarryStuffExamineList()));
|
||||||
|
}
|
||||||
i=sysPeopleService.insertSysPeople(sysPeople);
|
i=sysPeopleService.insertSysPeople(sysPeople);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -471,6 +477,9 @@ public class SysPeopleController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CollUtil.isNotEmpty(sysPeople.getCarryStuffExamineList())) {
|
||||||
|
sysPeople.setCarryStuffExamine(String.join(",", sysPeople.getCarryStuffExamineList()));
|
||||||
|
}
|
||||||
return toAjax(sysPeopleService.updateSysPeople(sysPeople));
|
return toAjax(sysPeopleService.updateSysPeople(sysPeople));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
|
|||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人员管理对象 sys_people
|
* 人员管理对象 sys_people
|
||||||
@@ -124,6 +125,19 @@ public class SysPeople extends BaseEntity
|
|||||||
*/
|
*/
|
||||||
private String carryStuffExamine;
|
private String carryStuffExamine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 携物出门审核人员,1:一级审核人2:二级审核人3:三级审核人
|
||||||
|
*/
|
||||||
|
private List<String> carryStuffExamineList;
|
||||||
|
|
||||||
|
public List<String> getCarryStuffExamineList() {
|
||||||
|
return carryStuffExamineList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCarryStuffExamineList(List<String> carryStuffExamineList) {
|
||||||
|
this.carryStuffExamineList = carryStuffExamineList;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCarryStuffExamine() {
|
public String getCarryStuffExamine() {
|
||||||
return carryStuffExamine;
|
return carryStuffExamine;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ import javax.annotation.Resource;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -236,7 +235,7 @@ public class VisCarryStuffController extends BaseController {
|
|||||||
|
|
||||||
//发送企微信息
|
//发送企微信息
|
||||||
try {
|
try {
|
||||||
// visitorController.sendWeCom(people.getPhone(), url + " --访客姓名:" + vo.getName());
|
visitorController.sendWeCom(people.getPhone(), url + " --访客姓名:" + vo.getName());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("出门证申请add-sendWeCom异常:", e);
|
log.error("出门证申请add-sendWeCom异常:", e);
|
||||||
throw new ServiceException("系统异常,请重新提交或联系管理员!");
|
throw new ServiceException("系统异常,请重新提交或联系管理员!");
|
||||||
@@ -333,7 +332,7 @@ public class VisCarryStuffController extends BaseController {
|
|||||||
|
|
||||||
// 保存审核二维码地址信息
|
// 保存审核二维码地址信息
|
||||||
CheckCodeVo codeVo = new CheckCodeVo();
|
CheckCodeVo codeVo = new CheckCodeVo();
|
||||||
codeVo.setCode(vo.getId() + "&time=" + new Date().getTime());
|
codeVo.setCode(String.valueOf(vo.getId()));
|
||||||
codeVo.setExitId(String.valueOf(vo.getId()));
|
codeVo.setExitId(String.valueOf(vo.getId()));
|
||||||
codeVo.setId(UUID.randomUUID().toString().replace("-", ""));
|
codeVo.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||||
visitorService.saveVisCheckCode(codeVo);
|
visitorService.saveVisCheckCode(codeVo);
|
||||||
@@ -350,7 +349,7 @@ public class VisCarryStuffController extends BaseController {
|
|||||||
|
|
||||||
//发送企微信息
|
//发送企微信息
|
||||||
try {
|
try {
|
||||||
// visitorController.sendWeCom(people.getPhone(), url + " --访客姓名:" + vo.getName());
|
visitorController.sendWeCom(people.getPhone(), url + " --访客姓名:" + vo.getName());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("出门证申请add-sendWeCom异常:", e);
|
log.error("出门证申请add-sendWeCom异常:", e);
|
||||||
throw new ServiceException("系统异常,请重新审核或联系管理员!");
|
throw new ServiceException("系统异常,请重新审核或联系管理员!");
|
||||||
@@ -362,7 +361,7 @@ public class VisCarryStuffController extends BaseController {
|
|||||||
visVisitorExamineService.insertVisVisitorExamine(examine);
|
visVisitorExamineService.insertVisVisitorExamine(examine);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// visitorController.sendWeCom(telephone, vo.getName() + "的访客审核已驳回");
|
visitorController.sendWeCom(telephone, vo.getName() + "的访客审核已驳回");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("访客approve-sendWeCom驳回异常", e);
|
log.error("访客approve-sendWeCom驳回异常", e);
|
||||||
throw new ServiceException("系统异常,请重新审核或联系管理员!");
|
throw new ServiceException("系统异常,请重新审核或联系管理员!");
|
||||||
@@ -393,6 +392,10 @@ public class VisCarryStuffController extends BaseController {
|
|||||||
List<SysPeople> peopleList = sysPeopleService.selectSysPeopleLists(people);
|
List<SysPeople> peopleList = sysPeopleService.selectSysPeopleLists(people);
|
||||||
List<IdNamelVo> list = new ArrayList<>();
|
List<IdNamelVo> list = new ArrayList<>();
|
||||||
peopleList.forEach(item -> {
|
peopleList.forEach(item -> {
|
||||||
|
if (StrUtil.isNotBlank(item.getCarryStuffExamine())) {
|
||||||
|
item.setCarryStuffExamineList(Arrays.asList(item.getCarryStuffExamine().split(",")));
|
||||||
|
}
|
||||||
|
|
||||||
IdNamelVo vo = new IdNamelVo();
|
IdNamelVo vo = new IdNamelVo();
|
||||||
vo.setId(item.getId());
|
vo.setId(item.getId());
|
||||||
vo.setName(item.getName());
|
vo.setName(item.getName());
|
||||||
@@ -436,4 +439,18 @@ public class VisCarryStuffController extends BaseController {
|
|||||||
util.exportExcel(response, list, "出厂物资明细数据");
|
util.exportExcel(response, list, "出厂物资明细数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消出门证申请
|
||||||
|
*/
|
||||||
|
@Log(title = "取消出门证申请", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping("/cancel")
|
||||||
|
@Transactional
|
||||||
|
public AjaxResult cancel(@RequestBody VisExitOutVo vo) {
|
||||||
|
log.info("取消出门证申请 {}", JSON.toJSONString(vo));
|
||||||
|
//审核业务
|
||||||
|
visCarryStuffService.cancel(vo);
|
||||||
|
|
||||||
|
return toAjax(true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,25 @@ public class VisExitOutRecordController extends BaseController {
|
|||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扫码确认放行
|
||||||
|
*/
|
||||||
|
@Log(title = "扫码确认放行", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/confirmPass")
|
||||||
|
@Transactional
|
||||||
|
public AjaxResult confirmPass(@RequestBody VisExitOutRecordVo vo) {
|
||||||
|
log.info("扫码确认放行入参:{}", vo);
|
||||||
|
try {
|
||||||
|
//新增出门申请
|
||||||
|
visExitOutRecordService.confirmPass(vo);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("扫码确认放行异常:", e);
|
||||||
|
throw new ServiceException("系统异常");
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除出门证记录信息
|
* 删除出门证记录信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -416,12 +416,20 @@ public class VisitorController extends BaseController {
|
|||||||
//查询当前点击审核链接的人员信息
|
//查询当前点击审核链接的人员信息
|
||||||
SysPeople sysPeople = sysPeopleService.queryPeopleName(telephone, null);
|
SysPeople sysPeople = sysPeopleService.queryPeopleName(telephone, null);
|
||||||
|
|
||||||
//如果当前点击链接的审核人员级别小于流程处于的级别,展示已审核的结果
|
//查询审核节点,查看当前点击审核链接的人审核状态
|
||||||
if (StringUtils.isNotBlank(sysPeople.getCarryStuffExamine()) && Integer.parseInt(sysPeople.getCarryStuffExamine()) < stuffVo.getCurrentNode()) {
|
VisExitOutVo visExitOutVo = new VisExitOutVo();
|
||||||
VisitorReviewProcessVo processVo = visCarryStuffService.queryReviewProcessNew(stuffVo);
|
visExitOutVo.setId(id);
|
||||||
|
visExitOutVo.setReviewer(sysPeople.getId());
|
||||||
|
List<VisitorReviewProcessVo> list = visCarryStuffService.queryReviewProcessNew(visExitOutVo);
|
||||||
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
|
stuffVo.setExamineState(list.get(0).getState());
|
||||||
|
for (VisitorReviewProcessVo processVo : list) {
|
||||||
|
if (StringUtils.isBlank(processVo.getUpdatedTime())) {
|
||||||
stuffVo.setExamineState(processVo.getState());
|
stuffVo.setExamineState(processVo.getState());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return stuffVo;
|
return stuffVo;
|
||||||
}
|
}
|
||||||
@@ -1097,7 +1105,11 @@ public class VisitorController extends BaseController {
|
|||||||
}
|
}
|
||||||
log.info("approve-发同意短信:{}", JSON.toJSONString(phoneList));
|
log.info("approve-发同意短信:{}", JSON.toJSONString(phoneList));
|
||||||
for (String phone : phoneList) {
|
for (String phone : phoneList) {
|
||||||
|
try {
|
||||||
sendMessage(phone, "1", parkName, smsProperties.getTemplate2());
|
sendMessage(phone, "1", parkName, smsProperties.getTemplate2());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1119,7 +1131,11 @@ public class VisitorController extends BaseController {
|
|||||||
// 申请人发送短信(审核不通过)
|
// 申请人发送短信(审核不通过)
|
||||||
|
|
||||||
log.info("approve-发拒绝短信:{}", visitor.getPhone());
|
log.info("approve-发拒绝短信:{}", visitor.getPhone());
|
||||||
|
try {
|
||||||
sendMessage(visitor.getPhone(), "1", parkName, smsProperties.getTemplate3());
|
sendMessage(visitor.getPhone(), "1", parkName, smsProperties.getTemplate3());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
visitorService.approve(visitor);
|
visitorService.approve(visitor);
|
||||||
@@ -1238,7 +1254,11 @@ public class VisitorController extends BaseController {
|
|||||||
visitor2.setReviewer3(visitor.getReviewer3());
|
visitor2.setReviewer3(visitor.getReviewer3());
|
||||||
visitorService.updateVisitor(visitor2);
|
visitorService.updateVisitor(visitor2);
|
||||||
if(Constants.ONE.equals(examine.getExamine())) {
|
if(Constants.ONE.equals(examine.getExamine())) {
|
||||||
|
try {
|
||||||
sendMessage(visitor.getPhone(), "1", null, smsProperties.getTemplate8());
|
sendMessage(visitor.getPhone(), "1", null, smsProperties.getTemplate8());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
|
}
|
||||||
visitor.setState(examine.getExamine());
|
visitor.setState(examine.getExamine());
|
||||||
visitorService.updateVisitorReviewProcess(visitor);
|
visitorService.updateVisitorReviewProcess(visitor);
|
||||||
|
|
||||||
@@ -1309,7 +1329,11 @@ public class VisitorController extends BaseController {
|
|||||||
visitorService.updateVisitorReviewProcess(visitor2);
|
visitorService.updateVisitorReviewProcess(visitor2);
|
||||||
// 审核通知企微发送消息(小程序来源)
|
// 审核通知企微发送消息(小程序来源)
|
||||||
sendWeCom(officialAccountVo.getPhone(), visitor.getName() + "的访客审核被拒绝");
|
sendWeCom(officialAccountVo.getPhone(), visitor.getName() + "的访客审核被拒绝");
|
||||||
|
try {
|
||||||
sendMessage(visitor.getPhone(), "1", null, smsProperties.getTemplate8());
|
sendMessage(visitor.getPhone(), "1", null, smsProperties.getTemplate8());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
|
}
|
||||||
Visitor visitor3 = new Visitor();
|
Visitor visitor3 = new Visitor();
|
||||||
if("1".equals(examine.getExamine())) {
|
if("1".equals(examine.getExamine())) {
|
||||||
visitor3.setOutTime(new Date());
|
visitor3.setOutTime(new Date());
|
||||||
@@ -1368,21 +1392,31 @@ public class VisitorController extends BaseController {
|
|||||||
// 申请人发送短信(审核通过)
|
// 申请人发送短信(审核通过)
|
||||||
String appletLink = getAppletLink(String.valueOf(visitor.getId()), "pagesC/visExamineEwm/index");
|
String appletLink = getAppletLink(String.valueOf(visitor.getId()), "pagesC/visExamineEwm/index");
|
||||||
String[] split = appletLink.split("wxaurl.cn/");
|
String[] split = appletLink.split("wxaurl.cn/");
|
||||||
|
try {
|
||||||
sendMessage(visitor.getPhone(), split[1], null, smsProperties.getTemplate5());
|
sendMessage(visitor.getPhone(), split[1], null, smsProperties.getTemplate5());
|
||||||
|
|
||||||
redisService.setCacheObject(CacheConstants.WEIXIN_URL_LINK + visitor.getPhone(), appletLink, 24L, TimeUnit.HOURS);
|
redisService.setCacheObject(CacheConstants.WEIXIN_URL_LINK + visitor.getPhone(), appletLink, 24L, TimeUnit.HOURS);
|
||||||
|
|
||||||
// 被访人发送短信(审核通过)
|
// 被访人发送短信(审核通过)
|
||||||
sendMessage(officialAccountVo.getPhone(), visitor.getName() + "访问" + officialAccountVo.getName(), null, smsProperties.getTemplate9());
|
sendMessage(officialAccountVo.getPhone(), visitor.getName() + "访问" + officialAccountVo.getName(), null, smsProperties.getTemplate9());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if("1".equals(examine.getExamine())) {
|
if("1".equals(examine.getExamine())) {
|
||||||
// 申请人发送短信(审核不通过)
|
// 申请人发送短信(审核不通过)
|
||||||
SysPeople people1 = sysPeopleService.selectSysPeopleById(visitor.getUserId());
|
SysPeople people1 = sysPeopleService.selectSysPeopleById(visitor.getUserId());
|
||||||
sendWeCom(people1.getPhone(), visitor.getName() + "的访客审核被拒绝");
|
sendWeCom(people1.getPhone(), visitor.getName() + "的访客审核被拒绝");
|
||||||
|
try {
|
||||||
sendMessage(visitor.getPhone(), "1", null, smsProperties.getTemplate8());
|
sendMessage(visitor.getPhone(), "1", null, smsProperties.getTemplate8());
|
||||||
|
|
||||||
// 被访人发送短信(审核不通过)
|
// 被访人发送短信(审核不通过)
|
||||||
sendMessage(officialAccountVo.getPhone(), visitor.getName() + "访问" + officialAccountVo.getName(), null, smsProperties.getTemplate10());
|
sendMessage(officialAccountVo.getPhone(), visitor.getName() + "访问" + officialAccountVo.getName(), null, smsProperties.getTemplate10());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
visitor.setState(examine.getExamine());
|
visitor.setState(examine.getExamine());
|
||||||
@@ -1475,6 +1509,21 @@ public class VisitorController extends BaseController {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取消访问申请
|
||||||
|
*/
|
||||||
|
@Log(title = "取消访问申请", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping("/cancel")
|
||||||
|
@Transactional
|
||||||
|
public AjaxResult cancel(@RequestBody Visitor visitor) {
|
||||||
|
log.info("取消访问申请入参 {}", JSON.toJSONString(visitor));
|
||||||
|
//审核业务
|
||||||
|
visitorService.cancel(visitor);
|
||||||
|
|
||||||
|
return toAjax(true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 访客签到签退
|
* 访客签到签退
|
||||||
*/
|
*/
|
||||||
@@ -1593,7 +1642,8 @@ public class VisitorController extends BaseController {
|
|||||||
String code = js.getString("code");
|
String code = js.getString("code");
|
||||||
String template = js.getString("template");
|
String template = js.getString("template");
|
||||||
String parkName = js.getString("parkName");
|
String parkName = js.getString("parkName");
|
||||||
return sendMessage("15155304840", code, parkName, template);
|
String phone = js.getString("phone");
|
||||||
|
return sendMessage(phone, code, parkName, template);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -38,6 +38,11 @@ public class VisitorReviewProcessVo {
|
|||||||
*/
|
*/
|
||||||
private String createdTime;
|
private String createdTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String updatedTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出门申请表id
|
* 出门申请表id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public interface VisCarryStuffMapper {
|
|||||||
|
|
||||||
void saveVisitorReviewProcess(VisExitOutVo vo);
|
void saveVisitorReviewProcess(VisExitOutVo vo);
|
||||||
|
|
||||||
VisitorReviewProcessVo queryReviewProcessNew(VisExitOutVo stuffVo);
|
List<VisitorReviewProcessVo> queryReviewProcessNew(VisExitOutVo stuffVo);
|
||||||
|
|
||||||
void insertVisStuffInfo(@Param("list") List<VisStuffInfoVo> visStuffInfoList);
|
void insertVisStuffInfo(@Param("list") List<VisStuffInfoVo> visStuffInfoList);
|
||||||
|
|
||||||
@@ -34,4 +34,6 @@ public interface VisCarryStuffMapper {
|
|||||||
VisitorReviewProcessVo selectVisitorReviewProcessOne(VisitorReviewProcessVo reviewProcessVo);
|
VisitorReviewProcessVo selectVisitorReviewProcessOne(VisitorReviewProcessVo reviewProcessVo);
|
||||||
|
|
||||||
void updateVisitorReviewProcessById(VisitorReviewProcessVo reviewProcess);
|
void updateVisitorReviewProcessById(VisitorReviewProcessVo reviewProcess);
|
||||||
|
|
||||||
|
void deleteVisitorReviewProcess(Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -251,4 +251,6 @@ public interface VisitorMapper
|
|||||||
int queryVisitorByIdCountOld(String phone);
|
int queryVisitorByIdCountOld(String phone);
|
||||||
|
|
||||||
String queryReviewProcessOld(Visitor visitor);
|
String queryReviewProcessOld(Visitor visitor);
|
||||||
|
|
||||||
|
void deleteVisitorReviewProcess(@Param("id") Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public interface IVisCarryStuffService {
|
|||||||
|
|
||||||
void saveVisitorReviewProcess(VisExitOutVo vo);
|
void saveVisitorReviewProcess(VisExitOutVo vo);
|
||||||
|
|
||||||
VisitorReviewProcessVo queryReviewProcessNew(VisExitOutVo stuffVo);
|
List<VisitorReviewProcessVo> queryReviewProcessNew(VisExitOutVo stuffVo);
|
||||||
|
|
||||||
void insertVisStuffInfo(List<VisStuffInfoVo> visStuffInfoList);
|
void insertVisStuffInfo(List<VisStuffInfoVo> visStuffInfoList);
|
||||||
|
|
||||||
@@ -33,4 +33,6 @@ public interface IVisCarryStuffService {
|
|||||||
VisitorReviewProcessVo selectVisitorReviewProcessOne(VisitorReviewProcessVo reviewProcessVo);
|
VisitorReviewProcessVo selectVisitorReviewProcessOne(VisitorReviewProcessVo reviewProcessVo);
|
||||||
|
|
||||||
void updateVisitorReviewProcessById(VisitorReviewProcessVo reviewProcess);
|
void updateVisitorReviewProcessById(VisitorReviewProcessVo reviewProcess);
|
||||||
|
|
||||||
|
void cancel(VisExitOutVo vo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,4 +13,6 @@ public interface IVisExitOutRecordService {
|
|||||||
void insertExitOutRecord(VisExitOutRecordVo vo);
|
void insertExitOutRecord(VisExitOutRecordVo vo);
|
||||||
|
|
||||||
void delete(Long[] ids);
|
void delete(Long[] ids);
|
||||||
|
|
||||||
|
void confirmPass(VisExitOutRecordVo vo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,4 +263,6 @@ public interface IVisitorService
|
|||||||
int queryVisitorByIdCountOld(String phone);
|
int queryVisitorByIdCountOld(String phone);
|
||||||
|
|
||||||
String queryReviewProcessOld(Visitor visitor);
|
String queryReviewProcessOld(Visitor visitor);
|
||||||
|
|
||||||
|
void cancel(Visitor visitor);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.dcsoft.system.visitor.service.impl;
|
|||||||
|
|
||||||
import com.dcsoft.common.core.constant.Constants;
|
import com.dcsoft.common.core.constant.Constants;
|
||||||
import com.dcsoft.common.core.enums.ExamineEnum;
|
import com.dcsoft.common.core.enums.ExamineEnum;
|
||||||
|
import com.dcsoft.common.core.exception.ServiceException;
|
||||||
import com.dcsoft.common.security.utils.SecurityUtils;
|
import com.dcsoft.common.security.utils.SecurityUtils;
|
||||||
import com.dcsoft.system.api.model.LoginUser;
|
import com.dcsoft.system.api.model.LoginUser;
|
||||||
import com.dcsoft.system.visitor.domain.*;
|
import com.dcsoft.system.visitor.domain.*;
|
||||||
@@ -69,6 +70,23 @@ public class VisCarryStuffImpl implements IVisCarryStuffService {
|
|||||||
visCarryStuffMapper.updateVisitorReviewProcessById(reviewProcess);
|
visCarryStuffMapper.updateVisitorReviewProcessById(reviewProcess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void cancel(VisExitOutVo vo) {
|
||||||
|
VisExitOutVo visExitOutVo = visCarryStuffMapper.selectVisExitOutById(vo.getId());
|
||||||
|
if (visExitOutVo != null && !StringUtils.equals(visExitOutVo.getExamineState(), ExamineEnum.IN_REVIEW.getCode())) {
|
||||||
|
throw new ServiceException("审核中,无法取消");
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改申请状态
|
||||||
|
VisExitOutVo updateVo = new VisExitOutVo();
|
||||||
|
updateVo.setId(vo.getId());
|
||||||
|
updateVo.setExamineState("4");
|
||||||
|
visCarryStuffMapper.updateStaff(updateVo);
|
||||||
|
|
||||||
|
//删除流程环节信息
|
||||||
|
visCarryStuffMapper.deleteVisitorReviewProcess(vo.getId());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VisExitOutVo selectVisExitOutById(Long id) {
|
public VisExitOutVo selectVisExitOutById(Long id) {
|
||||||
return visCarryStuffMapper.selectVisExitOutById(id);
|
return visCarryStuffMapper.selectVisExitOutById(id);
|
||||||
@@ -95,7 +113,7 @@ public class VisCarryStuffImpl implements IVisCarryStuffService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VisitorReviewProcessVo queryReviewProcessNew(VisExitOutVo stuffVo) {
|
public List<VisitorReviewProcessVo> queryReviewProcessNew(VisExitOutVo stuffVo) {
|
||||||
return visCarryStuffMapper.queryReviewProcessNew(stuffVo);
|
return visCarryStuffMapper.queryReviewProcessNew(stuffVo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,4 +44,13 @@ public class VisExitOutRecordImpl implements IVisExitOutRecordService {
|
|||||||
visExitOutRecordMapper.delete(list);
|
visExitOutRecordMapper.delete(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void confirmPass(VisExitOutRecordVo vo) {
|
||||||
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
|
vo.setCreateBy(loginUser.getUsername());
|
||||||
|
vo.setUserId(loginUser.getUserid());
|
||||||
|
vo.setUserName(loginUser.getUsername());
|
||||||
|
visExitOutRecordMapper.insertExitOutRecord(vo);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -796,4 +796,25 @@ public class VisitorServiceImpl implements IVisitorService {
|
|||||||
public String queryReviewProcessOld(Visitor visitor) {
|
public String queryReviewProcessOld(Visitor visitor) {
|
||||||
return visitorMapper.queryReviewProcessOld(visitor);
|
return visitorMapper.queryReviewProcessOld(visitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void cancel(Visitor visitor) {
|
||||||
|
Visitor visitor1 = visitorMapper.selectVisitorById(visitor.getId());
|
||||||
|
if (visitor1 != null && !StringUtils.equals(visitor1.getExamineState(), ExamineEnum.IN_REVIEW.getCode())) {
|
||||||
|
throw new ServiceException("审核中,无法取消");
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改访客申请主表信息
|
||||||
|
Visitor updateVisitor = new Visitor();
|
||||||
|
updateVisitor.setId(visitor.getId());
|
||||||
|
updateVisitor.setExamineState("4");
|
||||||
|
visitorMapper.updateVisitor(updateVisitor);
|
||||||
|
|
||||||
|
updateVisitor.setParentId(visitor.getId());
|
||||||
|
//修改随访人员信息
|
||||||
|
visitorMapper.updateVisitorByParentId(updateVisitor);
|
||||||
|
|
||||||
|
//删除流程环节信息
|
||||||
|
visitorMapper.deleteVisitorReviewProcess(visitor.getId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</if>
|
</if>
|
||||||
<if test="sysPeople.delFlag != null"> and p.del_flag = #{sysPeople.delFlag}</if>
|
<if test="sysPeople.delFlag != null"> and p.del_flag = #{sysPeople.delFlag}</if>
|
||||||
<if test="sysPeople.branchParent != null and sysPeople.branchParent != ''"> and b.id like concat(#{sysPeople.branchParent}, '%')</if>
|
<if test="sysPeople.branchParent != null and sysPeople.branchParent != ''"> and b.id like concat(#{sysPeople.branchParent}, '%')</if>
|
||||||
<if test="sysPeople.carryStuffExamine != null and sysPeople.carryStuffExamine != ''"> and p.carry_stuff_examine = #{sysPeople.carryStuffExamine}</if>
|
<if test="sysPeople.carryStuffExamine != null and sysPeople.carryStuffExamine != ''"> and FIND_IN_SET(#{sysPeople.carryStuffExamine},p.carry_stuff_examine) > 0 </if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -149,6 +149,10 @@
|
|||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteVisitorReviewProcess">
|
||||||
|
delete from vis_visitor_review_process where exit_id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
<select id="selectList" resultType="com.dcsoft.system.visitor.domain.VisExitOutVo">
|
<select id="selectList" resultType="com.dcsoft.system.visitor.domain.VisExitOutVo">
|
||||||
<include refid="selectVisExitOutVo"/>
|
<include refid="selectVisExitOutVo"/>
|
||||||
<where>
|
<where>
|
||||||
@@ -194,11 +198,12 @@
|
|||||||
select
|
select
|
||||||
reviewer,
|
reviewer,
|
||||||
state,
|
state,
|
||||||
reject_reason
|
reject_reason,
|
||||||
|
updated_time updatedTime
|
||||||
from vis_visitor_review_process
|
from vis_visitor_review_process
|
||||||
where exit_id = #{id}
|
where exit_id = #{id}
|
||||||
order by created_time desc
|
and reviewer = #{reviewer}
|
||||||
limit 1
|
order by updated_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectStuffList" resultMap="StuffResult">
|
<select id="selectStuffList" resultMap="StuffResult">
|
||||||
|
|||||||
@@ -345,8 +345,8 @@
|
|||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="saveVisCheckCode">
|
<insert id="saveVisCheckCode">
|
||||||
insert into vis_check_code (id, code, start_time, end_time, visitor_id)
|
insert into vis_check_code (id, code, start_time, end_time, visitor_id, exit_id)
|
||||||
VALUES (#{id}, #{code}, #{startTime}, #{endTime}, #{visitorId})
|
VALUES (#{id}, #{code}, #{startTime}, #{endTime}, #{visitorId}, #{exitId})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="saveVisitorRecord">
|
<insert id="saveVisitorRecord">
|
||||||
insert into vis_visitor_record (id, visitor_id, sequence, start_time)
|
insert into vis_visitor_record (id, visitor_id, sequence, start_time)
|
||||||
@@ -591,6 +591,10 @@
|
|||||||
delete from sys_file where business_id = #{businessId} and business_type = #{businessType}
|
delete from sys_file where business_id = #{businessId} and business_type = #{businessType}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteVisitorReviewProcess">
|
||||||
|
delete from vis_visitor_review_process where visitor_id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
<select id="selectByGuid" parameterType="String" resultMap="VisitorResult">
|
<select id="selectByGuid" parameterType="String" resultMap="VisitorResult">
|
||||||
<include refid="selectVisitorVo"/>
|
<include refid="selectVisitorVo"/>
|
||||||
where vv.guid = #{guid}
|
where vv.guid = #{guid}
|
||||||
|
|||||||
Reference in New Issue
Block a user