Commit a1925f99 authored by hongguangwu's avatar hongguangwu

MVP1.7.17-商险续签待办3

parent e9fccd06
...@@ -267,5 +267,9 @@ public class TInsuranceAlert extends BaseEntity { ...@@ -267,5 +267,9 @@ public class TInsuranceAlert extends BaseEntity {
@Schema(description = "预计续保发起时间") @Schema(description = "预计续保发起时间")
private String expectedCollectionTime; private String expectedCollectionTime;
@TableField(exist = false)
@Schema(description = "新派单的商险ID")
private String insurancesIdNew;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -60,6 +60,14 @@ public class TInsurancePreRenewDetail extends BaseEntity { ...@@ -60,6 +60,14 @@ public class TInsurancePreRenewDetail extends BaseEntity {
@ExcelProperty("商险ID") @ExcelProperty("商险ID")
@Schema(description = "商险ID") @Schema(description = "商险ID")
private String insurancesId; private String insurancesId;
/**
* 新派单的商险ID
*/
@ExcelAttribute(name = "新派单的商险ID", maxLength = 32)
@Length(max = 32, message = "新派单的商险ID不能超过32个字符")
@ExcelProperty("新派单的商险ID")
@Schema(description = "新派单的商险ID")
private String insurancesIdNew;
/** /**
* 结算主体名称 * 结算主体名称
*/ */
......
...@@ -8781,7 +8781,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -8781,7 +8781,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isNotNull(pre)) { if (Common.isNotNull(pre)) {
pre.setProcessStatus(status); pre.setProcessStatus(status);
if (Common.isNotNull(insuranceDetail.getId())) { if (Common.isNotNull(insuranceDetail.getId())) {
pre.setInsurancesId(insuranceDetail.getId()); pre.setInsurancesIdNew(insuranceDetail.getId());
pre.setIsAddress(insuranceDetail.getIsAdress()); pre.setIsAddress(insuranceDetail.getIsAdress());
} }
tInsurancePreRenewDetailMapper.updateById(pre); tInsurancePreRenewDetailMapper.updateById(pre);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<resultMap id="tInsurancePreRenewDetailMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetail"> <resultMap id="tInsurancePreRenewDetailMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreRenewDetail">
<id property="id" column="ID"/> <id property="id" column="ID"/>
<result property="insurancesId" column="INSURANCES_ID"/> <result property="insurancesId" column="INSURANCES_ID"/>
<result property="insurancesIdNew" column="INSURANCES_ID_NEW"/>
<result property="deptName" column="DEPT_NAME"/> <result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/> <result property="deptNo" column="DEPT_NO"/>
<result property="empName" column="EMP_NAME"/> <result property="empName" column="EMP_NAME"/>
...@@ -72,6 +73,7 @@ ...@@ -72,6 +73,7 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
a.INSURANCES_ID, a.INSURANCES_ID,
a.INSURANCES_ID_NEW,
a.DEPT_NAME, a.DEPT_NAME,
a.DEPT_NO, a.DEPT_NO,
a.EMP_NAME, a.EMP_NAME,
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
<result property="configName" column="config_name" jdbcType="VARCHAR"/> <result property="configName" column="config_name" jdbcType="VARCHAR"/>
<result property="isAddress" column="IS_ADDRESS" jdbcType="CHAR"/> <result property="isAddress" column="IS_ADDRESS" jdbcType="CHAR"/>
<result property="expectedCollectionTime" column="expected_collection_time" jdbcType="TIMESTAMP"/> <result property="expectedCollectionTime" column="expected_collection_time" jdbcType="TIMESTAMP"/>
<result property="insurancesIdNew" column="INSURANCES_ID_NEW" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<!-- 商险续签待办专用 --> <!-- 商险续签待办专用 -->
...@@ -106,6 +107,7 @@ ...@@ -106,6 +107,7 @@
b.error_info, b.error_info,
b.error_time b.error_time
,DATE_FORMAT(b.expected_collection_time,'%Y-%m-%d %H:%i') expected_collection_time ,DATE_FORMAT(b.expected_collection_time,'%Y-%m-%d %H:%i') expected_collection_time
,b.INSURANCES_ID_NEW
</sql> </sql>
<sql id="tInsuranceAlert_where"> <sql id="tInsuranceAlert_where">
<if test="tInsuranceAlert != null"> <if test="tInsuranceAlert != null">
...@@ -493,7 +495,7 @@ ...@@ -493,7 +495,7 @@
JOIN t_insurance_pre_renew_detail b ON a.INSURANCES_PRE_RENEW_DETAIL_ID = b.ID JOIN t_insurance_pre_renew_detail b ON a.INSURANCES_PRE_RENEW_DETAIL_ID = b.ID
where a.EXPIRE_IGNORE_FLAG = '1' and a.DELETE_FLAG=0 and b.is_leave = '0' and a.IS_OVERDUE = 0 where a.EXPIRE_IGNORE_FLAG = '1' and a.DELETE_FLAG=0 and b.is_leave = '0' and a.IS_OVERDUE = 0
<if test="idList != null"> <if test="idList != null">
AND b.id in AND a.id in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")"> <foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr} #{idStr}
</foreach> </foreach>
......
...@@ -66,7 +66,7 @@ public class TSocialFriendBackLog { ...@@ -66,7 +66,7 @@ public class TSocialFriendBackLog {
/** /**
* @Description: 类型1社保增 2社保减 3医保增 4医保减 5推送的日志 6社保图片路径7医保图片路径 * @Description: 类型1社保增 2社保减 3医保增 4医保减 5推送的日志 6社保图片路径7医保图片路径
* 8社保解除劳动合同9医保解除劳动合同11社保增拉取 12社保减拉取 13医保增拉取 14医保减拉取16社保单个图片17医保单个图片 18 反馈附件下载 * 8社保解除劳动合同9医保解除劳动合同11社保增拉取 12社保减拉取 13医保增拉取 14医保减拉取16社保单个图片17医保单个图片 18 反馈附件下载
* 19:花名册附件src 20:税友异常情况记录 * 19:花名册附件src 20:税友异常情况记录21:税友异常情况测试不通过22:税友异常情况测试通过
* @Author: hgw * @Author: hgw
* @Date: 2025/5/27 10:15 * @Date: 2025/5/27 10:15
**/ **/
......
...@@ -593,6 +593,48 @@ public class SocialFriendConfig { ...@@ -593,6 +593,48 @@ public class SocialFriendConfig {
json.put(buyType, cbrymdArr); json.put(buyType, cbrymdArr);
} }
// 测试税友线上信息,慎用
public String getFriendByRequestIdOnlineTest(RestTemplate restTemplate, String requestId, String type) {
if (Common.isEmpty(requestId)) {
return "requestId不可为空";
}
String appKey = "3082B14EE2114C2D93B3A222DD925C26=";
String appSecret = "VmURqoxqmoKnNLXzAWynqQ==";
String appAddUrl = "https://openapi.17win.com";
if (Common.isNotNull(type) && CommonConstants.ONE_STRING.equals(type)) {
appAddUrl += urlGetInfoReduce;
} else {
appAddUrl += urlGetInfoAdd;
}
appAddUrl += "?requestId=" + requestId;
String version = "1.0.0";
String timestamp = String.valueOf(new Date().getTime());
String xReqNonce = "1";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add(APP_KEY, appKey);
headers.add(TIMESTAMP, timestamp);
try {
String signature = SocialFriendSign.qianMing(getMapParam(appKey, appSecret, xReqNonce, version, timestamp, requestId));
headers.add("signature", signature);
} catch (SignatureException e) {
log.error("税友签名失败", e);
return "税友签名失败!";
}
headers.add(X_REQ_NONCE, xReqNonce);
headers.add(VERSION, version);
HttpEntity<String> formEntity = new HttpEntity<>(headers);
ResponseEntity<String> response = restTemplate.exchange(appAddUrl, HttpMethod.GET, formEntity, String.class);
if (Common.isEmpty(response) || Common.isEmpty(response.getBody())) {
throw new CheckedException("获取税友结果失败");
}
int statusCode = response.getStatusCodeValue();
if (statusCode != 200) {
throw new CheckedException("获取税友结果失败,statusCode=" + statusCode);
}
return response.getBody();
}
/** /**
* @param: type 0增加1减少 * @param: type 0增加1减少
* @param: requestId : 请求ID * @param: requestId : 请求ID
......
...@@ -31,10 +31,7 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFriendService; ...@@ -31,10 +31,7 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFriendService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
...@@ -66,6 +63,20 @@ public class TSocialFriendController { ...@@ -66,6 +63,20 @@ public class TSocialFriendController {
return tSocialFriendPushService.test(); return tSocialFriendPushService.test();
} }
@Operation(description = "测试税友接口报错(模拟获取结果)")
@PostMapping("/testToSocialFriendGet")
@SysLog("测试税友接口报错(模拟获取结果)")
public String testToSocialFriendGet() {
return tSocialFriendService.testToSocialFriendGet();
}
@Operation(description = "测试线上税友接口返回值,慎用")
@PostMapping("/testToSocialFriendOnline")
@SysLog("测试线上税友接口返回值,慎用")
public String testToSocialFriendOnline(@RequestParam String requestId, @RequestParam(required = false) String type) {
return tSocialFriendService.testToSocialFriendOnline(requestId, type);
}
@Operation(description = "1定时任务推送税友") @Operation(description = "1定时任务推送税友")
@PostMapping("/inner/doPushFriend") @PostMapping("/inner/doPushFriend")
......
...@@ -38,6 +38,11 @@ public interface TSocialFriendService extends IService<TSocialInfo> { ...@@ -38,6 +38,11 @@ public interface TSocialFriendService extends IService<TSocialInfo> {
**/ **/
R<String> getInfoByRequestId(); R<String> getInfoByRequestId();
// 测试税友接口报错
String testToSocialFriendGet();
// 测试税友接口线上信息,慎用
String testToSocialFriendOnline(String requestId, String type);
@Transactional @Transactional
void changeSocialHandndleStatus(); void changeSocialHandndleStatus();
} }
...@@ -62,6 +62,56 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T ...@@ -62,6 +62,56 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T
private final TSocialFreindSetService tSocialFreindSetService; private final TSocialFreindSetService tSocialFreindSetService;
private final AtomicInteger atomicGetFriend = new AtomicInteger(0); private final AtomicInteger atomicGetFriend = new AtomicInteger(0);
@Override
public String testToSocialFriendOnline(String requestId, String type) {
return socialFriendConfig.getFriendByRequestIdOnlineTest(restTemplate, requestId
, type);
}
@Override
public String testToSocialFriendGet() {
StringBuilder errorInfo = new StringBuilder();
List<TSocialInfo> socialList = tSocialInfoService.getSocialFriendYgsAll();
if (socialList != null && !socialList.isEmpty()) {
TSocialFriendBackLog backLog;
for (TSocialInfo socialInfo : socialList) {
backLog = new TSocialFriendBackLog();
backLog.setSocialId(socialInfo.getEmpIdcard());
backLog.setRequestId(socialInfo.getYgsRequestId());
backLog.setType(21);
tSocialFriendBackLogService.save(backLog);
try {
socialFriendConfig.getFriendByRequestId(restTemplate, socialInfo.getYgsRequestId()
, backLog, socialInfo.getDispatchType());
} catch (Exception e) {
errorInfo.append(socialInfo.getYgsRequestId()).append(";");
}
backLog.setType(22);
tSocialFriendBackLogService.updateById(backLog);
}
}
List<TSocialInfo> socialYsdList = tSocialInfoService.getSocialFriendYsdAll();
if (socialYsdList != null && !socialYsdList.isEmpty()) {
TSocialFriendBackLog backLog;
for (TSocialInfo socialInfo : socialYsdList) {
backLog = new TSocialFriendBackLog();
backLog.setSocialId(socialInfo.getEmpIdcard());
backLog.setRequestId(socialInfo.getYgsRequestId());
backLog.setType(21);
tSocialFriendBackLogService.save(backLog);
try {
socialFriendConfig.getFriendByRequestId(restTemplate, socialInfo.getYgsRequestId()
, backLog, socialInfo.getDispatchType());
} catch (Exception e) {
errorInfo.append(socialInfo.getYgsRequestId()).append(";");
}
backLog.setType(22);
tSocialFriendBackLogService.updateById(backLog);
}
}
return errorInfo.toString();
}
/** /**
* @Description: 5 查看任务进度 * @Description: 5 查看任务进度
* @Author: hgw * @Author: hgw
......
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