ariesy 修改进项bug v5 解决导出遗留问题

release
yefei 2 years ago
parent 5fe8b27433
commit a66310ee08
  1. 8
      dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java
  2. 1
      dxhy-base/src/main/java/com/dxhy/base/service/receipt/BaseReceiptOutServiceImpl.java
  3. 5
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  4. 35
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
  5. 24
      dxhy-core/src/main/java/com/dxhy/core/controller/ExcelController.java
  6. 5
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/CustomsServiceImpl.java
  7. 10
      dxhy-core/src/main/java/com/dxhy/core/service/singletable/IExcelExportlogService.java
  8. 6
      dxhy-core/src/main/java/com/dxhy/core/service/singletable/impl/ExcelExportlogServiceImpl.java
  9. 2
      dxhy-core/src/main/java/com/dxhy/core/thread/PoolAddTaxThread.java
  10. 3
      dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java

@ -65,6 +65,7 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
@Override
public String selectByManualCheck(Map<String, Object> pramsMap, int curr, int size) {
log.info("入参是:{}",pramsMap);
JSONObject json;
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
@ -125,7 +126,7 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
List<BaseTDxRecordInvoice> pageList = super.baseMapper.selectSggxcx(pramsMap);
PageInfo<BaseTDxRecordInvoice> pageInfo = new PageInfo<>(pageList);
log.info("查询的发票list为:{}",pageList);
log.info("返回的列表为:{}",pageList);
// 转化为页面展示对象
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@ -162,8 +163,6 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
}
}
log.info("11111111111111111111111111111111");
String businessCode = pageList.get(i).getDeptId();
String businessName = this.getBusinessName(businessCode, businessList);
@ -206,7 +205,6 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
vo.setBusinessName(businessName);
vo.setEleInvoiceNo(pageList.get(i).getEleInvoiceNo());
String dkzt= dictdetaServcice.queryDictName(DictConstant.DK_STATUS,pageList.get(i).getInAccountStatus());
log.info("抵扣状态dkzt={}",dkzt);
pageList.get(i).setInAccountStatus(dkzt);
vo.setInAccountStatus(dkzt);
vo.setSelect(true);
@ -214,8 +212,6 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
vo.setSelect(false);
}
log.info("返回的发票信息是:{}",pageList.get(i));
String invoiceStatus="07";
if ( pageList.get(i).getInvoiceStatus() != null && !invoiceStatus.contains(pageList.get(i).getInvoiceStatus())
|| pageList.get(i).getInvoiceAmount() != null && pageList.get(i).getInvoiceAmount().compareTo(new BigDecimal(0)) < 0

@ -646,6 +646,7 @@ public class BaseReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutD
// 转出金额
vo.setOutAmount(AmountFormatUtil.fmtMicrometer(MathUtil.round(record.getOutInvoiceAmout().toPlainString())));
// 转出税额
if (record.getOutTaxAmount() != null)
vo.setOutTax(AmountFormatUtil.fmtMicrometer(MathUtil.round(record.getOutTaxAmount().toPlainString())));
vo.setRemark(record.getOutRemark());
vo.setOutDate(DateUtils.dateToStr(record.getOutDate()));

@ -79,14 +79,11 @@
<if test="voucherNumber != null and voucherNumber != ''">
and t.voucher_number like concat('%',concat(#{voucherNumber},'%'))
</if>
<if test="qszt != null and qszt != '' and qszt != 'null'">
<if test="qszt != null and qszt != '' and qszt != 'null' and qszt != '99'">
and t.qs_status = #{qszt}
</if>
<if test="qsfs != null and qsfs != '' and qsfs != 'null'">
and t.qs_type = #{qsfs}
</if>
<if test="qszt != null and qszt != '' and qszt != 'null'">
and t.qs_status = #{qszt}
</if>
<if test="wrzfpStart != null and wrzfpStart != '' and wrzfpStart != 'null' and wrzfpEnd != null and wrzfpEnd != '' and wrzfpEnd != 'null'">
and rzh_yesorno = '0' and date_format(t.invoice_date,'%Y-%m-%d') between #{wrzfpStart} and #{wrzfpEnd}

@ -164,13 +164,25 @@
<if test="eleInvoiceNo!=null and eleInvoiceNo!='' and eleInvoiceNo!='null'">
and t.ele_invoice_no = #{eleInvoiceNo}
</if>
<if
test="qsksrq != null and qsksrq != '' and qsksrq != 'null' and qsjsrq != null and qsjsrq != '' and qsjsrq != 'null'">
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if test="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'">
and t.postingTime = #{postingTime}
</if>
<if test="imageId != null and imageId != '' and imageId != 'null' and imageId != '99'">
and t.image_id = #{imageId}
</if>
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<if test="qsksrq != null and qsksrq != '' and qsksrq != 'null' and qsjsrq != null and qsjsrq != '' and qsjsrq != 'null'">
order by t.qs_date desc,t.invoice_date desc
</if>
<if test="qsksrq==null or qsksrq=='' or qsjsrq==null or qsjsrq==''">
order by t.invoice_date desc
</if>
</select>
<select id="selectDksh" parameterType="java.util.Map"
resultType="com.dxhy.base.entity.BaseTDxDkCount"
@ -313,6 +325,21 @@
<if test='inAccountStatus!=null and inAccountStatus!="" and inAccountStatus !="99"'>
and t.in_account_status = #{inAccountStatus}
</if>
<if test="eleInvoiceNo!=null and eleInvoiceNo!='' and eleInvoiceNo!='null'">
and t.ele_invoice_no = #{eleInvoiceNo}
</if>
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if test="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'">
and t.postingTime = #{postingTime}
</if>
<if test="imageId != null and imageId != '' and imageId != 'null' and imageId != '99'">
and t.image_id = #{imageId}
</if>
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<if
test="qsksrq != null and qsksrq != '' and qsksrq != 'null' and qsjsrq != null and qsjsrq != '' and qsjsrq != 'null'">
order by t.qs_date desc,t.invoice_date desc
@ -320,9 +347,7 @@
<if test="qsksrq==null or qsksrq=='' or qsjsrq==null or qsjsrq==''">
order by t.invoice_date desc
</if>
<if test="eleInvoiceNo!=null and eleInvoiceNo!='' and eleInvoiceNo!='null'">
and t.ele_invoice_no = #{eleInvoiceNo}
</if>
</select>
<select id="selectHj" parameterType="java.util.Map"

@ -7,6 +7,8 @@ import java.util.Map;
import javax.annotation.Resource;
import com.dxhy.core.dao.ExtMessageControlDao;
import com.dxhy.core.entity.ExtSysMessagecontrolVo;
import com.dxhy.core.feign.IFeginWebsocket;
import com.dxhy.core.service.ExtMessageControlService;
import com.dxhy.core.service.export.IExcelExportService;
@ -50,6 +52,9 @@ public class ExcelController extends AbstractController {
@Resource
private ExtMessageControlService messageControlService;
@Resource
private ExtMessageControlDao extMessageControlDao;
@Resource
private Sender sender;
@ -238,10 +243,12 @@ public class ExcelController extends AbstractController {
}
log.debug("pramsMap-" + pramsMap);
try {
// 保存导出日志记录
TDxExcelExportlog tdxExcelExprortlog = exportlogService.excelExportApply(pramsMap);
pramsMap.put("id", tdxExcelExprortlog.getId());
Long id = tdxExcelExprortlog.getId();
pramsMap.put("id", id);
pramsMap.put("createDate", new Date());
JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(pramsMap));
// String json = responseResult(jsonObject);
@ -249,7 +256,7 @@ public class ExcelController extends AbstractController {
// sender.sendToExcel(json);
excelExportService.exportExcel(jsonObject.toJSONString());
waitResult();
waitResult(id);
Map<String, Object> returnMap = new HashMap<>(2);
returnMap.put("id",tdxExcelExprortlog.getId());
@ -267,13 +274,16 @@ public class ExcelController extends AbstractController {
}
}
private void waitResult() throws InterruptedException {
int count = 0;
for(int i = 0;i<20;i++) {
count = messageControlService.queryCount(getUserName());
if(count > 0){
private void waitResult(Long id) throws InterruptedException {
for(int i = 0;i<200;i++) {
TDxExcelExportlog tDxExcelExportlog = exportlogService.selectById(id);
if(tDxExcelExportlog != null) {
String filepath = tDxExcelExportlog.getFilepath();
log.info("filepath={}",filepath);
if (filepath != null && StringUtils.isNotBlank(filepath)) {
break;
}
}
Thread.sleep(1000);
}
}

@ -44,6 +44,7 @@ public class CustomsServiceImpl extends MpBaseServiceImpl<CustomsDao, JkszhcxRes
try {
PageHelper.startPage(curr, size);
List<JkszhcxRespVO> pageList = super.baseMapper.selectByPramsMap(pramsMap);
PageInfo<JkszhcxRespVO> pageInfo = new PageInfo<>(pageList);
json.put("hasNext", pageInfo.isHasNextPage());
json.put("nextPage", pageInfo.getNextPage());
@ -55,7 +56,7 @@ public class CustomsServiceImpl extends MpBaseServiceImpl<CustomsDao, JkszhcxRes
if (pageList.size() > 0) {
for (int i = 0; i < pageList.size(); i++) {
JkszhcxRespVO vo = pageList.get(i);
String[] dataArray = new String[28];
String[] dataArray = new String[32];
// xh
dataArray[0] = String.valueOf((curr - 1) * size + i + 1);
// 缴款书号码
@ -103,6 +104,7 @@ public class CustomsServiceImpl extends MpBaseServiceImpl<CustomsDao, JkszhcxRes
dataArray[19] = dictdetaServcice.queryDictName(DictConstant.QS_TYPE, vo.getQsType());
// 签收状态
dataArray[20] = dictdetaServcice.queryDictName(DictConstant.QS_STATUS, vo.getQsStatus());
// 签收日期
dataArray[21] = vo.getQsDate();
// 签收人
@ -113,6 +115,7 @@ public class CustomsServiceImpl extends MpBaseServiceImpl<CustomsDao, JkszhcxRes
// 入账状态
dataArray[24] =
dictdetaServcice.queryDictName(DictConstant.INACCOUNT_STATUS, vo.getInAccountStatus());
// 凭证号
dataArray[25] = vo.getVoucherNumber();
// 业务单元

@ -78,4 +78,14 @@ public interface IExcelExportlogService extends MpBaseService<TDxExcelExportlog>
* @return com.dxhy.core.entity.TDxExcelExportlog
*/
TDxExcelExportlog excelExportApply(Map<String, Object> pramsMap);
/**
* 功能描述
*
* @author 陈刚扬
* @date 2020/10/29
* @param pramsMap
* @return com.dxhy.core.entity.TDxExcelExportlog
*/
TDxExcelExportlog selectById(Long id);
}

@ -107,4 +107,10 @@ public class ExcelExportlogServiceImpl extends MpBaseServiceImpl<TDxExcelExportl
return exportLog;
}
@Override
public TDxExcelExportlog selectById(Long id) {
TDxExcelExportlog tDxExcelExportlog = super.baseMapper.selectById(id);
return tDxExcelExportlog;
}
}

@ -67,7 +67,7 @@ public class PoolAddTaxThread extends BaseThread {
*/
private final String[] titleColumns = {"序号", "发票类型", "发票代码", "发票号码", "发票状态", "开票日期", "销方名称", "销方税号", "金额", "税额",
"有效税额", "价税合计", "认证状态", "认证类型", "认证日期", "认证方式", "认证人", "采集状态", "底账库采集时间", "采集来源", "签收方式", "签收状态", "签收日期", "签收人",
"入账月份", "入账状态", "凭证号", "是否末次摊销", "摊销金额", "剩余金额", "业务单号", "入池时间","凭证号","账时间","账期","影像id"};
"入账月份", "入账状态", "凭证号", "是否末次摊销", "摊销金额", "剩余金额", "业务单号", "入池时间","凭证号","账时间","账期","影像id"};
/**
* 导出excel的列名

@ -137,6 +137,8 @@ public class SDNYMainProcessController extends AbstractController {
data.put("data", checkInvoice);
return ResponseEntity.ok(JSONObject.toJSONString(data));
}else{
}
@ -368,7 +370,6 @@ public class SDNYMainProcessController extends AbstractController {
info.setZSKPH(snInvoice.getMachineCode());
info.setZGFZH(snInvoice.getPurchaserBank());
info.setZBZ(snInvoice.getRemarks());
System.out.println(info.getZGXR());
List<SNInvoiceDetail> invoiceLineList = snInvoice.getInvoiceLineList();
List<SAPInvoiceDetail> sapInvoiceDetailList = new ArrayList<>();
if (invoiceLineList != null && invoiceLineList.size() > 0) {

Loading…
Cancel
Save