wanghongzhi před 1 rokem
rodič
revize
de81413e61

+ 2 - 0
easydo-chengfa/src/main/java/easydo/technology/service/GLDApproveService.java

@@ -18,6 +18,7 @@ import easydo.technology.model.vo.GLDApproveVo;
 import easydo.technology.util.HttpClientUtil;
 import easydo.technology.utils.SecurityUtils;
 import lombok.extern.java.Log;
+
 @Log
 @Component
 public class GLDApproveService {
@@ -63,6 +64,7 @@ public class GLDApproveService {
         object.put("taskType", "APPROVAL");
         object.put("hiddenResubmit", true);
         object.put("startorId", member.getId());
+        log.info("发起审批流req========>" + object.toJSONString() + ",url======>" + url);
         JSONObject resObj = HttpClientUtil.sendPOSTWithHeader(url, object.toJSONString(), header);
         log.info("发起审批流req========>" + object.toJSONString() + "res========>" + resObj.toJSONString());
         return resObj.getString("id");

+ 11 - 10
easydo-chengfa/src/main/java/easydo/technology/service/KafkaClient.java

@@ -32,7 +32,7 @@ import lombok.extern.java.Log;
 
 @Log
 @Component
-@Profile({ "prod", "test" })
+@Profile({"prod", "test"})
 public class KafkaClient {
     private final static String DONE_STATUS = "'done'";
     private final static String NULL_STATUS = "null";
@@ -48,7 +48,7 @@ public class KafkaClient {
     @Value("${PURCHASE.purchasePath}")
     String purchasePath;
 
-    @KafkaListener(topics = { "task_prod" }) // 在这里指定要监听的topic,可以监听多个
+    @KafkaListener(topics = {"task_prod"}) // 在这里指定要监听的topic,可以监听多个
     public void listenToMessage(String message) {
         JSONObject object = JSONObject.parseObject(message);
         String topic = object.getJSONObject("eventData").getString("topic");
@@ -61,9 +61,9 @@ public class KafkaClient {
         if (!(ChengfaEnum.APPROVE_STATE_ENDED.getValue().equals(state)
                 && ChengfaEnum.APPROVE_TOPIC_ENDED.getValue().equals(topic))
                 && !(ChengfaEnum.APPROVE_STATE_STOP.getValue().equals(state)
-                        && ChengfaEnum.APPROVE_TOPIC_STOPPED.getValue().equals(topic))
+                && ChengfaEnum.APPROVE_TOPIC_STOPPED.getValue().equals(topic))
                 && !(ChengfaEnum.APPROVE_STATE_UNSTARTED.getValue().equals(state)
-                        && ChengfaEnum.APPROVE_TOPIC_REJECTED.getValue().equals(topic))) {
+                && ChengfaEnum.APPROVE_TOPIC_REJECTED.getValue().equals(topic))) {
             return;
         }
         if (!ChengfaEnum.BUS_APPROVE_TYPE_PURCHASE_PLAN.getValue().equals(targetType)
@@ -102,7 +102,7 @@ public class KafkaClient {
     }
 
     private void executeSql(Statement statement, String tableName, String taskId, String status, String state,
-            Connection connection) throws Exception {
+                            Connection connection) throws Exception {
         String sql = "update " + tableName + " set status = " + status + ",process_state = '" + state
                 + "' where process_task_id = " + taskId;
         statement.executeUpdate(sql);
@@ -207,31 +207,31 @@ public class KafkaClient {
         purchaseInfo.setPurchaseNo(purchase.getPurchaseNo());
         purchaseInfo.setPurchaseCreateTime(purchase.getCreateTime());
         purchaseInfo.setPurchaseEndTime(purchase.getEndTime());
-        if(StringUtil.isNotEmpty(purchase.getId())){
+        if (StringUtil.isNotEmpty(purchase.getId())) {
             purchaseInfo.setPurchaseUrl(redirectUrl + "?userId=1&type=purchase&businessId=" + purchase.getId() + "&path=" + purchasePath);
         }
         purchaseInfo.setMatterCreateTime(matter.getCreateTime());
         purchaseInfo.setMatterEndTime(matter.getEndTime());
         purchaseInfo.setMatterNo(matter.getBusinessNo());
-        if(StringUtil.isNotEmpty(matter.getId())){
+        if (StringUtil.isNotEmpty(matter.getId())) {
             purchaseInfo.setMatterUrl(redirectUrl + "?userId=1&type=purchase_matter&businessId=" + purchase.getId() + "&path=" + purchasePath);
         }
         purchaseInfo.setBidSignCreateTime(bidSign.getCreateTime());
         purchaseInfo.setBidSignEndTime(bidSign.getEndTime());
         purchaseInfo.setBidAnswerNo(bidSign.getBusinessNo());
-        if(StringUtil.isNotEmpty(bidSign.getId())){
+        if (StringUtil.isNotEmpty(bidSign.getId())) {
             purchaseInfo.setBidSignUrl(redirectUrl + "?userId=1&type=purchase_bid_sign&businessId=" + purchase.getId() + "&path=" + purchasePath);
         }
         purchaseInfo.setBidAnswerCreateTime(answerSign.getCreateTime());
         purchaseInfo.setBidAnswerEndTime(answerSign.getEndTime());
         purchaseInfo.setBidAnswerNo(answerSign.getBusinessNo());
-        if(StringUtil.isNotEmpty(answerSign.getId())){
+        if (StringUtil.isNotEmpty(answerSign.getId())) {
             purchaseInfo.setBidAnswerUrl(redirectUrl + "?userId=1&type=purchase_answer_sign&businessId=" + purchase.getId() + "&path=" + purchasePath);
         }
         purchaseInfo.setBidNoticeCreateTime(notice.getCreateTime());
         purchaseInfo.setBidNoticeEndTime(notice.getEndTime());
         purchaseInfo.setBidNoticeNo(notice.getBusinessNo());
-        if(StringUtil.isNotEmpty(notice.getId())){
+        if (StringUtil.isNotEmpty(notice.getId())) {
             purchaseInfo.setBidNoticeUrl(redirectUrl + "?userId=1&type=purchase_bid_notice&businessId=" + purchase.getId() + "&path=" + purchasePath);
         }
         purchaseInfo.setStatus(0);
@@ -241,6 +241,7 @@ public class KafkaClient {
         purchaseInfo.setPurchaseType(purchase.getPurchaseType());
         purchaseInfo.setIsShare(purchase.getIsShare());
         jdbcClient.jdbcInsert(purchaseInfo, connection);
+        log.info("新增oa视图数据======>" + purchaseInfo.toString());
     }
 
     public static void main(String[] args) {