Merge branch 'fix_foton_20240408'

# Conflicts:
#	src/main/java/com/ydw/bat/wkflow/business_auth/LawsUserInfoService.java
This commit is contained in:
wxyclub
2024-04-19 17:47:17 +08:00
7 changed files with 30 additions and 17 deletions
@@ -229,6 +229,11 @@ public interface LawsUserInfoService {
ResponseMessage selectOnlineFile(@RequestParam("onlineFileId") String onlineFileId,@RequestParam("standName") String standName,@RequestParam("key") String key);
@GetMapping("lawss/sarBussionessStand/updateStandStatus")
ResponseMessage<Boolean> changeStandStatus(@RequestParam("standId") String standId,
@RequestParam("standCode") String standCode,
@RequestParam("standtextStatus") String standtextStatus,
@RequestParam("prcCreateUser") String prcCreateUser,
@RequestParam("prcNum") String prcNum);
ResponseMessage<Boolean> changeStandStatus(@RequestParam("standId") String standId,@RequestParam("standCode") String standCode,@RequestParam("standtextStatus") String standtextStatus);
/**
@@ -144,7 +144,7 @@ public class SendDeleteMQService {
private void restSendDoneTodo(String object, SimpleDateFormat sdf, SendTodoLog sendTodoLog, int againNumNew,String operMesg) throws Exception{
// 发送失败连续持续3次, 如果在失败等待1个小时后重试3次
if(againNumNew < 6){
Thread.sleep(3000);
Thread.sleep(600000);
logger.info("发送失败连续持续"+againNumNew+"次,存入延迟重试队列!!!!!!!!!");
}else {
@@ -140,7 +140,7 @@ public class SendDoneMQService {
private void restSendDoneTodo(NotifyTodoSendContext object, SimpleDateFormat sdf, SendTodoLog sendTodoLog, int againNumNew,String operMesg) throws Exception{
// 发送失败连续持续3次, 如果在失败等待1个小时后重试3次
if(againNumNew < 6){
Thread.sleep(3000);
Thread.sleep(600000);
logger.info("发送失败连续持续"+againNumNew+"次,存入延迟重试队列!!!!!!!!!");
}else {
@@ -175,7 +175,7 @@ public class SendMQService {
private void restSendTodo(BusProcessNew object, SimpleDateFormat sdf, SendTodoLog sendTodoLog, int againNumNew,String operMesg) throws Exception{
// 失败次数小于6次,放入失败队列延迟消费
if((againNumNew < 6)){
Thread.sleep(3000);
Thread.sleep(600000);
logger.info("发送失败连续持续"+againNumNew+"次,存入延迟重试队列!!!!!!!!!");
}else {
logger.info("发送失败连续持续"+againNumNew+"次!!");
@@ -134,7 +134,8 @@ public class SendToBeReadMQService {
private void restSendTodo(BusProcessNew object, SimpleDateFormat sdf, SendTodoLog sendTodoLog, int againNumNew, String operMesg) throws Exception {
// 失败次数小于6次,放入失败队列延迟消费
if ((againNumNew < 6)) {
Thread.sleep(3000);
// 延迟10分钟
Thread.sleep(600000);
logger.info("发送失败连续持续" + againNumNew + "次,存入延迟重试队列!!!!!!!!!");
} else {
logger.info("发送失败连续持续" + againNumNew + "次!!");
@@ -11,6 +11,7 @@ import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@Component
public class OkHttpUtil {
@@ -250,6 +251,10 @@ public class OkHttpUtil {
* @return
*/
public String postForJson(String url, String json, Map<String, String> headerParams){
OkHttpClient client = new OkHttpClient.Builder()
.connectTimeout(2, TimeUnit.MINUTES)//设置连接超时时间
.readTimeout(2, TimeUnit.MINUTES)//设置读取超时时间
.build();
RequestBody requestBody = FormBody.create(MediaType.parse("application/json; charset=utf-8"), json);
String responseBody = "";
Request.Builder requestBuilder = new Request.Builder().url(url);
@@ -257,20 +262,14 @@ public class OkHttpUtil {
requestBuilder.addHeader(entry.getKey(), entry.getValue());
}
Request request = requestBuilder.post(requestBody).build();
Response response = null;
try {
response = okHttpClient.newCall(request).execute();
try (Response response = client.newCall(request).execute()) {
int status = response.code();
if (status == 200) {
return response.body().string();
}
} catch (Exception e) {
logger.error("okhttp post error >> ex = {}", ExceptionUtils.getStackTrace(e));
return "okhttp post error >> ex = {} "+ e.getMessage();
} finally {
if (response != null) {
response.close();
}
return "okhttp post error >> ex = {} " + e.getMessage();
}
return responseBody;
}
@@ -38,6 +38,9 @@ public class ProcessStep6After implements TaskListener {
Datas datas = datasService.getOne(queryWrapper);
JSONObject object = JSONObject.parseObject(datas.getFormValsJson());
delegateTask.setVariable("objectJson", object);
QueryWrapper<BusProcessName> queryWrapper2 = new QueryWrapper<>();
queryWrapper2.eq("PRC_ID", delegateTask.getProcessInstanceId());
BusProcessName one1 = busProcessNameService.getOne(queryWrapper2);
//标准法规部业务经理Id ${sdFlag==0} bafzFlag
List<String> nextUserList = new ArrayList<>();
if ("0".equals(object.getString("bafzFlag"))){
@@ -55,9 +58,17 @@ public class ProcessStep6After implements TaskListener {
// String as = JSONObject.toJSONString(bussAttrInfoMap);
// sarBussionessStand.setSarStandAttrEOStr(as);
// lawsUserInfoService.updateSarBussionessStand(sarBussionessStand);
String prcNum = null;
if (one1 != null) {
prcNum = one1.getPrcNum();
}
// 变更标准状态
ResponseMessage<Boolean> result = lawsUserInfoService.changeStandStatus(object.getString("standId"), object.getString("standCode"), object.getString("standtextStatus"));
ResponseMessage<Boolean> result = lawsUserInfoService.changeStandStatus(
object.getString("standId"),
object.getString("standCode"),
object.getString("standtextStatus"),
object.getString("prcCreateUser"),
prcNum);
if(!result.getData()){
throw new ActivitiException("标准状态变更失败");
}
@@ -77,9 +88,6 @@ public class ProcessStep6After implements TaskListener {
prcName = "企标废止";
}
String OVERTIME = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
QueryWrapper queryWrapper2 = new QueryWrapper();
queryWrapper2.eq("PRC_ID", delegateTask.getProcessInstanceId());
BusProcessName one1 = busProcessNameService.getOne(queryWrapper2);
if (one1 != null) {
if ("0".equals(object.getString("bafzFlag"))){
one1.setOverTime(OVERTIME);