|
|
@@ -166,7 +166,8 @@ public class ESignServiceImpl implements IESignService {
|
|
|
AppOrder appOrder = orderMapper.selectOne(Wrappers.<AppOrder>lambdaQuery()
|
|
|
.eq(AppOrder::getOrderCode, orderCode));
|
|
|
|
|
|
- AppContractInfo contractInfo = appAccountMapper.selectById(appOrder.getContractNo());
|
|
|
+ AppContractInfo contractInfo = appAccountMapper.selectOne(Wrappers.<AppContractInfo>lambdaQuery()
|
|
|
+ .eq(AppContractInfo::getOrgCode, appOrder.getOrgCode()).eq(AppContractInfo::getDelFlag, 0));
|
|
|
SysDepart sysDepart = sysDepartMapper.selectOne(Wrappers.<SysDepart>lambdaQuery()
|
|
|
.eq(SysDepart::getOrgCode, appOrder.getOrgCode()));
|
|
|
|
|
|
@@ -433,10 +434,11 @@ public class ESignServiceImpl implements IESignService {
|
|
|
@Override
|
|
|
public String getSignUrl(String signFlowId) throws EsignDemoException {
|
|
|
AppContractSign appContractSign = appContractSignMapper.selectOne(Wrappers.<AppContractSign>lambdaQuery().eq(AppContractSign::getSignFlowId, signFlowId));
|
|
|
+ if(null == appContractSign) throw new JeecgBootException("未找到该签署流程,请先发起签署");
|
|
|
FamilyMembers familyMembers = familyMembersMapper.selectById(appContractSign.getFamilyId());
|
|
|
SysDepart sysDepart = sysDepartMapper.selectOne(Wrappers.<SysDepart>lambdaQuery().eq(SysDepart::getOrgCode, appContractSign.getOrgCode()));
|
|
|
JSONObject signUrl = JSONObject.parseObject(SignDemo.signUrl(signFlowId,familyMembers.getPhone(),sysDepart.getDepartName()).getBody());
|
|
|
- return signUrl.getJSONObject("data").getString("url");
|
|
|
+ return signUrl.getJSONObject("data").getString("shortUrl");
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -644,24 +646,21 @@ public class ESignServiceImpl implements IESignService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Boolean signCallback(JsonObject jsonObject) {
|
|
|
+ public Boolean signCallback(SignCallbackDTO jsonObject) {
|
|
|
try {
|
|
|
- // 提取字段并验证
|
|
|
- String action = jsonObject.get("action").getAsString();
|
|
|
- String statusDesc = jsonObject.get("statusDescription").getAsString();
|
|
|
- if("SIGN_FLOW_COMPLETE".equals(action) && "完成".equals(statusDesc)){
|
|
|
- String signFlowId = jsonObject.get("signFlowId").getAsString();
|
|
|
+ if(jsonObject.getSignResult().equals(2)){
|
|
|
AppContractSign appContractSign = appContractSignMapper.selectOne(Wrappers.<AppContractSign>lambdaQuery()
|
|
|
- .eq(AppContractSign::getSignFlowId, signFlowId));
|
|
|
- appContractSign.setIsSign(1).setSignTime(new Date());
|
|
|
- return appContractSignMapper.updateById(appContractSign) > 0;
|
|
|
- }else {
|
|
|
- return false;
|
|
|
+ .eq(AppContractSign::getSignFlowId, jsonObject.getSignFlowId()));
|
|
|
+ if(null != appContractSign){
|
|
|
+ appContractSign.setIsSign(1).setSignTime(new Date());
|
|
|
+ return appContractSignMapper.updateById(appContractSign) > 0;
|
|
|
+ }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.error( e.getMessage());
|
|
|
return false;
|
|
|
}
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
@Override
|