diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildPictureController.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildPictureController.java index c366c514..fae8abcc 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildPictureController.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildPictureController.java @@ -1,6 +1,7 @@ package cn.jyjz.xiaoyao.ocr.controller; import java.io.IOException; +import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -201,6 +202,33 @@ public class OcrTaskchildPictureController extends BaseController{ return ocrTaskchildPictureService.clearmark(taskchildpictureid,packageid); } + /** + * 当前任务包智能识别 + * + * @param req + * @return + */ + @ApiOperation(value="当前任务包智能识别", notes="当前任务包智能识别") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path",name = "packageid", value = "任务包主键", required = true) + }) + @PostMapping(value = "/markpoint") + public ResultVo markpoint(@RequestParam(name="packageid",required=true) String packageid, + HttpServletRequest req) { + //如果是历史图片,不允许进行设置 + //如果是已经审批完成的图片不允许是指 + + OcrTaskchildPicture ocrTaskchildPicture = new OcrTaskchildPicture(); + + ocrTaskchildPicture.setPackageid(Long.parseLong(packageid)); + + List list = ocrTaskchildPictureService.markpoint(packageid); + if(null != list && !list.isEmpty()){ + return ResultVoUtil.success(list); + } + return ResultVoUtil.error(); + } + /** *方法描述:通过主键获得对象信息 *创建人:mail.zhangyong@gmail.com diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/dataobject/OcrTaskchildPicture.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/dataobject/OcrTaskchildPicture.java index d17814a6..a37996c2 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/dataobject/OcrTaskchildPicture.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/dataobject/OcrTaskchildPicture.java @@ -39,153 +39,149 @@ import java.util.stream.Collectors; @TableName(value = "ocr_taskchild_picture") public class OcrTaskchildPicture implements BaseDto,java.io.Serializable { - private static final long serialVersionUID = 6403133754695702159L; - @ApiModelProperty(value ="主键") + private static final long serialVersionUID = -8018660053527763810L; + @ApiModelProperty(value = "主键") @TableId(value = "id",type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) @TableField(value="ID") private Long id; - @ApiModelProperty(value ="比对图片主键,多个数据使用英文逗号分隔") + @ApiModelProperty(value = "比对图片主键,多个数据使用英文逗号分隔") @TableField(value="OCPICTUREID") private String ocpictureid; - @ApiModelProperty(value ="图片比对结果,与图片主键一一对应,记录比对结果,使用英文逗号分隔,例如99.6,98.1,97.2") + @ApiModelProperty(value = "图片比对结果,与图片主键一一对应,记录比对结果,使用英文逗号分隔,例如99.6,98.1,97.2") @TableField(value="PICTURERESULT") private String pictureresult; - @ApiModelProperty(value ="只记录主图,如果存在历史图片,不在这里记录") + @ApiModelProperty(value = "只记录主图,如果存在历史图片,不在这里记录") @TableField(value="PICTURECOMPARE") private String picturecompare; - @ApiModelProperty(value ="所属部门") + @ApiModelProperty(value = "所属部门") @TableField(value="DEPTID") private String deptid; - @ApiModelProperty(value ="租户ID") + @ApiModelProperty(value = "租户ID") @TableField(value="TENANTID") - @JsonSerialize(using = ToStringSerializer.class) private Long tenantid; - @ApiModelProperty(value ="任务包主键") + @ApiModelProperty(value = "任务包主键") @TableField(value="PACKAGEID") - @JsonSerialize(using = ToStringSerializer.class) private Long packageid; - @ApiModelProperty(value ="原图片主键") + @ApiModelProperty(value = "原图片主键") @TableField(value="PICTUREID") - @JsonSerialize(using = ToStringSerializer.class) private Long pictureid; - @ApiModelProperty(value ="类型名称") + @ApiModelProperty(value = "类型名称") @TableField(value="CATEGORY") private String category; - @ApiModelProperty(value ="项目ID") + @ApiModelProperty(value = "项目ID") @TableField(value="CATEGORYID") - @JsonSerialize(using = ToStringSerializer.class) private Long categoryid; - @ApiModelProperty(value ="明细单") + @ApiModelProperty(value = "明细单") @TableField(value="SPECIFICATION") private String specification; - @ApiModelProperty(value ="业务编码") + @ApiModelProperty(value = "业务编码") @TableField(value="BUESSINESSNO") private String buessinessno; - @ApiModelProperty(value ="状态,审批状态 1:未提交 2:审批中 3:审批通过 ,5:拒绝") + @ApiModelProperty(value = "状态,审批状态 1:未提交 2:审批中 3:审批通过 ,5:拒绝") @TableField(value="STATES") private Integer states; - @ApiModelProperty(value ="流程实例IdprocessInstanceId") + @ApiModelProperty(value = "流程实例IdprocessInstanceId") @TableField(value="PROCESSINSTANCEID") private String processinstanceid; - @ApiModelProperty(value ="流程定义id") + @ApiModelProperty(value = "流程定义id") @TableField(value="PROCESSDEFINITIONID") private String processdefinitionid; - @ApiModelProperty(value ="流程部署id") + @ApiModelProperty(value = "流程部署id") @TableField(value="DEPLOYMENTID") private String deploymentid; - @ApiModelProperty(value ="审批人姓名") + @ApiModelProperty(value = "审批人姓名") @TableField(value="ASSIGNEENAME") private String assigneename; - @ApiModelProperty(value ="审批人") + @ApiModelProperty(value = "审批人") @TableField(value="ASSIGNEE") private String assignee; - @ApiModelProperty(value ="修改人,记录创建人的帐号") + @ApiModelProperty(value = "修改人,记录创建人的帐号") @TableField(value="UPDATEUSER") private String updateuser; - @ApiModelProperty(value ="更新时间") + @ApiModelProperty(value = "更新时间") @TableField(value="UPDATETIME") - @JsonSerialize(using = DateSerializer.class) private Long updatetime; - @ApiModelProperty(value ="附件") + @ApiModelProperty(value = "附件") @TableField(value="FILEANNEX") private String fileannex; - @ApiModelProperty(value ="是否归档,0:未归档,1:归档") + @ApiModelProperty(value = "是否归档,0:未归档,1:归档") @TableField(value="GUIDANG") private Integer guidang; - @ApiModelProperty(value ="创建人") + @ApiModelProperty(value = "创建人") @TableField(value="CREATEUSER") private String createuser; - @ApiModelProperty(value ="创建人姓名") + @ApiModelProperty(value = "创建人姓名") @TableField(value="CREATEUSERNAME") private String createusername; - @ApiModelProperty(value ="创建时间") - @JsonSerialize(using = DateSerializer.class) + @ApiModelProperty(value = "创建时间") @TableField(value="CREATEDATE") private Long createdate; - @ApiModelProperty(value ="员工主键") - @JsonSerialize(using = ToStringSerializer.class) + @ApiModelProperty(value = "员工主键") @TableField(value="USERID") private Long userid; - @ApiModelProperty(value ="员工姓名") + @ApiModelProperty(value = "员工姓名") @TableField(value="USERNAME") private String username; - @ApiModelProperty(value ="任务id,来源于图片表") + @ApiModelProperty(value = "任务id,来源于图片表") @TableField(value="FROMTASKID") private String fromtaskid; - @ApiModelProperty(value ="任务名称,来源于图片表") + @ApiModelProperty(value = "任务名称,来源于图片表") @TableField(value="FROMTASKNAME") private String fromtaskname; - @ApiModelProperty(value ="提报人") + @ApiModelProperty(value = "提报人") @TableField(value="FROMUSERID") private String fromuserid; - @ApiModelProperty(value ="所属项目") + @ApiModelProperty(value = "所属项目") @TableField(value="FROMPROJECTID") private String fromprojectid; - @ApiModelProperty(value ="所属计划") + @ApiModelProperty(value = "所属计划") @TableField(value="FROMPLANID") private String fromplanid; - @ApiModelProperty(value ="提报时间") + @ApiModelProperty(value = "提报时间") @TableField(value="FROMUPTIME") - @JsonSerialize(using = DateSerializer.class) private Long fromuptime; - @ApiModelProperty(value ="任务来源") + @ApiModelProperty(value = "任务来源") @TableField(value="FROMSOURCEID") private String fromsourceid; + @ApiModelProperty(value = "是否为相似图片,与其他图片对比为百分百的,记录为1,0:不相似,1:相似") + @TableField(value="HAVEPOINTS") + private Integer havepoints; + @ApiModelProperty(value = "项目对象") @TableField(exist = false) private Category categoryDto; @@ -251,40 +247,41 @@ public class OcrTaskchildPicture implements BaseDto,java.io.Serializable { @TableField(exist = false) @JsonIgnore private final Map query = Stream.of( - new SimpleEntry<>("ID","id"), - new SimpleEntry<>("OCPICTUREID","ocpictureid"), - new SimpleEntry<>("PICTURERESULT","pictureresult"), - new SimpleEntry<>("PICTURECOMPARE","picturecompare"), - new SimpleEntry<>("DEPTID","deptid"), - new SimpleEntry<>("TENANTID","tenantid"), - new SimpleEntry<>("PACKAGEID","packageid"), - new SimpleEntry<>("PICTUREID","pictureid"), - new SimpleEntry<>("CATEGORY","category"), - new SimpleEntry<>("CATEGORYID","categoryid"), - new SimpleEntry<>("SPECIFICATION","specification"), - new SimpleEntry<>("BUESSINESSNO","buessinessno"), - new SimpleEntry<>("STATES","states"), - new SimpleEntry<>("PROCESSINSTANCEID","processinstanceid"), - new SimpleEntry<>("PROCESSDEFINITIONID","processdefinitionid"), - new SimpleEntry<>("DEPLOYMENTID","deploymentid"), - new SimpleEntry<>("ASSIGNEENAME","assigneename"), - new SimpleEntry<>("ASSIGNEE","assignee"), - new SimpleEntry<>("UPDATEUSER","updateuser"), - new SimpleEntry<>("UPDATETIME","updatetime"), - new SimpleEntry<>("FILEANNEX","fileannex"), - new SimpleEntry<>("GUIDANG","guidang"), - new SimpleEntry<>("CREATEUSER","createuser"), - new SimpleEntry<>("CREATEUSERNAME","createusername"), - new SimpleEntry<>("CREATEDATE","createdate"), - new SimpleEntry<>("USERID","userid"), - new SimpleEntry<>("USERNAME","username"), - new SimpleEntry<>("FROMTASKID","fromtaskid"), - new SimpleEntry<>("FROMTASKNAME","fromtaskname"), - new SimpleEntry<>("FROMUSERID","fromuserid"), - new SimpleEntry<>("FROMPROJECTID","fromprojectid"), - new SimpleEntry<>("FROMPLANID","fromplanid"), - new SimpleEntry<>("FROMUPTIME","fromuptime"), - new SimpleEntry<>("FROMSOURCEID","fromsourceid") + new SimpleEntry<>("ID","id"), + new SimpleEntry<>("OCPICTUREID","ocpictureid"), + new SimpleEntry<>("PICTURERESULT","pictureresult"), + new SimpleEntry<>("PICTURECOMPARE","picturecompare"), + new SimpleEntry<>("DEPTID","deptid"), + new SimpleEntry<>("TENANTID","tenantid"), + new SimpleEntry<>("PACKAGEID","packageid"), + new SimpleEntry<>("PICTUREID","pictureid"), + new SimpleEntry<>("CATEGORY","category"), + new SimpleEntry<>("CATEGORYID","categoryid"), + new SimpleEntry<>("SPECIFICATION","specification"), + new SimpleEntry<>("BUESSINESSNO","buessinessno"), + new SimpleEntry<>("STATES","states"), + new SimpleEntry<>("PROCESSINSTANCEID","processinstanceid"), + new SimpleEntry<>("PROCESSDEFINITIONID","processdefinitionid"), + new SimpleEntry<>("DEPLOYMENTID","deploymentid"), + new SimpleEntry<>("ASSIGNEENAME","assigneename"), + new SimpleEntry<>("ASSIGNEE","assignee"), + new SimpleEntry<>("UPDATEUSER","updateuser"), + new SimpleEntry<>("UPDATETIME","updatetime"), + new SimpleEntry<>("FILEANNEX","fileannex"), + new SimpleEntry<>("GUIDANG","guidang"), + new SimpleEntry<>("CREATEUSER","createuser"), + new SimpleEntry<>("CREATEUSERNAME","createusername"), + new SimpleEntry<>("CREATEDATE","createdate"), + new SimpleEntry<>("USERID","userid"), + new SimpleEntry<>("USERNAME","username"), + new SimpleEntry<>("FROMTASKID","fromtaskid"), + new SimpleEntry<>("FROMTASKNAME","fromtaskname"), + new SimpleEntry<>("FROMUSERID","fromuserid"), + new SimpleEntry<>("FROMPROJECTID","fromprojectid"), + new SimpleEntry<>("FROMPLANID","fromplanid"), + new SimpleEntry<>("FROMUPTIME","fromuptime"), + new SimpleEntry<>("FROMSOURCEID","fromsourceid"), + new SimpleEntry<>("HAVEPOINTS","havepoints") ) .collect(Collectors.toMap(SimpleEntry::getKey, SimpleEntry::getValue)); @Override diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/OcrTaskchildPictureService.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/OcrTaskchildPictureService.java index a8d972b6..4c21546c 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/OcrTaskchildPictureService.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/OcrTaskchildPictureService.java @@ -20,6 +20,20 @@ public interface OcrTaskchildPictureService extends BaseService listAll(String tenantId, String createUser, QueryWrapper queryWrapper); + /** + * 批量标记当前任务相似度为百分之百 + * @param taskids 任务主键 + * @return + */ + public boolean markPoint(List taskids); + + /** + * 查询智能识别 + * @param packageid 任务包主键 + * @return + */ + public List markpoint(String packageid); + /** * 判断任务是否已经审批 * @param formid 任务主键 diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/impl/OcrPictureServiceImpl.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/impl/OcrPictureServiceImpl.java index 070dd683..c58dfa56 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/impl/OcrPictureServiceImpl.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/impl/OcrPictureServiceImpl.java @@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.commons.lang3.StringUtils; +import org.apache.poi.hpsf.Decimal; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import cn.jyjz.xiaoyao.common.mybatisplus.base.BaseServiceImpl; @@ -33,6 +34,8 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.io.Serializable; +import java.math.BigDecimal; +import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -70,6 +73,9 @@ public class OcrPictureServiceImpl extends BaseServiceImpl pointsList = new ArrayList<>(); //图片信息不能为空 if(null != ocrPictureList && !ocrPictureList.isEmpty()){ //生成任务包 @@ -84,6 +90,8 @@ public class OcrPictureServiceImpl extends BaseServiceImpl newList = new ArrayList<>(); for(OcrPicture ocrPicture:ocrPictureList){ @@ -99,12 +107,16 @@ public class OcrPictureServiceImpl extends BaseServiceImpl picturecompareList = new ArrayList<>(); + boolean havePoint = false; //二次遍历进行比对 for(OcrPicture ocrPictureNext:ocrPictureList){ + if(ocrPictureNext.getId().longValue() == ocrPicture.getId().longValue()){ + continue; + } + //TODO 接口请求判断重复情况 - logService.addLog(103,"AI获取图片相似度接口", sysUser, "sendParams"); @@ -114,14 +126,25 @@ public class OcrPictureServiceImpl extends BaseServiceImpl 0){ diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/impl/OcrTaskchildPictureServiceImpl.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/impl/OcrTaskchildPictureServiceImpl.java index 860d7bae..d946dff5 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/impl/OcrTaskchildPictureServiceImpl.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/service/impl/OcrTaskchildPictureServiceImpl.java @@ -13,6 +13,7 @@ import cn.jyjz.xiaoyao.ocr.dataobject.OcrTaskchildPicture; import cn.jyjz.xiaoyao.ocr.service.OcrPictureService; import cn.jyjz.xiaoyao.ocr.service.OcrTaskchildPictureService; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.commons.lang3.StringUtils; @@ -226,6 +227,35 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl taskids){ + UpdateWrapper updateWrapper = new UpdateWrapper(); + updateWrapper.set("HAVEPOINTS",1); + updateWrapper.in("ID",taskids); + + return this.update(updateWrapper); + } + + /** + * 查询智能识别 + * @param packageid 任务包主键 + * @return + */ + public List markpoint(String packageid){ + QueryWrapper queryWrapperNew = new QueryWrapper<>(); + queryWrapperNew.eq("HAVEPOINTS","1"); + queryWrapperNew.eq("PACKAGEID",packageid); + + List list = this.ocrtaskchildpicturemybatisdao.selectList(queryWrapperNew); + this.formatTask(list,packageid); + + return list; + } + /** * 根据主键,查询图片详情 * @param fromid 任务主键 @@ -320,7 +350,19 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl iPage = this.page(page,queryWrapper); - for(OcrTaskchildPicture ocrTaskchildPicture:iPage.getRecords()){ + this.formatTask(iPage.getRecords(),packageid); + + + return iPage; + } + + /** + * 格式化显示数据 + * @param list + * @param packageid + */ + private void formatTask(List list,String packageid){ + for(OcrTaskchildPicture ocrTaskchildPicture:list){ //查询审批流节点信息 List taskList = iFlowTaskService.nowRunTask(ocrTaskchildPicture.getProcessinstanceid(),ocrTaskchildPicture.getProcessdefinitionid()); @@ -340,7 +382,7 @@ public class OcrTaskchildPictureServiceImpl extends BaseServiceImpl -// * 签名: -// *
    -// *
  1. 字符串编码: {@link StandardCharsets#UTF_8}
  2. -// *
  3. 签名算法:HmacSHA256
  4. -// *
  5. 密钥和盐合并格式: <密钥>#</密钥>
  6. -// *
  7. 密钥长度:128位
  8. -// *
  9. 密钥生成算法:SHA1PRNG
  10. -// *
  11. 签名参数按ASCII码升序排序,组成签名字符串:key1=value1&key2=&key3=value3…
  12. -// *
  13. 签名后均采用base64编码:{@link Base64#encodeBase64URLSafeString(byte[])}
  14. -// *
-// * -// * 加密: -// *
    -// *
  1. 字符串编码: {@link StandardCharsets#UTF_8}
  2. -// *
  3. 加密算法:AES;具体算法:AES/ECB/PKCS5Padding
  4. -// *
  5. 密钥和盐合并格式: <密钥>#</密钥>
  6. -// *
  7. 密钥长度:128位
  8. -// *
  9. 密钥生成算法:SHA1PRNG
  10. -// *
  11. 加密后均采用base64编码:{@link Base64#encodeBase64URLSafeString(byte[])}
  12. -// *
-// * -// * @author hdzhong -// * @date 2023/9/10 -// */ -//@Slf4j -//public class ApiHelper { -// -// /** -// * AES key algorithm: AES -// */ -// private static final String KEY_ALGORITHM = "AES"; -// /** -// * AES key length: 128 -// */ -// private static final int KEY_LENGTH = 128; -// /** -// * cipher algorithm: AES/ECB/PKCS5Padding -// */ -// private static final String CIPHER_ALGORITHM = "AES/ECB/PKCS5Padding"; -// -// /** -// * combine key and salt by: String.format("%s#%s", secretKey, salt) -// * -// * @param accessCode encrypt/decrypt key -// * @param salt salt append to key -// * @return combined key -// */ -// public static String combineSalt(String accessCode, String salt) { -// return String.format("%s#%s", accessCode, salt); -// } -// -// /** -// * verify whether the signature is correct -// * -// * @param accessCode encrypt/decrypt key -// * @param salt salt append to key -// * @param parameters parameter which to be signed -// * @param signature signature which will be verified -// * @return whether the signature is correct -// * @see #combineSalt(String, String) -// */ -// public static boolean verifySignature(String accessCode, String salt, -// Map parameters, String signature) { -// String sign = getSignature(combineSalt(accessCode, salt), parameters); -// -// return sign.equals(signature); -// } -// -// /** -// * verify whether the signature is correct -// * -// * @param accessCode encrypt/decrypt key -// * @param salt salt append to key -// * @param data encrypted data which to be signed -// * @param signature signature which will be verified -// * @return whether the signature is correct -// * @see #combineSalt(String, String) -// */ -// public static boolean verifySignature(String accessCode, String salt, -// String data, String signature) { -// String sign = getSignature(accessCode, salt, data); -// -// return sign.equals(signature); -// } -// -// /** -// * timestamp({@link RequestData#getTimestamp()}) & signature({@link RequestData#getSignature()}) -// * will be added to {@code parameters}. {@code data} will be encrypted. -// * -// * @param tenantCode tenant code -// * @param accessKey access key -// * @param accessCode access secret -// * @param parameters parameter which to be signed -// * @return encrypted data and signature -// * @throws Exception -// */ -// public static RequestData buildQueryRequest(String tenantCode, String accessKey, String accessCode, -// Map parameters) throws Exception { -// RequestData requestData = new RequestData(); -// -// // tenant code -// requestData.setTenantCode(tenantCode); -// // access key -// requestData.setAccessKey(accessKey); -// // parameter -// requestData.setParameters(parameters); -// -// // 1. do sign -// long timestamp = System.currentTimeMillis(); -// // timestamp -// requestData.setTimestamp(timestamp); -// -// String sign = getSignature(accessCode, String.valueOf(timestamp), parameters); -// requestData.setSignature(sign); -// -// return requestData; -// } -// -// /** -// * timestamp({@link RequestData#getTimestamp()}) & signature({@link RequestData#getSignature()}) -// * will be added to {@code parameters}. {@code data} will be encrypted. -// * -// * @param tenantCode tenant code -// * @param accessKey access key -// * @param accessCode access secret -// * @param accessCode encrypt/decrypt key -// * @param data request data which to be encrypted -// * @return encrypted data and signature -// * @throws Exception -// */ -// public static RequestData buildRequest(String tenantCode, String accessKey, String accessCode, -// T data) throws Exception { -// RequestData requestData = new RequestData(); -// -// // tenant code -// requestData.setTenantCode(tenantCode); -// // access key -// requestData.setAccessKey(accessKey); -// -// // timestamp -// long timestamp = System.currentTimeMillis(); -// requestData.setTimestamp(timestamp); -// -// // 1. convert data to json string -// String dataJson = null; -// if (data == null) { -// dataJson = ""; -// } else if (data instanceof String) { -// dataJson = (String) data; -// } else { -// ObjectMapper mapper = new ObjectMapper(); -// dataJson = mapper.writeValueAsString(data); -// } -// -// // 2. do encrypt -// String encryptedData = encrypt(accessCode, String.valueOf(timestamp), dataJson); -// requestData.setData(encryptedData); -// -// // 2. do sign -// // build query string for tenantCode & accessKey & encrypted data -// final StringBuilder builder = new StringBuilder(); -// Map map = new LinkedHashMap<>(); -// // append tenant code -// map.put("tenantCode", requestData.getTenantCode()); -// // append access key -// map.put("accessKey", requestData.getAccessKey()); -// -// String query = RequestData.buildQuery(map); -// -// // combine data -// String text = String.format("%s%s", query, requestData.getData()); -// -// String sign = getSignature(accessCode, String.valueOf(timestamp), text); -// requestData.setSignature(sign); -// -// return requestData; -// } -// -// /** -// * verify signature then decrypt {@link RequestData#getData()} -// * -// * @param accessCode access code -// * @param requestData request data which {@link RequestData#getData()} is encrypted -// * @return decrypted String -// * @throws Exception -// * @see #decryptRequest(String, RequestData, Class) -// */ -// public @Nullable static String decryptRequest(String accessCode, RequestData requestData) throws Exception { -// return decryptRequest(accessCode, requestData, String.class); -// } -// -// /** -// * verify signature then decrypt {@link RequestData#getData()} -// * -// * @param accessCode access code -// * @param requestData request data which {@link RequestData#getData()} is encrypted -// * @param clazz class use for {@link ObjectMapper#readValue(String, Class)} to convert JSON to object -// * @return decrypted Object -// * @throws Exception -// */ -// public @Nullable static T decryptRequest(String accessCode, RequestData requestData, -// Class clazz) throws Exception { -// String decrypedData = null; -// // 1. verify signature -// String timestamp = String.valueOf(requestData.getTimestamp()); -// -// // build query string for tenantCode & accessKey & encrypted data -// final StringBuilder builder = new StringBuilder(); -// Map map = new LinkedHashMap<>(); -// // append tenant code -// map.put("tenantCode", requestData.getTenantCode()); -// // append access key -// map.put("accessKey", requestData.getAccessKey()); -// -// String query = RequestData.buildQuery(map); -// -// // combine data -// String text = String.format("%s%s", query, requestData.getData()); -// -// if (!verifySignature(accessCode, timestamp, text, requestData.getSignature())) { -// throw new Exception(String.format("illegal signature: %s", requestData.getSignature())); -// } -// -// // 2. do decrypt -// byte[] bytes = decrypt(accessCode, timestamp, requestData.getData()); -// if (bytes != null) { -// decrypedData = new String(bytes, StandardCharsets.UTF_8); -// } -// -// // 3. convert to object -// if (clazz.equals(String.class)) { -// return (T) decrypedData; -// } -// ObjectMapper mapper = new ObjectMapper(); -// -// return mapper.readValue(decrypedData, clazz); -// } -// -// /** -// * do sign with salt -// *
    -// *
  1. combine key and salt by {@link #combineSalt(String, String)}
  2. -// *
  3. invoke {@link #getSignature(String, Map)}
  4. -// *
-// * -// * @param accessCode encrypt/decrypt key -// * @param salt salt append to key -// * @param parameters parameter which to be signed -// * @return {@link #getSignature(String, Map)} -// */ -// public static String getSignature(String accessCode, String salt, Map parameters) { -// return getSignature(combineSalt(accessCode, salt), parameters); -// } -// -// /** -// * do sign without salt -// *
    -// *
  1. build message by {@link #buildMessage(Map)}
  2. -// *
  3. do sign by "HmacSHA256" algorithm: {@link Mac#getInstance(String)}
  4. -// *
  5. encode signature by base64 with URL safe character: {@link Base64#encodeBase64URLSafeString(byte[])}
  6. -// *
-// * -// * @param secretKey encrypt/decrypt key -// * @param parameters parameter which to be signed -// * @return signature -// */ -// public static String getSignature(String secretKey, Map parameters) { -// if (parameters.isEmpty()) { -// throw new RuntimeException("parameters are empty"); -// } -// // 1. sort parameters to string -// String message = buildMessage(parameters); -// if (log.isInfoEnabled()) { -// log.debug("signature for message: {}", message); -// } -// -// // 2. do sign -// return getSignature(secretKey, message); -// } -// -// /** -// * do sign with salt -// *
    -// *
  1. combine key and salt by {@link #combineSalt(String, String)}
  2. -// *
  3. invoke {@link #getSignature(String, String)}
  4. -// *
-// * -// * @param accessCode encrypt/decrypt key -// * @param salt salt append to key -// * @param data encrypted data which to be signed -// * @return signature -// * @see #getSignature(String, String) -// */ -// public static String getSignature(String accessCode, String salt, String data) { -// return getSignature(combineSalt(accessCode, salt), data); -// } -// -// /** -// * sign {@code data} -// * -// * @param secretKey encrypt/decrypt key -// * @param data encrypted data which to be signed -// * @return signature -// * @see #getSignature(String, String, Map) -// * @see #buildMessage(Map) -// */ -// public static String getSignature(String secretKey, String data) { -// if (data == null ) { -// return null; -// } -// -// try { -// Mac mac = Mac.getInstance("HmacSHA256"); -// SecretKeySpec keySpec = new SecretKeySpec(secretKey.getBytes(), "HmacSHA256"); -// mac.init(keySpec); -// byte[] result = mac.doFinal(data.getBytes()); -// -// // 3. to base64 string -// return Base64.encodeBase64URLSafeString(result); -// } catch (Exception e) { -// throw new RuntimeException(e.getMessage()); -// } -// } -// -// /** -// * sort parameters then combine to query string -// *
    -// *
  1. sort parameters' keys ASCII ASC by {@link Collections#sort(List)}
  2. -// *
  3. combine to query string: key1=value1&key2=value2
  4. -// *
-// * -// * @param parameters parameter which to be signed -// * @return query string for parameters -// */ -// public static String buildMessage(Map parameters) { -// Collection keys = parameters.keySet(); -// List keyList = new ArrayList<>(keys); -// // sort parameters by ASCII ASC -// Collections.sort(keyList); -// StringBuilder builder = new StringBuilder(); -// for (String k : keyList) { -// String v = parameters.get(k); -// if (v == null) { -// v = ""; -// } -// if (builder.length() > 0) { -// builder.append("&"); -// } -// builder.append(k).append("=").append(v); -// } -// return builder.toString(); -// } -// -// /** -// * encrypt data then do sign -// * -// * @param accessCode access code -// * @param data data which to be encrypted -// * @return ResultData with encrypted data & signature -// * @throws Exception -// */ -// public static ResultData buildResponse(String accessCode, T data) throws Exception { -// ResultData result = ResultData.success(); -// -// // 1. convert data to json string -// String dataJson = null; -// if (data == null) { -// dataJson = ""; -// } else if (data instanceof String) { -// dataJson = (String) data; -// } else { -// ObjectMapper mapper = new ObjectMapper(); -// dataJson = mapper.writeValueAsString(data); -// } -// -// // 2. do encrypt -// String timestamp = String.valueOf(result.getTimestamp()); -// String encryptedData = encrypt(accessCode, timestamp, dataJson); -// result.setData(encryptedData); -// -// // 3. do signature -// String signature = getSignature(accessCode, timestamp, encryptedData); -// result.setSignature(signature); -// -// // message -// return result; -// } -// -// /** -// * do verify signature then decrypt -// * -// * @param accessCode access code -// * @param resultData {@link ResultData} which to be decrypted -// * @return decrypted string -// * @throws Exception -// * @see #decryptResponse(String, ResultData, Class) -// */ -// public @Nullable static String decryptResponse(String accessCode, ResultData resultData) throws Exception { -// return decryptResponse(accessCode, resultData, String.class); -// } -// -// /** -// * do verify signature then decrypt -// * -// * @param accessCode access code -// * @param resultData {@link ResultData} which to be decrypted -// * @param clazz class use for {@link ObjectMapper#readValue(String, Class)} to convert JSON to object -// * @return decrypted string -// * @throws Exception -// */ -// public @Nullable static T decryptResponse(String accessCode, ResultData resultData, -// Class clazz) throws Exception { -// String decrypedData = null; -// // 1. verify signature -// String timestamp = String.valueOf(resultData.getTimestamp()); -// if (!verifySignature(accessCode, timestamp, resultData.getData(), resultData.getSignature())) { -// throw new Exception(String.format("illegal signature: %s", resultData.getSignature())); -// } -// -// // 2. do decrypt -// byte[] bytes = decrypt(accessCode, timestamp, resultData.getData()); -// if (bytes != null) { -// decrypedData = new String(bytes, StandardCharsets.UTF_8); -// } -// -// // 3. convert to object -// if (clazz.equals(String.class)) { -// return (T) decrypedData; -// } -// ObjectMapper mapper = new ObjectMapper(); -// -// return mapper.readValue(decrypedData, clazz); -// } -// -// /** -// * do AES encrypt -// * -// *
    -// *
  1. combine key and salt by {@link #combineSalt(String, String)}
  2. -// *
  3. invoke {@link #encrypt(String, String)}
  4. -// *
-// * -// * @param accessCode encrypt/decrypt key -// * @param salt salt append to key -// * @param data data which will be encrypted -// * @return base64 string of AES encrypted data -// * @throws Exception -// * @see #combineSalt(String, String) -// * @see #encrypt(String, String) -// */ -// public @Nullable static String encrypt(String accessCode, String salt, String data) throws Exception { -// return encrypt(combineSalt(accessCode, salt), data); -// } -// -// /** -// * encrypt data without salt -// * -// * @param secretKey encrypt/decrypt key -// * @param data data which will be encrypted -// * @return base64 string of AES encrypted data -// * @throws Exception -// * @see #encrypt(String, byte[]) -// */ -// public @Nullable static String encrypt(String secretKey, String data) throws Exception { -// if (data == null) { -// return null; -// } -// -// return encrypt(secretKey, data.getBytes(StandardCharsets.UTF_8)); -// } -// -// /** -// * do AES encrypt -// * -// *
    -// *
  1. combine key and salt by {@link #combineSalt(String, String)}
  2. -// *
  3. invoke {@link #encrypt(String, byte[])}
  4. -// *
-// * -// * @param accessCode encrypt/decrypt key -// * @param salt salt append to key -// * @param data data which will be encrypted -// * @return base64 string of AES encrypted data -// * @throws Exception -// * @see #combineSalt(String, String) -// * @see #encrypt(String, byte[]) -// */ -// public @Nullable static String encrypt(String accessCode, String salt, byte[] data) throws Exception { -// return encrypt(combineSalt(accessCode, salt), data); -// } -// -// /** -// *
    -// *
  1. generate secret key by {@link #getSecretKey(String)}
  2. -// *
  3. do AES encrypt
  4. -// *
  5. convert ot base64 string {@link Base64#encodeBase64URLSafeString(byte[])}
  6. -// *
-// * -// * @param secretKey encrypt/decrypt key -// * @param data data which will be encrypted -// * @return base64 string of AES encrypted data -// * @throws Exception -// */ -// public @Nullable static String encrypt(String secretKey, byte[] data) throws Exception { -// if (data == null) { -// return null; -// } -// if (log.isInfoEnabled()) { -// log.debug("encrypt for data: {}", new String(data, StandardCharsets.UTF_8)); -// } -// // 创建密码器 -// Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); -// -// // 初始化为加密模式的密码器 -// cipher.init(Cipher.ENCRYPT_MODE, getSecretKey(secretKey)); -// -// byte[] result = cipher.doFinal(data); -// -// // base64 encode -// String base64 = Base64.encodeBase64URLSafeString(result); -// -// if (log.isInfoEnabled()) { -// log.debug("encrypted: {}", base64); -// } -// return base64; -// } -// -// -// /** -// * do AES decrypt -// * -// *
    -// *
  1. combine key and salt by {@link #combineSalt(String, String)}
  2. -// *
  3. invoke {@link #decrypt(String, String)}
  4. -// *
-// * -// * @param accessCode encrypt/decrypt key -// * @param salt salt append to key -// * @param data data which will be decrypted -// * @return decrypted data -// * @throws Exception -// * @see #combineSalt(String, String) -// * @see #decrypt(String, String) -// */ -// public @Nullable static byte[] decrypt(String accessCode, String salt, String data) throws Exception { -// return decrypt(combineSalt(accessCode, salt), data); -// } -// -// /** -// *
    -// *
  1. generate secret key by {@link #getSecretKey(String)}
  2. -// *
  3. decode base64 string of {@code data} by: {@link Base64#decodeBase64(byte[])}
  4. -// *
  5. do decrypt
  6. -// *
-// * -// * @param secretKey encrypt/decrypt key -// * @param data data which will be decrypted -// * @return decrypted data -// * @throws Exception -// * @see #encrypt(String, byte[]) -// */ -// public @Nullable static byte[] decrypt(String secretKey, String data) throws Exception { -// if (data == null) { -// return null; -// } -// -// if (log.isInfoEnabled()) { -// log.debug("decrypt for data: {}", data); -// } -// -// // 创建密码器 -// Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); -// -// // 初始化为解密模式的密码器 -// cipher.init(Cipher.DECRYPT_MODE, getSecretKey(secretKey)); -// -// // base64 decode -// byte[] bytes = Base64.decodeBase64(data.getBytes(StandardCharsets.UTF_8)); -// -// byte[] result = cipher.doFinal(bytes); -// -// return result; -// } -// -// /** -// * generate key spec. -// *
    -// *
  1. create {@link SecureRandom} of "SHA1PRNG": {@link SecureRandom#getInstance(String)}
  2. -// *
  3. create {@link #KEY_LENGTH} bits key generator of {@link #KEY_ALGORITHM}: {@link KeyGenerator#getInstance(String)}
  4. -// *
  5. generate key spec of {@link #CIPHER_ALGORITHM}: {@link SecretKeySpec}
  6. -// *
-// * -// * @return {@link SecretKeySpec} -// */ -// private static SecretKeySpec getSecretKey(final String secretKey) throws NoSuchAlgorithmException { -// // 返回生成指定算法密钥生成器的 KeyGenerator 对象 -// KeyGenerator kg = null; -// -// kg = KeyGenerator.getInstance(KEY_ALGORITHM); -// -// // AES 要求密钥长度为 128 -// SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG"); -// secureRandom.setSeed(secretKey.getBytes()); -// kg.init(KEY_LENGTH, secureRandom); -// -// // 生成一个密钥 -// SecretKey key = kg.generateKey(); -// -// // 转换为AES专用密钥 -// return new SecretKeySpec(key.getEncoded(), KEY_ALGORITHM); -// } -//} +package cn.jyjz.xiaoyao.ocr.util; + +import com.fasterxml.jackson.databind.ObjectMapper; + +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.codec.binary.Base64; +import org.springframework.lang.Nullable; + +import javax.crypto.Cipher; +import javax.crypto.KeyGenerator; +import javax.crypto.Mac; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; +import java.math.BigDecimal; +import java.nio.charset.StandardCharsets; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.util.*; + +/** + * openapi工具类,包括签名、加密算法等。
+ * 签名: + *
    + *
  1. 字符串编码: {@link StandardCharsets#UTF_8}
  2. + *
  3. 签名算法:HmacSHA256
  4. + *
  5. 密钥和盐合并格式: <密钥>#</密钥>
  6. + *
  7. 密钥长度:128位
  8. + *
  9. 密钥生成算法:SHA1PRNG
  10. + *
  11. 签名参数按ASCII码升序排序,组成签名字符串:key1=value1&key2=&key3=value3…
  12. + *
  13. 签名后均采用base64编码:{@link Base64#encodeBase64URLSafeString(byte[])}
  14. + *
+ * + * 加密: + *
    + *
  1. 字符串编码: {@link StandardCharsets#UTF_8}
  2. + *
  3. 加密算法:AES;具体算法:AES/ECB/PKCS5Padding
  4. + *
  5. 密钥和盐合并格式: <密钥>#</密钥>
  6. + *
  7. 密钥长度:128位
  8. + *
  9. 密钥生成算法:SHA1PRNG
  10. + *
  11. 加密后均采用base64编码:{@link Base64#encodeBase64URLSafeString(byte[])}
  12. + *
+ * + * @author hdzhong + * @date 2023/9/10 + */ +@Slf4j +public class ApiHelper { + + /** + * AES key algorithm: AES + */ + private static final String KEY_ALGORITHM = "AES"; + /** + * AES key length: 128 + */ + private static final int KEY_LENGTH = 128; + /** + * cipher algorithm: AES/ECB/PKCS5Padding + */ + private static final String CIPHER_ALGORITHM = "AES/ECB/PKCS5Padding"; + + /** + * combine key and salt by: String.format("%s#%s", secretKey, salt) + * + * @param accessCode encrypt/decrypt key + * @param salt salt append to key + * @return combined key + */ + public static String combineSalt(String accessCode, String salt) { + return String.format("%s#%s", accessCode, salt); + } + + /** + * verify whether the signature is correct + * + * @param accessCode encrypt/decrypt key + * @param salt salt append to key + * @param parameters parameter which to be signed + * @param signature signature which will be verified + * @return whether the signature is correct + * @see #combineSalt(String, String) + */ + public static boolean verifySignature(String accessCode, String salt, + Map parameters, String signature) { + String sign = getSignature(combineSalt(accessCode, salt), parameters); + + return sign.equals(signature); + } + + /** + * verify whether the signature is correct + * + * @param accessCode encrypt/decrypt key + * @param salt salt append to key + * @param data encrypted data which to be signed + * @param signature signature which will be verified + * @return whether the signature is correct + * @see #combineSalt(String, String) + */ + public static boolean verifySignature(String accessCode, String salt, + String data, String signature) { + String sign = getSignature(accessCode, salt, data); + + return sign.equals(signature); + } + + /** + * timestamp({@link RequestData#getTimestamp()}) & signature({@link RequestData#getSignature()}) + * will be added to {@code parameters}. {@code data} will be encrypted. + * + * @param tenantCode tenant code + * @param accessKey access key + * @param accessCode access secret + * @param parameters parameter which to be signed + * @return encrypted data and signature + * @throws Exception + */ + public static RequestData buildQueryRequest(String tenantCode, String accessKey, String accessCode, + Map parameters) throws Exception { + RequestData requestData = new RequestData(); + + // tenant code + requestData.setTenantCode(tenantCode); + // access key + requestData.setAccessKey(accessKey); + // parameter + requestData.setParameters(parameters); + + // 1. do sign + long timestamp = System.currentTimeMillis(); + // timestamp + requestData.setTimestamp(timestamp); + + String sign = getSignature(accessCode, String.valueOf(timestamp), parameters); + requestData.setSignature(sign); + + return requestData; + } + + /** + * timestamp({@link RequestData#getTimestamp()}) & signature({@link RequestData#getSignature()}) + * will be added to {@code parameters}. {@code data} will be encrypted. + * + * @param tenantCode tenant code + * @param accessKey access key + * @param accessCode access secret + * @param accessCode encrypt/decrypt key + * @param data request data which to be encrypted + * @return encrypted data and signature + * @throws Exception + */ + public static RequestData buildRequest(String tenantCode, String accessKey, String accessCode, + T data) throws Exception { + RequestData requestData = new RequestData(); + + // tenant code + requestData.setTenantCode(tenantCode); + // access key + requestData.setAccessKey(accessKey); + + // timestamp + long timestamp = System.currentTimeMillis(); + requestData.setTimestamp(timestamp); + + // 1. convert data to json string + String dataJson = null; + if (data == null) { + dataJson = ""; + } else if (data instanceof String) { + dataJson = (String) data; + } else { + ObjectMapper mapper = new ObjectMapper(); + dataJson = mapper.writeValueAsString(data); + } + + // 2. do encrypt + String encryptedData = encrypt(accessCode, String.valueOf(timestamp), dataJson); + requestData.setData(encryptedData); + + // 2. do sign + // build query string for tenantCode & accessKey & encrypted data + final StringBuilder builder = new StringBuilder(); + Map map = new LinkedHashMap<>(); + // append tenant code + map.put("tenantCode", requestData.getTenantCode()); + // append access key + map.put("accessKey", requestData.getAccessKey()); + + String query = RequestData.buildQuery(map); + + // combine data + String text = String.format("%s%s", query, requestData.getData()); + + String sign = getSignature(accessCode, String.valueOf(timestamp), text); + requestData.setSignature(sign); + + return requestData; + } + + /** + * verify signature then decrypt {@link RequestData#getData()} + * + * @param accessCode access code + * @param requestData request data which {@link RequestData#getData()} is encrypted + * @return decrypted String + * @throws Exception + * @see #decryptRequest(String, RequestData, Class) + */ + public @Nullable static String decryptRequest(String accessCode, RequestData requestData) throws Exception { + return decryptRequest(accessCode, requestData, String.class); + } + + /** + * verify signature then decrypt {@link RequestData#getData()} + * + * @param accessCode access code + * @param requestData request data which {@link RequestData#getData()} is encrypted + * @param clazz class use for {@link ObjectMapper#readValue(String, Class)} to convert JSON to object + * @return decrypted Object + * @throws Exception + */ + public @Nullable static T decryptRequest(String accessCode, RequestData requestData, + Class clazz) throws Exception { + String decrypedData = null; + // 1. verify signature + String timestamp = String.valueOf(requestData.getTimestamp()); + + // build query string for tenantCode & accessKey & encrypted data + final StringBuilder builder = new StringBuilder(); + Map map = new LinkedHashMap<>(); + // append tenant code + map.put("tenantCode", requestData.getTenantCode()); + // append access key + map.put("accessKey", requestData.getAccessKey()); + + String query = RequestData.buildQuery(map); + + // combine data + String text = String.format("%s%s", query, requestData.getData()); + + if (!verifySignature(accessCode, timestamp, text, requestData.getSignature())) { + throw new Exception(String.format("illegal signature: %s", requestData.getSignature())); + } + + // 2. do decrypt + byte[] bytes = decrypt(accessCode, timestamp, requestData.getData()); + if (bytes != null) { + decrypedData = new String(bytes, StandardCharsets.UTF_8); + } + + // 3. convert to object + if (clazz.equals(String.class)) { + return (T) decrypedData; + } + ObjectMapper mapper = new ObjectMapper(); + + return mapper.readValue(decrypedData, clazz); + } + + /** + * do sign with salt + *
    + *
  1. combine key and salt by {@link #combineSalt(String, String)}
  2. + *
  3. invoke {@link #getSignature(String, Map)}
  4. + *
+ * + * @param accessCode encrypt/decrypt key + * @param salt salt append to key + * @param parameters parameter which to be signed + * @return {@link #getSignature(String, Map)} + */ + public static String getSignature(String accessCode, String salt, Map parameters) { + return getSignature(combineSalt(accessCode, salt), parameters); + } + + /** + * do sign without salt + *
    + *
  1. build message by {@link #buildMessage(Map)}
  2. + *
  3. do sign by "HmacSHA256" algorithm: {@link Mac#getInstance(String)}
  4. + *
  5. encode signature by base64 with URL safe character: {@link Base64#encodeBase64URLSafeString(byte[])}
  6. + *
+ * + * @param secretKey encrypt/decrypt key + * @param parameters parameter which to be signed + * @return signature + */ + public static String getSignature(String secretKey, Map parameters) { + if (parameters.isEmpty()) { + throw new RuntimeException("parameters are empty"); + } + // 1. sort parameters to string + String message = buildMessage(parameters); + if (log.isInfoEnabled()) { + log.debug("signature for message: {}", message); + } + + // 2. do sign + return getSignature(secretKey, message); + } + + /** + * do sign with salt + *
    + *
  1. combine key and salt by {@link #combineSalt(String, String)}
  2. + *
  3. invoke {@link #getSignature(String, String)}
  4. + *
+ * + * @param accessCode encrypt/decrypt key + * @param salt salt append to key + * @param data encrypted data which to be signed + * @return signature + * @see #getSignature(String, String) + */ + public static String getSignature(String accessCode, String salt, String data) { + return getSignature(combineSalt(accessCode, salt), data); + } + + /** + * sign {@code data} + * + * @param secretKey encrypt/decrypt key + * @param data encrypted data which to be signed + * @return signature + * @see #getSignature(String, String, Map) + * @see #buildMessage(Map) + */ + public static String getSignature(String secretKey, String data) { + if (data == null ) { + return null; + } + + try { + Mac mac = Mac.getInstance("HmacSHA256"); + SecretKeySpec keySpec = new SecretKeySpec(secretKey.getBytes(), "HmacSHA256"); + mac.init(keySpec); + byte[] result = mac.doFinal(data.getBytes()); + + // 3. to base64 string + return Base64.encodeBase64URLSafeString(result); + } catch (Exception e) { + throw new RuntimeException(e.getMessage()); + } + } + + /** + * sort parameters then combine to query string + *
    + *
  1. sort parameters' keys ASCII ASC by {@link Collections#sort(List)}
  2. + *
  3. combine to query string: key1=value1&key2=value2
  4. + *
+ * + * @param parameters parameter which to be signed + * @return query string for parameters + */ + public static String buildMessage(Map parameters) { + Collection keys = parameters.keySet(); + List keyList = new ArrayList<>(keys); + // sort parameters by ASCII ASC + Collections.sort(keyList); + StringBuilder builder = new StringBuilder(); + for (String k : keyList) { + String v = parameters.get(k); + if (v == null) { + v = ""; + } + if (builder.length() > 0) { + builder.append("&"); + } + builder.append(k).append("=").append(v); + } + return builder.toString(); + } + + /** + * encrypt data then do sign + * + * @param accessCode access code + * @param data data which to be encrypted + * @return ResultData with encrypted data & signature + * @throws Exception + */ + public static ResultData buildResponse(String accessCode, T data) throws Exception { + ResultData result = ResultData.success(); + + // 1. convert data to json string + String dataJson = null; + if (data == null) { + dataJson = ""; + } else if (data instanceof String) { + dataJson = (String) data; + } else { + ObjectMapper mapper = new ObjectMapper(); + dataJson = mapper.writeValueAsString(data); + } + + // 2. do encrypt + String timestamp = String.valueOf(result.getTimestamp()); + String encryptedData = encrypt(accessCode, timestamp, dataJson); + result.setData(encryptedData); + + // 3. do signature + String signature = getSignature(accessCode, timestamp, encryptedData); + result.setSignature(signature); + + // message + return result; + } + + /** + * do verify signature then decrypt + * + * @param accessCode access code + * @param resultData {@link ResultData} which to be decrypted + * @return decrypted string + * @throws Exception + * @see #decryptResponse(String, ResultData, Class) + */ + public @Nullable static String decryptResponse(String accessCode, ResultData resultData) throws Exception { + return decryptResponse(accessCode, resultData, String.class); + } + + /** + * do verify signature then decrypt + * + * @param accessCode access code + * @param resultData {@link ResultData} which to be decrypted + * @param clazz class use for {@link ObjectMapper#readValue(String, Class)} to convert JSON to object + * @return decrypted string + * @throws Exception + */ + public @Nullable static T decryptResponse(String accessCode, ResultData resultData, + Class clazz) throws Exception { + String decrypedData = null; + // 1. verify signature + String timestamp = String.valueOf(resultData.getTimestamp()); + if (!verifySignature(accessCode, timestamp, resultData.getData(), resultData.getSignature())) { + throw new Exception(String.format("illegal signature: %s", resultData.getSignature())); + } + + // 2. do decrypt + byte[] bytes = decrypt(accessCode, timestamp, resultData.getData()); + if (bytes != null) { + decrypedData = new String(bytes, StandardCharsets.UTF_8); + } + + // 3. convert to object + if (clazz.equals(String.class)) { + return (T) decrypedData; + } + ObjectMapper mapper = new ObjectMapper(); + + return mapper.readValue(decrypedData, clazz); + } + + /** + * do AES encrypt + * + *
    + *
  1. combine key and salt by {@link #combineSalt(String, String)}
  2. + *
  3. invoke {@link #encrypt(String, String)}
  4. + *
+ * + * @param accessCode encrypt/decrypt key + * @param salt salt append to key + * @param data data which will be encrypted + * @return base64 string of AES encrypted data + * @throws Exception + * @see #combineSalt(String, String) + * @see #encrypt(String, String) + */ + public @Nullable static String encrypt(String accessCode, String salt, String data) throws Exception { + return encrypt(combineSalt(accessCode, salt), data); + } + + /** + * encrypt data without salt + * + * @param secretKey encrypt/decrypt key + * @param data data which will be encrypted + * @return base64 string of AES encrypted data + * @throws Exception + * @see #encrypt(String, byte[]) + */ + public @Nullable static String encrypt(String secretKey, String data) throws Exception { + if (data == null) { + return null; + } + + return encrypt(secretKey, data.getBytes(StandardCharsets.UTF_8)); + } + + /** + * do AES encrypt + * + *
    + *
  1. combine key and salt by {@link #combineSalt(String, String)}
  2. + *
  3. invoke {@link #encrypt(String, byte[])}
  4. + *
+ * + * @param accessCode encrypt/decrypt key + * @param salt salt append to key + * @param data data which will be encrypted + * @return base64 string of AES encrypted data + * @throws Exception + * @see #combineSalt(String, String) + * @see #encrypt(String, byte[]) + */ + public @Nullable static String encrypt(String accessCode, String salt, byte[] data) throws Exception { + return encrypt(combineSalt(accessCode, salt), data); + } + + /** + *
    + *
  1. generate secret key by {@link #getSecretKey(String)}
  2. + *
  3. do AES encrypt
  4. + *
  5. convert ot base64 string {@link Base64#encodeBase64URLSafeString(byte[])}
  6. + *
+ * + * @param secretKey encrypt/decrypt key + * @param data data which will be encrypted + * @return base64 string of AES encrypted data + * @throws Exception + */ + public @Nullable static String encrypt(String secretKey, byte[] data) throws Exception { + if (data == null) { + return null; + } + if (log.isInfoEnabled()) { + log.debug("encrypt for data: {}", new String(data, StandardCharsets.UTF_8)); + } + // 创建密码器 + Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); + + // 初始化为加密模式的密码器 + cipher.init(Cipher.ENCRYPT_MODE, getSecretKey(secretKey)); + + byte[] result = cipher.doFinal(data); + + // base64 encode + String base64 = Base64.encodeBase64URLSafeString(result); + + if (log.isInfoEnabled()) { + log.debug("encrypted: {}", base64); + } + return base64; + } + + + /** + * do AES decrypt + * + *
    + *
  1. combine key and salt by {@link #combineSalt(String, String)}
  2. + *
  3. invoke {@link #decrypt(String, String)}
  4. + *
+ * + * @param accessCode encrypt/decrypt key + * @param salt salt append to key + * @param data data which will be decrypted + * @return decrypted data + * @throws Exception + * @see #combineSalt(String, String) + * @see #decrypt(String, String) + */ + public @Nullable static byte[] decrypt(String accessCode, String salt, String data) throws Exception { + return decrypt(combineSalt(accessCode, salt), data); + } + + /** + *
    + *
  1. generate secret key by {@link #getSecretKey(String)}
  2. + *
  3. decode base64 string of {@code data} by: {@link Base64#decodeBase64(byte[])}
  4. + *
  5. do decrypt
  6. + *
+ * + * @param secretKey encrypt/decrypt key + * @param data data which will be decrypted + * @return decrypted data + * @throws Exception + * @see #encrypt(String, byte[]) + */ + public @Nullable static byte[] decrypt(String secretKey, String data) throws Exception { + if (data == null) { + return null; + } + + if (log.isInfoEnabled()) { + log.debug("decrypt for data: {}", data); + } + + // 创建密码器 + Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); + + // 初始化为解密模式的密码器 + cipher.init(Cipher.DECRYPT_MODE, getSecretKey(secretKey)); + + // base64 decode + byte[] bytes = Base64.decodeBase64(data.getBytes(StandardCharsets.UTF_8)); + + byte[] result = cipher.doFinal(bytes); + + return result; + } + + /** + * generate key spec. + *
    + *
  1. create {@link SecureRandom} of "SHA1PRNG": {@link SecureRandom#getInstance(String)}
  2. + *
  3. create {@link #KEY_LENGTH} bits key generator of {@link #KEY_ALGORITHM}: {@link KeyGenerator#getInstance(String)}
  4. + *
  5. generate key spec of {@link #CIPHER_ALGORITHM}: {@link SecretKeySpec}
  6. + *
+ * + * @return {@link SecretKeySpec} + */ + private static SecretKeySpec getSecretKey(final String secretKey) throws NoSuchAlgorithmException { + // 返回生成指定算法密钥生成器的 KeyGenerator 对象 + KeyGenerator kg = null; + + kg = KeyGenerator.getInstance(KEY_ALGORITHM); + + // AES 要求密钥长度为 128 + SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG"); + secureRandom.setSeed(secretKey.getBytes()); + kg.init(KEY_LENGTH, secureRandom); + + // 生成一个密钥 + SecretKey key = kg.generateKey(); + + // 转换为AES专用密钥 + return new SecretKeySpec(key.getEncoded(), KEY_ALGORITHM); + } + + public static void main(String arg[]){ + + BigDecimal b1 = new BigDecimal("42.29"); + BigDecimal b2 = new BigDecimal("100"); + int val = b1.compareTo(b2); + //租户编码(租户no:tenantNo) + String tenantCode = "123"; + //访问key + String accessKey = "key"; + //访问密钥 + String accessCode = ""; + //请求参数 + Map queryParam = new HashMap<>(); + queryParam.put("key1", "111"); + try { + RequestData requestData = ApiHelper.buildQueryRequest("tenantCode", "accessKey", "accessCode", queryParam); + + System.out.println(requestData.getData()); + + } catch (Exception e) { + throw new RuntimeException(e); + } + + + RequestData requestData = null; + try { + requestData = ApiHelper.buildRequest("tenantCode", "accessKey", "accessCode", queryParam); + } catch (Exception e) { + throw new RuntimeException(e); + } + + System.out.println(requestData.getData()); + + + ResultData resultData = new ResultData<>(); // 实际返回对象 + + String data = null; + try { + data = ApiHelper.decryptResponse("accessCode", resultData); + } catch (Exception e) { + throw new RuntimeException(e); + } + System.out.println(data); + } +} diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/util/RequestData.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/util/RequestData.java index c18b7daf..3508112d 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/util/RequestData.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/util/RequestData.java @@ -1,176 +1,176 @@ -//package cn.jyjz.xiaoyao.ocr.util; -// -//import com.fasterxml.jackson.core.JsonProcessingException; -//import com.fasterxml.jackson.databind.ObjectMapper; -//import io.swagger.annotations.ApiModel; -//import io.swagger.annotations.ApiModelProperty; -//import lombok.Data; -//import org.springframework.util.StringUtils; -// -//import java.io.Serializable; -//import java.io.UnsupportedEncodingException; -//import java.net.URLEncoder; -//import java.nio.charset.StandardCharsets; -//import java.util.LinkedHashMap; -//import java.util.Map; -// -///** -// *
    -// *
  1. -// * GET/DELETE请求:Query String -// * 参考:{@link } -// *
  2. -// *
  3. -// * POST/PATCH/PUT请求:JSON格式请求体 -// *
    -// *   {
    -// *    "tenantCode": “syxy”,
    -// *    "accessKey": "syncuser",
    -// *    "data": {
    -// *      // 加密的业务数据
    -// *    },
    -// *    "timestamp": 1689837406368,
    -// *    "signature": "eUk5kY-xR6XMjzjJRrl2T3EE_c5wztJNvdNWEY3vxfo"
    -// *   }
    -// * 
    -// * 参考:{@link #toString()} -// *
  4. -// *
-// * @author hdzhong -// * @date 2023/9/20 -// */ -//@Data -//@ApiModel(value = "请求统一Query/JSON封装",description = "接口统一请求报文") -//public class RequestData implements Serializable { -// public final static String TIMESTAMP = "_timestamp"; -// public final static String SIGNATURE = "_signature"; -// -// /** -// * URL的Query参数 -// */ -// @ApiModelProperty(value = "Query参数") -// private Map parameters; -// /** -// * 租户代码 -// */ -// @ApiModelProperty(value = "租户代码") -// private String tenantCode; -// /** -// * 访问标识 -// */ -// @ApiModelProperty(value = "访问标识") -// private String accessKey; -// /** -// * 进行加密后的业务数据 -// * @see cn.jyjz.xiaoyao.ocr.util.ApiHelper#encrypt(String, String, String) -// */ -// @ApiModelProperty(value = "加密的请求数据") -// private String data; -// /** -// * 请求时间戳,作为签名、加密的随机盐(Salt) -// * @see cn.jyjz.xiaoyao.ocr.util.ApiHelper # combineSalt(String, String) -// */ -// @ApiModelProperty(value = "请求时间戳") -// private long timestamp ; -// /** -// * 数据签名 -// * @see cn.jyjz.xiaoyao.ocr.util.ApiHelper # getSignature(String, String, Map) -// */ -// @ApiModelProperty(value = "数据签名") -// private String signature; -// -// /** -// *
-//     * {
-//     *  "tenantCode": “syxy”,
-//     *  "accessKey": "syncuser",
-//     *  "data": {
-//     *    // 加密的业务数据
-//     *  },
-//     *  "timestamp": 1689837406368,
-//     *  "signature": "eUk5kY-xR6XMjzjJRrl2T3EE_c5wztJNvdNWEY3vxfo"
-//     * }
-//     * 
-// * @return JSON string -// */ -// @Override -// public String toString() { -// ObjectMapper objectMapper = new ObjectMapper(); -// Map map = new LinkedHashMap<>(); -// // tenant code -// map.put("tenantCode", tenantCode); -// // access key -// map.put("accessKey", accessKey); -// // data -// map.put("data", data); -// // timestamp -// map.put("timestamp", timestamp); -// // signature -// map.put("signature", signature); -// -// // return json -// try { -// return objectMapper.writeValueAsString(map); -// } catch (JsonProcessingException e) { -// throw new RuntimeException(e.getMessage(), e); -// } -// } -// -// /** -// * add tenantCode, accessKey, {@link #TIMESTAMP}, {@link #SIGNATURE} to parameters -// * -// * @return new query parameters -// */ -// public Map toQueryParameters() { -// Map map = new LinkedHashMap<>(); -// // put parameters -// map.putAll(parameters); -// // append tenant code -// map.put("tenantCode", tenantCode); -// // append access key -// map.put("accessKey", accessKey); -// // append timestamp & signature -// map.put(TIMESTAMP, String.valueOf(timestamp)); -// map.put(SIGNATURE, signature); -// -// // return query parameters -// return map; -// } -// -// /** -// * combine parameters to query string -// * @return query string -// * @see #toQueryParameters() -// */ -// public String toQuery() { -// // return query parameters -// return buildQuery(toQueryParameters()); -// } -// -// /** -// * convert parameters to query string -// * -// * @param parameters query parameters -// * @return query string kye1=value1&key2=value2 -// */ -// public static final String buildQuery(Map parameters) { -// final StringBuilder builder = new StringBuilder(); -// parameters.forEach((k, v) -> { -// if (StringUtils.isEmpty(k)) { -// return; -// } -// -// if (builder.length() > 0) { -// builder.append('&'); -// } -// try { -// builder.append(URLEncoder.encode(k, StandardCharsets.UTF_8.name())) -// .append('=') -// .append(v == null ? "" : URLEncoder.encode(v, StandardCharsets.UTF_8.name())); -// } catch (UnsupportedEncodingException e) { -// throw new RuntimeException(e.getMessage(), e); -// } -// }); -// return builder.toString(); -// } -//} +package cn.jyjz.xiaoyao.ocr.util; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.util.StringUtils; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.LinkedHashMap; +import java.util.Map; + +/** + *
    + *
  1. + * GET/DELETE请求:Query String + * 参考:{@link } + *
  2. + *
  3. + * POST/PATCH/PUT请求:JSON格式请求体 + *
    + *   {
    + *    "tenantCode": “syxy”,
    + *    "accessKey": "syncuser",
    + *    "data": {
    + *      // 加密的业务数据
    + *    },
    + *    "timestamp": 1689837406368,
    + *    "signature": "eUk5kY-xR6XMjzjJRrl2T3EE_c5wztJNvdNWEY3vxfo"
    + *   }
    + * 
    + * 参考:{@link #toString()} + *
  4. + *
+ * @author hdzhong + * @date 2023/9/20 + */ +@Data +@ApiModel(value = "请求统一Query/JSON封装",description = "接口统一请求报文") +public class RequestData implements Serializable { + public final static String TIMESTAMP = "_timestamp"; + public final static String SIGNATURE = "_signature"; + + /** + * URL的Query参数 + */ + @ApiModelProperty(value = "Query参数") + private Map parameters; + /** + * 租户代码 + */ + @ApiModelProperty(value = "租户代码") + private String tenantCode; + /** + * 访问标识 + */ + @ApiModelProperty(value = "访问标识") + private String accessKey; + /** + * 进行加密后的业务数据 + * @see cn.jyjz.xiaoyao.ocr.util.ApiHelper#encrypt(String, String, String) + */ + @ApiModelProperty(value = "加密的请求数据") + private String data; + /** + * 请求时间戳,作为签名、加密的随机盐(Salt) + * @see cn.jyjz.xiaoyao.ocr.util.ApiHelper # combineSalt(String, String) + */ + @ApiModelProperty(value = "请求时间戳") + private long timestamp ; + /** + * 数据签名 + * @see cn.jyjz.xiaoyao.ocr.util.ApiHelper # getSignature(String, String, Map) + */ + @ApiModelProperty(value = "数据签名") + private String signature; + + /** + *
+     * {
+     *  "tenantCode": “syxy”,
+     *  "accessKey": "syncuser",
+     *  "data": {
+     *    // 加密的业务数据
+     *  },
+     *  "timestamp": 1689837406368,
+     *  "signature": "eUk5kY-xR6XMjzjJRrl2T3EE_c5wztJNvdNWEY3vxfo"
+     * }
+     * 
+ * @return JSON string + */ + @Override + public String toString() { + ObjectMapper objectMapper = new ObjectMapper(); + Map map = new LinkedHashMap<>(); + // tenant code + map.put("tenantCode", tenantCode); + // access key + map.put("accessKey", accessKey); + // data + map.put("data", data); + // timestamp + map.put("timestamp", timestamp); + // signature + map.put("signature", signature); + + // return json + try { + return objectMapper.writeValueAsString(map); + } catch (JsonProcessingException e) { + throw new RuntimeException(e.getMessage(), e); + } + } + + /** + * add tenantCode, accessKey, {@link #TIMESTAMP}, {@link #SIGNATURE} to parameters + * + * @return new query parameters + */ + public Map toQueryParameters() { + Map map = new LinkedHashMap<>(); + // put parameters + map.putAll(parameters); + // append tenant code + map.put("tenantCode", tenantCode); + // append access key + map.put("accessKey", accessKey); + // append timestamp & signature + map.put(TIMESTAMP, String.valueOf(timestamp)); + map.put(SIGNATURE, signature); + + // return query parameters + return map; + } + + /** + * combine parameters to query string + * @return query string + * @see #toQueryParameters() + */ + public String toQuery() { + // return query parameters + return buildQuery(toQueryParameters()); + } + + /** + * convert parameters to query string + * + * @param parameters query parameters + * @return query string kye1=value1&key2=value2 + */ + public static final String buildQuery(Map parameters) { + final StringBuilder builder = new StringBuilder(); + parameters.forEach((k, v) -> { + if (StringUtils.isEmpty(k)) { + return; + } + + if (builder.length() > 0) { + builder.append('&'); + } + try { + builder.append(URLEncoder.encode(k, StandardCharsets.UTF_8.name())) + .append('=') + .append(v == null ? "" : URLEncoder.encode(v, StandardCharsets.UTF_8.name())); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e.getMessage(), e); + } + }); + return builder.toString(); + } +} diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/util/ResultData.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/util/ResultData.java index 43b388cc..988722b5 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/util/ResultData.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/util/ResultData.java @@ -1,133 +1,133 @@ -//package cn.jyjz.xiaoyao.ocr.util; -// -//import com.fasterxml.jackson.annotation.JsonIgnore; -//import io.swagger.annotations.ApiModel; -//import io.swagger.annotations.ApiModelProperty; -//import lombok.Builder; -//import lombok.Data; -// -//import java.io.Serializable; -//import java.util.Map; -// -///** -// * @ClassName ResultData -// * @Description TODO -// * @Author wazngzezhen -// * @Date 6:20 AM 3/6/22 -// * @Version 1.0 -// **/ -//@Data -//@ApiModel(value = "统一返回结果封装",description = "接口返回统一结果") -//public class ResultData implements Serializable { -// /** -// * 结果状态 -// */ -// @ApiModelProperty(value = "状态码") -// private int status; -// -// /** -// * 响应信息 -// */ -// @ApiModelProperty(value = "响应信息") -// private String message; -// -// /** -// * 后端返回结果,加密后为Base64字符串:{@link String} -// * @see cn.jyjz.xiaoyao.ocr.util.ApiHelper#encrypt(String, String, String) -// */ -// @ApiModelProperty(value = "后端返回结果") -// private T data; -// -// /** -// * 后端响应状态 -// */ -// @ApiModelProperty(value = "后端响应状态") -// private boolean success; -// /** -// * 响应时间戳,作为签名、加密的随机盐(Salt) -// * @see cn.jyjz.xiaoyao.ocr.util.ApiHelper#combineSalt(String, String) -// */ -// @ApiModelProperty(value = "响应时间戳") -// private long timestamp ; -// /** -// * 数据签名 -// * @see cn.jyjz.xiaoyao.ocr.util.ApiHelper#getSignature(String, String, Map) -// */ -// @ApiModelProperty(value = "数据签名") -// private String signature; -// -// /** -// * (预留)http状态 -// */ -// private int httpStatus; -// -// public ResultData(){ -// this.timestamp = System.currentTimeMillis(); -// } -// -// -// public static ResultData success(String message) { -// ResultData resultData = new ResultData<>(); -// resultData.setStatus(ReturnCode.RC100.getCode()); -// resultData.setSuccess(true); -// resultData.setMessage(message); -// return resultData; -// } -// -// public static ResultData success() { -// ResultData resultData = new ResultData<>(); -// resultData.setStatus(ReturnCode.RC100.getCode()); -// resultData.setSuccess(true); -// resultData.setMessage(ReturnCode.RC100.getMessage()); -// return resultData; -// } -// -// public static ResultData success(T data) { -// ResultData resultData = new ResultData<>(); -// resultData.setStatus(ReturnCode.RC100.getCode()); -// resultData.setSuccess(true); -// resultData.setMessage(ReturnCode.RC100.getMessage()); -// resultData.setData(data); -// return resultData; -// } -// -// public static ResultData success(String message, T data) { -// ResultData resultData = new ResultData<>(); -// resultData.setStatus(ReturnCode.RC100.getCode()); -// resultData.setSuccess(true); -// resultData.setMessage(message); -// resultData.setData(data); -// return resultData; -// } -// -// public static ResultData fail(String message) { -// ResultData resultData = new ResultData<>(); -// resultData.setStatus(ReturnCode.RC999.getCode()); -// resultData.setSuccess(false); -// resultData.setMessage(message); -// return resultData; -// } -// -// public static ResultData fail(int code, String message) { -// ResultData resultData = new ResultData<>(); -// resultData.setStatus(code); -// resultData.setSuccess(false); -// resultData.setMessage(message); -// return resultData; -// } -// -// public static ResultData fail() { -// ResultData resultData = new ResultData<>(); -// resultData.setStatus(ReturnCode.RC999.getCode()); -// resultData.setSuccess(false); -// resultData.setMessage(ReturnCode.RC999.getMessage()); -// return resultData; -// } -// -// -// @JsonIgnore -// public int getHttpStatus() { -// return httpStatus; -// } -//} -// +package cn.jyjz.xiaoyao.ocr.util; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; + +import java.io.Serializable; +import java.util.Map; + +/** + * @ClassName ResultData + * @Description TODO + * @Author wazngzezhen + * @Date 6:20 AM 3/6/22 + * @Version 1.0 + **/ +@Data +@ApiModel(value = "统一返回结果封装",description = "接口返回统一结果") +public class ResultData implements Serializable { + /** + * 结果状态 + */ + @ApiModelProperty(value = "状态码") + private int status; + + /** + * 响应信息 + */ + @ApiModelProperty(value = "响应信息") + private String message; + + /** + * 后端返回结果,加密后为Base64字符串:{@link String} + * @see cn.jyjz.xiaoyao.ocr.util.ApiHelper#encrypt(String, String, String) + */ + @ApiModelProperty(value = "后端返回结果") + private T data; + + /** + * 后端响应状态 + */ + @ApiModelProperty(value = "后端响应状态") + private boolean success; + /** + * 响应时间戳,作为签名、加密的随机盐(Salt) + * @see cn.jyjz.xiaoyao.ocr.util.ApiHelper#combineSalt(String, String) + */ + @ApiModelProperty(value = "响应时间戳") + private long timestamp ; + /** + * 数据签名 + * @see cn.jyjz.xiaoyao.ocr.util.ApiHelper#getSignature(String, String, Map) + */ + @ApiModelProperty(value = "数据签名") + private String signature; + + /** + * (预留)http状态 + */ + private int httpStatus; + + public ResultData(){ + this.timestamp = System.currentTimeMillis(); + } + + + public static ResultData success(String message) { + ResultData resultData = new ResultData<>(); + resultData.setStatus(ReturnCode.RC100.getCode()); + resultData.setSuccess(true); + resultData.setMessage(message); + return resultData; + } + + public static ResultData success() { + ResultData resultData = new ResultData<>(); + resultData.setStatus(ReturnCode.RC100.getCode()); + resultData.setSuccess(true); + resultData.setMessage(ReturnCode.RC100.getMessage()); + return resultData; + } + + public static ResultData success(T data) { + ResultData resultData = new ResultData<>(); + resultData.setStatus(ReturnCode.RC100.getCode()); + resultData.setSuccess(true); + resultData.setMessage(ReturnCode.RC100.getMessage()); + resultData.setData(data); + return resultData; + } + + public static ResultData success(String message, T data) { + ResultData resultData = new ResultData<>(); + resultData.setStatus(ReturnCode.RC100.getCode()); + resultData.setSuccess(true); + resultData.setMessage(message); + resultData.setData(data); + return resultData; + } + + public static ResultData fail(String message) { + ResultData resultData = new ResultData<>(); + resultData.setStatus(ReturnCode.RC999.getCode()); + resultData.setSuccess(false); + resultData.setMessage(message); + return resultData; + } + + public static ResultData fail(int code, String message) { + ResultData resultData = new ResultData<>(); + resultData.setStatus(code); + resultData.setSuccess(false); + resultData.setMessage(message); + return resultData; + } + + public static ResultData fail() { + ResultData resultData = new ResultData<>(); + resultData.setStatus(ReturnCode.RC999.getCode()); + resultData.setSuccess(false); + resultData.setMessage(ReturnCode.RC999.getMessage()); + return resultData; + } + + + @JsonIgnore + public int getHttpStatus() { + return httpStatus; + } +} + diff --git a/jyjz-system/jyjz-system-oa/src/main/resources/mapper/oa/OcrTaskchildPictureMapper.xml b/jyjz-system/jyjz-system-oa/src/main/resources/mapper/oa/OcrTaskchildPictureMapper.xml index 04dc9e63..a48c199f 100644 --- a/jyjz-system/jyjz-system-oa/src/main/resources/mapper/oa/OcrTaskchildPictureMapper.xml +++ b/jyjz-system/jyjz-system-oa/src/main/resources/mapper/oa/OcrTaskchildPictureMapper.xml @@ -6,13 +6,6 @@ - - - - - - - @@ -43,19 +36,13 @@ + ID AS id, OCPICTUREID AS ocpictureid, PICTURERESULT AS pictureresult, PICTURECOMPARE AS picturecompare, - IZTRUEORFALSE AS iztrueorfalse, - JUDGEID AS judgeid, - IZPASS AS izpass, - JUDGEPASS AS judgepass, - PASSDESC AS passdesc, - IZCLOSE AS izclose, - TASKTYPE AS tasktype, DEPTID AS deptid, TENANTID AS tenantid, PACKAGEID AS packageid, @@ -85,7 +72,8 @@ FROMPROJECTID AS fromprojectid, FROMPLANID AS fromplanid, FROMUPTIME AS fromuptime, - FROMSOURCEID AS fromsourceid + FROMSOURCEID AS fromsourceid, + HAVEPOINTS AS havepoints @@ -95,13 +83,6 @@ and OCPICTUREID ${ocpictureid.dataOp} ${ocpictureid.likestar}#{ocpictureid.value}${ocpictureid.likeend} and PICTURERESULT ${pictureresult.dataOp} ${pictureresult.likestar}#{pictureresult.value}${pictureresult.likeend} and PICTURECOMPARE ${picturecompare.dataOp} ${picturecompare.likestar}#{picturecompare.value}${picturecompare.likeend} - and IZTRUEORFALSE ${iztrueorfalse.dataOp} ${iztrueorfalse.likestar}#{iztrueorfalse.value}${iztrueorfalse.likeend} - and JUDGEID ${judgeid.dataOp} ${judgeid.likestar}#{judgeid.value}${judgeid.likeend} - and IZPASS ${izpass.dataOp} ${izpass.likestar}#{izpass.value}${izpass.likeend} - and JUDGEPASS ${judgepass.dataOp} ${judgepass.likestar}#{judgepass.value}${judgepass.likeend} - and PASSDESC ${passdesc.dataOp} ${passdesc.likestar}#{passdesc.value}${passdesc.likeend} - and IZCLOSE ${izclose.dataOp} ${izclose.likestar}#{izclose.value}${izclose.likeend} - and TASKTYPE ${tasktype.dataOp} ${tasktype.likestar}#{tasktype.value}${tasktype.likeend} and DEPTID ${deptid.dataOp} ${deptid.likestar}#{deptid.value}${deptid.likeend} and TENANTID ${tenantid.dataOp} ${tenantid.likestar}#{tenantid.value}${tenantid.likeend} and PACKAGEID ${packageid.dataOp} ${packageid.likestar}#{packageid.value}${packageid.likeend} @@ -124,9 +105,15 @@ and CREATEUSERNAME ${createusername.dataOp} ${createusername.likestar}#{createusername.value}${createusername.likeend} and CREATEDATE ${createdate.dataOp} ${createdate.likestar}#{createdate.value}${createdate.likeend} and USERNAME ${username.dataOp} ${username.likestar}#{username.value}${username.likeend} - and USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend} and FROMTASKID ${fromtaskid.dataOp} ${fromtaskid.likestar}#{fromtaskid.value}${fromtaskid.likeend} and FROMTASKNAME ${fromtaskname.dataOp} ${fromtaskname.likestar}#{fromtaskname.value}${fromtaskname.likeend} + and FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}#{fromuserid.value}${fromuserid.likeend} + and FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}#{fromprojectid.value}${fromprojectid.likeend} + and FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}#{fromplanid.value}${fromplanid.likeend} + and FROMUPTIME ${fromuptime.dataOp} ${fromuptime.likestar}#{fromuptime.value}${fromuptime.likeend} + and FROMSOURCEID ${fromsourceid.dataOp} ${fromsourceid.likestar}#{fromsourceid.value}${fromsourceid.likeend} + and HAVEPOINTS ${havepoints.dataOp} ${havepoints.likestar}#{havepoints.value}${havepoints.likeend} + and USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend} @@ -137,46 +124,41 @@ - and tcp.ID ${id.dataOp} ${id.likestar}#{id.value}${id.likeend} - and tcp.OCPICTUREID ${ocpictureid.dataOp} ${ocpictureid.likestar}#{ocpictureid.value}${ocpictureid.likeend} - and tcp.PICTURERESULT ${pictureresult.dataOp} ${pictureresult.likestar}#{pictureresult.value}${pictureresult.likeend} - and tcp.PICTURECOMPARE ${picturecompare.dataOp} ${picturecompare.likestar}#{picturecompare.value}${picturecompare.likeend} - and tcp.IZTRUEORFALSE ${iztrueorfalse.dataOp} ${iztrueorfalse.likestar}#{iztrueorfalse.value}${iztrueorfalse.likeend} - and tcp.JUDGEID ${judgeid.dataOp} ${judgeid.likestar}#{judgeid.value}${judgeid.likeend} - and tcp.IZPASS ${izpass.dataOp} ${izpass.likestar}#{izpass.value}${izpass.likeend} - and tcp.JUDGEPASS ${judgepass.dataOp} ${judgepass.likestar}#{judgepass.value}${judgepass.likeend} - and tcp.PASSDESC ${passdesc.dataOp} ${passdesc.likestar}#{passdesc.value}${passdesc.likeend} - and tcp.IZCLOSE ${izclose.dataOp} ${izclose.likestar}#{izclose.value}${izclose.likeend} - and tcp.TASKTYPE ${tasktype.dataOp} ${tasktype.likestar}#{tasktype.value}${tasktype.likeend} - and tcp.DEPTID ${deptid.dataOp} ${deptid.likestar}#{deptid.value}${deptid.likeend} - and tcp.TENANTID ${tenantid.dataOp} ${tenantid.likestar}#{tenantid.value}${tenantid.likeend} - and tcp.PACKAGEID ${packageid.dataOp} ${packageid.likestar}#{packageid.value}${packageid.likeend} - and tcp.PICTUREID ${pictureid.dataOp} ${pictureid.likestar}#{pictureid.value}${pictureid.likeend} - and tcp.CATEGORY ${category.dataOp} ${category.likestar}#{category.value}${category.likeend} - and tcp.CATEGORYID ${categoryid.dataOp} ${categoryid.likestar}#{categoryid.value}${categoryid.likeend} - and tcp.SPECIFICATION ${specification.dataOp} ${specification.likestar}#{specification.value}${specification.likeend} - and tcp.BUESSINESSNO ${buessinessno.dataOp} ${buessinessno.likestar}#{buessinessno.value}${buessinessno.likeend} - and tcp.STATES ${states.dataOp} ${states.likestar}#{states.value}${states.likeend} - and tcp.PROCESSINSTANCEID ${processinstanceid.dataOp} ${processinstanceid.likestar}#{processinstanceid.value}${processinstanceid.likeend} - and tcp.PROCESSDEFINITIONID ${processdefinitionid.dataOp} ${processdefinitionid.likestar}#{processdefinitionid.value}${processdefinitionid.likeend} - and tcp.DEPLOYMENTID ${deploymentid.dataOp} ${deploymentid.likestar}#{deploymentid.value}${deploymentid.likeend} - and tcp.ASSIGNEENAME ${assigneename.dataOp} ${assigneename.likestar}#{assigneename.value}${assigneename.likeend} - and tcp.ASSIGNEE ${assignee.dataOp} ${assignee.likestar}#{assignee.value}${assignee.likeend} - and tcp.UPDATEUSER ${updateuser.dataOp} ${updateuser.likestar}#{updateuser.value}${updateuser.likeend} - and tcp.UPDATETIME ${updatetime.dataOp} ${updatetime.likestar}#{updatetime.value}${updatetime.likeend} - and tcp.FILEANNEX ${fileannex.dataOp} ${fileannex.likestar}#{fileannex.value}${fileannex.likeend} - and tcp.GUIDANG ${guidang.dataOp} ${guidang.likestar}#{guidang.value}${guidang.likeend} - and tcp.CREATEUSER ${createuser.dataOp} ${createuser.likestar}#{createuser.value}${createuser.likeend} - and tcp.CREATEUSERNAME ${createusername.dataOp} ${createusername.likestar}#{createusername.value}${createusername.likeend} - and tcp.CREATEDATE ${createdate.dataOp} ${createdate.likestar}#{createdate.value}${createdate.likeend} - and tcp.USERNAME ${username.dataOp} ${username.likestar}#{username.value}${username.likeend} - and tcp.FROMTASKID ${fromtaskid.dataOp} ${fromtaskid.likestar}#{fromtaskid.value}${fromtaskid.likeend} - and tcp.FROMTASKNAME ${fromtaskname.dataOp} ${fromtaskname.likestar}#{fromtaskname.value}${fromtaskname.likeend} - and tcp.FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}#{fromuserid.value}${fromuserid.likeend} - and tcp.FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}#{fromprojectid.value}${fromprojectid.likeend} - and tcp.FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}#{fromplanid.value}${fromplanid.likeend} - and tcp.FROMUPTIME ${fromuptime.dataOp} ${fromuptime.likestar}#{fromuptime.value}${fromuptime.likeend} - and tcp.FROMSOURCEID ${fromsourceid.dataOp} ${fromsourceid.likestar}#{fromsourceid.value}${fromsourceid.likeend} + and tcp.ID ${id.dataOp} ${id.likestar}#{id.value}${id.likeend} + and tcp.OCPICTUREID ${ocpictureid.dataOp} ${ocpictureid.likestar}#{ocpictureid.value}${ocpictureid.likeend} + and tcp.PICTURERESULT ${pictureresult.dataOp} ${pictureresult.likestar}#{pictureresult.value}${pictureresult.likeend} + and tcp.PICTURECOMPARE ${picturecompare.dataOp} ${picturecompare.likestar}#{picturecompare.value}${picturecompare.likeend} + and tcp.DEPTID ${deptid.dataOp} ${deptid.likestar}#{deptid.value}${deptid.likeend} + and tcp.TENANTID ${tenantid.dataOp} ${tenantid.likestar}#{tenantid.value}${tenantid.likeend} + and tcp.PACKAGEID ${packageid.dataOp} ${packageid.likestar}#{packageid.value}${packageid.likeend} + and tcp.PICTUREID ${pictureid.dataOp} ${pictureid.likestar}#{pictureid.value}${pictureid.likeend} + and tcp.CATEGORY ${category.dataOp} ${category.likestar}#{category.value}${category.likeend} + and tcp.CATEGORYID ${categoryid.dataOp} ${categoryid.likestar}#{categoryid.value}${categoryid.likeend} + and tcp.SPECIFICATION ${specification.dataOp} ${specification.likestar}#{specification.value}${specification.likeend} + and tcp.BUESSINESSNO ${buessinessno.dataOp} ${buessinessno.likestar}#{buessinessno.value}${buessinessno.likeend} + and tcp.STATES ${states.dataOp} ${states.likestar}#{states.value}${states.likeend} + and tcp.PROCESSINSTANCEID ${processinstanceid.dataOp} ${processinstanceid.likestar}#{processinstanceid.value}${processinstanceid.likeend} + and tcp.PROCESSDEFINITIONID ${processdefinitionid.dataOp} ${processdefinitionid.likestar}#{processdefinitionid.value}${processdefinitionid.likeend} + and tcp.DEPLOYMENTID ${deploymentid.dataOp} ${deploymentid.likestar}#{deploymentid.value}${deploymentid.likeend} + and tcp.ASSIGNEENAME ${assigneename.dataOp} ${assigneename.likestar}#{assigneename.value}${assigneename.likeend} + and tcp.ASSIGNEE ${assignee.dataOp} ${assignee.likestar}#{assignee.value}${assignee.likeend} + and tcp.UPDATEUSER ${updateuser.dataOp} ${updateuser.likestar}#{updateuser.value}${updateuser.likeend} + and tcp.UPDATETIME ${updatetime.dataOp} ${updatetime.likestar}#{updatetime.value}${updatetime.likeend} + and tcp.FILEANNEX ${fileannex.dataOp} ${fileannex.likestar}#{fileannex.value}${fileannex.likeend} + and tcp.GUIDANG ${guidang.dataOp} ${guidang.likestar}#{guidang.value}${guidang.likeend} + and tcp.CREATEUSER ${createuser.dataOp} ${createuser.likestar}#{createuser.value}${createuser.likeend} + and tcp.CREATEUSERNAME ${createusername.dataOp} ${createusername.likestar}#{createusername.value}${createusername.likeend} + and tcp.CREATEDATE ${createdate.dataOp} ${createdate.likestar}#{createdate.value}${createdate.likeend} + and tcp.USERNAME ${username.dataOp} ${username.likestar}#{username.value}${username.likeend} + and tcp.FROMTASKID ${fromtaskid.dataOp} ${fromtaskid.likestar}#{fromtaskid.value}${fromtaskid.likeend} + and tcp.FROMTASKNAME ${fromtaskname.dataOp} ${fromtaskname.likestar}#{fromtaskname.value}${fromtaskname.likeend} + and tcp.FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}#{fromuserid.value}${fromuserid.likeend} + and tcp.FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}#{fromprojectid.value}${fromprojectid.likeend} + and tcp.FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}#{fromplanid.value}${fromplanid.likeend} + and tcp.FROMUPTIME ${fromuptime.dataOp} ${fromuptime.likestar}#{fromuptime.value}${fromuptime.likeend} + and tcp.FROMSOURCEID ${fromsourceid.dataOp} ${fromsourceid.likestar}#{fromsourceid.value}${fromsourceid.likeend} + and tcp.HAVEPOINTS ${havepoints.dataOp} ${havepoints.likestar}#{havepoints.value}${havepoints.likeend} + and tcp.USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend} diff --git a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/flowable/controller/FlowTaskController.class b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/flowable/controller/FlowTaskController.class index fa23d780..1bbc9c06 100644 Binary files a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/flowable/controller/FlowTaskController.class and b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/flowable/controller/FlowTaskController.class differ diff --git a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildPictureController.class b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildPictureController.class index 115d5c6b..ccb1ffc2 100644 Binary files a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildPictureController.class and b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildPictureController.class differ diff --git a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/dataobject/OcrTaskchildPicture$OcrTaskchildPictureBuilder.class b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/dataobject/OcrTaskchildPicture$OcrTaskchildPictureBuilder.class index d1b15c95..4d2eeb6b 100644 Binary files a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/dataobject/OcrTaskchildPicture$OcrTaskchildPictureBuilder.class and b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/dataobject/OcrTaskchildPicture$OcrTaskchildPictureBuilder.class differ diff --git a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/dataobject/OcrTaskchildPicture.class b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/dataobject/OcrTaskchildPicture.class index 775bb5cb..65f0e31c 100644 Binary files a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/dataobject/OcrTaskchildPicture.class and b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/dataobject/OcrTaskchildPicture.class differ diff --git a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/service/OcrTaskchildPictureService.class b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/service/OcrTaskchildPictureService.class index b09fc9cb..68bb98e1 100644 Binary files a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/service/OcrTaskchildPictureService.class and b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/service/OcrTaskchildPictureService.class differ diff --git a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/service/impl/OcrPictureServiceImpl.class b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/service/impl/OcrPictureServiceImpl.class index 173739e6..89e93202 100644 Binary files a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/service/impl/OcrPictureServiceImpl.class and b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/service/impl/OcrPictureServiceImpl.class differ diff --git a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/service/impl/OcrTaskchildPictureServiceImpl.class b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/service/impl/OcrTaskchildPictureServiceImpl.class index 1161b8ae..a48d2f7b 100644 Binary files a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/service/impl/OcrTaskchildPictureServiceImpl.class and b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/service/impl/OcrTaskchildPictureServiceImpl.class differ diff --git a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/util/ImageClassUtil.class b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/util/ImageClassUtil.class index 6319dff1..267a6edd 100644 Binary files a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/util/ImageClassUtil.class and b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/util/ImageClassUtil.class differ diff --git a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/util/httputil/HttpClient.class b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/util/httputil/HttpClient.class index e7c2ac49..0f991e52 100644 Binary files a/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/util/httputil/HttpClient.class and b/jyjz-system/jyjz-system-oa/target/classes/cn/jyjz/xiaoyao/ocr/util/httputil/HttpClient.class differ diff --git a/jyjz-system/jyjz-system-oa/target/classes/mapper/oa/OcrTaskchildPictureMapper.xml b/jyjz-system/jyjz-system-oa/target/classes/mapper/oa/OcrTaskchildPictureMapper.xml index 04dc9e63..a48c199f 100644 --- a/jyjz-system/jyjz-system-oa/target/classes/mapper/oa/OcrTaskchildPictureMapper.xml +++ b/jyjz-system/jyjz-system-oa/target/classes/mapper/oa/OcrTaskchildPictureMapper.xml @@ -6,13 +6,6 @@ - - - - - - - @@ -43,19 +36,13 @@ + ID AS id, OCPICTUREID AS ocpictureid, PICTURERESULT AS pictureresult, PICTURECOMPARE AS picturecompare, - IZTRUEORFALSE AS iztrueorfalse, - JUDGEID AS judgeid, - IZPASS AS izpass, - JUDGEPASS AS judgepass, - PASSDESC AS passdesc, - IZCLOSE AS izclose, - TASKTYPE AS tasktype, DEPTID AS deptid, TENANTID AS tenantid, PACKAGEID AS packageid, @@ -85,7 +72,8 @@ FROMPROJECTID AS fromprojectid, FROMPLANID AS fromplanid, FROMUPTIME AS fromuptime, - FROMSOURCEID AS fromsourceid + FROMSOURCEID AS fromsourceid, + HAVEPOINTS AS havepoints @@ -95,13 +83,6 @@ and OCPICTUREID ${ocpictureid.dataOp} ${ocpictureid.likestar}#{ocpictureid.value}${ocpictureid.likeend} and PICTURERESULT ${pictureresult.dataOp} ${pictureresult.likestar}#{pictureresult.value}${pictureresult.likeend} and PICTURECOMPARE ${picturecompare.dataOp} ${picturecompare.likestar}#{picturecompare.value}${picturecompare.likeend} - and IZTRUEORFALSE ${iztrueorfalse.dataOp} ${iztrueorfalse.likestar}#{iztrueorfalse.value}${iztrueorfalse.likeend} - and JUDGEID ${judgeid.dataOp} ${judgeid.likestar}#{judgeid.value}${judgeid.likeend} - and IZPASS ${izpass.dataOp} ${izpass.likestar}#{izpass.value}${izpass.likeend} - and JUDGEPASS ${judgepass.dataOp} ${judgepass.likestar}#{judgepass.value}${judgepass.likeend} - and PASSDESC ${passdesc.dataOp} ${passdesc.likestar}#{passdesc.value}${passdesc.likeend} - and IZCLOSE ${izclose.dataOp} ${izclose.likestar}#{izclose.value}${izclose.likeend} - and TASKTYPE ${tasktype.dataOp} ${tasktype.likestar}#{tasktype.value}${tasktype.likeend} and DEPTID ${deptid.dataOp} ${deptid.likestar}#{deptid.value}${deptid.likeend} and TENANTID ${tenantid.dataOp} ${tenantid.likestar}#{tenantid.value}${tenantid.likeend} and PACKAGEID ${packageid.dataOp} ${packageid.likestar}#{packageid.value}${packageid.likeend} @@ -124,9 +105,15 @@ and CREATEUSERNAME ${createusername.dataOp} ${createusername.likestar}#{createusername.value}${createusername.likeend} and CREATEDATE ${createdate.dataOp} ${createdate.likestar}#{createdate.value}${createdate.likeend} and USERNAME ${username.dataOp} ${username.likestar}#{username.value}${username.likeend} - and USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend} and FROMTASKID ${fromtaskid.dataOp} ${fromtaskid.likestar}#{fromtaskid.value}${fromtaskid.likeend} and FROMTASKNAME ${fromtaskname.dataOp} ${fromtaskname.likestar}#{fromtaskname.value}${fromtaskname.likeend} + and FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}#{fromuserid.value}${fromuserid.likeend} + and FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}#{fromprojectid.value}${fromprojectid.likeend} + and FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}#{fromplanid.value}${fromplanid.likeend} + and FROMUPTIME ${fromuptime.dataOp} ${fromuptime.likestar}#{fromuptime.value}${fromuptime.likeend} + and FROMSOURCEID ${fromsourceid.dataOp} ${fromsourceid.likestar}#{fromsourceid.value}${fromsourceid.likeend} + and HAVEPOINTS ${havepoints.dataOp} ${havepoints.likestar}#{havepoints.value}${havepoints.likeend} + and USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend} @@ -137,46 +124,41 @@ - and tcp.ID ${id.dataOp} ${id.likestar}#{id.value}${id.likeend} - and tcp.OCPICTUREID ${ocpictureid.dataOp} ${ocpictureid.likestar}#{ocpictureid.value}${ocpictureid.likeend} - and tcp.PICTURERESULT ${pictureresult.dataOp} ${pictureresult.likestar}#{pictureresult.value}${pictureresult.likeend} - and tcp.PICTURECOMPARE ${picturecompare.dataOp} ${picturecompare.likestar}#{picturecompare.value}${picturecompare.likeend} - and tcp.IZTRUEORFALSE ${iztrueorfalse.dataOp} ${iztrueorfalse.likestar}#{iztrueorfalse.value}${iztrueorfalse.likeend} - and tcp.JUDGEID ${judgeid.dataOp} ${judgeid.likestar}#{judgeid.value}${judgeid.likeend} - and tcp.IZPASS ${izpass.dataOp} ${izpass.likestar}#{izpass.value}${izpass.likeend} - and tcp.JUDGEPASS ${judgepass.dataOp} ${judgepass.likestar}#{judgepass.value}${judgepass.likeend} - and tcp.PASSDESC ${passdesc.dataOp} ${passdesc.likestar}#{passdesc.value}${passdesc.likeend} - and tcp.IZCLOSE ${izclose.dataOp} ${izclose.likestar}#{izclose.value}${izclose.likeend} - and tcp.TASKTYPE ${tasktype.dataOp} ${tasktype.likestar}#{tasktype.value}${tasktype.likeend} - and tcp.DEPTID ${deptid.dataOp} ${deptid.likestar}#{deptid.value}${deptid.likeend} - and tcp.TENANTID ${tenantid.dataOp} ${tenantid.likestar}#{tenantid.value}${tenantid.likeend} - and tcp.PACKAGEID ${packageid.dataOp} ${packageid.likestar}#{packageid.value}${packageid.likeend} - and tcp.PICTUREID ${pictureid.dataOp} ${pictureid.likestar}#{pictureid.value}${pictureid.likeend} - and tcp.CATEGORY ${category.dataOp} ${category.likestar}#{category.value}${category.likeend} - and tcp.CATEGORYID ${categoryid.dataOp} ${categoryid.likestar}#{categoryid.value}${categoryid.likeend} - and tcp.SPECIFICATION ${specification.dataOp} ${specification.likestar}#{specification.value}${specification.likeend} - and tcp.BUESSINESSNO ${buessinessno.dataOp} ${buessinessno.likestar}#{buessinessno.value}${buessinessno.likeend} - and tcp.STATES ${states.dataOp} ${states.likestar}#{states.value}${states.likeend} - and tcp.PROCESSINSTANCEID ${processinstanceid.dataOp} ${processinstanceid.likestar}#{processinstanceid.value}${processinstanceid.likeend} - and tcp.PROCESSDEFINITIONID ${processdefinitionid.dataOp} ${processdefinitionid.likestar}#{processdefinitionid.value}${processdefinitionid.likeend} - and tcp.DEPLOYMENTID ${deploymentid.dataOp} ${deploymentid.likestar}#{deploymentid.value}${deploymentid.likeend} - and tcp.ASSIGNEENAME ${assigneename.dataOp} ${assigneename.likestar}#{assigneename.value}${assigneename.likeend} - and tcp.ASSIGNEE ${assignee.dataOp} ${assignee.likestar}#{assignee.value}${assignee.likeend} - and tcp.UPDATEUSER ${updateuser.dataOp} ${updateuser.likestar}#{updateuser.value}${updateuser.likeend} - and tcp.UPDATETIME ${updatetime.dataOp} ${updatetime.likestar}#{updatetime.value}${updatetime.likeend} - and tcp.FILEANNEX ${fileannex.dataOp} ${fileannex.likestar}#{fileannex.value}${fileannex.likeend} - and tcp.GUIDANG ${guidang.dataOp} ${guidang.likestar}#{guidang.value}${guidang.likeend} - and tcp.CREATEUSER ${createuser.dataOp} ${createuser.likestar}#{createuser.value}${createuser.likeend} - and tcp.CREATEUSERNAME ${createusername.dataOp} ${createusername.likestar}#{createusername.value}${createusername.likeend} - and tcp.CREATEDATE ${createdate.dataOp} ${createdate.likestar}#{createdate.value}${createdate.likeend} - and tcp.USERNAME ${username.dataOp} ${username.likestar}#{username.value}${username.likeend} - and tcp.FROMTASKID ${fromtaskid.dataOp} ${fromtaskid.likestar}#{fromtaskid.value}${fromtaskid.likeend} - and tcp.FROMTASKNAME ${fromtaskname.dataOp} ${fromtaskname.likestar}#{fromtaskname.value}${fromtaskname.likeend} - and tcp.FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}#{fromuserid.value}${fromuserid.likeend} - and tcp.FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}#{fromprojectid.value}${fromprojectid.likeend} - and tcp.FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}#{fromplanid.value}${fromplanid.likeend} - and tcp.FROMUPTIME ${fromuptime.dataOp} ${fromuptime.likestar}#{fromuptime.value}${fromuptime.likeend} - and tcp.FROMSOURCEID ${fromsourceid.dataOp} ${fromsourceid.likestar}#{fromsourceid.value}${fromsourceid.likeend} + and tcp.ID ${id.dataOp} ${id.likestar}#{id.value}${id.likeend} + and tcp.OCPICTUREID ${ocpictureid.dataOp} ${ocpictureid.likestar}#{ocpictureid.value}${ocpictureid.likeend} + and tcp.PICTURERESULT ${pictureresult.dataOp} ${pictureresult.likestar}#{pictureresult.value}${pictureresult.likeend} + and tcp.PICTURECOMPARE ${picturecompare.dataOp} ${picturecompare.likestar}#{picturecompare.value}${picturecompare.likeend} + and tcp.DEPTID ${deptid.dataOp} ${deptid.likestar}#{deptid.value}${deptid.likeend} + and tcp.TENANTID ${tenantid.dataOp} ${tenantid.likestar}#{tenantid.value}${tenantid.likeend} + and tcp.PACKAGEID ${packageid.dataOp} ${packageid.likestar}#{packageid.value}${packageid.likeend} + and tcp.PICTUREID ${pictureid.dataOp} ${pictureid.likestar}#{pictureid.value}${pictureid.likeend} + and tcp.CATEGORY ${category.dataOp} ${category.likestar}#{category.value}${category.likeend} + and tcp.CATEGORYID ${categoryid.dataOp} ${categoryid.likestar}#{categoryid.value}${categoryid.likeend} + and tcp.SPECIFICATION ${specification.dataOp} ${specification.likestar}#{specification.value}${specification.likeend} + and tcp.BUESSINESSNO ${buessinessno.dataOp} ${buessinessno.likestar}#{buessinessno.value}${buessinessno.likeend} + and tcp.STATES ${states.dataOp} ${states.likestar}#{states.value}${states.likeend} + and tcp.PROCESSINSTANCEID ${processinstanceid.dataOp} ${processinstanceid.likestar}#{processinstanceid.value}${processinstanceid.likeend} + and tcp.PROCESSDEFINITIONID ${processdefinitionid.dataOp} ${processdefinitionid.likestar}#{processdefinitionid.value}${processdefinitionid.likeend} + and tcp.DEPLOYMENTID ${deploymentid.dataOp} ${deploymentid.likestar}#{deploymentid.value}${deploymentid.likeend} + and tcp.ASSIGNEENAME ${assigneename.dataOp} ${assigneename.likestar}#{assigneename.value}${assigneename.likeend} + and tcp.ASSIGNEE ${assignee.dataOp} ${assignee.likestar}#{assignee.value}${assignee.likeend} + and tcp.UPDATEUSER ${updateuser.dataOp} ${updateuser.likestar}#{updateuser.value}${updateuser.likeend} + and tcp.UPDATETIME ${updatetime.dataOp} ${updatetime.likestar}#{updatetime.value}${updatetime.likeend} + and tcp.FILEANNEX ${fileannex.dataOp} ${fileannex.likestar}#{fileannex.value}${fileannex.likeend} + and tcp.GUIDANG ${guidang.dataOp} ${guidang.likestar}#{guidang.value}${guidang.likeend} + and tcp.CREATEUSER ${createuser.dataOp} ${createuser.likestar}#{createuser.value}${createuser.likeend} + and tcp.CREATEUSERNAME ${createusername.dataOp} ${createusername.likestar}#{createusername.value}${createusername.likeend} + and tcp.CREATEDATE ${createdate.dataOp} ${createdate.likestar}#{createdate.value}${createdate.likeend} + and tcp.USERNAME ${username.dataOp} ${username.likestar}#{username.value}${username.likeend} + and tcp.FROMTASKID ${fromtaskid.dataOp} ${fromtaskid.likestar}#{fromtaskid.value}${fromtaskid.likeend} + and tcp.FROMTASKNAME ${fromtaskname.dataOp} ${fromtaskname.likestar}#{fromtaskname.value}${fromtaskname.likeend} + and tcp.FROMUSERID ${fromuserid.dataOp} ${fromuserid.likestar}#{fromuserid.value}${fromuserid.likeend} + and tcp.FROMPROJECTID ${fromprojectid.dataOp} ${fromprojectid.likestar}#{fromprojectid.value}${fromprojectid.likeend} + and tcp.FROMPLANID ${fromplanid.dataOp} ${fromplanid.likestar}#{fromplanid.value}${fromplanid.likeend} + and tcp.FROMUPTIME ${fromuptime.dataOp} ${fromuptime.likestar}#{fromuptime.value}${fromuptime.likeend} + and tcp.FROMSOURCEID ${fromsourceid.dataOp} ${fromsourceid.likestar}#{fromsourceid.value}${fromsourceid.likeend} + and tcp.HAVEPOINTS ${havepoints.dataOp} ${havepoints.likestar}#{havepoints.value}${havepoints.likeend} + and tcp.USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend} diff --git a/jyjz-system/jyjz-system-oa/target/jyjz-system-oa-1.0.0-sources.jar b/jyjz-system/jyjz-system-oa/target/jyjz-system-oa-1.0.0-sources.jar index 58862948..156ea7dd 100644 Binary files a/jyjz-system/jyjz-system-oa/target/jyjz-system-oa-1.0.0-sources.jar and b/jyjz-system/jyjz-system-oa/target/jyjz-system-oa-1.0.0-sources.jar differ diff --git a/jyjz-system/jyjz-system-oa/target/jyjz-system-oa-1.0.0.jar b/jyjz-system/jyjz-system-oa/target/jyjz-system-oa-1.0.0.jar index ea58da09..ad5c9909 100644 Binary files a/jyjz-system/jyjz-system-oa/target/jyjz-system-oa-1.0.0.jar and b/jyjz-system/jyjz-system-oa/target/jyjz-system-oa-1.0.0.jar differ diff --git a/jyjz-system/jyjz-system-oa/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/jyjz-system/jyjz-system-oa/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst index 4e9e2f52..f0ef4bb5 100644 --- a/jyjz-system/jyjz-system-oa/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ b/jyjz-system/jyjz-system-oa/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -23,6 +23,7 @@ cn\jyjz\xiaoyao\ocr\controller\OcrAreaHtmlController.class cn\jyjz\xiaoyao\ocr\dataDao\OcrPictureclassMybatisDao.class cn\jyjz\xiaoyao\ocr\dataobject\OcrUsersearchchild.class cn\jyjz\xiaoyao\ocr\service\impl\OcrConfigurationServiceImpl.class +cn\jyjz\xiaoyao\ocr\util\ReturnCode.class cn\jyjz\flowable\utils\Constant.class cn\jyjz\xiaoyao\ocr\controller\OcrSearchmanagerController.class cn\jyjz\xiaoyao\ocr\util\httputil\HttpClient$1.class @@ -63,16 +64,19 @@ cn\jyjz\xiaoyao\ocr\service\OcrUsersearchService.class cn\jyjz\xiaoyao\ocr\service\impl\OcrUsersearchchildServiceImpl.class cn\jyjz\xiaoyao\ocr\controller\OcrPictureController.class cn\jyjz\xiaoyao\oa\from\dataobject\Candidateuser.class +cn\jyjz\xiaoyao\ocr\util\ImageClassUtil.class cn\jyjz\xiaoyao\ocr\service\impl\OcrTaskchildPictureServiceImpl.class cn\jyjz\flowable\config\MyAuthenticationContext.class cn\jyjz\xiaoyao\oa\from\cache\CacheOaConstants.class cn\jyjz\xiaoyao\ocr\dataDao\OcrUsersearchMybatisDao.class +cn\jyjz\xiaoyao\ocr\util\RequestData.class cn\jyjz\xiaoyao\oa\from\controller\UserdistionaryController.class cn\jyjz\xiaoyao\oa\from\controller\UserdistionaryHtmlController.class cn\jyjz\flowable\entity\ReDeployment.class cn\jyjz\flowable\domain\vo\WorkFlowNodeVO.class cn\jyjz\flowable\entity\ReDeployment$ReDeploymentBuilder.class cn\jyjz\xiaoyao\ocr\dataDao\OcrUpuserMybatisDao.class +cn\jyjz\xiaoyao\ocr\util\ResultData.class cn\jyjz\xiaoyao\ocr\service\OcrPicturejobService.class cn\jyjz\xiaoyao\oa\from\dataobject\Candidate$CandidateBuilder.class cn\jyjz\flowable\config\AutoJumpTaskListener.class @@ -113,6 +117,7 @@ cn\jyjz\xiaoyao\ocr\util\DataUtil.class cn\jyjz\xiaoyao\ocr\dataDao\OcrPictureNotesMybatisDao.class cn\jyjz\xiaoyao\ocr\dataobject\OcrPicture$OcrPictureBuilder.class cn\jyjz\xiaoyao\ocr\dataDao\OcrPackagetaskMybatisDao.class +cn\jyjz\xiaoyao\ocr\util\ApiHelper.class cn\jyjz\flowable\modeler\services\FlowableUserLoginServiceImpl.class cn\jyjz\xiaoyao\oa\from\controller\CategoryController.class cn\jyjz\flowable\domain\form\FormObject.class diff --git a/jyjz-system/jyjz-system-oa/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/jyjz-system/jyjz-system-oa/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst index 9cd929e1..c0574904 100644 --- a/jyjz-system/jyjz-system-oa/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ b/jyjz-system/jyjz-system-oa/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -7,6 +7,7 @@ D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\fl D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\flowable\utils\PageUtils.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\flowable\common\ProcessConstant.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\flowable\modeler\constants\FlowableConstants.java +D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\util\ImageClassUtil.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\oa\from\dataDao\IRunFlowableActinstDao.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\oa\from\service\impl\CandidateServiceImpl.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\dataDao\OcrTaskchildPictureMybatisDao.java @@ -34,6 +35,7 @@ D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xi D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\service\OcrAreaService.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\dataobject\OcrPictureNotes.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\dataobject\OcrSearchmanager.java +D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\util\ReturnCode.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\controller\OcrTaskchildPictureHtmlController.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\oa\from\dataDao\UserapproveMybatisDao.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\flowable\utils\Constant.java @@ -71,6 +73,7 @@ D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xi D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\service\OcrTaskchildPictureService.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\controller\OcrPicturejobHtmlController.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\util\httputil\HttpHeader.java +D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\util\ResultData.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\oa\from\controller\CandidateController.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\oa\from\dataDao\UserdistionaryMybatisDao.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\dataDao\OcrPlanMybatisDao.java @@ -86,6 +89,7 @@ D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xi D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\service\OcrPictureclassService.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\oa\from\dataobject\UserViewapproe.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\flowable\modeler\configurations\AbstractMybatisPlusConfiguration.java +D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\util\ApiHelper.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\service\impl\OcrUpuserServiceImpl.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\dataDao\OcrPicturetypeMybatisDao.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\dataobject\OcrUsersearch.java @@ -206,6 +210,7 @@ D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xi D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\flowable\config\GlobalEntityInitListener.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\oa\from\vo\FlowUnionVo.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\flowable\domain\dto\FlowTaskDto.java +D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\util\RequestData.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\service\impl\OcrSearchmanagerServiceImpl.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\dataobject\OcrPictureclass.java D:\ideaWork\jeecg\ocrproject\jyjz-system\jyjz-system-oa\src\main\java\cn\jyjz\xiaoyao\ocr\dataobject\OcrBooknote.java