兴安出门证申请开发
This commit is contained in:
@@ -51,6 +51,14 @@ public class SysPeopleRecord extends BaseEntity
|
||||
@Excel(name = "识别记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 1)
|
||||
private Date showDate;
|
||||
|
||||
/** 识别记录时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date showDateState;
|
||||
|
||||
/** 识别记录时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date showDateEnd;
|
||||
|
||||
/** 活体结果 1:活体判断成功 2:活体判断失败 3:未进行活体判断 */
|
||||
@Excel(name = "活体结果", readConverterExp = "1=活体判断成功,2=活体判断失败,3=活体判断失败")
|
||||
private String aliveType;
|
||||
@@ -136,6 +144,22 @@ public class SysPeopleRecord extends BaseEntity
|
||||
*/
|
||||
private String yesterday;
|
||||
|
||||
public Date getShowDateState() {
|
||||
return showDateState;
|
||||
}
|
||||
|
||||
public void setShowDateState(Date showDateState) {
|
||||
this.showDateState = showDateState;
|
||||
}
|
||||
|
||||
public Date getShowDateEnd() {
|
||||
return showDateEnd;
|
||||
}
|
||||
|
||||
public void setShowDateEnd(Date showDateEnd) {
|
||||
this.showDateEnd = showDateEnd;
|
||||
}
|
||||
|
||||
public String getHour() {
|
||||
return hour;
|
||||
}
|
||||
|
||||
@@ -8,34 +8,37 @@ import com.dcsoft.common.core.constant.Constants;
|
||||
import com.dcsoft.common.core.exception.ServiceException;
|
||||
import com.dcsoft.common.core.utils.CollUtil;
|
||||
import com.dcsoft.common.core.utils.SmsUtils;
|
||||
import com.dcsoft.common.core.utils.poi.ExcelUtil;
|
||||
import com.dcsoft.common.core.web.controller.BaseController;
|
||||
import com.dcsoft.common.core.web.domain.AjaxResult;
|
||||
import com.dcsoft.common.core.web.page.TableDataInfo;
|
||||
import com.dcsoft.common.log.annotation.Log;
|
||||
import com.dcsoft.common.log.enums.BusinessType;
|
||||
import com.dcsoft.common.redis.service.RedisService;
|
||||
import com.dcsoft.common.security.annotation.RequiresPermissions;
|
||||
import com.dcsoft.common.sms.config.properties.SmsProperties;
|
||||
import com.dcsoft.system.domain.SysPeople;
|
||||
import com.dcsoft.system.domain.vo.IdNamelVo;
|
||||
import com.dcsoft.system.service.ISysDictDataService;
|
||||
import com.dcsoft.system.service.ISysPeopleService;
|
||||
import com.dcsoft.system.utils.UuidUtil;
|
||||
import com.dcsoft.system.visitor.domain.CheckCodeVo;
|
||||
import com.dcsoft.system.visitor.domain.VisExitOutVo;
|
||||
import com.dcsoft.system.visitor.domain.VisStuffInfoVo;
|
||||
import com.dcsoft.system.visitor.domain.VisVisitorExamine;
|
||||
import com.dcsoft.system.visitor.domain.*;
|
||||
import com.dcsoft.system.visitor.service.IVisCarryStuffService;
|
||||
import com.dcsoft.system.visitor.service.IVisVisitorExamineService;
|
||||
import com.dcsoft.system.visitor.service.IVisitorService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@@ -119,7 +122,7 @@ public class VisCarryStuffController extends BaseController {
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
VisExitOutVo stuffVo = visCarryStuffService.selectVisStuffById(id);
|
||||
VisExitOutVo stuffVo = visCarryStuffService.selectVisExitOutById(id);
|
||||
|
||||
//查询物品信息列表
|
||||
VisStuffInfoVo visStuffInfoVo = new VisStuffInfoVo();
|
||||
@@ -150,6 +153,12 @@ public class VisCarryStuffController extends BaseController {
|
||||
if (ObjectUtil.isNotNull(codeVo)) {
|
||||
stuffVo.setQrCode(codeVo.getCode());
|
||||
}
|
||||
|
||||
//查询审核信息
|
||||
List<VisitorReviewProcessVo> reviewProcess = visCarryStuffService.queryVisitorReviewProcessList(id);
|
||||
if(CollUtil.isNotEmpty(reviewProcess)) {
|
||||
stuffVo.setReviewProcessList(reviewProcess);
|
||||
}
|
||||
return success(stuffVo);
|
||||
}
|
||||
|
||||
@@ -160,14 +169,24 @@ public class VisCarryStuffController extends BaseController {
|
||||
@Log(title = "出门证申请", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@Transactional
|
||||
public AjaxResult add(@RequestBody VisExitOutVo vo) {
|
||||
public AjaxResult add(@Validated @RequestBody VisExitOutVo vo) {
|
||||
log.info("新增出门证申请信息:{}", vo);
|
||||
//校验是否存在返厂物资
|
||||
List<VisStuffInfoVo> visStuffInfoList = vo.getVisStuffInfoList();
|
||||
for (VisStuffInfoVo visStuffInfoVo : visStuffInfoList) {
|
||||
if (visStuffInfoVo.getIsBack() == 1) {
|
||||
vo.setIsExistBack(1);
|
||||
if (visStuffInfoVo.getBackNumber() > visStuffInfoVo.getNumber()) {
|
||||
throw new ServiceException("返厂物资数量不能大于出厂物资数量!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
//新增出门申请
|
||||
visCarryStuffService.insertVisExitOut(vo);
|
||||
|
||||
//新增物资信息
|
||||
List<VisStuffInfoVo> visStuffInfoList = vo.getVisStuffInfoList();
|
||||
visStuffInfoList.forEach(stuff -> stuff.setExitId(vo.getId()));
|
||||
visCarryStuffService.insertVisStuffInfo(visStuffInfoList);
|
||||
} catch (Exception e) {
|
||||
@@ -189,7 +208,6 @@ public class VisCarryStuffController extends BaseController {
|
||||
throw new ServiceException("系统异常,请重新提交或联系管理员!");
|
||||
}
|
||||
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@@ -241,7 +259,7 @@ public class VisCarryStuffController extends BaseController {
|
||||
SysPeople sysPeople = sysPeopleService.queryPeopleName(telephone, null);
|
||||
|
||||
//查询出门证申请详情信息
|
||||
VisExitOutVo stuffVo = visCarryStuffService.selectVisStuffById(vo.getId());
|
||||
VisExitOutVo stuffVo = visCarryStuffService.selectVisExitOutById(vo.getId());
|
||||
|
||||
//保存审核环节表
|
||||
vo.setReviewer(sysPeople.getId());
|
||||
@@ -339,5 +357,39 @@ public class VisCarryStuffController extends BaseController {
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出出门证信息列表
|
||||
*/
|
||||
@RequiresPermissions("visitor:stuff:export")
|
||||
@Log(title = "出门证申请", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, VisExitOutVo vo) {
|
||||
List<VisStuffInfoExportVo> list = visCarryStuffService.selectVisitorList(vo);
|
||||
Map<String, String> map = dictDataService.queryDictData("vis_out_stuff_type");
|
||||
list.forEach(stuff -> {
|
||||
if (StrUtil.isNotBlank(stuff.getType())) {
|
||||
stuff.setTypeName(map.get(stuff.getType()));
|
||||
}
|
||||
if (StrUtil.isNotBlank(stuff.getBackType())) {
|
||||
stuff.setBackTypeName(map.get(stuff.getBackType()));
|
||||
}
|
||||
if (StrUtil.isNotBlank(stuff.getImgUrls())) {
|
||||
String[] split = stuff.getImgUrls().split(",");
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
if (i == 0) {
|
||||
stuff.setImgUrls1(split[i]);
|
||||
}
|
||||
if (i == 1) {
|
||||
stuff.setImgUrls2(split[i]);
|
||||
}
|
||||
if (i == 2) {
|
||||
stuff.setImgUrls3(split[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
ExcelUtil<VisStuffInfoExportVo> util = new ExcelUtil<>(VisStuffInfoExportVo.class);
|
||||
util.exportExcel(response, list, "出厂物资明细数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,7 +23,9 @@ public class VisExitOutRecordController extends BaseController {
|
||||
@Resource
|
||||
private IVisExitOutRecordService visExitOutRecordService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询出门记录列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(VisExitOutRecordVo vo) {
|
||||
startPage();
|
||||
@@ -40,9 +42,8 @@ public class VisExitOutRecordController extends BaseController {
|
||||
return success(stuffVo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增访客信息
|
||||
* 新增出门证记录信息
|
||||
*/
|
||||
@Log(title = "新增出门记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@@ -60,4 +61,21 @@ public class VisExitOutRecordController extends BaseController {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出门证记录信息
|
||||
*/
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult delete(@PathVariable Long[] ids){
|
||||
log.info("删除出门记录信息:{}", ids);
|
||||
try {
|
||||
//新增出门申请
|
||||
visExitOutRecordService.delete(ids);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("新增出门记录异常:", e);
|
||||
throw new ServiceException("系统异常");
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ public class VisitorController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
private VisExitOutVo getVisCarryStuff(Long id, String telephone) {
|
||||
VisExitOutVo stuffVo = visCarryStuffService.selectVisStuffById(id);
|
||||
VisExitOutVo stuffVo = visCarryStuffService.selectVisExitOutById(id);
|
||||
|
||||
//查询物品信息列表
|
||||
VisStuffInfoVo visStuffInfoVo = new VisStuffInfoVo();
|
||||
@@ -387,8 +387,18 @@ public class VisitorController extends BaseController {
|
||||
//处理字典
|
||||
Map<String, String> map = dictDataService.queryDictData("vis_out_stuff_type");
|
||||
stuffList.forEach(stuff -> {
|
||||
if (StrUtil.isNotBlank(stuff.getType())) {
|
||||
stuff.setTypeName(map.get(stuff.getType()));
|
||||
}
|
||||
if (StrUtil.isNotBlank(stuff.getBackType())) {
|
||||
stuff.setBackTypeName(map.get(stuff.getBackType()));
|
||||
}
|
||||
if (StrUtil.isNotBlank(stuff.getImgUrls())) {
|
||||
stuff.setImgUrlList(Arrays.asList(stuff.getImgUrls().split(",")));
|
||||
}
|
||||
if (StrUtil.isNotBlank(stuff.getBackImgUrls())) {
|
||||
stuff.setBackImgUrlList(Arrays.asList(stuff.getBackImgUrls().split(",")));
|
||||
}
|
||||
});
|
||||
stuffVo.setVisStuffInfoList(stuffList);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,13 @@ public class VisExitOutRecordVo extends BaseEntity {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 保安
|
||||
* 出门证主键id
|
||||
*/
|
||||
private Long exitId;
|
||||
|
||||
|
||||
/**
|
||||
* 放行人(保安)
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
@@ -24,8 +30,44 @@ public class VisExitOutRecordVo extends BaseEntity {
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 出门申请id
|
||||
* 出货人名字
|
||||
*/
|
||||
private Long exitId;
|
||||
private String applyName;
|
||||
|
||||
/**
|
||||
* 出门证编号
|
||||
*/
|
||||
private String exitPermitNo;
|
||||
|
||||
/**
|
||||
* 申请日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date visTime;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date visTimeStart;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date visTimeEnd;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private Date createTimeStr;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private Date createTimeEnd;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.dcsoft.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -13,6 +15,8 @@ public class VisExitOutVo extends BaseEntity {
|
||||
|
||||
private Long id;
|
||||
|
||||
private List<Long> ids;
|
||||
|
||||
/**
|
||||
* 发货人(申请人)
|
||||
*/
|
||||
@@ -36,6 +40,7 @@ public class VisExitOutVo extends BaseEntity {
|
||||
/**
|
||||
* 出门证编号
|
||||
*/
|
||||
@NotBlank(message = "出门证编号为空!")
|
||||
private String exitPermitNo;
|
||||
|
||||
/**
|
||||
@@ -59,6 +64,18 @@ public class VisExitOutVo extends BaseEntity {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date visTime;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date visTimeStart;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date visTimeEnd;
|
||||
|
||||
/**
|
||||
* 车牌
|
||||
*/
|
||||
@@ -67,18 +84,36 @@ public class VisExitOutVo extends BaseEntity {
|
||||
/**
|
||||
* 一级审核人
|
||||
*/
|
||||
@NotNull(message = "生产部审核人不能为空")
|
||||
private Long reviewer1;
|
||||
|
||||
/**
|
||||
* 二级审核人
|
||||
*/
|
||||
@NotNull(message = "设备部审核人不能为空")
|
||||
private Long reviewer2;
|
||||
|
||||
/**
|
||||
* 三级审核人
|
||||
*/
|
||||
@NotNull(message = "人力综合部审核人不能为空")
|
||||
private Long reviewer3;
|
||||
|
||||
/**
|
||||
* 一级审核人名字
|
||||
*/
|
||||
private String reviewerName1;
|
||||
|
||||
/**
|
||||
* 二级审核人
|
||||
*/
|
||||
private String reviewerName2;
|
||||
|
||||
/**
|
||||
* 三级审核人
|
||||
*/
|
||||
private String reviewerName3;
|
||||
|
||||
/**
|
||||
* 审核状态 0:通过,1:驳回,2审核中,4:已取消,5:已失效
|
||||
*/
|
||||
@@ -104,12 +139,16 @@ public class VisExitOutVo extends BaseEntity {
|
||||
*/
|
||||
private String telephone;
|
||||
|
||||
|
||||
/**
|
||||
* 当前审批节点
|
||||
*/
|
||||
private Integer currentNode;
|
||||
|
||||
/**
|
||||
* 是否存在返厂物资 0:否,1:是
|
||||
*/
|
||||
private Integer isExistBack;
|
||||
|
||||
/**
|
||||
* 物品信息列表
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
package com.dcsoft.system.visitor.domain;
|
||||
|
||||
import com.dcsoft.common.core.annotation.Excel;
|
||||
import com.dcsoft.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class VisStuffInfoExportVo extends BaseEntity {
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 出门申请id
|
||||
*/
|
||||
private Long exitId;
|
||||
|
||||
|
||||
private List<Long> exitIds;
|
||||
|
||||
/**
|
||||
* 发货人
|
||||
*/
|
||||
@Excel(name = "出门证编号", sort = 1, width = 19)
|
||||
private String exitPermitNo;
|
||||
|
||||
|
||||
/**
|
||||
* 发货人
|
||||
*/
|
||||
@Excel(name = "发货人",sort = 2)
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 发货人联系方式
|
||||
*/
|
||||
@Excel(name = "发货人联系方式",sort = 3)
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 发货人单位
|
||||
*/
|
||||
@Excel(name = "发货人单位",sort = 4)
|
||||
private String visitingUnit;
|
||||
|
||||
/**
|
||||
* 申请日期
|
||||
*/
|
||||
@Excel(name = "申请日期",sort = 5)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private String visTime;
|
||||
|
||||
/**
|
||||
* 物资名称
|
||||
*/
|
||||
@Excel(name = "物资名称",sort = 6)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 物资用途
|
||||
*/
|
||||
@Excel(name = "物资用途", sort = 7)
|
||||
private String purpose;
|
||||
|
||||
/**
|
||||
* 物资类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 物资类型名称
|
||||
*/
|
||||
@Excel(name = "物资类型", sort = 8)
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@Excel(name = "规格型号", sort = 9)
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
@Excel(name = "计量单位", sort = 10)
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@Excel(name = "数量", sort = 11)
|
||||
private Integer number;
|
||||
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
private String imgUrls;
|
||||
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
@Excel(name = "物资图片1", sort = 12, cellType = Excel.ColumnType.IMAGE, height = 50, width = 8)
|
||||
private String imgUrls1;
|
||||
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
@Excel(name = "物资图片2", sort = 13, cellType = Excel.ColumnType.IMAGE, height = 50, width = 8)
|
||||
private String imgUrls2;
|
||||
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
@Excel(name = "物资图片3", sort = 14, cellType = Excel.ColumnType.IMAGE, height = 50, width = 8)
|
||||
private String imgUrls3;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注", sort = 15)
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否返厂0:否,1:是
|
||||
*/
|
||||
@Excel(name = "是否返厂", sort = 16, readConverterExp = "0=否,1=是")
|
||||
private Integer isBack;
|
||||
|
||||
/**
|
||||
* 返厂日期
|
||||
*/
|
||||
@Excel(name = "返厂日期", sort = 17)
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private String backTime;
|
||||
|
||||
/**
|
||||
* 返厂物资名称
|
||||
*/
|
||||
private String backName;
|
||||
|
||||
/**
|
||||
* 返厂物资用途
|
||||
*/
|
||||
private String backPurpose;
|
||||
|
||||
/**
|
||||
* 返厂物资类型
|
||||
*/
|
||||
private String backType;
|
||||
|
||||
/**
|
||||
* 返厂物资类型名称
|
||||
*/
|
||||
private String backTypeName;
|
||||
|
||||
/**
|
||||
* 返厂规格型号
|
||||
*/
|
||||
private String backModel;
|
||||
|
||||
/**
|
||||
* 返厂计量单位
|
||||
*/
|
||||
private String backUnit;
|
||||
|
||||
/**
|
||||
* 返厂数量
|
||||
*/
|
||||
@Excel(name = "返厂数量", sort = 18)
|
||||
private Integer backNumber;
|
||||
|
||||
/**
|
||||
* 返厂图片地址
|
||||
*/
|
||||
private String backImgUrls;
|
||||
|
||||
/**
|
||||
* 返厂图片地址
|
||||
*/
|
||||
private String backImgUrls1;
|
||||
|
||||
/**
|
||||
* 返厂图片地址
|
||||
*/
|
||||
private String backImgUrls2;
|
||||
|
||||
/**
|
||||
* 返厂图片地址
|
||||
*/
|
||||
private String backImgUrls3;
|
||||
|
||||
/**
|
||||
* 返厂备注
|
||||
*/
|
||||
@Excel(name = "返厂备注", sort = 19)
|
||||
private String backRemark;
|
||||
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@Excel(name = "审核状态", sort = 20, readConverterExp = "0=通过,1=驳回,2=审核中,4=已取消,5=已失效")
|
||||
private String examineState;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
|
||||
}
|
||||
@@ -78,7 +78,7 @@ public class VisStuffInfoVo extends BaseEntity {
|
||||
/**
|
||||
* 返厂日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date backTime;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package com.dcsoft.system.visitor.mapper;
|
||||
|
||||
import com.dcsoft.system.visitor.domain.CheckCodeVo;
|
||||
import com.dcsoft.system.visitor.domain.VisExitOutVo;
|
||||
import com.dcsoft.system.visitor.domain.VisStuffInfoVo;
|
||||
import com.dcsoft.system.visitor.domain.VisitorReviewProcessVo;
|
||||
import com.dcsoft.system.visitor.domain.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -14,7 +11,7 @@ public interface VisCarryStuffMapper {
|
||||
|
||||
void insertVisExitOut(VisExitOutVo vo);
|
||||
|
||||
VisExitOutVo selectVisStuffById(Long id);
|
||||
VisExitOutVo selectVisExitOutById(Long id);
|
||||
|
||||
CheckCodeVo selectStuffCheckCode(@Param("exitId") Long id);
|
||||
|
||||
@@ -29,4 +26,6 @@ public interface VisCarryStuffMapper {
|
||||
void insertVisStuffInfo(@Param("list") List<VisStuffInfoVo> visStuffInfoList);
|
||||
|
||||
List<VisStuffInfoVo> selectStuffList(VisStuffInfoVo visStuffInfoVo);
|
||||
|
||||
List<VisStuffInfoExportVo> selectVisitorList(VisExitOutVo vo);
|
||||
}
|
||||
|
||||
@@ -12,4 +12,6 @@ public interface VisExitOutRecordMapper {
|
||||
VisExitOutRecordVo selectExitOutRecordById(Long id);
|
||||
|
||||
void insertExitOutRecord(VisExitOutRecordVo vo);
|
||||
|
||||
void delete(@Param("list") List<Long> list);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ public interface IVisCarryStuffService {
|
||||
|
||||
void insertVisExitOut(VisExitOutVo vo);
|
||||
|
||||
VisExitOutVo selectVisStuffById(Long id);
|
||||
VisExitOutVo selectVisExitOutById(Long id);
|
||||
|
||||
CheckCodeVo selectStuffCheckCode(Long id);
|
||||
|
||||
@@ -25,4 +25,6 @@ public interface IVisCarryStuffService {
|
||||
void insertVisStuffInfo(List<VisStuffInfoVo> visStuffInfoList);
|
||||
|
||||
List<VisStuffInfoVo> selectStuffList(VisStuffInfoVo vo);
|
||||
|
||||
List<VisStuffInfoExportVo> selectVisitorList(VisExitOutVo vo);
|
||||
}
|
||||
|
||||
@@ -11,4 +11,6 @@ public interface IVisExitOutRecordService {
|
||||
VisExitOutRecordVo selectExitOutRecordById(Long id);
|
||||
|
||||
void insertExitOutRecord(VisExitOutRecordVo vo);
|
||||
|
||||
void delete(Long[] ids);
|
||||
}
|
||||
|
||||
@@ -53,8 +53,13 @@ public class VisCarryStuffImpl implements IVisCarryStuffService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisExitOutVo selectVisStuffById(Long id) {
|
||||
return visCarryStuffMapper.selectVisStuffById(id);
|
||||
public List<VisStuffInfoExportVo> selectVisitorList(VisExitOutVo vo) {
|
||||
return visCarryStuffMapper.selectVisitorList(vo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VisExitOutVo selectVisExitOutById(Long id) {
|
||||
return visCarryStuffMapper.selectVisExitOutById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.dcsoft.system.visitor.service.IVisExitOutRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@@ -32,7 +33,15 @@ public class VisExitOutRecordImpl implements IVisExitOutRecordService {
|
||||
|
||||
@Override
|
||||
public void insertExitOutRecord(VisExitOutRecordVo vo) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
vo.setCreateBy(loginUser.getUsername());
|
||||
visExitOutRecordMapper.insertExitOutRecord(vo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(Long[] ids) {
|
||||
List<Long> list = Arrays.asList(ids);
|
||||
visExitOutRecordMapper.delete(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -73,6 +73,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="filePath != null and filePath != ''"> and spr.file_path = #{filePath}</if>
|
||||
<if test="showTime != null "> and spr.show_time = #{showTime}</if>
|
||||
<if test="showDate != null "> and DATE_FORMAT(spr.show_date, '%Y-%m-%d') = DATE_FORMAT(#{showDate}, '%Y-%m-%d')</if>
|
||||
<if test="showDateState != null"> and spr.show_date <![CDATA[ >= ]]> #{showDateState}</if>
|
||||
<if test="showDateEnd != null"> and spr.show_date <![CDATA[ <= ]]> #{showDateEnd}</if>
|
||||
<if test="aliveType != null and aliveType != ''"> and spr.alive_type = #{aliveType}</if>
|
||||
<if test="recScore != null and recScore != ''"> and spr.rec_score = #{recScore}</if>
|
||||
<if test="deviceNo != null and deviceNo != ''"> and spr.device_no = #{deviceNo}</if>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="vehicle" column="vehicle"/>
|
||||
<result property="currentNode" column="current_node"/>
|
||||
<result property="isExistBack" column="is_exist_back"/>
|
||||
<!-- <association property="examine" column="id" javaType="VisStuffInfoVo" resultMap="StuffResult"/>-->
|
||||
</resultMap>
|
||||
|
||||
@@ -52,6 +53,38 @@
|
||||
<result property="sort" column="sort"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="VisStuffInfoExportVo" id="StuffInfoExportResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="userName" column="userName"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="exitPermitNo" column="exit_permit_no"/>
|
||||
<result property="visitingUnit" column="visiting_unit"/>
|
||||
<result property="visTime" column="vis_time"/>
|
||||
<result property="carNo" column="car_no"/>
|
||||
<result property="exitId" column="exit_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="purpose" column="purpose"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="number" column="number"/>
|
||||
<result property="imgUrls" column="img_urls"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="isBack" column="is_back"/>
|
||||
<result property="backTime" column="back_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="backName" column="back_name"/>
|
||||
<result property="backPurpose" column="back_purpose"/>
|
||||
<result property="backType" column="back_type"/>
|
||||
<result property="backModel" column="back_model"/>
|
||||
<result property="backUnit" column="back_unit"/>
|
||||
<result property="backNumber" column="back_number"/>
|
||||
<result property="backImgUrls" column="back_img_urls"/>
|
||||
<result property="backRemark" column="back_remark"/>
|
||||
<result property="examineState" column="examine_state"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectVisExitOutVo">
|
||||
select distinct
|
||||
e.id,
|
||||
@@ -72,7 +105,11 @@
|
||||
e.update_by,
|
||||
e.update_time,
|
||||
e.vehicle,
|
||||
e.current_node
|
||||
e.current_node,
|
||||
e.is_exist_back,
|
||||
(select p.name from sys_people p where p.id = e.reviewer1) as reviewerName1,
|
||||
(select p.name from sys_people p where p.id = e.reviewer2) as reviewerName2,
|
||||
(select p.name from sys_people p where p.id = e.reviewer3) as reviewerName3
|
||||
from vis_exit_out e
|
||||
</sql>
|
||||
|
||||
@@ -93,6 +130,7 @@
|
||||
<if test="reviewer3 != null">reviewer3 = #{reviewer3},</if>
|
||||
<if test="examineState != null and examineState != ''">examine_state = #{examineState},</if>
|
||||
<if test="currentNode != null">current_node = #{currentNode},</if>
|
||||
<if test="isExistBack != null">is_exist_back = #{isExistBack},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
@@ -103,13 +141,16 @@
|
||||
<where>
|
||||
<if test="id != null">and e.id = #{id}</if>
|
||||
<if test="name != null and name != ''">and e.`name` like concat('%', #{name}, '%')</if>
|
||||
<if test="createBy != null ">and e.create_by = #{createBy}</if>
|
||||
<if test="userId != null ">and e.user_id = #{userId}</if>
|
||||
<if test="examineState != null and examineState != 3">and e.examine_state = #{examineState}</if>
|
||||
<if test="visTimeStart != null">and e.vis_time <![CDATA[ >= ]]> #{visTimeStart}</if>
|
||||
<if test="visTimeEnd != null">and e.vis_time <![CDATA[ <= ]]> #{visTimeEnd}</if>
|
||||
<if test="exitPermitNo != null and exitPermitNo != ''">and e.exitPermit_no = #{exitPermitNo}</if>
|
||||
<if test="examineState != null and examineState != '' and examineState != 3">and e.examine_state = #{examineState}</if>
|
||||
<if test="isExistBack != null">and e.is_exist_back = #{isExistBack}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectVisStuffById" resultType="com.dcsoft.system.visitor.domain.VisExitOutVo">
|
||||
<select id="selectVisExitOutById" resultType="com.dcsoft.system.visitor.domain.VisExitOutVo">
|
||||
<include refid="selectVisExitOutVo"/>
|
||||
where e.id = #{id}
|
||||
</select>
|
||||
@@ -173,7 +214,7 @@
|
||||
<where>
|
||||
<if test="exitId != null">and exit_id = #{exitId}</if>
|
||||
<if test="name != null and name != ''">and `name` like concat('%', #{name}, '%')</if>
|
||||
<if test="createBy != null ">and e.create_by = #{createBy}</if>
|
||||
<if test="createBy != null ">and create_by = #{createBy}</if>
|
||||
<if test="exitIds != null and exitIds.size() > 0">
|
||||
exit_id in
|
||||
<foreach item="id" collection="exitIds" open="(" separator="," close=")">
|
||||
@@ -183,6 +224,53 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectVisitorList" resultMap="StuffInfoExportResult">
|
||||
SELECT
|
||||
s.`exit_id`,
|
||||
s.`name`,
|
||||
s.`purpose`,
|
||||
s.`type`,
|
||||
s.`model`,
|
||||
s.`unit`,
|
||||
s.`number`,
|
||||
s.`img_urls`,
|
||||
s.`remark`,
|
||||
s.`is_back`,
|
||||
s.`back_time`,
|
||||
s.`back_name`,
|
||||
s.`back_purpose`,
|
||||
s.`back_type`,
|
||||
s.`back_model`,
|
||||
s.`back_unit`,
|
||||
s.`back_number`,
|
||||
s.`back_img_urls`,
|
||||
s.`back_remark`,
|
||||
e.name username,
|
||||
e.phone,
|
||||
e.visiting_unit,
|
||||
e.vis_time,
|
||||
e.exit_permit_no,
|
||||
e.examine_state
|
||||
FROM
|
||||
`vis_exit_out` e
|
||||
LEFT JOIN vis_stuff_info s ON e.id = s.exit_id
|
||||
<where>
|
||||
<if test="id != null">and e.id = #{id}</if>
|
||||
<if test="name != null and name != ''">and e.`name` like concat('%', #{name}, '%')</if>
|
||||
<if test="visTimeStart != null">and e.vis_time <![CDATA[ >= ]]> #{visTimeStart}</if>
|
||||
<if test="visTimeEnd != null">and e.vis_time <![CDATA[ <= ]]> #{visTimeEnd}</if>
|
||||
<if test="exitPermitNo != null and exitPermitNo != ''">and e.exitPermit_no = #{exitPermitNo}</if>
|
||||
<if test="examineState != null and examineState != '' and examineState != 3">and e.examine_state = #{examineState}</if>
|
||||
<if test="isExistBack != null">and e.is_exist_back = #{isExistBack}</if>
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
or e.id in
|
||||
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertVisExitOut" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into vis_exit_out
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -202,6 +290,7 @@
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="vehicle != null">vehicle,</if>
|
||||
<if test="currentNode != null">current_node,</if>
|
||||
<if test="isExistBack != null">is_exist_back,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
@@ -220,6 +309,7 @@
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="vehicle != null">#{vehicle},</if>
|
||||
<if test="currentNode != null">#{currentNode},</if>
|
||||
<if test="isExistBack != null">#{isExistBack},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="saveVisitorReviewProcess">
|
||||
|
||||
@@ -28,6 +28,14 @@
|
||||
from vis_exit_out_record r
|
||||
</sql>
|
||||
|
||||
<delete id="delete">
|
||||
delete from vis_exit_out_record
|
||||
where id in
|
||||
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectList" resultType="com.dcsoft.system.visitor.domain.VisExitOutRecordVo">
|
||||
select distinct
|
||||
r.id,
|
||||
@@ -37,14 +45,24 @@
|
||||
r.create_time,
|
||||
r.update_by,
|
||||
r.update_time,
|
||||
p.name,
|
||||
ifnull(u.nick_name, u.user_name) userName,
|
||||
e.name applyName,
|
||||
e.exit_permit_no,
|
||||
e.vis_time
|
||||
from vis_exit_out_record r
|
||||
left join sys_people p on r.user_id = p.id
|
||||
left join vis_exit_out e on r.exit_id = e.id
|
||||
left join sys_user u on r.user_id = u.user_id
|
||||
<where>
|
||||
<if test="id != null">and r.id = #{id}</if>
|
||||
<if test="name != null and name != ''">and r.`name` like concat('%', #{name}, '%')</if>
|
||||
<if test="userName != null and userName != ''">and (u.user_name like concat('%', #{userName}, '%') or u.nick_name like concat('%', #{userName}, '%'))</if>
|
||||
<if test="createBy != null ">and r.create_by = #{createBy}</if>
|
||||
<if test="userId != null ">and r.user_id = #{userId}</if>
|
||||
<if test="visTimeStart != null">and e.vis_time <![CDATA[ >= ]]> #{visTimeStart}</if>
|
||||
<if test="visTimeEnd != null">and e.vis_time <![CDATA[ <= ]]> #{visTimeEnd}</if>
|
||||
<if test="createTimeStr != null">and r.create_time <![CDATA[ >= ]]> #{createTimeStr}</if>
|
||||
<if test="createTimeEnd != null">and r.create_time <![CDATA[ <= ]]> #{createTimeEnd}</if>
|
||||
<if test="exitPermitNo != null and exitPermitNo != ''">and e.exitPermit_no = #{exitPermitNo}</if>
|
||||
<if test="applyName != null and applyName != ''">and e.`name` like concat('%', #{applyName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -58,14 +76,12 @@
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="exitId != null">`exit_id`,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="exitId != null">#{exitId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
</trim>
|
||||
|
||||
Reference in New Issue
Block a user