Merge remote-tracking branch 'origin/release' into release

release
yefei 2 years ago
commit 1596a4d473
  1. 1
      dxhy-base/src/main/java/com/dxhy/base/model/BaseReceiptOutCancelRespVO.java
  2. 1
      dxhy-base/src/main/java/com/dxhy/base/service/receipt/BaseReceiptOutServiceImpl.java
  3. 26
      dxhy-erp/src/main/java/com/dxhy/erp/controller/InterfaceController.java
  4. 2
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/ReceiptOutServiceImpl.java
  5. 18
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java
  6. 92
      dxhy-extend/src/main/java/com/dxhy/extend/controller/VouncherSyncController.java
  7. 1
      dxhy-extend/src/main/java/com/dxhy/extend/entity/ExtAddTaxInvoice.java
  8. 3
      dxhy-extend/src/main/java/com/dxhy/extend/entity/ExtOtherInvoice.java
  9. 6
      dxhy-extend/src/main/java/com/dxhy/extend/entity/ExtTicketInvoiceModel.java
  10. 6
      dxhy-extend/src/main/java/com/dxhy/extend/entity/PullRecordReq.java
  11. 14
      dxhy-extend/src/main/java/com/dxhy/extend/service/companypool/TicketServiceImpl.java
  12. 58
      dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java
  13. 6
      dxhy-extend/src/main/resources/mapper/ExtBbycfpcxMapper.xml
  14. 146
      dxhy-extend/src/main/resources/mapper/ExtInvoicePoolMapper.xml
  15. 34
      dxhy-extend/src/main/resources/mapper/TicketMapper.xml
  16. 10
      dxhy-sign/src/main/java/com/dxhy/sign/service/fpqs/impl/FpqsServiceImpl.java

@ -76,5 +76,6 @@ public class BaseReceiptOutCancelRespVO extends BaseBaseRespVO {
private String remark;
private String outBelongDate;
private String outResource;
}

@ -650,6 +650,7 @@ public class BaseReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutD
vo.setOutTax(AmountFormatUtil.fmtMicrometer(MathUtil.round(record.getOutTaxAmount().toPlainString())));
vo.setRemark(record.getOutRemark());
vo.setOutDate(DateUtils.dateToStr(record.getOutDate()));
vo.setOutResource(record.getOutResource());
vo.setOutBelongDate(record.getOutBelongDate());
// 转出原因
QueryWrapper<BaseTDxOutReason> query = new QueryWrapper<>();

@ -35,6 +35,7 @@ import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@ -1218,6 +1219,31 @@ public class InterfaceController extends AbstractController {
public String transferOut(ErpInvoiceData erpInvoiceData){
String zdata = erpInvoiceData.getIS_INPUT().getZDATA();
List<Map> list = JSON.parseArray(zdata, Map.class);
for(Map<String ,Object> map:list){
String invoiceCode =(String) map.get("ZFPDM");
String invoiceNo = (String)map.get("ZFPHM");
String uuid = invoiceCode+invoiceNo;
String[] ids = uuid.split(",");
DynamicContextHolder.push("business"+DbConstant.BUSINESS_READ);
List<BaseTDxRecordInvoice> invoices = baseIReceiptInvoiceService.selectByUuids(ids);
OutPut outPut = new OutPut();
EsOutPutResp es = new EsOutPutResp();
es.setSAPKEY(erpInvoiceData.getIS_INPUT().getSAPKEY());
es.setBSKEY(erpInvoiceData.getIS_INPUT().getBSKEY());
es.setZTYPE("S");
es.setZMESSAGE("处理成功");
if(CollectionUtils.isEmpty(invoices)){
es.setZTYPE("E");
es.setZMESSAGE("底账数据不存在");
outPut.setES_OUTPUT(es);
return JsonUtils.getInstance().toJsonString(outPut);
}else if(!invoices.get(0).getAuthStatus().equals("4")){
es.setZTYPE("E");
es.setZMESSAGE("发票状态不是认证成功不允许转出");
outPut.setES_OUTPUT(es);
return JsonUtils.getInstance().toJsonString(outPut);
}
}
try{

@ -135,6 +135,7 @@ public class ReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutDao,
// 税款所属期
condRecord.setOutBelongDate(condVO.getOutTaxPeriod());
if(record.getTaxAmount().compareTo(new BigDecimal(condVO.getOutTax()))==1){
condRecord.setOutStatus("2");
condVO.setOutStatus("2");
}
/*全部转出 */
@ -181,6 +182,7 @@ public class ReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutDao,
}
return condList;
}
/**
* 构建进项税转出明细
*

@ -4,11 +4,13 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import com.dxhy.auth.client.annotation.IgnoreClientToken;
import com.dxhy.auth.client.annotation.IgnoreUserToken;
import com.dxhy.common.vo.TaxOrgCode;
import com.dxhy.extend.entity.PullRecordReq;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
@ -221,6 +223,11 @@ public class ExtInvoicePoolController extends AbstractController {
&& !"1".equals(pramsMap.get("inAccountStatus"))) {
pramsMap.put("inAccountMonth", "");
}
if (pramsMap.get("accountPeriod") != null && !"".equals(pramsMap.get("accountPeriod"))) {
String accountPeriod = pramsMap.get("accountPeriod").toString().substring(0,7);
pramsMap.put("accountPeriod", accountPeriod);
log.info("accountPeriod:{}",accountPeriod);
}
int curr = (int)pramsMap.get("curr");
int size = (int)pramsMap.get("size");
try {
@ -253,11 +260,18 @@ public class ExtInvoicePoolController extends AbstractController {
/**
* 拉取记录列表获取
*/
@IgnoreClientToken
@IgnoreUserToken
@RequestMapping("getPullRecordList")
public ResponseEntity<R> getPullRecordList(@RequestBody PullRecordReq pullRecordReq){
try{
if(pullRecordReq.getSm().equals("99")){
pullRecordReq.setSm("");
}
if(pullRecordReq.getCompanyCode().equals("99")){
List<TaxOrgCode> orgCodes = getUserInfo().getOrgCodes();
List<String> collect = orgCodes.stream().map(TaxOrgCode::getOrgCode).collect(Collectors.toList());
pullRecordReq.setOrgCode(collect);
}
return ResponseEntity.ok(R.ok().put("data",extInvoicePoolService.selectPullRecord(pullRecordReq)));
}catch (Exception e){
e.printStackTrace();

@ -34,62 +34,70 @@ public class VouncherSyncController {
//是否全量 X为全量推送,空为增量推送。
//全量推送逻辑为 查询出的符合条件的凭证全部推送,全量推送不再检查是否在自定义表中已传输。
//增量推送,已传输的凭证数据不再推送(检查传输记录表是否已传输成功)
/**
* 传参逻辑 必传 期间只能传一个月的
*
*/
String ifAll=map.get("ifAll");
//公司代码
try{
String companyCode = map.get("companyCode");
//开始日期
String startTime= map.get("startTime");
String endTime = map.get("endTime");
if(startTime!=null && startTime!=""){
startTime=startTime.replace("-","");
}
if(endTime!=null && endTime!=""){
endTime=endTime.replace("-","");
}
//结束日期
String month=map.get("monat");
//GJAHR nian
String gjahr=map.get("gjahr");
String[] split = companyCode.split(",");
StringBuilder sb = new StringBuilder();
for (String str:split){
/**
* 传参逻辑 必传 期间只能传一个月的
*
*/
String ifAll=map.get("ifAll");
//公司代码
//开始日期
String startTime= map.get("startTime");
String endTime = map.get("endTime");
if(startTime!=null && startTime!=""){
startTime=startTime.replace("-","");
}
if(endTime!=null && endTime!=""){
endTime=endTime.replace("-","");
}
//结束日期
String month=map.get("monat");
//GJAHR nian
String gjahr=map.get("gjahr");
SNSAPObject object = new SNSAPObject();
object.setSYSID("FPXT");
object.setIFYWID("FI842");
object.setBSKEY(UUID.randomUUID().toString().replace("-", ""));
//object.setSAPKEY("");
SNSAPObject object = new SNSAPObject();
object.setSYSID("FPXT");
object.setIFYWID("FI842");
object.setBSKEY(UUID.randomUUID().toString().replace("-", ""));
//object.setSAPKEY("");
// object.setZFILED1("");
// object.setZFILED2("");
// object.setZFILED3("");
// object.setZFILED4("");
object.setZFILED5("200");
Map<String,String> requestMap = new HashMap<>();
List<Object> list = new ArrayList<>();
requestMap.put("ZGSDM",companyCode);
requestMap.put("GJAHR",gjahr);
requestMap.put("MONAT",month);
requestMap.put("ZDATEF",startTime);
requestMap.put("ZDATET",endTime);
requestMap.put("ZFLAG",ifAll);
object.setZDATA(JSONObject.toJSONString(requestMap));
JSONObject request = new JSONObject();
request.put("IS_INPUT",object);
try{
object.setZFILED5("200");
Map<String,String> requestMap = new HashMap<>();
List<Object> list = new ArrayList<>();
requestMap.put("ZGSDM",companyCode);
requestMap.put("GJAHR",gjahr);
requestMap.put("MONAT",month);
requestMap.put("ZDATEF",startTime);
requestMap.put("ZDATET",endTime);
requestMap.put("ZFLAG",ifAll);
object.setZDATA(JSONObject.toJSONString(requestMap));
JSONObject request = new JSONObject();
request.put("IS_INPUT",object);
String s = vouncherSyncService.sendPo(JSONObject.toJSONString(request));
Map map1 = JSONObject.parseObject(s, Map.class);
Map output = (Map)map1.get("ES_OUTPUT");
String ztype =(String) output.get("ZTYPE");
if(ztype.equals("S")){
return ResponseEntity.ok(R.ok().put("data","数据拉取成功"));
}else {
return ResponseEntity.ok(R.error((String)output.get("ZDATA")));
sb.append(str+output.get("ZDATA"));
}
}
if(sb.length()>0){
return ResponseEntity.ok(R.ok().put("data",sb));
}else{
return ResponseEntity.ok(R.ok().put("data","拉取成功"));
}
}catch (Exception e ){
e.printStackTrace();
return ResponseEntity.ok(R.error(CommonConstants.MSG_ERR_DEFAULT));

@ -138,4 +138,5 @@ public class ExtAddTaxInvoice implements Serializable {
private String imageNumber;
private String accountPeriod;
private String compCode;
private String bzdh;
}

@ -66,4 +66,7 @@ public class ExtOtherInvoice implements Serializable {
private String postingTime;
private String imageId;
private String accountPeriod;
private String inAccountStatus;
private String bzdh;
private String snVoucherNumber;
}

@ -2,6 +2,7 @@ package com.dxhy.extend.entity;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
/**
@ -102,8 +103,13 @@ public class ExtTicketInvoiceModel implements Serializable {
private String snVoucherNumber;
private String voucherNumber;
private String postingTime;
@TableField("image_id")
private String imageId;
private String accountPeriod;
private String compCode;
private String bzdh;
@TableField("inaccount_status")
private String inAccountStatus;
}

@ -2,12 +2,16 @@ package com.dxhy.extend.entity;
import lombok.Data;
import java.util.List;
/**
* @Author wangzhikun
* @Date 2023/4/14 2023/4/14
*/
@Data
public class PullRecordReq {
private String companyCode;
//公司名称
private String companyName;
//账期
@ -27,6 +31,8 @@ public class PullRecordReq {
//过账终止日期
private String accountEndDate;
private List<String> orgCode;
private int curr;
private int size;
}

@ -5,6 +5,8 @@ import java.util.Map;
import javax.annotation.Resource;
import com.dxhy.common.constant.DictConstant;
import com.dxhy.common.service.DictdetaServcice;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
@ -33,6 +35,8 @@ import lombok.extern.slf4j.Slf4j;
public class TicketServiceImpl extends MpBaseServiceImpl<ExtTicketDao, ExtTicketInvoiceModel> implements TicketService {
@Resource
private ExtTicketDao extTicketDao;
@Resource
private DictdetaServcice dictdetaServcice;
@Override
public String queryList(Map<String, Object> paramsMap, int curr, int size) {
@ -40,11 +44,13 @@ public class TicketServiceImpl extends MpBaseServiceImpl<ExtTicketDao, ExtTicket
DynamicContextHolder.push(paramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "开票日期", "销方名称", "乘坐人", "证件号", "班次/车次", "金额",
"签收状态", "签收日期", "签收方式", "签收人", "抵扣状态", "业务单号", "入池时间","凭证号", "过账时间", "影像号", "账期"};
"签收状态", "签收日期", "签收方式", "签收人", "抵扣状态", "业务单号", "入池时间","凭证号", "过账时间", "影像号",
"账期","报账单号","入账状态"};
String[] titleprop = {"xh", "invoiceTypeString", "invoiceCode", "invoiceNo", "invoiceDate", "xfName",
"passenger", "passengerSfzh", "trainNumber", "invoiceAmount", "qsStatus",
"qsDate", "qsType", "qsName", "isDeduction", "businessDocumentNumber", "createDate","snVoucherNumber", "postingTime","imageId","accountPeriod"};
"qsDate", "qsType", "qsName", "isDeduction", "businessDocumentNumber", "createDate","snVoucherNumber",
"postingTime","imageId","accountPeriod","bzdh","inAccountStatus"};
// 需要设置返回列表标题时调用
json = super.setTitleList(titlelist, titleprop);
PageHelper.startPage(curr, size);
@ -135,6 +141,10 @@ public class TicketServiceImpl extends MpBaseServiceImpl<ExtTicketDao, ExtTicket
if (StringUtils.isNotBlank(pageList.get(i).getCreateDate())) {
pageList.get(i).setCreateDate(pageList.get(i).getCreateDate().substring(0, 10));
}
//报账单号字典值转换
log.info("入账状态====>{}",pageList.get(i).getInAccountStatus());
pageList.get(i).setInAccountStatus(dictdetaServcice.queryDictName(DictConstant.INACCOUNT_STATUS,pageList.get(i).getInAccountStatus()));
log.info("入账状态====>{}",pageList.get(i).getInAccountStatus());
}
}

@ -3,6 +3,8 @@ package com.dxhy.extend.service.pool;
import java.util.List;
import java.util.Map;
import com.dxhy.common.constant.DictConstant;
import com.dxhy.common.service.DictdetaServcice;
import com.dxhy.extend.entity.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
@ -20,6 +22,8 @@ import com.dxhy.extend.util.InvoiceTypeUtils;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import javax.annotation.Resource;
/**
* @author dxhy
*/
@ -35,6 +39,9 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
@Value("${dxhy.datasource.dxhy_detail:dxhy_detail}")
private String dxhyDetail;
@Resource
private DictdetaServcice dictdetaServcice;
@Override
public String listAddTax(Map<String, Object> pramsMap, int curr, int size) {
JSONObject json = new JSONObject();
@ -42,13 +49,13 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
try {
String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "发票状态", "开票日期", "销方名称", "销方税号", "金额", "税额", "有效税额",
"价税合计", "认证状态", "认证类型", "认证日期", "认证方式", "认证人", "采集状态", "底账库采集时间", "采集来源", "签收方式", "签收状态", "签收日期", "签收人",
"入账月份", "入账状态","凭证号", "过账时间", "影像号", "账期","是否末次摊销", "摊销金额", "剩余金额", "业务单号", "入池时间"};
"入账月份", "入账状态","凭证号", "过账时间", "影像号", "账期","是否末次摊销", "摊销金额", "剩余金额", "业务单号", "入池时间","报账单号","入账状态"};
String[] titleprop = {"xh", "invoiceType", "invoiceCode", "invoiceNo", "invoiceStatus", "invoiceDate",
"xfmc", "xfsh", "invoiceAmount", "taxAmount", "yxse", "totalAmount", "rzzt", "rzlx", "rzrq", "rzfs",
"rzr", "collectStatus", "collectDate", "collectFrom", "qsfs", "qszt", "qsrq", "qsr", "inAccountMonth",
"inAccountStatus", "voucherNo","postingTime","imageId","accountPeriod", "amortizeStatus", "amortizeAmount", "remainAmortizeAmount",
"documentNumber", "createDate"};
"documentNumber", "createDate","bzdh","inAccountStatus"};
// 需要设置返回列表标题时调用
json = super.setTitleList(titlelist, titleprop);
PageHelper.startPage(curr, size);
@ -151,19 +158,22 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
} else {
pageList.get(i).setRzlx("");
}
if ("0".equals(pageList.get(i).getInAccountStatus())) {
pageList.get(i).setInAccountStatus("未入账");
} else if ("1".equals(pageList.get(i).getInAccountStatus())) {
pageList.get(i).setInAccountStatus("已入账");
} else {
pageList.get(i).setInAccountStatus("未入账");
}
// if ("0".equals(pageList.get(i).getInAccountStatus())) {
// pageList.get(i).setInAccountStatus("未入账");
// } else if ("1".equals(pageList.get(i).getInAccountStatus())) {
// pageList.get(i).setInAccountStatus("已入账");
// } else {
// pageList.get(i).setInAccountStatus("未入账");
// }
if ("0".equals(pageList.get(i).getCollectFrom())) {
pageList.get(i).setCollectFrom("进项采集");
} else if ("1".equals(pageList.get(i).getCollectFrom())) {
pageList.get(i).setCollectFrom("票据采集");
}
//报账单号字典值转换
pageList.get(i).setInAccountStatus(dictdetaServcice.queryDictName(DictConstant.INACCOUNT_STATUS,pageList.get(i).getInAccountStatus()));
log.info("入账状态====>{}",pageList.get(i).getInAccountStatus());
pageList.get(i).setInvoiceType(InvoiceTypeUtils.invoiceTypeName(pageList.get(i).getInvoiceType()));
pageList.get(i).setQsrq(pageList.get(i).getQsrq() == null ? "" : pageList.get(i).getQsrq());
pageList.get(i).setRzrq(pageList.get(i).getRzrq() == null ? "" : pageList.get(i).getRzrq());
@ -205,9 +215,11 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String[] titlelist =
{"序号", "发票类型", "发票代码", "发票号码", "开票日期", "金额", "签收状态", "签收日期", "签收方式", "签收人", "业务单号", "入池时间","凭证号", "过账时间", "影像号", "账期"};
{"序号", "发票类型", "发票代码", "发票号码", "开票日期", "金额", "签收状态", "签收日期", "签收方式", "签收人", "业务单号"
, "入池时间","凭证号", "过账时间", "影像号", "账期","报账单号","入账状态"};
String[] titleprop = {"xh", "invoiceTypeString", "invoiceCode", "invoiceNo", "invoiceDate", "invoiceAmount",
"qszt", "qsrq", "qsfs", "qsr", "businessDocumentNumber", "createDate","voucherNo", "postingTime","imageId","accountPeriod"};
"qszt", "qsrq", "qsfs", "qsr", "businessDocumentNumber", "createDate","voucherNo", "postingTime",
"imageId","accountPeriod","bzdh","inAccountStatus"};
// 需要设置返回列表标题时调用
json = super.setTitleList(titlelist, titleprop);
PageHelper.startPage(curr, size);
@ -262,6 +274,10 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
pageList.get(i).setScanId(pageList.get(i).getScanId() == null ? "" : pageList.get(i).getScanId());
pageList.get(i)
.setInvoiceTypeString(InvoiceTypeUtils.invoiceTypeName(pageList.get(i).getInvoiceType()));
log.info("inAccountStatus=====>{}",pageList.get(i).getInAccountStatus());
pageList.get(i).setInAccountStatus(dictdetaServcice.queryDictName(DictConstant.INACCOUNT_STATUS,
pageList.get(i).getInAccountStatus()));
}
}
@ -285,13 +301,13 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
try {
String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "发票状态", "开票日期", "购方名称", "购方税号", "金额", "税额", "价税合计",
"清单标志", "备注", "优惠政策类型", "采集状态", "采集时间", "采集来源", "签收方式", "对接系统", "签收状态", "签收日期", "签收人", "入账月份", "入账状态",
"凭证号", "业务单号", "入池时间","影像号","账期","过账日期"};
"凭证号", "业务单号", "入池时间","影像号","账期","过账日期","报账单号","入账状态"};
String[] titleprop = {"xh", "invoiceType", "invoiceCode", "invoiceNo", "invoiceStatus", "invoiceDate",
"gfmc", "gfsh", "invoiceAmount", "taxAmount", "totalAmount", "listStatus", "remark", "incentiveFlag",
"collectStatus", "collectDate", "collectFrom", "qsfs", "systemName", "qszt", "qsrq", "qsr",
"inAccountMonth", "inAccountStatus", "snVoucherNumber", "documentNumber", "createDate","imageNumber","accountPeriod"
,"postingTime"};
,"postingTime","bzdh","inAccountStatus"};
// 需要设置返回列表标题时调用
json = super.setTitleList(titlelist, titleprop);
PageHelper.startPage(curr, size);
@ -371,13 +387,13 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
} else {
pageList.get(i).setRzlx("");
}
if ("0".equals(pageList.get(i).getInAccountStatus())) {
pageList.get(i).setInAccountStatus("未入账");
} else if ("1".equals(pageList.get(i).getInAccountStatus())) {
pageList.get(i).setInAccountStatus("已入账");
} else {
pageList.get(i).setInAccountStatus("");
}
// if ("0".equals(pageList.get(i).getInAccountStatus())) {
// pageList.get(i).setInAccountStatus("未入账");
// } else if ("1".equals(pageList.get(i).getInAccountStatus())) {
// pageList.get(i).setInAccountStatus("已入账");
// } else {
// pageList.get(i).setInAccountStatus("");
// }
if ("0".equals(pageList.get(i).getListStatus())) {
pageList.get(i).setListStatus("否");
} else if ("1".equals(pageList.get(i).getListStatus())) {
@ -396,6 +412,8 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
pageList.get(i).getInAccountMonth() == null ? "" : pageList.get(i).getInAccountMonth());
pageList.get(i).setScanId(pageList.get(i).getScanId() == null ? "" : pageList.get(i).getScanId());
pageList.get(i).setInvoiceType(InvoiceTypeUtils.invoiceTypeName(pageList.get(i).getInvoiceType()));
pageList.get(i).setInAccountStatus(dictdetaServcice.queryDictName(DictConstant.INACCOUNT_STATUS,
pageList.get(i).getInAccountStatus()));
}
}

@ -7,6 +7,10 @@
type="com.dxhy.extend.model.ExtBbycfpcxRespVO">
<result column="inaccount_status" property="inAccountStatus"/>
<result column="bzdh" property="bzdh"/>
<result column="sn_voucher_number" property="snVoucherNumber"/>
<result column="account_period" property="accountPeriod"/>
<result column="posting_time" property="postingTime"/>
<result column="image_id" property="imageNumber"/>
<result column="fpdm" property="fpdm"/>
<result column="fphm" property="fphm"/>
<result column="invoiceType" property="invoiceType"/>
@ -46,7 +50,7 @@
je,DATE_FORMAT(t.qs_date,'%Y-%m-%d') qsrq,t.inaccount_status,t.bzdh,
t.qs_status qszt,t.qs_name qsr, t.invoice_status
yczt,DATE_FORMAT(t.status_update_date,'%Y-%m-%d') ycsj,rzh_date
rzsj,
rzsj,t.sn_voucher_number,t.account_period,t.posting_time,t.image_id,
rzh_yesorno rzzt,auth_status rzclzt,bdk_status rzlx,rzh_belong_date skssq,dept_name
from t_dx_record_invoice t
WHERE t.invoice_status != '0'

@ -28,7 +28,6 @@
DATE_FORMAT(t.qs_date,'%Y-%m-%d') qsrq,
t.qs_name qsr,
DATE_FORMAT(t.payment_date,'%Y-%m') inAccountMonth,
t.payment_status inAccountStatus,
t.voucher_number voucherNo,
t.amortize_status amortizeStatus,
t.amortize_amount amortizeAmount,
@ -109,18 +108,23 @@
<if test="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'">
and t.qs_type = #{qsfs}
</if>
<if test="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'">
and t.posting_time = #{postingTime}
<if test="postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99' and postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<if test="imageId != null and imageId != '' and imageId != 'null' and imageId != '99'">
and t.image_id = #{imageId}
<if test="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<if
test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.payment_status = #{inAccountStatus}
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and t.bzdh = #{bzdh}
</if>
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if
test="inAccountMonth != null and inAccountMonth != null and inAccountMonth != '' and inAccountMonth != ''">
@ -158,8 +162,10 @@
DATE_FORMAT(t.qs_date,'%Y-%m-%d') qsrq,
t.qs_name qsr,
DATE_FORMAT(t.payment_date,'%Y-%m') inAccountMonth,
t.payment_status inAccountStatus,
t.payment_status paymentStatus,
t.inaccount_status inAccountStatus,
t.voucher_number voucherNo,
t.sn_voucher_number snVoucherNumber,
t.posting_time postingTime,
t.amortize_status amortizeStatus,
t.amortize_amount amortizeAmount,
@ -170,8 +176,10 @@
t.scan_id scanId,
t.remark,
t.document_number documentNumber,
t.image_id imageId,
t.image_id imageNumber,
t.account_period accountPeriod,
t.inaccount_status inAccountStatus,
t.bzdh bzdh,
DATE_FORMAT(t.collect_date,'%Y-%m-%d') collectDate,
t.collect_from collectFrom
from t_dx_record_invoice t
@ -224,11 +232,8 @@
<if test="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'">
and t.qs_type = #{qsfs}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.payment_status = #{inAccountStatus}
</if>
<if test="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and posting_time between #{postingTimeStart} and #{postingTimeEnd}
<if test="postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99' and postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<if test="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
@ -236,15 +241,24 @@
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and t.bzdh = #{bzdh}
</if>
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if test="inAccountMonth != null and inAccountMonth != null and inAccountMonth != '' and inAccountMonth != ''">
and DATE_FORMAT(t.payment_date,'%Y-%m') = #{inAccountMonth}
</if>
<if test="invoiceSource!=null and invoiceSource!='' and invoiceSource!='99'">
and t.invoice_source = #{invoiceSource}
</if>
<if test="snVoucherNumber !=null and snVoucherNumber !='' and snVoucherNumber !='99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<!-- <if test="snVoucherNumber !=null and snVoucherNumber !='' and snVoucherNumber !='99'">-->
<!-- and t.sn_voucher_number = #{snVoucherNumber}-->
<!-- </if>-->
</select>
<!--其他发票汇总-->
<select id="selectOtherHj" parameterType="java.util.Map"
@ -286,6 +300,24 @@
<if test="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'">
AND qs_type = #{qsfs}
</if>
<if test="postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99' and postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<if test="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and t.bzdh = #{bzdh}
</if>
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
GROUP BY uuid having min(create_date) ) t
</select>
<select id="listOtherInvoice" parameterType="java.util.Map"
@ -309,7 +341,10 @@
account_period accountPeriod,
image_id imageId,
posting_time postingTime,
sn_voucher_number voucherNo
sn_voucher_number voucherNo,
inaccount_status inAccountStatus,
bzdh bzdh,
sn_voucher_number snVoucherNumber
FROM
t_dx_invoice_reimburse
where invoice_type in
@ -342,30 +377,28 @@
<if test="qsfs != null and qsfs != '' and qsfs != 'null' and qsfs != '99'">
AND qs_type = #{qsfs}
</if>
<!-- <if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">-->
<!-- and t.sn_voucher_number = #{snVoucherNumber}-->
<!-- </if>-->
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and sn_voucher_number = #{snVoucherNumber}
</if>
<!-- <if test="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'">-->
<!-- and t.posting_time = #{postingTime}-->
<!-- </if>-->
<if test="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<!-- <if test="imageId != null and imageId != '' and imageId != 'null' and imageId != '99'">-->
<!-- and t.image_id = #{imageId}-->
<!-- </if>-->
<if test="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and image_id = #{imageNumber}
</if>
<!-- <if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">-->
<!-- and t.account_period = #{accountPeriod}-->
<!-- </if>-->
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and account_period = #{accountPeriod}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and inaccount_status = #{inAccountStatus}
</if>
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and bzdh = #{bzdh}
</if>
GROUP BY uuid having min(create_date)
ORDER BY create_date DESC
</select>
@ -433,15 +466,24 @@
<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.posting_time = #{postingTime}
<if test="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<if test="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and t.bzdh = #{bzdh}
</if>
</select>
<!--销项票池查询-->
<select id="listSaleInvoice" parameterType="java.util.Map"
@ -454,6 +496,8 @@
,t.image_id imageNumber
,t.account_period accountPeriod
,t.posting_time postingTime
,t.inaccount_status inAccountStatus
,t.bzdh bzdh
from t_dx_sale_record_invoice t
where 1 = 1
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
@ -497,12 +541,11 @@
<if test="listMark != null and listMark != '' and listMark != 'null' and listMark != '99'">
and t.list_status = #{listMark}
</if>
<if
test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.payment_status = #{inAccountStatus}
</if>
<if
test="inAccountMonth != null and inAccountMonth != null and inAccountMonth != '' and inAccountMonth != ''">
<!-- <if-->
<!-- test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">-->
<!-- and t.payment_status = #{inAccountStatus}-->
<!-- </if>-->
<if test="inAccountMonth != null and inAccountMonth != null and inAccountMonth != '' and inAccountMonth != ''">
and DATE_FORMAT(t.payment_date,'%Y-%m') = #{inAccountMonth}
</if>
<if test="incentiveFlag !=null and incentiveFlag !='' and incentiveFlag!= '99'">
@ -514,15 +557,27 @@
<if test="voucherNo != null and voucherNo != '' and voucherNo != 'null' and voucherNo != '99'">
and t.voucher_no = #{voucherNo}
</if>
<if test="postingTime != null and postingTime != '' and postingTime != 'null' and postingTime != '99'">
and t.posting_time = #{postingTime}
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if test="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<if test="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and t.bzdh = #{bzdh}
</if>
GROUP BY t.uuid
ORDER BY t.create_date DESC
</select>
@ -561,6 +616,15 @@
<if test="companyName!=null and companyName != ''">
and vr.butxt = #{companyName}
</if>
<if test ="orgCode !=null and orgCode.size>0">
and vr.bukrs in
<foreach collection="orgCode" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="companyCode !=null and companyCode !=''">
and vr.bukrs = #{companyCode}
</if>
<if test ="accountPeriod !=null and accountPeriod !=''">
and CONCAT_WS("-",vr.gjahr,vr.monat) = #{accountPeriod}
</if>

@ -54,18 +54,24 @@
<if test="company !=null and company !=''">
and t.company = #{company}
</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.posting_time = #{postingTime}
<if test="postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99' and postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<if test="imageId != null and imageId != '' and imageId != 'null' and imageId != '99'">
and t.image_id = #{imageId}
<if test="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
and t.image_id = #{imageNumber}
</if>
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
t.bzdh = #{bzdh}
</if>
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
t.sn_voucher_number = #{snVoucherNumber}
</if>
</select>
@ -112,10 +118,7 @@
<if test="company !=null and company !=''">
and t.company = #{company}
</if>
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</if>
<if test="postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99' and postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99'">
<if test="postingTimeEnd != null and postingTimeEnd != '' and postingTimeEnd != 'null' and postingTimeEnd != '99' and postingTimeStart != null and postingTimeStart != '' and postingTimeStart != 'null' and postingTimeStart != '99'">
and t.posting_time between #{postingTimeStart} and #{postingTimeEnd}
</if>
<if test="imageNumber != null and imageNumber != '' and imageNumber != 'null' and imageNumber != '99'">
@ -124,5 +127,14 @@
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</if>
<if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null' and inAccountStatus != '99'">
and t.inaccount_status = #{inAccountStatus}
</if>
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
t.bzdh = #{bzdh}
</if>
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
t.sn_voucher_number = #{snVoucherNumber}
</if>
</select>
</mapper>

@ -252,8 +252,11 @@ public class FpqsServiceImpl extends MpBaseServiceImpl<SignRecordInvoiceDao, TDx
* 用户信息
* @param invoiceType
* 返回结果
* @return error 查验签收逻辑如下1基础信息校验 2查看扫描表中是否存在此发票信息(是否重复签收) 3扫描方式获取底账库信息/发票查验接口调用获取发票信息
* 查验接口返回结果为失败接口不通or数据有问题则将签收状态更新到扫描表中或者insert数据到扫描表然后return 4查验成功则开始校验权限通过=true不通过=false
* @return error 查验签收逻辑如下1基础信息校验 2查看扫描表中是否存在此发票信息(是否重复签收)
* 3扫描方式获取底账库信息/发票查验接口调用获取发票信息
* 查验接口返回结果为失败接口不通or数据有问题
* 则将签收状态更新到扫描表中或者insert数据到扫描表然后return
* 4查验成功则开始校验权限通过=true不通过=false
* 5查询底账表是否有数据如果有则return如果没没有数据 保存查验信息到底账表
*/
@Override
@ -326,7 +329,8 @@ public class FpqsServiceImpl extends MpBaseServiceImpl<SignRecordInvoiceDao, TDx
// 3、发票查验接口调用获取发票信息
String invoiceAmount = null;
if (FplxEnum.ESC.getFplxDm().equals(invoiceType)) {
if (FplxEnum.ESC.getFplxDm().equals(invoiceType) || FplxEnum.QDZZP.getFplxDm().equals(invoiceType)
|| FplxEnum.QDPP.getFplxDm().equals(invoiceType)) {
if (StringUtils.isNotBlank(pramsMap.get("invoiceAmount"))) {
invoiceAmount = pramsMap.get("invoiceAmount");
} else {

Loading…
Cancel
Save