Merge remote-tracking branch 'origin/master'

master
wanglei 2 years ago
commit 0fd59e1256

@ -33,4 +33,6 @@
#影源扫描仪 授权码V4tMKPYgFtW8vQr4C0s4/g== #影源扫描仪 授权码V4tMKPYgFtW8vQr4C0s4/g==
测试临时码D+1WT4eWDqLseG5433yq9w== 测试临时码D+1WT4eWDqLseG5433yq9w==
#系统中扫描上传 连接打印机的电脑需要安装两个扫描仪驱动M3230.zip、webscan.exe插件 (已上传到项目) #系统中扫描上传 连接打印机的电脑需要安装两个扫描仪驱动M3230.zip、webscan.exe插件 (已上传到项目)
#TODO timeout时间修改 第三方接口修改

@ -90,6 +90,8 @@ spring:
# token配置 # token配置
token: token:
#是否允许账户多终端同时登录true允许 false不允许
soloLogin: true
# 令牌自定义标识 # 令牌自定义标识
header: Authorization header: Authorization
# 令牌密钥 # 令牌密钥

@ -1,8 +1,9 @@
package com.da.common.constant; package com.da.common.constant;
import java.util.Locale;
import io.jsonwebtoken.Claims; import io.jsonwebtoken.Claims;
import java.util.Locale;
/** /**
* *
* *
@ -10,6 +11,11 @@ import io.jsonwebtoken.Claims;
*/ */
public class Constants public class Constants
{ {
/**
* redis key
*/
public static final String LOGIN_USERID_KEY = "login_userid:";
/** /**
* UTF-8 * UTF-8
*/ */

@ -1,18 +1,22 @@
package com.da.dangan.controller; package com.da.dangan.controller;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import com.alibaba.fastjson2.JSONArray;
import com.da.common.config.RuoYiConfig; import com.da.common.config.RuoYiConfig;
import com.da.common.core.controller.BaseController; import com.da.common.core.controller.BaseController;
import com.da.common.core.domain.AjaxResult; import com.da.common.core.domain.AjaxResult;
import com.da.common.utils.file.FileUploadUtils; import com.da.common.utils.file.FileUploadUtils;
import com.da.common.utils.file.FileUtils; import com.da.common.utils.file.FileUtils;
import com.da.dangan.domain.DaCzrkdj;
import com.da.dangan.domain.DaPicturesRecard; import com.da.dangan.domain.DaPicturesRecard;
import com.da.dangan.domain.vo.CzrkDatas;
import com.da.dangan.domain.vo.PicParams; import com.da.dangan.domain.vo.PicParams;
import com.da.dangan.service.IDaBirthDjService; import com.da.dangan.service.IDaBirthDjService;
import com.da.dangan.service.IDaCzrkdjService; import com.da.dangan.service.IDaCzrkdjService;
import com.da.dangan.service.IDaPicturesRecardService; import com.da.dangan.service.IDaPicturesRecardService;
import com.da.dangan.util.CallThirdInterface; import com.da.dangan.util.CallThirdInterface;
import com.da.framework.config.ServerConfig; import com.da.framework.config.ServerConfig;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
@ -111,11 +115,15 @@ public class DangAnCollectController extends BaseController {
*/ */
@PostMapping("/recongnize") @PostMapping("/recongnize")
public AjaxResult recognize(@RequestBody List<DaPicturesRecard> picRecards) { public AjaxResult recognize(@RequestBody List<DaPicturesRecard> picRecards) {
String code;
String msg;
int success;
int total;
try { try {
//取所有id的集合 //取所有id的集合
List<Long> ids = picRecards.stream().map(DaPicturesRecard::getId).collect(Collectors.toList()); List<Long> ids = picRecards.stream().map(DaPicturesRecard::getId).collect(Collectors.toList());
String ywType = picRecards.get(0).getYwType(); String ywType = picRecards.get(0).getYwType();
String singleOrDouble = picRecards.get(0).getSingelOrDouble(); // String singleOrDouble = picRecards.get(0).getSingelOrDouble();
//获取所有的文件 //获取所有的文件
List<File> files = new ArrayList<>(); List<File> files = new ArrayList<>();
for (DaPicturesRecard picRecard : picRecards) { for (DaPicturesRecard picRecard : picRecards) {
@ -124,7 +132,7 @@ public class DangAnCollectController extends BaseController {
files.add(file); files.add(file);
} }
// TODO————————多线程循环调用第三方接口 // TODO————————多线程循环调用第三方接口
long start =System.currentTimeMillis(); long start = System.currentTimeMillis();
/*List<CompletableFuture<String>> futures = new ArrayList<>(); /*List<CompletableFuture<String>> futures = new ArrayList<>();
List<String> results = new ArrayList<>(); List<String> results = new ArrayList<>();
for(File file :files){ for(File file :files){
@ -140,21 +148,25 @@ public class DangAnCollectController extends BaseController {
long end =System.currentTimeMillis(); long end =System.currentTimeMillis();
logger.info("CompletableFuture耗时--——————————————————》"+ (end-start)+"ms");*/ logger.info("CompletableFuture耗时--——————————————————》"+ (end-start)+"ms");*/
//不使用循环调用接口 直接传递数组 //不使用循环调用接口 直接传递数组
String result = CallThirdInterface.callThirdInterface(url, files, ywType,ids); String result = CallThirdInterface.callThirdInterface(url, files, ywType, ids);
long end =System.currentTimeMillis(); long end = System.currentTimeMillis();
logger.info("CompletableFuture耗时--——————————————————》"+ (end-start)+"ms"); logger.info("CompletableFuture耗时--——————————————————》" + (end - start) + "ms");
//如果result中的code=0代表结果错误 //! 解析JSON字符串,获取键对应的值
// 解析JSON字符串
//! 获取键对应的值
JSONObject jsonobject = new JSONObject(result); JSONObject jsonobject = new JSONObject(result);
String code = jsonobject.getStr("code"); code = jsonobject.getStr("code");
String msg = jsonobject.getStr("msg"); msg = jsonobject.getStr("msg");
int success = jsonobject.getInt("success"); success = jsonobject.getInt("success");
int total = jsonobject.getInt("total"); total = jsonobject.getInt("total");
Long[] failPicids = (Long[])jsonobject.getJSONArray("failPicid").toArray(); //如果code=0 识别失败,直接返回
String datas = jsonobject.getStr("datas"); if (code.equals("0")) {
return AjaxResult.error(msg + ", 成功:" + success + " , 总共:" + total);
// TODO 数据解析 根据业务类型存储识别后的信息 } else {
//识别接口方说:多张识别,要么全识别成功,要么一张也识别不成功 ,所以---------failPicids暂时不用 失败则全失败
// String failPicid=jsonobject.getStr("msg");
String datas = jsonobject.getStr("datas");
// TODO 数据解析 根据业务类型存储识别后的信息
/*<option value="option1">1</option> <option value="option2"></option> /*<option value="option1">1</option> <option value="option2"></option>
<option value="option3">2</option> <option value="option3">2</option>
<option value="option4"></option> <option value="option4"></option>
@ -163,15 +175,43 @@ public class DangAnCollectController extends BaseController {
<option value="option7"></option> <option value="option7"></option>
<option value="option8"></option> <option value="option8"></option>
<option value="option9">3</option>*/ <option value="option9">3</option>*/
Long dajlId=null; Long dajlId = null;
switch(ywType){ switch (ywType) {
case "option1" : case "option1":
//break;
case "option2":
// break;
case "option3":
//break;
case "option9":
//获取常住人口信息集合
List<CzrkDatas> czrkDatas = JSONArray.parseArray(datas, CzrkDatas.class);
for (CzrkDatas czrkData : czrkDatas) {
List<Long> picid = czrkData.getPicid();
// 将Long类型映射为String类型, 并将Stream转换为数组
String[] spicId = picid.stream().map(Object::toString).toArray(String[]::new);
String picIds = StringUtils.join(spicId, ",");//分号分割
//存储图片url
List<String> picUrls = picRecards.stream().map(DaPicturesRecard::getPicUrl).collect(Collectors.toList());
String[] pics = picUrls.stream().map(Object::toString).toArray(String[]::new);
String pictures = StringUtils.join(pics, ",");//分号分割
List<DaCzrkdj> info = czrkData.getInfo();
if(info!=null&&info.size()>0) {
for (DaCzrkdj daCzrkdj : info) {
daCzrkdj.setAllPicIds(picIds);
daCzrkdj.setAllPics(pictures);
daCzrkdj.setPicIds(picIds);
daCzrkdj.setPictures(pictures);
daCzrkdjService.insertDaCzrkdj(daCzrkdj);
}
}
}
break;
case "option2" :
break;
case "option3" :
/*DaCzrkdj daCzrkdj = new DaCzrkdj(); /*DaCzrkdj daCzrkdj = new DaCzrkdj();
daCzrkdj.setAllPicIds(picIds); daCzrkdj.setAllPicIds(picIds);
daCzrkdj.setAllPics(); daCzrkdj.setAllPics();
@ -180,36 +220,34 @@ public class DangAnCollectController extends BaseController {
daCzrkdjService.insertDaCzrkdj(); daCzrkdjService.insertDaCzrkdj();
//将插入后的id反写回来 //将插入后的id反写回来
dajlid=daCzrkdj.getId();*/ dajlid=daCzrkdj.getId();*/
break; break;
case "option4" : case "option4":
break;
case "option5" :
break;
case "option6" :
break; break;
case "option7" : case "option5":
break; break;
case "option8" : case "option6":
break; break;
case "option9" : case "option7":
break; break;
} case "option8":
//识别成功的图片 ,修改图片信息记录表为已识别 可以用多线程 break;
for (DaPicturesRecard picRecard : picRecards) { }
picRecard.setRecognize("1"); //识别成功的图片 ,修改图片信息记录表为已识别 可以用多线程
daPicturesRecardService.updateDaPicturesRecard(picRecard); for (DaPicturesRecard picRecard : picRecards) {
picRecard.setRecognize("1");
daPicturesRecardService.updateDaPicturesRecard(picRecard);
}
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return AjaxResult.error(e.getMessage()); return AjaxResult.error(e.getMessage());
} }
// return AjaxResult.success("成功:"+success+" , 总共:"+total);
return AjaxResult.success(); return AjaxResult.success();
} }
@ -222,8 +260,8 @@ public class DangAnCollectController extends BaseController {
List<DaPicturesRecard> uncheked = params.getUnchecked(); List<DaPicturesRecard> uncheked = params.getUnchecked();
String singleOrDouble = params.getSingeOrDouble(); String singleOrDouble = params.getSingeOrDouble();
//拼接所有的图片 //拼接所有的图片
List<DaPicturesRecard> listAll =checked; List<DaPicturesRecard> listAll = checked;
if(uncheked!=null&&uncheked.size()>0){ if (uncheked != null && uncheked.size() > 0) {
listAll.addAll(uncheked); listAll.addAll(uncheked);
} }
//参数checked id的集合 //参数checked id的集合
@ -235,7 +273,7 @@ public class DangAnCollectController extends BaseController {
System.out.println(allIds.toString()); System.out.println(allIds.toString());
if(checked!=null&&checked.size()>0){ if (checked != null && checked.size() > 0) {
try { try {
String ywType = checked.get(0).getYwType(); String ywType = checked.get(0).getYwType();
//获取所有的文件 //获取所有的文件
@ -246,12 +284,12 @@ public class DangAnCollectController extends BaseController {
files.add(file); files.add(file);
} }
// TODO————————多线程循环调用第三方接口 // TODO————————多线程循环调用第三方接口
long start =System.currentTimeMillis(); long start = System.currentTimeMillis();
//参数:地址、文件、业务类型、单双面: 1单面 2双面 //参数:地址、文件、业务类型、单双面: 1单面 2双面
//String result = CallThirdInterface.callThirdInterface(url, files, ywType,singleOrDouble,ids); //String result = CallThirdInterface.callThirdInterface(url, files, ywType,singleOrDouble,ids);
String result = CallThirdInterface.callThirdInterface(url, files, ywType,ids); String result = CallThirdInterface.callThirdInterface(url, files, ywType, ids);
long end =System.currentTimeMillis(); long end = System.currentTimeMillis();
logger.info("CompletableFuture耗时--——————————————————》"+ (end-start)+"ms"); logger.info("CompletableFuture耗时--——————————————————》" + (end - start) + "ms");
// TODO 根据业务类型存储识别后的信息 // TODO 根据业务类型存储识别后的信息
/*<option value="option1">1</option> /*<option value="option1">1</option>
@ -263,15 +301,15 @@ public class DangAnCollectController extends BaseController {
<option value="option7"></option> <option value="option7"></option>
<option value="option8"></option> <option value="option8"></option>
<option value="option9">3</option>*/ <option value="option9">3</option>*/
Long dajlId=null; Long dajlId = null;
switch(ywType){ switch (ywType) {
case "option1" : case "option1":
break; break;
case "option2" : case "option2":
break; break;
case "option3" : case "option3":
/*DaCzrkdj daCzrkdj = new DaCzrkdj(); /*DaCzrkdj daCzrkdj = new DaCzrkdj();
daCzrkdj.setAllPicIds(picIds); daCzrkdj.setAllPicIds(picIds);
daCzrkdj.setAllPics(); daCzrkdj.setAllPics();
@ -281,31 +319,31 @@ public class DangAnCollectController extends BaseController {
//将插入后的id反写回来 //将插入后的id反写回来
dajlid=daCzrkdj.getId();*/ dajlid=daCzrkdj.getId();*/
break; break;
case "option4" : case "option4":
break; break;
case "option5" : case "option5":
break; break;
case "option6" : case "option6":
break; break;
case "option7" : case "option7":
break; break;
case "option8" : case "option8":
break; break;
case "option9" : case "option9":
break; break;
} }
//识别成功的图片 ,修改图片信息记录表为已识别 可以用多线程 //识别成功的图片 ,修改图片信息记录表为已识别 可以用多线程
for (DaPicturesRecard picRecard : checked) { for (DaPicturesRecard picRecard : checked) {
picRecard.setRecognize("1"); picRecard.setRecognize("1");
daPicturesRecardService.updateDaPicturesRecard(picRecard); daPicturesRecardService.updateDaPicturesRecard(picRecard);
} }
/*if(uncheked!=null&&uncheked.size()>0){ /*if(uncheked!=null&&uncheked.size()>0){
for (DaPicturesRecard picRecard : uncheked) { for (DaPicturesRecard picRecard : uncheked) {
@ -320,7 +358,7 @@ public class DangAnCollectController extends BaseController {
e.printStackTrace(); e.printStackTrace();
return AjaxResult.error(e.getMessage()); return AjaxResult.error(e.getMessage());
} }
}else{ } else {
return AjaxResult.error("请选择需要识别的图片"); return AjaxResult.error("请选择需要识别的图片");
} }
@ -331,8 +369,23 @@ public class DangAnCollectController extends BaseController {
* test * test
*/ */
@PostMapping("/test3") @PostMapping("/test3")
public String test(@RequestParam ("files")MultipartFile[] files,@RequestParam ("datas")Long[] datas){ public String test() {
return datas.toString(); String result = "{\"code\": 0, \"datas\": [{\"Picid\": [\"21\"], \"info\": [{\"name\":\"333\"},{\"name\":\"111\"}]}, {\"Picid\": [\"22\"], \"info\":[]]}]}";
JSONObject jsonobject = new JSONObject(result);
String code = jsonobject.getStr("code");
String msg = jsonobject.getStr("msg");
Integer success = jsonobject.getInt("success");
Integer total = jsonobject.getInt("total");
//识别接口方说:多张识别,要么全识别成功,要么一张也识别不成功 ,所以---------failPicids暂时不用 失败则全失败
// String failPicid=jsonobject.getStr("msg");
String datas = jsonobject.getStr("datas");
//获取常住人口信息集合
List<CzrkDatas> czrkDatas = JSONArray.parseArray(datas, CzrkDatas.class);
System.out.println(czrkDatas.get(1).getInfo()==null);
System.out.println(czrkDatas.get(1).getInfo().size());
System.out.println(czrkDatas.get(0).getInfo().get(0).getName());
return "datas.toString()";
} }
/** /**
@ -409,7 +462,7 @@ public class DangAnCollectController extends BaseController {
/** /**
* *
*/ */
@GetMapping("/progress") @GetMapping("/progress")
public ResponseEntity<Double> getProgress() { public ResponseEntity<Double> getProgress() {
@ -432,7 +485,7 @@ public class DangAnCollectController extends BaseController {
multipartFile.transferTo(file); multipartFile.transferTo(file);
fileList.add(file); fileList.add(file);
} }
String result = CallThirdInterface.callThirdInterface(url, fileList, fileType,new ArrayList<>()); String result = CallThirdInterface.callThirdInterface(url, fileList, fileType, new ArrayList<>());
return result; return result;
} }

@ -54,6 +54,18 @@ public class DaPicturesRecard extends BaseEntity
@Excel(name = "是否已识别") @Excel(name = "是否已识别")
private String recognize; private String recognize;
/** 是否纠错(字典0否1是) */
@Excel(name = "是否纠错(字典0否1是)")
private String errorCorrect;
public String getErrorCorrect() {
return errorCorrect;
}
public void setErrorCorrect(String errorCorrect) {
this.errorCorrect = errorCorrect;
}
/**传递参数使用 单双面 0单面 1双面 */ /**传递参数使用 单双面 0单面 1双面 */
private String singelOrDouble; private String singelOrDouble;
@ -189,6 +201,7 @@ public class DaPicturesRecard extends BaseEntity
.append("ywType", getYwType()) .append("ywType", getYwType())
.append("daJlId", getDaJlId()) .append("daJlId", getDaJlId())
.append("recognize", getRecognize()) .append("recognize", getRecognize())
.append("errorCorrect", getErrorCorrect())
.append("singeOrDouble", getSingelOrDouble()) .append("singeOrDouble", getSingelOrDouble())
.append("czrkdj", getCzrkdj()) .append("czrkdj", getCzrkdj())
.append("csdj", getCsdj()) .append("csdj", getCsdj())

@ -1,17 +1,18 @@
package com.da.dangan.domain; package com.da.dangan.domain;
import java.util.Date; import com.da.common.annotation.Excel;
import com.da.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.da.common.annotation.Excel;
import com.da.common.core.domain.BaseEntity; import java.util.Date;
/** /**
* da_zqz * da_zqz
* *
* @author hs * @author hs
* @date 2024-06-14 * @date 2024-06-15
*/ */
public class DaZqz extends BaseEntity public class DaZqz extends BaseEntity
{ {
@ -60,6 +61,11 @@ public class DaZqz extends BaseEntity
@Excel(name = "性别1") @Excel(name = "性别1")
private String sex1; private String sex1;
/** 出生日期1 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出生日期1", width = 30, dateFormat = "yyyy-MM-dd")
private Date birthDate1;
/** 身份证号1 */ /** 身份证号1 */
@Excel(name = "身份证号1") @Excel(name = "身份证号1")
private String cardId1; private String cardId1;
@ -76,6 +82,11 @@ public class DaZqz extends BaseEntity
@Excel(name = "性别2") @Excel(name = "性别2")
private String sex2; private String sex2;
/** 出生日期2 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出生日期2", width = 30, dateFormat = "yyyy-MM-dd")
private Date birthDate2;
/** 身份证号2 */ /** 身份证号2 */
@Excel(name = "身份证号2") @Excel(name = "身份证号2")
private String cardId2; private String cardId2;
@ -88,6 +99,11 @@ public class DaZqz extends BaseEntity
@Excel(name = "姓名3") @Excel(name = "姓名3")
private String name3; private String name3;
/** 出生日期3 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出生日期3", width = 30, dateFormat = "yyyy-MM-dd")
private Date birthDate3;
/** 性别3 */ /** 性别3 */
@Excel(name = "性别3") @Excel(name = "性别3")
private String sex3; private String sex3;
@ -108,6 +124,11 @@ public class DaZqz extends BaseEntity
@Excel(name = "性别4") @Excel(name = "性别4")
private String sex4; private String sex4;
/** 出生日期4 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出生日期4", width = 30, dateFormat = "yyyy-MM-dd")
private Date birthDate4;
/** 身份证号4 */ /** 身份证号4 */
@Excel(name = "身份证号4") @Excel(name = "身份证号4")
private String cardId4; private String cardId4;
@ -173,354 +194,390 @@ public class DaZqz extends BaseEntity
@Excel(name = "审核原由") @Excel(name = "审核原由")
private String auditReason; private String auditReason;
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
} }
public Long getId() public Long getId()
{ {
return id; return id;
} }
public void setYwType(String ywType) public void setYwType(String ywType)
{ {
this.ywType = ywType; this.ywType = ywType;
} }
public String getYwType() public String getYwType()
{ {
return ywType; return ywType;
} }
public void setMuId(Long muId) public void setMuId(Long muId)
{ {
this.muId = muId; this.muId = muId;
} }
public Long getMuId() public Long getMuId()
{ {
return muId; return muId;
} }
public void setNum(String num) public void setNum(String num)
{ {
this.num = num; this.num = num;
} }
public String getNum() public String getNum()
{ {
return num; return num;
} }
public void setName(String name) public void setName(String name)
{ {
this.name = name; this.name = name;
} }
public String getName() public String getName()
{ {
return name; return name;
} }
public void setCardId(String cardId) public void setCardId(String cardId)
{ {
this.cardId = cardId; this.cardId = cardId;
} }
public String getCardId() public String getCardId()
{ {
return cardId; return cardId;
} }
public void setAddress(String address) public void setAddress(String address)
{ {
this.address = address; this.address = address;
} }
public String getAddress() public String getAddress()
{ {
return address; return address;
} }
public void setDjJg(String djJg) public void setDjJg(String djJg)
{ {
this.djJg = djJg; this.djJg = djJg;
} }
public String getDjJg() public String getDjJg()
{ {
return djJg; return djJg;
} }
public void setRelation1(String relation1) public void setRelation1(String relation1)
{ {
this.relation1 = relation1; this.relation1 = relation1;
} }
public String getRelation1() public String getRelation1()
{ {
return relation1; return relation1;
} }
public void setName1(String name1) public void setName1(String name1)
{ {
this.name1 = name1; this.name1 = name1;
} }
public String getName1() public String getName1()
{ {
return name1; return name1;
} }
public void setSex1(String sex1) public void setSex1(String sex1)
{ {
this.sex1 = sex1; this.sex1 = sex1;
} }
public String getSex1() public String getSex1()
{ {
return sex1; return sex1;
} }
public void setCardId1(String cardId1) public void setBirthDate1(Date birthDate1)
{
this.birthDate1 = birthDate1;
}
public Date getBirthDate1()
{
return birthDate1;
}
public void setCardId1(String cardId1)
{ {
this.cardId1 = cardId1; this.cardId1 = cardId1;
} }
public String getCardId1() public String getCardId1()
{ {
return cardId1; return cardId1;
} }
public void setRelation2(String relation2) public void setRelation2(String relation2)
{ {
this.relation2 = relation2; this.relation2 = relation2;
} }
public String getRelation2() public String getRelation2()
{ {
return relation2; return relation2;
} }
public void setName2(String name2) public void setName2(String name2)
{ {
this.name2 = name2; this.name2 = name2;
} }
public String getName2() public String getName2()
{ {
return name2; return name2;
} }
public void setSex2(String sex2) public void setSex2(String sex2)
{ {
this.sex2 = sex2; this.sex2 = sex2;
} }
public String getSex2() public String getSex2()
{ {
return sex2; return sex2;
} }
public void setCardId2(String cardId2) public void setBirthDate2(Date birthDate2)
{
this.birthDate2 = birthDate2;
}
public Date getBirthDate2()
{
return birthDate2;
}
public void setCardId2(String cardId2)
{ {
this.cardId2 = cardId2; this.cardId2 = cardId2;
} }
public String getCardId2() public String getCardId2()
{ {
return cardId2; return cardId2;
} }
public void setRelation3(String relation3) public void setRelation3(String relation3)
{ {
this.relation3 = relation3; this.relation3 = relation3;
} }
public String getRelation3() public String getRelation3()
{ {
return relation3; return relation3;
} }
public void setName3(String name3) public void setName3(String name3)
{ {
this.name3 = name3; this.name3 = name3;
} }
public String getName3() public String getName3()
{ {
return name3; return name3;
} }
public void setSex3(String sex3) public void setBirthDate3(Date birthDate3)
{
this.birthDate3 = birthDate3;
}
public Date getBirthDate3()
{
return birthDate3;
}
public void setSex3(String sex3)
{ {
this.sex3 = sex3; this.sex3 = sex3;
} }
public String getSex3() public String getSex3()
{ {
return sex3; return sex3;
} }
public void setCardId3(String cardId3) public void setCardId3(String cardId3)
{ {
this.cardId3 = cardId3; this.cardId3 = cardId3;
} }
public String getCardId3() public String getCardId3()
{ {
return cardId3; return cardId3;
} }
public void setRelation4(String relation4) public void setRelation4(String relation4)
{ {
this.relation4 = relation4; this.relation4 = relation4;
} }
public String getRelation4() public String getRelation4()
{ {
return relation4; return relation4;
} }
public void setName4(String name4) public void setName4(String name4)
{ {
this.name4 = name4; this.name4 = name4;
} }
public String getName4() public String getName4()
{ {
return name4; return name4;
} }
public void setSex4(String sex4) public void setSex4(String sex4)
{ {
this.sex4 = sex4; this.sex4 = sex4;
} }
public String getSex4() public String getSex4()
{ {
return sex4; return sex4;
} }
public void setCardId4(String cardId4) public void setBirthDate4(Date birthDate4)
{
this.birthDate4 = birthDate4;
}
public Date getBirthDate4()
{
return birthDate4;
}
public void setCardId4(String cardId4)
{ {
this.cardId4 = cardId4; this.cardId4 = cardId4;
} }
public String getCardId4() public String getCardId4()
{ {
return cardId4; return cardId4;
} }
public void setFwdw(String fwdw) public void setFwdw(String fwdw)
{ {
this.fwdw = fwdw; this.fwdw = fwdw;
} }
public String getFwdw() public String getFwdw()
{ {
return fwdw; return fwdw;
} }
public void setQrAddress(String qrAddress) public void setQrAddress(String qrAddress)
{ {
this.qrAddress = qrAddress; this.qrAddress = qrAddress;
} }
public String getQrAddress() public String getQrAddress()
{ {
return qrAddress; return qrAddress;
} }
public void setZqReason(String zqReason) public void setZqReason(String zqReason)
{ {
this.zqReason = zqReason; this.zqReason = zqReason;
} }
public String getZqReason() public String getZqReason()
{ {
return zqReason; return zqReason;
} }
public void setPzjg(String pzjg) public void setPzjg(String pzjg)
{ {
this.pzjg = pzjg; this.pzjg = pzjg;
} }
public String getPzjg() public String getPzjg()
{ {
return pzjg; return pzjg;
} }
public void setCbr(String cbr) public void setCbr(String cbr)
{ {
this.cbr = cbr; this.cbr = cbr;
} }
public String getCbr() public String getCbr()
{ {
return cbr; return cbr;
} }
public void setQfDate(Date qfDate) public void setQfDate(Date qfDate)
{ {
this.qfDate = qfDate; this.qfDate = qfDate;
} }
public Date getQfDate() public Date getQfDate()
{ {
return qfDate; return qfDate;
} }
public void setPicIds(String picIds) public void setPicIds(String picIds)
{ {
this.picIds = picIds; this.picIds = picIds;
} }
public String getPicIds() public String getPicIds()
{ {
return picIds; return picIds;
} }
public void setPictures(String pictures) public void setPictures(String pictures)
{ {
this.pictures = pictures; this.pictures = pictures;
} }
public String getPictures() public String getPictures()
{ {
return pictures; return pictures;
} }
public void setAllPicIds(String allPicIds) public void setAllPicIds(String allPicIds)
{ {
this.allPicIds = allPicIds; this.allPicIds = allPicIds;
} }
public String getAllPicIds() public String getAllPicIds()
{ {
return allPicIds; return allPicIds;
} }
public void setAllPics(String allPics) public void setAllPics(String allPics)
{ {
this.allPics = allPics; this.allPics = allPics;
} }
public String getAllPics() public String getAllPics()
{ {
return allPics; return allPics;
} }
public void setErrorCorrect(String errorCorrect) public void setErrorCorrect(String errorCorrect)
{ {
this.errorCorrect = errorCorrect; this.errorCorrect = errorCorrect;
} }
public String getErrorCorrect() public String getErrorCorrect()
{ {
return errorCorrect; return errorCorrect;
} }
public void setAuditStatus(String auditStatus) public void setAuditStatus(String auditStatus)
{ {
this.auditStatus = auditStatus; this.auditStatus = auditStatus;
} }
public String getAuditStatus() public String getAuditStatus()
{ {
return auditStatus; return auditStatus;
} }
public void setAuditName(String auditName) public void setAuditName(String auditName)
{ {
this.auditName = auditName; this.auditName = auditName;
} }
public String getAuditName() public String getAuditName()
{ {
return auditName; return auditName;
} }
public void setAuditResult(String auditResult) public void setAuditResult(String auditResult)
{ {
this.auditResult = auditResult; this.auditResult = auditResult;
} }
public String getAuditResult() public String getAuditResult()
{ {
return auditResult; return auditResult;
} }
public void setAuditReason(String auditReason) public void setAuditReason(String auditReason)
{ {
this.auditReason = auditReason; this.auditReason = auditReason;
} }
public String getAuditReason() public String getAuditReason()
{ {
return auditReason; return auditReason;
} }
@ -528,50 +585,54 @@ public class DaZqz extends BaseEntity
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("ywType", getYwType()) .append("ywType", getYwType())
.append("muId", getMuId()) .append("muId", getMuId())
.append("num", getNum()) .append("num", getNum())
.append("name", getName()) .append("name", getName())
.append("cardId", getCardId()) .append("cardId", getCardId())
.append("address", getAddress()) .append("address", getAddress())
.append("djJg", getDjJg()) .append("djJg", getDjJg())
.append("relation1", getRelation1()) .append("relation1", getRelation1())
.append("name1", getName1()) .append("name1", getName1())
.append("sex1", getSex1()) .append("sex1", getSex1())
.append("cardId1", getCardId1()) .append("birthDate1", getBirthDate1())
.append("relation2", getRelation2()) .append("cardId1", getCardId1())
.append("name2", getName2()) .append("relation2", getRelation2())
.append("sex2", getSex2()) .append("name2", getName2())
.append("cardId2", getCardId2()) .append("sex2", getSex2())
.append("relation3", getRelation3()) .append("birthDate2", getBirthDate2())
.append("name3", getName3()) .append("cardId2", getCardId2())
.append("sex3", getSex3()) .append("relation3", getRelation3())
.append("cardId3", getCardId3()) .append("name3", getName3())
.append("relation4", getRelation4()) .append("birthDate3", getBirthDate3())
.append("name4", getName4()) .append("sex3", getSex3())
.append("sex4", getSex4()) .append("cardId3", getCardId3())
.append("cardId4", getCardId4()) .append("relation4", getRelation4())
.append("fwdw", getFwdw()) .append("name4", getName4())
.append("qrAddress", getQrAddress()) .append("sex4", getSex4())
.append("zqReason", getZqReason()) .append("birthDate4", getBirthDate4())
.append("pzjg", getPzjg()) .append("cardId4", getCardId4())
.append("cbr", getCbr()) .append("fwdw", getFwdw())
.append("qfDate", getQfDate()) .append("qrAddress", getQrAddress())
.append("picIds", getPicIds()) .append("zqReason", getZqReason())
.append("pictures", getPictures()) .append("pzjg", getPzjg())
.append("allPicIds", getAllPicIds()) .append("cbr", getCbr())
.append("allPics", getAllPics()) .append("qfDate", getQfDate())
.append("errorCorrect", getErrorCorrect()) .append("picIds", getPicIds())
.append("auditStatus", getAuditStatus()) .append("pictures", getPictures())
.append("auditName", getAuditName()) .append("allPicIds", getAllPicIds())
.append("auditResult", getAuditResult()) .append("allPics", getAllPics())
.append("auditReason", getAuditReason()) .append("errorCorrect", getErrorCorrect())
.append("remark", getRemark()) .append("auditStatus", getAuditStatus())
.append("createBy", getCreateBy()) .append("auditName", getAuditName())
.append("createTime", getCreateTime()) .append("auditResult", getAuditResult())
.append("updateBy", getUpdateBy()) .append("auditReason", getAuditReason())
.append("updateTime", getUpdateTime()) .append("remark", getRemark())
.toString(); .append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
} }
} }

@ -0,0 +1,26 @@
package com.da.dangan.domain.vo;
import com.da.dangan.domain.DaBirthDj;
import java.util.List;
public class CszmDatas {
private List<Long> Picid;
private List<DaBirthDj> info;
public List<Long> getPicid() {
return Picid;
}
public void setPicid(List<Long> picid) {
Picid = picid;
}
public List<DaBirthDj> getInfo() {
return info;
}
public void setInfo(List<DaBirthDj> info) {
this.info = info;
}
}

@ -0,0 +1,26 @@
package com.da.dangan.domain.vo;
import com.da.dangan.domain.DaCzrkdj;
import java.util.List;
public class CzrkDatas {
private List<Long> Picid;
private List<DaCzrkdj> info;
public List<Long> getPicid() {
return Picid;
}
public void setPicid(List<Long> picid) {
Picid = picid;
}
public List<DaCzrkdj> getInfo() {
return info;
}
public void setInfo(List<DaCzrkdj> info) {
this.info = info;
}
}

@ -0,0 +1,26 @@
package com.da.dangan.domain.vo;
import com.da.dangan.domain.DaQyz;
import java.util.List;
public class QyzDatas {
private List<Long> Picid;
private List<DaQyz> info;
public List<Long> getPicid() {
return Picid;
}
public void setPicid(List<Long> picid) {
Picid = picid;
}
public List<DaQyz> getInfo() {
return info;
}
public void setInfo(List<DaQyz> info) {
this.info = info;
}
}

@ -0,0 +1,26 @@
package com.da.dangan.domain.vo;
import com.da.dangan.domain.DaYtzm;
import java.util.List;
public class YtzmDatas {
private List<Long> Picid;
private List<DaYtzm> info;
public List<Long> getPicid() {
return Picid;
}
public void setPicid(List<Long> picid) {
Picid = picid;
}
public List<DaYtzm> getInfo() {
return info;
}
public void setInfo(List<DaYtzm> info) {
this.info = info;
}
}

@ -0,0 +1,26 @@
package com.da.dangan.domain.vo;
import com.da.dangan.domain.DaZfnyhkcg;
import java.util.List;
public class ZfnyDatas {
private List<Long> Picid;
private List<DaZfnyhkcg> info;
public List<Long> getPicid() {
return Picid;
}
public void setPicid(List<Long> picid) {
Picid = picid;
}
public List<DaZfnyhkcg> getInfo() {
return info;
}
public void setInfo(List<DaZfnyhkcg> info) {
this.info = info;
}
}

@ -0,0 +1,26 @@
package com.da.dangan.domain.vo;
import com.da.dangan.domain.DaZqz;
import java.util.List;
public class ZqzDatas {
private List<Long> Picid;
private List<DaZqz> info;
public List<Long> getPicid() {
return Picid;
}
public void setPicid(List<Long> picid) {
Picid = picid;
}
public List<DaZqz> getInfo() {
return info;
}
public void setInfo(List<DaZqz> info) {
this.info = info;
}
}

@ -2,10 +2,13 @@ package com.da.dangan.service.impl;
import com.da.common.utils.DateUtils; import com.da.common.utils.DateUtils;
import com.da.dangan.domain.DaBirthDj; import com.da.dangan.domain.DaBirthDj;
import com.da.dangan.domain.DaPicturesRecard;
import com.da.dangan.mapper.DaBirthDjMapper; import com.da.dangan.mapper.DaBirthDjMapper;
import com.da.dangan.mapper.DaPicturesRecardMapper;
import com.da.dangan.service.IDaBirthDjService; import com.da.dangan.service.IDaBirthDjService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
@ -20,7 +23,8 @@ public class DaBirthDjServiceImpl implements IDaBirthDjService
{ {
@Autowired @Autowired
private DaBirthDjMapper daBirthDjMapper; private DaBirthDjMapper daBirthDjMapper;
@Autowired
private DaPicturesRecardMapper daPicturesRecardMapper;
/** /**
* *
* *
@ -65,8 +69,21 @@ public class DaBirthDjServiceImpl implements IDaBirthDjService
* @return * @return
*/ */
@Override @Override
@Transactional
public int updateDaBirthDj(DaBirthDj daBirthDj) public int updateDaBirthDj(DaBirthDj daBirthDj)
{ {
//修改纠错时 同步修改对应识别图片的纠错标识
if(daBirthDj.getErrorCorrect().equals("1")){
String picIds = daBirthDj.getPicIds();
String[] split = picIds.split(",");
for(String picId :split){
Long picid = Long.parseLong(picId);
DaPicturesRecard picturesRecard = new DaPicturesRecard();
picturesRecard.setId(picid);
picturesRecard.setErrorCorrect("1");
daPicturesRecardMapper.updateDaPicturesRecard(picturesRecard);
}
}
daBirthDj.setUpdateTime(DateUtils.getNowDate()); daBirthDj.setUpdateTime(DateUtils.getNowDate());
return daBirthDjMapper.updateDaBirthDj(daBirthDj); return daBirthDjMapper.updateDaBirthDj(daBirthDj);
} }

@ -2,10 +2,13 @@ package com.da.dangan.service.impl;
import com.da.common.utils.DateUtils; import com.da.common.utils.DateUtils;
import com.da.dangan.domain.DaCzrkdj; import com.da.dangan.domain.DaCzrkdj;
import com.da.dangan.domain.DaPicturesRecard;
import com.da.dangan.mapper.DaCzrkdjMapper; import com.da.dangan.mapper.DaCzrkdjMapper;
import com.da.dangan.mapper.DaPicturesRecardMapper;
import com.da.dangan.service.IDaCzrkdjService; import com.da.dangan.service.IDaCzrkdjService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
@ -20,7 +23,8 @@ public class DaCzrkdjServiceImpl implements IDaCzrkdjService
{ {
@Autowired @Autowired
private DaCzrkdjMapper daCzrkdjMapper; private DaCzrkdjMapper daCzrkdjMapper;
@Autowired
private DaPicturesRecardMapper daPicturesRecardMapper;
/** /**
* *
* *
@ -65,8 +69,20 @@ public class DaCzrkdjServiceImpl implements IDaCzrkdjService
* @return * @return
*/ */
@Override @Override
@Transactional
public int updateDaCzrkdj(DaCzrkdj daCzrkdj) public int updateDaCzrkdj(DaCzrkdj daCzrkdj)
{ { //修改纠错时 同步修改对应识别图片的纠错标识
if(daCzrkdj.getErrorCorrect().equals("1")){
String picIds = daCzrkdj.getPicIds();
String[] split = picIds.split(",");
for(String picId :split){
Long picid = Long.parseLong(picId);
DaPicturesRecard picturesRecard = new DaPicturesRecard();
picturesRecard.setId(picid);
picturesRecard.setErrorCorrect("1");
daPicturesRecardMapper.updateDaPicturesRecard(picturesRecard);
}
}
daCzrkdj.setUpdateTime(DateUtils.getNowDate()); daCzrkdj.setUpdateTime(DateUtils.getNowDate());
return daCzrkdjMapper.updateDaCzrkdj(daCzrkdj); return daCzrkdjMapper.updateDaCzrkdj(daCzrkdj);
} }

@ -1,11 +1,14 @@
package com.da.dangan.service.impl; package com.da.dangan.service.impl;
import com.da.common.utils.DateUtils; import com.da.common.utils.DateUtils;
import com.da.dangan.domain.DaPicturesRecard;
import com.da.dangan.domain.DaQyz; import com.da.dangan.domain.DaQyz;
import com.da.dangan.mapper.DaPicturesRecardMapper;
import com.da.dangan.mapper.DaQyzMapper; import com.da.dangan.mapper.DaQyzMapper;
import com.da.dangan.service.IDaQyzService; import com.da.dangan.service.IDaQyzService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
@ -20,7 +23,8 @@ public class DaQyzServiceImpl implements IDaQyzService
{ {
@Autowired @Autowired
private DaQyzMapper daQyzMapper; private DaQyzMapper daQyzMapper;
@Autowired
private DaPicturesRecardMapper daPicturesRecardMapper;
/** /**
* *
* *
@ -65,8 +69,21 @@ public class DaQyzServiceImpl implements IDaQyzService
* @return * @return
*/ */
@Override @Override
@Transactional
public int updateDaQyz(DaQyz daQyz) public int updateDaQyz(DaQyz daQyz)
{ {
//修改纠错时 同步修改对应识别图片的纠错标识
if(daQyz.getErrorCorrect().equals("1")){
String picIds = daQyz.getPicIds();
String[] split = picIds.split(",");
for(String picId :split){
Long picid = Long.parseLong(picId);
DaPicturesRecard picturesRecard = new DaPicturesRecard();
picturesRecard.setId(picid);
picturesRecard.setErrorCorrect("1");
daPicturesRecardMapper.updateDaPicturesRecard(picturesRecard);
}
}
daQyz.setUpdateTime(DateUtils.getNowDate()); daQyz.setUpdateTime(DateUtils.getNowDate());
return daQyzMapper.updateDaQyz(daQyz); return daQyzMapper.updateDaQyz(daQyz);
} }

@ -1,12 +1,16 @@
package com.da.dangan.service.impl; package com.da.dangan.service.impl;
import java.util.List;
import com.da.common.utils.DateUtils; import com.da.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import com.da.dangan.domain.DaPicturesRecard;
import org.springframework.stereotype.Service;
import com.da.dangan.mapper.DaYtzmMapper;
import com.da.dangan.domain.DaYtzm; import com.da.dangan.domain.DaYtzm;
import com.da.dangan.mapper.DaPicturesRecardMapper;
import com.da.dangan.mapper.DaYtzmMapper;
import com.da.dangan.service.IDaYtzmService; import com.da.dangan.service.IDaYtzmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/** /**
* Service * Service
@ -19,7 +23,8 @@ public class DaYtzmServiceImpl implements IDaYtzmService
{ {
@Autowired @Autowired
private DaYtzmMapper daYtzmMapper; private DaYtzmMapper daYtzmMapper;
@Autowired
private DaPicturesRecardMapper daPicturesRecardMapper;
/** /**
* *
* *
@ -64,8 +69,21 @@ public class DaYtzmServiceImpl implements IDaYtzmService
* @return * @return
*/ */
@Override @Override
@Transactional
public int updateDaYtzm(DaYtzm daYtzm) public int updateDaYtzm(DaYtzm daYtzm)
{ {
//修改纠错时 同步修改对应识别图片的纠错标识
if(daYtzm.getErrorCorrect().equals("1")){
String picIds = daYtzm.getPicIds();
String[] split = picIds.split(",");
for(String picId :split){
Long picid = Long.parseLong(picId);
DaPicturesRecard picturesRecard = new DaPicturesRecard();
picturesRecard.setId(picid);
picturesRecard.setErrorCorrect("1");
daPicturesRecardMapper.updateDaPicturesRecard(picturesRecard);
}
}
daYtzm.setUpdateTime(DateUtils.getNowDate()); daYtzm.setUpdateTime(DateUtils.getNowDate());
return daYtzmMapper.updateDaYtzm(daYtzm); return daYtzmMapper.updateDaYtzm(daYtzm);
} }

@ -1,12 +1,16 @@
package com.da.dangan.service.impl; package com.da.dangan.service.impl;
import java.util.List;
import com.da.common.utils.DateUtils; import com.da.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import com.da.dangan.domain.DaPicturesRecard;
import org.springframework.stereotype.Service;
import com.da.dangan.mapper.DaZfnyhkcgMapper;
import com.da.dangan.domain.DaZfnyhkcg; import com.da.dangan.domain.DaZfnyhkcg;
import com.da.dangan.mapper.DaPicturesRecardMapper;
import com.da.dangan.mapper.DaZfnyhkcgMapper;
import com.da.dangan.service.IDaZfnyhkcgService; import com.da.dangan.service.IDaZfnyhkcgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/** /**
* Service * Service
@ -19,7 +23,8 @@ public class DaZfnyhkcgServiceImpl implements IDaZfnyhkcgService
{ {
@Autowired @Autowired
private DaZfnyhkcgMapper daZfnyhkcgMapper; private DaZfnyhkcgMapper daZfnyhkcgMapper;
@Autowired
private DaPicturesRecardMapper daPicturesRecardMapper;
/** /**
* *
* *
@ -64,8 +69,21 @@ public class DaZfnyhkcgServiceImpl implements IDaZfnyhkcgService
* @return * @return
*/ */
@Override @Override
@Transactional
public int updateDaZfnyhkcg(DaZfnyhkcg daZfnyhkcg) public int updateDaZfnyhkcg(DaZfnyhkcg daZfnyhkcg)
{ {
//修改纠错时 同步修改对应识别图片的纠错标识
if(daZfnyhkcg.getErrorCorrect().equals("1")){
String picIds = daZfnyhkcg.getPicIds();
String[] split = picIds.split(",");
for(String picId :split){
Long picid = Long.parseLong(picId);
DaPicturesRecard picturesRecard = new DaPicturesRecard();
picturesRecard.setId(picid);
picturesRecard.setErrorCorrect("1");
daPicturesRecardMapper.updateDaPicturesRecard(picturesRecard);
}
}
daZfnyhkcg.setUpdateTime(DateUtils.getNowDate()); daZfnyhkcg.setUpdateTime(DateUtils.getNowDate());
return daZfnyhkcgMapper.updateDaZfnyhkcg(daZfnyhkcg); return daZfnyhkcgMapper.updateDaZfnyhkcg(daZfnyhkcg);
} }

@ -1,12 +1,16 @@
package com.da.dangan.service.impl; package com.da.dangan.service.impl;
import java.util.List;
import com.da.common.utils.DateUtils; import com.da.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import com.da.dangan.domain.DaPicturesRecard;
import org.springframework.stereotype.Service;
import com.da.dangan.mapper.DaZqzMapper;
import com.da.dangan.domain.DaZqz; import com.da.dangan.domain.DaZqz;
import com.da.dangan.mapper.DaPicturesRecardMapper;
import com.da.dangan.mapper.DaZqzMapper;
import com.da.dangan.service.IDaZqzService; import com.da.dangan.service.IDaZqzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/** /**
* Service * Service
@ -19,7 +23,8 @@ public class DaZqzServiceImpl implements IDaZqzService
{ {
@Autowired @Autowired
private DaZqzMapper daZqzMapper; private DaZqzMapper daZqzMapper;
@Autowired
private DaPicturesRecardMapper daPicturesRecardMapper;
/** /**
* *
* *
@ -64,8 +69,21 @@ public class DaZqzServiceImpl implements IDaZqzService
* @return * @return
*/ */
@Override @Override
@Transactional
public int updateDaZqz(DaZqz daZqz) public int updateDaZqz(DaZqz daZqz)
{ {
//修改纠错时 同步修改对应识别图片的纠错标识
if(daZqz.getErrorCorrect().equals("1")){
String picIds = daZqz.getPicIds();
String[] split = picIds.split(",");
for(String picId :split){
Long picid = Long.parseLong(picId);
DaPicturesRecard picturesRecard = new DaPicturesRecard();
picturesRecard.setId(picid);
picturesRecard.setErrorCorrect("1");
daPicturesRecardMapper.updateDaPicturesRecard(picturesRecard);
}
}
daZqz.setUpdateTime(DateUtils.getNowDate()); daZqz.setUpdateTime(DateUtils.getNowDate());
return daZqzMapper.updateDaZqz(daZqz); return daZqzMapper.updateDaZqz(daZqz);
} }

@ -3,7 +3,6 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.da.dangan.mapper.DaBirthDjMapper"> <mapper namespace="com.da.dangan.mapper.DaBirthDjMapper">
<resultMap type="DaBirthDj" id="DaBirthDjResult"> <resultMap type="DaBirthDj" id="DaBirthDjResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="ywType" column="yw_type" /> <result property="ywType" column="yw_type" />
@ -54,7 +53,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if> <if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and mu_id = #{muId}</if> <if test="muId != null "> and mu_id = #{muId}</if>
<if test="birthNum != null and birthNum != ''"> and birth_num = #{birthNum}</if> <if test="birthNum != null and birthNum != ''"> and birth_num = #{birthNum}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''">
and (name like concat('%', #{name}, '%')
or m_name like concat('%', #{name}, '%')
or f_name like concat('%', #{name}, '%')
)
</if>
<if test="birthday != null "> and birthday = #{birthday}</if> <if test="birthday != null "> and birthday = #{birthday}</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if> <if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="bornAddress != null and bornAddress != ''"> and born_address = #{bornAddress}</if> <if test="bornAddress != null and bornAddress != ''"> and born_address = #{bornAddress}</if>

@ -3,7 +3,6 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.da.dangan.mapper.DaCzrkdjMapper"> <mapper namespace="com.da.dangan.mapper.DaCzrkdjMapper">
<resultMap type="DaCzrkdj" id="DaCzrkdjResult"> <resultMap type="DaCzrkdj" id="DaCzrkdjResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="ywType" column="yw_type" /> <result property="ywType" column="yw_type" />
@ -68,7 +67,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if> <if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and mu_id = #{muId}</if> <if test="muId != null "> and mu_id = #{muId}</if>
<if test="relation != null and relation != ''"> and relation = #{relation}</if> <if test="relation != null and relation != ''"> and relation = #{relation}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''">
and ( name like concat('%', #{name}, '%')
or hz_name like concat('%', #{name}, '%')
or other_name like concat('%', #{name}, '%')
)
</if>
<if test="otherName != null and otherName != ''"> and other_name like concat('%', #{otherName}, '%')</if> <if test="otherName != null and otherName != ''"> and other_name like concat('%', #{otherName}, '%')</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if> <if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="birthday != null "> and birthday = #{birthday}</if> <if test="birthday != null "> and birthday = #{birthday}</if>
@ -119,9 +123,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if> <if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and mu_id = #{muId}</if> <if test="muId != null "> and mu_id = #{muId}</if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and (name like concat('%', #{name}, '%') and ( name like concat('%', #{name}, '%')
or hz_name like concat('%', #{name}, '%')) or hz_name like concat('%', #{name}, '%')
or other_name like concat('%', #{name}, '%')) or other_name like concat('%', #{name}, '%')
)
</if> </if>
<if test="otherName != null and otherName != ''"> and other_name like concat('%', #{otherName}, '%')</if> <if test="otherName != null and otherName != ''"> and other_name like concat('%', #{otherName}, '%')</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if> <if test="sex != null and sex != ''"> and sex = #{sex}</if>

@ -15,6 +15,7 @@
<result property="ywType" column="yw_type" /> <result property="ywType" column="yw_type" />
<result property="daJlId" column="da_jl_id" /> <result property="daJlId" column="da_jl_id" />
<result property="recognize" column="recognize" /> <result property="recognize" column="recognize" />
<result property="errorCorrect" column="error_correct" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
@ -23,7 +24,7 @@
</resultMap> </resultMap>
<sql id="selectDaPicturesRecardVo"> <sql id="selectDaPicturesRecardVo">
select id, pic_name, pic_url, wlsj_id, wlsj_path, mu_id, mu_path, yw_type,da_jl_id, recognize, remark, create_by, create_time, update_by, update_time from da_pictures_recard select id, pic_name, pic_url, wlsj_id, wlsj_path, mu_id, mu_path, yw_type, da_jl_id, recognize, error_correct, remark, create_by, create_time, update_by, update_time from da_pictures_recard
</sql> </sql>
<select id="selectDaPicturesRecardList" parameterType="DaPicturesRecard" resultMap="DaPicturesRecardResult"> <select id="selectDaPicturesRecardList" parameterType="DaPicturesRecard" resultMap="DaPicturesRecardResult">
@ -38,6 +39,7 @@
<if test="daJlId != null "> and da_jl_id = #{daJlId}</if> <if test="daJlId != null "> and da_jl_id = #{daJlId}</if>
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if> <if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="recognize != null and recognize != ''"> and recognize = #{recognize}</if> <if test="recognize != null and recognize != ''"> and recognize = #{recognize}</if>
<if test="errorCorrect != null and errorCorrect != ''"> and error_correct = #{errorCorrect}</if>
</where> </where>
order by id DESC order by id DESC
</select> </select>
@ -59,6 +61,7 @@
<if test="ywType != null">yw_type,</if> <if test="ywType != null">yw_type,</if>
<if test="daJlId != null">da_jl_id,</if> <if test="daJlId != null">da_jl_id,</if>
<if test="recognize != null">recognize,</if> <if test="recognize != null">recognize,</if>
<if test="errorCorrect != null and errorCorrect != ''">error_correct,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
@ -75,6 +78,7 @@
<if test="ywType != null">#{ywType},</if> <if test="ywType != null">#{ywType},</if>
<if test="daJlId != null">#{daJlId},</if> <if test="daJlId != null">#{daJlId},</if>
<if test="recognize != null">#{recognize},</if> <if test="recognize != null">#{recognize},</if>
<if test="errorCorrect != null and errorCorrect != ''">#{errorCorrect},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
@ -95,6 +99,7 @@
<if test="ywType != null">yw_type = #{ywType},</if> <if test="ywType != null">yw_type = #{ywType},</if>
<if test="daJlId != null">da_jl_id = #{daJlId},</if> <if test="daJlId != null">da_jl_id = #{daJlId},</if>
<if test="recognize != null">recognize = #{recognize},</if> <if test="recognize != null">recognize = #{recognize},</if>
<if test="errorCorrect != null and errorCorrect != ''">error_correct = #{errorCorrect},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>

@ -55,7 +55,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="muId != null "> and mu_id = #{muId}</if> <if test="muId != null "> and mu_id = #{muId}</if>
<if test="fwUnit != null and fwUnit != ''"> and fw_unit = #{fwUnit}</if> <if test="fwUnit != null and fwUnit != ''"> and fw_unit = #{fwUnit}</if>
<if test="wjXh != null and wjXh != ''"> and wj_xh = #{wjXh}</if> <if test="wjXh != null and wjXh != ''"> and wj_xh = #{wjXh}</if>
<if test="name1 != null and name1 != ''"> and name1 = #{name1}</if> <if test="name1 != null and name1 != ''">
and ( name1 like concat('%', #{name1}, '%')
or name2 like concat('%', #{name1}, '%')
or name3 like concat('%', #{name1}, '%')
or name4 like concat('%', #{name1}, '%')
)
</if>
<if test="sex1 != null and sex1 != ''"> and sex1 = #{sex1}</if> <if test="sex1 != null and sex1 != ''"> and sex1 = #{sex1}</if>
<if test="cardId1 != null and cardId1 != ''"> and card_id1 = #{cardId1}</if> <if test="cardId1 != null and cardId1 != ''"> and card_id1 = #{cardId1}</if>
<if test="name2 != null and name2 != ''"> and name2 = #{name2}</if> <if test="name2 != null and name2 != ''"> and name2 = #{name2}</if>

@ -51,7 +51,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="muId != null "> and mu_id = #{muId}</if> <if test="muId != null "> and mu_id = #{muId}</if>
<if test="year != null and year != ''"> and year = #{year}</if> <if test="year != null and year != ''"> and year = #{year}</if>
<if test="xh != null and xh != ''"> and xh = #{xh}</if> <if test="xh != null and xh != ''"> and xh = #{xh}</if>
<if test="wName != null and wName != ''"> and w_name like concat('%', #{wName}, '%')</if> <if test="wName != null and wName != ''">
and ( w_name like concat('%', #{wName}, '%')
or m_name like concat('%', #{wName}, '%')
)
</if>
<if test="wUnit != null and wUnit != ''"> and w_unit = #{wUnit}</if> <if test="wUnit != null and wUnit != ''"> and w_unit = #{wUnit}</if>
<if test="wCardId != null and wCardId != ''"> and w_card_id = #{wCardId}</if> <if test="wCardId != null and wCardId != ''"> and w_card_id = #{wCardId}</if>
<if test="mName != null and mName != ''"> and m_name like concat('%', #{mName}, '%')</if> <if test="mName != null and mName != ''"> and m_name like concat('%', #{mName}, '%')</if>

@ -56,7 +56,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if> <if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and mu_id = #{muId}</if> <if test="muId != null "> and mu_id = #{muId}</if>
<if test="num != null and num != ''"> and num = #{num}</if> <if test="num != null and num != ''"> and num = #{num}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''">
and ( name like concat('%', #{name}, '%')
or name1 like concat('%', #{name}, '%')
or name2 like concat('%', #{name}, '%')
or name3 like concat('%', #{name}, '%')
or name4 like concat('%', #{name}, '%')
or name5 like concat('%', #{name}, '%')
)
</if>
<if test="address != null and address != ''"> and address = #{address}</if> <if test="address != null and address != ''"> and address = #{address}</if>
<if test="relation1 != null and relation1 != ''"> and relation1 = #{relation1}</if> <if test="relation1 != null and relation1 != ''"> and relation1 = #{relation1}</if>
<if test="name1 != null and name1 != ''"> and name1 = #{name1}</if> <if test="name1 != null and name1 != ''"> and name1 = #{name1}</if>

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.da.dangan.mapper.DaZqzMapper"> <mapper namespace="com.da.dangan.mapper.DaZqzMapper">
<resultMap type="DaZqz" id="DaZqzResult"> <resultMap type="DaZqz" id="DaZqzResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="ywType" column="yw_type" /> <result property="ywType" column="yw_type" />
@ -16,18 +16,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="relation1" column="relation1" /> <result property="relation1" column="relation1" />
<result property="name1" column="name1" /> <result property="name1" column="name1" />
<result property="sex1" column="sex1" /> <result property="sex1" column="sex1" />
<result property="birthDate1" column="birth_date1" />
<result property="cardId1" column="card_id1" /> <result property="cardId1" column="card_id1" />
<result property="relation2" column="relation2" /> <result property="relation2" column="relation2" />
<result property="name2" column="name2" /> <result property="name2" column="name2" />
<result property="sex2" column="sex2" /> <result property="sex2" column="sex2" />
<result property="birthDate2" column="birth_date2" />
<result property="cardId2" column="card_id2" /> <result property="cardId2" column="card_id2" />
<result property="relation3" column="relation3" /> <result property="relation3" column="relation3" />
<result property="name3" column="name3" /> <result property="name3" column="name3" />
<result property="birthDate3" column="birth_date3" />
<result property="sex3" column="sex3" /> <result property="sex3" column="sex3" />
<result property="cardId3" column="card_id3" /> <result property="cardId3" column="card_id3" />
<result property="relation4" column="relation4" /> <result property="relation4" column="relation4" />
<result property="name4" column="name4" /> <result property="name4" column="name4" />
<result property="sex4" column="sex4" /> <result property="sex4" column="sex4" />
<result property="birthDate4" column="birth_date4" />
<result property="cardId4" column="card_id4" /> <result property="cardId4" column="card_id4" />
<result property="fwdw" column="fwdw" /> <result property="fwdw" column="fwdw" />
<result property="qrAddress" column="qr_address" /> <result property="qrAddress" column="qr_address" />
@ -52,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectDaZqzVo"> <sql id="selectDaZqzVo">
select id, yw_type, mu_id, num, name, card_id, address, dj_jg, relation1, name1, sex1, card_id1, relation2, name2, sex2, card_id2, relation3, name3, sex3, card_id3, relation4, name4, sex4, card_id4, fwdw, qr_address, zq_reason, pzjg, cbr, qf_date, pic_ids, pictures, all_pic_ids, all_pics, error_correct, audit_status, audit_name, audit_result, audit_reason, remark, create_by, create_time, update_by, update_time from da_zqz select id, yw_type, mu_id, num, name, card_id, address, dj_jg, relation1, name1, sex1, birth_date1, card_id1, relation2, name2, sex2, birth_date2, card_id2, relation3, name3, birth_date3, sex3, card_id3, relation4, name4, sex4, birth_date4, card_id4, fwdw, qr_address, zq_reason, pzjg, cbr, qf_date, pic_ids, pictures, all_pic_ids, all_pics, error_correct, audit_status, audit_name, audit_result, audit_reason, remark, create_by, create_time, update_by, update_time from da_zqz
</sql> </sql>
<select id="selectDaZqzList" parameterType="DaZqz" resultMap="DaZqzResult"> <select id="selectDaZqzList" parameterType="DaZqz" resultMap="DaZqzResult">
@ -61,25 +65,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if> <if test="ywType != null and ywType != ''"> and yw_type = #{ywType}</if>
<if test="muId != null "> and mu_id = #{muId}</if> <if test="muId != null "> and mu_id = #{muId}</if>
<if test="num != null and num != ''"> and num = #{num}</if> <if test="num != null and num != ''"> and num = #{num}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''">
and ( name like concat('%', #{name}, '%')
or name1 like concat('%', #{name}, '%')
or name2 like concat('%', #{name}, '%')
or name3 like concat('%', #{name}, '%')
or name4 like concat('%', #{name}, '%')
)
</if>
<if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if> <if test="cardId != null and cardId != ''"> and card_id = #{cardId}</if>
<if test="address != null and address != ''"> and address = #{address}</if> <if test="address != null and address != ''"> and address = #{address}</if>
<if test="djJg != null and djJg != ''"> and dj_jg = #{djJg}</if> <if test="djJg != null and djJg != ''"> and dj_jg = #{djJg}</if>
<if test="relation1 != null and relation1 != ''"> and relation1 = #{relation1}</if> <if test="relation1 != null and relation1 != ''"> and relation1 = #{relation1}</if>
<if test="name1 != null and name1 != ''"> and name1 = #{name1}</if> <if test="name1 != null and name1 != ''"> and name1 = #{name1}</if>
<if test="sex1 != null and sex1 != ''"> and sex1 = #{sex1}</if> <if test="sex1 != null and sex1 != ''"> and sex1 = #{sex1}</if>
<if test="birthDate1 != null "> and birth_date1 = #{birthDate1}</if>
<if test="cardId1 != null and cardId1 != ''"> and card_id1 = #{cardId1}</if> <if test="cardId1 != null and cardId1 != ''"> and card_id1 = #{cardId1}</if>
<if test="relation2 != null and relation2 != ''"> and relation2 = #{relation2}</if> <if test="relation2 != null and relation2 != ''"> and relation2 = #{relation2}</if>
<if test="name2 != null and name2 != ''"> and name2 = #{name2}</if> <if test="name2 != null and name2 != ''"> and name2 = #{name2}</if>
<if test="sex2 != null and sex2 != ''"> and sex2 = #{sex2}</if> <if test="sex2 != null and sex2 != ''"> and sex2 = #{sex2}</if>
<if test="birthDate2 != null "> and birth_date2 = #{birthDate2}</if>
<if test="cardId2 != null and cardId2 != ''"> and card_id2 = #{cardId2}</if> <if test="cardId2 != null and cardId2 != ''"> and card_id2 = #{cardId2}</if>
<if test="relation3 != null and relation3 != ''"> and relation3 = #{relation3}</if> <if test="relation3 != null and relation3 != ''"> and relation3 = #{relation3}</if>
<if test="name3 != null and name3 != ''"> and name3 = #{name3}</if> <if test="name3 != null and name3 != ''"> and name3 = #{name3}</if>
<if test="birthDate3 != null "> and birth_date3 = #{birthDate3}</if>
<if test="sex3 != null and sex3 != ''"> and sex3 = #{sex3}</if> <if test="sex3 != null and sex3 != ''"> and sex3 = #{sex3}</if>
<if test="cardId3 != null and cardId3 != ''"> and card_id3 = #{cardId3}</if> <if test="cardId3 != null and cardId3 != ''"> and card_id3 = #{cardId3}</if>
<if test="relation4 != null and relation4 != ''"> and relation4 = #{relation4}</if> <if test="relation4 != null and relation4 != ''"> and relation4 = #{relation4}</if>
<if test="name4 != null and name4 != ''"> and name4 = #{name4}</if> <if test="name4 != null and name4 != ''"> and name4 = #{name4}</if>
<if test="sex4 != null and sex4 != ''"> and sex4 = #{sex4}</if> <if test="sex4 != null and sex4 != ''"> and sex4 = #{sex4}</if>
<if test="birthDate4 != null "> and birth_date4 = #{birthDate4}</if>
<if test="cardId4 != null and cardId4 != ''"> and card_id4 = #{cardId4}</if> <if test="cardId4 != null and cardId4 != ''"> and card_id4 = #{cardId4}</if>
<if test="fwdw != null and fwdw != ''"> and fwdw = #{fwdw}</if> <if test="fwdw != null and fwdw != ''"> and fwdw = #{fwdw}</if>
<if test="qrAddress != null and qrAddress != ''"> and qr_address = #{qrAddress}</if> <if test="qrAddress != null and qrAddress != ''"> and qr_address = #{qrAddress}</if>
@ -117,18 +132,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="relation1 != null">relation1,</if> <if test="relation1 != null">relation1,</if>
<if test="name1 != null">name1,</if> <if test="name1 != null">name1,</if>
<if test="sex1 != null">sex1,</if> <if test="sex1 != null">sex1,</if>
<if test="birthDate1 != null">birth_date1,</if>
<if test="cardId1 != null">card_id1,</if> <if test="cardId1 != null">card_id1,</if>
<if test="relation2 != null">relation2,</if> <if test="relation2 != null">relation2,</if>
<if test="name2 != null">name2,</if> <if test="name2 != null">name2,</if>
<if test="sex2 != null">sex2,</if> <if test="sex2 != null">sex2,</if>
<if test="birthDate2 != null">birth_date2,</if>
<if test="cardId2 != null">card_id2,</if> <if test="cardId2 != null">card_id2,</if>
<if test="relation3 != null">relation3,</if> <if test="relation3 != null">relation3,</if>
<if test="name3 != null">name3,</if> <if test="name3 != null">name3,</if>
<if test="birthDate3 != null">birth_date3,</if>
<if test="sex3 != null">sex3,</if> <if test="sex3 != null">sex3,</if>
<if test="cardId3 != null">card_id3,</if> <if test="cardId3 != null">card_id3,</if>
<if test="relation4 != null">relation4,</if> <if test="relation4 != null">relation4,</if>
<if test="name4 != null">name4,</if> <if test="name4 != null">name4,</if>
<if test="sex4 != null">sex4,</if> <if test="sex4 != null">sex4,</if>
<if test="birthDate4 != null">birth_date4,</if>
<if test="cardId4 != null">card_id4,</if> <if test="cardId4 != null">card_id4,</if>
<if test="fwdw != null">fwdw,</if> <if test="fwdw != null">fwdw,</if>
<if test="qrAddress != null">qr_address,</if> <if test="qrAddress != null">qr_address,</if>
@ -150,7 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ywType != null">#{ywType},</if> <if test="ywType != null">#{ywType},</if>
<if test="muId != null">#{muId},</if> <if test="muId != null">#{muId},</if>
@ -162,18 +181,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="relation1 != null">#{relation1},</if> <if test="relation1 != null">#{relation1},</if>
<if test="name1 != null">#{name1},</if> <if test="name1 != null">#{name1},</if>
<if test="sex1 != null">#{sex1},</if> <if test="sex1 != null">#{sex1},</if>
<if test="birthDate1 != null">#{birthDate1},</if>
<if test="cardId1 != null">#{cardId1},</if> <if test="cardId1 != null">#{cardId1},</if>
<if test="relation2 != null">#{relation2},</if> <if test="relation2 != null">#{relation2},</if>
<if test="name2 != null">#{name2},</if> <if test="name2 != null">#{name2},</if>
<if test="sex2 != null">#{sex2},</if> <if test="sex2 != null">#{sex2},</if>
<if test="birthDate2 != null">#{birthDate2},</if>
<if test="cardId2 != null">#{cardId2},</if> <if test="cardId2 != null">#{cardId2},</if>
<if test="relation3 != null">#{relation3},</if> <if test="relation3 != null">#{relation3},</if>
<if test="name3 != null">#{name3},</if> <if test="name3 != null">#{name3},</if>
<if test="birthDate3 != null">#{birthDate3},</if>
<if test="sex3 != null">#{sex3},</if> <if test="sex3 != null">#{sex3},</if>
<if test="cardId3 != null">#{cardId3},</if> <if test="cardId3 != null">#{cardId3},</if>
<if test="relation4 != null">#{relation4},</if> <if test="relation4 != null">#{relation4},</if>
<if test="name4 != null">#{name4},</if> <if test="name4 != null">#{name4},</if>
<if test="sex4 != null">#{sex4},</if> <if test="sex4 != null">#{sex4},</if>
<if test="birthDate4 != null">#{birthDate4},</if>
<if test="cardId4 != null">#{cardId4},</if> <if test="cardId4 != null">#{cardId4},</if>
<if test="fwdw != null">#{fwdw},</if> <if test="fwdw != null">#{fwdw},</if>
<if test="qrAddress != null">#{qrAddress},</if> <if test="qrAddress != null">#{qrAddress},</if>
@ -195,7 +218,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
</trim> </trim>
</insert> </insert>
<update id="updateDaZqz" parameterType="DaZqz"> <update id="updateDaZqz" parameterType="DaZqz">
@ -211,18 +234,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="relation1 != null">relation1 = #{relation1},</if> <if test="relation1 != null">relation1 = #{relation1},</if>
<if test="name1 != null">name1 = #{name1},</if> <if test="name1 != null">name1 = #{name1},</if>
<if test="sex1 != null">sex1 = #{sex1},</if> <if test="sex1 != null">sex1 = #{sex1},</if>
<if test="birthDate1 != null">birth_date1 = #{birthDate1},</if>
<if test="cardId1 != null">card_id1 = #{cardId1},</if> <if test="cardId1 != null">card_id1 = #{cardId1},</if>
<if test="relation2 != null">relation2 = #{relation2},</if> <if test="relation2 != null">relation2 = #{relation2},</if>
<if test="name2 != null">name2 = #{name2},</if> <if test="name2 != null">name2 = #{name2},</if>
<if test="sex2 != null">sex2 = #{sex2},</if> <if test="sex2 != null">sex2 = #{sex2},</if>
<if test="birthDate2 != null">birth_date2 = #{birthDate2},</if>
<if test="cardId2 != null">card_id2 = #{cardId2},</if> <if test="cardId2 != null">card_id2 = #{cardId2},</if>
<if test="relation3 != null">relation3 = #{relation3},</if> <if test="relation3 != null">relation3 = #{relation3},</if>
<if test="name3 != null">name3 = #{name3},</if> <if test="name3 != null">name3 = #{name3},</if>
<if test="birthDate3 != null">birth_date3 = #{birthDate3},</if>
<if test="sex3 != null">sex3 = #{sex3},</if> <if test="sex3 != null">sex3 = #{sex3},</if>
<if test="cardId3 != null">card_id3 = #{cardId3},</if> <if test="cardId3 != null">card_id3 = #{cardId3},</if>
<if test="relation4 != null">relation4 = #{relation4},</if> <if test="relation4 != null">relation4 = #{relation4},</if>
<if test="name4 != null">name4 = #{name4},</if> <if test="name4 != null">name4 = #{name4},</if>
<if test="sex4 != null">sex4 = #{sex4},</if> <if test="sex4 != null">sex4 = #{sex4},</if>
<if test="birthDate4 != null">birth_date4 = #{birthDate4},</if>
<if test="cardId4 != null">card_id4 = #{cardId4},</if> <if test="cardId4 != null">card_id4 = #{cardId4},</if>
<if test="fwdw != null">fwdw = #{fwdw},</if> <if test="fwdw != null">fwdw = #{fwdw},</if>
<if test="qrAddress != null">qr_address = #{qrAddress},</if> <if test="qrAddress != null">qr_address = #{qrAddress},</if>

@ -1,23 +1,23 @@
package com.da.framework.security.handle; package com.da.framework.security.handle;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.da.common.constant.Constants; import com.da.common.constant.Constants;
import com.da.common.core.domain.AjaxResult; import com.da.common.core.domain.AjaxResult;
import com.da.common.core.domain.model.LoginUser; import com.da.common.core.domain.model.LoginUser;
import com.da.common.utils.MessageUtils;
import com.da.common.utils.ServletUtils; import com.da.common.utils.ServletUtils;
import com.da.common.utils.StringUtils; import com.da.common.utils.StringUtils;
import com.da.framework.manager.AsyncManager; import com.da.framework.manager.AsyncManager;
import com.da.framework.manager.factory.AsyncFactory; import com.da.framework.manager.factory.AsyncFactory;
import com.da.framework.web.service.TokenService; import com.da.framework.web.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/** /**
* 退 * 退
@ -36,7 +36,7 @@ public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler
* @return * @return
*/ */
@Override @Override
public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) /*public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication)
throws IOException, ServletException throws IOException, ServletException
{ {
LoginUser loginUser = tokenService.getLoginUser(request); LoginUser loginUser = tokenService.getLoginUser(request);
@ -49,5 +49,23 @@ public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler
AsyncManager.me().execute(AsyncFactory.recordLogininfor(userName, Constants.LOGOUT, MessageUtils.message("user.logout.success"))); AsyncManager.me().execute(AsyncFactory.recordLogininfor(userName, Constants.LOGOUT, MessageUtils.message("user.logout.success")));
} }
ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.success(MessageUtils.message("user.logout.success")))); ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.success(MessageUtils.message("user.logout.success"))));
}*/
public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication)
throws IOException, ServletException
{
LoginUser loginUser = tokenService.getLoginUser(request);
if (StringUtils.isNotNull(loginUser))
{
String userName = loginUser.getUsername();
// 删除用户缓存记录(旧方法)
//tokenService.delLoginUser(loginUser.getToken());
// 删除用户缓存记录 只允许单用户登录(关键)
tokenService.delLoginUser(loginUser.getToken(), loginUser.getUser().getUserId());
// 记录用户退出日志
AsyncManager.me().execute(AsyncFactory.recordLogininfor(userName, Constants.LOGOUT, "退出成功"));
}
ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.success("退出成功")));
} }
} }

@ -1,12 +1,5 @@
package com.da.framework.web.service; package com.da.framework.web.service;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Component;
import com.da.common.constant.CacheConstants; import com.da.common.constant.CacheConstants;
import com.da.common.constant.Constants; import com.da.common.constant.Constants;
import com.da.common.constant.UserConstants; import com.da.common.constant.UserConstants;
@ -14,11 +7,7 @@ import com.da.common.core.domain.entity.SysUser;
import com.da.common.core.domain.model.LoginUser; import com.da.common.core.domain.model.LoginUser;
import com.da.common.core.redis.RedisCache; import com.da.common.core.redis.RedisCache;
import com.da.common.exception.ServiceException; import com.da.common.exception.ServiceException;
import com.da.common.exception.user.BlackListException; import com.da.common.exception.user.*;
import com.da.common.exception.user.CaptchaException;
import com.da.common.exception.user.CaptchaExpireException;
import com.da.common.exception.user.UserNotExistsException;
import com.da.common.exception.user.UserPasswordNotMatchException;
import com.da.common.utils.DateUtils; import com.da.common.utils.DateUtils;
import com.da.common.utils.MessageUtils; import com.da.common.utils.MessageUtils;
import com.da.common.utils.StringUtils; import com.da.common.utils.StringUtils;
@ -28,6 +17,15 @@ import com.da.framework.manager.factory.AsyncFactory;
import com.da.framework.security.context.AuthenticationContextHolder; import com.da.framework.security.context.AuthenticationContextHolder;
import com.da.system.service.ISysConfigService; import com.da.system.service.ISysConfigService;
import com.da.system.service.ISysUserService; import com.da.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/** /**
* *
@ -37,6 +35,9 @@ import com.da.system.service.ISysUserService;
@Component @Component
public class SysLoginService public class SysLoginService
{ {
// 是否允许账户多终端同时登录true允许 false不允许
@Value("${token.soloLogin}")
private boolean soloLogin;
@Autowired @Autowired
private TokenService tokenService; private TokenService tokenService;
@ -96,6 +97,21 @@ public class SysLoginService
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"))); AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
LoginUser loginUser = (LoginUser) authentication.getPrincipal(); LoginUser loginUser = (LoginUser) authentication.getPrincipal();
recordLoginInfo(loginUser.getUserId()); recordLoginInfo(loginUser.getUserId());
//---------------------------------------添加如下代码,验证如果用户不允许多终端同时登录,清除缓存信息
if (!soloLogin)
{
// 如果用户不允许多终端同时登录,清除缓存信息
String userIdKey = Constants.LOGIN_USERID_KEY + loginUser.getUser().getUserId();
String userKey = redisCache.getCacheObject(userIdKey);
if (StringUtils.isNotEmpty(userKey))
{
redisCache.deleteObject(userIdKey);
redisCache.deleteObject(userKey);
}
}
//----------------新增代码结束
// 生成token // 生成token
return tokenService.createToken(loginUser); return tokenService.createToken(loginUser);
} }

@ -1,14 +1,5 @@
package com.da.framework.web.service; package com.da.framework.web.service;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import com.da.common.constant.CacheConstants; import com.da.common.constant.CacheConstants;
import com.da.common.constant.Constants; import com.da.common.constant.Constants;
import com.da.common.core.domain.model.LoginUser; import com.da.common.core.domain.model.LoginUser;
@ -22,6 +13,16 @@ import eu.bitwalker.useragentutils.UserAgent;
import io.jsonwebtoken.Claims; import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts; import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm; import io.jsonwebtoken.SignatureAlgorithm;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/** /**
* token * token
@ -33,6 +34,10 @@ public class TokenService
{ {
private static final Logger log = LoggerFactory.getLogger(TokenService.class); private static final Logger log = LoggerFactory.getLogger(TokenService.class);
// 是否允许账户多终端同时登录true允许 false不允许
@Value("${token.soloLogin}")
private boolean soloLogin;
// 令牌自定义标识 // 令牌自定义标识
@Value("${token.header}") @Value("${token.header}")
private String header; private String header;
@ -96,15 +101,29 @@ public class TokenService
/** /**
* *
*/ */
public void delLoginUser(String token) /* public void delLoginUser(String token)
{ {
if (StringUtils.isNotEmpty(token)) if (StringUtils.isNotEmpty(token))
{ {
String userKey = getTokenKey(token); String userKey = getTokenKey(token);
redisCache.deleteObject(userKey); redisCache.deleteObject(userKey);
} }
}*/
public void delLoginUser(String token, Long userId)
{
if (StringUtils.isNotEmpty(token))
{
String userKey = getTokenKey(token);
redisCache.deleteObject(userKey);
}
if (!soloLogin && StringUtils.isNotNull(userId))
{
String userIdKey = getUserIdKey(userId);
redisCache.deleteObject(userIdKey);
}
} }
/** /**
* *
* *
@ -144,13 +163,28 @@ public class TokenService
* *
* @param loginUser * @param loginUser
*/ */
public void refreshToken(LoginUser loginUser) /* public void refreshToken(LoginUser loginUser)
{
loginUser.setLoginTime(System.currentTimeMillis());
loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE);
// 根据uuid将loginUser缓存
String userKey = getTokenKey(loginUser.getToken());
redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES);
}*/
public String refreshToken(LoginUser loginUser)
{ {
loginUser.setLoginTime(System.currentTimeMillis()); loginUser.setLoginTime(System.currentTimeMillis());
loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE); loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE);
// 根据uuid将loginUser缓存 // 根据uuid将loginUser缓存
String userKey = getTokenKey(loginUser.getToken()); String userKey = getTokenKey(loginUser.getToken());
redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES); redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES);
if (!soloLogin)
{
// 缓存用户唯一标识,防止同一帐号,同时登录
String userIdKey = getUserIdKey(loginUser.getUser().getUserId());
redisCache.setCacheObject(userIdKey, userKey, expireTime, TimeUnit.MINUTES);
}
return userKey;
} }
/** /**
@ -168,6 +202,11 @@ public class TokenService
loginUser.setOs(userAgent.getOperatingSystem().getName()); loginUser.setOs(userAgent.getOperatingSystem().getName());
} }
private String getUserIdKey(Long userId)
{
return Constants.LOGIN_USERID_KEY + userId;
}
/** /**
* *
* *

@ -17,7 +17,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分 // axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API, baseURL: process.env.VUE_APP_BASE_API,
// 超时 // 超时
timeout: 10000 timeout: 100000
}) })
// request拦截器 // request拦截器
@ -93,7 +93,8 @@ service.interceptors.response.use(res => {
isRelogin.show = false; isRelogin.show = false;
}); });
} }
return Promise.reject('无效的会话,或者会话已过期,请重新登录。') //return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
return Promise.reject('会话已过期,或者被挤下线,请重新登录。')
} else if (code === 500) { } else if (code === 500) {
Message({ message: msg, type: 'error' }) Message({ message: msg, type: 'error' })
return Promise.reject(new Error(msg)) return Promise.reject(new Error(msg))

Loading…
Cancel
Save