修改任务包详情

pull/1/head
sunchenliang 1 year ago
parent 986409a500
commit c993e89ceb

@ -291,7 +291,8 @@ public class OcrTaskchildPictureController extends BaseController {
public ResultVo getdateOcrTaskchildPicture(HttpServletResponse response, HttpServletRequest request, public ResultVo getdateOcrTaskchildPicture(HttpServletResponse response, HttpServletRequest request,
@PathVariable("packageid") Long packageid, @PathVariable("packageid") Long packageid,
@PathVariable("id") Long id) throws IOException { @PathVariable("id") Long id) throws IOException {
OcrTaskchildPicture dto = this.ocrTaskchildPictureService.listPicturePackageId(id.toString(), packageid); UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request));
OcrTaskchildPicture dto = this.ocrTaskchildPictureService.listPicturePackageId(id.toString(), packageid,userToken);
if (null != dto) { if (null != dto) {
return ResultVoUtil.success(dto); return ResultVoUtil.success(dto);
} else { } else {

@ -225,6 +225,10 @@ public class OcrTaskchildPicture implements BaseDto,java.io.Serializable {
@TableField(exist = false) @TableField(exist = false)
private String reporttime; private String reporttime;
@ApiModelProperty(value ="本人审查日志")
@TableField(exist = false)
private Userapprove userapprove;
@ApiModelProperty(value ="审查日志") @ApiModelProperty(value ="审查日志")
@TableField(exist = false) @TableField(exist = false)
private List<Userapprove> userapproveList; private List<Userapprove> userapproveList;

@ -58,7 +58,7 @@ public interface OcrTaskchildPictureService extends BaseService<OcrTaskchildPict
* @param fromid * @param fromid
* @return * @return
*/ */
public OcrTaskchildPicture listPicturePackageId(String fromid,Long packageid); public OcrTaskchildPicture listPicturePackageId(String fromid,Long packageid,UserToken userToken);
/** /**
* *
* @param taskchildpictureid * @param taskchildpictureid

@ -3,6 +3,8 @@ package cn.jyjz.xiaoyao.ocr.service.impl;
import cn.jyjz.flowable.common.SystemConstantsOa; import cn.jyjz.flowable.common.SystemConstantsOa;
import cn.jyjz.flowable.service.IFlowTaskService; import cn.jyjz.flowable.service.IFlowTaskService;
import cn.jyjz.xiaoyao.common.base.param.ParamterPage; import cn.jyjz.xiaoyao.common.base.param.ParamterPage;
import cn.jyjz.xiaoyao.common.base.service.UserTokenService;
import cn.jyjz.xiaoyao.common.base.util.RequestBaseUtil;
import cn.jyjz.xiaoyao.common.base.vo.ResultVo; import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil; import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
import cn.jyjz.xiaoyao.common.base.vo.UserToken; import cn.jyjz.xiaoyao.common.base.vo.UserToken;
@ -69,7 +71,7 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
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),null);
//如果是历史图片,不允许进行设置 //如果是历史图片,不允许进行设置
// if(old.isIzHistory()){ // if(old.isIzHistory()){
@ -292,13 +294,17 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
* @param fromid * @param fromid
* @return * @return
*/ */
public OcrTaskchildPicture listPicturePackageId(String fromid, Long packageid) { public OcrTaskchildPicture listPicturePackageId(String fromid, Long packageid, UserToken userToken) {
OcrTaskchildPicture ocrTaskchildPicture = this.getById(fromid); OcrTaskchildPicture ocrTaskchildPicture = this.getById(fromid);
if (ocrTaskchildPicture == null) { if (ocrTaskchildPicture == null) {
return new OcrTaskchildPicture(); return new OcrTaskchildPicture();
} }
List<Userapprove> list = userapproveService.list(new LambdaQueryWrapper<Userapprove>().eq(Userapprove::getFormid, fromid)); List<Userapprove> list = userapproveService.list(new LambdaQueryWrapper<Userapprove>().eq(Userapprove::getFormid, fromid));
ocrTaskchildPicture.setUserapproveList(list); ocrTaskchildPicture.setUserapproveList(list);
if(null !=userToken){
Optional<Userapprove> first = list.stream().filter(userapprove -> userapprove.getUserid().toString().equals(userToken.getUserid())).findFirst();
ocrTaskchildPicture.setUserapprove(first.orElse(new Userapprove()));
}
//查询图片对象 //查询图片对象
OcrPicture ocrPicture = this.ocrPictureService.selectDtoById(ocrTaskchildPicture.getPictureid()); OcrPicture ocrPicture = this.ocrPictureService.selectDtoById(ocrTaskchildPicture.getPictureid());

Loading…
Cancel
Save