|
|
@@ -14,6 +14,7 @@ import com.usoftchina.uas.office.qywx.manage.entity.QywxAgent;
|
|
|
import com.usoftchina.uas.office.qywx.manage.service.QywxAgentService;
|
|
|
import com.usoftchina.uas.office.qywx.service.UasEmployeeService;
|
|
|
import com.usoftchina.uas.office.qywx.service.UasJProcessService;
|
|
|
+import com.usoftchina.uas.office.util.Try;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -64,7 +65,7 @@ public class UasProcessListener {
|
|
|
}
|
|
|
|
|
|
private void sendProcessMessage(UasEvent event, Integer jpId) {
|
|
|
- JProcess process = jProcessService.getById(jpId);
|
|
|
+ JProcess process = Try.call(() -> jProcessService.getById(jpId), 10);
|
|
|
Employee employee = getDealMan(process);
|
|
|
if (null == employee) {
|
|
|
return;
|
|
|
@@ -88,9 +89,7 @@ public class UasProcessListener {
|
|
|
|
|
|
public Employee getDealMan(JProcess process) {
|
|
|
try {
|
|
|
- logger.debug("null == process " + (null == process));
|
|
|
DataSourceHolder.set(DataCenter.INSTANCE);
|
|
|
- logger.debug("null == employeeService " + (null == employeeService));
|
|
|
Employee employee = employeeService.getByCode(process.getJp_nodedealman());
|
|
|
if (null == employee || null == employee.getEm_qywx()) {
|
|
|
return null;
|