任务清除标记 没清除标记 已修改bug

pull/1/head
ljt 1 year ago
parent 4bde6ffd72
commit 188ef2019c

@ -184,6 +184,26 @@ public class OcrTaskchildPictureController extends BaseController{
* @param req * @param req
* @return * @return
*/ */
// @ApiOperation(value="任务清除标记", notes="任务清除标记")
// @ApiImplicitParams({
// @ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "任务主键", required = true),
// @ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键", required = true)
// })
// @PostMapping(value = "/clearmark")
// public ResultVo clearmark(@RequestParam(name="taskchildpictureid",required=true) String taskchildpictureid,
// @RequestParam(name="packageid",required=true) String packageid,
// HttpServletRequest req) {
// //如果是历史图片,不允许进行设置
// //如果是已经审批完成的图片不允许是指
//
// OcrTaskchildPicture ocrTaskchildPicture = new OcrTaskchildPicture();
//
// ocrTaskchildPicture.setPackageid(Long.parseLong(packageid));
//
// return ocrTaskchildPictureService.clearmark(taskchildpictureid,packageid);
// }
@ApiOperation(value="任务清除标记", notes="任务清除标记") @ApiOperation(value="任务清除标记", notes="任务清除标记")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "任务主键", required = true), @ApiImplicitParam(paramType = "path",name = "taskchildpictureid", value = "任务主键", required = true),
@ -192,15 +212,15 @@ public class OcrTaskchildPictureController extends BaseController{
@PostMapping(value = "/clearmark") @PostMapping(value = "/clearmark")
public ResultVo clearmark(@RequestParam(name="taskchildpictureid",required=true) String taskchildpictureid, public ResultVo clearmark(@RequestParam(name="taskchildpictureid",required=true) String taskchildpictureid,
@RequestParam(name="packageid",required=true) String packageid, @RequestParam(name="packageid",required=true) String packageid,
HttpServletRequest req) { HttpServletRequest request) {
//如果是历史图片,不允许进行设置 //租户主键,由前端页面传送
//如果是已经审批完成的图片不允许是指 String tenantId = request.getHeader("X-Tenant-Id");
if(StringUtils.isBlank(tenantId)){
OcrTaskchildPicture ocrTaskchildPicture = new OcrTaskchildPicture(); return ResultVoUtil.error("租户主键不能为空");
}
ocrTaskchildPicture.setPackageid(Long.parseLong(packageid));
return ocrTaskchildPictureService.clearmark(taskchildpictureid,packageid); return ocrTaskchildPictureService.clearmark(tenantId,taskchildpictureid,packageid);
} }
/** /**

@ -1,9 +1,11 @@
package cn.jyjz.xiaoyao.ocr.dataDao; package cn.jyjz.xiaoyao.ocr.dataDao;
import cn.jyjz.xiaoyao.oa.from.vo.FlowUnionVo;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture; import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPictureAppro; import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPictureAppro;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -41,4 +43,6 @@ public interface OcrTaskchildPictureMybatisDao extends BaseMapper<OcrTaskchildPi
*/ */
Long listmytaskCount(Map<String, Object> query); Long listmytaskCount(Map<String, Object> query);
String selectocpicture(@Param("tenantid")String tenantid,@Param("packageid")String packageid,@Param("id")String id);
} }

@ -12,6 +12,7 @@ import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture;
import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPictureAppro; import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPictureAppro;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
/** /**
@ -73,7 +74,8 @@ public interface OcrTaskchildPictureService extends BaseService<OcrTaskchildPict
*/ */
public ResultVo trueorfalse(String childpictureid, String packageid, String iztrueorfalse, String judgeid, String judgedesc); public ResultVo trueorfalse(String childpictureid, String packageid, String iztrueorfalse, String judgeid, String judgedesc);
public ResultVo clearmark(String childpictureid, String packageid); public ResultVo clearmark(String tenantId,String childpictureid, String packageid);
/** /**
* *
* @param childpictureid * @param childpictureid

@ -102,39 +102,32 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
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 tenantId,String childpictureids, String packageid) {
String[] cps = childpictureids.split(",");
List<OcrPicture> saveList = new ArrayList<>();
StringBuffer historyPname = new StringBuffer(); String selectocpicture = ocrtaskchildpicturemybatisdao.selectocpicture(tenantId, packageid ,childpictureids);
String[] cps = selectocpicture.split(",");
List<OcrPicture> saveList = new ArrayList<>();
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));
//如果是历史图片,不允许进行设置 OcrPicture ocrPicture = this.ocrPictureService.selectDtoById(Long.parseLong(childpictureid));
// if(old.isIzHistory()){
// if(historyPname.length() > 0){
// historyPname.append("," + old.getOcrPicture().getImgname());
// }else{
// historyPname.append(old.getOcrPicture().getImgname());
// }
// }
// if(old.getStates().intValue() == 3 || old.getStates().intValue() == 5) {
// if(taskType.length() > 0){
// taskType.append("," + old.getOcrPicture().getImgname());
// }else{
// taskType.append(old.getOcrPicture().getImgname());
// }
// }
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());
// OcrPicture ocrPicture = old.getOcrPicture();
// ocrPicture.setJudgeid(null);
// ocrPicture.setJudgedesc(null);
// ocrPicture.setIztrueorfalse(null);
// ocrPicture.setUpdateTime(System.currentTimeMillis());
saveList.add(ocrPicture); saveList.add(ocrPicture);
} }
@ -297,11 +290,6 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl<OcrTaskchild
*/ */
public OcrTaskchildPicture listPicturePackageId(String fromid, Long packageid) { public OcrTaskchildPicture listPicturePackageId(String fromid, Long packageid) {
OcrTaskchildPicture ocrTaskchildPicture = this.getById(fromid); OcrTaskchildPicture ocrTaskchildPicture = this.getById(fromid);
if (ocrTaskchildPicture == null) {
return new OcrTaskchildPicture();
}
List<Userapprove> list = userapproveService.list(new LambdaQueryWrapper<Userapprove>().eq(Userapprove::getFormid, fromid));
ocrTaskchildPicture.setUserapproveList(list);
//查询图片对象 //查询图片对象
OcrPicture ocrPicture = this.ocrPictureService.selectDtoById(ocrTaskchildPicture.getPictureid()); OcrPicture ocrPicture = this.ocrPictureService.selectDtoById(ocrTaskchildPicture.getPictureid());

@ -207,29 +207,24 @@ select tcp.* from (
</select> </select>
<select id="listmytask" resultType="cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPictureAppro" parameterType="java.util.Map"> <select id="listmytask" resultType="cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPictureAppro" parameterType="java.util.Map">
select tcp.* from ( select tcp.* from (
select select
tc.*,uf.COMMENTHIS,uf.TASKNAME as TASKNAMEHIS,uf.STATSHIS,uf.TASKINDEX,uf.TASKNO tc.*,uf.COMMENTHIS,uf.TASKNAME as TASKNAMEHIS,uf.STATSHIS,uf.TASKINDEX,uf.TASKNO
from ocr_taskchild_picture tc from ocr_taskchild_picture tc
LEFT JOIN OA_USERAPPROVE_T uf ON tc.ID = uf.ID LEFT JOIN OA_USERAPPROVE_T uf ON tc.ID = uf.ID
where tc.ASSIGNEE = #{searchassignee} and tc.TENANTID=#{searchtenantid} where tc.ASSIGNEE = #{searchassignee} and tc.TENANTID=#{searchtenantid}
and tc.STATES = 2
UNION UNION
select select
tc.*,uf.COMMENTHIS,uf.TASKNAME as TASKNAMEHIS,uf.STATSHIS,uf.TASKINDEX,uf.TASKNO tc.*,uf.COMMENTHIS,uf.TASKNAME as TASKNAMEHIS,uf.STATSHIS,uf.TASKINDEX,uf.TASKNO
from ocr_taskchild_picture tc,OA_USERAPPROVE_T uf from ocr_taskchild_picture tc,OA_USERAPPROVE_T uf
where tc.ID = uf.FORMID and tc.TENANTID=#{searchtenantid} where tc.ID = uf.FORMID and tc.TENANTID=#{searchtenantid}
<if test="thisLoginUserid != null"> <if test="thisLoginUserid != null"> and uf.USERID = #{thisLoginUserid}</if>
and uf.USERID = #{thisLoginUserid}
</if>
) as tcp ) as tcp
<include refid="Base_Where_union"> <include refid="Base_Where_union"></include>
</include>
<if test="page != null"> <if test="page != null">
<if test="page.sortname != null"> <if test="page.sortname != null"> order by tcp.${page.sortname} ${page.sortorder}</if>
order by tcp.${page.sortname} ${page.sortorder}
</if>
limit ${page.start}, ${page.Pagesize} limit ${page.start}, ${page.Pagesize}
</if> </if>
</select> </select>
@ -249,4 +244,18 @@ select tcp.* from (
<include refid="Base_Where_union"></include> <include refid="Base_Where_union"></include>
</select> </select>
<select id="selectocpicture" resultType="String">
SELECT
OCPICTUREID
FROM
ocr_taskchild_picture
WHERE
TENANTID = #{tenantid}
AND PACKAGEID = #{packageid}
AND ID = #{id}
</select>
</mapper> </mapper>

Loading…
Cancel
Save