丽知:钉钉回调

This commit is contained in:
zhengyf 2024-10-31 17:33:45 +08:00
parent 6e4f1757e0
commit b093e80342
4 changed files with 38 additions and 5 deletions

View File

@ -165,6 +165,8 @@ public class CallBackServiceImpl implements CallBackService {
operationRecords = operationRecords.stream().filter(item -> !item.getType().equals("START_PROCESS_INSTANCE")).collect(Collectors.toList());
System.out.println(operationRecords);
String remark="";
//钉钉问题记录执行明细
for (GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultOperationRecords operationRecord : operationRecords) {
//操作结果
@ -179,9 +181,13 @@ public class CallBackServiceImpl implements CallBackService {
dingU8cBillEntity.setDing_res("未处理");
break;
}
//处理意见
remark = operationRecord.getRemark();
}
dingU8cBillDao.saveOrUpDateV2(dingU8cBillEntity);
//审批u8c单据
approveArapDjzb(dingU8cBillEntity,remark);
}catch (Exception e){
logger.error("代理采购(付款单)->采购付款申请(店群专用)回调报错:"+e);
}
@ -203,10 +209,9 @@ public class CallBackServiceImpl implements CallBackService {
/**
* 审核付款单
* @param vbillcode 单据号
* @param corpCode 公司编码
* @param remark 处理意见
*/
public void approveArapDjzb(String vbillcode,String corpCode){
public void approveArapDjzb(DingU8cBillEntity dingU8cBillEntity,String remark){
ArapDjzb arapDjzb = new ArapDjzb();
}
}

View File

@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import java.util.Date;
import java.util.List;
/**
@ -43,16 +44,22 @@ public class DingU8cBillDaoImpl extends MybatisGenericDao<DingU8cBillEntity, Str
String pushStatusNew = dingU8cBillEntityNew.getPushStatus();
if("N".equals(pushStatus)&&"N".equals(pushStatusNew)){
//N->N
dingU8cBill.setId(dingU8cBillEntity.getId());
dingU8cBill.setModify_time(new Date());
dingU8cBill.setPushStatus("N");
dingU8cBill.setPushInfo(dingU8cBillEntityNew.getPushInfo());
this.update(dingU8cBill);
}else if("N".equals(pushStatus)&&"Y".equals(pushStatusNew)){
//N->Y
dingU8cBill.setId(dingU8cBillEntity.getId());
dingU8cBill.setModify_time(new Date());
dingU8cBill.setPushStatus("Y");
dingU8cBill.setPushInfo(dingU8cBillEntityNew.getPushInfo());
this.update(dingU8cBill);
}else if("Y".equals(pushStatus)&&"Y".equals(pushStatusNew)){
//Y->Y
dingU8cBill.setId(dingU8cBillEntity.getId());
dingU8cBill.setModify_time(new Date());
dingU8cBill.setDing_res(dingU8cBillEntityNew.getDing_res());
this.update(dingU8cBill);
}

View File

@ -1,6 +1,5 @@
package com.hzya.frame.plugin.lets.dingtalk.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
@ -35,6 +34,19 @@ public class DingU8cBillEntity extends BaseEntity {
private String dingTalkProcessId;
/** 钉钉返回结果 */
private String ding_res;
/** 是否审核 Y 、 N */
private String approve;
public DingU8cBillEntity(String u8cPkCorp, String u8cCodeCorp, String u8cBillType, String u8cBillCode, String u8cBillId, String pushStatus, String pushInfo, String dingTalkProcessId, String ding_res) {
this.u8cPkCorp = u8cPkCorp;
this.u8cCodeCorp = u8cCodeCorp;
this.u8cBillType = u8cBillType;
this.u8cBillCode = u8cBillCode;
this.u8cBillId = u8cBillId;
this.pushStatus = pushStatus;
this.pushInfo = pushInfo;
this.dingTalkProcessId = dingTalkProcessId;
this.ding_res = ding_res;
}
}

View File

@ -13,6 +13,7 @@
<result property="pushInfo" column="push_info" jdbcType="VARCHAR"/>
<result property="dingTalkProcessId" column="ding_talk_process_id" jdbcType="VARCHAR"/>
<result property="ding_res" column="ding_res" jdbcType="VARCHAR"/>
<result property="approve" column="approve" jdbcType="approve"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
@ -29,6 +30,7 @@
,push_info
,ding_talk_process_id
,ding_res
,approve
,modify_time
,create_time
,sts
@ -49,6 +51,7 @@
<if test="pushInfo != null and pushInfo != ''"> and push_info = #{pushInfo} </if>
<if test="dingTalkProcessId != null and dingTalkProcessId != ''"> and ding_talk_process_id = #{dingTalkProcessId} </if>
<if test="ding_res != null and ding_res != ''"> and ding_res = #{ding_res} </if>
<if test="approve != null and approve != ''"> and approve = #{approve} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
@ -70,6 +73,7 @@
<if test="pushInfo != null and pushInfo != ''"> and push_info = #{pushInfo} </if>
<if test="dingTalkProcessId != null and dingTalkProcessId != ''"> and ding_talk_process_id = #{dingTalkProcessId} </if>
<if test="ding_res != null and ding_res != ''"> and ding_res = #{ding_res} </if>
<if test="approve != null and approve != ''"> and approve = #{approve} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
@ -93,6 +97,7 @@
<if test="pushInfo != null and pushInfo != ''"> and push_info like concat('%',#{pushInfo},'%') </if>
<if test="dingTalkProcessId != null and dingTalkProcessId != ''"> and ding_talk_process_id like concat('%',#{dingTalkProcessId},'%') </if>
<if test="ding_res != null and ding_res != ''"> and ding_res like concat('%',#{ding_res},'%') </if>
<if test="approve != null and approve != ''"> and approve like concat('%',#{approve},'%') </if>
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
@ -116,6 +121,7 @@
<if test="pushInfo != null and pushInfo != ''"> or push_info = #{pushInfo} </if>
<if test="dingTalkProcessId != null and dingTalkProcessId != ''"> or ding_talk_process_id = #{dingTalkProcessId} </if>
<if test="ding_res != null and ding_res != ''"> or ding_res = #{ding_res} </if>
<if test="approve != null and approve != ''"> or approve = #{approve} </if>
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
@ -137,6 +143,7 @@
<if test="pushInfo != null and pushInfo != ''"> push_info , </if>
<if test="dingTalkProcessId != null and dingTalkProcessId != ''"> ding_talk_process_id , </if>
<if test="ding_res != null and ding_res != ''"> ding_res , </if>
<if test="approve != null and approve != ''"> approve , </if>
<if test="modify_time != null"> modify_time , </if>
<if test="create_time != null"> create_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
@ -154,6 +161,7 @@
<if test="pushInfo != null and pushInfo != ''"> #{pushInfo} ,</if>
<if test="dingTalkProcessId != null and dingTalkProcessId != ''"> #{dingTalkProcessId} ,</if>
<if test="ding_res != null and ding_res != ''"> #{ding_res} ,</if>
<if test="approve != null and approve != ''"> #{approve} ,</if>
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
@ -201,6 +209,7 @@ update ding_u8c_bill set
<if test="pushInfo != null and pushInfo != ''"> push_info = #{pushInfo},</if>
<if test="dingTalkProcessId != null and dingTalkProcessId != ''"> ding_talk_process_id = #{dingTalkProcessId},</if>
<if test="ding_res != null and ding_res != ''"> ding_res = #{ding_res},</if>
<if test="approve != null and approve != ''"> approve = #{approve},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>