|
@@ -14,7 +14,6 @@ import com.qunzhixinxi.hnqz.admin.config.UpmsConfig;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.*;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.input.SettleNoteStatusOutput;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.input.WmScorePackageSettleInput;
|
|
|
-import com.qunzhixinxi.hnqz.admin.enums.GigTypeEnum;
|
|
|
import com.qunzhixinxi.hnqz.admin.enums.PackageTypeEnum;
|
|
|
import com.qunzhixinxi.hnqz.admin.enums.SubjectLocation;
|
|
|
import com.qunzhixinxi.hnqz.admin.enums.SubjectTypeEnum;
|
|
@@ -187,8 +186,15 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
SysUser user = sysUserMapper.selectById(item.getUserId());
|
|
|
item.setRealName(user.getRealname());
|
|
|
item.setIdCardNumber(user.getIdCardNumber());
|
|
|
+ if (item.getSubjectLocation() != null){
|
|
|
+ wmScorePackage.setSubjectLocation(item.getSubjectLocation().name());
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
+ if (StrUtil.isBlank(wmScorePackage.getSubjectLocation())){
|
|
|
+ return R.failed("结算积分包未勾选税源地");
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
Map<String, Object> resultMap = new HashMap<>(3);
|
|
@@ -494,7 +500,9 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
try {
|
|
|
|
|
|
// 获取请求token
|
|
|
- ResponseEntity<String> tokenResult = restTemplate.getForEntity(String.format(GIG_TOKEN_URL, upmsConfig.getGigServiceUrl()), String.class,
|
|
|
+ String url = String.format(GIG_TOKEN_URL, upmsConfig.getGigServiceUrl());
|
|
|
+ log.info("远端请求gig-token:{}", url);
|
|
|
+ ResponseEntity<String> tokenResult = new RestTemplate().getForEntity(url, String.class,
|
|
|
String.valueOf(operator.getDeptId()), "settle", String.valueOf(operator.getId()));
|
|
|
log.warn("获取结算token:{}", tokenResult.getBody());
|
|
|
if (!JSONUtil.isJson(tokenResult.getBody())) {
|
|
@@ -533,6 +541,7 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
params.put("endType", "CSO");
|
|
|
params.put("enterpriseCode", taxCode);
|
|
|
params.put("subjectType", "OLADING");
|
|
|
+ params.put("subjectLocation", input.getSubjectLocation().getType());
|
|
|
params.put("taskDescription", "根据要求,执行、并完成学术推广活动,并以在线平台工具采集、记录活动内容");
|
|
|
params.put("acceptanceStandard", "完成不同任务获得不同任务积分,根据不同任务给与0~30000积分,每个积分兑换0.8~1.2元,按次数结算");
|
|
|
|
|
@@ -550,9 +559,11 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
|
|
|
}
|
|
|
|
|
|
// 发起结算
|
|
|
+ String url1 = String.format(GIG_SETTLE_URL, upmsConfig.getGigServiceUrl());
|
|
|
+ log.info("远端请求gig-settle:{}", url);
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
- HttpEntity<String> result = restTemplate.exchange(String.format(GIG_SETTLE_URL, upmsConfig.getGigServiceUrl()), HttpMethod.POST, new HttpEntity<>(params, headers), String.class);
|
|
|
+ HttpEntity<String> result = new RestTemplate().exchange(url1, HttpMethod.POST, new HttpEntity<>(params, headers), String.class);
|
|
|
log.warn("阿拉丁结算: {}", result.getBody());
|
|
|
if (!JSONUtil.isJson(result.getBody())) {
|
|
|
return R.failed("结算失败");
|