|
|
@ -75,6 +75,8 @@ public class WarrantServiceImpl implements WarrantService { |
|
|
|
private MessagePushTextDao messagePushTextDao; |
|
|
|
@Autowired |
|
|
|
private RedisThird redisThird; |
|
|
|
@Autowired |
|
|
|
private PaCustomerDao paCustomerDao; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 1.保存代码审核结果 2.更新代码上传结果 |
|
|
@ -139,6 +141,8 @@ public class WarrantServiceImpl implements WarrantService { |
|
|
|
codeAuditRecord.setCustomerId(customerId); |
|
|
|
codeAuditRecord.setAuthAppId(authAppId); |
|
|
|
codeAuditRecord.setTemplateId(templateId); |
|
|
|
String customerName = paCustomerDao.selectCustomerName(customerId); |
|
|
|
String client = this.getClient(clientType); |
|
|
|
//插入 代码审核 记录
|
|
|
|
log.info(String.format(ThirdRunTimeInfoConstant.CODE_AUDIT_RESULT, xml)); |
|
|
|
codeAuditRecordDao.insertCodeAuditRecord(codeAuditRecord); |
|
|
@ -149,15 +153,15 @@ public class WarrantServiceImpl implements WarrantService { |
|
|
|
switch (event) { |
|
|
|
case ModuleConstant.WEAPP_AUDIT_SUCCESS: |
|
|
|
codeResult = ModuleConstant.AUDIT_SUCCESS; |
|
|
|
this.dingDingRobot(reason,null); |
|
|
|
this.dingDingRobot(reason,null,customerName,client); |
|
|
|
break; |
|
|
|
case ModuleConstant.WEAPP_AUDIT_FAIL: |
|
|
|
codeResult = ModuleConstant.AUDIT_FAILED; |
|
|
|
this.dingDingRobot(reason,codeResult); |
|
|
|
this.dingDingRobot(reason,codeResult,customerName,client); |
|
|
|
break; |
|
|
|
case ModuleConstant.WEAPP_AUDIT_DELAY: |
|
|
|
codeResult = ModuleConstant.DELAY; |
|
|
|
this.dingDingRobot(reason,codeResult); |
|
|
|
this.dingDingRobot(reason,codeResult,customerName,client); |
|
|
|
break; |
|
|
|
} |
|
|
|
String codeCustomerId = codeCustomerDao.selectCodeCustomerId(codeAuditRecord); |
|
|
@ -199,21 +203,27 @@ public class WarrantServiceImpl implements WarrantService { |
|
|
|
return ModuleConstant.SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
public void dingDingRobot(String result,String event){ |
|
|
|
public void dingDingRobot(String result,String event,String customerName,String clientType){ |
|
|
|
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/robot/send?access_token=5b48fcbc3fde24b8ba4696aa062b7f8146479a9d3467dbb1f9cf132ec36b955a"); |
|
|
|
OapiRobotSendRequest request = new OapiRobotSendRequest(); |
|
|
|
request.setMsgtype("text"); |
|
|
|
OapiRobotSendRequest.Text text = new OapiRobotSendRequest.Text(); |
|
|
|
switch (event){ |
|
|
|
case ModuleConstant.WEAPP_AUDIT_SUCCESS: |
|
|
|
text.setContent("代码审核结果: 审核成功"); |
|
|
|
text.setContent("代码审核结果: 审核成功\n"+ |
|
|
|
"客户名称:" + customerName +"\n"+ |
|
|
|
"客户端:"+clientType+"\n"); |
|
|
|
break; |
|
|
|
case ModuleConstant.WEAPP_AUDIT_FAIL: |
|
|
|
text.setContent("代码审核结果: 审核不通过,"+ |
|
|
|
text.setContent("代码审核结果: 审核不通过\n"+ |
|
|
|
"客户名称:" + customerName +"\n"+ |
|
|
|
"客户端:"+clientType+"\n"+ |
|
|
|
"不通过原因:"+result); |
|
|
|
break; |
|
|
|
case ModuleConstant.WEAPP_AUDIT_DELAY: |
|
|
|
text.setContent("代码审核结果: 审核延时,"+ |
|
|
|
text.setContent("代码审核结果: 审核延时\n"+ |
|
|
|
"客户名称:" + customerName +"\n"+ |
|
|
|
"客户端:"+clientType+"\n"+ |
|
|
|
"延时原因:"+result); |
|
|
|
break; |
|
|
|
} |
|
|
@ -226,6 +236,11 @@ public class WarrantServiceImpl implements WarrantService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public String getClient(String clientType){ |
|
|
|
String result = clientType == "resi" ? "居民端" : "工作端"; |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 方法描述: 类型为enevt的时候,拼接 |
|
|
|
* @param request |
|
|
|