|
|
|
@ -7,7 +7,10 @@ import cn.hutool.core.collection.CollectionUtil; |
|
|
|
|
import cn.hutool.core.map.MapUtil; |
|
|
|
|
import cn.hutool.json.JSONNull; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.Query; |
|
|
|
|
import com.jianshui.common.core.redis.RedisCache; |
|
|
|
|
import com.jianshui.common.utils.BeanToMapUtils; |
|
|
|
|
import com.jianshui.common.utils.spring.SpringUtils; |
|
|
|
|
import com.jianshui.invoice.constant.elephant.ElephantConstants; |
|
|
|
|
import com.jianshui.invoice.domain.dto.api.*; |
|
|
|
|
import com.jianshui.invoice.domain.dto.api.jcsk.*; |
|
|
|
|
|
|
|
|
@ -268,6 +271,7 @@ public class JcskInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 发票打印 |
|
|
|
|
* |
|
|
|
@ -889,7 +893,7 @@ public class JcskInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
|
|
|
|
|
FileQueryTWODTO fileQueryTWODTO = new FileQueryTWODTO(); |
|
|
|
|
FileQueryJsonDataTWODTO fileQueryJsonDataTWODTO = BeanUtil.copyProperties(invoiceAllFileQueryTWODTO, FileQueryJsonDataTWODTO.class); |
|
|
|
|
fileQueryTWODTO.setJsondata(fileQueryJsonDataTWODTO); |
|
|
|
|
fileQueryTWODTO.setJsonData(fileQueryJsonDataTWODTO); |
|
|
|
|
|
|
|
|
|
// 查询用户信息组装
|
|
|
|
|
InvoiceAllYhdj yhdj = getUserInfo(companyservice); |
|
|
|
@ -1588,10 +1592,23 @@ public class JcskInvoiceApiServiceImpl implements IInvoiceApiService { |
|
|
|
|
*/ |
|
|
|
|
public InvoiceAllYhdj getUserInfo(Companyservice companyservice) { |
|
|
|
|
|
|
|
|
|
String identity = companyservice.getIdentity(); |
|
|
|
|
String sellertax = companyservice.getSellertax(); |
|
|
|
|
|
|
|
|
|
RedisCache redisCache = SpringUtils.getBean(RedisCache.class); |
|
|
|
|
JSONObject yhdjObj = redisCache.getCacheObject(WebServiceConstant.TOKEN_KEY + sellertax + "_"+ identity); |
|
|
|
|
|
|
|
|
|
// TODO: 2023/5/17 急急急
|
|
|
|
|
// JSONObject obj = JSONObject.parseObject(info);
|
|
|
|
|
// Long exprieTime = System.currentTimeMillis();
|
|
|
|
|
// exprieTime = exprieTime + (int) obj.get("expires_in") * 1000L; // 过期时间
|
|
|
|
|
// obj.put("exprieTime", exprieTime);
|
|
|
|
|
// redisCache.setCacheObject(ElephantConstants.TOKEN_REDIS_KEY + "appkey:" + appkey, obj);
|
|
|
|
|
|
|
|
|
|
// 查询用户登记参数
|
|
|
|
|
QueryWrapper<InvoiceAllYhdj> yhdjQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
yhdjQueryWrapper.eq("nsrsbh", companyservice.getSellertax()); |
|
|
|
|
yhdjQueryWrapper.eq("identity", companyservice.getIdentity()); |
|
|
|
|
yhdjQueryWrapper.eq("nsrsbh", sellertax); |
|
|
|
|
yhdjQueryWrapper.eq("identity", identity); |
|
|
|
|
InvoiceAllYhdj invoiceAllYhdj = yhdjMapper.selectOne(yhdjQueryWrapper); |
|
|
|
|
|
|
|
|
|
return invoiceAllYhdj; |
|
|
|
|