From 7efbe3d404243d56533178ceb6b41847563466fe Mon Sep 17 00:00:00 2001 From: hjx <577364224@qq.com> Date: Fri, 5 Dec 2025 18:21:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=97=E6=AD=A7nc65=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mhd/system/api/UserServiceFeign.java | 3 + .../com/mhd/system/api/WlhyServiceFeign.java | 7 + .../factory/RemoteWlhyFallbackFactory.java | 10 + .../core/constant/ServiceNameConstants.java | 4 +- .../mhd/common/core/domain/dto/nc/SKbill.java | 18 + .../common/core/domain/dto/nc/SKbillhead.java | 86 +++ .../common/core/domain/dto/nc/SKbodys.java | 16 + .../mhd/common/core/domain/dto/nc/SKitem.java | 70 +++ .../core/domain/dto/nc/SKufinterface.java | 48 ++ .../common/core/domain/dto/nc/Ysbodys.java | 3 +- .../mhd/common/core/domain/dto/nc/Ysitem.java | 2 + .../common/core/domain/entity/TmsOrder.java | 525 ++++++++++++++++++ .../common/core/domain/po/UserShipperPo.java | 3 + .../UserShipperApplicationService.java | 6 + .../UserShipperRepositoryInterface.java | 2 + .../repository/mapper/UserShipperMapper.java | 2 + .../UserShipperRepositoryImpl.java | 5 + .../service/UserShipperDomainService.java | 4 + .../interfaces/facade/UserShipperAPI.java | 6 + .../resources/mapper/UserShipperMapper.xml | 7 + mhd_finance/pom.xml | 6 + .../src/main/java/com/linke/finance/Test.java | 81 ++- .../server/ncLog/NcLogApplicationService.java | 72 +++ .../ReconciliationApplicationService.java | 4 + .../TmsReceiptApplicationService.java | 7 +- .../finance/domain/ncLog/entity/NcLog.java | 58 ++ .../repository/facade/INcLogService.java | 43 ++ .../ncLog/repository/mapper/NcLogMapper.java | 22 + .../repository/persistence/NcLogImpl.java | 81 +++ .../domain/ncLog/repository/po/NcLogPO.java | 58 ++ .../domain/ncLog/repository/todo/NcLogDO.java | 61 ++ .../ncLog/service/NcLogDomainService.java | 64 +++ .../reconciliation/entity/Reconciliation.java | 24 + .../facade/IReconciliationService.java | 2 + .../persistence/ReconciliationImpl.java | 249 ++++++++- .../service/ReconciliationDomainService.java | 5 + .../domain/tmsReceipt/entity/TmsReceipt.java | 12 +- .../repository/facade/ITmsReceiptService.java | 4 +- .../persistence/TmsReceiptImpl.java | 118 +++- .../service/TmsReceiptDomainService.java | 8 +- .../assemble/ncLog/NcLogAssembler.java | 65 +++ .../interfaces/dto/ncLog/NcLogDTO.java | 61 ++ .../interfaces/facade/ncLog/NcLogApi.java | 99 ++++ .../reconciliation/ReconciliationApi.java | 17 +- .../facadeApp/tmsReceipt/TmsReceiptApi.java | 15 +- mhd_finance/src/main/resources/bootstrap.yml | 6 +- .../resources/mapper/ncLog/NcLogMapper.xml | 54 ++ sql/20251106_user.sql | 2 +- sql/20251107_finance.sql | 36 ++ 49 files changed, 2117 insertions(+), 44 deletions(-) create mode 100644 mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKbill.java create mode 100644 mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKbillhead.java create mode 100644 mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKbodys.java create mode 100644 mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKitem.java create mode 100644 mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKufinterface.java create mode 100644 mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/entity/TmsOrder.java create mode 100644 mhd_finance/src/main/java/com/linke/finance/application/server/ncLog/NcLogApplicationService.java create mode 100644 mhd_finance/src/main/java/com/linke/finance/domain/ncLog/entity/NcLog.java create mode 100644 mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/facade/INcLogService.java create mode 100644 mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/mapper/NcLogMapper.java create mode 100644 mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/persistence/NcLogImpl.java create mode 100644 mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/po/NcLogPO.java create mode 100644 mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/todo/NcLogDO.java create mode 100644 mhd_finance/src/main/java/com/linke/finance/domain/ncLog/service/NcLogDomainService.java create mode 100644 mhd_finance/src/main/java/com/linke/finance/interfaces/assemble/ncLog/NcLogAssembler.java create mode 100644 mhd_finance/src/main/java/com/linke/finance/interfaces/dto/ncLog/NcLogDTO.java create mode 100644 mhd_finance/src/main/java/com/linke/finance/interfaces/facade/ncLog/NcLogApi.java create mode 100644 mhd_finance/src/main/resources/mapper/ncLog/NcLogMapper.xml diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/UserServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/UserServiceFeign.java index db18fea1c..b96ef49b3 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/UserServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/UserServiceFeign.java @@ -177,4 +177,7 @@ public interface UserServiceFeign { @GetMapping("/motorcadeCollectionApi/getInfoByMoIdAndUserId") public AjaxResult getInfoByMoIdAndUserId(@RequestParam("motorcadeId") Long motorcadeId,@RequestParam("userId") Long userId); + @ApiOperation("查询承运人汇总数据") + @GetMapping("/userShipperApi/getShipperSummaryData/{userId}") + public AjaxResult getShipperSummaryData(@PathVariable("userId") Long userId); } diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java index ef285244e..577e24136 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/WlhyServiceFeign.java @@ -2,6 +2,7 @@ package com.mhd.system.api; import com.mhd.common.core.constant.ServiceNameConstants; import com.mhd.common.core.domain.dto.BusinessDocumentDetaliDTO; +import com.mhd.common.core.domain.dto.ReconciliationDTO; import com.mhd.common.core.domain.dto.StaffDataPermissionDTO; import com.mhd.common.core.domain.dto.wlhy.TmsCloudFreightPaymentDTO; import com.mhd.common.core.domain.dto.open.OpenVehicleDto; @@ -11,10 +12,12 @@ import com.mhd.common.core.domain.dto.wlhy.*; import com.mhd.common.core.domain.entity.R; import com.mhd.common.core.domain.entity.RevenueExpensesRecord; import com.mhd.common.core.domain.entity.SysConfigSwitch; +import com.mhd.common.core.domain.entity.TmsOrder; import com.mhd.common.core.domain.po.UserPo; import com.mhd.common.core.web.domain.AjaxResult; import com.mhd.system.api.domain.*; import com.mhd.system.api.feign.FeignAutoConfiguration; +import io.swagger.annotations.ApiOperation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; @@ -502,4 +505,8 @@ public interface WlhyServiceFeign { @PostMapping("feign/finaceApi/deleteBusinessDocumentDetail") public R deleteBusinessDocumentDetail(@RequestBody BusinessDocumentDetaliDTO businessDocumentDetaliDTO); + @ApiOperation(value = "查询对账单对应的订单", notes = "查询对账单对应的订单") + @PostMapping(value = "/feign/outBoundSummary/getOrderListByReconciliation") + public R> getOrderListByReconciliation(@RequestBody ReconciliationDTO reconciliationDTO); + } diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteWlhyFallbackFactory.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteWlhyFallbackFactory.java index 95d6202c9..177751729 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteWlhyFallbackFactory.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteWlhyFallbackFactory.java @@ -1,6 +1,7 @@ package com.mhd.system.api.factory; import com.mhd.common.core.domain.dto.BusinessDocumentDetaliDTO; +import com.mhd.common.core.domain.dto.ReconciliationDTO; import com.mhd.common.core.domain.dto.StaffDataPermissionDTO; import com.mhd.common.core.domain.dto.wlhy.TmsCloudFreightPaymentDTO; import com.mhd.common.core.domain.dto.open.OpenVehicleDto; @@ -9,6 +10,7 @@ import com.mhd.common.core.domain.dto.open.WlhyOpenDriverEnterpriseDto; import com.mhd.common.core.domain.dto.wlhy.*; import com.mhd.common.core.domain.entity.R; import com.mhd.common.core.domain.entity.SysConfigSwitch; +import com.mhd.common.core.domain.entity.TmsOrder; import com.mhd.common.core.domain.po.UserPo; import com.mhd.common.core.web.domain.AjaxResult; import com.mhd.system.api.WlhyServiceFeign; @@ -499,6 +501,14 @@ public class RemoteWlhyFallbackFactory implements FallbackFactory> getOrderListByReconciliation(ReconciliationDTO reconciliationDTO) { + R> res = new R<>(); + res.setMsg("查询失败"+cause.getMessage()); + res.setCode(R.FAIL); + return res; + } }; } } diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/constant/ServiceNameConstants.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/constant/ServiceNameConstants.java index 4027224c9..fb4e07534 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/constant/ServiceNameConstants.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/constant/ServiceNameConstants.java @@ -22,7 +22,9 @@ public class ServiceNameConstants */ public static final String FILE_SERVICE = "mhd-file"; - public static final String USER_CENTER = "mhd-userCenter-service"; + //public static final String USER_CENTER = "mhd-userCenter-service"; + + public static final String USER_CENTER = "http://192.168.0.28:8007"; public static final String TRANSPORT_CENTER = "mhd-transport-service"; diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKbill.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKbill.java new file mode 100644 index 000000000..cff991c5a --- /dev/null +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKbill.java @@ -0,0 +1,18 @@ +package com.mhd.common.core.domain.dto.nc; + +import lombok.Data; + +import javax.xml.bind.annotation.*; + +@Data +@XmlRootElement(name = "bill") +@XmlAccessorType(XmlAccessType.FIELD) // 使用字段访问策略 +@XmlType(propOrder = {"billhead"}) +public class SKbill { + @XmlAttribute(name = "id") + private String id; + + @XmlElement(name = "billhead") + private SKbillhead billhead; +} + diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKbillhead.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKbillhead.java new file mode 100644 index 000000000..28bef9382 --- /dev/null +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKbillhead.java @@ -0,0 +1,86 @@ +package com.mhd.common.core.domain.dto.nc; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.xml.bind.annotation.*; + +@Data +@XmlRootElement(name = "billhead") +@XmlAccessorType(XmlAccessType.FIELD) // 使用字段访问策略 +@XmlType(propOrder = {"pk_group","pk_org","sett_org","creationtime","creator","pk_billtype","pk_tradetype","billyear" + ,"billclass","isinit","syscode","billdate","billno","src_syscode","billstatus","billmaker","def28","def29","def59","pk_busitype","billperiod","effectstatus","bodys"}) +public class SKbillhead { + @ApiModelProperty( "") + private String pk_group; + + @ApiModelProperty( "") + private String pk_org; + + @ApiModelProperty( "") + private String sett_org; + + + @ApiModelProperty( "") + private String creationtime; + + @ApiModelProperty( "") + private String creator; + + @ApiModelProperty( "") + private String pk_billtype; + + @ApiModelProperty( "") + private String pk_tradetype; + + @ApiModelProperty( "") + private String billclass; + + @ApiModelProperty( "") + private String isinit; + + + @ApiModelProperty( "") + private String syscode; + + @ApiModelProperty( "") + private String billdate; + + @ApiModelProperty( "") + private String billno; + + @ApiModelProperty( "") + private String src_syscode; + + @ApiModelProperty( "") + private String billstatus; + + + @ApiModelProperty( "") + private String billmaker; + + @ApiModelProperty( "") + private String def28; + + @ApiModelProperty( "") + private String def29; + + @ApiModelProperty( "") + private String def59; + + + @ApiModelProperty( "") + private String pk_busitype; + + @ApiModelProperty( "") + private String billyear; + + @ApiModelProperty( "") + private String billperiod; + + @ApiModelProperty( "") + private String effectstatus; + + @XmlElement(name = "bodys") + private SKbodys bodys; +} diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKbodys.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKbodys.java new file mode 100644 index 000000000..e5bd20851 --- /dev/null +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKbodys.java @@ -0,0 +1,16 @@ +package com.mhd.common.core.domain.dto.nc; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.xml.bind.annotation.*; +import java.util.List; + +@Data +@XmlRootElement(name = "bodys") +@XmlAccessorType(XmlAccessType.FIELD) // 使用字段访问策略 +@XmlType(propOrder = {"item"}) +public class SKbodys { + @XmlElement(name = "item") + private List item; +} diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKitem.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKitem.java new file mode 100644 index 000000000..12f66bda8 --- /dev/null +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKitem.java @@ -0,0 +1,70 @@ +package com.mhd.common.core.domain.dto.nc; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; + +@Data +@XmlRootElement(name = "item") +public class SKitem { + @ApiModelProperty( "") + private String pk_deptid; + @ApiModelProperty( "") + private String so_deptid; + + @ApiModelProperty( "") + private String pk_psndoc; + + @ApiModelProperty( "") + private String customer; + + @ApiModelProperty( "") + private String checkdirection; + + @ApiModelProperty( "") + private String purchaseorder; + + + @ApiModelProperty( "") + private String objtype; + + @ApiModelProperty( "") + private String direction; + + @ApiModelProperty( "") + private String scomment; + + @ApiModelProperty( "") + private String pk_currtype; + + @ApiModelProperty( "") + private String recaccount; + + @ApiModelProperty( "") + private String money_cr; + + + @ApiModelProperty( "") + private String money_bal; + + @ApiModelProperty( "") + private String notax_cr; + + + @ApiModelProperty( "") + private String invoiceno; + + + + @ApiModelProperty( "") + private String prepay; + + @ApiModelProperty( "") + private String subjcode; + + @ApiModelProperty( "") + private String def65; +} diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKufinterface.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKufinterface.java new file mode 100644 index 000000000..977823e6f --- /dev/null +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/SKufinterface.java @@ -0,0 +1,48 @@ +package com.mhd.common.core.domain.dto.nc; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.xml.bind.annotation.*; + +@Data +@XmlRootElement(name = "ufinterface") +@XmlAccessorType(XmlAccessType.FIELD) // 使用字段访问策略 +@XmlType(propOrder = {"bill"}) +public class SKufinterface { + @XmlAttribute(name = "account") + + private String account; + @XmlAttribute(name = "billtype") + + private String billtype; + @XmlAttribute(name = "businessunitcode") + + private String businessunitcode; + @XmlAttribute(name = "filename") + + private String filename; + @XmlAttribute(name = "groupcode") + + private String groupcode; + @XmlAttribute(name = "isexchange") + + private String isexchange; + @XmlAttribute(name = "orgcode") + + private String orgcode; + @XmlAttribute(name = "receiver") + + private String receiver; + @XmlAttribute(name = "replace") + + private String replace; + @XmlAttribute(name = "roottag") + + private String roottag; + @XmlAttribute(name = "sender") + + private String sender; + @XmlElement(name = "bill") + private com.mhd.common.core.domain.dto.nc.SKbill bill; +} diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysbodys.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysbodys.java index 9addaa057..5696d3610 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysbodys.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysbodys.java @@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.xml.bind.annotation.*; +import java.util.List; @Data @XmlRootElement(name = "bodys") @@ -11,5 +12,5 @@ import javax.xml.bind.annotation.*; @XmlType(propOrder = {"item"}) public class Ysbodys { @XmlElement(name = "item") - private Ysitem item; + private List item; } diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysitem.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysitem.java index e26a3bda0..f99180155 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysitem.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysitem.java @@ -21,6 +21,8 @@ public class Ysitem { @ApiModelProperty( "") private String customer; + @ApiModelProperty( "") + private String purchaseorder; @ApiModelProperty( "") private String objtype; diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/entity/TmsOrder.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/entity/TmsOrder.java new file mode 100644 index 000000000..c8bcfc4e1 --- /dev/null +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/entity/TmsOrder.java @@ -0,0 +1,525 @@ +package com.mhd.common.core.domain.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Description: 货源表 + * @Author: lfs + * @Date: 2020-02-14 09:49:27 + * @Version: V1.0 + */ +@Data +@TableName("tms_order") +public class TmsOrder implements Serializable { + private static final long serialVersionUID = 1L; + + @TableId(type = IdType.ID_WORKER_STR) + private String id; + @ApiModelProperty(value = "创建人") + private String createBy; + @ApiModelProperty(value = "创建日期") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date createTime; + @ApiModelProperty(value = "货源单创建企业ID") + private String createCompanyId; + @ApiModelProperty(value = "更新人") + private String updateBy; + @ApiModelProperty(value = "更新日期") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date updateTime; + @ApiModelProperty(value = "所属部门") + + private String sysOrgCode; + @ApiModelProperty(value = "货源单号") + + private String goodsNumber; +// @ApiModelProperty(value = "线路名称ID") +// @Excel(name = "线路名称ID", width = 15) +// private java.lang.String lineNameId; +// @ApiModelProperty(value = "线路名称") +// @Excel(name = "线路名称", width = 15) +// private java.lang.String lineName; +// @ApiModelProperty(value = "运距,距离,里程(千米)") +// @Excel(name = "运距(千米)", width = 15) +// private BigDecimal haulDistance; + @ApiModelProperty(value = "装货地名称") + private String loadingName; + @ApiModelProperty(value = "装货地县区编码") + private String loadingAreaId; + @ApiModelProperty(value = "装货地详细地址") + private String loadingAddress; + @ApiModelProperty(value = "装货地经度") + private String loadingLongitude; + @ApiModelProperty(value = "装货地纬度") + private String loadingLatitude; + @ApiModelProperty(value = "装货单位") + private String loadingUnit; + @ApiModelProperty(value = "发货人姓名") + private String freighterName; + @ApiModelProperty(value = "装货电话") + private String loadingPhone; + @ApiModelProperty(value = "装货时间日期(年月日)") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date loadingDate; +// @ApiModelProperty(value = "装货时间(上午、下午、24小时)") +// @Excel(name = "装货时间(上午、下午、24小时)", width = 15) +// private java.lang.String loadingTime; +// @ApiModelProperty(value = "装货时间id") +// @Excel(name = "装货时间id", width = 15) +// private java.lang.String loadingTimeId; + @ApiModelProperty(value = "卸货地名称") + private String unloadName; + @ApiModelProperty(value = "卸货地县区编码") + private String unloadAreaId; + @ApiModelProperty(value = "卸货地详细地址") + private String unloadAddress; + @ApiModelProperty(value = "卸货地经度") + private String unloadLongitude; + @ApiModelProperty(value = "卸货地纬度") + private String unloadLatitude; +// @ApiModelProperty(value = "卸货单位") +// private java.lang.String unloadUnit ; +// @ApiModelProperty(value = "收货人身份证号") +// private java.lang.String unloadIdentificationNumber; + @ApiModelProperty(value = "收货人姓名") + private String dischargerName ; + @ApiModelProperty(value = "卸货电话") + private String unloadPhone ; + @ApiModelProperty(value = "卸货时间日期(年月日)") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date unloadingData; +// @ApiModelProperty(value = "卸货时间(上午、下午、24小时)") +// @Excel(name = "卸货时间(上午、下午、24小时)", width = 15) +// private java.lang.String unloadingTime; +// @ApiModelProperty(value = "卸货时间id") +// @Excel(name = "卸货时间id", width = 15) +// private java.lang.String unloadingTimeId ; + @ApiModelProperty(value = "货物名称ID") + private String goodsNameId ; + @ApiModelProperty(value = "货物大类型") + private String goodsType ; + @ApiModelProperty(value = "货物小类型") + private String goodsName ; + @ApiModelProperty(value = "重量小(吨)") + private BigDecimal weightMin; +// @ApiModelProperty(value = "货物重量") +// private BigDecimal goodsWeight; + @ApiModelProperty(value = "货物数量单位(吨/方/件)") + private String goodsUntis ; + @ApiModelProperty(value = "货物数量单位(吨/方/件)id",required = true) + private String goodsUntisId ; + @ApiModelProperty(value = "配载方式ID(0-数量,1-车次)") + private Integer transportationModeId; + @ApiModelProperty(value = "配载方式名称") + private String transportationName ; + @ApiModelProperty(value = "车型车长ID") + private String carType ; + @ApiModelProperty(value = "车型车长名称") + private String carTypeName ; + @ApiModelProperty(value = "承运方ID") + private String appointDriverEnterpriseId; + @ApiModelProperty(value = "承运方名称") + private String appointDriverEnterprise; +// @ApiModelProperty(value = "指定司机ID") +// @Excel(name = "指定司机ID", width = 15) +// private java.lang.String appointDriverId; +// @ApiModelProperty(value = "指定司机姓名") +// @Excel(name = "指定司机姓名", width = 15) +// private java.lang.String appointDriver ; +// @ApiModelProperty(value = "指定司机电话") +// @Excel(name = "指定司机电话", width = 15) +// private java.lang.String appointDriverPhone ; +// @ApiModelProperty(value = "指定司机车牌号") +// @Excel(name = "指定司机车牌号", width = 15) +// private java.lang.String appointDriverLicense ; + @ApiModelProperty(value = "服务要求ID") + private String serviceRequireId ; + @ApiModelProperty(value = "服务要求名称") + private String serviceRequire ; + @ApiModelProperty(value = "备注") + private String remarks ; +// @ApiModelProperty(value = "上游客户ID") +// @Excel(name = "上游客户ID", width = 15) +// private java.lang.String upstreamCustomersId ; +// @ApiModelProperty(value = "上游客户姓名") +// @Excel(name = "上游客户姓名", width = 15) +// private java.lang.String upstreamCustomersName ; +// @ApiModelProperty(value = "上游客户电话") +// @Excel(name = "上游客户电话", width = 15) +// private java.lang.String upstreamCustomersPhone ; +// @ApiModelProperty(value = "运单类型(0-普货、1-批量货、2-撮合货、3-客服运单,4-线下运单)") +// @Excel(name = "运单类型(0-普货、1-批量货、2-撮合货、3-客服运单,4-线下运单)", width = 15) +// private java.lang.Integer waybillType; + @ApiModelProperty(value = "运单来源(0-后台发布、1-app发布、2-导入)") + private Integer waybillFrom; +// @ApiModelProperty(value = "期望运费") +// @Excel(name = "期望运费", width = 15) +// private java.math.BigDecimal freightHope; + @ApiModelProperty(value = "货源是否关闭(0-否,1-是)") + private Integer isSource; +// @ApiModelProperty(value = "货源是否被接单(0-否,1-是)") +// @Excel(name = "货源是否被接单(0-否,1-是)", width = 15) +// private java.lang.Integer isOrder; + @ApiModelProperty(value = "货源关闭时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + private java.util.Date sourceCloseTime; + @ApiModelProperty(value = "货源关闭人用户ID") + private String executorId; + @ApiModelProperty(value = "是否删除(0-否,1-是)") + private Integer isDelete; + @ApiModelProperty(value = "货物类型ID") + private String goodsTypeId ; + @ApiModelProperty(value = "货运线路(装货市县)") + private String lineTitleLeft ; + @ApiModelProperty(value = "货运线路(卸货市县)") + private String lineTitleRight ; + @ApiModelProperty(value = "是否为常发货源(0-否,1-是)") + private Integer isCommon; +// @ApiModelProperty(value = "占用车长") +// @Excel(name = "占用车长", width = 15) +// private String occupyConductor ; +// @ApiModelProperty(value = " 货源信息上报:0-未上报,1-已上报,2-上报失败") +// private Integer isOrderReporting; +// @ApiModelProperty(value = "货源信息上报时间") +// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") +// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") +// private java.util.Date orderReportingTime; +// @ApiModelProperty(value = "货源信息上报失败原因") +// private java.lang.String orderReportingErr ; + @ApiModelProperty(value = "审核状态") + private Integer auditStatus; + @ApiModelProperty(value = "运单模式(0-普通模式,1-竞价模式)") + private Integer waybillMode; + @ApiModelProperty(value = "竞价截止时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date latestBiddingTime; + @ApiModelProperty(value = "竞价单位(元/车,元/吨)") + private String biddingUnit; + @ApiModelProperty(value = "审核人") + private String auditBy; + @ApiModelProperty(value = "发货运费") + private BigDecimal deliveryFreight; + @ApiModelProperty(value = "审核时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date auditTime; + @ApiModelProperty(value = "业务类型") + private String businessType ; + @ApiModelProperty(value = "运费单价(元/吨)") + private BigDecimal transportationUnitPrice ; + @ApiModelProperty(value = "结算方式,1-按趟结算,2-按数量结算") + private Integer radioValue; + @ApiModelProperty(value = "创建人姓名") + private String createrName ; + @ApiModelProperty(value = "创建人电话") + private String createrPhone ; +// @ApiModelProperty(value = "赫达订单号") +// private String orderNumber ; +// @ApiModelProperty(value = "是否长期货源:0-否,1-是") +// private Integer isLongOrder; + @ApiModelProperty(value = "是否使用电子围栏:0-否,1-是") + private Integer isElectricFence; + + @ApiModelProperty(value = "微信小程序图片地址") + private String wxaQrcode ; + +// @ApiModelProperty(value = "运单服务费率") +// private java.math.BigDecimal serviceRate; + +// @ApiModelProperty(value = "代运营人员用户ID") +// private String orderAgentUserId ; + @ApiModelProperty(value = "委托方编号") + private String appointShipperId; +// @ApiModelProperty(value = "指定平台公司") +// private String appointCompanyId; +// @ApiModelProperty(value = "指定平台公司名称") +// private String appointCompanyName; + @ApiModelProperty(value = "平台员工创建人id") + private String createUserId; + @ApiModelProperty(value = "委托方") + private String appointShipper; +// @ApiModelProperty(value = "指定车辆ID") +// private String appointVehicleId; +// @ApiModelProperty(value = "是否卸货完成(0:否,1:是)") +// private Integer isUnload; +// @ApiModelProperty(value = "指定车辆设备号") +// private String appointVehicleDevice; + +// @ApiModelProperty(value = "发布货源方式 0-未指定;1-企业货源;2-平台货源") +// private Integer publishOrderType; + +// /**是否开启路耗(0-否 1-是)*/ +// @ApiModelProperty(value = "是否开启路耗(0-否 1-是)") +// @Excel(name = "是否开启路耗(0-否 1-是)", width = 15) +// private Integer isRoadLoss; +// /**货物价值(元/吨)*/ +// @ApiModelProperty(value = "货物价值(元/吨)") +// @Excel(name = "货物价值(元/吨)", width = 15) +// private BigDecimal goodsValue ; +// /**路耗模式(0-按比例% 1-按数量(吨))*/ +// @ApiModelProperty(value = "路耗模式(0-按比例% 1-按数量(吨))") +// @Excel(name = "路耗模式(0-按比例% 1-按数量(吨))", width = 15) +// private Integer roadLossMode; +// /**路耗结算方式(0-无 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)*/ +// @ApiModelProperty(value = "路耗结算方式(0-无 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)") +// @Excel(name = "路耗结算方式(0-无 1-取装货重量 2-取卸货重量 3-装卸货取大 4-装卸货取小)", width = 15) +// private Integer roadLossSettlementMethod; + +// /**允许货物亏损*/ +// @ApiModelProperty(value = "允许货物亏损(吨或%)") +// @Excel(name = "允许货物亏损(吨或%)", width = 15) +// private BigDecimal allowableLoss ; + +// /**超出亏损扣除金额(元/吨)*/ +// @ApiModelProperty(value = "超出亏损扣除金额(元/吨)") +// @Excel(name = "超出亏损扣除金额(元/吨)", width = 15) +// private BigDecimal lossDeductionAmount ; +// @ApiModelProperty(value = "上游客户id") +// @Excel(name = "上游客户id", width = 15) +// private String upClientId; + + @ApiModelProperty(value = "货单二维码图片地址") + private String qrCodeImgUrl; + +// @ApiModelProperty(value = "运费抹零 0-不抹零 ,1-抹零小数位,2-抹零个位,3-抹零十位") +// private Integer isFreightNullification ; + +// /**回单付金额*/ +// @ApiModelProperty(value = "回单付金额") +// @Excel(name = "回单付金额", width = 15) +// private BigDecimal receiptPaymentAmount ; +// /**预付运费金额*/ +// @ApiModelProperty(value = "预付现金金额") +// @Excel(name = "预付现金金额", width = 15) +// private BigDecimal cashAdvance ; +// /**到付运费金额*/ +// @ApiModelProperty(value = "到付运费金额") +// @Excel(name = "到付运费金额", width = 15) +// private BigDecimal freightAmount ; +// /**预付平台油卡金额*/ +// @ApiModelProperty(value = "预付平台油卡金额") +// @Excel(name = "预付平台油卡金额", width = 15) +// +// +// private BigDecimal oilCardOnline ; +// @ApiModelProperty(value = "是否协议费用生成:0否 1是") +// private Integer isAutoGenerateProtocol; + +// /**单车重量*/ +// @ApiModelProperty(value = "单车重量",required = true) +// private java.math.BigDecimal singleVehicleWeight; +// +// /**单车总费用*/ +// @ApiModelProperty(value = "单车总费用") +// @Excel(name = "单车总费用", width = 15) +// private BigDecimal freightGross ; +// +// @ApiModelProperty(value = "是否允许接多单:0否 1是") +// private Integer isMultipleOrdersAllowed; + + @ApiModelProperty(value = "发货备注") + private String shippingNote; + + @ApiModelProperty(value = "运单事实创建人ID(创建运单时的当前登录人USER-ID)") + private String realCreateBy; + + @ApiModelProperty(value = "运单事实创建人名称(创建运单时的当前登录人REAL-NAME)") + private String realCreateName; + +// @ApiModelProperty(value = "涨吨是否计算费用 0-否 1-是 ") +// private Integer isTonnageIncreaseCharge; + + @ApiModelProperty("应收结算类型:1-月结,2-现结") + private Integer receivableType; +// +// @ApiModelProperty(value = "订单类型:0-自有订单,1-tms订单") +// private Integer orderType; + + @ApiModelProperty(value = "第三方订单号") + private String thirdPartyOrderNumber; + + @ApiModelProperty(value = "调度单单号") + private String dispatchOrderNumber; + + @ApiModelProperty(value = "作废订单备注") + private String cancelOrderRemark; + +// @ApiModelProperty("项目表ID") +// private Long projectManagementId; + + @ApiModelProperty(value = "接单司机ID") + private String orderDriverId; + + @ApiModelProperty(value = "货物数量") + private String goodsQuantity; + @ApiModelProperty(value = "货物数量单位code") + private String goodsQuantityUnitId; + @ApiModelProperty(value = "货物数量单位") + private String goodsQuantityUnit; + + @ApiModelProperty(value = "拼单类型(0-不拼单(主单),1-拼单-子单,2-拼单-合单)") + private Integer splicingOrderType; + + @ApiModelProperty(value = "拼单发布状态(0-否,1-是)") + private Integer splicingStatus; + + @ApiModelProperty(value = "拼单主单id") + private String mainOrderId; + + @ApiModelProperty(value = "拼单主单号") + private String mainOrderNum; + + @ApiModelProperty(value = "拼单合单id") + private String mergeOrderId; + + @ApiModelProperty(value = "拼单合单号") + private String mergeOrderNum; + + + //=================批量货派单相关============================= +// @ApiModelProperty(value = "需求车次") +// private Integer demandTrainNumber; +// @ApiModelProperty(value = "承运车次默认0") +// private Integer carriageNumber; +// @ApiModelProperty(value = "剩余需求车次") +// private Integer remainingDemandTrainNumber; + + /**货物重量*/ + @ApiModelProperty(value = "重量大(吨)") + private BigDecimal weightMax; +// @ApiModelProperty(value = "货源剩余货物数量") +// private BigDecimal residueGoodsWeight; +// @ApiModelProperty(value = "承运货物数量") +// private BigDecimal transportGoodsWeight; + + @ApiModelProperty(value = "订单状态(1-未审核,2-未通过,3-进行中,4-已完成,5-已关闭)") + //新逻辑:1-未调度、2-未派车、3-未入厂、4-已入厂、5-已装车、6-已卸车、7-已上传、8-已签收、9-已关闭 + private Integer orderStatus; + +// @ApiModelProperty(value = "多装多卸类型") +// private String layType; +// @ApiModelProperty(value = "来源系统") +// private String orderSource; + +// @ApiModelProperty(value = "通知单号") +// private String noticeNumber; +// +// @ApiModelProperty(value = "司机税率") +// private BigDecimal driverTaxRate; +// +// @ApiModelProperty(value = "tms到付运费金额") +// private BigDecimal tmsFreightAmount; + + + + + +//========================================新增字段========================================== + @ApiModelProperty(value = "付款方类型(0-委托方,1-收货方)") + private Integer payerType; + + @ApiModelProperty(value = "收货方编码") + private String recipientId; + @ApiModelProperty(value = "收货方") + private String recipientName; + + @ApiModelProperty(value = "整机编号") + private String machineNumber; + + @ApiModelProperty(value = "是否库存(0-是,1-否)") + private Integer stockFlag; + + @ApiModelProperty(value = "信息费") + private BigDecimal infoFee; + @ApiModelProperty(value = "信息费收款方方式") + private Integer infoFeePayeeType; + @ApiModelProperty(value = "信息费收款方") + private String infoFeePayee; + @ApiModelProperty(value = "信息费支付状态:PayStatusEnum") + private Integer infoFeeStatus; + @ApiModelProperty(value = "信息费应付单据号") + private String infoFeeDocumentNumber; + @ApiModelProperty(value = "订单类型(1-机械运输,2-大件运输,3-罐车运输,4-济南专线,5-江西专线)") + private Integer orderShippingType; + + @ApiModelProperty(value = "订单结算状态:1未出账、2已出账、3部分结算、4已结算") + private Integer settlementStatus; + + @ApiModelProperty(value = "订单运费结算时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date settlementTime; + + @ApiModelProperty(value = "出账时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date paymentTime; + + @ApiModelProperty(value = "应收对账单-单号") + private String reconciliationInnerNumber; + + @ApiModelProperty(value = "已收运费") + private BigDecimal collectedFreight; + @ApiModelProperty(value = "未收运费") + private BigDecimal uncollectedFreight; + @ApiModelProperty(value = "少收运费") + private BigDecimal collectLessFreight; + + @ApiModelProperty(value = "运单发票开具状态(0-未索取,1-已索取,2-已开票,3-部分索取)") + private Integer isInvoice; + + + @ApiModelProperty(value = "发票表ID") + private String invoiceId; + + @ApiModelProperty(value = "车辆类型Id") + private String vehicleTypeId; + + @ApiModelProperty(value = "车辆类型名称") + private String vehicleTypeName; + + @ApiModelProperty(value = "承运人Id(订单为济南专线使用)") + private String carrier; + + @ApiModelProperty(value = "承运人姓名(订单为济南专线使用)") + private String carrierName; + + @ApiModelProperty(value = "数字物流平台用户Id") + private Long szwlUserId; + + @ApiModelProperty("运费单价") + private BigDecimal freightUnitPrice; + + @ApiModelProperty(value = "竞价状态 0-竞价中,1-已完成,2-已关闭") + private Integer biddingStatus; + + @ApiModelProperty(value = "竞价备注") + private String biddingRemarks; + + @ApiModelProperty(value = "货物保险金额") + private BigDecimal cargoInsuranceAmount; + + @ApiModelProperty(value = "目的地") + private String destination; + + @ApiModelProperty("运费") + private BigDecimal freightCharges; + + @ApiModelProperty(value = "付款方名称") + private String payer; +} diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/po/UserShipperPo.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/po/UserShipperPo.java index b5ff1b77c..0fa71bc7c 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/po/UserShipperPo.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/po/UserShipperPo.java @@ -206,4 +206,7 @@ public class UserShipperPo { private Integer monthlySettlementFlag; @ApiModelProperty(name = "货源单自动审核(1-是 2-否)") private Integer isAutoAuditOrder; + + @ApiModelProperty(name = "客户nc编码") + private String customerNcCode; } diff --git a/mhd-user-center/src/main/java/com/mhd/user/application/service/UserShipperApplicationService.java b/mhd-user-center/src/main/java/com/mhd/user/application/service/UserShipperApplicationService.java index b8b6849b7..73186444e 100644 --- a/mhd-user-center/src/main/java/com/mhd/user/application/service/UserShipperApplicationService.java +++ b/mhd-user-center/src/main/java/com/mhd/user/application/service/UserShipperApplicationService.java @@ -32,6 +32,7 @@ import com.mhd.user.domain.roleAggregate.service.RoleDomainService; import com.mhd.user.domain.userAggregate.entity.UserRoleEntity; import com.mhd.user.domain.userAggregate.entity.UserShipperEntity; import com.mhd.user.domain.userAggregate.event.ShipperEventPublisher; +import com.mhd.user.domain.userAggregate.repository.po.UserDriverPo; import com.mhd.user.domain.userAggregate.repository.todo.*; import com.mhd.user.domain.userAggregate.service.*; import com.mhd.user.infrastructure.feign.ProductServiceFeign; @@ -1022,4 +1023,9 @@ public class UserShipperApplicationService { public SettlementInfoQueryVo getSettlementInfoByUserId(Long userId) { return userShipperDomainService.getSettlementInfoByUserId(userId); } + + + public UserShipperPo getShipperSummaryData(Long userId) { + return userShipperDomainService.getShipperSummaryData(userId); + } } diff --git a/mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/repository/facade/UserShipperRepositoryInterface.java b/mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/repository/facade/UserShipperRepositoryInterface.java index 5e107c03e..0e87d22e0 100644 --- a/mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/repository/facade/UserShipperRepositoryInterface.java +++ b/mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/repository/facade/UserShipperRepositoryInterface.java @@ -58,4 +58,6 @@ public interface UserShipperRepositoryInterface extends IService { List getChooseShipper(@Param("userIdList") List userIdList); List selectBySealId(@Param("userShipperEntity") UserShipperEntity userShipperEntity); + + public UserShipperPo getShipperSummaryData(Long userId); } diff --git a/mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/repository/persistence/UserShipperRepositoryImpl.java b/mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/repository/persistence/UserShipperRepositoryImpl.java index b0a3c340f..0663fa5ec 100644 --- a/mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/repository/persistence/UserShipperRepositoryImpl.java +++ b/mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/repository/persistence/UserShipperRepositoryImpl.java @@ -161,4 +161,9 @@ public class UserShipperRepositoryImpl extends ServiceImpl getShipperSummaryData(@PathVariable Long userId) { + return AjaxResult.success(userShipperApplicationService.getShipperSummaryData(userId)); + } } diff --git a/mhd-user-center/src/main/resources/mapper/UserShipperMapper.xml b/mhd-user-center/src/main/resources/mapper/UserShipperMapper.xml index 161f62379..52a0030e3 100644 --- a/mhd-user-center/src/main/resources/mapper/UserShipperMapper.xml +++ b/mhd-user-center/src/main/resources/mapper/UserShipperMapper.xml @@ -378,4 +378,11 @@ and esign_enterprise_status = #{userShipperEntity.esignEnterpriseStatus} + + diff --git a/mhd_finance/pom.xml b/mhd_finance/pom.xml index 6a3e54185..0be92c65a 100644 --- a/mhd_finance/pom.xml +++ b/mhd_finance/pom.xml @@ -150,6 +150,12 @@ jaxb-runtime 2.3.1 + + com.aliyun + aliyun-http-apache + 0.2.9-beta + compile + diff --git a/mhd_finance/src/main/java/com/linke/finance/Test.java b/mhd_finance/src/main/java/com/linke/finance/Test.java index bdf5191fd..75cf9be71 100644 --- a/mhd_finance/src/main/java/com/linke/finance/Test.java +++ b/mhd_finance/src/main/java/com/linke/finance/Test.java @@ -11,7 +11,10 @@ import java.util.Date; public class Test { public static void main(String[] args) { - Date date = new Date(); + //ys(); + //sk(); + } +/* public static void ys(){Date date = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String dateString = sdf.format(date); Ysitem item=new Ysitem(); @@ -35,8 +38,8 @@ public class Test { billhead.setPk_org("NG0401"); billhead.setSett_org("NG0401"); billhead.setCreationtime(dateString); - billhead.setCreator("xiangna"); billhead.setPk_billtype("F0"); + billhead.setCreator("xiangna"); billhead.setPk_tradetype("D0"); billhead.setBillclass("ys"); billhead.setIsinit("N"); @@ -83,6 +86,78 @@ public class Test { } catch (JAXBException e) { e.printStackTrace(); } + }; - } + public static void sk(){Date date = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String dateString = sdf.format(date); + SKitem item=new SKitem(); + item.setSo_deptid("NG040104"); + item.setPk_deptid("NG040104"); + item.setCheckdirection("ar"); + item.setPk_psndoc("111"); + item.setCustomer("25849"); + item.setPurchaseorder("sk96321"); + item.setObjtype("0"); + item.setDirection("1"); + item.setScomment("新永鸿工业气体有限公司"); + item.setPk_currtype("CMY"); + item.setMoney_cr("1000.00"); + item.setMoney_bal("1000.00"); + SKbodys bodys=new SKbodys(); + bodys.setItem(item); + SKbillhead billhead=new SKbillhead(); + billhead.setPk_group("CNK"); + billhead.setPk_org("NG0401"); + billhead.setSett_org("NG0401"); + billhead.setCreationtime(dateString); + billhead.setPk_billtype("F2"); + billhead.setCreator("zhanghongming"); + billhead.setPk_tradetype("D2"); + billhead.setBillclass("sk"); + billhead.setBilldate(dateString); + billhead.setSyscode("0"); + billhead.setBillno(""); + billhead.setDef59("1111111"); + billhead.setSrc_syscode("0"); + billhead.setBillstatus("0"); + billhead.setBillmaker("zhanghongming"); + billhead.setPk_busitype(""); + billhead.setBillyear("2025"); + billhead.setBillperiod("12"); + billhead.setEffectstatus("0"); + billhead.setDef28("nqyw"); + billhead.setDef29("11111111"); + billhead.setBodys(bodys); + SKbill bill=new SKbill(); + bill.setId("1111"); + bill.setBillhead(billhead); + SKufinterface ufinterface=new SKufinterface(); + ufinterface.setAccount("NKNC"); + ufinterface.setBilltype("F2"); + ufinterface.setBusinessunitcode(""); + ufinterface.setFilename(""); + ufinterface.setIsexchange("Y"); + ufinterface.setOrgcode("NG0401"); + ufinterface.setReceiver("NG0401"); + ufinterface.setReplace("Y"); + ufinterface.setRoottag(""); + ufinterface.setSender("nqyw"); + ufinterface.setBill(bill); + JAXBContext jaxbContext = null; + //String xmlString =""; + try { + jaxbContext = JAXBContext.newInstance(SKufinterface.class); + Marshaller marshaller = jaxbContext.createMarshaller(); + marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true); + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // 格式化输出,可选 + StringWriter sw = new StringWriter(); + marshaller.marshal(ufinterface, sw); + String xmlString = sw.toString(); // 这是要发送的XML字符串 + System.out.println(xmlString); + } catch (JAXBException e) { + e.printStackTrace(); + } + };*/ } + diff --git a/mhd_finance/src/main/java/com/linke/finance/application/server/ncLog/NcLogApplicationService.java b/mhd_finance/src/main/java/com/linke/finance/application/server/ncLog/NcLogApplicationService.java new file mode 100644 index 000000000..3e1128a98 --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/application/server/ncLog/NcLogApplicationService.java @@ -0,0 +1,72 @@ +package com.linke.finance.application.server.ncLog; + +import com.linke.finance.domain.ncLog.repository.po.NcLogPO; +import com.linke.finance.domain.ncLog.repository.todo.NcLogDO; +import com.linke.finance.domain.ncLog.service.NcLogDomainService; +import com.mhd.common.security.utils.SecurityUtils; +import com.mhd.system.api.model.LoginUser; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import java.util.List; +/** + * 【请填写功能名称】ApplicationService + * + * @author gen + * @date 2025-12-04 + */ +@Service +@Slf4j +public class NcLogApplicationService { + @Autowired + private NcLogDomainService ncLogDomainService; + + + /** + * 分页查询【请填写功能名称】列表 + */ + + public List queryList(NcLogDO ncLogDO) { + LoginUser loginUser = SecurityUtils.getLoginUser(); + if (loginUser != null){ + Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId(); + if (topOrganizationId != null && topOrganizationId != 1){ + ncLogDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId()); + } + } + return ncLogDomainService.queryList(ncLogDO); + } + + + /** + * 新增【请填写功能名称】 + */ + public Boolean insert(NcLogDO ncLogDO) { + + return ncLogDomainService.insert(ncLogDO); + } + + /** + * 修改【请填写功能名称】 + */ + public Boolean update(NcLogDO ncLogDO) { + return ncLogDomainService.update(ncLogDO); + } + + /** + * 批量删除【请填写功能名称】 + */ + public boolean delete(Long[] ncLogIds) { + return ncLogDomainService.delete(ncLogIds); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + public NcLogPO getInfo(Long ncLogId) + { + return ncLogDomainService.getInfo(ncLogId); + } + + +} diff --git a/mhd_finance/src/main/java/com/linke/finance/application/server/reconciliation/ReconciliationApplicationService.java b/mhd_finance/src/main/java/com/linke/finance/application/server/reconciliation/ReconciliationApplicationService.java index 0976b0c2d..3ef7020f6 100644 --- a/mhd_finance/src/main/java/com/linke/finance/application/server/reconciliation/ReconciliationApplicationService.java +++ b/mhd_finance/src/main/java/com/linke/finance/application/server/reconciliation/ReconciliationApplicationService.java @@ -614,6 +614,10 @@ public class ReconciliationApplicationService { { return reconciliationDomainService.synchronousNc(businessDocumentDetaliIds); } + public boolean synchronousNcSK(String businessDocumentDetaliIds) + { + return reconciliationDomainService.synchronousNcSK(businessDocumentDetaliIds); + } public int editIsInvoice(String innerNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber) { diff --git a/mhd_finance/src/main/java/com/linke/finance/application/server/tmsReceipt/TmsReceiptApplicationService.java b/mhd_finance/src/main/java/com/linke/finance/application/server/tmsReceipt/TmsReceiptApplicationService.java index 823802eca..0112b0265 100644 --- a/mhd_finance/src/main/java/com/linke/finance/application/server/tmsReceipt/TmsReceiptApplicationService.java +++ b/mhd_finance/src/main/java/com/linke/finance/application/server/tmsReceipt/TmsReceiptApplicationService.java @@ -29,7 +29,7 @@ import java.util.Date; import java.util.List; /** * 收款单ApplicationService - * + * * @author gen * @date 2025-04-28 */ @@ -136,5 +136,8 @@ public class TmsReceiptApplicationService { } return true; } - + public boolean synchronousNc(String businessDocumentDetaliIds) + { + return tmsReceiptDomainService.synchronousNc(businessDocumentDetaliIds); + } } diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/entity/NcLog.java b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/entity/NcLog.java new file mode 100644 index 000000000..accb53dae --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/entity/NcLog.java @@ -0,0 +1,58 @@ +package com.linke.finance.domain.ncLog.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.mhd.common.core.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import com.mhd.common.core.web.domain.BaseVOEntity; +import java.math.BigDecimal; +import lombok.Data; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + + +/** + * 【请填写功能名称】对象 nc_log + * + * @author gen + * @date 2025-12-04 + */ + +@Data +public class NcLog extends BaseVOEntity{ + private static final long serialVersionUID = 1L; + + @ApiModelProperty("nc日志id") + @TableId(type = IdType.AUTO) + private Long ncLogId; + + @ApiModelProperty("类型 0-应收单 1-收款单") + @Excel(name = "类型 0-应收单 1-收款单") + private Long type; + + @ApiModelProperty("数据源id") + @Excel(name = "数据源id") + private Long orderId; + + @ApiModelProperty("请求报文") + @Excel(name = "请求报文") + private String requestBody; + + @ApiModelProperty("请求报文") + @Excel(name = "请求报文") + private String responeBody; + + @ApiModelProperty("组织ID") + @Excel(name = "组织ID") + private Long organizationId; + + @ApiModelProperty("一级组织ID") + @Excel(name = "一级组织ID") + private Long topOrganizationId; + + @ApiModelProperty("组织名称") + @Excel(name = "组织名称") + private String organizationName; + + +} diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/facade/INcLogService.java b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/facade/INcLogService.java new file mode 100644 index 000000000..8ba0f4021 --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/facade/INcLogService.java @@ -0,0 +1,43 @@ +package com.linke.finance.domain.ncLog.repository.facade; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.linke.finance.domain.ncLog.entity.NcLog; +import com.linke.finance.domain.ncLog.repository.po.NcLogPO; +import com.linke.finance.domain.ncLog.repository.todo.NcLogDO; + +import java.util.List; + +/** + * 【请填写功能名称】Service接口 + * + * @author gen + * @date 2025-12-04 + */ +public interface INcLogService extends IService +{ + /** + * 分页查询【请填写功能名称】列表 + */ + public List queryList(NcLogDO ncLogDO); + + /** + * 新增【请填写功能名称】 + */ + public Boolean insert(NcLogDO ncLogDO); + + /** + * 修改【请填写功能名称】 + */ + public Boolean update(NcLogDO ncLogDO); + + /** + * 批量删除【请填写功能名称】 + */ + public Boolean delete(Long[] ncLogIds); + + + /** + * 查询【请填写功能名称】 + */ + public NcLogPO getInfo(Long ncLogId); +} diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/mapper/NcLogMapper.java b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/mapper/NcLogMapper.java new file mode 100644 index 000000000..068aef010 --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/mapper/NcLogMapper.java @@ -0,0 +1,22 @@ +package com.linke.finance.domain.ncLog.repository.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.linke.finance.domain.ncLog.entity.NcLog; +import com.linke.finance.domain.ncLog.repository.po.NcLogPO; +import com.linke.finance.domain.ncLog.repository.todo.NcLogDO; +import org.apache.ibatis.annotations.Param; +/** + * 【请填写功能名称】Mapper接口 + * + * @author gen + * @date 2025-12-04 + */ +public interface NcLogMapper extends BaseMapper +{ + /** + * 查询【请填写功能名称】列表 + */ + public List queryList(NcLogDO ncLogDO); + +} diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/persistence/NcLogImpl.java b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/persistence/NcLogImpl.java new file mode 100644 index 000000000..73aa36773 --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/persistence/NcLogImpl.java @@ -0,0 +1,81 @@ +package com.linke.finance.domain.ncLog.repository.persistence; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.linke.finance.domain.ncLog.entity.NcLog; +import com.linke.finance.domain.ncLog.repository.facade.INcLogService; +import com.linke.finance.domain.ncLog.repository.mapper.NcLogMapper; +import com.linke.finance.domain.ncLog.repository.po.NcLogPO; +import com.linke.finance.domain.ncLog.repository.todo.NcLogDO; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author gen + * @date 2025-12-04 + */ +@Service +public class NcLogImpl extends ServiceImpl implements INcLogService{ + @Autowired + private NcLogMapper ncLogMapper; + + /** + * 查询【请填写功能名称】列表 + */ + @Override + public List queryList(NcLogDO ncLogDO) + { + return ncLogMapper.queryList(ncLogDO); + } + + /** + * 新增【请填写功能名称】 + */ + @Override + public Boolean insert(NcLogDO ncLogDO) { + NcLog ncLog = new NcLog(); + BeanUtils.copyProperties(ncLogDO,ncLog); + return this.save(ncLog); + } + + /** + * 修改【请填写功能名称】 + */ + @Override + public Boolean update(NcLogDO ncLogDO) { + NcLog ncLog = new NcLog(); + BeanUtils.copyProperties(ncLogDO,ncLog); + return this.updateById(ncLog); + } + + /** + * 批量删除【请填写功能名称】 + */ + @Override + public Boolean delete(Long[] ncLogIds ) { + List list = new ArrayList<>(); + for (Long id : ncLogIds) { + NcLog ncLog = new NcLog(); + ncLog.setNcLogId(id); + ncLog.setDelFlag(2); + list.add(ncLog); + } + return this.updateBatchById(list); + } + + /** + * 修改【请填写功能名称】 + */ + @Override + public NcLogPO getInfo(Long ncLogId) { + NcLog ncLog = this.getById(ncLogId); + NcLogPO ncLogPO = new NcLogPO(); + BeanUtils.copyProperties(ncLog,ncLogPO); + return ncLogPO; + } +} diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/po/NcLogPO.java b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/po/NcLogPO.java new file mode 100644 index 000000000..a1fbac7da --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/po/NcLogPO.java @@ -0,0 +1,58 @@ +package com.linke.finance.domain.ncLog.repository.po; + +import com.mhd.common.core.annotation.Excel; +import lombok.Data; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import com.mhd.common.core.web.domain.BaseVOEntity; + + +/** + * 【请填写功能名称】对象 nc_log + * + * @author gen + * @date 2025-12-04 + */ + +@Data +@ApiModel(value = "【请填写功能名称】对象", description = "【请填写功能名称】响应对象") +public class NcLogPO extends BaseVOEntity{ + private static final long serialVersionUID = 1L; + + @ApiModelProperty("nc日志id") + private Long ncLogId; + + @ApiModelProperty("类型 0-应收单 1-收款单") + @Excel(name = "类型 0-应收单 1-收款单") + private Long type; + + @ApiModelProperty("数据源id") + @Excel(name = "数据源id") + private Long orderId; + + @ApiModelProperty("请求报文") + @Excel(name = "请求报文") + private String requestBody; + + @ApiModelProperty("请求报文") + @Excel(name = "请求报文") + private String responeBody; + + @ApiModelProperty("组织ID") + @Excel(name = "组织ID") + private Long organizationId; + + @ApiModelProperty("一级组织ID") + @Excel(name = "一级组织ID") + private Long topOrganizationId; + + @ApiModelProperty("组织名称") + @Excel(name = "组织名称") + private String organizationName; + + + +} diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/todo/NcLogDO.java b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/todo/NcLogDO.java new file mode 100644 index 000000000..d4da79faa --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/repository/todo/NcLogDO.java @@ -0,0 +1,61 @@ +package com.linke.finance.domain.ncLog.repository.todo; + +import com.mhd.common.core.annotation.Excel; +import lombok.Data; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import java.math.BigDecimal; +import io.swagger.annotations.ApiModelProperty; +import com.mhd.common.core.web.domain.BaseVOEntity; + +import java.util.List; + + +/** + * 【请填写功能名称】对象 nc_log + * + * @author gen + * @date 2025-12-04 + */ + +@Data +public class NcLogDO extends BaseVOEntity{ + private static final long serialVersionUID = 1L; + + @ApiModelProperty("nc日志id") + private Long ncLogId; + + @ApiModelProperty("类型 0-应收单 1-收款单") + @Excel(name = "类型 0-应收单 1-收款单") + private Long type; + + @ApiModelProperty("数据源id") + @Excel(name = "数据源id") + private Long orderId; + + @ApiModelProperty("请求报文") + @Excel(name = "请求报文") + private String requestBody; + + @ApiModelProperty("请求报文") + @Excel(name = "请求报文") + private String responeBody; + + @ApiModelProperty("组织ID") + @Excel(name = "组织ID") + private Long organizationId; + + @ApiModelProperty("一级组织ID") + @Excel(name = "一级组织ID") + private Long topOrganizationId; + + @ApiModelProperty("组织名称") + @Excel(name = "组织名称") + private String organizationName; + + @ApiModelProperty(name = "组织ID集合") + private List organizationIdList; + + @ApiModelProperty(name = "权限菜单ID") + private Long permissionMenuId; +} diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/service/NcLogDomainService.java b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/service/NcLogDomainService.java new file mode 100644 index 000000000..f3a2be46d --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/domain/ncLog/service/NcLogDomainService.java @@ -0,0 +1,64 @@ +package com.linke.finance.domain.ncLog.service; + +import com.linke.finance.domain.ncLog.repository.facade.INcLogService; +import com.linke.finance.domain.ncLog.repository.po.NcLogPO; +import com.linke.finance.domain.ncLog.repository.todo.NcLogDO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +/** + * 【请填写功能名称】 + * + * @author gen + * @date 2025-12-04 + */ +@Service +@Slf4j +public class NcLogDomainService { + + @Autowired + private INcLogService ncLogService; + + + /** + * 分页查询【请填写功能名称】列表 + */ + public List queryList(NcLogDO ncLogDO) { + return ncLogService.queryList(ncLogDO); + } + + + /** + * 新增【请填写功能名称】 + */ + public Boolean insert(NcLogDO ncLogDO) { + + return ncLogService.insert(ncLogDO); + } + + /** + * 修改【请填写功能名称】 + */ + public Boolean update(NcLogDO ncLogDO) { + return ncLogService.update(ncLogDO); + } + + /** + * 批量删除【请填写功能名称】 + */ + public Boolean delete(Long[] ncLogIds) { + return ncLogService.delete(ncLogIds); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + public NcLogPO getInfo(Long ncLogId) + { + return ncLogService.getInfo(ncLogId); + } + + +} diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/entity/Reconciliation.java b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/entity/Reconciliation.java index a344ce473..b22224d46 100644 --- a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/entity/Reconciliation.java +++ b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/entity/Reconciliation.java @@ -218,4 +218,28 @@ public class Reconciliation extends BaseVOEntity{ @ApiModelProperty(value = "申请发票单号") private String applyNumber; + + @ApiModelProperty("nc同步状态 0-未同步 1-已同步") + private Integer synchronousStatus; + + + @ApiModelProperty(value = "nc同步时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date synchronousTime; + + @ApiModelProperty(value = "nc唯一标识") + private String ncId; + + @ApiModelProperty("nc同步状态 0-未同步 1-已同步") + private Integer skSynchronousStatus; + + + @ApiModelProperty(value = "nc同步时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date skSynchronousTime; + + @ApiModelProperty(value = "nc唯一标识") + private String skNcId; } diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/facade/IReconciliationService.java b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/facade/IReconciliationService.java index 853cbe6a6..ae967d14b 100644 --- a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/facade/IReconciliationService.java +++ b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/facade/IReconciliationService.java @@ -64,5 +64,7 @@ public interface IReconciliationService extends IService public boolean synchronousNc(String businessDocumentDetaliIds); + public boolean synchronousNcSK(String businessDocumentDetaliIds); + public int editIsInvoice(String innerNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber); } diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/persistence/ReconciliationImpl.java b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/persistence/ReconciliationImpl.java index eee9d9d59..70a1477aa 100644 --- a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/persistence/ReconciliationImpl.java +++ b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/persistence/ReconciliationImpl.java @@ -14,14 +14,20 @@ import com.linke.finance.domain.approvalDocument.repository.mapper.ApprovalDocum import com.linke.finance.domain.approvalDocument.service.ApprovalDocumentDomainService; import com.linke.finance.domain.businessDocument.entity.BusinessDocument; import com.linke.finance.domain.businessDocumentDetali.entity.BusinessDocumentDetali; +import com.linke.finance.domain.ncLog.entity.NcLog; +import com.linke.finance.domain.ncLog.repository.mapper.NcLogMapper; import com.linke.finance.domain.reconciliation.entity.Reconciliation; import com.linke.finance.domain.reconciliation.entity.ReconciliationBusinessDocument; import com.linke.finance.domain.reconciliation.repository.facade.IReconciliationService; import com.linke.finance.domain.reconciliation.repository.mapper.ReconciliationMapper; import com.linke.finance.domain.reconciliation.repository.po.ReconciliationPO; import com.linke.finance.domain.reconciliation.repository.todo.ReconciliationDO; +import com.mhd.common.core.domain.dto.ReconciliationDTO; import com.mhd.common.core.domain.dto.nc.*; +import com.mhd.common.core.domain.entity.R; +import com.mhd.common.core.domain.entity.TmsOrder; import com.mhd.common.core.domain.po.UserPo; +import com.mhd.common.core.domain.po.UserShipperPo; import com.mhd.common.core.domain.thirdparty.dingtalk.DetailsDTO; import com.mhd.common.core.domain.thirdparty.dingtalk.FormComponentValuesDTO; import com.mhd.common.core.domain.thirdparty.dingtalk.WorkflowProcessInstancesDTO; @@ -31,7 +37,14 @@ import com.mhd.common.core.utils.StringUtils; import com.mhd.common.core.web.domain.AjaxResult; import com.mhd.common.security.utils.SecurityUtils; import com.mhd.system.api.UserServiceFeign; +import com.mhd.system.api.WlhyServiceFeign; import com.mhd.system.api.model.LoginUser; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.util.EntityUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -39,8 +52,10 @@ import org.springframework.stereotype.Service; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; +import java.io.IOException; import java.io.StringWriter; import java.math.BigDecimal; +import java.sql.NClob; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -58,15 +73,22 @@ import java.util.Map; public class ReconciliationImpl extends ServiceImpl implements IReconciliationService{ @Autowired private ReconciliationMapper reconciliationMapper; + + @Autowired + private NcLogMapper ncLogMapper; @Autowired private UserServiceFeign userServiceFeign; @Autowired private ThirdPartyServiceFeign thirdPartyServiceFeign; + @Autowired + private WlhyServiceFeign wlhyServiceFeign; + @Autowired private ApprovalDocumentMapper approvalDocumentMapper; @Autowired private ApprovalDocumentDomainService approvalDocumentDomainService; + private String url="http://10.0.0.212/service/XChangeServlet?account=NKNC&groupcode=CNK"; /** * 查询对账单列表 */ @@ -364,42 +386,67 @@ public class ReconciliationImpl extends ServiceImpl ysitemList=new ArrayList(); + ReconciliationDTO reconciliationDTO=new ReconciliationDTO(); + reconciliationDTO.setInnerNumber(reconciliation.getInnerNumber()); + R> result=wlhyServiceFeign.getOrderListByReconciliation(reconciliationDTO); + if(result.getCode()==200){ + List list=result.getData(); + if(ObjectUtil.isNotNull(list)){ + for(TmsOrder tmsOrder:list){ + AjaxResult ajaxResult=userServiceFeign.getShipperSummaryData(Long.valueOf(reconciliation.getSettlementPartyId())); + if(ajaxResult.get("code").equals("200")){ + UserShipperPo userShipperPo= (UserShipperPo) ajaxResult.get("data"); + Ysitem item=new Ysitem(); + item.setSo_deptid("NG040104"); + item.setPk_deptid("NG040104"); + item.setPk_psndoc(userPo.getSalespersonNcCode()); + item.setCustomer(userShipperPo.getCustomerNcCode()); + item.setObjtype("0"); + item.setDirection("1"); + item.setScomment(userShipperPo.getShipperEnterpriseName()); + item.setPk_currtype("CNY"); + item.setPurchaseorder(tmsOrder.getGoodsNumber()); + item.setTaxrate("0"); + item.setQuantity_de("0"); + item.setMoney_de(String.valueOf(tmsOrder.getDeliveryFreight())); + item.setMoney_bal(String.valueOf(tmsOrder.getDeliveryFreight())); + item.setNotax_de(String.valueOf(tmsOrder.getDeliveryFreight())); + item.setLocal_tax_de(String.valueOf(tmsOrder.getDeliveryFreight())); + item.setTax_de(String.valueOf(tmsOrder.getDeliveryFreight())); + item.setPrice(String.valueOf(tmsOrder.getDeliveryFreight())); + item.setTaxprice(String.valueOf(tmsOrder.getDeliveryFreight())); + item.setDef75("T10"); + item.setInvoiceno(""); + ysitemList.add(item); + } + + } + } + } Ysbodys bodys=new Ysbodys(); - bodys.setItem(item); + bodys.setItem(ysitemList); Ysbillhead billhead=new Ysbillhead(); billhead.setPk_group("CNK"); billhead.setPk_org("NG0401"); billhead.setSett_org("NG0401"); billhead.setCreationtime(dateString); - billhead.setCreator("zhanghongming"); + billhead.setCreator(userPo.getDocumentPreparerNcCode()); billhead.setPk_billtype("F0"); billhead.setPk_tradetype("D0"); billhead.setBillclass("ys"); @@ -410,7 +457,7 @@ public class ReconciliationImpl extends ServiceImpl ysitemList=new ArrayList(); + ReconciliationDTO reconciliationDTO=new ReconciliationDTO(); + reconciliationDTO.setInnerNumber(reconciliation.getInnerNumber()); + R> result=wlhyServiceFeign.getOrderListByReconciliation(reconciliationDTO); + if(result.getCode()==200){ + List list=result.getData(); + if(ObjectUtil.isNotNull(list)){ + for(TmsOrder tmsOrder:list){ + AjaxResult ajaxResult=userServiceFeign.getShipperSummaryData(Long.valueOf(reconciliation.getSettlementPartyId())); + if(ajaxResult.get("code").equals("200")){ + UserShipperPo userShipperPo= (UserShipperPo) ajaxResult.get("data"); + SKitem item=new SKitem(); + item.setSo_deptid("NG040104"); + item.setPk_deptid("NG040104"); + item.setCheckdirection("ar"); + item.setPk_psndoc(userPo.getSalespersonNcCode()); + item.setCustomer(userShipperPo.getCustomerNcCode()); + item.setPurchaseorder(tmsOrder.getGoodsNumber()); + item.setObjtype("0"); + item.setDirection("1"); + item.setScomment(userShipperPo.getShipperEnterpriseName()); + item.setPk_currtype("CNY"); + item.setMoney_cr(String.valueOf(tmsOrder.getCollectedFreight())); + item.setMoney_bal(String.valueOf(tmsOrder.getCollectedFreight())); + ysitemList.add(item); + } + + } + } + } + SKbodys bodys=new SKbodys(); + bodys.setItem(ysitemList); + SKbillhead billhead=new SKbillhead(); + billhead.setPk_group("CNK"); + billhead.setPk_org("NG0401"); + billhead.setSett_org("NG0401"); + billhead.setCreationtime(dateString); + billhead.setPk_billtype("F2"); + billhead.setCreator(userPo.getDocumentPreparerNcCode()); + billhead.setPk_tradetype("D2"); + billhead.setBillclass("sk"); + billhead.setBilldate(dateString); + billhead.setSyscode("0"); + billhead.setBillno(""); + billhead.setDef59(reconciliation.getInnerNumber()); + billhead.setSrc_syscode("0"); + billhead.setBillstatus("0"); + billhead.setBillmaker(userPo.getDocumentPreparerNcCode()); + billhead.setPk_busitype(""); + billhead.setBillyear(sdf1.format(date)); + billhead.setBillperiod(sdf2.format(date)); + billhead.setEffectstatus("0"); + billhead.setDef28("nqyw"); + billhead.setDef29(reconciliation.getInnerNumber()); + billhead.setBodys(bodys); + SKbill bill=new SKbill(); + bill.setId("sk"+String.valueOf(reconciliation.getReconciliationId())); + bill.setBillhead(billhead); + SKufinterface ufinterface=new SKufinterface(); + ufinterface.setAccount("NKNC"); + ufinterface.setBilltype("F2"); + ufinterface.setBusinessunitcode(""); + ufinterface.setFilename(""); + ufinterface.setIsexchange("Y"); + ufinterface.setOrgcode("NG0401"); + ufinterface.setReceiver("NG0401"); + ufinterface.setReplace("Y"); + ufinterface.setRoottag(""); + ufinterface.setSender("nqyw"); + ufinterface.setBill(bill); + JAXBContext jaxbContext = null; + //String xmlString =""; + jaxbContext = JAXBContext.newInstance(SKufinterface.class); + Marshaller marshaller = jaxbContext.createMarshaller(); + marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true); + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // 格式化输出,可选 + StringWriter sw = new StringWriter(); + marshaller.marshal(ufinterface, sw); + String xmlString = sw.toString(); // 这是要发送的XML字符串 + System.out.println(xmlString); + NcLog ncLog=new NcLog(); + ncLog.setOrderId(reconciliation.getReconciliationId()); + ncLog.setRequestBody(xmlString); + ncLog.setResponeBody(""); + ncLog.setType(1L); + ncLog.setOrganizationId(reconciliation.getOrganizationId()); + ncLog.setOrganizationName(reconciliation.getOrganizationName()); + ncLog.setTopOrganizationId(reconciliation.getTopOrganizationId()); + ncLogMapper.insert(ncLog); + reconciliation.setSkSynchronousStatus(1); + reconciliation.setSkSynchronousTime(new Date()); + reconciliation.setSkNcId("sk"+String.valueOf(reconciliation.getReconciliationId())); + reconciliationMapper.updateById(reconciliation); } catch (JAXBException e) { e.printStackTrace(); } diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/service/ReconciliationDomainService.java b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/service/ReconciliationDomainService.java index 4c634be01..bacf2746d 100644 --- a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/service/ReconciliationDomainService.java +++ b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/service/ReconciliationDomainService.java @@ -162,6 +162,11 @@ public class ReconciliationDomainService { return reconciliationService.synchronousNc(businessDocumentDetaliIds); } + public boolean synchronousNcSK(String businessDocumentDetaliIds) + { + return reconciliationService.synchronousNcSK(businessDocumentDetaliIds); + } + public int editIsInvoice(String innerNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber) { return reconciliationService.editIsInvoice(innerNumber,isInvoice,invoiceId,invoiceMakeTime,applyNumber); diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/entity/TmsReceipt.java b/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/entity/TmsReceipt.java index a8f16d04b..0576f0343 100644 --- a/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/entity/TmsReceipt.java +++ b/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/entity/TmsReceipt.java @@ -9,11 +9,12 @@ import java.math.BigDecimal; import lombok.Data; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; /** * 收款单对象 tms_receipt - * + * * @author gen * @date 2025-04-28 */ @@ -97,4 +98,13 @@ public class TmsReceipt extends BaseVOEntity{ private Integer delFlag; + @ApiModelProperty("nc同步状态 0-未同步 1-已同步") + private Integer synchronousStatus; + + + @ApiModelProperty(value = "nc同步时间") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + private java.util.Date synchronousTime; + } diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/repository/facade/ITmsReceiptService.java b/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/repository/facade/ITmsReceiptService.java index 7d94df467..03b324a2e 100644 --- a/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/repository/facade/ITmsReceiptService.java +++ b/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/repository/facade/ITmsReceiptService.java @@ -9,7 +9,7 @@ import java.util.List; /** * 收款单Service接口 - * + * * @author gen * @date 2025-04-28 */ @@ -42,4 +42,6 @@ public interface ITmsReceiptService extends IService public TmsReceiptPO getInfo(Long id); public int updateAssignableAmount(TmsReceiptPO receiptPo); + + public boolean synchronousNc(String businessDocumentDetaliIds); } diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/repository/persistence/TmsReceiptImpl.java b/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/repository/persistence/TmsReceiptImpl.java index 330081468..078d6e979 100644 --- a/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/repository/persistence/TmsReceiptImpl.java +++ b/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/repository/persistence/TmsReceiptImpl.java @@ -1,23 +1,35 @@ package com.linke.finance.domain.tmsReceipt.repository.persistence; +import com.aliyun.oss.ServiceException; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.linke.finance.domain.ncLog.entity.NcLog; +import com.linke.finance.domain.ncLog.repository.mapper.NcLogMapper; import com.linke.finance.domain.reconciliation.entity.Reconciliation; import com.linke.finance.domain.tmsReceipt.entity.TmsReceipt; import com.linke.finance.domain.tmsReceipt.repository.facade.ITmsReceiptService; import com.linke.finance.domain.tmsReceipt.repository.mapper.TmsReceiptMapper; import com.linke.finance.domain.tmsReceipt.repository.po.TmsReceiptPO; import com.linke.finance.domain.tmsReceipt.repository.todo.TmsReceiptDO; +import com.mhd.common.core.domain.dto.nc.*; +import com.mhd.common.security.utils.SecurityUtils; +import com.mhd.system.api.model.LoginUser; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; +import java.io.StringWriter; +import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Date; import java.util.List; /** * 收款单Service业务层处理 - * + * * @author gen * @date 2025-04-28 */ @@ -26,6 +38,9 @@ public class TmsReceiptImpl extends ServiceImpl im @Autowired private TmsReceiptMapper tmsReceiptMapper; + @Autowired + private NcLogMapper ncLogMapper; + /** * 查询收款单列表 */ @@ -88,4 +103,105 @@ public class TmsReceiptImpl extends ServiceImpl im .set(TmsReceipt::getAssignmentStatus, receiptPo.getAssignmentStatus()) .eq(TmsReceipt::getId, receiptPo.getId())); } + + @Override + public boolean synchronousNc(String businessDocumentDetaliIds) { + String [] businessDocumentDetaliIdArray=businessDocumentDetaliIds.split(","); + LoginUser loginUser= SecurityUtils.getLoginUser(); + for (String businessDocumentDetaliId:businessDocumentDetaliIdArray){ + TmsReceipt tmsReceipt = this.getById(businessDocumentDetaliId); + /* if(reconciliation.getSynchronousStatus()==1){ + throw new ServiceException("该记录已同步,不需要再次同步"); + } + if(reconciliation.getIsInvoice()!=2){ + throw new ServiceException("该记录还未开票,不允许同步"); + }*/ + try { + Date date = tmsReceipt.getCreateTime(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy"); + SimpleDateFormat sdf2 = new SimpleDateFormat("MM"); + String dateString = sdf.format(date); + List ysitemList=new ArrayList(); + SKitem item=new SKitem(); + item.setSo_deptid("NG040104"); + item.setPk_deptid("NG040104"); + item.setCheckdirection("ar"); + item.setPk_psndoc("111"); + item.setCustomer("25849"); + item.setPurchaseorder(tmsReceipt.getReceivePaymentNumber()); + item.setObjtype("0"); + item.setDirection("1"); + item.setScomment("新永鸿工业气体有限公司"); + item.setPk_currtype("CMY"); + item.setMoney_cr(String.valueOf(tmsReceipt.getReceivePaymentAmount())); + item.setMoney_bal(String.valueOf(tmsReceipt.getReceivePaymentAmount())); + SKbodys bodys=new SKbodys(); + bodys.setItem(ysitemList); + SKbillhead billhead=new SKbillhead(); + billhead.setPk_group("CNK"); + billhead.setPk_org("NG0401"); + billhead.setSett_org("NG0401"); + billhead.setCreationtime(dateString); + billhead.setPk_billtype("F2"); + billhead.setCreator("zhanghongming"); + billhead.setPk_tradetype("D2"); + billhead.setBillclass("sk"); + billhead.setBilldate(dateString); + billhead.setSyscode("0"); + billhead.setBillno(""); + billhead.setDef59(tmsReceipt.getReceivePaymentNumber()); + billhead.setSrc_syscode("0"); + billhead.setBillstatus("0"); + billhead.setBillmaker("zhanghongming"); + billhead.setPk_busitype(""); + billhead.setBillyear("2025"); + billhead.setBillperiod("12"); + billhead.setEffectstatus("0"); + billhead.setDef28("nqyw"); + billhead.setDef29(tmsReceipt.getReceivePaymentNumber()); + billhead.setBodys(bodys); + SKbill bill=new SKbill(); + bill.setId(String.valueOf(tmsReceipt.getId())); + bill.setBillhead(billhead); + SKufinterface ufinterface=new SKufinterface(); + ufinterface.setAccount("NKNC"); + ufinterface.setBilltype("F2"); + ufinterface.setBusinessunitcode(""); + ufinterface.setFilename(""); + ufinterface.setIsexchange("Y"); + ufinterface.setOrgcode("NG0401"); + ufinterface.setReceiver("NG0401"); + ufinterface.setReplace("Y"); + ufinterface.setRoottag(""); + ufinterface.setSender("nqyw"); + ufinterface.setBill(bill); + JAXBContext jaxbContext = null; + //String xmlString =""; + jaxbContext = JAXBContext.newInstance(SKufinterface.class); + Marshaller marshaller = jaxbContext.createMarshaller(); + marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true); + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // 格式化输出,可选 + StringWriter sw = new StringWriter(); + marshaller.marshal(ufinterface, sw); + String xmlString = sw.toString(); // 这是要发送的XML字符串 + System.out.println(xmlString); + NcLog ncLog=new NcLog(); + ncLog.setOrderId(tmsReceipt.getOrganizationId()); + ncLog.setRequestBody(xmlString); + ncLog.setResponeBody(""); + ncLog.setType(0L); + ncLog.setOrganizationId(tmsReceipt.getOrganizationId()); + ncLog.setOrganizationName(tmsReceipt.getOrganizationName()); + ncLog.setTopOrganizationId(tmsReceipt.getTopOrganizationId()); + ncLogMapper.insert(ncLog); + tmsReceipt.setSynchronousStatus(1); + tmsReceipt.setSynchronousTime(new Date()); + tmsReceiptMapper.updateById(tmsReceipt); + } catch (JAXBException e) { + e.printStackTrace(); + } + } + return true; + } } diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/service/TmsReceiptDomainService.java b/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/service/TmsReceiptDomainService.java index be675eb10..e2e78dff1 100644 --- a/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/service/TmsReceiptDomainService.java +++ b/mhd_finance/src/main/java/com/linke/finance/domain/tmsReceipt/service/TmsReceiptDomainService.java @@ -30,7 +30,7 @@ import java.util.Date; import java.util.List; /** * 收款单 - * + * * @author gen * @date 2025-04-28 */ @@ -285,4 +285,10 @@ public class TmsReceiptDomainService { public int updateAssignableAmount(TmsReceiptPO receiptPo) { return tmsReceiptService.updateAssignableAmount(receiptPo); } + + + public boolean synchronousNc(String businessDocumentDetaliIds) + { + return tmsReceiptService.synchronousNc(businessDocumentDetaliIds); + } } diff --git a/mhd_finance/src/main/java/com/linke/finance/interfaces/assemble/ncLog/NcLogAssembler.java b/mhd_finance/src/main/java/com/linke/finance/interfaces/assemble/ncLog/NcLogAssembler.java new file mode 100644 index 000000000..de67548ec --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/interfaces/assemble/ncLog/NcLogAssembler.java @@ -0,0 +1,65 @@ +package com.linke.finance.interfaces.assemble.ncLog; + +import cn.hutool.core.util.ObjectUtil; +import com.linke.finance.domain.ncLog.repository.todo.NcLogDO; +import com.linke.finance.interfaces.dto.ncLog.NcLogDTO; +import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException; +import com.mhd.common.core.exception.digitalLogisticsException.UserError; +import com.mhd.common.core.utils.bean.BeanUtils; +import com.mhd.common.core.utils.IgnoreNullUtil; +import com.mhd.common.security.utils.SecurityUtils; +import com.mhd.system.api.model.LoginUser; +import org.springframework.stereotype.Component; + +import java.util.Date; + +/** + * 【请填写功能名称】Assembler + * + * @author gen + * @date 2025-12-04 + */ +@Component +public class NcLogAssembler { + + /** + * 转换实体 + */ + public NcLogDO toDO(NcLogDTO ncLogDTO) { + NcLogDO ncLogDO = new NcLogDO(); + // 拷贝 + BeanUtils.copyProperties(ncLogDTO, ncLogDO, IgnoreNullUtil.getNullPropertyNames(ncLogDTO)); + LoginUser loginUser = SecurityUtils.getLoginUser(); + if (ObjectUtil.isNull(loginUser)) { + throw new DigitalLogisticsException(UserError.TIMEOUT); + } + String userName = loginUser.getUsername(); + // 获取登录人id + Long userId = loginUser.getUserid(); + if(ncLogDTO.getNcLogId() != null){ + if(userId != null){ + ncLogDO.setUpdateBy(userId); + }else { + ncLogDO.setUpdateBy(new Long("0")); + } + ncLogDO.setUpdateByName(userName); + ncLogDO.setUpdateTime(new Date()); + + }else { + if(userId != null){ + ncLogDO.setCreateBy(userId); + ncLogDO.setUpdateBy(userId); + }else { + ncLogDO.setCreateBy(new Long("0")); + ncLogDO.setUpdateBy(new Long("0")); + } + ncLogDO.setCreateByName(userName); + ncLogDO.setUpdateByName(userName); + ncLogDO.setCreateTime(new Date()); + ncLogDO.setUpdateTime(new Date()); + ncLogDO.setDelFlag(1); + } + return ncLogDO; + } + +} diff --git a/mhd_finance/src/main/java/com/linke/finance/interfaces/dto/ncLog/NcLogDTO.java b/mhd_finance/src/main/java/com/linke/finance/interfaces/dto/ncLog/NcLogDTO.java new file mode 100644 index 000000000..24f97a785 --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/interfaces/dto/ncLog/NcLogDTO.java @@ -0,0 +1,61 @@ +package com.linke.finance.interfaces.dto.ncLog; + +import com.mhd.common.core.annotation.Excel; +import lombok.Data; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import java.math.BigDecimal; +import io.swagger.annotations.ApiModelProperty; +import com.mhd.common.core.web.domain.BaseVOEntity; + +import java.util.List; + +/** + * 【请填写功能名称】对象 nc_log + * + * @author gen + * @date 2025-12-04 + */ + +@Data +public class NcLogDTO extends BaseVOEntity{ + private static final long serialVersionUID = 1L; + + @ApiModelProperty("nc日志id") + private Long ncLogId; + + @ApiModelProperty("类型 0-应收单 1-收款单") + @Excel(name = "类型 0-应收单 1-收款单") + private Long type; + + @ApiModelProperty("数据源id") + @Excel(name = "数据源id") + private Long orderId; + + @ApiModelProperty("请求报文") + @Excel(name = "请求报文") + private String requestBody; + + @ApiModelProperty("请求报文") + @Excel(name = "请求报文") + private String responeBody; + + @ApiModelProperty("组织ID") + @Excel(name = "组织ID") + private Long organizationId; + + @ApiModelProperty("一级组织ID") + @Excel(name = "一级组织ID") + private Long topOrganizationId; + + @ApiModelProperty("组织名称") + @Excel(name = "组织名称") + private String organizationName; + + + @ApiModelProperty(name = "组织ID集合") + private List organizationIdList; + + @ApiModelProperty(name = "权限菜单ID") + private Long permissionMenuId; +} diff --git a/mhd_finance/src/main/java/com/linke/finance/interfaces/facade/ncLog/NcLogApi.java b/mhd_finance/src/main/java/com/linke/finance/interfaces/facade/ncLog/NcLogApi.java new file mode 100644 index 000000000..ea0afc9d4 --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/interfaces/facade/ncLog/NcLogApi.java @@ -0,0 +1,99 @@ +package com.linke.finance.interfaces.facade.ncLog; + +import java.util.List; + +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.linke.finance.interfaces.dto.ncLog.NcLogDTO; +import com.linke.finance.domain.ncLog.repository.todo.NcLogDO; +import com.linke.finance.domain.ncLog.repository.po.NcLogPO; +import com.linke.finance.application.server.ncLog.NcLogApplicationService; +import com.linke.finance.interfaces.assemble.ncLog.NcLogAssembler; +import javax.annotation.Resource; +import com.mhd.common.core.web.controller.BaseController; +import com.mhd.common.core.web.domain.AjaxResult; +import com.mhd.common.core.web.page.TableDataInfo; + +/** + * 【请填写功能名称】Api + * + * @author gen + * @date 2025-12-04 + */ +@RestController +@RequestMapping("/ncLogApi") +public class NcLogApi extends BaseController{ + @Autowired + private NcLogApplicationService ncLogApplicationService; + + @Resource + private NcLogAssembler ncLogAssembler; + + /** + * 分页查询【请填写功能名称】列表 + */ + @ApiOperation("查询【请填写功能名称】列表") + @GetMapping("/list") + public TableDataInfo list(NcLogDTO ncLogDTO) + { + //转换实体 + NcLogDO ncLogDO = ncLogAssembler.toDO(ncLogDTO); + startPage(); + List list = ncLogApplicationService.queryList(ncLogDO); + return getDataTable(list); + } + + /** + * 编辑【请填写功能名称】 + */ + @ApiOperation("编辑【请填写功能名称】") + @PostMapping("/edit") + public AjaxResult edit(@RequestBody NcLogDTO ncLogDTO) + { + //转换实体 + NcLogDO ncLogDO = ncLogAssembler.toDO(ncLogDTO); + if(ncLogDTO.getNcLogId() != null){ + return toAjax(ncLogApplicationService.update(ncLogDO)); + }else { + return toAjax(ncLogApplicationService.insert(ncLogDO)); + } + } + + /** + * 批量删除【请填写功能名称】 + */ + @ApiOperation("批量删除【请填写功能名称】") + @DeleteMapping("/deleteByIds/{ncLogIds}") + public AjaxResult delete(@PathVariable Long[] ncLogIds) + { + return toAjax(ncLogApplicationService.delete(ncLogIds)); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @ApiOperation("获取【请填写功能名称】") + @GetMapping(value = "/getInfo/{ncLogId}") + public AjaxResult getInfo(@PathVariable("ncLogId") Long ncLogId) + { + return AjaxResult.success(ncLogApplicationService.getInfo(ncLogId)); + } + + + + + + + + + + + +} diff --git a/mhd_finance/src/main/java/com/linke/finance/interfaces/facade/reconciliation/ReconciliationApi.java b/mhd_finance/src/main/java/com/linke/finance/interfaces/facade/reconciliation/ReconciliationApi.java index f36b88590..143ed1ad2 100644 --- a/mhd_finance/src/main/java/com/linke/finance/interfaces/facade/reconciliation/ReconciliationApi.java +++ b/mhd_finance/src/main/java/com/linke/finance/interfaces/facade/reconciliation/ReconciliationApi.java @@ -265,14 +265,25 @@ public class ReconciliationApi extends BaseController{ } /** - * 应收账单同步用户nc65 + * 应收账单应收单同步用户nc65 */ - @Log(title = "应收账单同步用户nc65", description = "应收账单同步用户nc65", businessType = BusinessType.OTHER) - @ApiOperation("应收账单同步用户nc65") + @Log(title = "应收账单应收单同步用户nc65", description = "应收账单应收单同步用户nc65", businessType = BusinessType.OTHER) + @ApiOperation("应收账单应收单同步用户nc65") @GetMapping(value = "/synchronousNc") public AjaxResult synchronousNc(@RequestParam(name="reconciliationId") String reconciliationId) { return AjaxResult.success(reconciliationApplicationService.synchronousNc(reconciliationId)); } + /** + * 应收账单收款单同步用户nc65 + */ + @Log(title = "应收账单收款单同步用户nc65", description = "应收账单收款单同步用户nc65", businessType = BusinessType.OTHER) + @ApiOperation("应收账单收款单同步用户nc65") + @GetMapping(value = "/synchronousNcSK") + public AjaxResult synchronousNcSK(@RequestParam(name="reconciliationId") String reconciliationId) + { + return AjaxResult.success(reconciliationApplicationService.synchronousNcSK(reconciliationId)); + } + } diff --git a/mhd_finance/src/main/java/com/linke/finance/interfaces/facadeApp/tmsReceipt/TmsReceiptApi.java b/mhd_finance/src/main/java/com/linke/finance/interfaces/facadeApp/tmsReceipt/TmsReceiptApi.java index a6724e3aa..f0c0ce333 100644 --- a/mhd_finance/src/main/java/com/linke/finance/interfaces/facadeApp/tmsReceipt/TmsReceiptApi.java +++ b/mhd_finance/src/main/java/com/linke/finance/interfaces/facadeApp/tmsReceipt/TmsReceiptApi.java @@ -22,7 +22,7 @@ import com.mhd.common.core.web.page.TableDataInfo; /** * 收款单Api - * + * * @author gen * @date 2025-04-28 */ @@ -117,11 +117,20 @@ public class TmsReceiptApi extends BaseController{ } - + + /** + * 收款单同步用友nc65 + */ + @Log(title = "收款单同步用友nc65", description = "收款单同步用友nc65", businessType = BusinessType.OTHER) + @ApiOperation("收款单同步用友nc65") + @GetMapping(value = "/synchronousNc") + public AjaxResult synchronousNc(@RequestParam(name="ids") String ids) + { + return AjaxResult.success(tmsReceiptApplicationService.synchronousNc(ids)); + } - diff --git a/mhd_finance/src/main/resources/bootstrap.yml b/mhd_finance/src/main/resources/bootstrap.yml index f2ad08751..cb609f6e6 100644 --- a/mhd_finance/src/main/resources/bootstrap.yml +++ b/mhd_finance/src/main/resources/bootstrap.yml @@ -18,11 +18,13 @@ spring: cloud: nacos: discovery: - server-addr: 127.0.0.1:8848 +# server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 #server-addr: mhd-nacos:8848 + server-addr: 116.204.23.92:8848 config: - server-addr: 127.0.0.1:8848 +# server-addr: 127.0.0.1:8848 + server-addr: 116.204.23.92:8848 # 线上测试环境配置 容器名+端口号 #server-addr: mhd-nacos:8848 group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置 diff --git a/mhd_finance/src/main/resources/mapper/ncLog/NcLogMapper.xml b/mhd_finance/src/main/resources/mapper/ncLog/NcLogMapper.xml new file mode 100644 index 000000000..cbd048fe2 --- /dev/null +++ b/mhd_finance/src/main/resources/mapper/ncLog/NcLogMapper.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + select nc_log_id, type, order_id, request_body, respone_body, del_flag, organization_id, top_organization_id, organization_name from nc_log + + + + + + and type = #{type} + + + and order_id = #{orderId} + + + and request_body = #{requestBody} + + + and respone_body = #{responeBody} + + + and organization_id = #{organizationId} + + + and top_organization_id = #{topOrganizationId} + + + and organization_name like concat('%', #{organizationName}, '%') + + + + + + diff --git a/sql/20251106_user.sql b/sql/20251106_user.sql index 7f54bab2b..1e564d568 100644 --- a/sql/20251106_user.sql +++ b/sql/20251106_user.sql @@ -2,7 +2,7 @@ alter table user ADD COLUMN `validity_period_management` int DEFAULT 0 COMMENT =====================================截止2025-11-14 正式数据库已同步完成================================ - +------nc对接20251128 alter table user ADD COLUMN `salesperson_nc_code` varchar(255) DEFAULT NULL COMMENT '业务员nc编码'; diff --git a/sql/20251107_finance.sql b/sql/20251107_finance.sql index 7d9688a2a..28ca311f4 100644 --- a/sql/20251107_finance.sql +++ b/sql/20251107_finance.sql @@ -14,3 +14,39 @@ alter table business_document_detali ADD COLUMN `fuel_card_number` varchar(255) DEFAULT NULL COMMENT '油卡号'; =====================================截止2025-11-14 正式数据库已同步完成================================ + + +------20251205ncd对接--- +alter table reconciliation ADD COLUMN `synchronous_status` int (1) DEFAULT 0 COMMENT 'nc应收单同步状态 0-未同步 1-已同步'; + +alter table reconciliation ADD COLUMN `synchronous_time` datetime DEFAULT null COMMENT 'nc应收单同步时间'; +alter table reconciliation ADD COLUMN `nc_id` varchar (255) DEFAULT null COMMENT 'nc应收单的唯一标识'; + +alter table reconciliation ADD COLUMN `sk_synchronous_status` int (1) DEFAULT 0 COMMENT 'nc同步状态 0-未同步 1-已同步'; + +alter table reconciliation ADD COLUMN `sk_synchronous_time` datetime DEFAULT null COMMENT 'nc同步时间'; + + +alter table reconciliation ADD COLUMN `sk_nc_id` varchar (255) DEFAULT null COMMENT 'nc的唯一标识'; +alter table tms_receipt ADD COLUMN `synchronous_status` int (1) DEFAULT 0 COMMENT 'nc应收单同步状态 0-未同步 1-已同步'; + +alter table tms_receipt ADD COLUMN `synchronous_time` datetime DEFAULT null COMMENT 'nc应收单同步时间'; +alter table tms_receipt ADD COLUMN `nc_id` varchar (255) DEFAULT null COMMENT 'nc应收单的唯一标识'; + +CREATE TABLE `nc_log` ( + `nc_log_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'nc日志id', + `type` int DEFAULT '0' COMMENT '类型 0-应收单 1-收款单', + `order_id` int DEFAULT '0' COMMENT '数据源id', + `request_body` text COLLATE utf8mb4_general_ci COMMENT '请求报文', + `respone_body` text COLLATE utf8mb4_general_ci COMMENT '请求报文', + `del_flag` int DEFAULT '1' COMMENT '删除标记:0-无状态,1-正常,2-已删除', + `organization_id` bigint DEFAULT NULL COMMENT '组织ID', + `top_organization_id` bigint DEFAULT NULL COMMENT '一级组织ID', + `organization_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '组织名称', + PRIMARY KEY (`nc_log_id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + + + + +