丽知:钉钉回调
This commit is contained in:
parent
6e4f1757e0
commit
b093e80342
|
@ -165,6 +165,8 @@ public class CallBackServiceImpl implements CallBackService {
|
||||||
operationRecords = operationRecords.stream().filter(item -> !item.getType().equals("START_PROCESS_INSTANCE")).collect(Collectors.toList());
|
operationRecords = operationRecords.stream().filter(item -> !item.getType().equals("START_PROCESS_INSTANCE")).collect(Collectors.toList());
|
||||||
System.out.println(operationRecords);
|
System.out.println(operationRecords);
|
||||||
|
|
||||||
|
String remark="";
|
||||||
|
|
||||||
//钉钉问题记录执行明细
|
//钉钉问题记录执行明细
|
||||||
for (GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultOperationRecords operationRecord : operationRecords) {
|
for (GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResultOperationRecords operationRecord : operationRecords) {
|
||||||
//操作结果
|
//操作结果
|
||||||
|
@ -179,9 +181,13 @@ public class CallBackServiceImpl implements CallBackService {
|
||||||
dingU8cBillEntity.setDing_res("未处理");
|
dingU8cBillEntity.setDing_res("未处理");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
//处理意见
|
||||||
|
remark = operationRecord.getRemark();
|
||||||
}
|
}
|
||||||
|
|
||||||
dingU8cBillDao.saveOrUpDateV2(dingU8cBillEntity);
|
dingU8cBillDao.saveOrUpDateV2(dingU8cBillEntity);
|
||||||
|
|
||||||
|
//审批u8c单据
|
||||||
|
approveArapDjzb(dingU8cBillEntity,remark);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
logger.error("代理采购(付款单)->采购付款申请(店群专用)回调报错:"+e);
|
logger.error("代理采购(付款单)->采购付款申请(店群专用)回调报错:"+e);
|
||||||
}
|
}
|
||||||
|
@ -203,10 +209,9 @@ public class CallBackServiceImpl implements CallBackService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核付款单
|
* 审核付款单
|
||||||
* @param vbillcode 单据号
|
* @param remark 处理意见
|
||||||
* @param corpCode 公司编码
|
|
||||||
*/
|
*/
|
||||||
public void approveArapDjzb(String vbillcode,String corpCode){
|
public void approveArapDjzb(DingU8cBillEntity dingU8cBillEntity,String remark){
|
||||||
ArapDjzb arapDjzb = new ArapDjzb();
|
ArapDjzb arapDjzb = new ArapDjzb();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,16 +44,22 @@ public class DingU8cBillDaoImpl extends MybatisGenericDao<DingU8cBillEntity, Str
|
||||||
String pushStatusNew = dingU8cBillEntityNew.getPushStatus();
|
String pushStatusNew = dingU8cBillEntityNew.getPushStatus();
|
||||||
if("N".equals(pushStatus)&&"N".equals(pushStatusNew)){
|
if("N".equals(pushStatus)&&"N".equals(pushStatusNew)){
|
||||||
//N->N
|
//N->N
|
||||||
|
dingU8cBill.setId(dingU8cBillEntity.getId());
|
||||||
|
dingU8cBill.setModify_time(new Date());
|
||||||
dingU8cBill.setPushStatus("N");
|
dingU8cBill.setPushStatus("N");
|
||||||
dingU8cBill.setPushInfo(dingU8cBillEntityNew.getPushInfo());
|
dingU8cBill.setPushInfo(dingU8cBillEntityNew.getPushInfo());
|
||||||
this.update(dingU8cBill);
|
this.update(dingU8cBill);
|
||||||
}else if("N".equals(pushStatus)&&"Y".equals(pushStatusNew)){
|
}else if("N".equals(pushStatus)&&"Y".equals(pushStatusNew)){
|
||||||
//N->Y
|
//N->Y
|
||||||
|
dingU8cBill.setId(dingU8cBillEntity.getId());
|
||||||
|
dingU8cBill.setModify_time(new Date());
|
||||||
dingU8cBill.setPushStatus("Y");
|
dingU8cBill.setPushStatus("Y");
|
||||||
dingU8cBill.setPushInfo(dingU8cBillEntityNew.getPushInfo());
|
dingU8cBill.setPushInfo(dingU8cBillEntityNew.getPushInfo());
|
||||||
this.update(dingU8cBill);
|
this.update(dingU8cBill);
|
||||||
}else if("Y".equals(pushStatus)&&"Y".equals(pushStatusNew)){
|
}else if("Y".equals(pushStatus)&&"Y".equals(pushStatusNew)){
|
||||||
//Y->Y
|
//Y->Y
|
||||||
|
dingU8cBill.setId(dingU8cBillEntity.getId());
|
||||||
|
dingU8cBill.setModify_time(new Date());
|
||||||
dingU8cBill.setDing_res(dingU8cBillEntityNew.getDing_res());
|
dingU8cBill.setDing_res(dingU8cBillEntityNew.getDing_res());
|
||||||
this.update(dingU8cBill);
|
this.update(dingU8cBill);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.hzya.frame.plugin.lets.dingtalk.entity;
|
package com.hzya.frame.plugin.lets.dingtalk.entity;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import com.hzya.frame.web.entity.BaseEntity;
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -35,6 +34,19 @@ public class DingU8cBillEntity extends BaseEntity {
|
||||||
private String dingTalkProcessId;
|
private String dingTalkProcessId;
|
||||||
/** 钉钉返回结果 */
|
/** 钉钉返回结果 */
|
||||||
private String ding_res;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
<result property="pushInfo" column="push_info" jdbcType="VARCHAR"/>
|
<result property="pushInfo" column="push_info" jdbcType="VARCHAR"/>
|
||||||
<result property="dingTalkProcessId" column="ding_talk_process_id" jdbcType="VARCHAR"/>
|
<result property="dingTalkProcessId" column="ding_talk_process_id" jdbcType="VARCHAR"/>
|
||||||
<result property="ding_res" column="ding_res" 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="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
,push_info
|
,push_info
|
||||||
,ding_talk_process_id
|
,ding_talk_process_id
|
||||||
,ding_res
|
,ding_res
|
||||||
|
,approve
|
||||||
,modify_time
|
,modify_time
|
||||||
,create_time
|
,create_time
|
||||||
,sts
|
,sts
|
||||||
|
@ -49,6 +51,7 @@
|
||||||
<if test="pushInfo != null and pushInfo != ''"> and push_info = #{pushInfo} </if>
|
<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="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="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="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </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="pushInfo != null and pushInfo != ''"> and push_info = #{pushInfo} </if>
|
||||||
<if test="dingTalkProcessId != null and dingTalkProcessId != ''"> and ding_talk_process_id = #{dingTalkProcessId} </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="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="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||||
<if test="sts != null and sts != ''"> and sts = #{sts} </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="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="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="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="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="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </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="pushInfo != null and pushInfo != ''"> or push_info = #{pushInfo} </if>
|
||||||
<if test="dingTalkProcessId != null and dingTalkProcessId != ''"> or ding_talk_process_id = #{dingTalkProcessId} </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="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="modify_time != null"> or modify_time = #{modify_time} </if>
|
||||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
<if test="create_time != null"> or create_time = #{create_time} </if>
|
||||||
<if test="sts != null and sts != ''"> or sts = #{sts} </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="pushInfo != null and pushInfo != ''"> push_info , </if>
|
||||||
<if test="dingTalkProcessId != null and dingTalkProcessId != ''"> ding_talk_process_id , </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="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="modify_time != null"> modify_time , </if>
|
||||||
<if test="create_time != null"> create_time , </if>
|
<if test="create_time != null"> create_time , </if>
|
||||||
<if test="sts != null and sts != ''"> sts , </if>
|
<if test="sts != null and sts != ''"> sts , </if>
|
||||||
|
@ -154,6 +161,7 @@
|
||||||
<if test="pushInfo != null and pushInfo != ''"> #{pushInfo} ,</if>
|
<if test="pushInfo != null and pushInfo != ''"> #{pushInfo} ,</if>
|
||||||
<if test="dingTalkProcessId != null and dingTalkProcessId != ''"> #{dingTalkProcessId} ,</if>
|
<if test="dingTalkProcessId != null and dingTalkProcessId != ''"> #{dingTalkProcessId} ,</if>
|
||||||
<if test="ding_res != null and ding_res != ''"> #{ding_res} ,</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="modify_time != null"> #{modify_time} ,</if>
|
||||||
<if test="create_time != null"> #{create_time} ,</if>
|
<if test="create_time != null"> #{create_time} ,</if>
|
||||||
<if test="sts != null and sts != ''"> #{sts} ,</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="pushInfo != null and pushInfo != ''"> push_info = #{pushInfo},</if>
|
||||||
<if test="dingTalkProcessId != null and dingTalkProcessId != ''"> ding_talk_process_id = #{dingTalkProcessId},</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="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="modify_time != null"> modify_time = #{modify_time},</if>
|
||||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||||
|
|
Loading…
Reference in New Issue