Commit 26c1a7cf authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents f9fad4a0 760ba45f
{
"name": "refined-platform",
"lockfileVersion": 2,
"requires": true,
"packages": {}
}
......@@ -66,6 +66,7 @@ export default {
el.validate((valid) => {
if (!valid) return;
this.loading = true;
console.log(this.form);
this.$post(this.urls.saveUrl || this.pageInfo.saveUrl, this.beforeSubmit(this.form))
.then(res => {
this.$message.success(res.msg);
......
......@@ -6,7 +6,7 @@
<Field :span="20" label="姓名" prop="name" v-model="form.name" placeholder="请输入个人姓名"/>
<Field :span="20" label="联系方式" prop="contact" v-model="form.contact" placeholder="请输入联系方式"/>
<Field :span="20" label="证件类型" prop="idCardType" v-model="form.idCardType" type="radio" :enumData="dict.idCardType" placeholder="请输入证件类型"/>
<Field :span="20" label="证件号码" prop="idCardNo" v-model="form.idCard" placeholder="请输入证件号码"/>
<Field :span="20" label="证件号码" prop="idCard" v-model="form.idCard" placeholder="请输入证件号码"/>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
......@@ -25,6 +25,24 @@
dialogShow ,
},
data() {
let validatorSheet = (rule, value, callback)=>{
let Reg = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/
let regt = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
if( Reg.test( value ) || regt.test( value ) ) {
callback()
} else {
callback(new Error('输入正确格式的身份证号'))
}
}
let phoneReg = (rule, value, callback) =>{
let regExp=/^(((\+86)|(\+86-))|((86)|(86\-))|((0086)|(0086\-)))?1[3|5|7|8]\d{9}$/;
if(regExp.test(value)){
callback()
}else{
callback(new Error('请输入正确格式的手机号码'))
}
}
return {
// 子表选中数据
checkedCareConstraintTrack: [],
......@@ -48,14 +66,28 @@
idCard: [
{required: true,message: "请输入身份证号码", trigger: "blur" },
{max: 18,message: "最多只能录入18个字符",trigger: "blur",},
{validator: validatorSheet,trigger: "blur"}
],
name: [
{required: true,message: "请输入姓名", trigger: "blur" },
],
idCardType: [
{required: true,message: "请输入证件类型", trigger: "blur" },
],
contact:[
{required: true,message: "请输入联系方式", trigger: "blur" },
{validator:phoneReg, trigger: "blur" },
]
}
};
},
methods: {
// beforeSubmit(data){
// console.log(data);
// return data
// },
// 渲染前置处理
beforeRender(data) {
if(data.entity.careConstraintTrackList) {
......
......@@ -19,7 +19,7 @@
type="select"
/>
<!-- <Field label="用户类型" prop="userType" v-model="form.userType" :enumData='dict.userType' type='select' /> -->
<Field label="链接地址" prop="url" :span="20">
<Field label="链接地址" prop="urls" :span="20">
<el-button
icon="el-icon-plus"
circle
......@@ -192,6 +192,7 @@ export default {
rules: {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
urls:[{ required: true, message: "地址不能为空", trigger: "blur" }]
},
};
},
......
This diff is collapsed.
......@@ -12,5 +12,9 @@ import lombok.Data;
*/
@Data
public class AppointmentRecordsVo extends BaseEntityLong {
/** 开始 监测时间 */
private String monitorTimeStart;
/** 结束 监测时间 */
private String monitorTimeEnd;
}
\ No newline at end of file
package com.mortals.xhx.module.appointment.service.impl;
import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.IdcardUtil;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.module.appointment.model.AppointmentConstraintQuery;
import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity;
......@@ -14,6 +16,7 @@ import com.mortals.xhx.module.appointment.dao.AppointmentConstraintDao;
import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity;
import com.mortals.xhx.module.appointment.service.AppointmentConstraintService;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
/**
* AppointmentConstraintService
......@@ -27,10 +30,22 @@ public class AppointmentConstraintServiceImpl extends AbstractCRUDServiceImpl<Ap
@Override
protected void saveBefore(AppointmentConstraintEntity entity, Context context) throws AppException {
if(StringUtils.isEmpty(entity.getName())){
throw new AppException("姓名不能为空");
}
if(StringUtils.isEmpty(entity.getIdCardNo())){
throw new AppException("身份证号码不能为空");
}
if(!IdcardUtil.isValidCard(entity.getIdCardNo())){
throw new AppException("身份证号码格式不正确,请输入正确的身份证号码");
}
if(!Validator.isMobile(entity.getContact())){
throw new AppException("联系方式格式不正确,请输入正确的手机号码");
}
entity.setOperator(context.getUser() == null ? "" : context.getUser().getRealName());
int count = this.count(new AppointmentConstraintQuery().idCardNo(entity.getIdCardNo()), context);
if (count > 0) {
throw new AppException("添加人员已经存在,idCard:" + entity.getIdCardNo());
throw new AppException("添加人员身份证号码重复:" + entity.getIdCardNo());
}
super.saveBefore(entity, context);
}
......
......@@ -69,14 +69,14 @@ public class AppointmentConstraintController extends BaseCRUDJsonBodyMappingCont
this.addDict(model, "idCardType", IdCardTypeEnum.getEnumMap());
this.addDict(model, "constraint", paramService.getParamBySecondOrganize("AppointmentConstraint", "constraint"));
Map<String, String> personCollect = personService.find(new PersonQuery()).stream()
.collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName(), (o, n) -> n));
this.addDict(model, "personId", personCollect);
Map<String, String> collect = userService.find(new UserQuery(), getContext()).stream()
.collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n));
this.addDict(model, "operator", collect);
this.addDict(model, "createUserId", collect);
// Map<String, String> personCollect = personService.find(new PersonQuery()).stream()
// .collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName(), (o, n) -> n));
// this.addDict(model, "personId", personCollect);
//
// Map<String, String> collect = userService.find(new UserQuery(), getContext()).stream()
// .collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n));
// this.addDict(model, "operator", collect);
// this.addDict(model, "createUserId", collect);
super.init(model, context);
}
......
......@@ -59,7 +59,7 @@ public class CareConstraintEntity extends CareConstraintVo {
/**
* 创建方式(1.人工创建,2.系统推荐)
*/
@Excel(name = "创建方式", readConverterExp = "1=人工创建,2.系统推荐")
@Excel(name = "创建方式", readConverterExp = "1=人工创建,2=系统推荐")
private Integer createWay;
/**
* 操作人员
......
......@@ -81,5 +81,10 @@ public class CareRecordsVo extends BaseEntityLong {
@Excel(name = "办理状态", readConverterExp = "办理状态(排队中,办理中,接件结束)")
private String processStatus;
/** 开始 监测时间 */
private String monitorTimeStart;
/** 结束 监测时间 */
private String monitorTimeEnd;
}
\ No newline at end of file
package com.mortals.xhx.module.care.service.impl;
import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.IdcardUtil;
import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity;
import com.mortals.xhx.module.appointment.model.AppointmentConstraintQuery;
import com.mortals.xhx.module.care.model.CareConstraintQuery;
......@@ -15,6 +17,7 @@ import com.mortals.xhx.module.care.model.CareConstraintTrackEntity;
import com.mortals.xhx.module.care.model.CareConstraintTrackQuery;
import com.mortals.xhx.module.care.service.CareConstraintTrackService;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.util.Date;
import java.util.Arrays;
......@@ -35,6 +38,18 @@ public class CareConstraintServiceImpl extends AbstractCRUDServiceImpl<CareConst
@Override
protected void saveBefore(CareConstraintEntity entity, Context context) throws AppException {
if(StringUtils.isEmpty(entity.getName())){
throw new AppException("姓名不能为空");
}
if(StringUtils.isEmpty(entity.getIdCard())){
throw new AppException("身份证号码不能为空");
}
if(!IdcardUtil.isValidCard(entity.getIdCard())){
throw new AppException("身份证号码格式不正确,请输入正确的身份证号码");
}
if(!Validator.isMobile(entity.getContact())){
throw new AppException("联系方式格式不正确,请输入正确的手机号码");
}
int count = this.count(new CareConstraintQuery().idCard(entity.getIdCard()), context);
if (count > 0) {
throw new AppException("添加人员已经存在,idCard:" + entity.getIdCard());
......
package com.mortals.xhx.module.care.web;
import cn.hutool.core.util.StrUtil;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.IUser;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserQuery;
......@@ -10,6 +11,7 @@ import com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity;
import com.mortals.xhx.module.person.model.PersonQuery;
import com.mortals.xhx.module.person.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -21,12 +23,10 @@ import com.mortals.xhx.module.care.model.CareConstraintEntity;
import com.mortals.xhx.module.care.service.CareConstraintService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
......@@ -58,14 +58,14 @@ public class CareConstraintController extends BaseCRUDJsonBodyMappingController<
this.addDict(model, "track", paramService.getParamBySecondOrganize("CareConstraint","track"));
this.addDict(model, "idCardType", IdCardTypeEnum.getEnumMap());
Map<String, String> personCollect = personService.find(new PersonQuery()).stream()
.collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName(), (o, n) -> n));
this.addDict(model, "personId", personCollect);
Map<String, String> collect = userService.find(new UserQuery(), getContext()).stream()
.collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n));
this.addDict(model, "operator", collect);
this.addDict(model, "createUserId", collect);
// Map<String, String> personCollect = personService.find(new PersonQuery()).stream()
// .collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName(), (o, n) -> n));
// this.addDict(model, "personId", personCollect);
//
// Map<String, String> collect = userService.find(new UserQuery(), getContext()).stream()
// .collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n));
// this.addDict(model, "operator", collect);
// this.addDict(model, "createUserId", collect);
super.init(model, context);
......@@ -81,4 +81,52 @@ public class CareConstraintController extends BaseCRUDJsonBodyMappingController<
});
return super.doListAfter(query, model, context);
}
@RequestMapping(value = {"track"},method = {RequestMethod.POST, RequestMethod.GET})
public String track(Long id) {
Map<String, Object> model = new HashMap();
if (id == null) {
return this.createFailJsonResp("请选择待处理" + this.getModuleDesc() + "信息");
} else {
JSONObject ret = new JSONObject();
String busiDesc = "追踪/取消" + this.getModuleDesc();
Context context = this.getContext();
try {
CareConstraintEntity entity = this.service.get(id, context);
if (entity == null) {
throw new Exception(busiDesc + ",不存在或已被删除");
}
if(entity.getTrack()==1){
entity.setTrack(0);
}else {
entity.setTrack(1);
}
entity.setUpdateTime(new Date());
IUser user = this.getCurUser();
if (user != null) {
entity.setUpdateUserId(user.getId());
entity.setUpdateUser(user.getLoginName());
entity.setUpdateUserName(user.getRealName());
entity.setUpdateUserDeptId(user.getDeptId());
entity.setUpdateUserDeptName(user.getDeptName());
}
this.service.update(entity,context);
ret.put("data", entity);
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
this.recordSysLog(this.request, busiDesc + " 【成功】");
}
} catch (Exception var8) {
this.doException(this.request, busiDesc, model, var8);
Object msg = model.get("message_info");
return this.createFailJsonResp(msg == null ? "系统异常" : msg.toString());
}
this.init(model, context);
ret.put("code", 1);
ret.put("msg", model.remove("message_info"));
ret.put("dict", model.remove("dict"));
return ret.toJSONString();
}
}
}
\ No newline at end of file
......@@ -20,34 +20,42 @@ public class PersonEntity extends PersonVo {
/**
* 站点Id
*/
@Excel(name = "站点ID")
private Long siteId;
/**
* 站点名称
*/
@Excel(name = "站点名称")
private String siteName;
/**
* 用户名称
*/
@Excel(name = "姓名")
private String name;
/**
* 身份证号码
*/
@Excel(name = "身份证号码")
private String idCard;
/**
* 性别(0.男,1.女)
*/
@Excel(name = "性别", readConverterExp = "0=男,1=女")
private Integer gender;
/**
* 手机号码
*/
@Excel(name = "手机号码")
private String phone;
/**
* 出生日期
*/
@Excel(name = "出生日期",width = 30, dateFormat = "yyyy-MM-dd")
private Date birthday;
/**
* 家庭住址
*/
@Excel(name = "家庭住址")
private String address;
/**
* 本地照片路径
......@@ -68,10 +76,12 @@ public class PersonEntity extends PersonVo {
/**
* 注册人员来源(0.预约系统,1.排队叫号系统,2.自助服务系统,3.海康,99.其它)
*/
@Excel(name = "注册人员来源", readConverterExp = "0=预约系统,1=排队叫号系统,2=自助服务系统,3=海康,99=其它")
private Integer source;
/**
* 是否添加到海康人脸库(0.否,1.是)
*/
@Excel(name = "是否添加到海康人脸库", readConverterExp = "0=否,1=是")
private Integer inFaceHk;
/**
* 人脸的唯一标识
......
......@@ -14,6 +14,4 @@ import lombok.Data;
@Data
public class PersonVo extends BaseEntityLong {
@Excel(name = "性别", readConverterExp = "0=男,1.女")
private Integer gender;
}
\ No newline at end of file
......@@ -10,5 +10,8 @@ import lombok.Data;
*/
@Data
public class RealtimeDataflowVo extends BaseEntityLong {
/** 开始 监测时间 */
private String detectTimeStart;
/** 结束 监测时间 */
private String detectTimeEnd;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment