添加识别模板、添加flag排空标记、任务手动识别修改任务结果

master
hansha 1 year ago
parent 5d52b3322a
commit a992e9c46a

@ -1,6 +1,7 @@
package com.da.dangan.controller; package com.da.dangan.controller;
import cn.hutool.core.util.URLUtil; import cn.hutool.core.util.URLUtil;
import cn.hutool.http.HttpUtil;
import com.da.common.annotation.Log; import com.da.common.annotation.Log;
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;
@ -22,39 +23,37 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
/** /**
* Controller * Controller
* *
* @author hs * @author hs
* @date 2024-05-13 * @date 2024-05-13
*/ */
@RestController @RestController
@RequestMapping("/dangan/pictureRecard") @RequestMapping("/dangan/pictureRecard")
public class DaPicturesRecardController extends BaseController public class DaPicturesRecardController extends BaseController {
{
@Autowired @Autowired
private ExecutorService executorService; private ExecutorService executorService;
@Autowired @Autowired
private IDaPicturesRecardService daPicturesRecardService; private IDaPicturesRecardService daPicturesRecardService;
/** /**
* *
*/ */
@PreAuthorize("@ss.hasPermi('dangan:pictureRecard:list')") @PreAuthorize("@ss.hasPermi('dangan:pictureRecard:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DaPicturesRecard daPicturesRecard) public TableDataInfo list(DaPicturesRecard daPicturesRecard) {
{
// 超管及角色为管理员显示所有目录信息 // 超管及角色为管理员显示所有目录信息
LoginUser loginUser = getLoginUser(); LoginUser loginUser = getLoginUser();
if (SysUser.isAdmin(getUserId()) || if (SysUser.isAdmin(getUserId()) ||
loginUser.getUser().getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().equals("sysAdmin"))) { loginUser.getUser().getRoles().stream().anyMatch(sysRole -> sysRole.getRoleKey().equals("sysAdmin"))) {
}else{ } else {
daPicturesRecard.setUserId(getUserId()); daPicturesRecard.setUserId(getUserId());
} }
startPage(); startPage();
@ -65,10 +64,9 @@ public class DaPicturesRecardController extends BaseController
/** /**
* *
*/ */
// @PreAuthorize("@ss.hasPermi('dangan:pictureRecard:list')") // @PreAuthorize("@ss.hasPermi('dangan:pictureRecard:list')")
@GetMapping("/listByIds") @GetMapping("/listByIds")
public TableDataInfo listByIds(Long[] ids) public TableDataInfo listByIds(Long[] ids) {
{
startPage(); startPage();
List<DaPicturesRecard> list = daPicturesRecardService.selectDaPicturesRecardByIds(ids); List<DaPicturesRecard> list = daPicturesRecardService.selectDaPicturesRecardByIds(ids);
return getDataTable(list); return getDataTable(list);
@ -80,8 +78,7 @@ public class DaPicturesRecardController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:pictureRecard:export')") @PreAuthorize("@ss.hasPermi('dangan:pictureRecard:export')")
@Log(title = "档案图片信息记录", businessType = BusinessType.EXPORT) @Log(title = "档案图片信息记录", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DaPicturesRecard daPicturesRecard) public void export(HttpServletResponse response, DaPicturesRecard daPicturesRecard) {
{
List<DaPicturesRecard> list = daPicturesRecardService.selectDaPicturesRecardList(daPicturesRecard); List<DaPicturesRecard> list = daPicturesRecardService.selectDaPicturesRecardList(daPicturesRecard);
ExcelUtil<DaPicturesRecard> util = new ExcelUtil<DaPicturesRecard>(DaPicturesRecard.class); ExcelUtil<DaPicturesRecard> util = new ExcelUtil<DaPicturesRecard>(DaPicturesRecard.class);
util.exportExcel(response, list, "档案图片信息记录数据"); util.exportExcel(response, list, "档案图片信息记录数据");
@ -93,12 +90,11 @@ public class DaPicturesRecardController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:pictureRecard:export')") @PreAuthorize("@ss.hasPermi('dangan:pictureRecard:export')")
@Log(title = "图片下载", businessType = BusinessType.EXPORT) @Log(title = "图片下载", businessType = BusinessType.EXPORT)
@PostMapping("/exportImage") @PostMapping("/exportImage")
public void export2(HttpServletRequest request,HttpServletResponse response, DaPicturesRecard daPicturesRecard) public void export2(HttpServletRequest request, HttpServletResponse response, DaPicturesRecard daPicturesRecard) {
{
List<DaPicturesRecard> list = daPicturesRecardService.selectDaPicturesRecardList(daPicturesRecard); List<DaPicturesRecard> list = daPicturesRecardService.selectDaPicturesRecardList(daPicturesRecard);
List<String> images = list.stream().map(DaPicturesRecard ::getPicUrl).collect(Collectors.toList()); List<String> images = list.stream().map(DaPicturesRecard::getPicUrl).collect(Collectors.toList());
//exportImages(request,response,images,"档案图片"); exportImages(response,images);
exportImages1(response,images,"档案图片"); //exportImages1(response, images);
} }
/** /**
@ -106,8 +102,7 @@ public class DaPicturesRecardController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('dangan:pictureRecard:query')") @PreAuthorize("@ss.hasPermi('dangan:pictureRecard:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(daPicturesRecardService.selectDaPicturesRecardById(id)); return success(daPicturesRecardService.selectDaPicturesRecardById(id));
} }
@ -117,8 +112,7 @@ public class DaPicturesRecardController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:pictureRecard:add')") @PreAuthorize("@ss.hasPermi('dangan:pictureRecard:add')")
@Log(title = "档案图片信息记录", businessType = BusinessType.INSERT) @Log(title = "档案图片信息记录", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DaPicturesRecard daPicturesRecard) public AjaxResult add(@RequestBody DaPicturesRecard daPicturesRecard) {
{
daPicturesRecard.setCreateBy(getUsername()); daPicturesRecard.setCreateBy(getUsername());
return toAjax(daPicturesRecardService.insertDaPicturesRecard(daPicturesRecard)); return toAjax(daPicturesRecardService.insertDaPicturesRecard(daPicturesRecard));
} }
@ -129,8 +123,7 @@ public class DaPicturesRecardController extends BaseController
@PreAuthorize("@ss.hasPermi('dangan:pictureRecard:edit')") @PreAuthorize("@ss.hasPermi('dangan:pictureRecard:edit')")
@Log(title = "档案图片信息记录", businessType = BusinessType.UPDATE) @Log(title = "档案图片信息记录", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DaPicturesRecard daPicturesRecard) public AjaxResult edit(@RequestBody DaPicturesRecard daPicturesRecard) {
{
return toAjax(daPicturesRecardService.updateDaPicturesRecard(daPicturesRecard)); return toAjax(daPicturesRecardService.updateDaPicturesRecard(daPicturesRecard));
} }
@ -139,26 +132,25 @@ public class DaPicturesRecardController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('dangan:pictureRecard:remove')") @PreAuthorize("@ss.hasPermi('dangan:pictureRecard:remove')")
@Log(title = "档案图片信息记录", businessType = BusinessType.DELETE) @Log(title = "档案图片信息记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return daPicturesRecardService.deleteDaPicturesRecardByIds(ids); return daPicturesRecardService.deleteDaPicturesRecardByIds(ids);
} }
/** /**
* 使线 * 使线
*/ */
private void exportImages1( HttpServletResponse response, List<String> images, String name) { private void exportImages1(HttpServletResponse response, List<String> images) {
response.setContentType("application/zip"); response.setContentType("application/zip");
response.setHeader("Content-Disposition", "attachment;filename=demo.zip"); response.setHeader("Content-Disposition", "attachment;filename=image.zip");
ParallelScatterZipCreator parallelScatterZipCreator = new ParallelScatterZipCreator(executorService); ParallelScatterZipCreator parallelScatterZipCreator = new ParallelScatterZipCreator(executorService);
try (ZipArchiveOutputStream zipArchiveOutputStream = new ZipArchiveOutputStream(response.getOutputStream())) { try (ZipArchiveOutputStream zipArchiveOutputStream = new ZipArchiveOutputStream(response.getOutputStream())) {
zipArchiveOutputStream.setLevel(0); zipArchiveOutputStream.setLevel(0);
images.forEach(x -> { images.forEach(x -> {
ZipArchiveEntry zipArchiveEntry = new ZipArchiveEntry(StringUtils.getFilename(x)); ZipArchiveEntry zipEntry = new ZipArchiveEntry(StringUtils.getFilename(x));
zipArchiveEntry.setMethod(ZipArchiveEntry.STORED); zipEntry.setMethod(ZipArchiveEntry.STORED);
InputStreamSupplier inputStreamSupplier = () -> URLUtil.getStream(URLUtil.url(x)); InputStreamSupplier inputStreamSupplier = () -> URLUtil.getStream(URLUtil.url(x));
parallelScatterZipCreator.addArchiveEntry(zipArchiveEntry, inputStreamSupplier); parallelScatterZipCreator.addArchiveEntry(zipEntry, inputStreamSupplier);
}); });
parallelScatterZipCreator.writeTo(zipArchiveOutputStream); parallelScatterZipCreator.writeTo(zipArchiveOutputStream);
} catch (Exception e) { } catch (Exception e) {
@ -166,76 +158,28 @@ public class DaPicturesRecardController extends BaseController
} }
} }
private void exportImages(HttpServletRequest request, HttpServletResponse response, List<String> images, String name) { /**
//响应头的设置 * 线
response.reset(); */
response.setCharacterEncoding("utf-8"); private void exportImages(HttpServletResponse response, List<String> images) {
response.setContentType("multipart/form-data"); response.setContentType("application/zip");
//设置压缩包的名字 response.setHeader("Content-Disposition", "attachment;filename=image.zip");
//解决不同浏览器压缩包名字含有中文乱码的问题 try (ZipOutputStream zipOutputStream = new ZipOutputStream(response.getOutputStream())) {
String billname ="workerCard"; zipOutputStream.setLevel(0);
String downloadName=name+".zip"; images.forEach(x -> {
//返回客户端浏览器的版本号、类型 try {
String agent = request.getHeader("USER-AGENT"); zipOutputStream.putNextEntry(new ZipArchiveEntry(StringUtils.getFilename(x)));
try { HttpUtil.download(x, zipOutputStream, false);
//针对IE或者以IE为内核的浏览器处理 zipOutputStream.closeEntry();
if (agent.contains("MSIE")||agent.contains("Trident")){ } catch (IOException e) {
e.printStackTrace();
downloadName=java.net.URLEncoder.encode(downloadName, "UTF-8");
}else {
downloadName=new String(downloadName.getBytes("UTF-8"),"ISO-8859-1");
}
}catch (Exception e) {
e.printStackTrace();
}
response.setHeader("Content-Disposition","attachment;fileName=\"" + downloadName + "\"");
//设置压缩流
ZipOutputStream zip=null;
try {
zip=new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
//设置压缩方法
zip.setMethod(ZipOutputStream.DEFLATED);
} catch (IOException e) {
e.printStackTrace();
}
DataOutputStream os=null;
//从数据库中取出要下载的图片路径
for (String image : images) {
File file = new File(image);
if (file.exists()){
//添加ZipEntry并ZipEntry中写入文件流
//这里加上i是防止要下载的文件有重名的导致下载失败
try {
zip.putNextEntry(new ZipEntry(file.getName()));
os=new DataOutputStream(zip);
InputStream is = new FileInputStream(file);
byte[]b= new byte [1024];
int length =0;
while ((length=is.read(b))!=-1){
os.write(b,0,length);
}
is.close();
//zip.closeEntry();
} catch (IOException e) {
e.printStackTrace();
}
}
//关闭流
try {
if (os!=null){
os.flush();
os.close();
zip.close();
}else {
break;
} }
});
} catch (IOException e) { zipOutputStream.flush();
e.printStackTrace(); zipOutputStream.finish();
} } catch (Exception e) {
e.printStackTrace();
} }
} }
} }

@ -265,6 +265,7 @@ public class DangAnCollectController extends BaseController {
if (picRecards != null && picRecards.size() > 0) { if (picRecards != null && picRecards.size() > 0) {
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 sbType = picRecards.get(0).getSbType();
Long muId = picRecards.get(0).getMuId(); Long muId = picRecards.get(0).getMuId();
String muPath = picRecards.get(0).getMuPath(); String muPath = picRecards.get(0).getMuPath();
@ -276,10 +277,22 @@ public class DangAnCollectController extends BaseController {
daTask.setMuId(muId); daTask.setMuId(muId);
daTask.setMuPath(muPath); daTask.setMuPath(muPath);
daTask.setYwType(ywType); daTask.setYwType(ywType);
if(sbType!=null&&!sbType.trim().equals("")){
daTask.setSbType(sbType); // 识别模板默认=业务模板
}else{
daTask.setSbType(ywType);
}
daTask.setNum(picRecards.size()); daTask.setNum(picRecards.size());
daTask.setStatus("-1");//默认等待状态 接收成功后修改为1 daTask.setStatus("-1");//默认等待状态 接收成功后修改为1
daTask.setPicIds(StringUtils.join(ids, ","));//逗号分割); daTask.setPicIds(StringUtils.join(ids, ","));//逗号分割);
daTaskService.insertDaTask(daTask); daTaskService.insertDaTask(daTask);
//修改图片识别状态 为识别等待
for (DaPicturesRecard picRecard : picRecards) {
picRecard.setRecognize("2");
daPicturesRecardService.updateDaPicturesRecard(picRecard);
}
} else { } else {
return AjaxResult.error("识别图片不能为空"); return AjaxResult.error("识别图片不能为空");
} }
@ -374,14 +387,14 @@ public class DangAnCollectController extends BaseController {
*/ */
@Log(title = "识别任务", businessType = BusinessType.TASKUP) @Log(title = "识别任务", businessType = BusinessType.TASKUP)
@PostMapping("/reRecongnize") @PostMapping("/reRecongnize")
public AjaxResult reRecongnize(Long taskId) { public AjaxResult reRecongnize(Long taskId,String sbType) {
try { try {
DaTask daTask = daTaskService.selectDaTaskById(taskId); DaTask daTask = daTaskService.selectDaTaskById(taskId);
//修改任务状态 //修改任务状态
daTask.setStatus("-1");//默认等待状态 daTask.setStatus("-1");//默认等待状态
daTask.setUpdateTime(new Date());//等待开始时间 daTask.setUpdateTime(new Date());//等待开始时间
daTask.setSbType(sbType); //按客户要求修改识别模板类型
daTaskService.updateDaTask(daTask); daTaskService.updateDaTask(daTask);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return AjaxResult.error(e.getMessage()); return AjaxResult.error(e.getMessage());
@ -429,16 +442,6 @@ 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");
// TODO 根据业务类型存储识别后的信息
/*<option value="option1">1</option>
<option value="option2"></option>
<option value="option3">2</option>
<option value="option4"></option>
<option value="option5"></option>
<option value="option6"></option>
<option value="option7"></option>
<option value="option8"></option>
<option value="option9">3</option>*/
Long dajlId = null; Long dajlId = null;
switch (ywType) { switch (ywType) {
case "option1": case "option1":
@ -503,57 +506,6 @@ public class DangAnCollectController extends BaseController {
return AjaxResult.success(); return AjaxResult.success();
} }
/**
* --使
*/
/*@PostMapping("/sdrecongnize")
public AjaxResult sdrecognize(@RequestBody DaPicturesRecard picRecard) {
try {
//取所有id的集合
String ywType = picRecard.getYwType();
String singleOrDouble = picRecard.getSingelOrDouble();
// TODO 数据解析 根据业务类型存储识别后的信息
switch(ywType){
case "0" :
break;
case "1" :
break;
case "2" :
DaCzrkdj czrkdj = picRecard.getCzrkdj();
daCzrkdjService.insertDaCzrkdj(czrkdj);
//picRecards.stream().filter(p -> p.getId()==1L || p.getId()==2L).collect(Collectors.toList());
break;
case "3" :
break;
case "4" :
break;
case "5" :
break;
case "6" :
break;
case "7" :
DaBirthDj csdj = picRecard.getCsdj();
daBirthDjService.insertDaBirthDj(csdj);
break;
}
//识别成功图片 ,修改图片信息记录表为已识别
picRecard.setRecognize("1");
daPicturesRecardService.updateDaPicturesRecard(picRecard);
} catch (Exception e) {
e.printStackTrace();
return AjaxResult.error(e.getMessage());
}
return AjaxResult.success();
}*/
/** /**
* 线 * 线
*/ */

@ -228,6 +228,19 @@ public class DaBirthDj extends BaseEntity {
*/ */
private Long userId; private Long userId;
/**
* flag=0,1
*/
private String flag;
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public Long getUserId() { public Long getUserId() {
return userId; return userId;
} }

@ -242,6 +242,19 @@ public class DaCzrkdj extends BaseEntity {
*/ */
private Long userId; private Long userId;
/**
* flag=0,1
*/
private String flag;
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public Long getTaskId() { public Long getTaskId() {
return taskId; return taskId;
} }

@ -43,19 +43,23 @@ public class DaPicturesRecard extends BaseEntity
private String muPath; private String muPath;
/** 业务类型(字典) */ /** 业务类型(字典) */
@Excel(name = "业务类型",dictType = "yw_type") // @Excel(name = "业务类型",dictType = "yw_type")
private String ywType; private String ywType;
/** 业务类型(字典) */
// @Excel(name = "识别类型",dictType = "sb_type")
private String sbType;
/** 对应档案记录id */ /** 对应档案记录id */
@Excel(name = "对应档案记录id") // @Excel(name = "对应档案记录id")
private Long daJlId; private Long daJlId;
/** 是否已识别 */ /** 是否已识别 */
@Excel(name = "是否已识别(0否1是)") @Excel(name = "是否已识别",dictType = "recognize")
private String recognize; private String recognize;
/** 是否纠错(字典0否1是) */ /** 是否纠错(字典0否1是) */
@Excel(name = "是否纠错(0否1是)") @Excel(name = "是否纠错",dictType = "error_correct")
private String errorCorrect; private String errorCorrect;
/** /**
@ -63,6 +67,14 @@ public class DaPicturesRecard extends BaseEntity
*/ */
private Long userId; private Long userId;
public String getSbType() {
return sbType;
}
public void setSbType(String sbType) {
this.sbType = sbType;
}
public Long getUserId() { public Long getUserId() {
return userId; return userId;
} }
@ -212,6 +224,7 @@ public class DaPicturesRecard extends BaseEntity
.append("muId", getMuId()) .append("muId", getMuId())
.append("muPath", getMuPath()) .append("muPath", getMuPath())
.append("ywType", getYwType()) .append("ywType", getYwType())
.append("sbType", getSbType())
.append("daJlId", getDaJlId()) .append("daJlId", getDaJlId())
.append("recognize", getRecognize()) .append("recognize", getRecognize())
.append("errorCorrect", getErrorCorrect()) .append("errorCorrect", getErrorCorrect())

@ -228,6 +228,19 @@ public class DaQyz extends BaseEntity {
*/ */
private Long userId; private Long userId;
/**
* flag=0,1
*/
private String flag;
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public Long getUserId() { public Long getUserId() {
return userId; return userId;
} }

@ -14,76 +14,115 @@ import java.util.Date;
* @author hs * @author hs
* @date 2024-07-01 * @date 2024-07-01
*/ */
public class DaTask extends BaseEntity public class DaTask extends BaseEntity {
{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 任务id */ /**
* id
*/
private Long id; private Long id;
/** 目录id */ /**
* id
*/
@Excel(name = "目录id") @Excel(name = "目录id")
private Long muId; private Long muId;
/** 业务类型 */ /**
*
*/
@Excel(name = "业务类型") @Excel(name = "业务类型")
private String ywType; private String ywType;
/** 档案目录路径 */ /**
*
*/
@Excel(name = "识别类型")
private String sbType;
/**
*
*/
@Excel(name = "档案目录路径") @Excel(name = "档案目录路径")
private String muPath; private String muPath;
/** 处理图片数量 */ /**
*
*/
@Excel(name = "处理图片数量") @Excel(name = "处理图片数量")
private Integer num; private Integer num;
/** 任务图片ids */ /**
* ids
*/
@Excel(name = "任务图片ids") @Excel(name = "任务图片ids")
private String picIds; private String picIds;
/** 重新识别数量 */ /**
*
*/
@Excel(name = "重新识别数量") @Excel(name = "重新识别数量")
private Integer lastNum; private Integer lastNum;
/** 任务状态(字典) */ /**
* ()
*/
@Excel(name = "任务状态(字典)") @Excel(name = "任务状态(字典)")
private String status; private String status;
/** 成功数 */ /**
*
*/
@Excel(name = "成功数") @Excel(name = "成功数")
private Integer successNum; private Integer successNum;
/** 成功图片ids */ /**
* ids
*/
@Excel(name = "成功图片ids") @Excel(name = "成功图片ids")
private String successIds; private String successIds;
/** 失败数 */ /**
*
*/
@Excel(name = "失败数") @Excel(name = "失败数")
private Integer failNum; private Integer failNum;
/** 失败图片ids */ /**
* ids
*/
@Excel(name = "失败图片ids") @Excel(name = "失败图片ids")
private String failIds; private String failIds;
/** 返回结果 */ /**
*
*/
@Excel(name = "返回结果") @Excel(name = "返回结果")
private String resultStr; private String resultStr;
/** 上传时长(毫秒) */ /**
* ()
*/
@Excel(name = "上传时长(毫秒)") @Excel(name = "上传时长(毫秒)")
private Long upDuration; private Long upDuration;
/** 识别开始时间 */ /**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "识别开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "识别开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date sbStart; private Date sbStart;
/** 识别结束时间 */ /**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "识别结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "识别结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date sbEnd; private Date sbEnd;
/** 处理时长(毫秒) */ /**
* ()
*/
@Excel(name = "处理时长(毫秒)") @Excel(name = "处理时长(毫秒)")
private Long processDuration; private Long processDuration;
@ -101,112 +140,107 @@ public class DaTask extends BaseEntity
this.userId = userId; this.userId = userId;
} }
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 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 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 setMuPath(String muPath)
{ public void setMuPath(String muPath) {
this.muPath = muPath; this.muPath = muPath;
} }
public String getMuPath() public void setSbType(String sbType) {
{ this.sbType = sbType;
}
public String getSbType() {
return sbType;
}
public String getMuPath() {
return muPath; return muPath;
} }
public void setNum(Integer num)
{ public void setNum(Integer num) {
this.num = num; this.num = num;
} }
public Integer getNum() public Integer getNum() {
{
return num; return num;
} }
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 setStatus(String status)
{ public void setStatus(String status) {
this.status = status; this.status = status;
} }
public String getStatus() public String getStatus() {
{
return status; return status;
} }
public void setSuccessNum(Integer successNum)
{ public void setSuccessNum(Integer successNum) {
this.successNum = successNum; this.successNum = successNum;
} }
public Integer getSuccessNum() public Integer getSuccessNum() {
{
return successNum; return successNum;
} }
public void setSuccessIds(String successIds)
{ public void setSuccessIds(String successIds) {
this.successIds = successIds; this.successIds = successIds;
} }
public String getSuccessIds() public String getSuccessIds() {
{
return successIds; return successIds;
} }
public void setFailNum(Integer failNum)
{ public void setFailNum(Integer failNum) {
this.failNum = failNum; this.failNum = failNum;
} }
public Integer getFailNum() public Integer getFailNum() {
{
return failNum; return failNum;
} }
public void setFailIds(String failIds)
{ public void setFailIds(String failIds) {
this.failIds = failIds; this.failIds = failIds;
} }
public String getFailIds() public String getFailIds() {
{
return failIds; return failIds;
} }
public void setResultStr(String resultStr)
{ public void setResultStr(String resultStr) {
this.resultStr = resultStr; this.resultStr = resultStr;
} }
public String getResultStr() public String getResultStr() {
{
return resultStr; return resultStr;
} }
@ -252,10 +286,11 @@ public class DaTask 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("muId", getMuId()) .append("muId", getMuId())
.append("ywType", getYwType()) .append("ywType", getYwType())
.append("sbType", getSbType())
.append("muPath", getMuPath()) .append("muPath", getMuPath())
.append("num", getNum()) .append("num", getNum())
.append("picIds", getPicIds()) .append("picIds", getPicIds())

@ -204,6 +204,19 @@ public class DaYtzm extends BaseEntity {
*/ */
private Long userId; private Long userId;
/**
* flag=0,1
*/
private String flag;
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public Long getUserId() { public Long getUserId() {
return userId; return userId;
} }

@ -240,6 +240,19 @@ public class DaZfnyhkcg extends BaseEntity {
*/ */
private Long userId; private Long userId;
/**
* flag=0,1
*/
private String flag;
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public Long getUserId() { public Long getUserId() {
return userId; return userId;
} }

@ -207,6 +207,19 @@ public class DaZqz extends BaseEntity
*/ */
private Long userId; private Long userId;
/**
* flag=0,1
*/
private String flag;
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public Long getUserId() { public Long getUserId() {
return userId; return userId;
} }

@ -3,14 +3,19 @@ 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.domain.DaPicturesRecard;
import com.da.dangan.domain.DaTask;
import com.da.dangan.mapper.DaBirthDjMapper; import com.da.dangan.mapper.DaBirthDjMapper;
import com.da.dangan.mapper.DaPicturesRecardMapper; import com.da.dangan.mapper.DaPicturesRecardMapper;
import com.da.dangan.mapper.DaTaskMapper;
import com.da.dangan.service.IDaBirthDjService; import com.da.dangan.service.IDaBirthDjService;
import org.apache.commons.lang3.StringUtils;
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 org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* Service * Service
@ -25,6 +30,8 @@ public class DaBirthDjServiceImpl implements IDaBirthDjService
private DaBirthDjMapper daBirthDjMapper; private DaBirthDjMapper daBirthDjMapper;
@Autowired @Autowired
private DaPicturesRecardMapper daPicturesRecardMapper; private DaPicturesRecardMapper daPicturesRecardMapper;
@Autowired
private DaTaskMapper daTaskMapper;
/** /**
* *
* *
@ -60,14 +67,28 @@ public class DaBirthDjServiceImpl implements IDaBirthDjService
public int insertDaBirthDj(DaBirthDj daBirthDj) public int insertDaBirthDj(DaBirthDj daBirthDj)
{ {
//识别图片状态改为已识别 //识别图片状态改为已识别
String[] picIds = daBirthDj.getPicIds().split(","); List<Long> picIds = Stream.of(daBirthDj.getPicIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
if(picIds!=null&&picIds.length>0){ if (picIds != null && picIds.size() > 0) {
for(String picid:picIds){ for (Long picid : picIds) {
DaPicturesRecard picRecard = new DaPicturesRecard(); DaPicturesRecard picRecard = new DaPicturesRecard();
picRecard.setId(Long.parseLong(picid)); picRecard.setId(picid);
picRecard.setRecognize("1"); picRecard.setRecognize("1");
daPicturesRecardMapper.updateDaPicturesRecard(picRecard); daPicturesRecardMapper.updateDaPicturesRecard(picRecard);
} }
//手动识别且图片来自于任务,修改任务成功、失败图片
if (daBirthDj.getTaskId() != null&&daBirthDj.getErrorCorrect().equals("2")) {
DaTask daTask = daTaskMapper.selectDaTaskById(daBirthDj.getTaskId());
List<Long> failIds = Stream.of(daTask.getFailIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
List<Long> successIds = Stream.of(daTask.getSuccessIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
//失败减少、成功增加
if (failIds.removeAll(picIds) && successIds.addAll(picIds)) {
daTask.setSuccessNum(daTask.getSuccessNum() + picIds.size());
daTask.setFailNum(daTask.getFailNum() - picIds.size());
daTask.setFailIds(StringUtils.join(failIds));
daTask.setSuccessIds(StringUtils.join(successIds));
daTaskMapper.updateDaTask(daTask);
}
}
} }
daBirthDj.setCreateTime(DateUtils.getNowDate()); daBirthDj.setCreateTime(DateUtils.getNowDate());
return daBirthDjMapper.insertDaBirthDj(daBirthDj); return daBirthDjMapper.insertDaBirthDj(daBirthDj);

@ -3,71 +3,89 @@ 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.domain.DaPicturesRecard;
import com.da.dangan.domain.DaTask;
import com.da.dangan.mapper.DaCzrkdjMapper; import com.da.dangan.mapper.DaCzrkdjMapper;
import com.da.dangan.mapper.DaPicturesRecardMapper; import com.da.dangan.mapper.DaPicturesRecardMapper;
import com.da.dangan.mapper.DaTaskMapper;
import com.da.dangan.service.IDaCzrkdjService; import com.da.dangan.service.IDaCzrkdjService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* Service * Service
* *
* @author hs * @author hs
* @date 2024-05-08 * @date 2024-05-08
*/ */
@Service @Service
public class DaCzrkdjServiceImpl implements IDaCzrkdjService public class DaCzrkdjServiceImpl implements IDaCzrkdjService {
{
@Resource @Resource
private DaCzrkdjMapper daCzrkdjMapper; private DaCzrkdjMapper daCzrkdjMapper;
@Resource @Resource
private DaPicturesRecardMapper daPicturesRecardMapper; private DaPicturesRecardMapper daPicturesRecardMapper;
@Resource
private DaTaskMapper daTaskMapper;
/** /**
* *
* *
* @param id * @param id
* @return * @return
*/ */
@Override @Override
public DaCzrkdj selectDaCzrkdjById(Long id) public DaCzrkdj selectDaCzrkdjById(Long id) {
{
return daCzrkdjMapper.selectDaCzrkdjById(id); return daCzrkdjMapper.selectDaCzrkdjById(id);
} }
/** /**
* *
* *
* @param daCzrkdj * @param daCzrkdj
* @return * @return
*/ */
@Override @Override
public List<DaCzrkdj> selectDaCzrkdjList(DaCzrkdj daCzrkdj) public List<DaCzrkdj> selectDaCzrkdjList(DaCzrkdj daCzrkdj) {
{
return daCzrkdjMapper.selectDaCzrkdjList(daCzrkdj); return daCzrkdjMapper.selectDaCzrkdjList(daCzrkdj);
} }
/** /**
* *
* *
* @param daCzrkdj * @param daCzrkdj
* @return * @return
*/ */
@Override @Override
@Transactional @Transactional
public int insertDaCzrkdj(DaCzrkdj daCzrkdj) public int insertDaCzrkdj(DaCzrkdj daCzrkdj) {
{
//识别图片状态改为已识别 //识别图片状态改为已识别
String[] picIds = daCzrkdj.getPicIds().split(","); List<Long> picIds = Stream.of(daCzrkdj.getPicIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
if (picIds != null && picIds.length > 0) { if (picIds != null && picIds.size() > 0) {
for (String picid : picIds) { for (Long picid : picIds) {
DaPicturesRecard picRecard = new DaPicturesRecard(); DaPicturesRecard picRecard = new DaPicturesRecard();
picRecard.setId(Long.parseLong(picid)); picRecard.setId(picid);
picRecard.setRecognize("1"); picRecard.setRecognize("1");
daPicturesRecardMapper.updateDaPicturesRecard(picRecard); daPicturesRecardMapper.updateDaPicturesRecard(picRecard);
} }
//手动识别且图片来自于任务,修改任务成功、失败图片
if (daCzrkdj.getTaskId() != null&&daCzrkdj.getErrorCorrect().equals("2")) {
DaTask daTask = daTaskMapper.selectDaTaskById(daCzrkdj.getTaskId());
List<Long> failIds = Stream.of(daTask.getFailIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
List<Long> successIds = Stream.of(daTask.getSuccessIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
//失败减少、成功增加
if (failIds.removeAll(picIds) && successIds.addAll(picIds)) {
daTask.setSuccessNum(daTask.getSuccessNum() + picIds.size());
daTask.setFailNum(daTask.getFailNum() - picIds.size());
daTask.setFailIds(StringUtils.join(failIds));
daTask.setSuccessIds(StringUtils.join(successIds));
daTaskMapper.updateDaTask(daTask);
}
}
} }
daCzrkdj.setCreateTime(DateUtils.getNowDate()); daCzrkdj.setCreateTime(DateUtils.getNowDate());
return daCzrkdjMapper.insertDaCzrkdj(daCzrkdj); return daCzrkdjMapper.insertDaCzrkdj(daCzrkdj);
@ -75,18 +93,17 @@ public class DaCzrkdjServiceImpl implements IDaCzrkdjService
/** /**
* *
* *
* @param daCzrkdj * @param daCzrkdj
* @return * @return
*/ */
@Override @Override
@Transactional @Transactional
public int updateDaCzrkdj(DaCzrkdj daCzrkdj) public int updateDaCzrkdj(DaCzrkdj daCzrkdj) { //修改纠错时 同步修改对应识别图片的纠错标识
{ //修改纠错时 同步修改对应识别图片的纠错标识 if (daCzrkdj.getErrorCorrect().equals("1")) {
if(daCzrkdj.getErrorCorrect().equals("1")){
String picIds = daCzrkdj.getPicIds(); String picIds = daCzrkdj.getPicIds();
String[] split = picIds.split(","); String[] split = picIds.split(",");
for(String picId :split){ for (String picId : split) {
Long picid = Long.parseLong(picId); Long picid = Long.parseLong(picId);
DaPicturesRecard picturesRecard = new DaPicturesRecard(); DaPicturesRecard picturesRecard = new DaPicturesRecard();
picturesRecard.setId(picid); picturesRecard.setId(picid);
@ -100,25 +117,23 @@ public class DaCzrkdjServiceImpl implements IDaCzrkdjService
/** /**
* *
* *
* @param ids * @param ids
* @return * @return
*/ */
@Override @Override
public int deleteDaCzrkdjByIds(Long[] ids) public int deleteDaCzrkdjByIds(Long[] ids) {
{
return daCzrkdjMapper.deleteDaCzrkdjByIds(ids); return daCzrkdjMapper.deleteDaCzrkdjByIds(ids);
} }
/** /**
* *
* *
* @param id * @param id
* @return * @return
*/ */
@Override @Override
public int deleteDaCzrkdjById(Long id) public int deleteDaCzrkdjById(Long id) {
{
return daCzrkdjMapper.deleteDaCzrkdjById(id); return daCzrkdjMapper.deleteDaCzrkdjById(id);
} }

@ -3,14 +3,19 @@ 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.DaPicturesRecard;
import com.da.dangan.domain.DaQyz; import com.da.dangan.domain.DaQyz;
import com.da.dangan.domain.DaTask;
import com.da.dangan.mapper.DaPicturesRecardMapper; import com.da.dangan.mapper.DaPicturesRecardMapper;
import com.da.dangan.mapper.DaQyzMapper; import com.da.dangan.mapper.DaQyzMapper;
import com.da.dangan.mapper.DaTaskMapper;
import com.da.dangan.service.IDaQyzService; import com.da.dangan.service.IDaQyzService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* Service * Service
@ -25,6 +30,8 @@ public class DaQyzServiceImpl implements IDaQyzService
private DaQyzMapper daQyzMapper; private DaQyzMapper daQyzMapper;
@Resource @Resource
private DaPicturesRecardMapper daPicturesRecardMapper; private DaPicturesRecardMapper daPicturesRecardMapper;
@Resource
private DaTaskMapper daTaskMapper;
/** /**
* *
* *
@ -60,15 +67,30 @@ public class DaQyzServiceImpl implements IDaQyzService
public int insertDaQyz(DaQyz daQyz) public int insertDaQyz(DaQyz daQyz)
{ {
//识别图片状态改为已识别 //识别图片状态改为已识别
String[] picIds = daQyz.getPicIds().split(","); List<Long> picIds = Stream.of(daQyz.getPicIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
if (picIds != null && picIds.length > 0) { if (picIds != null && picIds.size() > 0) {
for (String picid : picIds) { for (Long picid : picIds) {
DaPicturesRecard picRecard = new DaPicturesRecard(); DaPicturesRecard picRecard = new DaPicturesRecard();
picRecard.setId(Long.parseLong(picid)); picRecard.setId(picid);
picRecard.setRecognize("1"); picRecard.setRecognize("1");
daPicturesRecardMapper.updateDaPicturesRecard(picRecard); daPicturesRecardMapper.updateDaPicturesRecard(picRecard);
} }
//手动识别且图片来自于任务,修改任务成功、失败图片
if (daQyz.getTaskId() != null&&daQyz.getErrorCorrect().equals("2")) {
DaTask daTask = daTaskMapper.selectDaTaskById(daQyz.getTaskId());
List<Long> failIds = Stream.of(daTask.getFailIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
List<Long> successIds = Stream.of(daTask.getSuccessIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
//失败减少、成功增加
if (failIds.removeAll(picIds) && successIds.addAll(picIds)) {
daTask.setSuccessNum(daTask.getSuccessNum() + picIds.size());
daTask.setFailNum(daTask.getFailNum() - picIds.size());
daTask.setFailIds(StringUtils.join(failIds));
daTask.setSuccessIds(StringUtils.join(successIds));
daTaskMapper.updateDaTask(daTask);
}
}
} }
daQyz.setCreateTime(DateUtils.getNowDate()); daQyz.setCreateTime(DateUtils.getNowDate());
return daQyzMapper.insertDaQyz(daQyz); return daQyzMapper.insertDaQyz(daQyz);
} }

@ -2,15 +2,20 @@ 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.DaPicturesRecard;
import com.da.dangan.domain.DaTask;
import com.da.dangan.domain.DaYtzm; import com.da.dangan.domain.DaYtzm;
import com.da.dangan.mapper.DaPicturesRecardMapper; import com.da.dangan.mapper.DaPicturesRecardMapper;
import com.da.dangan.mapper.DaTaskMapper;
import com.da.dangan.mapper.DaYtzmMapper; import com.da.dangan.mapper.DaYtzmMapper;
import com.da.dangan.service.IDaYtzmService; import com.da.dangan.service.IDaYtzmService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* Service * Service
@ -25,6 +30,8 @@ public class DaYtzmServiceImpl implements IDaYtzmService
private DaYtzmMapper daYtzmMapper; private DaYtzmMapper daYtzmMapper;
@Resource @Resource
private DaPicturesRecardMapper daPicturesRecardMapper; private DaPicturesRecardMapper daPicturesRecardMapper;
@Resource
private DaTaskMapper daTaskMapper;
/** /**
* *
* *
@ -60,14 +67,28 @@ public class DaYtzmServiceImpl implements IDaYtzmService
public int insertDaYtzm(DaYtzm daYtzm) public int insertDaYtzm(DaYtzm daYtzm)
{ {
//识别图片状态改为已识别 //识别图片状态改为已识别
String[] picIds = daYtzm.getPicIds().split(","); List<Long> picIds = Stream.of(daYtzm.getPicIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
if (picIds != null && picIds.length > 0) { if (picIds != null && picIds.size() > 0) {
for (String picid : picIds) { for (Long picid : picIds) {
DaPicturesRecard picRecard = new DaPicturesRecard(); DaPicturesRecard picRecard = new DaPicturesRecard();
picRecard.setId(Long.parseLong(picid)); picRecard.setId(picid);
picRecard.setRecognize("1"); picRecard.setRecognize("1");
daPicturesRecardMapper.updateDaPicturesRecard(picRecard); daPicturesRecardMapper.updateDaPicturesRecard(picRecard);
} }
//手动识别且图片来自于任务,修改任务成功、失败图片
if (daYtzm.getTaskId() != null&&daYtzm.getErrorCorrect().equals("2")) {
DaTask daTask = daTaskMapper.selectDaTaskById(daYtzm.getTaskId());
List<Long> failIds = Stream.of(daTask.getFailIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
List<Long> successIds = Stream.of(daTask.getSuccessIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
//失败减少、成功增加
if (failIds.removeAll(picIds) && successIds.addAll(picIds)) {
daTask.setSuccessNum(daTask.getSuccessNum() + picIds.size());
daTask.setFailNum(daTask.getFailNum() - picIds.size());
daTask.setFailIds(StringUtils.join(failIds));
daTask.setSuccessIds(StringUtils.join(successIds));
daTaskMapper.updateDaTask(daTask);
}
}
} }
daYtzm.setCreateTime(DateUtils.getNowDate()); daYtzm.setCreateTime(DateUtils.getNowDate());
return daYtzmMapper.insertDaYtzm(daYtzm); return daYtzmMapper.insertDaYtzm(daYtzm);

@ -2,15 +2,20 @@ 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.DaPicturesRecard;
import com.da.dangan.domain.DaTask;
import com.da.dangan.domain.DaZfnyhkcg; import com.da.dangan.domain.DaZfnyhkcg;
import com.da.dangan.mapper.DaPicturesRecardMapper; import com.da.dangan.mapper.DaPicturesRecardMapper;
import com.da.dangan.mapper.DaTaskMapper;
import com.da.dangan.mapper.DaZfnyhkcgMapper; 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.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* Service * Service
@ -21,10 +26,12 @@ import java.util.List;
@Service @Service
public class DaZfnyhkcgServiceImpl implements IDaZfnyhkcgService public class DaZfnyhkcgServiceImpl implements IDaZfnyhkcgService
{ {
@Autowired @Resource
private DaZfnyhkcgMapper daZfnyhkcgMapper; private DaZfnyhkcgMapper daZfnyhkcgMapper;
@Autowired @Resource
private DaPicturesRecardMapper daPicturesRecardMapper; private DaPicturesRecardMapper daPicturesRecardMapper;
@Resource
private DaTaskMapper daTaskMapper;
/** /**
* *
* *
@ -60,14 +67,28 @@ public class DaZfnyhkcgServiceImpl implements IDaZfnyhkcgService
public int insertDaZfnyhkcg(DaZfnyhkcg daZfnyhkcg) public int insertDaZfnyhkcg(DaZfnyhkcg daZfnyhkcg)
{ {
//识别图片状态改为已识别 //识别图片状态改为已识别
String[] picIds = daZfnyhkcg.getPicIds().split(","); List<Long> picIds = Stream.of(daZfnyhkcg.getPicIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
if (picIds != null && picIds.length > 0) { if (picIds != null && picIds.size() > 0) {
for (String picid : picIds) { for (Long picid : picIds) {
DaPicturesRecard picRecard = new DaPicturesRecard(); DaPicturesRecard picRecard = new DaPicturesRecard();
picRecard.setId(Long.parseLong(picid)); picRecard.setId(picid);
picRecard.setRecognize("1"); picRecard.setRecognize("1");
daPicturesRecardMapper.updateDaPicturesRecard(picRecard); daPicturesRecardMapper.updateDaPicturesRecard(picRecard);
} }
//手动识别且图片来自于任务,修改任务成功、失败图片
if (daZfnyhkcg.getTaskId() != null&&daZfnyhkcg.getErrorCorrect().equals("2")) {
DaTask daTask = daTaskMapper.selectDaTaskById(daZfnyhkcg.getTaskId());
List<Long> failIds = Stream.of(daTask.getFailIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
List<Long> successIds = Stream.of(daTask.getSuccessIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
//失败减少、成功增加
if (failIds.removeAll(picIds) && successIds.addAll(picIds)) {
daTask.setSuccessNum(daTask.getSuccessNum() + picIds.size());
daTask.setFailNum(daTask.getFailNum() - picIds.size());
daTask.setFailIds(StringUtils.join(failIds));
daTask.setSuccessIds(StringUtils.join(successIds));
daTaskMapper.updateDaTask(daTask);
}
}
} }
daZfnyhkcg.setCreateTime(DateUtils.getNowDate()); daZfnyhkcg.setCreateTime(DateUtils.getNowDate());
return daZfnyhkcgMapper.insertDaZfnyhkcg(daZfnyhkcg); return daZfnyhkcgMapper.insertDaZfnyhkcg(daZfnyhkcg);

@ -2,15 +2,20 @@ 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.DaPicturesRecard;
import com.da.dangan.domain.DaTask;
import com.da.dangan.domain.DaZqz; import com.da.dangan.domain.DaZqz;
import com.da.dangan.mapper.DaPicturesRecardMapper; import com.da.dangan.mapper.DaPicturesRecardMapper;
import com.da.dangan.mapper.DaTaskMapper;
import com.da.dangan.mapper.DaZqzMapper; 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.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* Service * Service
@ -21,10 +26,12 @@ import java.util.List;
@Service @Service
public class DaZqzServiceImpl implements IDaZqzService public class DaZqzServiceImpl implements IDaZqzService
{ {
@Autowired @Resource
private DaZqzMapper daZqzMapper; private DaZqzMapper daZqzMapper;
@Autowired @Resource
private DaPicturesRecardMapper daPicturesRecardMapper; private DaPicturesRecardMapper daPicturesRecardMapper;
@Resource
private DaTaskMapper daTaskMapper;
/** /**
* *
* *
@ -60,14 +67,28 @@ public class DaZqzServiceImpl implements IDaZqzService
public int insertDaZqz(DaZqz daZqz) public int insertDaZqz(DaZqz daZqz)
{ {
//识别图片状态改为已识别 //识别图片状态改为已识别
String[] picIds = daZqz.getPicIds().split(","); List<Long> picIds = Stream.of(daZqz.getPicIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
if (picIds != null && picIds.length > 0) { if (picIds != null && picIds.size() > 0) {
for (String picid : picIds) { for (Long picid : picIds) {
DaPicturesRecard picRecard = new DaPicturesRecard(); DaPicturesRecard picRecard = new DaPicturesRecard();
picRecard.setId(Long.parseLong(picid)); picRecard.setId(picid);
picRecard.setRecognize("1"); picRecard.setRecognize("1");
daPicturesRecardMapper.updateDaPicturesRecard(picRecard); daPicturesRecardMapper.updateDaPicturesRecard(picRecard);
} }
//手动识别且图片来自于任务,修改任务成功、失败图片
if (daZqz.getTaskId() != null&&daZqz.getErrorCorrect().equals("2")) {
DaTask daTask = daTaskMapper.selectDaTaskById(daZqz.getTaskId());
List<Long> failIds = Stream.of(daTask.getFailIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
List<Long> successIds = Stream.of(daTask.getSuccessIds().split(",")).map(Long::parseLong).collect(Collectors.toList());
//失败减少、成功增加
if (failIds.removeAll(picIds) && successIds.addAll(picIds)) {
daTask.setSuccessNum(daTask.getSuccessNum() + picIds.size());
daTask.setFailNum(daTask.getFailNum() - picIds.size());
daTask.setFailIds(StringUtils.join(failIds));
daTask.setSuccessIds(StringUtils.join(successIds));
daTaskMapper.updateDaTask(daTask);
}
}
} }
daZqz.setCreateTime(DateUtils.getNowDate()); daZqz.setCreateTime(DateUtils.getNowDate());
return daZqzMapper.insertDaZqz(daZqz); return daZqzMapper.insertDaZqz(daZqz);

@ -422,7 +422,8 @@ public class TimeTask {
files.add(file); files.add(file);
} }
Long start = System.currentTimeMillis(); Long start = System.currentTimeMillis();
result = CallThirdInterface.callThirdInterfaceUpload(url1, files, daTask.getYwType(), ids, daTask.getId()); //调用第三方上传接口,模板类型使用识别模板字段
result = CallThirdInterface.callThirdInterfaceUpload(url1, files, daTask.getSbType(), ids, daTask.getId());
Long end = System.currentTimeMillis(); Long end = System.currentTimeMillis();
//! 解析JSON字符串,获取键对应的值 //! 解析JSON字符串,获取键对应的值
JSONObject jsonobject = null; JSONObject jsonobject = null;

@ -120,7 +120,7 @@ public class CallThirdInterface {
// 1. 创建HttpRequest对象 - 指定好 url 地址 // 1. 创建HttpRequest对象 - 指定好 url 地址
HttpRequest httpRequest = new HttpRequest(url1); HttpRequest httpRequest = new HttpRequest(url1);
// 2. 设置请求方式默认是GET请求 // 2. 设置请求方式默认是GET请求
httpRequest.timeout(300000).setMethod(Method.POST); //设置3min超时 httpRequest.timeout(2000000).setMethod(Method.POST); //设置3min超时
// 3. 设置请求参数 可通过 form表单方法 设置 可以是文件类型 // 3. 设置请求参数 可通过 form表单方法 设置 可以是文件类型
// form方法有很多重载方法,可以一个一个参数设置也可以将参数封装进一个map集合然后一块儿 // form方法有很多重载方法,可以一个一个参数设置也可以将参数封装进一个map集合然后一块儿
// File file = new File("C:\\Users\\hssym\\Downloads\\UBQ.png"); // File file = new File("C:\\Users\\hssym\\Downloads\\UBQ.png");

@ -55,6 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if> <if test="taskId != null "> and task_id = #{taskId}</if>
<!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
<if test="flag != null and flag=='1'.toString()"> and m_name !='无'</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="muId != null "> and b.mu_id = #{muId}</if> <if test="muId != null "> and b.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
@ -65,14 +67,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
or f_name like concat('%', #{name}, '%') or f_name like concat('%', #{name}, '%')
) )
</if> </if>
<if test="birthday != null "> and birthday like concat('%', #{birthday}, '%') </if> <if test="birthday != null ">
and birthday like concat('%', #{birthday}, '%')
</if>
<if test="mCardId != null and mCardId != ''">
and (m_card_id like concat('%', #{mCardId}, '%')
or f_card_id like concat('%', #{mCardId}, '%')
)
</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 like concat('%', #{bornAddress}, '%') </if> <if test="bornAddress != null and bornAddress != ''"> and born_address like concat('%', #{bornAddress}, '%') </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>
<if test="mAge != null and mAge != ''"> and m_age = #{mAge}</if> <if test="mAge != null and mAge != ''"> and m_age = #{mAge}</if>
<if test="mGj != null and mGj != ''"> and m_gj = #{mGj}</if> <if test="mGj != null and mGj != ''"> and m_gj = #{mGj}</if>
<if test="mNation != null and mNation != ''"> and m_nation = #{mNation}</if> <if test="mNation != null and mNation != ''"> and m_nation = #{mNation}</if>
<if test="mCardId != null and mCardId != ''"> and m_card_id = #{mCardId}</if>
<if test="fName != null and fName != ''"> and f_name like concat('%', #{fName}, '%')</if> <if test="fName != null and fName != ''"> and f_name like concat('%', #{fName}, '%')</if>
<if test="fAge != null and fAge != ''"> and f_age = #{fAge}</if> <if test="fAge != null and fAge != ''"> and f_age = #{fAge}</if>
<if test="fGj != null and fGj != ''"> and f_gj = #{fGj}</if> <if test="fGj != null and fGj != ''"> and f_gj = #{fGj}</if>
@ -95,12 +103,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
order by id desc order by id desc
</select> </select>
<select id="selectDaBirthDjById" parameterType="Long" resultMap="DaBirthDjResult"> <select id="selectDaBirthDjById" parameterType="Long" resultMap="DaBirthDjResult">
<include refid="selectDaBirthDjVo"/> <include refid="selectDaBirthDjVo"/>
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertDaBirthDj" parameterType="DaBirthDj" useGeneratedKeys="true" keyProperty="id"> <insert id="insertDaBirthDj" parameterType="DaBirthDj" useGeneratedKeys="true" keyProperty="id">
insert into da_birth_dj insert into da_birth_dj
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@ -235,7 +243,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteDaBirthDjByIds" parameterType="String"> <delete id="deleteDaBirthDjByIds" parameterType="String">
delete from da_birth_dj where id in delete from da_birth_dj where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>

@ -76,6 +76,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if> <if test="taskId != null "> and task_id = #{taskId}</if>
<!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
<if test="flag != null and flag=='1'.toString()"> and name !='无'</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="muId != null "> and c.mu_id = #{muId}</if> <if test="muId != null "> and c.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
@ -89,6 +91,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
or jhr2 like concat('%', #{name}, '%') or jhr2 like concat('%', #{name}, '%')
) )
</if> </if>
<if test="birthday != null and birthday != ''">
and birthday like concat('%', #{birthday}, '%')
</if>
<if test="cardId != null and cardId != ''">
and card_id like concat('%', #{cardId}, '%')
</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="usedName != null and usedName != ''"> and used_name like concat('%', #{usedName}, '%')</if> <if test="usedName != null and usedName != ''"> and used_name like concat('%', #{usedName}, '%')</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if> <if test="sex != null and sex != ''"> and sex = #{sex}</if>
@ -97,8 +105,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="jhr2 != null and jhr2 != ''"> and jhr2 = #{jhr2}</if> <if test="jhr2 != null and jhr2 != ''"> and jhr2 = #{jhr2}</if>
<if test="jhgx2 != null and jhgx2 != ''"> and jhgx2 = #{jhgx2}</if> <if test="jhgx2 != null and jhgx2 != ''"> and jhgx2 = #{jhgx2}</if>
<if test="gmcszqfrq != null and gmcszqfrq != ''"> and gmcszqfrq = #{gmcszqfrq}</if> <if test="gmcszqfrq != null and gmcszqfrq != ''"> and gmcszqfrq = #{gmcszqfrq}</if>
<if test="birthday != null and birthday != ''">
and birthday like concat('%', #{birthday}, '%') </if>
<if test="address != null and address != ''"> and address = #{address}</if> <if test="address != null and address != ''"> and address = #{address}</if>
<if test="yj != null and yj != ''"> and yj = #{yj}</if> <if test="yj != null and yj != ''"> and yj = #{yj}</if>
<if test="nation != null and nation != ''"> and nation like concat('%', #{nation}, '%') </if> <if test="nation != null and nation != ''"> and nation like concat('%', #{nation}, '%') </if>
@ -128,7 +134,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sljmsfzqm != null and sljmsfzqm != ''"> and sljmsfzqm = #{sljmsfzqm}</if> <if test="sljmsfzqm != null and sljmsfzqm != ''"> and sljmsfzqm = #{sljmsfzqm}</if>
<if test="qfyj != null and qfyj != ''"> and qfyj = #{qfyj}</if> <if test="qfyj != null and qfyj != ''"> and qfyj = #{qfyj}</if>
<if test="yxrq != null and yxrq != ''"> and yxrq = #{yxrq}</if> <if test="yxrq != null and yxrq != ''"> and yxrq = #{yxrq}</if>
<if test="cardId != null and cardId != ''"> and card_id concat('%', #{cardId}, '%')</if>
<if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if> <if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if>
<if test="pictures != null and pictures != ''"> and pictures = #{pictures}</if> <if test="pictures != null and pictures != ''"> and pictures = #{pictures}</if>
<if test="allPicIds != null and allPicIds != ''"> and all_pic_ids = #{allPicIds}</if> <if test="allPicIds != null and allPicIds != ''"> and all_pic_ids = #{allPicIds}</if>
@ -148,6 +153,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if> <if test="taskId != null "> and task_id = #{taskId}</if>
<!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
<if test="flag != null and flag=='1'.toString()"> and name !='无'</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="muId != null "> and c.mu_id = #{muId}</if> <if test="muId != null "> and c.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
@ -161,6 +168,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
or jhr2 like concat('%', #{name}, '%') or jhr2 like concat('%', #{name}, '%')
) )
</if> </if>
<if test="birthday != null and birthday != ''">
and birthday like concat('%', #{birthday}, '%')
</if>
<if test="cardId != null and cardId != ''">
and card_id like concat('%', #{cardId}, '%')
</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="usedName != null and usedName != ''"> and used_name like concat('%', #{usedName}, '%')</if> <if test="usedName != null and usedName != ''"> and used_name like concat('%', #{usedName}, '%')</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if> <if test="sex != null and sex != ''"> and sex = #{sex}</if>
@ -169,8 +182,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="jhr2 != null and jhr2 != ''"> and jhr2 like concat('%', #{jhr2}, '%') </if> <if test="jhr2 != null and jhr2 != ''"> and jhr2 like concat('%', #{jhr2}, '%') </if>
<if test="jhgx2 != null and jhgx2 != ''"> and jhgx2 = #{jhgx2}</if> <if test="jhgx2 != null and jhgx2 != ''"> and jhgx2 = #{jhgx2}</if>
<if test="gmcszqfrq != null and gmcszqfrq != ''"> and gmcszqfrq = #{gmcszqfrq}</if> <if test="gmcszqfrq != null and gmcszqfrq != ''"> and gmcszqfrq = #{gmcszqfrq}</if>
<if test="birthday != null and birthday != ''">
and birthday like concat('%', #{birthday}, '%') </if>
<if test="address != null and address != ''"> and address = #{address}</if> <if test="address != null and address != ''"> and address = #{address}</if>
<if test="yj != null and yj != ''"> and yj = #{yj}</if> <if test="yj != null and yj != ''"> and yj = #{yj}</if>
<if test="nation != null and nation != ''"> and nation like concat('%', #{nation}, '%') </if> <if test="nation != null and nation != ''"> and nation like concat('%', #{nation}, '%') </if>
@ -200,7 +211,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sljmsfzqm != null and sljmsfzqm != ''"> and sljmsfzqm = #{sljmsfzqm}</if> <if test="sljmsfzqm != null and sljmsfzqm != ''"> and sljmsfzqm = #{sljmsfzqm}</if>
<if test="qfyj != null and qfyj != ''"> and qfyj = #{qfyj}</if> <if test="qfyj != null and qfyj != ''"> and qfyj = #{qfyj}</if>
<if test="yxrq != null and yxrq != ''"> and yxrq = #{yxrq}</if> <if test="yxrq != null and yxrq != ''"> and yxrq = #{yxrq}</if>
<if test="cardId != null and cardId != ''"> and card_id concat('%', #{cardId}, '%')</if>
<if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if> <if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if>
<if test="pictures != null and pictures != ''"> and pictures = #{pictures}</if> <if test="pictures != null and pictures != ''"> and pictures = #{pictures}</if>
<if test="allPicIds != null and allPicIds != ''"> and all_pic_ids = #{allPicIds}</if> <if test="allPicIds != null and allPicIds != ''"> and all_pic_ids = #{allPicIds}</if>

@ -56,6 +56,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="userId != null"> and uc.user_id = #{userId}</if> <if test="userId != null"> and uc.user_id = #{userId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if> <if test="taskId != null "> and task_id = #{taskId}</if>
<!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
<if test="flag != null and flag=='1'.toString()"> and name1 !='无'</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="muId != null "> and q.mu_id = #{muId}</if> <if test="muId != null "> and q.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
@ -70,12 +72,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if> </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 != ''"> <if test="cardId1 != null and cardId1 != ''">
/*and (card_id1 like concat('%', #{cardId1}, '%') and (card_id1 like concat('%', #{cardId1}, '%')
or cardId2 like concat('%', #{cardId1}, '%') or cardId2 like concat('%', #{cardId1}, '%')
or cardId3 like concat('%', #{cardId1}, '%') or cardId3 like concat('%', #{cardId1}, '%')
or cardId4 like concat('%', #{cardId1}, '%') or cardId4 like concat('%', #{cardId1}, '%')
)*/ )
and card_id1 like concat('%', #{cardId1}, '%')
</if> </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>

@ -8,6 +8,7 @@
<result property="id" column="id" /> <result property="id" column="id" />
<result property="muId" column="mu_id" /> <result property="muId" column="mu_id" />
<result property="ywType" column="yw_type" /> <result property="ywType" column="yw_type" />
<result property="sbType" column="sb_type" />
<result property="muPath" column="mu_path" /> <result property="muPath" column="mu_path" />
<result property="num" column="num" /> <result property="num" column="num" />
<result property="picIds" column="pic_ids" /> <result property="picIds" column="pic_ids" />
@ -17,7 +18,7 @@
<result property="successIds" column="success_ids" /> <result property="successIds" column="success_ids" />
<result property="failNum" column="fail_num" /> <result property="failNum" column="fail_num" />
<result property="failIds" column="fail_ids" /> <result property="failIds" column="fail_ids" />
<result property="resultStr" column="result_str" /> <!--<result property="resultStr" column="result_str" />-->
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="upDuration" column="up_duration" /> <result property="upDuration" column="up_duration" />
<result property="sbStart" column="sb_start" /> <result property="sbStart" column="sb_start" />
@ -30,7 +31,7 @@
</resultMap> </resultMap>
<sql id="selectDaTaskVo"> <sql id="selectDaTaskVo">
select id, mu_id, yw_type, mu_path, num, pic_ids, last_num, status, success_num, success_ids, fail_num, fail_ids, result_str, remark, up_duration, sb_start, sb_end, process_duration, create_by, create_time, update_by, update_time from da_task select id, mu_id, yw_type, sb_type, mu_path, num, pic_ids, last_num, status, success_num, success_ids, fail_num, fail_ids, result_str, remark, up_duration, sb_start, sb_end, process_duration, create_by, create_time, update_by, update_time from da_task
</sql> </sql>
<select id="selectDaTaskList" parameterType="DaTask" resultMap="DaTaskResult"> <select id="selectDaTaskList" parameterType="DaTask" resultMap="DaTaskResult">
@ -40,6 +41,7 @@
<if test="userId != null"> and uc.user_id = #{userId}</if> <if test="userId != null"> and uc.user_id = #{userId}</if>
<if test="muId != null "> and mu_id = #{muId}</if> <if test="muId != null "> and mu_id = #{muId}</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="sbType != null and sbType != ''"> and sb_type = #{sbType}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
<if test="num != null "> and num = #{num}</if> <if test="num != null "> and num = #{num}</if>
<if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if> <if test="picIds != null and picIds != ''"> and pic_ids = #{picIds}</if>
@ -78,6 +80,7 @@
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="muId != null">mu_id,</if> <if test="muId != null">mu_id,</if>
<if test="ywType != null">yw_type,</if> <if test="ywType != null">yw_type,</if>
<if test="sbType != null">sb_type,</if>
<if test="muPath != null">mu_path,</if> <if test="muPath != null">mu_path,</if>
<if test="num != null">num,</if> <if test="num != null">num,</if>
<if test="picIds != null">pic_ids,</if> <if test="picIds != null">pic_ids,</if>
@ -101,6 +104,7 @@
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="muId != null">#{muId},</if> <if test="muId != null">#{muId},</if>
<if test="ywType != null">#{ywType},</if> <if test="ywType != null">#{ywType},</if>
<if test="sbType != null">#{sbType},</if>
<if test="muPath != null">#{muPath},</if> <if test="muPath != null">#{muPath},</if>
<if test="num != null">#{num},</if> <if test="num != null">#{num},</if>
<if test="picIds != null">#{picIds},</if> <if test="picIds != null">#{picIds},</if>
@ -128,6 +132,7 @@
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="muId != null">mu_id = #{muId},</if> <if test="muId != null">mu_id = #{muId},</if>
<if test="ywType != null">yw_type = #{ywType},</if> <if test="ywType != null">yw_type = #{ywType},</if>
<if test="sbType != null">sb_type = #{sbType},</if>
<if test="muPath != null">mu_path = #{muPath},</if> <if test="muPath != null">mu_path = #{muPath},</if>
<if test="num != null">num = #{num},</if> <if test="num != null">num = #{num},</if>
<if test="picIds != null">pic_ids = #{picIds},</if> <if test="picIds != null">pic_ids = #{picIds},</if>

@ -52,6 +52,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if> <if test="taskId != null "> and task_id = #{taskId}</if>
<!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
<if test="flag != null and flag=='1'.toString()"> and w_name !='无'</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="muId != null "> and y.mu_id = #{muId}</if> <if test="muId != null "> and y.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
@ -62,13 +64,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
or m_name like concat('%', #{wName}, '%') or m_name like concat('%', #{wName}, '%')
) )
</if> </if>
<if test="birthday != null ">
and birthday like concat('%', #{birthday}, '%')
</if>
<if test="wCardId != null and wCardId != ''">
and (w_card_id like concat('%', #{wCardId}, '%')
or m_card_id like concat('%', #{wCardId}, '%')
)
</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="mName != null and mName != ''"> and m_name like concat('%', #{mName}, '%')</if> <if test="mName != null and mName != ''"> and m_name like concat('%', #{mName}, '%')</if>
<if test="mUnit != null and mUnit != ''"> and m_unit = #{mUnit}</if> <if test="mUnit != null and mUnit != ''"> and m_unit = #{mUnit}</if>
<if test="mCardId != null and mCardId != ''"> and m_card_id = #{mCardId}</if> <if test="mCardId != null and mCardId != ''"> and m_card_id = #{mCardId}</if>
<if test="syzh != null and syzh != ''"> and syzh like concat('%', #{syzh}, '%')</if> <if test="syzh != null and syzh != ''"> and syzh like concat('%', #{syzh}, '%')</if>
<if test="birthday != null "> and birthday like concat('%', #{birthday}, '%') </if>
<if test="hospital != null and hospital != ''"> and hospital = #{hospital}</if> <if test="hospital != null and hospital != ''"> and hospital = #{hospital}</if>
<if test="babySex != null and babySex != ''"> and baby_sex = #{babySex}</if> <if test="babySex != null and babySex != ''"> and baby_sex = #{babySex}</if>
<if test="suggest != null and suggest != ''"> and suggest = #{suggest}</if> <if test="suggest != null and suggest != ''"> and suggest = #{suggest}</if>

@ -58,6 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if> <if test="taskId != null "> and task_id = #{taskId}</if>
<!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
<if test="flag != null and flag=='1'.toString()"> and (name !='无' or name1!='无')</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="muId != null "> and z.mu_id = #{muId}</if> <if test="muId != null "> and z.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>

@ -67,6 +67,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="userId != null "> and uc.user_id = #{userId}</if> <if test="userId != null "> and uc.user_id = #{userId}</if>
<if test="taskId != null "> and task_id = #{taskId}</if> <if test="taskId != null "> and task_id = #{taskId}</if>
<!-- flag=0 展示全部 =1不展示没有姓名的记录 -->
<if test="flag != null and flag=='1'.toString()"> and name !='无'</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="muId != null "> and z.mu_id = #{muId}</if> <if test="muId != null "> and z.mu_id = #{muId}</if>
<if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if> <if test="muPath != null and muPath != ''"> and mu_path = #{muPath}</if>
@ -80,14 +82,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) )
</if> </if>
<if test="cardId != null and cardId != ''"> <if test="cardId != null and cardId != ''">
and card_id like concat('%', #{cardId}, '%') and (card_id like concat('%', #{cardId}, '%')
</if> or card_id1 like concat('%', #{cardId}, '%')
or card_id2 like concat('%', #{cardId}, '%')
or card_id3 like concat('%', #{cardId}, '%')
or card_id4 like concat('%', #{cardId}, '%')
)
</if>
<if test="birthDate1 != null ">
and (birth_date1 like concat('%', #{birthDate1}, '%')
or birth_date2 like concat('%', #{birthDate1}, '%')
or birth_date3 like concat('%', #{birthDate1}, '%')
or birth_date4 like concat('%', #{birthDate1}, '%')
)
</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>

Loading…
Cancel
Save