Merge remote-tracking branch 'origin/master'

pull/1/head
lzCodeGarden 1 year ago
commit 542c9e10c1

File diff suppressed because it is too large Load Diff

@ -15,6 +15,7 @@ import javax.servlet.http.HttpServletRequest;
import cn.jyjz.xiaoyao.ocr.service.IOcrSearchHistoryService;
import java.util.List;
import java.util.Map;
/**
* ocr
@ -42,10 +43,10 @@ public class OcrSearchHistoryController {
*/
@RequestMapping(value = "/searchList", method = RequestMethod.GET)
public ResultVo searchList(HttpServletRequest request,
@RequestParam(value = "search", required = false) String search) {
@RequestParam(value = "search", required = true) String search) {
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
//执行查询方法
List<String> selectsearch = ocrSearchHistoryService.selectsearch(search, userToken.getUsername());
List<List<Map<String, String>>> selectsearch = ocrSearchHistoryService.selectsearch(search, userToken.getLoginname());
OcrSearchHistory ocrsearchhistory =new OcrSearchHistory();
ocrsearchhistory.setHistoryname(search);

@ -2,6 +2,8 @@ package cn.jyjz.xiaoyao.ocr.controller;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -13,7 +15,9 @@ import cn.jyjz.xiaoyao.ocr.dataobject.OcrPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.beust.jcommander.Parameter;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -21,7 +25,9 @@ import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@ -37,153 +43,165 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
@RestController
@RequestMapping("/backstage/jifen/ocrtaskchildpicture")
public class OcrTaskchildPictureController extends BaseController{
private Logger log = LoggerFactory.getLogger(this.getClass());
@Resource
private OcrTaskchildPictureService ocrTaskchildPictureService;
@Resource
private OcrPictureService ocrPictureService;
@Resource
private UserTokenService userTokenService;
@Resource
private UserService userService;
/**
*jsondto
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@GetMapping("/list")
public ResultVo<IPage<OcrTaskchildPicture>> listOcrTaskchildPicture(ParamterPage paramterPage, HttpServletRequest request, HttpServletResponse response) throws IOException{
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture();
QueryWrapper<OcrTaskchildPicture> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery,ocrtaskchildpicture);
IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage,queryWrapper);;
return ResultVoUtil.success(page);
}
/**
*jsondto
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@ApiOperation(value="ocr_任务包下的任务集合", notes="ocr_任务包下的任务集合")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "header", name = "X-Tenant-Id", value = "租户主键,用户登录时的信息“tenantList”中获得。", dataType = "String", required = true),
@ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键", required = true)
})
@GetMapping("/listbypackageid/{packageid}")
public ResultVo<IPage<OcrTaskchildPicture>> listbypackageid(ParamterPage paramterPage,
HttpServletRequest request,
HttpServletResponse response,
@PathVariable("packageid") String packageid) throws IOException{
//租户主键,由前端页面传送
String tenantId = request.getHeader("X-Tenant-Id");
if(StringUtils.isBlank(tenantId)){
return ResultVoUtil.error("租户主键不能为空");
}
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture();
QueryWrapper<OcrTaskchildPicture> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery,ocrtaskchildpicture);
queryWrapper.eq("TENANTID",tenantId);
if(StringUtils.isNotBlank(packageid)){
queryWrapper.eq("PACKAGEID",packageid);
}
IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage,queryWrapper);
QueryWrapper<OcrTaskchildPicture> queryWrapperNex = SearchQueryFormat.queryStringFormat(searchQuery,ocrtaskchildpicture);
if(!page.getRecords().isEmpty()){
OcrTaskchildPicture ocrTaskchildPicture = page.getRecords().get(0);
queryWrapperNex.eq("TENANTID",tenantId);
queryWrapperNex.in("PICTUREID",ocrTaskchildPicture.getOcpictureid().split(","));
page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage,queryWrapperNex);
}
return ResultVoUtil.success(page);
}
@ApiOperation(value="ocr_任务包下的当前图片比对的集合列表", notes="ocr_任务包下的当前图片比对的集合列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "header", name = "X-Tenant-Id", value = "租户主键,用户登录时的信息“tenantList”中获得。", dataType = "String", required = true),
@ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键"),
@ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "当前选中的任务主键", required = true)
})
@GetMapping("/listbypictureid/{packageid}/{taskchildpictureid}")
public ResultVo<IPage<OcrTaskchildPicture>> listbypackageidlistbypictureid(ParamterPage paramterPage,
HttpServletRequest request,
HttpServletResponse response,
@PathVariable("packageid") String packageid,
@PathVariable("taskchildpictureid") String taskchildpictureid) throws IOException{
//租户主键,由前端页面传送
String tenantId = request.getHeader("X-Tenant-Id");
if(StringUtils.isBlank(tenantId)){
return ResultVoUtil.error("租户主键不能为空");
}
//排序方式
String orderbyname = request.getParameter("orderbyname");
//排序字段
String orderbyvalue = request.getParameter("orderbyvalue");
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture();
QueryWrapper<OcrTaskchildPicture> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery,ocrtaskchildpicture);
//queryWrapper.eq("TENANTID",tenantId);
//queryWrapper.eq("PACKAGEID",packageid);
IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.listByPackageId(taskchildpictureid,paramterPage,queryWrapper,orderbyname,orderbyvalue, packageid,tenantId);
return ResultVoUtil.success(page);
}
/**
*
*
* @param req
* @return
*/
@ApiOperation(value="任务主图真假标记", notes="任务主图真假标记")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "任务主键", required = true),
@ApiImplicitParam(paramType = "path",name = "izTrueorfalse", value = "主图片真假0:假1真", required = true),
@ApiImplicitParam(paramType = "path",name = "judgeid", value = "主图判真假原因id,从字典表中获得", required = true),
@ApiImplicitParam(paramType = "path",name = "judgedesc", value = "真假其他原因", required = false),
@ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键", required = true)
})
@PostMapping(value = "/ordertrueorfalse")
public ResultVo ordertrueorfalse(@RequestParam(name="taskchildpictureids",required=true) String taskchildpictureids,
@RequestParam(name="iztrueorfalse",required=true) String iztrueorfalse,
@RequestParam(name="judgeid",required=true) String judgeid,
@RequestParam(name="judgedesc",required=false) String judgedesc,
@RequestParam(name="packageid",required=true) String packageid,
HttpServletRequest req) {
//如果是历史图片,不允许进行设置
//如果是已经审批完成的图片不允许是指
OcrTaskchildPicture ocrTaskchildPicture = new OcrTaskchildPicture();
ocrTaskchildPicture.setPackageid(Long.parseLong(packageid));
return ocrTaskchildPictureService.trueorfalse(taskchildpictureids,packageid,iztrueorfalse,judgeid,judgedesc);
}
/**
*
*
* @param req
* @return
*/
public class OcrTaskchildPictureController extends BaseController {
private Logger log = LoggerFactory.getLogger(this.getClass());
@Resource
private OcrTaskchildPictureService ocrTaskchildPictureService;
@Resource
private OcrPictureService ocrPictureService;
@Resource
private UserTokenService userTokenService;
@Resource
private UserService userService;
/**
* jsondto
* mail.zhangyong@gmail.com
* 2024-01-14 10:27:01
**/
@GetMapping("/list")
public ResultVo<IPage<OcrTaskchildPicture>> listOcrTaskchildPicture(ParamterPage paramterPage, HttpServletRequest request, HttpServletResponse response) throws IOException {
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture();
QueryWrapper<OcrTaskchildPicture> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery, ocrtaskchildpicture);
IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage, queryWrapper);
;
return ResultVoUtil.success(page);
}
/**
* jsondto
* mail.zhangyong@gmail.com
* 2024-01-14 10:27:01
**/
@ApiOperation(value = "ocr_任务包下的任务集合", notes = "ocr_任务包下的任务集合")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "header", name = "X-Tenant-Id", value = "租户主键,用户登录时的信息“tenantList”中获得。", dataType = "String", required = true),
@ApiImplicitParam(paramType = "path", name = "packageid", value = "任务包主键", required = true)
})
@GetMapping("/listbypackageid/{packageid}")
public ResultVo<IPage<OcrTaskchildPicture>> listbypackageid(ParamterPage paramterPage,
HttpServletRequest request,
HttpServletResponse response,
@PathVariable("packageid") String packageid) throws IOException {
//租户主键,由前端页面传送
String tenantId = request.getHeader("X-Tenant-Id");
if (StringUtils.isBlank(tenantId)) {
return ResultVoUtil.error("租户主键不能为空");
}
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture();
QueryWrapper<OcrTaskchildPicture> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery, ocrtaskchildpicture);
queryWrapper.eq("TENANTID", tenantId);
if (StringUtils.isNotBlank(packageid)) {
queryWrapper.eq("PACKAGEID", packageid);
}
IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage, queryWrapper);
QueryWrapper<OcrTaskchildPicture> queryWrapperNex = SearchQueryFormat.queryStringFormat(searchQuery, ocrtaskchildpicture);
if (!page.getRecords().isEmpty()) {
OcrTaskchildPicture ocrTaskchildPicture = page.getRecords().get(0);
queryWrapperNex.eq("TENANTID", tenantId);
queryWrapperNex.in("PICTUREID", ocrTaskchildPicture.getOcpictureid().split(","));
page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage, queryWrapperNex);
}
return ResultVoUtil.success(page);
}
@ApiOperation(value = "ocr_任务包下的当前图片比对的集合列表", notes = "ocr_任务包下的当前图片比对的集合列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "header", name = "X-Tenant-Id", value = "租户主键,用户登录时的信息“tenantList”中获得。", dataType = "String", required = true),
@ApiImplicitParam(paramType = "path", name = "packageid", value = "任务包主键"),
@ApiImplicitParam(paramType = "path", name = "taskchildpictureid", value = "当前选中的任务主键", required = true)
})
@GetMapping("/listbypictureid/{packageid}/{taskchildpictureid}")
public ResultVo<IPage<OcrTaskchildPicture>> listbypackageidlistbypictureid(ParamterPage paramterPage,
HttpServletRequest request,
HttpServletResponse response,
@PathVariable("packageid") String packageid,
@PathVariable("taskchildpictureid") String taskchildpictureid) throws IOException {
//租户主键,由前端页面传送
String tenantId = request.getHeader("X-Tenant-Id");
if (StringUtils.isBlank(tenantId)) {
return ResultVoUtil.error("租户主键不能为空");
}
//排序方式
String orderbyname = request.getParameter("orderbyname");
//排序字段
String orderbyvalue = request.getParameter("orderbyvalue");
SearchQuery searchQuery = this.getParametersStartingWithToSearchJson(request, "search_");
OcrTaskchildPicture ocrtaskchildpicture = new OcrTaskchildPicture();
QueryWrapper<OcrTaskchildPicture> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery, ocrtaskchildpicture);
//queryWrapper.eq("TENANTID",tenantId);
//queryWrapper.eq("PACKAGEID",packageid);
IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.listByPackageId(taskchildpictureid, paramterPage, queryWrapper, orderbyname, orderbyvalue, packageid, tenantId);
List<JSONObject> collect = page.getRecords().stream().map(p -> {
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(p));
jsonObject.put("id", jsonObject.getOrDefault("id", null).toString());
jsonObject.put("tenantid", jsonObject.getOrDefault("tenantid", null).toString());
jsonObject.put("packageid", jsonObject.getOrDefault("packageid", null).toString());
return jsonObject;
}).collect(Collectors.toList());
IPage<JSONObject> objects = new Page<>();
BeanUtils.copyProperties(page, objects);
objects.setRecords(collect);
return ResultVoUtil.success(objects);
}
/**
*
*
* @param req
* @return
*/
@ApiOperation(value = "任务主图真假标记", notes = "任务主图真假标记")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path", name = "taskchildpictureid", value = "任务主键", required = true),
@ApiImplicitParam(paramType = "path", name = "izTrueorfalse", value = "主图片真假0:假1真", required = true),
@ApiImplicitParam(paramType = "path", name = "judgeid", value = "主图判真假原因id,从字典表中获得", required = true),
@ApiImplicitParam(paramType = "path", name = "judgedesc", value = "真假其他原因", required = false),
@ApiImplicitParam(paramType = "path", name = "packageid", value = "任务包主键", required = true)
})
@PostMapping(value = "/ordertrueorfalse")
public ResultVo ordertrueorfalse(@RequestParam(name = "taskchildpictureids", required = true) String taskchildpictureids,
@RequestParam(name = "iztrueorfalse", required = true) String iztrueorfalse,
@RequestParam(name = "judgeid", required = true) String judgeid,
@RequestParam(name = "judgedesc", required = false) String judgedesc,
@RequestParam(name = "packageid", required = true) String packageid,
HttpServletRequest req) {
//如果是历史图片,不允许进行设置
//如果是已经审批完成的图片不允许是指
OcrTaskchildPicture ocrTaskchildPicture = new OcrTaskchildPicture();
ocrTaskchildPicture.setPackageid(Long.parseLong(packageid));
return ocrTaskchildPictureService.trueorfalse(taskchildpictureids, packageid, iztrueorfalse, judgeid, judgedesc);
}
/**
*
*
* @param req
* @return
*/
// @ApiOperation(value="任务清除标记", notes="任务清除标记")
// @ApiImplicitParams({
// @ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "任务主键", required = true),
@ -202,135 +220,133 @@ public class OcrTaskchildPictureController extends BaseController{
//
// return ocrTaskchildPictureService.clearmark(taskchildpictureid,packageid);
// }
@ApiOperation(value = "任务清除标记", notes = "任务清除标记")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path", name = "taskchildpictureid", value = "任务主键", required = true),
@ApiImplicitParam(paramType = "path", name = "packageid", value = "任务包主键", required = true)
})
@PostMapping(value = "/clearmark")
public ResultVo clearmark(@RequestParam(name = "taskchildpictureid", required = true) String taskchildpictureid,
@RequestParam(name = "packageid", required = true) String packageid,
HttpServletRequest request) {
//租户主键,由前端页面传送
String tenantId = request.getHeader("X-Tenant-Id");
if (StringUtils.isBlank(tenantId)) {
return ResultVoUtil.error("租户主键不能为空");
}
return ocrTaskchildPictureService.clearmark(tenantId, taskchildpictureid, packageid);
}
/**
*
*
* @param req
* @return
*/
@ApiOperation(value = "当前任务包智能识别", notes = "当前任务包智能识别")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path", name = "packageid", value = "任务包主键", required = true)
})
@PostMapping(value = "/markpoint")
public ResultVo markpoint(@RequestParam(name = "packageid", required = true) String packageid,
HttpServletRequest req) {
//如果是历史图片,不允许进行设置
//如果是已经审批完成的图片不允许是指
OcrTaskchildPicture ocrTaskchildPicture = new OcrTaskchildPicture();
ocrTaskchildPicture.setPackageid(Long.parseLong(packageid));
List<OcrTaskchildPicture> list = ocrTaskchildPictureService.markpoint(packageid);
if (null != list && !list.isEmpty()) {
return ResultVoUtil.success(list);
}
return ResultVoUtil.error();
}
/**
*
* mail.zhangyong@gmail.com
* 2024-01-14 10:27:01
**/
@ApiOperation(value = "ocr_任务包下的当前展示的任务对象", notes = "ocr_任务包下的当前展示的任务对象")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path", name = "id", value = "当前选中的任务主键", required = true),
@ApiImplicitParam(paramType = "path", name = "packageid", value = "任务包主键注意不是当前任务关联的packageid而是当前选中的任务包主键")
})
@GetMapping("/getdata/{id}/{packageid}")
@ResponseBody
public ResultVo getdateOcrTaskchildPicture(HttpServletResponse response, HttpServletRequest request,
@PathVariable("packageid") Long packageid,
@PathVariable("id") Long id) throws IOException {
OcrTaskchildPicture dto = this.ocrTaskchildPictureService.listPicturePackageId(id.toString(), packageid);
if (null != dto) {
return ResultVoUtil.success(dto);
} else {
return ResultVoUtil.error();
}
}
/**
*
* mail.zhangyong@gmail.com
* 2024-01-14 10:27:01
**/
@PostMapping("/save")
public ResultVo saveOcrTaskchildPicture(HttpServletResponse response, HttpServletRequest request, OcrTaskchildPicture tab) throws IOException {
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
this.ocrTaskchildPictureService.save(tab);
return ResultVoUtil.success();
}
/**
* form
* mail.zhangyong@gmail.com
* 2024-01-14 10:27:01
**/
@PostMapping("/edit")
public ResultVo editOcrTaskchildPicture(HttpServletResponse response, HttpServletRequest request, OcrTaskchildPicture tab) throws IOException {
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
this.ocrTaskchildPictureService.updateById(tab);
return ResultVoUtil.success();
}
/**
*
* mail.zhangyong@gmail.com
* 2024-01-14 10:27:01
**/
@ApiOperation(value = "根据任务或者工单主键查询图片对象", notes = "根据任务或者工单主键查询图片对象")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path", name = "id", value = "任务审批中的formid或者id", required = true)
})
@GetMapping("/pictureinfo")
@ResponseBody
public ResultVo pictureinfo(HttpServletResponse response, HttpServletRequest request) throws IOException {
String id = request.getParameter("id");
OcrPicture dto = this.ocrTaskchildPictureService.findOcrPictureByTaskchildid(id);
if (null != dto) {
return ResultVoUtil.success(dto);
} else {
return ResultVoUtil.error();
}
}
@ApiOperation(value="任务清除标记", notes="任务清除标记")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "任务主键", required = true),
@ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键", required = true)
})
@PostMapping(value = "/clearmark")
public ResultVo clearmark(@RequestParam(name="taskchildpictureid",required=true) String taskchildpictureid,
@RequestParam(name="packageid",required=true) String packageid,
HttpServletRequest request) {
//租户主键,由前端页面传送
String tenantId = request.getHeader("X-Tenant-Id");
if(StringUtils.isBlank(tenantId)){
return ResultVoUtil.error("租户主键不能为空");
}
return ocrTaskchildPictureService.clearmark(tenantId,taskchildpictureid,packageid);
}
/**
*
*
* @param req
* @return
*/
@ApiOperation(value="当前任务包智能识别", notes="当前任务包智能识别")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键", required = true)
})
@PostMapping(value = "/markpoint")
public ResultVo markpoint(@RequestParam(name="packageid",required=true) String packageid,
HttpServletRequest req) {
//如果是历史图片,不允许进行设置
//如果是已经审批完成的图片不允许是指
OcrTaskchildPicture ocrTaskchildPicture = new OcrTaskchildPicture();
ocrTaskchildPicture.setPackageid(Long.parseLong(packageid));
List<OcrTaskchildPicture> list = ocrTaskchildPictureService.markpoint(packageid);
if(null != list && !list.isEmpty()){
return ResultVoUtil.success(list);
}
return ResultVoUtil.error();
}
/**
*
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@ApiOperation(value="ocr_任务包下的当前展示的任务对象", notes="ocr_任务包下的当前展示的任务对象")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path",name = "id", value = "当前选中的任务主键", required = true),
@ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键注意不是当前任务关联的packageid而是当前选中的任务包主键")
})
@GetMapping("/getdata/{id}/{packageid}")
@ResponseBody
public ResultVo getdateOcrTaskchildPicture(HttpServletResponse response,HttpServletRequest request,
@PathVariable("packageid") Long packageid,
@PathVariable("id") Long id) throws IOException{
OcrTaskchildPicture dto = this.ocrTaskchildPictureService.listPicturePackageId(id.toString(),packageid);
if(null != dto){
return ResultVoUtil.success(dto);
}else{
return ResultVoUtil.error();
}
}
/**
*
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@PostMapping("/save")
public ResultVo saveOcrTaskchildPicture(HttpServletResponse response,HttpServletRequest request,OcrTaskchildPicture tab) throws IOException{
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
this.ocrTaskchildPictureService.save(tab);
return ResultVoUtil.success();
}
/**
*form
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@PostMapping("/edit")
public ResultVo editOcrTaskchildPicture(HttpServletResponse response,HttpServletRequest request,OcrTaskchildPicture tab) throws IOException{
UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
this.ocrTaskchildPictureService.updateById(tab);
return ResultVoUtil.success();
}
/**
*
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@ApiOperation(value="根据任务或者工单主键查询图片对象", notes="根据任务或者工单主键查询图片对象")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path",name = "id", value = "任务审批中的formid或者id", required = true)
})
@GetMapping("/pictureinfo")
@ResponseBody
public ResultVo pictureinfo(HttpServletResponse response,HttpServletRequest request) throws IOException{
String id = request.getParameter("id");
OcrPicture dto = this.ocrTaskchildPictureService.findOcrPictureByTaskchildid(id);
if(null != dto){
return ResultVoUtil.success(dto);
}else{
return ResultVoUtil.error();
}
}
/**
*id1,2,3
*mail.zhangyong@gmail.com
*2024-01-14 10:27:01
**/
@GetMapping("/delmore")
@ResponseBody
public ResultVo delMoreOcrTaskchildPicture(HttpServletResponse response,HttpServletRequest request) throws IOException{
String ids = request.getParameter("id");
this.ocrTaskchildPictureService.deleteByIdMore(ids);
return ResultVoUtil.success();
}
/**
* id1,2,3
* mail.zhangyong@gmail.com
* 2024-01-14 10:27:01
**/
@GetMapping("/delmore")
@ResponseBody
public ResultVo delMoreOcrTaskchildPicture(HttpServletResponse response, HttpServletRequest request) throws IOException {
String ids = request.getParameter("id");
this.ocrTaskchildPictureService.deleteByIdMore(ids);
return ResultVoUtil.success();
}
}

@ -20,7 +20,11 @@ import java.util.Map;
*/
@Mapper
public interface OcrSearchHistoryMapper extends BaseMapper<OcrSearchHistory> {
List<String> selectsearch(@Param("search")String search,@Param("assignee") String assignee);
List<Map<String,String>> selectsearch1(@Param("search")String search,@Param("assignee") String assignee);
List<Map<String,String>> selectsearch2(@Param("search")String search,@Param("assignee") String assignee);
List<Map<String,String>> selectsearch3(@Param("search")String search,@Param("assignee") String assignee);

@ -221,6 +221,10 @@ public class OcrTaskchildPicture implements BaseDto,java.io.Serializable {
@TableField(exist = false)
private OcrPicture ocrPicture;
@ApiModelProperty(value ="提报时间")
@TableField(exist = false)
private String reporttime;
@ApiModelProperty(value ="审查日志")
@TableField(exist = false)
private List<Userapprove> userapproveList;

@ -17,7 +17,7 @@ import java.util.Map;
* @since 2024-03-15
*/
public interface IOcrSearchHistoryService extends IService<OcrSearchHistory> {
List<String> selectsearch(String search,String assignee);
List<List<Map<String,String>>> selectsearch(String search,String assignee);
Map<Object,Object> toolscount(String userid);
}

@ -31,9 +31,10 @@ public class OcrFieldServiceImpl extends BaseServiceImpl<OcrFieldMybatisDao, Ocr
List<OcrFieldDto> ocrFieldDtoList = new ArrayList<>();
try {
LambdaQueryWrapper<OcrField> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.and(qw -> qw.eq(OcrField::getIsrequired, 2) // 检查是否必选字段为 2
.or()
.eq(OcrField::getReviewType, reviewType)); // 检查评审类型// 检查评审类型
// queryWrapper.and(qw -> qw.eq(OcrField::getIsrequired, 2) // 检查是否必选字段为 2
// .or()
// .eq(OcrField::getReviewType, reviewType)); // 检查评审类型// 检查评审类型
queryWrapper.eq(OcrField::getReviewType,reviewType);
queryWrapper.eq(OcrField::getDel, 0);
List<OcrField> ocrFieldList = this.list(queryWrapper);
if(ocrFieldList.size()>0){

@ -7,6 +7,7 @@ import org.springframework.stereotype.Service;
import cn.jyjz.xiaoyao.ocr.dataDao.OcrSearchHistoryMapper;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@ -26,8 +27,19 @@ public class OcrSearchHistoryServiceImpl extends ServiceImpl<OcrSearchHistoryMap
OcrSearchHistoryMapper ocrsearchhistorymapper;
@Override
public List<String> selectsearch(String search, String assignee) {
return ocrsearchhistorymapper.selectsearch(search,assignee);
public List<List<Map<String,String>>> selectsearch(String search, String assignee) {
List<Map<String,String>> strings1 = ocrsearchhistorymapper.selectsearch1(search, assignee);
List<Map<String,String>> strings2 = ocrsearchhistorymapper.selectsearch2(search, assignee);
List<Map<String,String>> strings3 = ocrsearchhistorymapper.selectsearch3(search, assignee);
List<List<Map<String,String>>> list = new ArrayList<>();
list.add(strings1);
list.add(strings2);
list.add(strings3);
return list;
}
@Override

@ -15,11 +15,15 @@ import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPictureAppro;
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.flowable.task.api.Task;
import org.springframework.beans.factory.annotation.Autowired;
@ -102,10 +106,10 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
return this.ocrPictureService.updateBatchById(saveList) ? ResultVoUtil.success() : ResultVoUtil.error();
}
public ResultVo clearmark(String tenantId,String childpictureids, String packageid) {
public ResultVo clearmark(String tenantId, String childpictureids, String packageid) {
String selectocpicture = ocrtaskchildpicturemybatisdao.selectocpicture(tenantId, packageid ,childpictureids);
String selectocpicture = ocrtaskchildpicturemybatisdao.selectocpicture(tenantId, packageid, childpictureids);
String[] cps = selectocpicture.split(",");
@ -337,7 +341,7 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
OcrTaskchildPicture mainOcrTaskchildPicture = this.getById(taskchildpictureid);
//判断当前图片是否为历史图片
if (null != packageid && null != mainOcrTaskchildPicture.getPackageid() && !packageid.equals(mainOcrTaskchildPicture.getPackageid().toString())) {
if (null != packageid && null != mainOcrTaskchildPicture && null != mainOcrTaskchildPicture.getPackageid() && !packageid.equals(mainOcrTaskchildPicture.getPackageid().toString())) {
QueryWrapper<OcrTaskchildPicture> queryWrapperNew = new QueryWrapper<>();
queryWrapperNew.eq("TENANTID", tenantId);
@ -381,7 +385,6 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
this.formatTask(iPage.getRecords(), packageid);
return iPage;
}

@ -67,7 +67,7 @@ public class PictureDisposeTask implements Runnable{
picture.setCategoryid(251374070600303007L);
//项目名称
picture.setPicturename(pictureSourceResult.getProjectName());
picture.setProjectidname(pictureSourceResult.getProjectName());
//项目状态
if(pictureSourceResult.getProjectNo()!=null) {
picture.setProjectstatus(pictureSourceResult.getProjectNo().toString());
@ -152,8 +152,8 @@ public class PictureDisposeTask implements Runnable{
//拜访项目类别
if(pictureSourceResult.getProjectType()!=null){
if(pictureSourceResult.getTerminalLevel().get("name")!=null){
picture.setField17(pictureSourceResult.getTerminalLevel().get("name").toString());
if(pictureSourceResult.getProjectType().get("name")!=null){
picture.setField17(pictureSourceResult.getProjectType().get("name").toString());
}
}
//拜访品种

@ -15,27 +15,63 @@
id, historyname, userid, createdate
</sql>
<select id="selectsearch" resultType="map">
<select id="selectsearch1" resultType="map">
SELECT
CONCAT_WS("-",r.FROMTASKNAME,t.planName) as name
r.ID,CONCAT_WS( "-", img.taskName, img.planName ) AS aiName
FROM
ocr_taskchild_picture r
LEFT JOIN ocr_picture t ON r.PICTUREID = t.ID
LEFT JOIN ocr_packagetask t ON r.PACKAGEID = t.ID
LEFT JOIN ocr_picture img ON FIND_IN_SET(img.ID,r.OCPICTUREID)
WHERE
r.STATES='1'
and
r.ASSIGNEE=#{assignee}
AND
r.FROMTASKID like "%"#{search}"%"
OR r.FROMTASKNAME like "%"#{search}"%"
OR t.field1 like "%"#{search}"%"
ORDER BY r.CREATEDATE DESC
-- r.STATES = '1' AND
r.ASSIGNEE = #{assignee}
AND (r.PACKAGEID LIKE "%"#{search}"%"
OR img.taskName LIKE "%"#{search}"%"
OR img.field1 LIKE "%"#{search}"%"
OR img.field3 LIKE "%"#{search}"%")
ORDER BY
r.CREATEDATE DESC
LIMIT 3
</select>
<select id="selectsearch2" resultType="map">
SELECT
r.ID,CONCAT_WS( "-", img.taskName, img.planName ) AS preliminaryName
FROM
ocr_taskchild_picture r
LEFT JOIN ocr_packagetask t ON r.PACKAGEID = t.ID
LEFT JOIN ocr_picture img ON FIND_IN_SET(img.ID,r.OCPICTUREID)
WHERE
r.ASSIGNEE = #{assignee}
AND r.taskName IN ( '一级审批', '二级审批' )
AND (r.PACKAGEID LIKE "%"#{search}"%"
OR img.taskName LIKE "%"#{search}"%"
OR img.field1 LIKE "%"#{search}"%"
OR img.field3 LIKE "%"#{search}"%")
ORDER BY
r.CREATEDATE DESC
LIMIT 3
</select>
<select id="selectsearch3" resultType="map">
SELECT
r.ID,CONCAT_WS( "-", img.taskName, img.planName ) AS finalName
FROM
ocr_taskchild_picture r
LEFT JOIN ocr_packagetask t ON r.PACKAGEID = t.ID
LEFT JOIN ocr_picture img ON FIND_IN_SET(img.ID,r.OCPICTUREID)
WHERE
r.ASSIGNEE = #{assignee}
AND r.taskName = '三级审批'
AND (r.PACKAGEID LIKE "%"#{search}"%"
OR img.taskName LIKE "%"#{search}"%"
OR img.field1 LIKE "%"#{search}"%"
OR img.field3 LIKE "%"#{search}"%")
ORDER BY
r.CREATEDATE DESC
LIMIT 3
</select>

@ -168,7 +168,7 @@
</sql>
<select id="listFinal" resultType="cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture" parameterType="java.util.Map">
select tcp.* from (
select tcp.*,pic.field11 reporttime from (
select
tc.*
from ocr_taskchild_picture tc,OA_USERFINAL_T uf
@ -179,9 +179,8 @@ select tcp.* from (
tc.*
from ocr_taskchild_picture tc
where tc.STATES = 5
) as tcp
) as tcp,ocr_picture pic
where tcp.PICTUREID = pic.ID
<include refid="Base_Where_union"></include>
<if test="fromuptimeStart != null"> and tcp.fromuptime &gt;= ${fromuptimeStart} </if>
<if test="fromuptimeEnd != null"> and tcp.fromuptime &lt;= ${fromuptimeEnd} </if>

@ -284,3 +284,4 @@ ocr:
localImagePath: /server/data/images #图片本地存储地址
image:
similarityPath: http://47.93.59.251/ai/api/similarity/
classifyPath: http://47.93.59.251/api/classify/

Loading…
Cancel
Save