From a2a815c8b4f56ba9a105965b548867a96516e74e Mon Sep 17 00:00:00 2001 From: xiangerlin <251481237@qq.com> Date: Mon, 23 Jun 2025 18:29:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=8F=92=E4=BB=B6=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=B8=8B=E7=9A=84=E5=BC=80=E7=A5=A8=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=9B=9E=E9=80=80=E3=80=81=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=EF=BC=8C=20=E7=A7=BB=E5=8A=A8=E5=88=B0fw-oa=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frame/plugin/ht/dao/IApplyInvoiceDao.java | 12 -- .../ht/dao/impl/ApplyInvoiceDaoImpl.java | 15 -- .../plugin/ht/entity/ApplyInvoiceEntity.java | 59 -------- .../plugin/ht/entity/ApplyInvoiceEntity.xml | 44 ------ .../InvoiceDistributePluginInitializer.java | 2 +- .../ht/service/IApplyInvoiceService.java | 48 ------- .../service/impl/ApplyInvoiceServiceImpl.java | 136 ------------------ 7 files changed, 1 insertion(+), 315 deletions(-) delete mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/dao/IApplyInvoiceDao.java delete mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/dao/impl/ApplyInvoiceDaoImpl.java delete mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/entity/ApplyInvoiceEntity.java delete mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/entity/ApplyInvoiceEntity.xml delete mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/service/IApplyInvoiceService.java delete mode 100644 base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/service/impl/ApplyInvoiceServiceImpl.java diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/dao/IApplyInvoiceDao.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/dao/IApplyInvoiceDao.java deleted file mode 100644 index e75045c0..00000000 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/dao/IApplyInvoiceDao.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.hzya.frame.plugin.ht.dao; - -import com.hzya.frame.basedao.dao.IBaseDao; -import com.hzya.frame.plugin.ht.entity.ApplyInvoiceEntity; - -/** - * @Description OA开票申请 - * @Author xiangerlin - * @Date 2025/6/21 17:07 - **/ -public interface IApplyInvoiceDao extends IBaseDao { -} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/dao/impl/ApplyInvoiceDaoImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/dao/impl/ApplyInvoiceDaoImpl.java deleted file mode 100644 index a0e7a432..00000000 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/dao/impl/ApplyInvoiceDaoImpl.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.hzya.frame.plugin.ht.dao.impl; - -import com.hzya.frame.basedao.dao.MybatisGenericDao; -import com.hzya.frame.plugin.ht.dao.IApplyInvoiceDao; -import com.hzya.frame.plugin.ht.entity.ApplyInvoiceEntity; -import org.springframework.stereotype.Repository; - -/** - * @Description OA开票申请 - * @Author xiangerlin - * @Date 2025/6/21 17:07 - **/ -@Repository(value = "applyInvoiceDaoImpl") -public class ApplyInvoiceDaoImpl extends MybatisGenericDao implements IApplyInvoiceDao { -} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/entity/ApplyInvoiceEntity.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/entity/ApplyInvoiceEntity.java deleted file mode 100644 index 49e87cd1..00000000 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/entity/ApplyInvoiceEntity.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.hzya.frame.plugin.ht.entity; - -import com.hzya.frame.web.entity.BaseEntity; - -/** - * @Description OA开票申请 formmain_0331 - * @Author xiangerlin - * @Date 2025/6/21 17:02 - **/ -public class ApplyInvoiceEntity extends BaseEntity { - private String field0117;//单据号 - - - //查询待办用的字段 - - private String col_summary_id; - private String ctp_affair_id; - private String workitem_id; - private String member_id;//用来指定查哪个用户的待办,这里要查固定人员的待办 - public String getField0117() { - return field0117; - } - - public void setField0117(String field0117) { - this.field0117 = field0117; - } - - public String getCol_summary_id() { - return col_summary_id; - } - - public void setCol_summary_id(String col_summary_id) { - this.col_summary_id = col_summary_id; - } - - public String getCtp_affair_id() { - return ctp_affair_id; - } - - public void setCtp_affair_id(String ctp_affair_id) { - this.ctp_affair_id = ctp_affair_id; - } - - public String getWorkitem_id() { - return workitem_id; - } - - public void setWorkitem_id(String workitem_id) { - this.workitem_id = workitem_id; - } - - public String getMember_id() { - return member_id; - } - - public void setMember_id(String member_id) { - this.member_id = member_id; - } -} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/entity/ApplyInvoiceEntity.xml b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/entity/ApplyInvoiceEntity.xml deleted file mode 100644 index 2f312035..00000000 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/entity/ApplyInvoiceEntity.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/InvoiceDistributePluginInitializer.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/InvoiceDistributePluginInitializer.java index 014bb5f6..cb978702 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/InvoiceDistributePluginInitializer.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/plugin/InvoiceDistributePluginInitializer.java @@ -1246,7 +1246,7 @@ public class InvoiceDistributePluginInitializer extends PluginBaseEntity { ApplyInvoiceEntity applyInvoiceEntity = applyInvoiceService.queryAffair(applyInvoice); if (null != applyInvoiceEntity){ String stepBack = applyInvoiceService.stepBackValueOf(applyInvoiceEntity.getWorkitem_id(), message); - applyInvoiceService.process(stepBack,"8000590006"); + applyInvoiceService.process(stepBack,"8000590006","zzzh"); } } } diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/service/IApplyInvoiceService.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/service/IApplyInvoiceService.java deleted file mode 100644 index 448fe05d..00000000 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/service/IApplyInvoiceService.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.hzya.frame.plugin.ht.service; - -import com.hzya.frame.basedao.service.IBaseService; -import com.hzya.frame.plugin.ht.entity.ApplyInvoiceEntity; -import com.hzya.frame.web.exception.BaseSystemException; - -import java.util.List; - -/** - * @Description OA开票申请 - * @Author xiangerlin - * @Date 2025/6/21 17:56 - **/ -public interface IApplyInvoiceService extends IBaseService { - - /** - * 查询待办信息 - * 这里要指定人员 所以只会查出一条,如果查出多条那就是有问题的 - * @param entity - * @return - * @throws BaseSystemException - */ - ApplyInvoiceEntity queryAffair(ApplyInvoiceEntity entity)throws BaseSystemException; - - /** - * 流程回退参数组装 - * @param workitemId - * @param content - * @return - */ - String stepBackValueOf(String workitemId,String content); - - /** - * 流程结束参数组装 - * @param workitemId - * @param content - * @return - */ - String finishValueOf(String workitemId,String content); - - /** - * 流程处理 - * @param param - * @param apiCode - * @return - */ - String process(String param,String apiCode); -} diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/service/impl/ApplyInvoiceServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/service/impl/ApplyInvoiceServiceImpl.java deleted file mode 100644 index 82c8fc2e..00000000 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/ht/service/impl/ApplyInvoiceServiceImpl.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.hzya.frame.plugin.ht.service.impl; - -import cn.hutool.core.lang.Assert; -import cn.hutool.http.HttpRequest; -import com.alibaba.fastjson.JSONObject; -import com.baomidou.dynamic.datasource.annotation.DS; -import com.hzya.frame.basedao.service.impl.BaseService; -import com.hzya.frame.plugin.ht.dao.IApplyInvoiceDao; -import com.hzya.frame.plugin.ht.entity.ApplyInvoiceEntity; -import com.hzya.frame.plugin.ht.service.IApplyInvoiceService; -import com.hzya.frame.seeyon.util.OARestUtil; -import com.hzya.frame.web.exception.BaseSystemException; -import org.apache.commons.collections.CollectionUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * @Description - * @Author xiangerlin - * @Date 2025/6/21 17:56 - **/ -@Service(value = "applyInvoiceServiceImpl") -public class ApplyInvoiceServiceImpl extends BaseService implements IApplyInvoiceService { - - private IApplyInvoiceDao applyInvoiceDao; - - @Autowired - public void setApplyInvoiceDao(IApplyInvoiceDao dao) { - this.applyInvoiceDao = dao; - this.dao = dao; - } - @Value("${zt.url}") - private String interfaceUrl; - - - - - /** - * 查询待办信息 - * - * @param entity - * @return - * @throws BaseSystemException - */ - @DS("entity.dataSourceCode") - @Override - public ApplyInvoiceEntity queryAffair(ApplyInvoiceEntity entity) throws BaseSystemException { - List queryList = applyInvoiceDao.queryList(entity, "com.hzya.frame.plugin.ht.dao.impl.ApplyInvoiceDaoImpl.entity_list_affair"); - if (CollectionUtils.isNotEmpty(queryList)){ - if (queryList.size() > 1){ - throw new BaseSystemException("数据异常,查询到多条待办数据"+entity.getId()); - } - return queryList.get(0); - } - return null; - } - - /** - * 流程回退参数组装 - * - * @param workitemId - * @param content - * @return - */ - @Override - public String stepBackValueOf(String workitemId, String content) { - Assert.notEmpty(workitemId,"流程回退时workitemId 必填"); - JSONObject jsonObject = new JSONObject(); - jsonObject.put("appName", "collaboration"); - jsonObject.put("workitemId", workitemId); - - JSONObject commentDeal = new JSONObject(); - commentDeal.put("attitude", "1");//1表示已阅 - commentDeal.put("content", content); - - JSONObject data = new JSONObject(); - data.put("isWFTrace", "0"); - data.put("comment_deal", commentDeal); - - jsonObject.put("data", data); - return jsonObject.toJSONString(); - } - - /** - * 流程结束参数组装 - * - * @param workitemId - * @param content - * @return - */ - @Override - public String finishValueOf(String workitemId, String content) { - Assert.notEmpty(workitemId,"流程回退时workitemId 必填"); - JSONObject json = new JSONObject(); - json.put("appName", "collaboration"); - json.put("workitemId", workitemId); - - JSONObject data = new JSONObject(); - data.put("submitType", "1"); - - JSONObject commentDeal = new JSONObject(); - commentDeal.put("attitude", "2");//2表示同意 - commentDeal.put("content", content); - data.put("comment_deal", commentDeal); - json.put("data", data); - return json.toJSONString(); - } - - /** - * 流程处理 - * - * @param param - * @param apiCode - * @return - */ - @Override - public String process(String param, String apiCode) { - Assert.notEmpty(param,"流程处理时参数不能为空"); - Assert.notEmpty(apiCode,"apiCode不能为空"); - logger.info("准备提交或退回流程:{},{}",apiCode,param); - String token = OARestUtil.getToken("hzya", "8000590001"); - String result = HttpRequest.post(interfaceUrl) - .header("appId", "800059")//OA应用 - .header("apiCode", apiCode)//流程提交/回退接口 - .header("token", token)//token - .header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//中台公钥 - .header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//中台密钥 - .body(param)//表单内容 - .timeout(30000)//超时,毫秒 - .execute().body(); - return result; - } -}