|
|
|
@ -1,28 +1,23 @@
|
|
|
|
|
package com.docus.server.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.docus.infrastructure.redis.service.IdService;
|
|
|
|
|
import com.docus.infrastructure.web.request.SearchDTO;
|
|
|
|
|
import com.docus.infrastructure.web.response.PageResult;
|
|
|
|
|
import com.docus.server.convert.OcrSpecialRuleTestConvert;
|
|
|
|
|
import com.docus.server.dto.segmentation.ocrspecialruletest.AddOcrSpecialRuleTestDTO;
|
|
|
|
|
import com.docus.server.dto.segmentation.ocrspecialruletest.EditOcrSpecialRuleTestDTO;
|
|
|
|
|
import com.docus.server.dto.segmentation.ocrspecialruletest.DeleteOcrSpecialRuleTestDTO;
|
|
|
|
|
import com.docus.server.vo.segmentation.ocrspecialruletest.OcrSpecialRuleTestVO;
|
|
|
|
|
import com.docus.server.entity.segmentation.OcrSpecialRuleTest;
|
|
|
|
|
import com.docus.server.convert.OcrSpecialRuleTestConvert;
|
|
|
|
|
import com.docus.server.dto.segmentation.ocrspecialruletest.EditOcrSpecialRuleTestDTO;
|
|
|
|
|
import com.docus.server.entity.segmentation.OcrSpecialRuleTest;
|
|
|
|
|
import com.docus.server.infrastructure.dao.IOcrSpecialRuleTestDao;
|
|
|
|
|
import com.docus.server.service.IOcrSpecialRuleTestService;
|
|
|
|
|
import com.docus.core.util.Func;
|
|
|
|
|
import com.docus.server.vo.segmentation.ocrspecialruletest.OcrSpecialRuleTestVO;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import com.docus.infrastructure.web.request.SearchDTO;
|
|
|
|
|
import com.docus.infrastructure.web.response.PageResult;
|
|
|
|
|
import com.docus.infrastructure.redis.service.IdService;
|
|
|
|
|
import com.docus.infrastructure.web.exception.ApiException;
|
|
|
|
|
import com.docus.infrastructure.web.exception.ExceptionCode;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* 特殊策略表-调试 服务实现类
|
|
|
|
|
*
|
|
|
|
|
* @author AutoGenerator
|
|
|
|
@ -36,7 +31,8 @@ public class OcrSpecialRuleTestServiceImpl implements IOcrSpecialRuleTestService
|
|
|
|
|
private IdService idService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*按主键查询
|
|
|
|
|
* 按主键查询
|
|
|
|
|
*
|
|
|
|
|
* @param id 主键Id
|
|
|
|
|
* @return 实体
|
|
|
|
|
*/
|
|
|
|
@ -46,7 +42,8 @@ public class OcrSpecialRuleTestServiceImpl implements IOcrSpecialRuleTestService
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*查询所有
|
|
|
|
|
* 查询所有
|
|
|
|
|
*
|
|
|
|
|
* @return 实体
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
@ -56,6 +53,7 @@ public class OcrSpecialRuleTestServiceImpl implements IOcrSpecialRuleTestService
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 关键字搜索
|
|
|
|
|
*
|
|
|
|
|
* @param searchDTO 搜索参数
|
|
|
|
|
* @return 分页列表
|
|
|
|
|
*/
|
|
|
|
@ -83,13 +81,14 @@ public class OcrSpecialRuleTestServiceImpl implements IOcrSpecialRuleTestService
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 新增
|
|
|
|
|
*
|
|
|
|
|
* @param addOcrSpecialRuleTestDTO 编辑参数
|
|
|
|
|
* @return 成功或失败
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public boolean add(AddOcrSpecialRuleTestDTO addOcrSpecialRuleTestDTO) {
|
|
|
|
|
OcrSpecialRuleTest ocrSpecialRuleTest =OcrSpecialRuleTestConvert.INSTANCE.convertDO(addOcrSpecialRuleTestDTO);
|
|
|
|
|
OcrSpecialRuleTest ocrSpecialRuleTest = OcrSpecialRuleTestConvert.INSTANCE.convertDO(addOcrSpecialRuleTestDTO);
|
|
|
|
|
ocrSpecialRuleTest.setId(idService.getDateSeq());
|
|
|
|
|
return iOcrSpecialRuleTestDao.add(ocrSpecialRuleTest);
|
|
|
|
|
|
|
|
|
@ -110,13 +109,14 @@ public class OcrSpecialRuleTestServiceImpl implements IOcrSpecialRuleTestService
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 编辑
|
|
|
|
|
*
|
|
|
|
|
* @param editOcrSpecialRuleTestDTO 编辑参数
|
|
|
|
|
* @return 成功或失败
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public boolean edit(EditOcrSpecialRuleTestDTO editOcrSpecialRuleTestDTO) {
|
|
|
|
|
OcrSpecialRuleTest ocrSpecialRuleTest =OcrSpecialRuleTestConvert.INSTANCE.convertDO(editOcrSpecialRuleTestDTO);
|
|
|
|
|
OcrSpecialRuleTest ocrSpecialRuleTest = OcrSpecialRuleTestConvert.INSTANCE.convertDO(editOcrSpecialRuleTestDTO);
|
|
|
|
|
return iOcrSpecialRuleTestDao.edit(ocrSpecialRuleTest);
|
|
|
|
|
|
|
|
|
|
// Long id = editOcrSpecialRuleTestDTO.getId();
|
|
|
|
@ -133,6 +133,7 @@ public class OcrSpecialRuleTestServiceImpl implements IOcrSpecialRuleTestService
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 批量删除
|
|
|
|
|
*
|
|
|
|
|
* @param deleteOcrSpecialRuleTestDTO 删除参数
|
|
|
|
|
* @return 成功或失败
|
|
|
|
|
*/
|
|
|
|
|