|
|
|
@ -30,37 +30,39 @@ import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 业务层实现
|
|
|
|
|
*/
|
|
|
|
|
* 业务层实现
|
|
|
|
|
*/
|
|
|
|
|
@Service("ocrTaskchildPictureService")
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchildPictureMybatisDao, OcrTaskchildPicture> implements OcrTaskchildPictureService {
|
|
|
|
|
@Resource
|
|
|
|
|
private OcrTaskchildPictureMybatisDao ocrtaskchildpicturemybatisdao;
|
|
|
|
|
public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchildPictureMybatisDao, OcrTaskchildPicture> implements OcrTaskchildPictureService {
|
|
|
|
|
@Resource
|
|
|
|
|
private OcrTaskchildPictureMybatisDao ocrtaskchildpicturemybatisdao;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private OcrPictureService ocrPictureService;
|
|
|
|
|
@Resource
|
|
|
|
|
private OcrPictureService ocrPictureService;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
IFlowTaskService iFlowTaskService;
|
|
|
|
|
/**
|
|
|
|
|
* 图片真假设置
|
|
|
|
|
* @param childpictureids
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public ResultVo trueorfalse(String childpictureids, String packageid, String iztrueorfalse, String judgeid, String judgedesc){
|
|
|
|
|
@Resource
|
|
|
|
|
IFlowTaskService iFlowTaskService;
|
|
|
|
|
|
|
|
|
|
String[] cps = childpictureids.split(",");
|
|
|
|
|
/**
|
|
|
|
|
* 图片真假设置
|
|
|
|
|
*
|
|
|
|
|
* @param childpictureids
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public ResultVo trueorfalse(String childpictureids, String packageid, String iztrueorfalse, String judgeid, String judgedesc) {
|
|
|
|
|
|
|
|
|
|
List<OcrPicture> saveList =new ArrayList<>();
|
|
|
|
|
String[] cps = childpictureids.split(",");
|
|
|
|
|
|
|
|
|
|
StringBuffer historyPname = new StringBuffer();
|
|
|
|
|
List<OcrPicture> saveList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
StringBuffer taskType = new StringBuffer();
|
|
|
|
|
for(String childpictureid:cps){
|
|
|
|
|
OcrTaskchildPicture old = this.listPicturePackageId(childpictureid,Long.parseLong(packageid));
|
|
|
|
|
StringBuffer historyPname = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
//如果是历史图片,不允许进行设置
|
|
|
|
|
StringBuffer taskType = new StringBuffer();
|
|
|
|
|
for (String childpictureid : cps) {
|
|
|
|
|
OcrTaskchildPicture old = this.listPicturePackageId(childpictureid, Long.parseLong(packageid));
|
|
|
|
|
|
|
|
|
|
//如果是历史图片,不允许进行设置
|
|
|
|
|
// if(old.isIzHistory()){
|
|
|
|
|
// if(historyPname.length() > 0){
|
|
|
|
|
// historyPname.append("," + old.getOcrPicture().getImgname());
|
|
|
|
@ -76,14 +78,14 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
OcrPicture ocrPicture = old.getOcrPicture();
|
|
|
|
|
ocrPicture.setJudgeid(Long.parseLong(judgeid));
|
|
|
|
|
ocrPicture.setJudgedesc(judgedesc);
|
|
|
|
|
ocrPicture.setIztrueorfalse(Integer.parseInt(iztrueorfalse));
|
|
|
|
|
ocrPicture.setUpdateTime(System.currentTimeMillis());
|
|
|
|
|
OcrPicture ocrPicture = old.getOcrPicture();
|
|
|
|
|
ocrPicture.setJudgeid(Long.parseLong(judgeid));
|
|
|
|
|
ocrPicture.setJudgedesc(judgedesc);
|
|
|
|
|
ocrPicture.setIztrueorfalse(Integer.parseInt(iztrueorfalse));
|
|
|
|
|
ocrPicture.setUpdateTime(System.currentTimeMillis());
|
|
|
|
|
|
|
|
|
|
saveList.add(ocrPicture);
|
|
|
|
|
}
|
|
|
|
|
saveList.add(ocrPicture);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if(StringUtils.isNotBlank(historyPname.toString())){
|
|
|
|
|
// return ResultVoUtil.error(historyPname.toString() + "为历史数据,不能标记。");
|
|
|
|
@ -92,21 +94,21 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
|
|
|
|
|
// return ResultVoUtil.error( taskType.toString() + "已经审批,不能标记。");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return this.ocrPictureService.updateBatchById(saveList)?ResultVoUtil.success():ResultVoUtil.error();
|
|
|
|
|
}
|
|
|
|
|
return this.ocrPictureService.updateBatchById(saveList) ? ResultVoUtil.success() : ResultVoUtil.error();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ResultVo clearmark(String childpictureids, String packageid){
|
|
|
|
|
String[] cps = childpictureids.split(",");
|
|
|
|
|
public ResultVo clearmark(String childpictureids, String packageid) {
|
|
|
|
|
String[] cps = childpictureids.split(",");
|
|
|
|
|
|
|
|
|
|
List<OcrPicture> saveList =new ArrayList<>();
|
|
|
|
|
List<OcrPicture> saveList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
StringBuffer historyPname = new StringBuffer();
|
|
|
|
|
StringBuffer historyPname = new StringBuffer();
|
|
|
|
|
|
|
|
|
|
StringBuffer taskType = new StringBuffer();
|
|
|
|
|
for(String childpictureid:cps){
|
|
|
|
|
OcrTaskchildPicture old = this.listPicturePackageId(childpictureid,Long.parseLong(packageid));
|
|
|
|
|
StringBuffer taskType = new StringBuffer();
|
|
|
|
|
for (String childpictureid : cps) {
|
|
|
|
|
OcrTaskchildPicture old = this.listPicturePackageId(childpictureid, Long.parseLong(packageid));
|
|
|
|
|
|
|
|
|
|
//如果是历史图片,不允许进行设置
|
|
|
|
|
//如果是历史图片,不允许进行设置
|
|
|
|
|
// if(old.isIzHistory()){
|
|
|
|
|
// if(historyPname.length() > 0){
|
|
|
|
|
// historyPname.append("," + old.getOcrPicture().getImgname());
|
|
|
|
@ -122,14 +124,14 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
OcrPicture ocrPicture = old.getOcrPicture();
|
|
|
|
|
ocrPicture.setJudgeid(null);
|
|
|
|
|
ocrPicture.setJudgedesc(null);
|
|
|
|
|
ocrPicture.setIztrueorfalse(null);
|
|
|
|
|
ocrPicture.setUpdateTime(System.currentTimeMillis());
|
|
|
|
|
OcrPicture ocrPicture = old.getOcrPicture();
|
|
|
|
|
ocrPicture.setJudgeid(null);
|
|
|
|
|
ocrPicture.setJudgedesc(null);
|
|
|
|
|
ocrPicture.setIztrueorfalse(null);
|
|
|
|
|
ocrPicture.setUpdateTime(System.currentTimeMillis());
|
|
|
|
|
|
|
|
|
|
saveList.add(ocrPicture);
|
|
|
|
|
}
|
|
|
|
|
saveList.add(ocrPicture);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if(StringUtils.isNotBlank(historyPname.toString())){
|
|
|
|
|
// return ResultVoUtil.error(historyPname.toString() + "为历史数据,不能清除标记。");
|
|
|
|
@ -138,21 +140,22 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
|
|
|
|
|
// return ResultVoUtil.error( taskType.toString() + "已经审批,不能清除标记。");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
return this.ocrPictureService.updateBatchById(saveList)?ResultVoUtil.success():ResultVoUtil.error();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 图片是否合格设置
|
|
|
|
|
* @param childpictureid
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public boolean pass(String childpictureid,OcrTaskchildPicture ocrTaskchildPicture){
|
|
|
|
|
OcrTaskchildPicture old = this.getById(childpictureid);
|
|
|
|
|
|
|
|
|
|
//判断当前图片是否在任务包中,如果不在任务保重,不允许设置图片真假
|
|
|
|
|
if(!old.getPackageid().equals(ocrTaskchildPicture.getPackageid())){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return this.ocrPictureService.updateBatchById(saveList) ? ResultVoUtil.success() : ResultVoUtil.error();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 图片是否合格设置
|
|
|
|
|
*
|
|
|
|
|
* @param childpictureid
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public boolean pass(String childpictureid, OcrTaskchildPicture ocrTaskchildPicture) {
|
|
|
|
|
OcrTaskchildPicture old = this.getById(childpictureid);
|
|
|
|
|
|
|
|
|
|
//判断当前图片是否在任务包中,如果不在任务保重,不允许设置图片真假
|
|
|
|
|
if (!old.getPackageid().equals(ocrTaskchildPicture.getPackageid())) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
// //更新图片真假
|
|
|
|
|
// if(StringUtils.isNotBlank(ocrTaskchildPicture.getIzpass())){
|
|
|
|
@ -165,127 +168,132 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
|
|
|
|
|
// old.setPicturecompare(ocrTaskchildPicture.getPicturecompare());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
old.setUpdatetime(System.currentTimeMillis());
|
|
|
|
|
|
|
|
|
|
return this.updateById(old);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 判断当前用户是否可以审批
|
|
|
|
|
* @param formid 任务主键
|
|
|
|
|
* @param userToken
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public boolean validateAssignee(String[] formid,UserToken userToken){
|
|
|
|
|
QueryWrapper queryWrapper = new QueryWrapper();
|
|
|
|
|
queryWrapper.in("ID",formid);
|
|
|
|
|
List<OcrTaskchildPicture> list = this.ocrtaskchildpicturemybatisdao.selectList(queryWrapper);
|
|
|
|
|
|
|
|
|
|
//目前没有做其他信息返回,如果需要再做修改
|
|
|
|
|
for(OcrTaskchildPicture ocrTaskchildPicture:list){
|
|
|
|
|
//判断审批人是否为当前登录用户
|
|
|
|
|
if(userToken.getLoginname().equals(ocrTaskchildPicture.getAssignee())){
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 判断任务是否已经审批
|
|
|
|
|
* @param formid 任务主键
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public boolean validateApprove(String[] formid){
|
|
|
|
|
QueryWrapper queryWrapper = new QueryWrapper();
|
|
|
|
|
queryWrapper.in("ID",formid);
|
|
|
|
|
List<OcrTaskchildPicture> list = this.ocrtaskchildpicturemybatisdao.selectList(queryWrapper);
|
|
|
|
|
|
|
|
|
|
//目前没有做其他信息返回,如果需要再做修改
|
|
|
|
|
for(OcrTaskchildPicture ocrTaskchildPicture:list){
|
|
|
|
|
//判断当前审批状态为拒绝或者通过的,不允许再做审批
|
|
|
|
|
if(ocrTaskchildPicture.getStates().intValue() == SystemConstantsOa.OA_STATUS_TYPE_END
|
|
|
|
|
|| ocrTaskchildPicture.getStates().intValue() == SystemConstantsOa.OA_STATUS_TYPE_REFUSE ){
|
|
|
|
|
return false;
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 判断任务是否已经审批
|
|
|
|
|
*
|
|
|
|
|
* @param formid 任务主键
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public boolean validateBoole(String[] formid) {
|
|
|
|
|
QueryWrapper queryWrapper = new QueryWrapper();
|
|
|
|
|
queryWrapper.in("ID", formid);
|
|
|
|
|
List<OcrTaskchildPicture> list = this.ocrtaskchildpicturemybatisdao.selectList(queryWrapper);
|
|
|
|
|
List<OcrPicture> pictures = ocrPictureService.list(new LambdaQueryWrapper<OcrPicture>().eq(OcrPicture::getId, list.stream().map(OcrTaskchildPicture::getPictureid).collect(Collectors.toList())).isNull(OcrPicture::getIztrueorfalse));
|
|
|
|
|
if (pictures.size() > 1) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<OcrTaskchildPicture> listAll(String tenantId, String createUser, QueryWrapper queryWrapper){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long count = this.count(queryWrapper);
|
|
|
|
|
|
|
|
|
|
Page<OcrTaskchildPicture> page = new Page<>(1, count);
|
|
|
|
|
page.setMaxLimit(count);
|
|
|
|
|
|
|
|
|
|
IPage<OcrTaskchildPicture> iPage = this.page(page,queryWrapper);
|
|
|
|
|
|
|
|
|
|
return iPage.getRecords();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 批量标记当前任务相似度为百分之百
|
|
|
|
|
* @param taskids 任务主键
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public boolean markPoint(List<Long> taskids){
|
|
|
|
|
UpdateWrapper updateWrapper = new UpdateWrapper();
|
|
|
|
|
updateWrapper.set("HAVEPOINTS",1);
|
|
|
|
|
updateWrapper.in("ID",taskids);
|
|
|
|
|
|
|
|
|
|
return this.update(updateWrapper);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询智能识别
|
|
|
|
|
* @param packageid 任务包主键
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<OcrTaskchildPicture> markpoint(String packageid){
|
|
|
|
|
QueryWrapper<OcrTaskchildPicture> queryWrapperNew = new QueryWrapper<>();
|
|
|
|
|
queryWrapperNew.eq("HAVEPOINTS","1");
|
|
|
|
|
queryWrapperNew.eq("PACKAGEID",packageid);
|
|
|
|
|
|
|
|
|
|
List<OcrTaskchildPicture> list = this.ocrtaskchildpicturemybatisdao.selectList(queryWrapperNew);
|
|
|
|
|
this.formatTask(list,packageid);
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据主键,查询图片详情
|
|
|
|
|
* @param fromid 任务主键
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public OcrTaskchildPicture listPicturePackageId(String fromid,Long packageid){
|
|
|
|
|
OcrTaskchildPicture ocrTaskchildPicture = this.getById(fromid);
|
|
|
|
|
//查询图片对象
|
|
|
|
|
OcrPicture ocrPicture = this.ocrPictureService.selectDtoById(ocrTaskchildPicture.getPictureid());
|
|
|
|
|
old.setUpdatetime(System.currentTimeMillis());
|
|
|
|
|
|
|
|
|
|
return this.updateById(old);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 判断当前用户是否可以审批
|
|
|
|
|
*
|
|
|
|
|
* @param formid 任务主键
|
|
|
|
|
* @param userToken
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public boolean validateAssignee(String[] formid, UserToken userToken) {
|
|
|
|
|
QueryWrapper queryWrapper = new QueryWrapper();
|
|
|
|
|
queryWrapper.in("ID", formid);
|
|
|
|
|
List<OcrTaskchildPicture> list = this.ocrtaskchildpicturemybatisdao.selectList(queryWrapper);
|
|
|
|
|
|
|
|
|
|
//目前没有做其他信息返回,如果需要再做修改
|
|
|
|
|
for (OcrTaskchildPicture ocrTaskchildPicture : list) {
|
|
|
|
|
//判断审批人是否为当前登录用户
|
|
|
|
|
if (userToken.getLoginname().equals(ocrTaskchildPicture.getAssignee())) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 判断任务是否已经审批
|
|
|
|
|
*
|
|
|
|
|
* @param formid 任务主键
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public boolean validateApprove(String[] formid) {
|
|
|
|
|
QueryWrapper queryWrapper = new QueryWrapper();
|
|
|
|
|
queryWrapper.in("ID", formid);
|
|
|
|
|
List<OcrTaskchildPicture> list = this.ocrtaskchildpicturemybatisdao.selectList(queryWrapper);
|
|
|
|
|
|
|
|
|
|
//目前没有做其他信息返回,如果需要再做修改
|
|
|
|
|
for (OcrTaskchildPicture ocrTaskchildPicture : list) {
|
|
|
|
|
//判断当前审批状态为拒绝或者通过的,不允许再做审批
|
|
|
|
|
if (ocrTaskchildPicture.getStates().intValue() == SystemConstantsOa.OA_STATUS_TYPE_END
|
|
|
|
|
|| ocrTaskchildPicture.getStates().intValue() == SystemConstantsOa.OA_STATUS_TYPE_REFUSE) {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 判断任务是否已经审批
|
|
|
|
|
*
|
|
|
|
|
* @param formid 任务主键
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public boolean validateBoole(String[] formid) {
|
|
|
|
|
QueryWrapper queryWrapper = new QueryWrapper();
|
|
|
|
|
queryWrapper.in("ID", formid);
|
|
|
|
|
List<OcrTaskchildPicture> list = this.ocrtaskchildpicturemybatisdao.selectList(queryWrapper);
|
|
|
|
|
List<OcrPicture> pictures = ocrPictureService.list(new LambdaQueryWrapper<OcrPicture>().eq(OcrPicture::getId, list.stream().map(OcrTaskchildPicture::getPictureid).collect(Collectors.toList())).isNull(OcrPicture::getIztrueorfalse));
|
|
|
|
|
if (pictures.size() > 1) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<OcrTaskchildPicture> listAll(String tenantId, String createUser, QueryWrapper queryWrapper) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long count = this.count(queryWrapper);
|
|
|
|
|
|
|
|
|
|
Page<OcrTaskchildPicture> page = new Page<>(1, count);
|
|
|
|
|
page.setMaxLimit(count);
|
|
|
|
|
|
|
|
|
|
IPage<OcrTaskchildPicture> iPage = this.page(page, queryWrapper);
|
|
|
|
|
|
|
|
|
|
return iPage.getRecords();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 批量标记当前任务相似度为百分之百
|
|
|
|
|
*
|
|
|
|
|
* @param taskids 任务主键
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public boolean markPoint(List<Long> taskids) {
|
|
|
|
|
UpdateWrapper updateWrapper = new UpdateWrapper();
|
|
|
|
|
updateWrapper.set("HAVEPOINTS", 1);
|
|
|
|
|
updateWrapper.in("ID", taskids);
|
|
|
|
|
|
|
|
|
|
return this.update(updateWrapper);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询智能识别
|
|
|
|
|
*
|
|
|
|
|
* @param packageid 任务包主键
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<OcrTaskchildPicture> markpoint(String packageid) {
|
|
|
|
|
QueryWrapper<OcrTaskchildPicture> queryWrapperNew = new QueryWrapper<>();
|
|
|
|
|
queryWrapperNew.eq("HAVEPOINTS", "1");
|
|
|
|
|
queryWrapperNew.eq("PACKAGEID", packageid);
|
|
|
|
|
|
|
|
|
|
List<OcrTaskchildPicture> list = this.ocrtaskchildpicturemybatisdao.selectList(queryWrapperNew);
|
|
|
|
|
this.formatTask(list, packageid);
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据主键,查询图片详情
|
|
|
|
|
*
|
|
|
|
|
* @param fromid 任务主键
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public OcrTaskchildPicture listPicturePackageId(String fromid, Long packageid) {
|
|
|
|
|
OcrTaskchildPicture ocrTaskchildPicture = this.getById(fromid);
|
|
|
|
|
//查询图片对象
|
|
|
|
|
OcrPicture ocrPicture = this.ocrPictureService.selectDtoById(ocrTaskchildPicture.getPictureid());
|
|
|
|
|
|
|
|
|
|
// String pictureids = ocrTaskchildPicture.getPicturecompare();
|
|
|
|
|
// String[] splitPictureids = pictureids.split(",");
|
|
|
|
@ -293,103 +301,106 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
|
|
|
|
|
// //设置是否为历史信息
|
|
|
|
|
// ocrTaskchildPicture.setIzHistory(listPictureids.contains(ocrPicture.getPictureid())?false:true);
|
|
|
|
|
|
|
|
|
|
//如果当前任务的任务包主键一致,说明不是历史数据,如果不一致,说明是历史数据
|
|
|
|
|
if(packageid.toString().equals(ocrTaskchildPicture.getPackageid().toString())){
|
|
|
|
|
ocrTaskchildPicture.setIzHistory(false);
|
|
|
|
|
}else{
|
|
|
|
|
ocrTaskchildPicture.setIzHistory(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//查询审批流节点信息
|
|
|
|
|
List<Task> taskList = iFlowTaskService.nowRunTask(ocrTaskchildPicture.getProcessinstanceid(),ocrTaskchildPicture.getProcessdefinitionid());
|
|
|
|
|
if(null != taskList && !taskList.isEmpty()) {
|
|
|
|
|
ocrTaskchildPicture.setTaskId(taskList.get(0).getId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取当前真假标记
|
|
|
|
|
ocrTaskchildPicture.setIztrueorfalse(ocrPicture.getIztrueorfalse());
|
|
|
|
|
//是否已经审批
|
|
|
|
|
ocrTaskchildPicture.setWorkStatus(ocrPicture.getWorkStatus());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ocrTaskchildPicture.setOcrPicture(ocrPicture);
|
|
|
|
|
|
|
|
|
|
return ocrTaskchildPicture;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 根据任务包主键,查询对应的任务信息
|
|
|
|
|
* @param taskchildpictureid 当前显示的任务主键
|
|
|
|
|
* @param queryWrapper
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public IPage<OcrTaskchildPicture> listByPackageId(String taskchildpictureid, ParamterPage paramterPage,QueryWrapper queryWrapper,String orderbyname,String orderbyvalue,String packageid,String tenantId ){
|
|
|
|
|
Page<OcrTaskchildPicture> page = new Page<>(paramterPage.getStart(), paramterPage.getPagesize());
|
|
|
|
|
|
|
|
|
|
//当前显示的任务对象
|
|
|
|
|
OcrTaskchildPicture mainOcrTaskchildPicture = this.getById(taskchildpictureid);
|
|
|
|
|
|
|
|
|
|
//判断当前图片是否为历史图片
|
|
|
|
|
if(!packageid.equals(mainOcrTaskchildPicture.getPackageid().toString())){
|
|
|
|
|
|
|
|
|
|
QueryWrapper<OcrTaskchildPicture> queryWrapperNew = new QueryWrapper<>();
|
|
|
|
|
queryWrapperNew.eq("TENANTID",tenantId);
|
|
|
|
|
queryWrapperNew.eq("PACKAGEID",packageid);
|
|
|
|
|
|
|
|
|
|
//查询非历史图片存在的集合
|
|
|
|
|
IPage<OcrTaskchildPicture> pageNew = this.selectSearchListPage(paramterPage,queryWrapperNew);
|
|
|
|
|
|
|
|
|
|
//如果是历史图片,从非历史图片存在的集合中随机选取一个
|
|
|
|
|
if(!pageNew.getRecords().isEmpty()){
|
|
|
|
|
mainOcrTaskchildPicture = pageNew.getRecords().get(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//不包含当前选中的图片
|
|
|
|
|
queryWrapper.ne("ID",taskchildpictureid);
|
|
|
|
|
|
|
|
|
|
queryWrapper.eq("TENANTID",tenantId);
|
|
|
|
|
if(StringUtils.isNotBlank(orderbyname) && orderbyname.equals("asc")){
|
|
|
|
|
if(StringUtils.isNotBlank(orderbyvalue) && orderbyvalue.equals("pictureResult")){
|
|
|
|
|
queryWrapper.orderByAsc("FIELD(PICTUREID,"+ mainOcrTaskchildPicture.getOcpictureid() +")");
|
|
|
|
|
}else if(StringUtils.isNotBlank(orderbyvalue) && orderbyvalue.equals("fromuptime")){
|
|
|
|
|
queryWrapper.orderByAsc("FROMUPTIME");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else if(StringUtils.isNotBlank(orderbyname) && orderbyname.equals("desc")){
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(orderbyvalue) && orderbyvalue.equals("pictureResult")){
|
|
|
|
|
queryWrapper.orderByDesc("FIELD(PICTUREID,"+ mainOcrTaskchildPicture.getOcpictureid() +")");
|
|
|
|
|
}else if(StringUtils.isNotBlank(orderbyvalue) && orderbyvalue.equals("fromuptime")){
|
|
|
|
|
queryWrapper.orderByDesc("FROMUPTIME");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
queryWrapper.in("PICTUREID",mainOcrTaskchildPicture.getOcpictureid().split(","));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPage<OcrTaskchildPicture> iPage = this.page(page,queryWrapper);
|
|
|
|
|
|
|
|
|
|
this.formatTask(iPage.getRecords(),packageid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return iPage;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 格式化显示数据
|
|
|
|
|
* @param list
|
|
|
|
|
* @param packageid
|
|
|
|
|
*/
|
|
|
|
|
private void formatTask(List<OcrTaskchildPicture> list,String packageid){
|
|
|
|
|
for(OcrTaskchildPicture ocrTaskchildPicture:list){
|
|
|
|
|
|
|
|
|
|
//查询审批流节点信息
|
|
|
|
|
List<Task> taskList = iFlowTaskService.nowRunTask(ocrTaskchildPicture.getProcessinstanceid(),ocrTaskchildPicture.getProcessdefinitionid());
|
|
|
|
|
if(null != taskList && !taskList.isEmpty()) {
|
|
|
|
|
ocrTaskchildPicture.setTaskId(taskList.get(0).getId());
|
|
|
|
|
}
|
|
|
|
|
//如果当前任务的任务包主键一致,说明不是历史数据,如果不一致,说明是历史数据
|
|
|
|
|
if (null != packageid && packageid.toString().equals(ocrTaskchildPicture.getPackageid().toString())) {
|
|
|
|
|
ocrTaskchildPicture.setIzHistory(false);
|
|
|
|
|
} else {
|
|
|
|
|
ocrTaskchildPicture.setIzHistory(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//查询审批流节点信息
|
|
|
|
|
List<Task> taskList = iFlowTaskService.nowRunTask(ocrTaskchildPicture.getProcessinstanceid(), ocrTaskchildPicture.getProcessdefinitionid());
|
|
|
|
|
if (null != taskList && !taskList.isEmpty()) {
|
|
|
|
|
ocrTaskchildPicture.setTaskId(taskList.get(0).getId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取当前真假标记
|
|
|
|
|
ocrTaskchildPicture.setIztrueorfalse(ocrPicture.getIztrueorfalse());
|
|
|
|
|
//是否已经审批
|
|
|
|
|
ocrTaskchildPicture.setWorkStatus(ocrPicture.getWorkStatus());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ocrTaskchildPicture.setOcrPicture(ocrPicture);
|
|
|
|
|
|
|
|
|
|
return ocrTaskchildPicture;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据任务包主键,查询对应的任务信息
|
|
|
|
|
*
|
|
|
|
|
* @param taskchildpictureid 当前显示的任务主键
|
|
|
|
|
* @param queryWrapper
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public IPage<OcrTaskchildPicture> listByPackageId(String taskchildpictureid, ParamterPage paramterPage, QueryWrapper queryWrapper, String orderbyname, String orderbyvalue, String packageid, String tenantId) {
|
|
|
|
|
Page<OcrTaskchildPicture> page = new Page<>(paramterPage.getStart(), paramterPage.getPagesize());
|
|
|
|
|
|
|
|
|
|
//当前显示的任务对象
|
|
|
|
|
OcrTaskchildPicture mainOcrTaskchildPicture = this.getById(taskchildpictureid);
|
|
|
|
|
|
|
|
|
|
//判断当前图片是否为历史图片
|
|
|
|
|
if (null != packageid && !packageid.equals(mainOcrTaskchildPicture.getPackageid().toString())) {
|
|
|
|
|
|
|
|
|
|
QueryWrapper<OcrTaskchildPicture> queryWrapperNew = new QueryWrapper<>();
|
|
|
|
|
queryWrapperNew.eq("TENANTID", tenantId);
|
|
|
|
|
if (StringUtils.isNotBlank(packageid)) {
|
|
|
|
|
queryWrapperNew.eq("PACKAGEID", packageid);
|
|
|
|
|
}
|
|
|
|
|
//查询非历史图片存在的集合
|
|
|
|
|
IPage<OcrTaskchildPicture> pageNew = this.selectSearchListPage(paramterPage, queryWrapperNew);
|
|
|
|
|
|
|
|
|
|
//如果是历史图片,从非历史图片存在的集合中随机选取一个
|
|
|
|
|
if (!pageNew.getRecords().isEmpty()) {
|
|
|
|
|
mainOcrTaskchildPicture = pageNew.getRecords().get(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//不包含当前选中的图片
|
|
|
|
|
queryWrapper.ne("ID", taskchildpictureid);
|
|
|
|
|
|
|
|
|
|
queryWrapper.eq("TENANTID", tenantId);
|
|
|
|
|
if (StringUtils.isNotBlank(orderbyname) && orderbyname.equals("asc")) {
|
|
|
|
|
if (StringUtils.isNotBlank(orderbyvalue) && orderbyvalue.equals("pictureResult")) {
|
|
|
|
|
queryWrapper.orderByAsc("FIELD(PICTUREID," + mainOcrTaskchildPicture.getOcpictureid() + ")");
|
|
|
|
|
} else if (StringUtils.isNotBlank(orderbyvalue) && orderbyvalue.equals("fromuptime")) {
|
|
|
|
|
queryWrapper.orderByAsc("FROMUPTIME");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else if (StringUtils.isNotBlank(orderbyname) && orderbyname.equals("desc")) {
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(orderbyvalue) && orderbyvalue.equals("pictureResult")) {
|
|
|
|
|
queryWrapper.orderByDesc("FIELD(PICTUREID," + mainOcrTaskchildPicture.getOcpictureid() + ")");
|
|
|
|
|
} else if (StringUtils.isNotBlank(orderbyvalue) && orderbyvalue.equals("fromuptime")) {
|
|
|
|
|
queryWrapper.orderByDesc("FROMUPTIME");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
queryWrapper.in("PICTUREID", mainOcrTaskchildPicture.getOcpictureid().split(","));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IPage<OcrTaskchildPicture> iPage = this.page(page, queryWrapper);
|
|
|
|
|
|
|
|
|
|
this.formatTask(iPage.getRecords(), packageid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return iPage;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 格式化显示数据
|
|
|
|
|
*
|
|
|
|
|
* @param list
|
|
|
|
|
* @param packageid
|
|
|
|
|
*/
|
|
|
|
|
private void formatTask(List<OcrTaskchildPicture> list, String packageid) {
|
|
|
|
|
for (OcrTaskchildPicture ocrTaskchildPicture : list) {
|
|
|
|
|
|
|
|
|
|
//查询审批流节点信息
|
|
|
|
|
List<Task> taskList = iFlowTaskService.nowRunTask(ocrTaskchildPicture.getProcessinstanceid(), ocrTaskchildPicture.getProcessdefinitionid());
|
|
|
|
|
if (null != taskList && !taskList.isEmpty()) {
|
|
|
|
|
ocrTaskchildPicture.setTaskId(taskList.get(0).getId());
|
|
|
|
|
}
|
|
|
|
|
// //非历史图片主键集合
|
|
|
|
|
// String pictureids = ocrTaskchildPicture.getPicturecompare();
|
|
|
|
|
// String[] splitPictureids = pictureids.split(",");
|
|
|
|
@ -397,63 +408,65 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
|
|
|
|
|
// //设置是否为历史信息
|
|
|
|
|
// ocrTaskchildPicture.setIzHistory(listPictureids.contains(ocrTaskchildPicture.getPictureid())?false:true);
|
|
|
|
|
|
|
|
|
|
//如果当前任务的任务包主键一致,说明不是历史数据,如果不一致,说明是历史数据
|
|
|
|
|
if(packageid.equals(ocrTaskchildPicture.getPackageid().toString())){
|
|
|
|
|
ocrTaskchildPicture.setIzHistory(false);
|
|
|
|
|
}else{
|
|
|
|
|
ocrTaskchildPicture.setIzHistory(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OcrPicture ocrPicture = this.ocrPictureService.selectDtoById(ocrTaskchildPicture.getPictureid());
|
|
|
|
|
//获取当前真假标记
|
|
|
|
|
ocrTaskchildPicture.setIztrueorfalse(ocrPicture.getIztrueorfalse());
|
|
|
|
|
//是否已经审批
|
|
|
|
|
ocrTaskchildPicture.setWorkStatus(ocrPicture.getWorkStatus());
|
|
|
|
|
|
|
|
|
|
ocrTaskchildPicture.setOcrPicture(ocrPicture);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 关闭工单
|
|
|
|
|
* @param id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public boolean closeOrder(String id){
|
|
|
|
|
OcrTaskchildPicture ocrTaskchildPicture = this.getById(id);
|
|
|
|
|
if(null != ocrTaskchildPicture){
|
|
|
|
|
//如果当前任务的任务包主键一致,说明不是历史数据,如果不一致,说明是历史数据
|
|
|
|
|
if (packageid.equals(ocrTaskchildPicture.getPackageid().toString())) {
|
|
|
|
|
ocrTaskchildPicture.setIzHistory(false);
|
|
|
|
|
} else {
|
|
|
|
|
ocrTaskchildPicture.setIzHistory(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OcrPicture ocrPicture = this.ocrPictureService.selectDtoById(ocrTaskchildPicture.getPictureid());
|
|
|
|
|
//获取当前真假标记
|
|
|
|
|
ocrTaskchildPicture.setIztrueorfalse(ocrPicture.getIztrueorfalse());
|
|
|
|
|
//是否已经审批
|
|
|
|
|
ocrTaskchildPicture.setWorkStatus(ocrPicture.getWorkStatus());
|
|
|
|
|
|
|
|
|
|
ocrTaskchildPicture.setOcrPicture(ocrPicture);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 关闭工单
|
|
|
|
|
*
|
|
|
|
|
* @param id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public boolean closeOrder(String id) {
|
|
|
|
|
OcrTaskchildPicture ocrTaskchildPicture = this.getById(id);
|
|
|
|
|
if (null != ocrTaskchildPicture) {
|
|
|
|
|
// ocrTaskchildPicture.setIzclose("0");
|
|
|
|
|
return this.updateById(ocrTaskchildPicture);
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生成工单
|
|
|
|
|
* @param ocrPicture 源图
|
|
|
|
|
* @param tenantId 公司主键
|
|
|
|
|
* @param sysUser 当前登录用户
|
|
|
|
|
*/
|
|
|
|
|
public OcrTaskchildPicture create(OcrPicture ocrPicture, String tenantId , UserToken sysUser, Long packageid,String buessinessno){
|
|
|
|
|
|
|
|
|
|
OcrTaskchildPicture ocrTaskchildPicture = new OcrTaskchildPicture();
|
|
|
|
|
ocrTaskchildPicture.setBuessinessno(buessinessno);
|
|
|
|
|
ocrTaskchildPicture.setFromtaskid(ocrPicture.getRemark());
|
|
|
|
|
ocrTaskchildPicture.setFromtaskname(ocrPicture.getTaskname());
|
|
|
|
|
ocrTaskchildPicture.setPictureid(ocrPicture.getId());
|
|
|
|
|
ocrTaskchildPicture.setTenantid(Long.parseLong(tenantId));
|
|
|
|
|
ocrTaskchildPicture.setCreateuser(sysUser.getLoginname());
|
|
|
|
|
ocrTaskchildPicture.setCreateusername(sysUser.getUsername());
|
|
|
|
|
ocrTaskchildPicture.setCreatedate(System.currentTimeMillis());
|
|
|
|
|
ocrTaskchildPicture.setPackageid(packageid);
|
|
|
|
|
ocrTaskchildPicture.setCategoryid(ocrPicture.getCategoryid());
|
|
|
|
|
|
|
|
|
|
ocrTaskchildPicture.setFromsourceid(ocrPicture.getField4());
|
|
|
|
|
ocrTaskchildPicture.setFromuptime(ocrPicture.getUptime());
|
|
|
|
|
ocrTaskchildPicture.setFromplanid(ocrPicture.getPlanid());
|
|
|
|
|
ocrTaskchildPicture.setFromprojectid(ocrPicture.getProjectid());
|
|
|
|
|
ocrTaskchildPicture.setFromuserid(ocrPicture.getUpuserid());
|
|
|
|
|
return this.updateById(ocrTaskchildPicture);
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生成工单
|
|
|
|
|
*
|
|
|
|
|
* @param ocrPicture 源图
|
|
|
|
|
* @param tenantId 公司主键
|
|
|
|
|
* @param sysUser 当前登录用户
|
|
|
|
|
*/
|
|
|
|
|
public OcrTaskchildPicture create(OcrPicture ocrPicture, String tenantId, UserToken sysUser, Long packageid, String buessinessno) {
|
|
|
|
|
|
|
|
|
|
OcrTaskchildPicture ocrTaskchildPicture = new OcrTaskchildPicture();
|
|
|
|
|
ocrTaskchildPicture.setBuessinessno(buessinessno);
|
|
|
|
|
ocrTaskchildPicture.setFromtaskid(ocrPicture.getRemark());
|
|
|
|
|
ocrTaskchildPicture.setFromtaskname(ocrPicture.getTaskname());
|
|
|
|
|
ocrTaskchildPicture.setPictureid(ocrPicture.getId());
|
|
|
|
|
ocrTaskchildPicture.setTenantid(Long.parseLong(tenantId));
|
|
|
|
|
ocrTaskchildPicture.setCreateuser(sysUser.getLoginname());
|
|
|
|
|
ocrTaskchildPicture.setCreateusername(sysUser.getUsername());
|
|
|
|
|
ocrTaskchildPicture.setCreatedate(System.currentTimeMillis());
|
|
|
|
|
ocrTaskchildPicture.setPackageid(packageid);
|
|
|
|
|
ocrTaskchildPicture.setCategoryid(ocrPicture.getCategoryid());
|
|
|
|
|
|
|
|
|
|
ocrTaskchildPicture.setFromsourceid(ocrPicture.getField4());
|
|
|
|
|
ocrTaskchildPicture.setFromuptime(ocrPicture.getUptime());
|
|
|
|
|
ocrTaskchildPicture.setFromplanid(ocrPicture.getPlanid());
|
|
|
|
|
ocrTaskchildPicture.setFromprojectid(ocrPicture.getProjectid());
|
|
|
|
|
ocrTaskchildPicture.setFromuserid(ocrPicture.getUpuserid());
|
|
|
|
|
|
|
|
|
|
// StringBuffer pcid = new StringBuffer();
|
|
|
|
|
// StringBuffer result = new StringBuffer();
|
|
|
|
@ -471,56 +484,60 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
|
|
|
|
|
// ocrTaskchildPicture.setPictureresult(result.toString());
|
|
|
|
|
// ocrTaskchildPicture.setPicturecompare(String.join(",",ocrPicture.getPicturecompareList()));
|
|
|
|
|
|
|
|
|
|
return this.save(ocrTaskchildPicture)?ocrTaskchildPicture:null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询所有业务表集合
|
|
|
|
|
* @param query
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<OcrTaskchildPicture> listFinal(Map<String, Object> query){
|
|
|
|
|
|
|
|
|
|
return this.ocrtaskchildpicturemybatisdao.listFinal(query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据任务\工单主键查询图片对象
|
|
|
|
|
* @param taskchildid
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public OcrPicture findOcrPictureByTaskchildid(String taskchildid){
|
|
|
|
|
OcrTaskchildPicture ocrTaskchildPicture = this.ocrtaskchildpicturemybatisdao.selectById(taskchildid);
|
|
|
|
|
|
|
|
|
|
if(null == ocrTaskchildPicture){
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OcrPicture ocrPicture = ocrPictureService.selectDtoById(ocrTaskchildPicture.getPictureid());
|
|
|
|
|
|
|
|
|
|
return ocrPicture;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询所有业务表数量
|
|
|
|
|
* @param query
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public Long listFinalCount(Map<String, Object> query){
|
|
|
|
|
return this.ocrtaskchildpicturemybatisdao.listFinalCount(query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询所有业务表集合
|
|
|
|
|
* @param query
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<OcrTaskchildPictureAppro> listmytask(Map<String, Object> query){
|
|
|
|
|
return this.ocrtaskchildpicturemybatisdao.listmytask(query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Long listmytaskCount(Map<String, Object> query){
|
|
|
|
|
return this.ocrtaskchildpicturemybatisdao.listmytaskCount(query);
|
|
|
|
|
}
|
|
|
|
|
return this.save(ocrTaskchildPicture) ? ocrTaskchildPicture : null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询所有业务表集合
|
|
|
|
|
*
|
|
|
|
|
* @param query
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<OcrTaskchildPicture> listFinal(Map<String, Object> query) {
|
|
|
|
|
|
|
|
|
|
return this.ocrtaskchildpicturemybatisdao.listFinal(query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据任务\工单主键查询图片对象
|
|
|
|
|
*
|
|
|
|
|
* @param taskchildid
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public OcrPicture findOcrPictureByTaskchildid(String taskchildid) {
|
|
|
|
|
OcrTaskchildPicture ocrTaskchildPicture = this.ocrtaskchildpicturemybatisdao.selectById(taskchildid);
|
|
|
|
|
|
|
|
|
|
if (null == ocrTaskchildPicture) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OcrPicture ocrPicture = ocrPictureService.selectDtoById(ocrTaskchildPicture.getPictureid());
|
|
|
|
|
|
|
|
|
|
return ocrPicture;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询所有业务表数量
|
|
|
|
|
*
|
|
|
|
|
* @param query
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public Long listFinalCount(Map<String, Object> query) {
|
|
|
|
|
return this.ocrtaskchildpicturemybatisdao.listFinalCount(query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询所有业务表集合
|
|
|
|
|
*
|
|
|
|
|
* @param query
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<OcrTaskchildPictureAppro> listmytask(Map<String, Object> query) {
|
|
|
|
|
return this.ocrtaskchildpicturemybatisdao.listmytask(query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Long listmytaskCount(Map<String, Object> query) {
|
|
|
|
|
return this.ocrtaskchildpicturemybatisdao.listmytaskCount(query);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|