nc推送添加推送时间;nc动态获取组织;
This commit is contained in:
+8
@@ -18,6 +18,8 @@ import com.mhd.bms.domain.billOperationLog.repository.todo.BillOperationLogDO;
|
||||
import com.mhd.bms.domain.billOperationLog.service.BillOperationLogDomainService;
|
||||
import com.mhd.bms.domain.billingStatement.entity.BillingStatement;
|
||||
import com.mhd.bms.domain.billingStatement.service.BillingStatementDomainService;
|
||||
import com.mhd.bms.domain.ncLog.entity.NcLog;
|
||||
import com.mhd.bms.domain.ncLog.repository.mapper.NcLogMapper;
|
||||
import com.mhd.bms.domain.paymentOrder.repository.po.PaymentOrderPO;
|
||||
import com.mhd.bms.domain.paymentOrder.repository.todo.PaymentOrderDO;
|
||||
import com.mhd.bms.domain.paymentOrder.service.PaymentOrderDomainService;
|
||||
@@ -72,6 +74,8 @@ public class BillManageApplicationService {
|
||||
private PaymentOrderDomainService paymentOrderDomainService;
|
||||
@Autowired
|
||||
private BillDetailMapper billDetailMapper;
|
||||
@Autowired
|
||||
private NcLogMapper ncLogMapper;
|
||||
|
||||
|
||||
/**
|
||||
@@ -524,6 +528,10 @@ public class BillManageApplicationService {
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<NcLog> getNcLog(Long id, Long type) {
|
||||
return ncLogMapper.selectList(new LambdaQueryWrapper<NcLog>().eq(NcLog::getOrderId, id).eq(NcLog::getType, type).orderByDesc(NcLog::getSendTime));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询统计
|
||||
*/
|
||||
|
||||
+2
@@ -38,4 +38,6 @@ public interface BillManageMapper extends BaseMapper<BillManage>
|
||||
String getDeptValue(@Param("dictCode") String dictCode);
|
||||
|
||||
String getDeptName(@Param("dictCode") String dictCode);
|
||||
|
||||
String getOrgCodeNc(@Param("organizationId") Long organizationId);
|
||||
}
|
||||
+36
-13
@@ -162,9 +162,9 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
throw new ServiceException("该记录已同步,不需要再次同步");
|
||||
}
|
||||
try {
|
||||
if(billManage.getOrganizationName().contains("通宇")){
|
||||
//if(billManage.getOrganizationName().contains("通宇")){
|
||||
boolean b = synchronousNc_TY(businessDocumentDetaliId);
|
||||
}
|
||||
//}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -210,7 +210,7 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
String actualInvoiceCustomerId = make.getActualInvoiceCustomerId();
|
||||
String customerCodeNc = billManageMapper.getCustomerCodeNc(actualInvoiceCustomerId);
|
||||
String settlementCurrency=reconciliation.getSettlementCurrency();
|
||||
|
||||
String orgCodeNc = billManageMapper.getOrgCodeNc(organizationId);
|
||||
String documentPreparerNcCode = billManageMapper.getDocumentPreparerNcCode(salesmanId);
|
||||
String makerCodeNc = documentPreparerNcCode;
|
||||
String settlementCurrencyNcCode = settlementCurrency;
|
||||
@@ -285,8 +285,13 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
bodys.setItem(ysitemList);
|
||||
Ysbillhead billhead=new Ysbillhead();
|
||||
billhead.setPk_group("CNK");
|
||||
billhead.setPk_org("NG04");
|
||||
billhead.setSett_org("NG04");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
billhead.setPk_org(orgCodeNc);
|
||||
billhead.setSett_org(orgCodeNc);
|
||||
} else {
|
||||
billhead.setPk_org("NG04");
|
||||
billhead.setSett_org("NG04");
|
||||
}
|
||||
billhead.setCreationtime(dateString);
|
||||
billhead.setCreator(makerCodeNc);
|
||||
billhead.setPk_billtype("F0");
|
||||
@@ -318,8 +323,13 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
ufinterface.setBusinessunitcode("");
|
||||
ufinterface.setFilename("");
|
||||
ufinterface.setIsexchange("Y");
|
||||
ufinterface.setOrgcode("NG04");
|
||||
ufinterface.setReceiver("NG04");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
ufinterface.setOrgcode(orgCodeNc);
|
||||
ufinterface.setReceiver(orgCodeNc);
|
||||
} else {
|
||||
ufinterface.setOrgcode("NG04");
|
||||
ufinterface.setReceiver("NG04");
|
||||
}
|
||||
ufinterface.setReplace("Y");
|
||||
ufinterface.setRoottag("");
|
||||
ufinterface.setSender("nqyw");
|
||||
@@ -337,6 +347,7 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
ncLog.setRequestBody(xmlString);
|
||||
ncLog.setResponeBody("");
|
||||
ncLog.setType(0L);
|
||||
ncLog.setSendTime(new Date());
|
||||
ncLog.setOrganizationId(reconciliation.getOrganizationId());
|
||||
ncLog.setOrganizationName(reconciliation.getOrganizationName());
|
||||
ncLog.setTopOrganizationId(reconciliation.getTopOrganizationId());
|
||||
@@ -418,9 +429,9 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
}
|
||||
|
||||
try {
|
||||
if(reconciliation.getOrganizationName().contains("通宇")){
|
||||
//if(reconciliation.getOrganizationName().contains("通宇")){
|
||||
boolean b = synchronousNcSK_TY(businessDocumentDetaliId);
|
||||
}
|
||||
//}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -452,6 +463,7 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
reconciliationDTO.setInnerNumber(reconciliation.getBillNumber());
|
||||
String url = "";
|
||||
Long organizationId = reconciliation.getOrganizationId();
|
||||
String orgCodeNc = billManageMapper.getOrgCodeNc(organizationId);
|
||||
String organizationName = reconciliation.getOrganizationName();
|
||||
String ncUrl = billManageMapper.getNcUrl("nc", organizationName, organizationId);
|
||||
if (ncUrl!=null&&ncUrl!="") {
|
||||
@@ -545,8 +557,13 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
bodys.setItem(ysitemList);
|
||||
SKbillhead billhead=new SKbillhead();
|
||||
billhead.setPk_group("CNK");
|
||||
billhead.setPk_org("NG04");
|
||||
billhead.setSett_org("NG04");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
billhead.setPk_org(orgCodeNc);
|
||||
billhead.setSett_org(orgCodeNc);
|
||||
} else {
|
||||
billhead.setPk_org("NG04");
|
||||
billhead.setSett_org("NG04");
|
||||
}
|
||||
billhead.setCreationtime(dateString);
|
||||
billhead.setPk_billtype("F2");
|
||||
billhead.setCreator(makerCodeNc);
|
||||
@@ -575,8 +592,13 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
ufinterface.setBusinessunitcode("");
|
||||
ufinterface.setFilename("");
|
||||
ufinterface.setIsexchange("Y");
|
||||
ufinterface.setOrgcode("NG04");
|
||||
ufinterface.setReceiver("NG04");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
ufinterface.setOrgcode(orgCodeNc);
|
||||
ufinterface.setReceiver(orgCodeNc);
|
||||
} else {
|
||||
ufinterface.setOrgcode("NG04");
|
||||
ufinterface.setReceiver("NG04");
|
||||
}
|
||||
ufinterface.setReplace("Y");
|
||||
ufinterface.setRoottag("");
|
||||
ufinterface.setSender("nqyw");
|
||||
@@ -596,6 +618,7 @@ public class BillManageImpl extends ServiceImpl<BillManageMapper, BillManage> im
|
||||
ncLog.setRequestBody(xmlString);
|
||||
ncLog.setResponeBody("");
|
||||
ncLog.setType(1L);
|
||||
ncLog.setSendTime(new Date());
|
||||
ncLog.setOrganizationId(reconciliation.getOrganizationId());
|
||||
ncLog.setOrganizationName(reconciliation.getOrganizationName());
|
||||
ncLog.setTopOrganizationId(reconciliation.getTopOrganizationId());
|
||||
|
||||
@@ -2,10 +2,14 @@ package com.mhd.bms.domain.ncLog.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@@ -51,5 +55,9 @@ public class NcLog extends BaseVOEntity{
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty(value = "推送时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date sendTime;
|
||||
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import java.util.stream.Stream;
|
||||
import com.mhd.bms.application.server.billManage.BillManageApplicationService;
|
||||
import com.mhd.bms.domain.billManage.repository.po.BillDetailPO;
|
||||
import com.mhd.bms.domain.billingStatement.repository.todo.BillingStatementDO;
|
||||
import com.mhd.bms.domain.ncLog.entity.NcLog;
|
||||
import com.mhd.bms.infrastructure.utils.UniqueKeyUtil;
|
||||
import com.mhd.bms.interfaces.dto.billingStatement.BillingStatementDTO;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
@@ -78,6 +79,18 @@ public class BillManageApi extends BaseController{
|
||||
return AjaxResult.success(billManageApplicationService.listCount(billManageDO));
|
||||
}
|
||||
|
||||
@ApiOperation("获取nc推送日志")
|
||||
@GetMapping(value = "/getNcLog")
|
||||
public AjaxResult getNcLog(@RequestParam(name = "billManageId") Long billManageId, @RequestParam(name = "type") Long type)
|
||||
{
|
||||
List<NcLog> ncLog = billManageApplicationService.getNcLog(billManageId, type);
|
||||
if (ncLog == null || ncLog.size() == 0) {
|
||||
return AjaxResult.error("暂无数据");
|
||||
} else {
|
||||
return AjaxResult.success(ncLog.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("应付账单管理列表统计")
|
||||
@GetMapping(value = "/paymentListCount")
|
||||
|
||||
@@ -150,4 +150,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
SELECT dict_label FROM NGWL_TEST_SYSTEM."SYS_DICT_DATA" where status = '0' and dict_type = 'department' and dict_code = #{dictCode} limit 1
|
||||
</select>
|
||||
|
||||
<select id="getOrgCodeNc" resultType="java.lang.String">
|
||||
SELECT NC_CODE FROM NGWL_TEST_PRODUCT."SYS_ORGANIZATION" where DEL_FLAG = 1 and organization_id = #{organizationId} limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user