|
|
|
@ -9,6 +9,7 @@ import com.dxhy.common.service.TabulateRedisService; |
|
|
|
|
import com.dxhy.common.service.impl.MpBaseServiceImpl; |
|
|
|
|
import com.dxhy.common.util.AmountFormatUtil; |
|
|
|
|
import com.dxhy.common.util.MathUtil; |
|
|
|
|
import com.dxhy.common.util.UserInfoUtil; |
|
|
|
|
import com.dxhy.common.vo.DictdetaModel; |
|
|
|
|
import com.dxhy.core.dao.ViolationLogDao; |
|
|
|
|
import com.dxhy.core.entity.EnterpriseInfoModel; |
|
|
|
@ -36,7 +37,7 @@ import java.util.*; |
|
|
|
|
* @date 2020/12/31 |
|
|
|
|
*/ |
|
|
|
|
@Slf4j |
|
|
|
|
@Service |
|
|
|
|
@Service("SupplierRiskService") |
|
|
|
|
public class SupplierRiskServiceImpl extends MpBaseServiceImpl<ViolationLogDao, ViolationLogModel> |
|
|
|
|
implements SupplierRiskService { |
|
|
|
|
|
|
|
|
@ -150,11 +151,14 @@ public class SupplierRiskServiceImpl extends MpBaseServiceImpl<ViolationLogDao, |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public String selectRiskSupplier2(Map<String, Object> pramsMap) { |
|
|
|
|
|
|
|
|
|
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ); |
|
|
|
|
//获取购方税号对应的供应商风险信息
|
|
|
|
|
String result = ""; |
|
|
|
|
log.info("请求供应商风险的参数为:{}",pramsMap); |
|
|
|
|
List<RiskSupplierVO> pageList = super.baseMapper.selectRiskSupplier(pramsMap); |
|
|
|
|
|
|
|
|
|
log.info("pageList:{}",pageList); |
|
|
|
|
for (RiskSupplierVO risk : pageList) { |
|
|
|
|
String taxNo = risk.getTaxNo(); |
|
|
|
|
Map<String, Object> prams = new HashMap<>(); |
|
|
|
@ -162,6 +166,7 @@ public class SupplierRiskServiceImpl extends MpBaseServiceImpl<ViolationLogDao, |
|
|
|
|
|
|
|
|
|
List<ViolationLogModel> violationLogModels = super.baseMapper.selectRiskSupplierInfo(prams); |
|
|
|
|
|
|
|
|
|
log.info("返回违规信息为:{}",violationLogModels); |
|
|
|
|
//构建FI870参数
|
|
|
|
|
SNSAPObject object = new SNSAPObject(); |
|
|
|
|
object.setSYSID("FPXT"); |
|
|
|
@ -169,7 +174,7 @@ public class SupplierRiskServiceImpl extends MpBaseServiceImpl<ViolationLogDao, |
|
|
|
|
object.setBSKEY(UUID.randomUUID().toString().replace("-", "")); |
|
|
|
|
object.setZFILED5("200"); |
|
|
|
|
|
|
|
|
|
List<String> risks = new ArrayList<>(); |
|
|
|
|
List<SupplierRisk> risks = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
if (violationLogModels != null && violationLogModels.size() > 0) { |
|
|
|
|
for (ViolationLogModel violation : violationLogModels) { |
|
|
|
@ -180,12 +185,10 @@ public class SupplierRiskServiceImpl extends MpBaseServiceImpl<ViolationLogDao, |
|
|
|
|
riskInfo.setZWFSD(violation.getBreakLawMethod()); |
|
|
|
|
riskInfo.setZWGLX(violation.getBreakLawType()); |
|
|
|
|
|
|
|
|
|
risks.add(JSONObject.toJSONString(riskInfo)); |
|
|
|
|
} |
|
|
|
|
risks.add(riskInfo); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
object.setZDATA(risks); |
|
|
|
|
|
|
|
|
|
object.setZDATA(JSONObject.toJSONString(risks)); |
|
|
|
|
JSONObject request = new JSONObject(); |
|
|
|
|
request.put("IS_INPUT", object); |
|
|
|
|
|
|
|
|
@ -194,6 +197,7 @@ public class SupplierRiskServiceImpl extends MpBaseServiceImpl<ViolationLogDao, |
|
|
|
|
result = HttpRequestUtils.sendPo(snYxUrl, request.toJSONString(), userName, password); |
|
|
|
|
log.info("获取返回信息:{}", result); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|