Merge remote-tracking branch 'origin/master'

# Conflicts:
#	runstart/src/main/resources/application-dev.yml
#	runstart/src/main/resources/application-pro.yml
pull/1/head
shuliYao 1 year ago
commit 70349a55b9

@ -93,8 +93,9 @@ public class OcrTaskchildPictureController extends BaseController{
QueryWrapper<OcrTaskchildPicture> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery,ocrtaskchildpicture); QueryWrapper<OcrTaskchildPicture> queryWrapper = SearchQueryFormat.queryStringFormat(searchQuery,ocrtaskchildpicture);
queryWrapper.eq("TENANTID",tenantId); queryWrapper.eq("TENANTID",tenantId);
queryWrapper.eq("PACKAGEID",packageid); if(StringUtils.isNotBlank(packageid)){
queryWrapper.eq("PACKAGEID",packageid);
}
IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage,queryWrapper); IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage,queryWrapper);
QueryWrapper<OcrTaskchildPicture> queryWrapperNex = SearchQueryFormat.queryStringFormat(searchQuery,ocrtaskchildpicture); QueryWrapper<OcrTaskchildPicture> queryWrapperNex = SearchQueryFormat.queryStringFormat(searchQuery,ocrtaskchildpicture);
@ -113,7 +114,7 @@ public class OcrTaskchildPictureController extends BaseController{
@ApiOperation(value="ocr_任务包下的当前图片比对的集合列表", notes="ocr_任务包下的当前图片比对的集合列表") @ApiOperation(value="ocr_任务包下的当前图片比对的集合列表", notes="ocr_任务包下的当前图片比对的集合列表")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "header", name = "X-Tenant-Id", value = "租户主键,用户登录时的信息“tenantList”中获得。", dataType = "String", required = true), @ApiImplicitParam(paramType = "header", name = "X-Tenant-Id", value = "租户主键,用户登录时的信息“tenantList”中获得。", dataType = "String", required = true),
@ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键", required = true), @ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键"),
@ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "当前选中的任务主键", required = true) @ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "当前选中的任务主键", required = true)
}) })
@GetMapping("/listbypictureid/{packageid}/{taskchildpictureid}") @GetMapping("/listbypictureid/{packageid}/{taskchildpictureid}")
@ -237,7 +238,7 @@ public class OcrTaskchildPictureController extends BaseController{
@ApiOperation(value="ocr_任务包下的当前展示的任务对象", notes="ocr_任务包下的当前展示的任务对象") @ApiOperation(value="ocr_任务包下的当前展示的任务对象", notes="ocr_任务包下的当前展示的任务对象")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "path",name = "id", value = "当前选中的任务主键", required = true), @ApiImplicitParam(paramType = "path",name = "id", value = "当前选中的任务主键", required = true),
@ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键注意不是当前任务关联的packageid而是当前选中的任务包主键", required = true) @ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键注意不是当前任务关联的packageid而是当前选中的任务包主键")
}) })
@GetMapping("/getdata/{id}/{packageid}") @GetMapping("/getdata/{id}/{packageid}")
@ResponseBody @ResponseBody

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

Loading…
Cancel
Save