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.eq("TENANTID",tenantId);
queryWrapper.eq("PACKAGEID",packageid);
if(StringUtils.isNotBlank(packageid)){
queryWrapper.eq("PACKAGEID",packageid);
}
IPage<OcrTaskchildPicture> page = this.ocrTaskchildPictureService.selectSearchListPage(paramterPage,queryWrapper);
QueryWrapper<OcrTaskchildPicture> queryWrapperNex = SearchQueryFormat.queryStringFormat(searchQuery,ocrtaskchildpicture);
@ -113,7 +114,7 @@ public class OcrTaskchildPictureController extends BaseController{
@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),
@ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键"),
@ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "当前选中的任务主键", required = true)
})
@GetMapping("/listbypictureid/{packageid}/{taskchildpictureid}")
@ -237,7 +238,7 @@ public class OcrTaskchildPictureController extends BaseController{
@ApiOperation(value="ocr_任务包下的当前展示的任务对象", notes="ocr_任务包下的当前展示的任务对象")
@ApiImplicitParams({
@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}")
@ResponseBody

@ -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);
}
}

Loading…
Cancel
Save