Commit 4de7b9ec authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.6.6' into MVP1.6.6

parents ed920207 3769cd54
......@@ -192,8 +192,7 @@ public class TSocialSoldierController {
@Operation(description = "获取重新办理结果")
@GetMapping("/getReHandle")
public R<String> getReHandle(@RequestParam String parentId) {
tSocialSoldierService.getReHandle(parentId);
return R.ok("正在执行中,请耐心等待!");
return tSocialSoldierService.getReHandle(parentId);
}
/**
......
......@@ -94,14 +94,10 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
@Async
public R<String> getReHandle(String parentId) {
TAutoPaymentInfo mainAuto = tAutoPaymentInfoService.getById(parentId);
if (mainAuto == null || Common.isEmpty(mainAuto.getId())) {
return R.failed("未找到主表");
} else {
mainAuto.setRepeatReviewFlag(CommonConstants.ONE_STRING);
tAutoPaymentInfoService.updateById(mainAuto);
}
// 3:实缴1日常申报导出;4:实缴2单位个人缴费信息查询;5:实缴3单位缴费明细查询
int type = 7;
......@@ -116,18 +112,55 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
String addIdOTwo = null;
String addIdThree = null;
String addIdSix = null;
// 是否已完成,如果已完成重新复核,需要再次推送:
boolean isDone = true;
int taskNum = 0;
if (addIdOneTask != null && Common.isNotNull(addIdOneTask.getId())) {
addIdOne = addIdOneTask.getAddId();
if (Common.isNotNull(addIdOneTask.getDataStatus()) && CommonConstants.ZERO_STRING.equals(addIdOneTask.getDataStatus())) {
isDone = false;
}
if (Common.isNotNull(addIdOne)) {
taskNum++;
}
}
if (addIdTwoTask != null && Common.isNotNull(addIdTwoTask.getId())) {
addIdOTwo = addIdTwoTask.getAddId();
if (Common.isNotNull(addIdTwoTask.getDataStatus()) && CommonConstants.ZERO_STRING.equals(addIdTwoTask.getDataStatus())) {
isDone = false;
}
if (Common.isNotNull(addIdOTwo)) {
taskNum++;
}
}
if (addIdThreeTask != null && Common.isNotNull(addIdThreeTask.getId())) {
addIdThree = addIdThreeTask.getAddId();
if (Common.isNotNull(addIdThreeTask.getDataStatus()) && CommonConstants.ZERO_STRING.equals(addIdThreeTask.getDataStatus())) {
isDone = false;
}
if (Common.isNotNull(addIdThree)) {
taskNum++;
}
}
if (addIdSixTask != null && Common.isNotNull(addIdSixTask.getId())) {
addIdSix = addIdSixTask.getAddId();
if (Common.isNotNull(addIdSixTask.getDataStatus()) && CommonConstants.ZERO_STRING.equals(addIdSixTask.getDataStatus())) {
isDone = false;
}
if (Common.isNotNull(addIdSix)) {
taskNum++;
}
}
if (isDone || taskNum == 0) {
return R.failed("请先推送!");
}
R<String> failed = doReCoreLazy(parentId, mainAuto, addIdOneTask, addIdTwoTask, addIdThreeTask, addIdSixTask, addIdOne, addIdOTwo, addIdThree, addIdSix);
if (failed != null) return failed;
return R.ok("正在执行中,请耐心等待!");
}
@Async
public R<String> doReCoreLazy(String parentId, TAutoPaymentInfo mainAuto, TSocialSoldierShenBaoTask addIdOneTask, TSocialSoldierShenBaoTask addIdTwoTask, TSocialSoldierShenBaoTask addIdThreeTask, TSocialSoldierShenBaoTask addIdSixTask, String addIdOne, String addIdOTwo, String addIdThree, String addIdSix) {
HttpURLConnection conn;
InputStream inRiChang = null;
InputStream inRenYuan = null;
......@@ -141,6 +174,9 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
if (Common.isNotNull(resultFile) || Common.isNotNull(resultFileTwo)
|| Common.isNotNull(resultFileThree) || Common.isNotNull(resultFileFour)) {
mainAuto.setRepeatReviewFlag(CommonConstants.ONE_STRING);
tAutoPaymentInfoService.updateById(mainAuto);
// 获取需要更新的标记文件:
List<TAutoPaymentDetail> detailList = tAutoPaymentDetailService.getListByParentId(parentId);
if (detailList == null || detailList.isEmpty()) {
......@@ -304,6 +340,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
mainAuto.setRepeatReviewFlag(CommonConstants.TWO_STRING);
}
tAutoPaymentInfoService.updateById(mainAuto);
return R.ok("成功!");
}
} catch (Exception e) {
e.printStackTrace();
......@@ -328,7 +365,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} else {
return R.failed("未找到推送任务,请先推送!");
}
return R.ok();
return null;
}
/**
......
......@@ -636,7 +636,7 @@ if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id
a.HANDLE_STATUS,
a.YGS_HANDLE_STATUS,
SUBSTRING_INDEX(GROUP_CONCAT(d.id ORDER BY d.CREATE_TIME desc),',',1) as DISPATCH_ID,
SUBSTRING_INDEX(GROUP_CONCAT(d.type ORDER BY d.CREATE_TIME desc),',',1) as DISPATCH_TYPE,
SUBSTRING_INDEX(GROUP_CONCAT(d.type ORDER BY d.CREATE_TIME desc),',',1) as DISPATCH_TYPE
FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id
where a.YGS_ADD_ID is not null and d.AUTO_FLAG='0'
......@@ -654,7 +654,7 @@ if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id
a.HANDLE_STATUS,
a.YSD_HANDLE_STATUS,
SUBSTRING_INDEX(GROUP_CONCAT(d.id ORDER BY d.CREATE_TIME desc),',',1) as DISPATCH_ID,
SUBSTRING_INDEX(GROUP_CONCAT(d.type ORDER BY d.CREATE_TIME desc),',',1) as DISPATCH_TYPE,
SUBSTRING_INDEX(GROUP_CONCAT(d.type ORDER BY d.CREATE_TIME desc),',',1) as DISPATCH_TYPE
FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id
where a.YSD_ADD_ID is not null and d.AUTO_FLAG='0'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment