合并代碼

release
zhenghaiyang@ele-cloud.com 2 years ago
parent 71b0f98fe6
commit 9fa2e8b833
  1. 1
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  2. 1
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseRzTDxRecordInvoiceController.java
  3. 11
      dxhy-base/src/main/java/com/dxhy/base/service/invoicecheck/BaseInvoiceManualCheckServiceImpl.java
  4. 7
      dxhy-base/src/main/java/com/dxhy/base/service/receipt/BaseReceiptOutServiceImpl.java
  5. 28
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
  6. 2
      dxhy-common/src/main/java/com/dxhy/common/util/ExcelPoiUtil.java
  7. 6
      dxhy-core/src/main/java/com/dxhy/core/controller/ExcelController.java
  8. 21
      dxhy-core/src/main/java/com/dxhy/core/controller/mailGather/EmailMaintainController.java
  9. 29
      dxhy-core/src/main/java/com/dxhy/core/controller/mailGather/MailGatherLogController.java
  10. 4
      dxhy-core/src/main/java/com/dxhy/core/dao/mailGather/EmailMaintainDao.java
  11. 3
      dxhy-core/src/main/java/com/dxhy/core/job/service/impl/ConfirmServiceImpl.java
  12. 13
      dxhy-core/src/main/java/com/dxhy/core/model/mailGather/MailGatherLogVo.java
  13. 2
      dxhy-core/src/main/java/com/dxhy/core/service/invoicedetail/InvoiceDetailServiceImpl.java
  14. 2
      dxhy-core/src/main/java/com/dxhy/core/service/mailGather/EmailMaintainService.java
  15. 7
      dxhy-core/src/main/java/com/dxhy/core/service/mailGather/impl/EmailMaintainServiceImpl.java
  16. 7
      dxhy-core/src/main/java/com/dxhy/core/service/mailGather/impl/MailGatherLogServiceImpl.java
  17. 7
      dxhy-core/src/main/java/com/dxhy/core/task/SnEmailGatherTask.java
  18. 14
      dxhy-core/src/main/java/com/dxhy/core/task/SnEmailGatherTaskTest.java
  19. 3
      dxhy-core/src/main/java/com/dxhy/core/thread/CustomExportThread.java
  20. 2
      dxhy-core/src/main/java/com/dxhy/core/util/InvoiceQueryUtil.java
  21. 2
      dxhy-core/src/main/resources/mapper/mailGather/EmailMaintainMapper.xml
  22. 48
      dxhy-core/src/main/resources/mapper/mailGather/MailGatherLogMapper.xml
  23. 16
      dxhy-erp/src/main/java/com/dxhy/erp/controller/InterfaceController.java
  24. 42
      dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java
  25. 2
      dxhy-erp/src/main/java/com/dxhy/erp/dao/TdxRecordInvoiceDao.java
  26. 6
      dxhy-erp/src/main/java/com/dxhy/erp/entity/sdny/SAPInvoiceInfo.java
  27. 4
      dxhy-erp/src/main/java/com/dxhy/erp/service/BaseIReceiptInvoiceService.java
  28. 6
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/BaseIReceiptInvoiceServiceImpl.java
  29. 13
      dxhy-erp/src/main/resources/mapper/TdxRecordInvoiceDao.xml
  30. 4
      dxhy-extend/src/main/java/com/dxhy/extend/service/companypool/TicketServiceImpl.java
  31. 1
      dxhy-operation-flow/src/main/resources/bootstrap.yml
  32. 1
      dxhy-sign/src/main/java/com/dxhy/sign/service/fpqs/impl/SignFpqsServiceImpl.java

@ -632,7 +632,6 @@ public class BaseInvoiceController extends AbstractController {
return ResponseEntity.ok(R.error("签收状态不能为空!")); return ResponseEntity.ok(R.error("签收状态不能为空!"));
} }
String qsflag = getUserInfo().getQsStatus(); String qsflag = getUserInfo().getQsStatus();
log.info("签收开关qsflag:{}",qsflag);
if ("1".equals(qsflag)) { if ("1".equals(qsflag)) {
pramsMap.put("qszt", "1"); pramsMap.put("qszt", "1");
} }

@ -467,7 +467,6 @@ public class BaseRzTDxRecordInvoiceController extends AbstractController {
pramsMap.put("gfsh", gfshList); pramsMap.put("gfsh", gfshList);
String qsflag = getUserInfo().getQsStatus(); String qsflag = getUserInfo().getQsStatus();
pramsMap.put("qsflag", qsflag); pramsMap.put("qsflag", qsflag);
log.info("签收认证状态为:{}",qsflag);
if (!StringHelper.isBlank(datalist)) { if (!StringHelper.isBlank(datalist)) {
pramsMap.put("datalist", datalist); pramsMap.put("datalist", datalist);

@ -125,6 +125,8 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
List<BaseTDxRecordInvoice> pageList = super.baseMapper.selectSggxcx(pramsMap); List<BaseTDxRecordInvoice> pageList = super.baseMapper.selectSggxcx(pramsMap);
PageInfo<BaseTDxRecordInvoice> pageInfo = new PageInfo<>(pageList); PageInfo<BaseTDxRecordInvoice> pageInfo = new PageInfo<>(pageList);
log.info("查询的发票list为:{}",pageList);
// 转化为页面展示对象 // 转化为页面展示对象
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (pageList.size() > 0) { if (pageList.size() > 0) {
@ -159,9 +161,13 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
.fmtMicrometer(MathUtil.round(pageList.get(i).getTaxAmount().toString()))); .fmtMicrometer(MathUtil.round(pageList.get(i).getTaxAmount().toString())));
} }
} }
log.info("11111111111111111111111111111111");
String businessCode = pageList.get(i).getDeptId(); String businessCode = pageList.get(i).getDeptId();
String businessName = this.getBusinessName(businessCode, businessList); String businessName = this.getBusinessName(businessCode, businessList);
log.info("businessName={}",businessName);
vo.setVoucherNumber(pageList.get(i).getVoucherNumber()); vo.setVoucherNumber(pageList.get(i).getVoucherNumber());
vo.setId(String.valueOf(pageList.get(i).getId())); vo.setId(String.valueOf(pageList.get(i).getId()));
vo.setXh(String.valueOf(start + i)); vo.setXh(String.valueOf(start + i));
@ -200,6 +206,7 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
vo.setBusinessName(businessName); vo.setBusinessName(businessName);
vo.setEleInvoiceNo(pageList.get(i).getEleInvoiceNo()); vo.setEleInvoiceNo(pageList.get(i).getEleInvoiceNo());
String dkzt= dictdetaServcice.queryDictName(DictConstant.DK_STATUS,pageList.get(i).getInAccountStatus()); String dkzt= dictdetaServcice.queryDictName(DictConstant.DK_STATUS,pageList.get(i).getInAccountStatus());
log.info("抵扣状态dkzt={}",dkzt);
pageList.get(i).setInAccountStatus(dkzt); pageList.get(i).setInAccountStatus(dkzt);
vo.setInAccountStatus(dkzt); vo.setInAccountStatus(dkzt);
vo.setSelect(true); vo.setSelect(true);
@ -208,8 +215,9 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
} }
log.info("返回的发票信息是:{}",pageList.get(i)); log.info("返回的发票信息是:{}",pageList.get(i));
String invoiceStatus="07"; String invoiceStatus="07";
if ( !invoiceStatus.contains(pageList.get(i).getInvoiceStatus()) 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 || pageList.get(i).getInvoiceAmount() != null && pageList.get(i).getInvoiceAmount().compareTo(new BigDecimal(0)) < 0
|| pageList.get(i).getTaxAmount() != null && pageList.get(i).getTaxAmount().compareTo(new BigDecimal(0)) < 0) { || pageList.get(i).getTaxAmount() != null && pageList.get(i).getTaxAmount().compareTo(new BigDecimal(0)) < 0) {
vo.setSelect(false); vo.setSelect(false);
@ -234,6 +242,7 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx
json.put("datalist", voList); json.put("datalist", voList);
} catch (Exception e) { } catch (Exception e) {
// 统一设置操作异常标识 // 统一设置操作异常标识
log.info("错误信息为:{}",e.getMessage());
json = super.errorResult(e); json = super.errorResult(e);
} }

@ -193,6 +193,7 @@ public class BaseReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutD
if (record.getOutTaxAmount() != null) if (record.getOutTaxAmount() != null)
vo.setOutTax(AmountFormatUtil.fmtMicrometer(MathUtil.round(record.getOutTaxAmount().toPlainString()))); vo.setOutTax(AmountFormatUtil.fmtMicrometer(MathUtil.round(record.getOutTaxAmount().toPlainString())));
vo.setRemark(record.getOutRemark()); vo.setRemark(record.getOutRemark());
vo.setOutBelongDate(record.getOutBelongDate()); vo.setOutBelongDate(record.getOutBelongDate());
@ -645,8 +646,7 @@ public class BaseReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutD
// 转出金额 // 转出金额
vo.setOutAmount(AmountFormatUtil.fmtMicrometer(MathUtil.round(record.getOutInvoiceAmout().toPlainString()))); vo.setOutAmount(AmountFormatUtil.fmtMicrometer(MathUtil.round(record.getOutInvoiceAmout().toPlainString())));
// 转出税额 // 转出税额
if (record.getOutTaxAmount() != null) vo.setOutTax(AmountFormatUtil.fmtMicrometer(MathUtil.round(record.getOutTaxAmount().toPlainString())));
vo.setOutTax(AmountFormatUtil.fmtMicrometer(MathUtil.round(record.getOutTaxAmount().toPlainString())));
vo.setRemark(record.getOutRemark()); vo.setRemark(record.getOutRemark());
vo.setOutDate(DateUtils.dateToStr(record.getOutDate())); vo.setOutDate(DateUtils.dateToStr(record.getOutDate()));
vo.setOutBelongDate(record.getOutBelongDate()); vo.setOutBelongDate(record.getOutBelongDate());
@ -654,8 +654,7 @@ public class BaseReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutD
QueryWrapper<BaseTDxOutReason> query = new QueryWrapper<>(); QueryWrapper<BaseTDxOutReason> query = new QueryWrapper<>();
query.eq("reason_code", record.getOutReason()); query.eq("reason_code", record.getOutReason());
BaseTDxOutReason reason = baseTDxOutReasonDao.selectOne(query); BaseTDxOutReason reason = baseTDxOutReasonDao.selectOne(query);
if (reason != null) vo.setReason(reason.getOutReason());
vo.setReason(reason.getOutReason());
// 认证日期 string类型的长日期转为string类型的短日期 // 认证日期 string类型的长日期转为string类型的短日期
String certDate = record.getCertDate(); String certDate = record.getCertDate();
Date date = new Date(); Date date = new Date();

@ -171,18 +171,6 @@
<if test="qsksrq==null or qsksrq=='' or qsjsrq==null or qsjsrq==''"> <if test="qsksrq==null or qsksrq=='' or qsjsrq==null or qsjsrq==''">
order by t.invoice_date desc order by t.invoice_date desc
</if> </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>
</select> </select>
<select id="selectDksh" parameterType="java.util.Map" <select id="selectDksh" parameterType="java.util.Map"
resultType="com.dxhy.base.entity.BaseTDxDkCount" resultType="com.dxhy.base.entity.BaseTDxDkCount"
@ -335,18 +323,6 @@
<if test="eleInvoiceNo!=null and eleInvoiceNo!='' and eleInvoiceNo!='null'"> <if test="eleInvoiceNo!=null and eleInvoiceNo!='' and eleInvoiceNo!='null'">
and t.ele_invoice_no = #{eleInvoiceNo} and t.ele_invoice_no = #{eleInvoiceNo}
</if> </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>
</select> </select>
<select id="selectHj" parameterType="java.util.Map" <select id="selectHj" parameterType="java.util.Map"
@ -479,10 +455,10 @@
<if <if
test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()"> test="sfkrz != '99' and sfkrz != null and sfkrz != '' and sfkrz != 'null' and sfkrz == '0'.toString()">
and t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount &lt;0 or t.tax_amount &lt;0 or and (t.invoice_status in ('1','2','3','4','8','80') or t.invoice_amount &lt;0 or t.tax_amount &lt;0 or
to_char(t.invoice_date,'yyyymmdd') &lt;= c.select_start_date or to_char(t.invoice_date,'yyyymmdd') &lt;= c.select_start_date or
to_char(t.invoice_date,'yyyymmdd') &gt;= to_char(t.invoice_date,'yyyymmdd') &gt;=
c.select_end_date or d.tj_status in ('1','2') c.select_end_date or d.tj_status in ('1','2'))
</if> </if>
and t.gf_tax_no in and t.gf_tax_no in

@ -102,6 +102,8 @@ public class ExcelPoiUtil {
public static void exportListArrayToExcel(String excelFile, String title, String[] titleColumns, public static void exportListArrayToExcel(String excelFile, String title, String[] titleColumns,
List<String[]> dataList, boolean firstPage, boolean lastPage) throws Exception { List<String[]> dataList, boolean firstPage, boolean lastPage) throws Exception {
log.info("传入的dataList={}",dataList);
// 文件存储路径是否存在 // 文件存储路径是否存在
File filePath = new File(getFilePath(excelFile)); File filePath = new File(getFilePath(excelFile));
if (!filePath.exists()) { if (!filePath.exists()) {

@ -253,7 +253,11 @@ public class ExcelController extends AbstractController {
Map<String, Object> returnMap = new HashMap<>(2); Map<String, Object> returnMap = new HashMap<>(2);
returnMap.put("id",tdxExcelExprortlog.getId()); returnMap.put("id",tdxExcelExprortlog.getId());
returnMap.put("serviceType","2"); if("64".equals(serviceType)){
returnMap.put("serviceType","3");
}else{
returnMap.put("serviceType","2");
}
return ResponseEntity.ok(R.ok().put("data", returnMap)); return ResponseEntity.ok(R.ok().put("data", returnMap));
} catch (Exception e) { } catch (Exception e) {

@ -4,9 +4,7 @@ import cn.hutool.core.codec.Base64;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.dxhy.common.constant.DbConstant;
import com.dxhy.common.controller.AbstractController; import com.dxhy.common.controller.AbstractController;
import com.dxhy.common.datasource.config.DynamicContextHolder;
import com.dxhy.common.util.UUIDUtils; import com.dxhy.common.util.UUIDUtils;
import com.dxhy.common.utils.Base64Encoding; import com.dxhy.common.utils.Base64Encoding;
import com.dxhy.common.utils.R; import com.dxhy.common.utils.R;
@ -93,13 +91,6 @@ public class EmailMaintainController extends AbstractController {
} }
String loginname = getUserInfo().getLoginname(); String loginname = getUserInfo().getLoginname();
emailMaintain.setCreateUser(loginname); emailMaintain.setCreateUser(loginname);
DynamicContextHolder.push(DbConstant.BASICS_READ);
EmailMaintainVo vo = new EmailMaintainVo();
vo.setEmailAddress(emailMaintain.getEmailAddress());
EmailMaintainVo maintainVo = emailMaintainService.getEmailMaintainVo(vo);
if(maintainVo != null){
return ResponseEntity.ok(R.error("邮箱地址已存在!"));
}
boolean insert = this.emailMaintainService.insert(emailMaintain); boolean insert = this.emailMaintainService.insert(emailMaintain);
if(insert){ if(insert){
return ResponseEntity.ok(R.ok()); return ResponseEntity.ok(R.ok());
@ -115,16 +106,6 @@ public class EmailMaintainController extends AbstractController {
*/ */
@PostMapping("/edit") @PostMapping("/edit")
public ResponseEntity<R> edit(@RequestBody EmailMaintainVo emailMaintain) { public ResponseEntity<R> edit(@RequestBody EmailMaintainVo emailMaintain) {
if(StringUtils.isBlank(emailMaintain.getEmailPassword())){
return ResponseEntity.ok(R.error("邮箱地址不能为空!"));
}
DynamicContextHolder.push(DbConstant.BASICS_READ);
EmailMaintainVo vo = new EmailMaintainVo();
vo.setEmailAddress(emailMaintain.getEmailAddress());
EmailMaintainVo maintainVo = emailMaintainService.getEmailMaintainVo(vo);
if(maintainVo != null && maintainVo.getId().equals(emailMaintain.getId())){
return ResponseEntity.ok(R.error("邮箱地址已存在!"));
}
boolean b = emailMaintainService.update(emailMaintain); boolean b = emailMaintainService.update(emailMaintain);
if(b){ if(b){
return ResponseEntity.ok(R.ok()); return ResponseEntity.ok(R.ok());
@ -161,7 +142,6 @@ public class EmailMaintainController extends AbstractController {
errorMsgList.add("第" + resultIndex + "行,用户编码不能为空"); errorMsgList.add("第" + resultIndex + "行,用户编码不能为空");
continue; continue;
} }
DynamicContextHolder.push(DbConstant.BASICS_READ);
String userName = emailMaintainService.getUserName(userId); String userName = emailMaintainService.getUserName(userId);
if(StringUtils.isBlank(userName)){ if(StringUtils.isBlank(userName)){
errorMsgList.add("第" + resultIndex + "行,用户编码在系统中查询不到,请核实!"); errorMsgList.add("第" + resultIndex + "行,用户编码在系统中查询不到,请核实!");
@ -226,7 +206,6 @@ public class EmailMaintainController extends AbstractController {
if(StringUtils.isEmpty(userCode)){ if(StringUtils.isEmpty(userCode)){
return ResponseEntity.ok(R.error("数据不能为空!")); return ResponseEntity.ok(R.error("数据不能为空!"));
} }
DynamicContextHolder.push(DbConstant.BASICS_READ);
String userName = emailMaintainService.getUserName(userCode); String userName = emailMaintainService.getUserName(userCode);
if(StringUtils.isNotEmpty(userName)){ if(StringUtils.isNotEmpty(userName)){
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();

@ -1,12 +1,8 @@
package com.dxhy.core.controller.mailGather; package com.dxhy.core.controller.mailGather;
import com.dxhy.common.constant.DbConstant;
import com.dxhy.common.controller.AbstractController; import com.dxhy.common.controller.AbstractController;
import com.dxhy.common.datasource.config.DynamicContextHolder;
import com.dxhy.common.utils.R; import com.dxhy.common.utils.R;
import com.dxhy.core.service.mailGather.MailGatherLogService; import com.dxhy.core.service.mailGather.MailGatherLogService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@ -14,9 +10,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map; import java.util.Map;
/** /**
@ -25,7 +18,6 @@ import java.util.Map;
* @author makejava * @author makejava
* @since 2023-03-23 08:42:35 * @since 2023-03-23 08:42:35
*/ */
@Slf4j
@RestController @RestController
@RequestMapping("/mailGatherLog") @RequestMapping("/mailGatherLog")
public class MailGatherLogController extends AbstractController { public class MailGatherLogController extends AbstractController {
@ -34,7 +26,6 @@ public class MailGatherLogController extends AbstractController {
*/ */
@Resource @Resource
private MailGatherLogService mailGatherLogService; private MailGatherLogService mailGatherLogService;
final SimpleDateFormat sf2 = new SimpleDateFormat("yyyy-MM-dd");
/** /**
* 分页查询 * 分页查询
@ -55,26 +46,6 @@ public class MailGatherLogController extends AbstractController {
if (pramsMap.get("parseEnd") == null || "".equals(pramsMap.get("parseEnd"))) { if (pramsMap.get("parseEnd") == null || "".equals(pramsMap.get("parseEnd"))) {
return ResponseEntity.ok(R.error("结束日期不能为空!")); return ResponseEntity.ok(R.error("结束日期不能为空!"));
} }
Object parseStart = pramsMap.get("parseStart");
Object parseEnd = pramsMap.get("parseEnd");
if (parseEnd == null || parseEnd == null) {
} else {
try {
Date starttime = sf2.parse(String.valueOf(parseStart));
Date endtime = sf2.parse(String.valueOf(parseEnd));
if (starttime.after(endtime)) {
return ResponseEntity.ok(R.error("开始时间不能大于结束时间"));
}
pramsMap.put("startTime", starttime);
pramsMap.put("endTime", endtime);
} catch (ParseException e) {
throw new RuntimeException(e);
}
}
String loginname = getUserInfo().getLoginname();
pramsMap.put("createUser",loginname);
DynamicContextHolder.push(DbConstant.BASICS_READ);
return ResponseEntity.ok(R.ok().put("data",this.mailGatherLogService.queryByPage(pramsMap))); return ResponseEntity.ok(R.ok().put("data",this.mailGatherLogService.queryByPage(pramsMap)));
} }

@ -35,7 +35,7 @@ public interface EmailMaintainDao extends BaseMapper<EmailMaintainVo> {
* @param emailMaintainVo 查询条件 * @param emailMaintainVo 查询条件
* @return 总行数 * @return 总行数
*/ */
EmailMaintainVo getEmailMaintainVo(EmailMaintainVo emailMaintainVo); long count(EmailMaintainVo emailMaintainVo);
/** /**
* 新增数据 * 新增数据
@ -81,6 +81,4 @@ public interface EmailMaintainDao extends BaseMapper<EmailMaintainVo> {
String getUserName(@Param("userCode") String userCode); String getUserName(@Param("userCode") String userCode);
} }

@ -102,9 +102,6 @@ public class ConfirmServiceImpl extends ServiceImpl<ConfirmDao, TDxHttpLog> impl
if (list != null && list.size() > 0) { if (list != null && list.size() > 0) {
for (TAcOrg tAcOrg : list) { for (TAcOrg tAcOrg : list) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
BasisSysDeptCfg baseSysDeptCfg = basisSysDeptCfgDao.selectOne(new QueryWrapper<BasisSysDeptCfg>().eq("nsrsbh", tAcOrg.getTaxno())); BasisSysDeptCfg baseSysDeptCfg = basisSysDeptCfgDao.selectOne(new QueryWrapper<BasisSysDeptCfg>().eq("nsrsbh", tAcOrg.getTaxno()));
if (baseSysDeptCfg != null) { if (baseSysDeptCfg != null) {
continue; continue;

@ -26,17 +26,4 @@ public class MailGatherLogVo extends CommonDTO {
private String fileName; private String fileName;
private Date createTime; private Date createTime;
public String deptId;
private String companyCode;
public String deptName;
public String username;
public String userId;
public String createUser;
} }

@ -285,7 +285,7 @@ public class InvoiceDetailServiceImpl extends MpBaseServiceImpl<TDxRecordInvoice
} }
checkRecordVo.setTotalAmount(MathUtil.round(detailAmount.toPlainString())); checkRecordVo.setTotalAmount(MathUtil.round(detailAmount.toPlainString()));
} else { } else {
if (invoiceRecord.getTotalAmount() != null) { if (invoiceRecord.getTotalAmount() == null) {
BigDecimal add = invoiceRecord.getInvoiceAmount().add(invoiceRecord.getTaxAmount()); BigDecimal add = invoiceRecord.getInvoiceAmount().add(invoiceRecord.getTaxAmount());
checkRecordVo.setTotalAmount(MathUtil.round(add.toPlainString())); checkRecordVo.setTotalAmount(MathUtil.round(add.toPlainString()));
} else { } else {

@ -51,6 +51,4 @@ public interface EmailMaintainService {
String getUserName(String userCode); String getUserName(String userCode);
int insertBatch(List<EmailMaintainVo> entities); int insertBatch(List<EmailMaintainVo> entities);
EmailMaintainVo getEmailMaintainVo(EmailMaintainVo emailMaintain);
} }

@ -70,7 +70,6 @@ public class EmailMaintainServiceImpl implements EmailMaintainService {
*/ */
@Override @Override
public boolean insert(EmailMaintainVo emailMaintain) { public boolean insert(EmailMaintainVo emailMaintain) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
if(StringUtils.isEmpty(emailMaintain.getId())){ if(StringUtils.isEmpty(emailMaintain.getId())){
emailMaintain.setId(IdUtil.nanoId()); emailMaintain.setId(IdUtil.nanoId());
} }
@ -117,13 +116,9 @@ public class EmailMaintainServiceImpl implements EmailMaintainService {
return emailMaintainDao.insertBatch(entities); return emailMaintainDao.insertBatch(entities);
} }
@Override
public EmailMaintainVo getEmailMaintainVo(EmailMaintainVo emailMaintain) {
return emailMaintainDao.getEmailMaintainVo(emailMaintain);
}
//根据用户名进行查询 //根据用户名进行查询
public void getdeptInfo(String deptId){ public void getdeptInfo(String deptId){
DynamicContextHolder.push(DbConstant.BASICS_READ); DynamicContextHolder.push(DbConstant.BASICS_READ);
} }
} }

@ -5,19 +5,16 @@ import cn.hutool.core.codec.Base64;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.dxhy.common.constant.DbConstant; import com.dxhy.common.constant.DbConstant;
import com.dxhy.common.datasource.config.DynamicContextHolder; import com.dxhy.common.datasource.config.DynamicContextHolder;
import com.dxhy.common.util.UUIDUtils;
import com.dxhy.core.dao.mailGather.MailGatherLogDao; import com.dxhy.core.dao.mailGather.MailGatherLogDao;
import com.dxhy.core.model.mailGather.MailGatherLogVo; import com.dxhy.core.model.mailGather.MailGatherLogVo;
import com.dxhy.core.service.mailGather.MailGatherLogService; import com.dxhy.core.service.mailGather.MailGatherLogService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -73,10 +70,6 @@ public class MailGatherLogServiceImpl implements MailGatherLogService {
*/ */
@Override @Override
public MailGatherLogVo insert(MailGatherLogVo mailGatherLog) { public MailGatherLogVo insert(MailGatherLogVo mailGatherLog) {
if(StringUtils.isEmpty(mailGatherLog.getId())){
mailGatherLog.setId(UUIDUtils.generateShortUuid());
}
mailGatherLog.setCreateTime(new Date());
this.mailGatherLogDao.insert(mailGatherLog); this.mailGatherLogDao.insert(mailGatherLog);
return mailGatherLog; return mailGatherLog;
} }

@ -8,7 +8,6 @@ import com.alibaba.fastjson.JSONObject;
import com.dxhy.common.constant.DbConstant; import com.dxhy.common.constant.DbConstant;
import com.dxhy.common.datasource.config.DynamicContextHolder; import com.dxhy.common.datasource.config.DynamicContextHolder;
import com.dxhy.common.util.MD5; import com.dxhy.common.util.MD5;
import com.dxhy.common.util.UUIDUtils;
import com.dxhy.core.job.entity.ScheduleJobEntity; import com.dxhy.core.job.entity.ScheduleJobEntity;
import com.dxhy.core.job.service.ScheduleJobService; import com.dxhy.core.job.service.ScheduleJobService;
import com.dxhy.core.model.mailGather.EmailMaintainVo; import com.dxhy.core.model.mailGather.EmailMaintainVo;
@ -94,13 +93,15 @@ public class SnEmailGatherTask {
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
String password = Base64Decoder.decodeStr(maintainVo.getEmailPassword()); String password = Base64Decoder.decodeStr(maintainVo.getEmailPassword());
String emailName = maintainVo.getEmailAddress(); String emailName = maintainVo.getEmailAddress();
try { try {
Store store = mailAuth(emailName, password); Store store = mailAuth(emailName, password);
if(store == null){ if(store == null){
MailGatherLogVo gatherLogVo = new MailGatherLogVo(); MailGatherLogVo gatherLogVo = new MailGatherLogVo();
gatherLogVo.setId(UUIDUtils.generateShortUuid()); gatherLogVo.setId(IdUtil.nanoId());
gatherLogVo.setErrorMsg("邮箱认证失败"); gatherLogVo.setErrorMsg("邮箱认证失败");
gatherLogVo.setOcrType("1"); gatherLogVo.setOcrType("1");
gatherLogVo.setCreateTime(new Date());
gatherLogVo.setFromAddress(emailName); gatherLogVo.setFromAddress(emailName);
mailGatherLogService.insert(gatherLogVo); mailGatherLogService.insert(gatherLogVo);
return; return;
@ -127,7 +128,7 @@ public class SnEmailGatherTask {
gatherLogVo.setSubject(EmailParseUtils.getSubject(msg)); gatherLogVo.setSubject(EmailParseUtils.getSubject(msg));
gatherLogVo.setFromAddress(emailName); gatherLogVo.setFromAddress(emailName);
gatherLogVo.setReceiveAddress(EmailParseUtils.getReceiveAddress(msg, null)); gatherLogVo.setReceiveAddress(EmailParseUtils.getReceiveAddress(msg, null));
gatherLogVo.setSentDate(EmailParseUtils.getSentDate(msg, null)); gatherLogVo.setSentDate( EmailParseUtils.getSentDate(msg, null));
gatherLogVo.setCreateTime(new Date()); gatherLogVo.setCreateTime(new Date());
log.debug("主题: " + EmailParseUtils.getSubject(msg)); log.debug("主题: " + EmailParseUtils.getSubject(msg));

@ -37,10 +37,8 @@ class SnEmailGatherTaskTest {
String port = "110"; String port = "110";
//邮件接收服务器地址 //邮件接收服务器地址
String mail_host = "mail.pop3.host"; String mail_host = "mail.pop3.host";
String emailName = "1149953701@qq.com"; String emailName = "15201210373@163.com";
String password = "pmdzleyabmlzgdhc"; String password = "JKZATQTPHDDQTQSH";
// String emailName = "15201210373@163.com";
// String password = "JKZATQTPHDDQTQSH";
String mailSuffix = emailName.split("@")[1]; String mailSuffix = emailName.split("@")[1];
//邮箱类型 //邮箱类型
String mailType = mailSuffix.split("\\.")[0]; String mailType = mailSuffix.split("\\.")[0];
@ -63,7 +61,7 @@ class SnEmailGatherTaskTest {
//连接邮箱服务器 //连接邮箱服务器
//获取当前时间 //获取当前时间
Date currentTime = new Date(); Date currentTime = new Date();
// 品 ping获得收件箱 pop3协议只有一个有效的文件夹就是INBOX // 获得收件箱 pop3协议只有一个有效的文件夹就是INBOX
Folder folder = store.getFolder("INBOX"); Folder folder = store.getFolder("INBOX");
//获取邮件列表 //获取邮件列表
folder.open(Folder.READ_WRITE); folder.open(Folder.READ_WRITE);
@ -115,8 +113,8 @@ class SnEmailGatherTaskTest {
Map resultMap = JSONObject.parseObject(body, Map.class); Map resultMap = JSONObject.parseObject(body, Map.class);
Object status = resultMap.get("status"); Object status = resultMap.get("status");
System.out.println(JSONObject.toJSONString("================="+resultMap));
if(status != null && "200".equals(String.valueOf(status))){ if(status != null && "200".equals(String.valueOf(status))){
} }
System.out.println(body); System.out.println(body);
} catch (NoSuchAlgorithmException e) { } catch (NoSuchAlgorithmException e) {
@ -167,7 +165,7 @@ class SnEmailGatherTaskTest {
OpenServiceOcr openServiceOcr = openServiceOcrs.get(i); OpenServiceOcr openServiceOcr = openServiceOcrs.get(i);
OpenServiceOcr.InvoiceOcrData invoiceOcrData = openServiceOcr.getData(); OpenServiceOcr.InvoiceOcrData invoiceOcrData = openServiceOcr.getData();
OcrResultToyxVo resultToyxVo = new OcrResultToyxVo(); OcrResultToyxVo resultToyxVo = new OcrResultToyxVo();
resultToyxVo.setCompanyId("c040"); resultToyxVo.setCompanyId("");
resultToyxVo.setSource("01"); resultToyxVo.setSource("01");
resultToyxVo.setInvoiceCode(invoiceOcrData.getFPDM()); resultToyxVo.setInvoiceCode(invoiceOcrData.getFPDM());
resultToyxVo.setInvoiceNumber(invoiceOcrData.getFPHM()); resultToyxVo.setInvoiceNumber(invoiceOcrData.getFPHM());
@ -178,7 +176,7 @@ class SnEmailGatherTaskTest {
resultToyxVo.setFileType("102"); resultToyxVo.setFileType("102");
resultToyxVo.setFileByte(map.get("pdfStream")); resultToyxVo.setFileByte(map.get("pdfStream"));
resultToyxVo.setEmail(map.get("emailName")); resultToyxVo.setEmail(map.get("emailName"));
resultToyxVo.setEmployeeId("01142085"); resultToyxVo.setEmployeeId("");
resultToyxVoList.add(resultToyxVo); resultToyxVoList.add(resultToyxVo);
} }

@ -345,8 +345,11 @@ public class CustomExportThread extends BaseThread {
private boolean cicleExport(Map<String, Object> pramsMap, int curr, String excelFile) throws Exception { private boolean cicleExport(Map<String, Object> pramsMap, int curr, String excelFile) throws Exception {
// 查询指定页数的数据 // 查询指定页数的数据
JSONObject pageData = customsService.selectByPramsMap(pramsMap, curr, default_size); JSONObject pageData = customsService.selectByPramsMap(pramsMap, curr, default_size);
log.info("pageData={}",pageData);
boolean hasNext = pageData.getBooleanValue("hasNext"); boolean hasNext = pageData.getBooleanValue("hasNext");
List<String[]> dataList = (List<String[]>)pageData.get("datalist"); List<String[]> dataList = (List<String[]>)pageData.get("datalist");
log.info("dataList={}",dataList);
boolean firstPage = false; boolean firstPage = false;
if (curr == default_curr) { if (curr == default_curr) {
firstPage = true; firstPage = true;

@ -164,7 +164,7 @@ public class InvoiceQueryUtil {
if(FplxEnum.QDZZP.getFplxDm().equals(invoiceType) || FplxEnum.QDPP.getFplxDm().equals(invoiceType)){ if(FplxEnum.QDZZP.getFplxDm().equals(invoiceType) || FplxEnum.QDPP.getFplxDm().equals(invoiceType)){
requestData.put("invoiceType", "31"); requestData.put("invoiceType", "31");
requestData.put("invoiceCode", ""); requestData.put("invoiceCode", "");
requestData.put("invoiceNo", invoiceCode + invoiceNo); requestData.put("invoiceNo", invoiceCode+invoiceNo);
}else { }else {
requestData.put("invoiceType", iu.getFplxdm()); requestData.put("invoiceType", iu.getFplxdm());
requestData.put("invoiceCode", invoiceCode); requestData.put("invoiceCode", invoiceCode);

@ -48,7 +48,7 @@
</select> </select>
<!--统计总行数--> <!--统计总行数-->
<select id="getEmailMaintainVo" resultMap="EmailMaintainMap"> <select id="count" resultType="java.lang.Long">
select count(1) select count(1)
from email_maintain from email_maintain
<where> <where>

@ -7,7 +7,7 @@
<result property="subject" column="subject" jdbcType="VARCHAR"/> <result property="subject" column="subject" jdbcType="VARCHAR"/>
<result property="fromAddress" column="from_address" jdbcType="VARCHAR"/> <result property="fromAddress" column="from_address" jdbcType="VARCHAR"/>
<result property="receiveAddress" column="receive_address" jdbcType="VARCHAR"/> <result property="receiveAddress" column="receive_address" jdbcType="VARCHAR"/>
<result property="sentDate" column="sent_date" jdbcType="TIMESTAMP"/> <result property="sentDate" column="sent_date" jdbcType="VARCHAR"/>
<result property="fileType" column="file_type" jdbcType="VARCHAR"/> <result property="fileType" column="file_type" jdbcType="VARCHAR"/>
<result property="fpdm" column="fpdm" jdbcType="VARCHAR"/> <result property="fpdm" column="fpdm" jdbcType="VARCHAR"/>
<result property="fphm" column="fphm" jdbcType="VARCHAR"/> <result property="fphm" column="fphm" jdbcType="VARCHAR"/>
@ -28,32 +28,42 @@
<!--查询指定行数据--> <!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="MailGatherLogMap" parameterType="java.util.Map"> <select id="queryAllByLimit" resultMap="MailGatherLogMap" parameterType="java.util.Map">
SELECT select
m.create_time, e.dept_name, e.username, m.from_address, m.file_name, m.file_type, m.ocr_type, m.error_msg id, subject, from_address, receive_address, sent_date, file_type, fpdm, fphm, msg_uid, ocr_type, error_msg, file_name, create_time
FROM from mail_gather_log
mail_gather_log m
LEFT JOIN email_maintain e ON m.from_address = e.email_address
<where> <where>
<if test="deptId != null and deptId != ''"> <if test="fromAddress != null and fromAddress != ''">
and e.dept_id = #{deptId} and from_address = #{fromAddress}
</if>
<if test="receiveAddress != null and receiveAddress != ''">
and receive_address = #{receiveAddress}
</if> </if>
<if test="username != null and username != ''"> <if test="sentDate != null and sentDate != ''">
and e.username = #{username} and sent_date = #{sentDate}
</if> </if>
<if test="userId != null and userId != ''"> <if test="fileType != null and fileType != ''">
and e.user_id = #{userId} and file_type = #{fileType}
</if> </if>
<if test="createUser != null and createUser != ''"> <if test="fpdm != null and fpdm != ''">
and e.create_user = #{createUser} and fpdm = #{fpdm}
</if>
<if test="fphm != null and fphm != ''">
and fphm = #{fphm}
</if>
<if test="msgUid != null and msgUid != ''">
and msg_uid = #{msgUid}
</if> </if>
<if test="ocrType != null and ocrType != ''"> <if test="ocrType != null and ocrType != ''">
and m.ocr_type = #{ocrType} and ocr_type = #{ocrType}
</if> </if>
<if test="startTime !=null and startTime != ''"> <if test="errorMsg != null and errorMsg != ''">
and m.create_time >= #{startTime} and error_msg = #{errorMsg}
</if>
<if test="fileName != null and fileName != ''">
and file_name = #{fileName}
</if> </if>
<if test="endTime !=null and endTime != ''"> <if test="createTime != null">
and #{endTime} >= m.create_time and create_time = #{createTime}
</if> </if>
</where> </where>
</select> </select>

@ -19,13 +19,10 @@ import com.dxhy.common.utils.GzipUtils;
import com.dxhy.common.utils.TripleDesUtil; import com.dxhy.common.utils.TripleDesUtil;
import com.dxhy.common.vo.UserInfo; import com.dxhy.common.vo.UserInfo;
import com.dxhy.erp.dao.SysDeptDao; import com.dxhy.erp.dao.SysDeptDao;
import com.dxhy.erp.entity.BaseInvoiceEditVO; import com.dxhy.erp.entity.*;
import com.dxhy.erp.entity.SysDeptEntity;
import com.dxhy.erp.entity.TDxInvoiceReimburse;
import com.dxhy.erp.entity.V5.CheckResult; import com.dxhy.erp.entity.V5.CheckResult;
import com.dxhy.erp.entity.V5.DxhyInterfaceRequest; import com.dxhy.erp.entity.V5.DxhyInterfaceRequest;
import com.dxhy.erp.entity.V5.DxhyInterfaceResponse; import com.dxhy.erp.entity.V5.DxhyInterfaceResponse;
import com.dxhy.erp.entity.VoucherRecord;
import com.dxhy.erp.model.*; import com.dxhy.erp.model.*;
import com.dxhy.erp.model.auth.InterfaceCode; import com.dxhy.erp.model.auth.InterfaceCode;
import com.dxhy.erp.service.*; import com.dxhy.erp.service.*;
@ -106,8 +103,6 @@ public class InterfaceController extends AbstractController {
private IReceiptOutService iReceiptOutService; private IReceiptOutService iReceiptOutService;
@Resource @Resource
private VoucherRecordService voucherRecordService; private VoucherRecordService voucherRecordService;
@Value("${erp.ipUrl}")
private String ipUrl;
@Resource @Resource
private BaseIReceiptInvoiceService baseIReceiptInvoiceService; private BaseIReceiptInvoiceService baseIReceiptInvoiceService;
@ -153,7 +148,7 @@ public class InterfaceController extends AbstractController {
/** /**
* 鉴权 * 鉴权
*/ */
result = authV5( version+"/"+interfaceName, request, dxhyInterfaceRequest,secretKey); result = authV5(request, dxhyInterfaceRequest,secretKey);
long end1 = System.currentTimeMillis(); long end1 = System.currentTimeMillis();
log.debug("{}鉴权耗时{}毫秒", LOGGER_MSG, end1 - begin1); log.debug("{}鉴权耗时{}毫秒", LOGGER_MSG, end1 - begin1);
if (!ConfigurerInfo.SUCCSSCODE.equals(result.getCode())) { if (!ConfigurerInfo.SUCCSSCODE.equals(result.getCode())) {
@ -298,15 +293,14 @@ public class InterfaceController extends AbstractController {
return result; return result;
} }
private CheckResult authV5(String url,HttpServletRequest request, DxhyInterfaceRequest dxhyInterfaceRequest,String secretKey) { private CheckResult authV5(HttpServletRequest request, DxhyInterfaceRequest dxhyInterfaceRequest,String secretKey) {
CheckResult checkResult = new CheckResult(RespStatusEnum.AUTHFAIL); CheckResult checkResult = new CheckResult(RespStatusEnum.AUTHFAIL);
String reqUrl = request.getRequestURL().toString(); String reqUrl = request.getRequestURL().toString();
if (reqUrl.contains(ConfigureConstant.STRING_WH)) { if (reqUrl.contains(ConfigureConstant.STRING_WH)) {
reqUrl = reqUrl.substring(ConfigureConstant.INT_0, reqUrl.indexOf(ConfigureConstant.STRING_WH)); reqUrl = reqUrl.substring(ConfigureConstant.INT_0, reqUrl.indexOf(ConfigureConstant.STRING_WH));
} }
log.debug("{}请求路径:{}", LOGGER_MSG, reqUrl);
//获取鉴权URL //获取鉴权URL
String signUrl = ipUrl+url+"?"; String signUrl = getAuthUrl(reqUrl, request.getMethod());
TreeMap<String, String> sortMap = new TreeMap<>(); TreeMap<String, String> sortMap = new TreeMap<>();
sortMap.put(ConfigurerInfo.SECRETID, dxhyInterfaceRequest.getSecretId()); sortMap.put(ConfigurerInfo.SECRETID, dxhyInterfaceRequest.getSecretId());
sortMap.put(ConfigurerInfo.DATA_EXCHANGE_ID, dxhyInterfaceRequest.getDataExchangeId()); sortMap.put(ConfigurerInfo.DATA_EXCHANGE_ID, dxhyInterfaceRequest.getDataExchangeId());
@ -713,7 +707,6 @@ public class InterfaceController extends AbstractController {
case "INVOICE.SALSESPUSH": case "INVOICE.SALSESPUSH":
returnResult = invoicePoolService.salsePush(globalInfo, requestParam, request, response, authorize); returnResult = invoicePoolService.salsePush(globalInfo, requestParam, request, response, authorize);
break; break;
// 接口编码不存在
// 获取单张发票 // 获取单张发票
case "INVOICE.SINGLEINVOICECHECK": case "INVOICE.SINGLEINVOICECHECK":
@ -724,6 +717,7 @@ public class InterfaceController extends AbstractController {
returnResult = gatherService.syncInvoiceInfo(globalInfo, requestParam, request, response, authorize); returnResult = gatherService.syncInvoiceInfo(globalInfo, requestParam, request, response, authorize);
break; break;
// 接口编码不存在
default: default:
returnResult = authStatusService.getInterfaceCodeError(globalInfo); returnResult = authStatusService.getInterfaceCodeError(globalInfo);
break; break;

@ -25,6 +25,9 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.ParseException;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
/** /**
@ -327,9 +330,13 @@ public class SDNYMainProcessController extends AbstractController {
private SAPInvoiceInfo convertToSapOnject(SNInvoice snInvoice, String imageId, String compCode) { private SAPInvoiceInfo convertToSapOnject(SNInvoice snInvoice, String imageId, String compCode) {
//转换时间格式
Date date = new Date(); Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
String dateString = formatter.format(date);
SAPInvoiceInfo info = new SAPInvoiceInfo(); SAPInvoiceInfo info = new SAPInvoiceInfo();
String snFplx = convertToSapType(snInvoice.getInvoiceType()); String snFplx = convertToSapType(snInvoice.getInvoiceType());
info.setZBAZT("0"); info.setZBAZT("0");
info.setZXFSH(snInvoice.getSalesTaxNo()); info.setZXFSH(snInvoice.getSalesTaxNo());
@ -340,15 +347,17 @@ public class SDNYMainProcessController extends AbstractController {
info.setZJKZM(snInvoice.getImportCertificateNo()); info.setZJKZM(snInvoice.getImportCertificateNo());
info.setZDJZH(snInvoice.getCertificateNo()); info.setZDJZH(snInvoice.getCertificateNo());
info.setZGFMC(snInvoice.getPurchaserName()); info.setZGFMC(snInvoice.getPurchaserName());
info.setSORT(snInvoice.getSort());
if (snInvoice.getTotalAmount() != null && snInvoice.getTotalTax() != null) { if (snInvoice.getTotalAmount() != null && snInvoice.getTotalTax() != null) {
BigDecimal total = new BigDecimal(snInvoice.getTotalAmount()); BigDecimal total = new BigDecimal(snInvoice.getTotalAmount());
// BigDecimal tax = new BigDecimal(snInvoice.getTotalTax()); // BigDecimal tax = new BigDecimal(snInvoice.getTotalTax());
// BigDecimal subtract = total.subtract(tax); // BigDecimal subtract = total.subtract(tax);
info.setZJK(total.toString()); info.setZJK(total.toString());
}else {
info.setZJK("0.00");
} }
info.setZSCSJ(date); info.setZSCSJ(date);
info.setZCYZT(snInvoice.getCheckStaus());
info.setZYSHW(snInvoice.getCargoInformation()); info.setZYSHW(snInvoice.getCargoInformation());
info.setZFPLX(snFplx); info.setZFPLX(snFplx);
info.setZQYD(snInvoice.getTransportRoute()); info.setZQYD(snInvoice.getTransportRoute());
@ -359,6 +368,7 @@ public class SDNYMainProcessController extends AbstractController {
info.setZSKPH(snInvoice.getMachineCode()); info.setZSKPH(snInvoice.getMachineCode());
info.setZGFZH(snInvoice.getPurchaserBank()); info.setZGFZH(snInvoice.getPurchaserBank());
info.setZBZ(snInvoice.getRemarks()); info.setZBZ(snInvoice.getRemarks());
System.out.println(info.getZGXR());
List<SNInvoiceDetail> invoiceLineList = snInvoice.getInvoiceLineList(); List<SNInvoiceDetail> invoiceLineList = snInvoice.getInvoiceLineList();
List<SAPInvoiceDetail> sapInvoiceDetailList = new ArrayList<>(); List<SAPInvoiceDetail> sapInvoiceDetailList = new ArrayList<>();
if (invoiceLineList != null && invoiceLineList.size() > 0) { if (invoiceLineList != null && invoiceLineList.size() > 0) {
@ -390,7 +400,7 @@ public class SDNYMainProcessController extends AbstractController {
sapInvoiceDetail.setZDW(snInvoiceDetail.getUnit()); sapInvoiceDetail.setZDW(snInvoiceDetail.getUnit());
sapInvoiceDetail.setZGSJBM(snInvoiceDetail.getCommodityCode()); sapInvoiceDetail.setZGSJBM(snInvoiceDetail.getCommodityCode());
sapInvoiceDetail.setZSE(snInvoiceDetail.getTax()); sapInvoiceDetail.setZSE(snInvoiceDetail.getTax());
sapInvoiceDetail.setZSL(snInvoiceDetail.getQuantity()); sapInvoiceDetail.setZSL(snInvoiceDetail.getTaxRate());
sapInvoiceDetail.setZSM(info.getZSM()); sapInvoiceDetail.setZSM(info.getZSM());
sapInvoiceDetail.setZGGXH(snInvoiceDetail.getSpecificationModel()); sapInvoiceDetail.setZGGXH(snInvoiceDetail.getSpecificationModel());
if (snInvoice.getInvoiceCode() != null) { if (snInvoice.getInvoiceCode() != null) {
@ -419,8 +429,13 @@ public class SDNYMainProcessController extends AbstractController {
info.setIMG_ID(imageId); info.setIMG_ID(imageId);
info.setZCPH(snInvoice.getLicensePlate()); info.setZCPH(snInvoice.getLicensePlate());
info.setZLSLBZ(snInvoice.getZeroTaxRateSign()); info.setZLSLBZ(snInvoice.getZeroTaxRateSign());
info.setZCJSJ(date); info.setFPYXBH(snInvoice.getFileId());
//转换日期
info.setZCJSJ(dateString);
info.setZFPZT(snInvoice.getState()); info.setZFPZT(snInvoice.getState());
if (snInvoice.getState() == null) {
info.setZFPZT("0");
}
// info.setZESCSC(""); // info.setZESCSC("");
info.setZFDJM(snInvoice.getEngineNo()); info.setZFDJM(snInvoice.getEngineNo());
info.setZGXR(""); info.setZGXR("");
@ -441,7 +456,7 @@ public class SDNYMainProcessController extends AbstractController {
info.setZXCRS(snInvoice.getPassengersLimited()); info.setZXCRS(snInvoice.getPassengersLimited());
info.setZWSPZ(snInvoice.getPaymentVoucherNo()); info.setZWSPZ(snInvoice.getPaymentVoucherNo());
info.setZCCDW(snInvoice.getTonnage()); info.setZCCDW(snInvoice.getTonnage());
info.setZSWJG(snInvoice.getTaxAuthorityNo()); info.setZSWJG(snInvoice.getTaxAuthorityName());
// info.setZYWDJ(""); // info.setZYWDJ("");
info.setZXCCZ(snInvoice.getStationGetOff()); info.setZXCCZ(snInvoice.getStationGetOff());
info.setZCCRZH(snInvoice.getIdcardNo()); info.setZCCRZH(snInvoice.getIdcardNo());
@ -455,10 +470,23 @@ public class SDNYMainProcessController extends AbstractController {
info.setZJSHJ(snInvoice.getAmountTax()); info.setZJSHJ(snInvoice.getAmountTax());
info.setZCYRMC(snInvoice.getCarrierName()); info.setZCYRMC(snInvoice.getCarrierName());
info.setZJGDM(snInvoice.getAdministrativeDivisionNo()); info.setZJGDM(snInvoice.getAdministrativeDivisionNo());
info.setZGXSJ(date); //时间转换
// info.setZQM(""); info.setZGXSJ(dateString);
info.setZPJLY(snInvoice.getSource()); info.setZPJZT(snInvoice.getState());
info.setZZWLX(snInvoice.getSeat()); info.setZZWLX(snInvoice.getSeat());
info.setZPJLY(snInvoice.getSource());
if (snInvoice.getSource() == null) {
info.setZPJLY("1");
}
info.setZCYZT(snInvoice.getCheckStaus());
if (snInvoice.getCheckStaus()==null){
info.setZCYZT("1");
}
info.setZCJR("opentext");
info.setZGXR("opentext");
info.setZQM("opentext");
String checkDate = snInvoice.getCheckDate().replace("-", "/");
info.setZCYRQ(checkDate);
if (snInvoice.getInvoiceCode() != null) { if (snInvoice.getInvoiceCode() != null) {
info.setZTID(snInvoice.getInvoiceCode() + snInvoice.getInvoiceNumber() + snFplx); info.setZTID(snInvoice.getInvoiceCode() + snInvoice.getInvoiceNumber() + snFplx);
} else { } else {

@ -3,7 +3,6 @@ package com.dxhy.erp.dao;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.dxhy.erp.entity.BaseTDxRecordInvoice;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -186,5 +185,4 @@ public interface TdxRecordInvoiceDao extends BaseMapper<TdxRecordInvoice> {
void saveInvoiceAccount(TdxInvoiceAccount invoice); void saveInvoiceAccount(TdxInvoiceAccount invoice);
void deleteByuuid(@Param("uuids") String[] uuids); void deleteByuuid(@Param("uuids") String[] uuids);
} }

@ -109,7 +109,7 @@ public class SAPInvoiceInfo {
* 查验日期 * 查验日期
*/ */
@JSONField(name = "ZCYRQ") @JSONField(name = "ZCYRQ")
private Date ZCYRQ; private String ZCYRQ;
/** /**
* 查验状态 * 查验状态
@ -314,7 +314,7 @@ public class SAPInvoiceInfo {
* 创建时间 * 创建时间
*/ */
@JSONField(name = "ZCJSJ") @JSONField(name = "ZCJSJ")
private Date ZCJSJ; private String ZCJSJ;
/** /**
* 发票状态 * 发票状态
@ -513,7 +513,7 @@ public class SAPInvoiceInfo {
* 更新时间 * 更新时间
*/ */
@JSONField(name = "ZGXSJ") @JSONField(name = "ZGXSJ")
private Date ZGXSJ; private String ZGXSJ;
/** /**
* 全名 * 全名

@ -1,8 +1,8 @@
package com.dxhy.erp.service; package com.dxhy.erp.service;
import com.dxhy.erp.entity.BaseReceiptOutCancelEditReqVO;
import com.dxhy.erp.entity.BaseTDxRecordInvoice; import com.dxhy.erp.entity.BaseTDxRecordInvoice;
import com.dxhy.erp.model.BaseReceiptOutCancelEditReqVO;
import java.util.List; import java.util.List;
@ -23,6 +23,7 @@ public interface BaseIReceiptInvoiceService {
*/ */
void updateBatch(List<BaseTDxRecordInvoice> condEntity); void updateBatch(List<BaseTDxRecordInvoice> condEntity);
/** /**
* 取消已转出进项税请求确认 * 取消已转出进项税请求确认
* *
@ -32,5 +33,4 @@ public interface BaseIReceiptInvoiceService {
*/ */
String cancelOut(BaseReceiptOutCancelEditReqVO reqVO); String cancelOut(BaseReceiptOutCancelEditReqVO reqVO);
} }

@ -11,9 +11,9 @@ import com.dxhy.common.enums.JxszcZtEnum;
import com.dxhy.common.service.impl.MpBaseServiceImpl; import com.dxhy.common.service.impl.MpBaseServiceImpl;
import com.dxhy.erp.dao.BaseTDxRecordInvoiceDao; import com.dxhy.erp.dao.BaseTDxRecordInvoiceDao;
import com.dxhy.erp.dao.TdxRecordInvoiceDao; import com.dxhy.erp.dao.TdxRecordInvoiceDao;
import com.dxhy.erp.entity.BaseReceiptOutCancelEditReqVO;
import com.dxhy.erp.entity.BaseTDxRecordInvoice; import com.dxhy.erp.entity.BaseTDxRecordInvoice;
import com.dxhy.erp.entity.BaseTDxRecordInvoiceOut; import com.dxhy.erp.entity.BaseTDxRecordInvoiceOut;
import com.dxhy.erp.model.BaseReceiptOutCancelEditReqVO;
import com.dxhy.erp.service.BaseIReceiptInvoiceService; import com.dxhy.erp.service.BaseIReceiptInvoiceService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -33,8 +33,10 @@ import java.util.List;
@SuppressWarnings("AlibabaUndefineMagicConstant") @SuppressWarnings("AlibabaUndefineMagicConstant")
@Service("baseIReceiptInvoiceService") @Service("baseIReceiptInvoiceService")
public class BaseIReceiptInvoiceServiceImpl extends MpBaseServiceImpl<BaseTDxRecordInvoiceDao, BaseTDxRecordInvoice> implements BaseIReceiptInvoiceService { public class BaseIReceiptInvoiceServiceImpl extends MpBaseServiceImpl<BaseTDxRecordInvoiceDao, BaseTDxRecordInvoice> implements BaseIReceiptInvoiceService {
@Resource @Resource
private TdxRecordInvoiceDao tdxRecordInvoiceDao; private TdxRecordInvoiceDao tdxRecordInvoiceDao;
@Override @Override
public List<BaseTDxRecordInvoice> selectByUuids(String[] uuids) { public List<BaseTDxRecordInvoice> selectByUuids(String[] uuids) {
QueryWrapper<BaseTDxRecordInvoice> queryWrapper = new QueryWrapper<>(); QueryWrapper<BaseTDxRecordInvoice> queryWrapper = new QueryWrapper<>();
@ -51,7 +53,6 @@ public class BaseIReceiptInvoiceServiceImpl extends MpBaseServiceImpl<BaseTDxRec
super.update(entity, updateWrapper); super.update(entity, updateWrapper);
} }
super.succResult(new JSONObject()); super.succResult(new JSONObject());
} }
/** /**
@ -132,6 +133,5 @@ public class BaseIReceiptInvoiceServiceImpl extends MpBaseServiceImpl<BaseTDxRec
super.baseMapper.update(null,updateWrapper); super.baseMapper.update(null,updateWrapper);
} }
} }
} }

@ -206,12 +206,6 @@
STR_TO_DATE(#{invoiceDate}, '%Y-%m-%d %H'), #{uuid}, STR_TO_DATE(#{invoiceDate}, '%Y-%m-%d %H'), #{uuid},
now(), #{pzh}, #{bxr}, #{checkCode}, #{isSign}) now(), #{pzh}, #{bxr}, #{checkCode}, #{isSign})
</insert> </insert>
<delete id="deleteByuuid" parameterType="string">
delete from t_dx_record_invoice_out where uuid in
<foreach collection="uuids" open="(" close=")" separator="," item="item">
#{item}
</foreach>
</delete>
<select id="selectByCollect" resultType="com.dxhy.erp.entity.TdxRecordInvoice" databaseId="mysql"> <select id="selectByCollect" resultType="com.dxhy.erp.entity.TdxRecordInvoice" databaseId="mysql">
@ -339,6 +333,13 @@
order by last_update_date desc limit #{pramsMap.start},#{pramsMap.num} order by last_update_date desc limit #{pramsMap.start},#{pramsMap.num}
</select> </select>
<delete id="deleteByuuid" parameterType="string">
delete from t_dx_record_invoice_out where uuid in
<foreach collection="uuids" open="(" close=")" separator="," item="item">
#{item}
</foreach>
</delete>
<select id="selectByState" resultType="com.dxhy.erp.model.State" databaseId="oracle"> <select id="selectByState" resultType="com.dxhy.erp.model.State" databaseId="oracle">
select * from ( select * from (

@ -39,11 +39,11 @@ public class TicketServiceImpl extends MpBaseServiceImpl<ExtTicketDao, ExtTicket
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
DynamicContextHolder.push(paramsMap.get("dbName") + DbConstant.BUSINESS_READ); DynamicContextHolder.push(paramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try { try {
String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "开票日期", "销方名称", "乘坐人", "证件号", "班次/车次", "金额", "税率(%)", "税额", String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "开票日期", "销方名称", "乘坐人", "证件号", "班次/车次", "金额",
"签收状态", "签收日期", "签收方式", "签收人", "抵扣状态", "业务单号", "入池时间","凭证号", "过账时间", "影像号", "账期"}; "签收状态", "签收日期", "签收方式", "签收人", "抵扣状态", "业务单号", "入池时间","凭证号", "过账时间", "影像号", "账期"};
String[] titleprop = {"xh", "invoiceTypeString", "invoiceCode", "invoiceNo", "invoiceDate", "xfName", String[] titleprop = {"xh", "invoiceTypeString", "invoiceCode", "invoiceNo", "invoiceDate", "xfName",
"passenger", "passengerSfzh", "trainNumber", "invoiceAmount", "taxRate", "taxAmount", "qsStatus", "passenger", "passengerSfzh", "trainNumber", "invoiceAmount", "qsStatus",
"qsDate", "qsType", "qsName", "isDeduction", "businessDocumentNumber", "createDate","voucherNo", "postingTime","imageId","accountPeriod"}; "qsDate", "qsType", "qsName", "isDeduction", "businessDocumentNumber", "createDate","voucherNo", "postingTime","imageId","accountPeriod"};
// 需要设置返回列表标题时调用 // 需要设置返回列表标题时调用
json = super.setTitleList(titlelist, titleprop); json = super.setTitleList(titlelist, titleprop);

@ -9,6 +9,7 @@ spring:
name: dxhy-operation-flow name: dxhy-operation-flow
profiles: profiles:
active: @deployType@ active: @deployType@
# active: std
jackson: jackson:
date-format: yyyy-MM-dd HH:mm:ss date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8 time-zone: GMT+8

@ -59,7 +59,6 @@ import javax.annotation.Resource;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.security.acl.LastOwnerException;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;

Loading…
Cancel
Save