|
@@ -1,6 +1,7 @@
|
|
|
package com.bz.smart_city.service.impl.pay;
|
|
|
|
|
|
import com.bz.smart_city.commom.exception.ServiceException;
|
|
|
+import com.bz.smart_city.commom.model.Pagination;
|
|
|
import com.bz.smart_city.commom.model.ResultStatus;
|
|
|
import com.bz.smart_city.commom.util.UserUtil;
|
|
|
import com.bz.smart_city.dao.pay.PayBaseConfigMapper;
|
|
@@ -15,6 +16,7 @@ import com.bz.smart_city.entity.pay.PaySysDict;
|
|
|
import com.bz.smart_city.service.pay.PayBaseConfigService;
|
|
|
import com.bz.smart_city.service.pay.PayInvoiceParamService;
|
|
|
import com.bz.smart_city.service.pay.PaySysDictService;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -128,6 +130,70 @@ public class PayInvoiceParamServiceImpl implements PayInvoiceParamService {
|
|
|
return payInvoiceParams;
|
|
|
}
|
|
|
|
|
|
+ public Pagination<PayInvoiceParam> findPage(String queryparam, int pageNum, int pageSize){
|
|
|
+ LoginUser loginUser = UserUtil.getCurrentUser();
|
|
|
+
|
|
|
+
|
|
|
+ BigInteger siteId = BigInteger.valueOf(loginUser.getSiteId());
|
|
|
+ BigInteger customerId = BigInteger.valueOf(loginUser.getCustomerId());
|
|
|
+ //发票销售方设置参数
|
|
|
+ try {
|
|
|
+ PayBaseConfigDto payBaseConfig = new PayBaseConfigDto();
|
|
|
+ payBaseConfig.setCnname("销售方电话");
|
|
|
+ payBaseConfig.setName("PRINT_INVOICE_PHONE");
|
|
|
+ payBaseConfig.setType("0");
|
|
|
+ payBaseConfigService.add(payBaseConfig);
|
|
|
+
|
|
|
+ payBaseConfig.setCnname("身份认证");
|
|
|
+ payBaseConfig.setName("PRINT_INVOICE_IDENTITY ");
|
|
|
+ payBaseConfig.setType("0");
|
|
|
+ payBaseConfigService.add(payBaseConfig);
|
|
|
+
|
|
|
+ payBaseConfig.setCnname("复核人");
|
|
|
+ payBaseConfig.setName("PRINT_INVOICE_CHECKER ");
|
|
|
+ payBaseConfig.setType("0");
|
|
|
+ payBaseConfigService.add(payBaseConfig);
|
|
|
+
|
|
|
+ payBaseConfig.setCnname("销售方纳税人识别号");
|
|
|
+ payBaseConfig.setName("PRINT_INVOICE_ADMINISTERNUM");
|
|
|
+ payBaseConfig.setType("0");
|
|
|
+ payBaseConfigService.add(payBaseConfig);
|
|
|
+
|
|
|
+ payBaseConfig.setCnname("销售方名称");
|
|
|
+ payBaseConfig.setName("PRINT_INVOICE_ADMINISTERNAME");
|
|
|
+ payBaseConfig.setType("0");
|
|
|
+ payBaseConfigService.add(payBaseConfig);
|
|
|
+
|
|
|
+ payBaseConfig.setCnname("销售方地址");
|
|
|
+ payBaseConfig.setName("PRINT_INVOICE_ADDRESS");
|
|
|
+ payBaseConfig.setType("0");
|
|
|
+ payBaseConfigService.add(payBaseConfig);
|
|
|
+
|
|
|
+ payBaseConfig.setCnname("销售方银行账号");
|
|
|
+ payBaseConfig.setName("PRINT_INVOICE_ACCEPTERBANKNUM");
|
|
|
+ payBaseConfig.setType("0");
|
|
|
+ payBaseConfigService.add(payBaseConfig);
|
|
|
+
|
|
|
+ payBaseConfig.setCnname("销售方公共推送邮箱");
|
|
|
+ payBaseConfig.setName("PRINT_EMAIL");
|
|
|
+ payBaseConfig.setType("0");
|
|
|
+ payBaseConfigService.add(payBaseConfig);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ //异常不处理,可手动添加
|
|
|
+ }
|
|
|
+
|
|
|
+ //发票参数
|
|
|
+ //分页
|
|
|
+ PageHelper.startPage(pageNum,pageSize);
|
|
|
+ List<PayInvoiceParam> payInvoiceParams = payInvoiceParamMapper.findList(queryparam, siteId, customerId);
|
|
|
+ if (payInvoiceParams.size() == 0) {
|
|
|
+ batchInsert();
|
|
|
+ payInvoiceParams = payInvoiceParamMapper.findList(queryparam, siteId, customerId);
|
|
|
+ }
|
|
|
+ return new Pagination<>(payInvoiceParams);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public List<PayInvoiceParam> findList(String queryparam, Integer siteId, Integer customerId) {
|
|
|
//发票参数
|