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/RemoteUserFeignFallbackFactory.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteUserFeignFallbackFactory.java index b684711fa..77bfe8859 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteUserFeignFallbackFactory.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteUserFeignFallbackFactory.java @@ -162,6 +162,13 @@ public class RemoteUserFeignFallbackFactory implements FallbackFactory getUserByTopOrganizationUserPhone(@RequestBody UserDTO userDTO, String source) { return R.fail("获取组织用户失败:" + throwable.getMessage()); } + + @Override + public AjaxResult getShipperSummaryData(Long userId) { + return AjaxResult.error("查询失败" + throwable.getMessage()); + + + } }; } } 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-auth/Dockerfile b/mhd-auth/Dockerfile index ab8325a42..2257eeeda 100644 --- a/mhd-auth/Dockerfile +++ b/mhd-auth/Dockerfile @@ -1,5 +1,5 @@ # 基础镜像 -FROM kdvolder/jdk8 +FROM arm64v8/openjdk:8 # author MAINTAINER manhuoda #指定东八区时区 @@ -10,8 +10,9 @@ ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" # 其效果是在主机 /var/lib/docker 目录下创建了一个临时文件,并链接到容器的/tmp VOLUME /tmp #将当前jar 复制到容器根目录下 -ADD mhd-auth.jar mhd-auth.jar +ADD target/mhd-auth.jar mhd-auth.jar #暴露容器端口 Docker镜像告知Docker宿主机应用监听了端口 EXPOSE 9200 # 运行jar包 ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Xms1000m", "-Xmx1500m","-jar","/mhd-auth.jar"] + diff --git a/mhd-auth/pom.xml b/mhd-auth/pom.xml index 9961823e0..ce1606edc 100644 --- a/mhd-auth/pom.xml +++ b/mhd-auth/pom.xml @@ -85,4 +85,18 @@ + + + mhd-auth + + + + com.spotify + dockerfile-maven-plugin + + + + + + diff --git a/mhd-auth/src/main/resources/bootstrap.yml b/mhd-auth/src/main/resources/bootstrap.yml index 9e60f8ac2..ddb64b1d3 100644 --- a/mhd-auth/src/main/resources/bootstrap.yml +++ b/mhd-auth/src/main/resources/bootstrap.yml @@ -12,13 +12,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: 10.33.0.129:6010 config: - server-addr: 127.0.0.1:8848 +# server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 - #server-addr: mhd-nacos:8848 + server-addr: 10.33.0.129:6010 group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置 file-extension: yml #默认properties # 共享配置 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..faeca30f0 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 @@ -24,6 +24,8 @@ public class ServiceNameConstants 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"; public static final String PRODUCT_CENTER = "mhd-product-service"; diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/ReconciliationDTO.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/ReconciliationDTO.java index 690053a30..e9bee9abf 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/ReconciliationDTO.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/ReconciliationDTO.java @@ -226,4 +226,11 @@ public class ReconciliationDTO extends BaseVOEntity{ @ApiModelProperty(value = "运单发票开具状态(0-未索取,1-已索取,2-已开票,3-部分索取)") private Integer isInvoice; + + @ApiModelProperty("nc同步状态 0-未同步 1-已同步") + private Integer synchronousStatus; + + @ApiModelProperty("nc同步状态 0-未同步 1-已同步") + private Integer skSynchronousStatus; + } 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/Ysbill.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysbill.java new file mode 100644 index 000000000..ab69b16ac --- /dev/null +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysbill.java @@ -0,0 +1,18 @@ +package com.mhd.common.core.domain.dto.nc; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.xml.bind.annotation.*; + +@Data +@XmlRootElement(name = "bill") +@XmlAccessorType(XmlAccessType.FIELD) // 使用字段访问策略 +@XmlType(propOrder = {"billhead"}) +public class Ysbill { + @XmlAttribute(name = "id") + private String id; + + @XmlElement(name = "billhead") + private Ysbillhead billhead; +} diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysbillhead.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysbillhead.java new file mode 100644 index 000000000..544dd24a0 --- /dev/null +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysbillhead.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 Ysbillhead { + @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 Ysbodys bodys; +} 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 new file mode 100644 index 000000000..5696d3610 --- /dev/null +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysbodys.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 Ysbodys { + @XmlElement(name = "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 new file mode 100644 index 000000000..f99180155 --- /dev/null +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysitem.java @@ -0,0 +1,87 @@ +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 Ysitem { + @ApiModelProperty( "") + private String pk_deptid; + @ApiModelProperty( "") + private String so_deptid; + + @ApiModelProperty( "") + private String pk_psndoc; + + @ApiModelProperty( "") + private String customer; + + @ApiModelProperty( "") + private String purchaseorder; + + @ApiModelProperty( "") + private String objtype; + + @ApiModelProperty( "") + private String direction; + + @ApiModelProperty( "") + private String scomment; + + @ApiModelProperty( "") + private String pk_currtype; + + @ApiModelProperty( "") + private String taxrate; + + @ApiModelProperty( "") + private String quantity_de; + + @ApiModelProperty( "") + private String money_de; + + + @ApiModelProperty( "") + private String money_bal; + + @ApiModelProperty( "") + private String notax_de; + + @ApiModelProperty( "") + private String tax_de; + + @ApiModelProperty( "") + private String local_tax_de; + + @ApiModelProperty( "") + private String price; + + @ApiModelProperty( "") + private String taxprice; + + @ApiModelProperty( "") + private String invoiceno; + + @ApiModelProperty( "") + private String recaccount; + + + @ApiModelProperty( "") + private String prepay; + + @ApiModelProperty( "") + private String subjcode; + + @ApiModelProperty( "") + private String def65; + + @ApiModelProperty( "") + private String def75; + + +} diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysufinterface.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysufinterface.java new file mode 100644 index 000000000..c719ec283 --- /dev/null +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/dto/nc/Ysufinterface.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 Ysufinterface { + @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.Ysbill bill; +} 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/UserPo.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/po/UserPo.java index 2a8aa00be..740d08242 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/po/UserPo.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/po/UserPo.java @@ -214,4 +214,10 @@ public class UserPo { @ApiModelProperty(name = "有效期管理 0-否 1-是") private Integer validityPeriodManagement; + + @ApiModelProperty(name = "业务员nc编码") + private String salespersonNcCode; + + @ApiModelProperty(name = "制单员nc编码") + private String documentPreparerNcCode; } 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-gateway/Dockerfile b/mhd-gateway/Dockerfile index 9c79e4652..0f2e5a40b 100644 --- a/mhd-gateway/Dockerfile +++ b/mhd-gateway/Dockerfile @@ -1,5 +1,5 @@ # 基础镜像 -FROM kdvolder/jdk8 +FROM arm64v8/openjdk:8 # author MAINTAINER manhuoda #指定东八区时区 @@ -10,7 +10,7 @@ ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" # 其效果是在主机 /var/lib/docker 目录下创建了一个临时文件,并链接到容器的/tmp VOLUME /tmp #将当前jar 复制到容器根目录下 -ADD mhd-gateway.jar mhd-gateway.jar +ADD target/mhd-gateway.jar mhd-gateway.jar #暴露容器端口 Docker镜像告知Docker宿主机应用监听了端口 EXPOSE 8088 # 运行jar包 diff --git a/mhd-gateway/pom.xml b/mhd-gateway/pom.xml index 6cda48c31..1b3843d1e 100644 --- a/mhd-gateway/pom.xml +++ b/mhd-gateway/pom.xml @@ -127,4 +127,20 @@ + + + mhd-gateway + + + + com.spotify + dockerfile-maven-plugin + + + + + + + + diff --git a/mhd-gateway/src/main/resources/bootstrap.yml b/mhd-gateway/src/main/resources/bootstrap.yml index e858447d1..d1a88efe4 100644 --- a/mhd-gateway/src/main/resources/bootstrap.yml +++ b/mhd-gateway/src/main/resources/bootstrap.yml @@ -13,13 +13,15 @@ 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: 10.102.192.5:6848 + server-addr: 10.33.0.129:6010 config: - server-addr: 127.0.0.1:8848 +# server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 - #server-addr: mhd-nacos:8848 +# server-addr: 10.102.192.5:6848 + server-addr: 10.33.0.129:6010 group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置 file-extension: yml #默认properties # 共享配置 diff --git a/mhd-modules/mhd-system/Dockerfile b/mhd-modules/mhd-system/Dockerfile index 3098d7b9f..5795e4dea 100644 --- a/mhd-modules/mhd-system/Dockerfile +++ b/mhd-modules/mhd-system/Dockerfile @@ -1,5 +1,5 @@ # 基础镜像 -FROM kdvolder/jdk8 +FROM arm64v8/openjdk:8 # author MAINTAINER manhuoda #指定东八区时区 @@ -10,7 +10,7 @@ ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" # 其效果是在主机 /var/lib/docker 目录下创建了一个临时文件,并链接到容器的/tmp VOLUME /tmp #将当前jar 复制到容器根目录下 -ADD mhd-modules-system.jar mhd-modules-system.jar +ADD target/mhd-modules-system.jar mhd-modules-system.jar #暴露容器端口 Docker镜像告知Docker宿主机应用监听了端口 EXPOSE 9201 # 运行jar包 diff --git a/mhd-modules/mhd-system/pom.xml b/mhd-modules/mhd-system/pom.xml index 28390c606..b58151899 100644 --- a/mhd-modules/mhd-system/pom.xml +++ b/mhd-modules/mhd-system/pom.xml @@ -54,9 +54,14 @@ - + + + com.dameng + DmJdbcDriver18 + 8.1.1.193 @@ -143,4 +148,19 @@ + + + + mhd-modules-system + + + + com.spotify + dockerfile-maven-plugin + + + + + + diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/infrastructure/config/CamelCaseMapPlugin.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/infrastructure/config/CamelCaseMapPlugin.java new file mode 100644 index 000000000..ba41cf91d --- /dev/null +++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/infrastructure/config/CamelCaseMapPlugin.java @@ -0,0 +1,57 @@ +package com.mhd.basic.infrastructure.config; + +import com.mhd.basic.infrastructure.util.CamelCaseUtils; +import org.apache.ibatis.executor.resultset.ResultSetHandler; +import org.apache.ibatis.plugin.*; +import org.springframework.stereotype.Component; + +import java.sql.Statement; +import java.util.List; +import java.util.Map; +import java.util.Properties; + +/** + * MyBatis插件:拦截Map类型结果,转换Key为驼峰 + */ +@Intercepts({@Signature( + type = ResultSetHandler.class, + method = "handleResultSets", + args = {Statement.class} +)}) +@Component +public class CamelCaseMapPlugin implements Interceptor { + + @Override + public Object intercept(Invocation invocation) throws Throwable { + // 执行原方法获取结果 + Object result = invocation.proceed(); + // 处理结果:如果是List且元素是Map,转换Key + if (result instanceof List) { + List> list = (List>) result; + for (int i = 0; i < list.size(); i++) { + Object item = list.get(i); + if (item instanceof Map) { + @SuppressWarnings("unchecked") + Map map = (Map) item; + // 转换Key为驼峰 + list.set(i, CamelCaseUtils.convertMapKeyToCamel(map)); + } + } + } + return result; + } + + @Override + public Object plugin(Object target) { + // 只拦截ResultSetHandler类型 + if (target instanceof ResultSetHandler) { + return Plugin.wrap(target, this); + } + return target; + } + + @Override + public void setProperties(Properties properties) { + // 可配置参数,此处无需处理 + } +} \ No newline at end of file diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/infrastructure/util/CamelCaseUtils.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/infrastructure/util/CamelCaseUtils.java new file mode 100644 index 000000000..63f799bad --- /dev/null +++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/infrastructure/util/CamelCaseUtils.java @@ -0,0 +1,54 @@ +package com.mhd.basic.infrastructure.util; + +import org.apache.commons.lang3.StringUtils; + +import java.util.HashMap; +import java.util.Map; + +/** + * 字符串工具类扩展:下划线/大写转驼峰 + */ +public class CamelCaseUtils { + + /** + * 大写下划线转驼峰(如:USER_NAME → userName) + */ + public static String toCamelCase(String str) { + if (StringUtils.isBlank(str)) { + return str; + } + // 先转小写,再处理下划线 + str = str.toLowerCase(); + StringBuilder sb = new StringBuilder(); + boolean nextUpperCase = false; + for (int i = 0; i < str.length(); i++) { + char c = str.charAt(i); + if (c == '_') { + nextUpperCase = true; + } else { + if (nextUpperCase) { + sb.append(Character.toUpperCase(c)); + nextUpperCase = false; + } else { + sb.append(c); + } + } + } + return sb.toString(); + } + + /** + * 批量转换Map的Key为驼峰 + */ + public static Map convertMapKeyToCamel(Map map) { + if (map == null || map.isEmpty()) { + return map; + } + Map newMap = new HashMap<>(map.size()); + for (Map.Entry entry : map.entrySet()) { + String camelKey = toCamelCase(entry.getKey()); + newMap.put(camelKey, entry.getValue()); + } + return newMap; + } +} \ No newline at end of file diff --git a/mhd-modules/mhd-system/src/main/resources/bootstrap.yml b/mhd-modules/mhd-system/src/main/resources/bootstrap.yml index 351d1a52d..16293438f 100644 --- a/mhd-modules/mhd-system/src/main/resources/bootstrap.yml +++ b/mhd-modules/mhd-system/src/main/resources/bootstrap.yml @@ -13,13 +13,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: 10.33.0.129:6010 config: - server-addr: 127.0.0.1:8848 +# server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 - #server-addr: mhd-nacos:8848 + server-addr: 10.33.0.129:6010 group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置 file-extension: yml #默认properties # 共享配置 diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/basic/SysCityMapper.xml b/mhd-modules/mhd-system/src/main/resources/mapper/basic/SysCityMapper.xml index 91f01d07c..284040ffe 100644 --- a/mhd-modules/mhd-system/src/main/resources/mapper/basic/SysCityMapper.xml +++ b/mhd-modules/mhd-system/src/main/resources/mapper/basic/SysCityMapper.xml @@ -17,7 +17,7 @@ a.update_by, a.update_by_name, a.del_flag - FROM `sys_city` a + FROM sys_city a WHERE a.del_flag = 1 @@ -43,7 +43,7 @@ a.update_by, a.update_by_name, a.del_flag - FROM `sys_city` a + FROM sys_city a WHERE a.del_flag = 1 @@ -71,7 +71,7 @@ city_name, city_remark FROM - `sys_city` + sys_city WHERE province_code = #{values} ORDER BY diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/basic/SysCountyMapper.xml b/mhd-modules/mhd-system/src/main/resources/mapper/basic/SysCountyMapper.xml index 90cb542f0..deec9ee50 100644 --- a/mhd-modules/mhd-system/src/main/resources/mapper/basic/SysCountyMapper.xml +++ b/mhd-modules/mhd-system/src/main/resources/mapper/basic/SysCountyMapper.xml @@ -17,7 +17,7 @@ a.update_by, a.update_by_name, a.del_flag - FROM `sys_county` a + FROM sys_county a WHERE a.del_flag = 1 @@ -43,7 +43,7 @@ a.update_by_name, a.del_flag FROM - `sys_county` a + sys_county a WHERE a.del_flag = 1 @@ -68,7 +68,7 @@ city_code, county_name, county_remark - FROM `sys_county` + FROM sys_county WHERE city_code = #{values} ORDER BY county_code_new DESC LIMIT 1 @@ -113,7 +113,7 @@ a.county_name as countyName, CONCAT( c.province_name, b.city_name, a.county_name ) AS provinceCityCountyName FROM - `sys_county` a + sys_county a LEFT JOIN sys_city b ON a.city_code = b.city_code LEFT JOIN sys_province c ON b.province_code = c.province_code WHERE diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/basic/SysProvinceMapper.xml b/mhd-modules/mhd-system/src/main/resources/mapper/basic/SysProvinceMapper.xml index 6868c63fa..abb06f115 100644 --- a/mhd-modules/mhd-system/src/main/resources/mapper/basic/SysProvinceMapper.xml +++ b/mhd-modules/mhd-system/src/main/resources/mapper/basic/SysProvinceMapper.xml @@ -15,7 +15,7 @@ a.update_by, a.update_by_name, a.del_flag - FROM `sys_province` a + FROM sys_province a WHERE a.del_flag = 1 @@ -41,7 +41,7 @@ a.update_by, a.update_by_name, a.del_flag - FROM `sys_province` a + FROM sys_province a WHERE a.del_flag = 1 @@ -62,7 +62,7 @@ SELECT a.* FROM (SELECT c.province_id as areaId, - "" as parentAreaCode, + '' as parentAreaCode, c.province_code AS areaCode, c.province_code AS areaCodeNew, c.province_name AS areaName, @@ -75,7 +75,7 @@ c.update_by_name, c.del_flag FROM - `sys_county` a + sys_county a LEFT JOIN sys_city b ON a.city_code = b.city_code LEFT JOIN sys_province c ON b.province_code = c.province_code UNION @@ -94,7 +94,7 @@ b.update_by_name, b.del_flag FROM - `sys_county` a + sys_county a LEFT JOIN sys_city b ON a.city_code = b.city_code LEFT JOIN sys_province c ON b.province_code = c.province_code UNION @@ -113,7 +113,7 @@ a.update_by_name, a.del_flag FROM - `sys_county` a + sys_county a LEFT JOIN sys_city b ON a.city_code = b.city_code LEFT JOIN sys_province c ON b.province_code = c.province_code ) a @@ -134,7 +134,7 @@ resultType="com.mhd.basic.domain.areaAggregate.repository.po.SysAreaPO"> SELECT c.province_id as areaId, - "" as parentAreaCode, + '' as parentAreaCode, c.province_code AS areaCode, c.province_code AS areaCodeNew, c.province_name AS areaName, @@ -147,7 +147,7 @@ c.update_by_name, c.del_flag FROM - `sys_county` a + sys_county a LEFT JOIN sys_city b ON a.city_code = b.city_code LEFT JOIN sys_province c ON b.province_code = c.province_code @@ -178,7 +178,7 @@ b.update_by_name, b.del_flag FROM - `sys_county` a + sys_county a LEFT JOIN sys_city b ON a.city_code = b.city_code LEFT JOIN sys_province c ON b.province_code = c.province_code WHERE @@ -208,7 +208,7 @@ a.update_by_name, a.del_flag FROM - `sys_county` a + sys_county a LEFT JOIN sys_city b ON a.city_code = b.city_code LEFT JOIN sys_province c ON b.province_code = c.province_code WHERE @@ -245,7 +245,7 @@ province_name, province_remark FROM - `sys_province` + sys_province ORDER BY province_code DESC LIMIT 1 diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/basic/UserFormConfigInterface.xml b/mhd-modules/mhd-system/src/main/resources/mapper/basic/UserFormConfigInterface.xml index da7d67cf7..394836c26 100644 --- a/mhd-modules/mhd-system/src/main/resources/mapper/basic/UserFormConfigInterface.xml +++ b/mhd-modules/mhd-system/src/main/resources/mapper/basic/UserFormConfigInterface.xml @@ -7,7 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT a.* FROM - `basic_agreement` a + basic_agreement a WHERE a.del_flag = 1 diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/basic/addressBook/UserFormConfigInterface.xml b/mhd-modules/mhd-system/src/main/resources/mapper/basic/addressBook/UserFormConfigInterface.xml index 910d27788..fa1c98742 100644 --- a/mhd-modules/mhd-system/src/main/resources/mapper/basic/addressBook/UserFormConfigInterface.xml +++ b/mhd-modules/mhd-system/src/main/resources/mapper/basic/addressBook/UserFormConfigInterface.xml @@ -118,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ab1.latitude AS receive_doorplate, ab1.address_plot AS receive_addressPlot FROM - `common_route` cr + common_route cr LEFT JOIN address_book ab ON ab.address_book_id = cr.send_address_id and ab.user_id = #{userId} @@ -180,7 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" b.doorplate, b.remark FROM - `manifest_throught` m + manifest_throught m LEFT JOIN address_book b ON m.address_book_id = b.address_book_id diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/basic/materialBaseInfo/MaterialBaseInfoMapper.xml b/mhd-modules/mhd-system/src/main/resources/mapper/basic/materialBaseInfo/MaterialBaseInfoMapper.xml index 23b958989..67845fb2f 100644 --- a/mhd-modules/mhd-system/src/main/resources/mapper/basic/materialBaseInfo/MaterialBaseInfoMapper.xml +++ b/mhd-modules/mhd-system/src/main/resources/mapper/basic/materialBaseInfo/MaterialBaseInfoMapper.xml @@ -170,7 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and material_base_info_id in (SELECT DISTINCT material_base_info_id - FROM `test_szwl_wms`.material_inventory + FROM test_szwl_wms.material_inventory WHERE allocation_quantity > 0 AND del_flag = 1) diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/basic/materialClassify/MaterialClassifyMapper.xml b/mhd-modules/mhd-system/src/main/resources/mapper/basic/materialClassify/MaterialClassifyMapper.xml index a14aaf78b..31a7e19b6 100644 --- a/mhd-modules/mhd-system/src/main/resources/mapper/basic/materialClassify/MaterialClassifyMapper.xml +++ b/mhd-modules/mhd-system/src/main/resources/mapper/basic/materialClassify/MaterialClassifyMapper.xml @@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select material_classify_id, organization_id, organization_name, top_organization_id, code, `name`, `level`, parent_code, parent_name, code_path, name_path, remark, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from material_classify + select material_classify_id, organization_id, organization_name, top_organization_id, code, name, level, parent_code, parent_name, code_path, name_path, remark, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from material_classify @@ -47,10 +47,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and code = #{code} - and `name` like concat('%', #{name}, '%') + and name like concat('%', #{name}, '%') - and `level` = #{level} + and level = #{level} and parent_code = #{parentCode} @@ -93,6 +93,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHERE FIND_IN_SET(#{parentCode}, code_path) > 0 - ORDER BY `level` ASC + ORDER BY level ASC \ No newline at end of file diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/basic/storageLocationGroup/StorageLocationGroupMapper.xml b/mhd-modules/mhd-system/src/main/resources/mapper/basic/storageLocationGroup/StorageLocationGroupMapper.xml index 618e0690c..52ca90bf2 100644 --- a/mhd-modules/mhd-system/src/main/resources/mapper/basic/storageLocationGroup/StorageLocationGroupMapper.xml +++ b/mhd-modules/mhd-system/src/main/resources/mapper/basic/storageLocationGroup/StorageLocationGroupMapper.xml @@ -82,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and update_by_name like concat('%', #{updateByName}, '%') - and `number` = #{number} + and number = #{number} and remark like concat('%',#{remark},'%') diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/system/SysMenuMapper.xml b/mhd-modules/mhd-system/src/main/resources/mapper/system/SysMenuMapper.xml index b90bf0cf4..d84fdfae9 100644 --- a/mhd-modules/mhd-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/mhd-modules/mhd-system/src/main/resources/mapper/system/SysMenuMapper.xml @@ -29,7 +29,7 @@ - select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible,sys_type, status, ifnull(perms,'') as perms, icon, create_time + select menu_id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible,sys_type, status, ifnull(perms,'') as perms, icon, create_time from sys_menu @@ -54,13 +54,13 @@ DELETE FROM - `custom_auth_role` a + custom_auth_role a WHERE a.del_flag = 1 diff --git a/mhd-user-center/src/main/resources/mapper/CustomAuthUserMapper.xml b/mhd-user-center/src/main/resources/mapper/CustomAuthUserMapper.xml index 9b257e4fc..243a15427 100644 --- a/mhd-user-center/src/main/resources/mapper/CustomAuthUserMapper.xml +++ b/mhd-user-center/src/main/resources/mapper/CustomAuthUserMapper.xml @@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.update_by, a.update_by_name FROM - `custom_auth_user` a + custom_auth_user a WHERE a.del_flag = 1 @@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" DELETE - FROM `role` a + FROM role a WHERE a.del_flag = 1 and a.organization_id = #{value} @@ -167,9 +167,9 @@ DELETE FROM - `role_menu` a + role_menu a WHERE a.del_flag = 1 and a.role_id = #{roleId} diff --git a/mhd-user-center/src/main/resources/mapper/UserDataPermissionMapper.xml b/mhd-user-center/src/main/resources/mapper/UserDataPermissionMapper.xml index d96b2d2aa..9b8599b67 100644 --- a/mhd-user-center/src/main/resources/mapper/UserDataPermissionMapper.xml +++ b/mhd-user-center/src/main/resources/mapper/UserDataPermissionMapper.xml @@ -14,7 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.user_data_personal_status, a.user_data_organization_status FROM - `user_data_permission` a + user_data_permission a SELECT a.driver_id - FROM `user_driver` a + FROM user_driver a WHERE a.del_flag = 1 AND a.user_id = #{values} @@ -325,9 +325,9 @@ SELECT u.user_name FROM - `user_driver` a + user_driver a LEFT JOIN - `user` u + "USER" u ON u.user_id = a.user_id AND u.del_flag = 1 WHERE a.del_flag = 1 @@ -346,8 +346,8 @@ resultType = "java.lang.Integer"> select count(1) from ( select b.user_id - from user b - left join (select user_id, GROUP_CONCAT(r.role_name separator '&') roleName + from "USER" b + left join (select user_id, WM_CONCAT(r.role_name separator '&') roleName from role r left join user_role ur on r.role_id = ur.role_id and ur.del_flag = 1 where r.del_flag = 1 @@ -414,8 +414,8 @@ b.user_area_address, b.user_remark, dvb.vehicle_license_plate_number - FROM `user_driver` a - LEFT JOIN `user` b ON a.user_id = b.user_id + FROM user_driver a + LEFT JOIN "USER" b ON a.user_id = b.user_id LEFT JOIN driver_vehicle_bind dvb ON dvb.driver_bind_id = b.user_id AND dvb.del_flag = 1 AND default_flag = 1 WHERE a.del_flag = 1 AND b.del_flag = 1 @@ -461,8 +461,8 @@ a.user_id, a.driver_fill FROM - `user_driver` a - LEFT JOIN `user` b ON a.user_id = b.user_id + user_driver a + LEFT JOIN "USER" b ON a.user_id = b.user_id AND b.del_flag = 1 WHERE a.del_flag = 1 @@ -525,8 +525,8 @@ b.user_name, b.user_account FROM - `user_driver` a - LEFT JOIN `user` b ON a.user_id = b.user_id AND b.del_flag = 1 + user_driver a + LEFT JOIN "USER" b ON a.user_id = b.user_id AND b.del_flag = 1 WHERE a.del_flag = 1 AND a.driver_id IN @@ -722,7 +722,7 @@ SELECT m.motorcade_header_id, md.user_id, - GROUP_CONCAT( c.vehicle_license_plate_number ) AS vehicleLicensePlateNumber, + WM_CONCAT( c.vehicle_license_plate_number ) AS vehicleLicensePlateNumber, u.user_phone, u.user_name, u.avatar, @@ -734,7 +734,7 @@ AND c.del_flag = 1 LEFT JOIN user_driver ud ON md.user_id = ud.user_id AND ud.del_flag = 1 - LEFT JOIN `user` u ON ud.user_id = u.user_id + LEFT JOIN "USER" u ON ud.user_id = u.user_id LEFT JOIN motorcade m ON md.motorcade_id = m.motorcade_id WHERE md.del_flag = 1 @@ -756,7 +756,7 @@ SELECT vehicle_id FROM - `driver_vehicle_bind` + driver_vehicle_bind WHERE del_flag = 1 and driver_id = #{values} @@ -769,9 +769,9 @@ u.user_name, u.user_auth_status FROM - `user_driver` d + user_driver d LEFT JOIN - `user` u + "USER" u ON d.user_id = u.user_id LEFT JOIN driver_vehicle_bind b @@ -820,11 +820,11 @@ r.roleCode FROM user_driver ud - LEFT JOIN `user` u ON ud.user_id = u.user_id + LEFT JOIN "USER" u ON ud.user_id = u.user_id AND u.del_flag = 1 LEFT JOIN (SELECT user_id, - GROUP_CONCAT( DISTINCT r.role_code SEPARATOR '&' ) roleCode + LISTAGG(DISTINCT r.role_code, '&') WITHIN GROUP(ORDER BY r.role_code) AS roleCode FROM role r LEFT JOIN user_role ur ON r.role_id = ur.role_id @@ -858,7 +858,7 @@ FROM user_driver d LEFT JOIN driver_vehicle_bind dvb ON d.user_id = dvb.driver_bind_id AND dvb.del_flag = 1 - LEFT JOIN `user` u ON d.user_id = u.user_id + LEFT JOIN "USER" u ON d.user_id = u.user_id LEFT JOIN user_driver_enterprise ude ON d.user_driver_enterprise_id = ude.user_driver_enterprise_id LEFT JOIN motorcade_driver md ON d.user_id = md.user_id and md.del_flag = 1 LEFT JOIN motorcade m ON m.motorcade_id = md.motorcade_id @@ -886,7 +886,7 @@ FROM user_driver d LEFT JOIN driver_vehicle_bind dvb ON d.user_id = dvb.driver_bind_id AND dvb.del_flag = 1 - LEFT JOIN `user` u ON d.user_id = u.user_id + LEFT JOIN "USER" u ON d.user_id = u.user_id LEFT JOIN user_driver_enterprise ude ON d.user_driver_enterprise_id = ude.user_driver_enterprise_id LEFT JOIN motorcade_driver md ON d.user_id = md.user_id and md.del_flag = 1 LEFT JOIN motorcade m ON m.motorcade_id = md.motorcade_id @@ -914,7 +914,7 @@ FROM user_driver d LEFT JOIN driver_vehicle_bind dvb ON d.user_id = dvb.driver_bind_id AND dvb.del_flag = 1 - LEFT JOIN `user` u ON d.user_id = u.user_id + LEFT JOIN "USER" u ON d.user_id = u.user_id LEFT JOIN motorcade_driver md ON d.user_id = md.user_id and md.del_flag = 1 LEFT JOIN motorcade m ON m.motorcade_id = md.motorcade_id WHERE @@ -952,7 +952,7 @@ u.user_account, ude.user_driver_enterprise_id, ude.driver_enterprise_name - from user u + from "USER" u left join user_driver ud on ud.user_id = u.user_id and u.del_flag = 1 left join user_driver_enterprise ude on u.user_id = ude.user_id and ude.del_flag = 1 @@ -993,7 +993,7 @@ u.user_auth_status userAuthStatus, u.user_birthday userBirthday, concat(ude.driver_captain_fill,'') driverCaptainFill - from user u + from "USER" u left join user_driver_enterprise ude on u.user_id = ude.user_id and ude.del_flag = 1 where u.del_flag = 1 and ude.driver_captain_fill = 3 @@ -1012,7 +1012,7 @@ dvb.vehicle_type_name, ud.driver_fill from user_driver ud - left join user u on ud.user_id = u.user_id + left join "USER" u on ud.user_id = u.user_id left join driver_vehicle_bind dvb on ud.user_id = dvb.driver_bind_id and dvb.del_flag = 1 and dvb.default_flag = 1 where ud.del_flag = 1 and u.del_flag = 1 @@ -1037,9 +1037,9 @@ SELECT u.user_id, u.user_name, u.user_area_address, u.user_area_county_id, u.user_area_name ,u.user_phone,u.has_default_address,b.shipper_id,b.shipper_enterprise_name - FROM `user` u - LEFT JOIN `user_shipper` b ON u.user_id = b.user_id - left join (select user_id, GROUP_CONCAT(r.role_name separator '&') roleName + FROM "USER" u + LEFT JOIN user_shipper b ON u.user_id = b.user_id + left join (select user_id, LISTAGG(r.role_name, '&') WITHIN GROUP(ORDER BY r.role_name) AS roleName from role r left join user_role ur on r.role_id = ur.role_id and ur.del_flag = 1 where r.del_flag = 1 @@ -738,9 +733,9 @@ SELECT user_shipper.shipper_enterprise_name FROM - `user` u + "USER" u INNER JOIN - `user_shipper` ON u.user_id = user_shipper.user_id + user_shipper ON u.user_id = user_shipper.user_id WHERE u.del_flag = 1 AND user_shipper.del_flag = 1 diff --git a/mhd-user-center/src/main/resources/mapper/UserMenuMapper.xml b/mhd-user-center/src/main/resources/mapper/UserMenuMapper.xml index 9df5985c9..132ff3d9f 100644 --- a/mhd-user-center/src/main/resources/mapper/UserMenuMapper.xml +++ b/mhd-user-center/src/main/resources/mapper/UserMenuMapper.xml @@ -10,7 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.user_id, a.menu_id FROM - `user_menu` a + user_menu a SELECT @@ -40,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select u.user_id - from user u + from "USER" u left join user_role ur on u.user_id = ur.user_id and ur.del_flag = 1 left join role r on r.role_id = ur.role_id and r.del_flag = 1 diff --git a/mhd-user-center/src/main/resources/mapper/UserShipperMapper.xml b/mhd-user-center/src/main/resources/mapper/UserShipperMapper.xml index 161f62379..c89277bb2 100644 --- a/mhd-user-center/src/main/resources/mapper/UserShipperMapper.xml +++ b/mhd-user-center/src/main/resources/mapper/UserShipperMapper.xml @@ -65,8 +65,8 @@ a.esign_auth_status, a.esign_enterprise_status, a.esign_seal_auth_id - FROM `user_shipper` a - LEFT JOIN `user` b ON a.user_id = b.user_id + FROM user_shipper a + LEFT JOIN "USER" b ON a.user_id = b.user_id WHERE a.del_flag = 1 AND b.del_flag = 1 @@ -139,10 +139,10 @@ b.monthly_settlement_flag, a.user_auth_status, b.original_receipt_flag, - b.freight_node - FROM `user` a - LEFT JOIN `user_shipper` b ON a.user_id = b.user_id - left join (select user_id, GROUP_CONCAT(r.role_name separator '&') roleName + b.freight_node,b.customer_nc_code + FROM "USER" a + LEFT JOIN user_shipper b ON a.user_id = b.user_id + left join (select user_id, LISTAGG(DISTINCT r.role_name, '&') WITHIN GROUP(ORDER BY r.role_name) AS roleName from role r left join user_role ur on r.role_id = ur.role_id and ur.del_flag = 1 where r.del_flag = 1 @@ -186,15 +186,15 @@ SELECT b.shipper_id, a.user_id, - GROUP_CONCAT(r.role_code) AS roleCode, + WM_CONCAT(r.role_code) AS roleCode, b.shipper_fill, b.shipper_enterprise_fill, a.business_type FROM - `user` a - LEFT JOIN `user_shipper` b ON b.user_id = a.user_id + "user" a + LEFT JOIN user_shipper b ON b.user_id = a.user_id LEFT JOIN user_role ur ON b.user_id = ur.user_id - LEFT JOIN `role` r ON ur.role_id = r.role_id + LEFT JOIN role r ON ur.role_id = r.role_id AND r.del_flag = 1 WHERE a.del_flag = 1 @@ -346,8 +346,8 @@ select sum(case when us.shipper_fill = 2 then 1 end) + - sum(case when us.shipper_enterprise_fill = 2 then 1 end) as `count` - from user u + sum(case when us.shipper_enterprise_fill = 2 then 1 end) as count + from "USER" u left join user_shipper us on u.user_id = us.user_id u.del_flag = 1 diff --git a/mhd_finance/Dockerfile b/mhd_finance/Dockerfile index 73e7eef62..3deb94377 100644 --- a/mhd_finance/Dockerfile +++ b/mhd_finance/Dockerfile @@ -1,5 +1,5 @@ # 基础镜像 -FROM kdvolder/jdk8 +FROM arm64v8/openjdk:8 # author MAINTAINER manhuoda #指定东八区时区 @@ -10,7 +10,7 @@ ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" # 其效果是在主机 /var/lib/docker 目录下创建了一个临时文件,并链接到容器的/tmp VOLUME /tmp #将当前mhd_product.jar 复制到容器根目录下 -ADD mhd_finance.jar mhd_finance.jar +ADD target/mhd_finance.jar mhd_finance.jar #暴露容器端口 Docker镜像告知Docker宿主机应用监听了端口 EXPOSE 8011 # 运行jar包 diff --git a/mhd_finance/pom.xml b/mhd_finance/pom.xml index ffb4ff80c..d7b03c3ae 100644 --- a/mhd_finance/pom.xml +++ b/mhd_finance/pom.xml @@ -73,9 +73,14 @@ com.mhd mhd-common-redis - + + + com.dameng + DmJdbcDriver18 + 8.1.1.193 @@ -139,6 +144,24 @@ alibaba-dingtalk-service-sdk 2.0.0 + + + javax.xml.bind + jaxb-api + 2.3.1 + + + org.glassfish.jaxb + jaxb-runtime + 2.3.1 + + + com.aliyun + aliyun-http-apache + 0.2.9-beta + compile + + @@ -159,4 +182,17 @@ + + + mhd_finance + + + + com.spotify + dockerfile-maven-plugin + + + + + diff --git a/mhd_finance/src/main/java/com/linke/finance/Test.java b/mhd_finance/src/main/java/com/linke/finance/Test.java new file mode 100644 index 000000000..75cf9be71 --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/Test.java @@ -0,0 +1,163 @@ +package com.linke.finance; + +import com.mhd.common.core.domain.dto.nc.*; + +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.Date; + +public class Test { + public static void main(String[] args) { + //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(); + item.setSo_deptid("NG040104"); + item.setPk_deptid("NG040104"); + item.setPk_psndoc("111"); + item.setCustomer("11111"); + item.setObjtype("0"); + item.setDirection("1"); + item.setScomment("南歧"); + item.setPk_currtype("HKD"); + item.setTaxrate("1"); + item.setQuantity_de("0"); + item.setMoney_de("1000.00"); + item.setMoney_bal("1000.00"); + item.setNotax_de("按税率计算"); + Ysbodys bodys=new Ysbodys(); + bodys.setItem(item); + Ysbillhead billhead=new Ysbillhead(); + billhead.setPk_group("CNK"); + billhead.setPk_org("NG0401"); + billhead.setSett_org("NG0401"); + billhead.setCreationtime(dateString); + billhead.setPk_billtype("F0"); + billhead.setCreator("xiangna"); + billhead.setPk_tradetype("D0"); + billhead.setBillclass("ys"); + billhead.setIsinit("N"); + billhead.setBilldate(dateString); + billhead.setSyscode("0"); + billhead.setBillno("1111111"); + billhead.setDef59("1111111"); + billhead.setSrc_syscode("0"); + billhead.setBillstatus("0"); + billhead.setBillmaker("xiangna"); + billhead.setPk_busitype(""); + billhead.setBillyear("2025"); + billhead.setBillperiod("12"); + billhead.setEffectstatus("0"); + billhead.setDef28("nqyw"); + billhead.setDef29("11111111"); + billhead.setBodys(bodys); + Ysbill bill=new Ysbill(); + bill.setId("1111"); + bill.setBillhead(billhead); + Ysufinterface ufinterface=new Ysufinterface(); + ufinterface.setAccount("NKNC"); + ufinterface.setBilltype("F0"); + 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(Ysufinterface.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(); + } + }; + + 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 73d1d838f..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 @@ -610,6 +610,15 @@ public class ReconciliationApplicationService { return reconciliationDomainService.workflowProcessInstances(businessDocumentDetaliIds); } + public boolean synchronousNc(String businessDocumentDetaliIds) + { + 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) { return reconciliationDomainService.editIsInvoice(innerNumber,isInvoice,invoiceId,invoiceMakeTime,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 acec63669..a76162779 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 */ @@ -138,5 +138,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 73825c436..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 @@ -62,5 +62,9 @@ public interface IReconciliationService extends IService public StartProcessInstanceResponse workflowProcessInstances(String businessDocumentDetaliIds); + 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 f783fea52..8884ae06a 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,13 +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; @@ -30,12 +37,26 @@ 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.domain.TmsTransportNote; 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; +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; @@ -53,15 +74,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"; /** * 查询对账单列表 */ @@ -354,4 +382,370 @@ 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){ + R ajaxResult1=wlhyServiceFeign.selectByOrderNum(tmsOrder.getGoodsNumber()); + if(ajaxResult1.getCode()==200){ + TmsTransportNote tmsTransportNote= ajaxResult1.getData(); + if(ObjectUtil.isNotNull(tmsTransportNote.getIsPaper())){ + date=tmsTransportNote.getConfirmReceiptTime(); + dateString = sdf.format(date); + }else{ + throw new ServiceException("运单还没签收, 先签收"); + } + } + if(null==reconciliation.getSettlementPartyId()){ + throw new ServiceException("没有结算方,请核对"); + } + AjaxResult ajaxResult=userServiceFeign.getShipperSummaryData(Long.valueOf(reconciliation.getSettlementPartyId())); + if(ajaxResult.get("code").toString().equals("200")){ + Object userShipperPo= ajaxResult.get("data"); + JSONObject jsonObject = new JSONObject((Map) userShipperPo); + if(org.apache.commons.lang.StringUtils.isBlank(jsonObject.get("customerNcCode").toString())){ + throw new ServiceException("请先维护客户编码"); + } + Ysitem item=new Ysitem(); + item.setSo_deptid("NG040104"); + item.setPk_deptid("NG040104"); + item.setPk_psndoc(userPo.getSalespersonNcCode()); + item.setCustomer(jsonObject.get("customerNcCode").toString()); + item.setObjtype("0"); + item.setDirection("1"); + item.setScomment(jsonObject.get("shipperEnterpriseName").toString()); + 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(ysitemList); + Ysbillhead billhead=new Ysbillhead(); + billhead.setPk_group("CNK"); + billhead.setPk_org("NG0401"); + billhead.setSett_org("NG0401"); + billhead.setCreationtime(dateString); + billhead.setCreator(userPo.getDocumentPreparerNcCode()); + billhead.setPk_billtype("F0"); + billhead.setPk_tradetype("D0"); + billhead.setBillclass("ys"); + billhead.setIsinit("N"); + date=reconciliation.getCreateTime(); + dateString = sdf.format(date); + billhead.setBilldate(dateString); + billhead.setSyscode("0"); + billhead.setBillno(""); + billhead.setDef59(""); + 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); + Ysbill bill=new Ysbill(); + bill.setId("ys"+String.valueOf(reconciliation.getReconciliationId())); + bill.setBillhead(billhead); + Ysufinterface ufinterface=new Ysufinterface(); + ufinterface.setAccount("NKNC"); + ufinterface.setBilltype("F0"); + 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 = JAXBContext.newInstance(Ysufinterface.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(0L); + ncLog.setOrganizationId(reconciliation.getOrganizationId()); + ncLog.setOrganizationName(reconciliation.getOrganizationName()); + ncLog.setTopOrganizationId(reconciliation.getTopOrganizationId()); + ncLogMapper.insert(ncLog); + reconciliation.setSynchronousStatus(1); + reconciliation.setSynchronousTime(new Date()); + reconciliation.setNcId("ys"+String.valueOf(reconciliation.getReconciliationId())); + reconciliationMapper.updateById(reconciliation); + CloseableHttpClient httpClient = HttpClients.createDefault(); + HttpPost httpPost = new HttpPost(url); + StringEntity postingString = new StringEntity(xmlString, "UTF-8"); + httpPost.setEntity(postingString); + httpPost.setHeader("Content-type", "application/xml"); + try { + CloseableHttpResponse response = httpClient.execute(httpPost); + String responseString = EntityUtils.toString(response.getEntity()); + System.out.println(responseString); + response.close(); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + httpClient.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + } catch (JAXBException e) { + e.printStackTrace(); + } + } + return true; + } + + @Override + public boolean synchronousNcSK(String businessDocumentDetaliIds) { + String [] businessDocumentDetaliIdArray=businessDocumentDetaliIds.split(","); + LoginUser loginUser= SecurityUtils.getLoginUser(); + UserPo userPo=loginUser.getUserPo(); + ObjectMapper mapper = new ObjectMapper(); + AjaxResult ajaxResult5=userServiceFeign.getInfo(loginUser.getUserid()); + if(ajaxResult5.get("code").toString().equals("200")){ + Object userShipperPo= ajaxResult5.get("data"); + JSONObject jsonObject = new JSONObject((Map) userShipperPo); + + try { + String jsonString = mapper.writeValueAsString(jsonObject); + userPo = mapper.readValue(jsonString, UserPo.class); + } catch (JsonProcessingException e) { + e.printStackTrace(); + } + + }else{ + throw new ServiceException("查询当前登录人用户信息失败"); + } + if (org.apache.commons.lang.StringUtils.isBlank(userPo.getSalespersonNcCode())) { + throw new ServiceException("请先维护业务员编码"); + } + if (org.apache.commons.lang.StringUtils.isBlank(userPo.getDocumentPreparerNcCode())) { + throw new ServiceException("请先维护制单员编码"); + } + for (String businessDocumentDetaliId:businessDocumentDetaliIdArray){ + Reconciliation reconciliation=reconciliationMapper.selectById(businessDocumentDetaliId); + if(reconciliation.getSkSynchronousStatus()==1){ + throw new ServiceException("该记录已同步,不需要再次同步"); + } + /* if(reconciliation.getIsInvoice()!=2){ + throw new ServiceException("该记录还未开票,不允许同步"); + }*/ + if(reconciliation.getCollectionState()!=2){ + throw new ServiceException("该记录还未结算完成,不允许同步"); + } + /* if(org.apache.commons.lang.StringUtils.isBlank(userPo.getSalespersonNcCode())){ + throw new ServiceException("请先维护业务员编码"); + } + if(org.apache.commons.lang.StringUtils.isBlank(userPo.getDocumentPreparerNcCode())){ + throw new ServiceException("请先维护制单员编码"); + }*/ + try { + Date date = reconciliation.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(); + 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){ + if(null==reconciliation.getSettlementPartyId()){ + throw new ServiceException("没有结算方,请核对"); + } + AjaxResult ajaxResult=userServiceFeign.getShipperSummaryData(Long.valueOf(reconciliation.getSettlementPartyId())); + if(ajaxResult.get("code").toString().equals("200")){ + Object userShipperPo= ajaxResult.get("data"); + JSONObject jsonObject = new JSONObject((Map) userShipperPo); + if(org.apache.commons.lang.StringUtils.isBlank(jsonObject.get("customerNcCode").toString())){ + throw new ServiceException("请先维护客户编码"); + } + SKitem item=new SKitem(); + item.setSo_deptid("NG040104"); + item.setPk_deptid("NG040104"); + item.setCheckdirection("ar"); + item.setPk_psndoc(userPo.getSalespersonNcCode()); + item.setCustomer(jsonObject.get("customerNcCode").toString()); + item.setPurchaseorder(tmsOrder.getGoodsNumber()); + item.setObjtype("0"); + item.setDirection("1"); + item.setScomment(jsonObject.get("shipperEnterpriseName").toString()); + 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(""); + 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); + CloseableHttpClient httpClient = HttpClients.createDefault(); + HttpPost httpPost = new HttpPost(url); + StringEntity postingString = new StringEntity(xmlString, "UTF-8"); + httpPost.setEntity(postingString); + httpPost.setHeader("Content-type", "application/xml"); + try { + CloseableHttpResponse response = httpClient.execute(httpPost); + String responseString = EntityUtils.toString(response.getEntity()); + System.out.println(responseString); + response.close(); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + httpClient.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } catch (JAXBException e) { + e.printStackTrace(); + } + } + return true; + } } diff --git a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/po/ReconciliationPO.java b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/po/ReconciliationPO.java index d3db14de9..04c776ae0 100644 --- a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/po/ReconciliationPO.java +++ b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/po/ReconciliationPO.java @@ -214,5 +214,28 @@ public class ReconciliationPO 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/todo/ReconciliationDO.java b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/todo/ReconciliationDO.java index 7a508ef62..bd758ac84 100644 --- a/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/todo/ReconciliationDO.java +++ b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/repository/todo/ReconciliationDO.java @@ -246,4 +246,28 @@ public class ReconciliationDO 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/service/ReconciliationDomainService.java b/mhd_finance/src/main/java/com/linke/finance/domain/reconciliation/service/ReconciliationDomainService.java index 323b2463d..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 @@ -157,6 +157,16 @@ public class ReconciliationDomainService { return reconciliationService.workflowProcessInstances(businessDocumentDetaliIds); } + public boolean synchronousNc(String businessDocumentDetaliIds) + { + 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 2f7e7dcaf..bea4a0078 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 */ @@ -105,4 +106,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/infrastructure/config/CamelCaseMapPlugin.java b/mhd_finance/src/main/java/com/linke/finance/infrastructure/config/CamelCaseMapPlugin.java new file mode 100644 index 000000000..524382f43 --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/infrastructure/config/CamelCaseMapPlugin.java @@ -0,0 +1,57 @@ +package com.linke.finance.infrastructure.config; + +import com.linke.finance.infrastructure.util.CamelCaseUtils; +import org.apache.ibatis.executor.resultset.ResultSetHandler; +import org.apache.ibatis.plugin.*; +import org.springframework.stereotype.Component; + +import java.sql.Statement; +import java.util.List; +import java.util.Map; +import java.util.Properties; + +/** + * MyBatis插件:拦截Map类型结果,转换Key为驼峰 + */ +@Intercepts({@Signature( + type = ResultSetHandler.class, + method = "handleResultSets", + args = {Statement.class} +)}) +@Component +public class CamelCaseMapPlugin implements Interceptor { + + @Override + public Object intercept(Invocation invocation) throws Throwable { + // 执行原方法获取结果 + Object result = invocation.proceed(); + // 处理结果:如果是List且元素是Map,转换Key + if (result instanceof List) { + List> list = (List>) result; + for (int i = 0; i < list.size(); i++) { + Object item = list.get(i); + if (item instanceof Map) { + @SuppressWarnings("unchecked") + Map map = (Map) item; + // 转换Key为驼峰 + list.set(i, CamelCaseUtils.convertMapKeyToCamel(map)); + } + } + } + return result; + } + + @Override + public Object plugin(Object target) { + // 只拦截ResultSetHandler类型 + if (target instanceof ResultSetHandler) { + return Plugin.wrap(target, this); + } + return target; + } + + @Override + public void setProperties(Properties properties) { + // 可配置参数,此处无需处理 + } +} \ No newline at end of file diff --git a/mhd_finance/src/main/java/com/linke/finance/infrastructure/util/CamelCaseUtils.java b/mhd_finance/src/main/java/com/linke/finance/infrastructure/util/CamelCaseUtils.java new file mode 100644 index 000000000..c344f2535 --- /dev/null +++ b/mhd_finance/src/main/java/com/linke/finance/infrastructure/util/CamelCaseUtils.java @@ -0,0 +1,54 @@ +package com.linke.finance.infrastructure.util; + +import org.apache.commons.lang3.StringUtils; + +import java.util.HashMap; +import java.util.Map; + +/** + * 字符串工具类扩展:下划线/大写转驼峰 + */ +public class CamelCaseUtils { + + /** + * 大写下划线转驼峰(如:USER_NAME → userName) + */ + public static String toCamelCase(String str) { + if (StringUtils.isBlank(str)) { + return str; + } + // 先转小写,再处理下划线 + str = str.toLowerCase(); + StringBuilder sb = new StringBuilder(); + boolean nextUpperCase = false; + for (int i = 0; i < str.length(); i++) { + char c = str.charAt(i); + if (c == '_') { + nextUpperCase = true; + } else { + if (nextUpperCase) { + sb.append(Character.toUpperCase(c)); + nextUpperCase = false; + } else { + sb.append(c); + } + } + } + return sb.toString(); + } + + /** + * 批量转换Map的Key为驼峰 + */ + public static Map convertMapKeyToCamel(Map map) { + if (map == null || map.isEmpty()) { + return map; + } + Map newMap = new HashMap<>(map.size()); + for (Map.Entry entry : map.entrySet()) { + String camelKey = toCamelCase(entry.getKey()); + newMap.put(camelKey, entry.getValue()); + } + return newMap; + } +} \ No newline at end of file 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 238d3a3fc..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 @@ -263,4 +263,27 @@ public class ReconciliationApi extends BaseController{ reconciliationApplicationService.editIsInvoice(innerNumber,isInvoice,invoiceId,invoiceMakeTime,applyNumber); return AjaxResult.success("发票开票修改对账单的开票状态成功"); } + + /** + * 应收账单应收单同步用户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 c18586cc9..b4b9e7aa4 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 @@ -27,7 +27,7 @@ import com.mhd.common.core.web.page.TableDataInfo; /** * 收款单Api - * + * * @author gen * @date 2025-04-28 */ @@ -184,11 +184,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 8829a0a37..63466298a 100644 --- a/mhd_finance/src/main/resources/bootstrap.yml +++ b/mhd_finance/src/main/resources/bootstrap.yml @@ -18,13 +18,15 @@ 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: 10.33.0.129:6010 +# server-addr: 116.204.23.92:8848 config: - server-addr: 127.0.0.1:8848 - # 线上测试环境配置 容器名+端口号 - #server-addr: mhd-nacos:8848 +# server-addr: 127.0.0.1:8848 +# server-addr: 116.204.23.92:8848 +# 线上测试环境配置 容器名+端口号 + server-addr: 10.33.0.129:6010 group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置 file-extension: yml #默认properties # 共享配置 diff --git a/mhd_finance/src/main/resources/mapper/accountManage/AccountCashWalletMapper.xml b/mhd_finance/src/main/resources/mapper/accountManage/AccountCashWalletMapper.xml index 672a7f4ef..8b38b8d55 100644 --- a/mhd_finance/src/main/resources/mapper/accountManage/AccountCashWalletMapper.xml +++ b/mhd_finance/src/main/resources/mapper/accountManage/AccountCashWalletMapper.xml @@ -12,9 +12,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + + com.dameng + DmJdbcDriver18 + 8.1.1.193 @@ -144,4 +149,18 @@ + + + mhd_product + + + + com.spotify + dockerfile-maven-plugin + + + + + + diff --git a/mhd_product/src/main/java/com/linke/product/domain/config/CamelCaseMapPlugin.java b/mhd_product/src/main/java/com/linke/product/domain/config/CamelCaseMapPlugin.java new file mode 100644 index 000000000..c00d8d9f1 --- /dev/null +++ b/mhd_product/src/main/java/com/linke/product/domain/config/CamelCaseMapPlugin.java @@ -0,0 +1,57 @@ +package com.linke.product.domain.config; + +import com.linke.product.domain.util.CamelCaseUtils; +import org.apache.ibatis.executor.resultset.ResultSetHandler; +import org.apache.ibatis.plugin.*; +import org.springframework.stereotype.Component; + +import java.sql.Statement; +import java.util.List; +import java.util.Map; +import java.util.Properties; + +/** + * MyBatis插件:拦截Map类型结果,转换Key为驼峰 + */ +@Intercepts({@Signature( + type = ResultSetHandler.class, + method = "handleResultSets", + args = {Statement.class} +)}) +@Component +public class CamelCaseMapPlugin implements Interceptor { + + @Override + public Object intercept(Invocation invocation) throws Throwable { + // 执行原方法获取结果 + Object result = invocation.proceed(); + // 处理结果:如果是List且元素是Map,转换Key + if (result instanceof List) { + List> list = (List>) result; + for (int i = 0; i < list.size(); i++) { + Object item = list.get(i); + if (item instanceof Map) { + @SuppressWarnings("unchecked") + Map map = (Map) item; + // 转换Key为驼峰 + list.set(i, CamelCaseUtils.convertMapKeyToCamel(map)); + } + } + } + return result; + } + + @Override + public Object plugin(Object target) { + // 只拦截ResultSetHandler类型 + if (target instanceof ResultSetHandler) { + return Plugin.wrap(target, this); + } + return target; + } + + @Override + public void setProperties(Properties properties) { + // 可配置参数,此处无需处理 + } +} \ No newline at end of file diff --git a/mhd_product/src/main/java/com/linke/product/domain/menu/repository/mapper/MenuMapper.java b/mhd_product/src/main/java/com/linke/product/domain/menu/repository/mapper/MenuMapper.java index dfe2b49a8..ec8460925 100644 --- a/mhd_product/src/main/java/com/linke/product/domain/menu/repository/mapper/MenuMapper.java +++ b/mhd_product/src/main/java/com/linke/product/domain/menu/repository/mapper/MenuMapper.java @@ -152,6 +152,6 @@ public interface MenuMapper extends BaseMapper { List selectListByProductIdList(@Param("list") List list); - @Select("SELECT * FROM `custom_auth` WHERE menu_id in (SELECT menu_id FROM sys_menu WHERE top_organization_id = #{organizationId})") + @Select("SELECT * FROM custom_auth WHERE menu_id in (SELECT menu_id FROM sys_menu WHERE top_organization_id = #{organizationId})") List getCustomAuthByOrganizationId(@Param("organizationId") Long organizationId); } diff --git a/mhd_product/src/main/java/com/linke/product/domain/util/CamelCaseUtils.java b/mhd_product/src/main/java/com/linke/product/domain/util/CamelCaseUtils.java new file mode 100644 index 000000000..64768e1fe --- /dev/null +++ b/mhd_product/src/main/java/com/linke/product/domain/util/CamelCaseUtils.java @@ -0,0 +1,54 @@ +package com.linke.product.domain.util; + +import org.apache.commons.lang3.StringUtils; + +import java.util.HashMap; +import java.util.Map; + +/** + * 字符串工具类扩展:下划线/大写转驼峰 + */ +public class CamelCaseUtils { + + /** + * 大写下划线转驼峰(如:USER_NAME → userName) + */ + public static String toCamelCase(String str) { + if (StringUtils.isBlank(str)) { + return str; + } + // 先转小写,再处理下划线 + str = str.toLowerCase(); + StringBuilder sb = new StringBuilder(); + boolean nextUpperCase = false; + for (int i = 0; i < str.length(); i++) { + char c = str.charAt(i); + if (c == '_') { + nextUpperCase = true; + } else { + if (nextUpperCase) { + sb.append(Character.toUpperCase(c)); + nextUpperCase = false; + } else { + sb.append(c); + } + } + } + return sb.toString(); + } + + /** + * 批量转换Map的Key为驼峰 + */ + public static Map convertMapKeyToCamel(Map map) { + if (map == null || map.isEmpty()) { + return map; + } + Map newMap = new HashMap<>(map.size()); + for (Map.Entry entry : map.entrySet()) { + String camelKey = toCamelCase(entry.getKey()); + newMap.put(camelKey, entry.getValue()); + } + return newMap; + } +} \ No newline at end of file diff --git a/mhd_product/src/main/resources/bootstrap.yml b/mhd_product/src/main/resources/bootstrap.yml index a3958fb96..1a8021d1d 100644 --- a/mhd_product/src/main/resources/bootstrap.yml +++ b/mhd_product/src/main/resources/bootstrap.yml @@ -18,13 +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: 10.33.0.129:6010 config: - server-addr: 127.0.0.1:8848 +# server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 - #server-addr: mhd-nacos:8848 + server-addr: 10.33.0.129:6010 group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置 file-extension: yml #默认properties # 共享配置 diff --git a/mhd_product/src/main/resources/mapper/appMenu/AppMenuMapper.xml b/mhd_product/src/main/resources/mapper/appMenu/AppMenuMapper.xml index 31a715484..abddc0176 100644 --- a/mhd_product/src/main/resources/mapper/appMenu/AppMenuMapper.xml +++ b/mhd_product/src/main/resources/mapper/appMenu/AppMenuMapper.xml @@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select a.app_menu_id, a.app_id, me.modules_id from app_menu a - left join `sys_menu` me ON me.menu_id = a.menu_id + left join sys_menu me ON me.menu_id = a.menu_id where a.del_Flag = 1 and me.del_Flag = 1 @@ -91,8 +91,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" me.menu_show, me.menu_perms from app_menu a - left join `app_config` co ON co.app_id = a.app_id - left join `sys_menu` me ON me.menu_id = a.menu_id + left join app_config co ON co.app_id = a.app_id + left join sys_menu me ON me.menu_id = a.menu_id where a.del_flag = 1 and me.del_flag = 1 diff --git a/mhd_product/src/main/resources/mapper/appUserMenuSettings/AppUserMenuSettingsMapper.xml b/mhd_product/src/main/resources/mapper/appUserMenuSettings/AppUserMenuSettingsMapper.xml index 2a25cec46..df01bddfd 100644 --- a/mhd_product/src/main/resources/mapper/appUserMenuSettings/AppUserMenuSettingsMapper.xml +++ b/mhd_product/src/main/resources/mapper/appUserMenuSettings/AppUserMenuSettingsMapper.xml @@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" me.menu_show, me.menu_perms from app_user_menu_settings a - left join `sys_menu` me ON me.menu_id = a.menu_id + left join sys_menu me ON me.menu_id = a.menu_id where a.del_flag = 1 and me.del_flag = 1 diff --git a/mhd_product/src/main/resources/mapper/customAuth/CustomAuthOrganizationMapper.xml b/mhd_product/src/main/resources/mapper/customAuth/CustomAuthOrganizationMapper.xml index d4811b8a0..0a1b4db45 100644 --- a/mhd_product/src/main/resources/mapper/customAuth/CustomAuthOrganizationMapper.xml +++ b/mhd_product/src/main/resources/mapper/customAuth/CustomAuthOrganizationMapper.xml @@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by, del_flag FROM - `custom_auth_organization` + custom_auth_organization SELECT - menu_component AS menuComponent, - menu_redirect_path AS menuRedirectPath + menu_component, + menu_redirect_path FROM - `sys_menu` + sys_menu where del_flag = 1 and menu_show = 1 AND menu_component IS NOT NULL - AND menu_component != "" + AND menu_component != '' diff --git a/mhd_product/src/main/resources/mapper/organization/OrganizationMapper.xml b/mhd_product/src/main/resources/mapper/organization/OrganizationMapper.xml index a3fd6cb14..a07ba8746 100644 --- a/mhd_product/src/main/resources/mapper/organization/OrganizationMapper.xml +++ b/mhd_product/src/main/resources/mapper/organization/OrganizationMapper.xml @@ -96,9 +96,9 @@ o1.interbank_number, o1.template_seal FROM - `sys_organization` o1 + sys_organization o1 LEFT JOIN - `sys_organization` o2 + sys_organization o2 ON o1.parent_organization_id = o2.organization_id @@ -120,7 +120,7 @@ - AND o1.organization_id NOT IN ( SELECT organization_id FROM `sys_organization_correlation` WHERE organization_id = #{organizationId} ) + AND o1.organization_id NOT IN ( SELECT organization_id FROM sys_organization_correlation WHERE organization_id = #{organizationId} ) order by o1.create_time desc @@ -134,7 +134,7 @@ SELECT organization_id FROM - `sys_organization` + sys_organization where tenants_id = #{value} and del_flag = 1 and organization_state = 1 @@ -148,9 +148,9 @@ b.tenants_simple_name, b.user_id FROM - `sys_organization` a - LEFT JOIN `sys_tenants` b ON a.tenants_id = b.tenants_id AND b.del_flag = 1 - LEFT JOIN `tenants_domain_name` c ON b.tenants_id = c.tenants_id AND c.del_flag = 1 + sys_organization a + LEFT JOIN sys_tenants b ON a.tenants_id = b.tenants_id AND b.del_flag = 1 + LEFT JOIN tenants_domain_name c ON b.tenants_id = c.tenants_id AND c.del_flag = 1 WHERE a.del_flag = 1 AND (b.tenants_domain_name = #{value} @@ -216,7 +216,7 @@ SELECT organization_id FROM - `sys_organization` + sys_organization where del_flag = 1 @@ -225,7 +225,7 @@ SELECT organization_id FROM - `sys_organization` + sys_organization where del_flag = 1 AND parent_organization_id in @@ -234,43 +234,66 @@ diff --git a/mhd_product/src/main/resources/mapper/product/ProductDetailsMapper.xml b/mhd_product/src/main/resources/mapper/product/ProductDetailsMapper.xml index 49559df7e..0fa9f1693 100644 --- a/mhd_product/src/main/resources/mapper/product/ProductDetailsMapper.xml +++ b/mhd_product/src/main/resources/mapper/product/ProductDetailsMapper.xml @@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" spd.update_by, spd.del_flag FROM - `sys_product_details` spd + sys_product_details spd LEFT JOIN sys_modules sm ON spd.modules_id = sm.modules_id AND sm.del_flag = 1 diff --git a/mhd_product/src/main/resources/mapper/product/ProductMenuMapper.xml b/mhd_product/src/main/resources/mapper/product/ProductMenuMapper.xml index 828ab0ad9..631e6e0c1 100644 --- a/mhd_product/src/main/resources/mapper/product/ProductMenuMapper.xml +++ b/mhd_product/src/main/resources/mapper/product/ProductMenuMapper.xml @@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by, del_flag FROM - `product_menu` + product_menu diff --git a/mhd_product/src/main/resources/mapper/tenants/TenantsProductMapper.xml b/mhd_product/src/main/resources/mapper/tenants/TenantsProductMapper.xml index e968b8b4b..7b506ffb5 100644 --- a/mhd_product/src/main/resources/mapper/tenants/TenantsProductMapper.xml +++ b/mhd_product/src/main/resources/mapper/tenants/TenantsProductMapper.xml @@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" p.product_icon, p.product_photo FROM - `tenants_product` p + tenants_product p LEFT JOIN sys_product po ON po.product_id = p.product_id diff --git a/mhd_thrid_party/Dockerfile b/mhd_thrid_party/Dockerfile index 5f30e1148..c67a76cd1 100644 --- a/mhd_thrid_party/Dockerfile +++ b/mhd_thrid_party/Dockerfile @@ -1,5 +1,5 @@ # 基础镜像 -FROM kdvolder/jdk8 +FROM arm64v8/openjdk:8 # author MAINTAINER manhuoda #指定东八区时区 @@ -10,7 +10,7 @@ ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" # 其效果是在主机 /var/lib/docker 目录下创建了一个临时文件,并链接到容器的/tmp VOLUME /tmp #将当前mhd_thrid_party.jar 复制到容器根目录下 -ADD mhd_thrid_party.jar mhd_thrid_party.jar +ADD target/mhd_thrid_party.jar mhd_thrid_party.jar #暴露容器端口 Docker镜像告知Docker宿主机应用监听了端口 EXPOSE 8012 # 运行jar包 diff --git a/mhd_thrid_party/pom.xml b/mhd_thrid_party/pom.xml index d4751f850..7e056cac0 100644 --- a/mhd_thrid_party/pom.xml +++ b/mhd_thrid_party/pom.xml @@ -80,9 +80,14 @@ seata-spring-boot-starter - + + + com.dameng + DmJdbcDriver18 + 8.1.1.193 @@ -272,5 +277,17 @@ - + + + mhd_thrid_party + + + + com.spotify + dockerfile-maven-plugin + + + + + diff --git a/mhd_thrid_party/src/main/java/com/linke/thirdParty/infrastructure/config/CamelCaseMapPlugin.java b/mhd_thrid_party/src/main/java/com/linke/thirdParty/infrastructure/config/CamelCaseMapPlugin.java new file mode 100644 index 000000000..a33af3b5e --- /dev/null +++ b/mhd_thrid_party/src/main/java/com/linke/thirdParty/infrastructure/config/CamelCaseMapPlugin.java @@ -0,0 +1,57 @@ +package com.linke.thirdParty.infrastructure.config; + +import com.linke.thirdParty.infrastructure.utils.CamelCaseUtils; +import org.apache.ibatis.executor.resultset.ResultSetHandler; +import org.apache.ibatis.plugin.*; +import org.springframework.stereotype.Component; + +import java.sql.Statement; +import java.util.List; +import java.util.Map; +import java.util.Properties; + +/** + * MyBatis插件:拦截Map类型结果,转换Key为驼峰 + */ +@Intercepts({@Signature( + type = ResultSetHandler.class, + method = "handleResultSets", + args = {Statement.class} +)}) +@Component +public class CamelCaseMapPlugin implements Interceptor { + + @Override + public Object intercept(Invocation invocation) throws Throwable { + // 执行原方法获取结果 + Object result = invocation.proceed(); + // 处理结果:如果是List且元素是Map,转换Key + if (result instanceof List) { + List> list = (List>) result; + for (int i = 0; i < list.size(); i++) { + Object item = list.get(i); + if (item instanceof Map) { + @SuppressWarnings("unchecked") + Map map = (Map) item; + // 转换Key为驼峰 + list.set(i, CamelCaseUtils.convertMapKeyToCamel(map)); + } + } + } + return result; + } + + @Override + public Object plugin(Object target) { + // 只拦截ResultSetHandler类型 + if (target instanceof ResultSetHandler) { + return Plugin.wrap(target, this); + } + return target; + } + + @Override + public void setProperties(Properties properties) { + // 可配置参数,此处无需处理 + } +} \ No newline at end of file diff --git a/mhd_thrid_party/src/main/java/com/linke/thirdParty/infrastructure/utils/CamelCaseUtils.java b/mhd_thrid_party/src/main/java/com/linke/thirdParty/infrastructure/utils/CamelCaseUtils.java new file mode 100644 index 000000000..b3205fbbb --- /dev/null +++ b/mhd_thrid_party/src/main/java/com/linke/thirdParty/infrastructure/utils/CamelCaseUtils.java @@ -0,0 +1,54 @@ +package com.linke.thirdParty.infrastructure.utils; + +import org.apache.commons.lang3.StringUtils; + +import java.util.HashMap; +import java.util.Map; + +/** + * 字符串工具类扩展:下划线/大写转驼峰 + */ +public class CamelCaseUtils { + + /** + * 大写下划线转驼峰(如:USER_NAME → userName) + */ + public static String toCamelCase(String str) { + if (StringUtils.isBlank(str)) { + return str; + } + // 先转小写,再处理下划线 + str = str.toLowerCase(); + StringBuilder sb = new StringBuilder(); + boolean nextUpperCase = false; + for (int i = 0; i < str.length(); i++) { + char c = str.charAt(i); + if (c == '_') { + nextUpperCase = true; + } else { + if (nextUpperCase) { + sb.append(Character.toUpperCase(c)); + nextUpperCase = false; + } else { + sb.append(c); + } + } + } + return sb.toString(); + } + + /** + * 批量转换Map的Key为驼峰 + */ + public static Map convertMapKeyToCamel(Map map) { + if (map == null || map.isEmpty()) { + return map; + } + Map newMap = new HashMap<>(map.size()); + for (Map.Entry entry : map.entrySet()) { + String camelKey = toCamelCase(entry.getKey()); + newMap.put(camelKey, entry.getValue()); + } + return newMap; + } +} \ No newline at end of file diff --git a/mhd_thrid_party/src/main/resources/bootstrap.yml b/mhd_thrid_party/src/main/resources/bootstrap.yml index 2a05ef307..a922ae813 100644 --- a/mhd_thrid_party/src/main/resources/bootstrap.yml +++ b/mhd_thrid_party/src/main/resources/bootstrap.yml @@ -18,13 +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: 10.33.0.129:6010 config: - server-addr: 127.0.0.1:8848 +# server-addr: 127.0.0.1:8848 # 线上测试环境配置 容器名+端口号 - #server-addr: mhd-nacos:8848 + server-addr: 10.33.0.129:6010 group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置 file-extension: yml #默认properties # 共享配置 diff --git a/mhd_transport/Dockerfile b/mhd_transport/Dockerfile index 7c47729ae..84f389e73 100644 --- a/mhd_transport/Dockerfile +++ b/mhd_transport/Dockerfile @@ -1,5 +1,5 @@ # 基础镜像 -FROM kdvolder/jdk8 +FROM arm64v8/openjdk:8 # author MAINTAINER manhuoda #指定东八区时区 @@ -10,7 +10,7 @@ ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8" # 其效果是在主机 /var/lib/docker 目录下创建了一个临时文件,并链接到容器的/tmp VOLUME /tmp #将当前mhd_transport.jar 复制到容器根目录下 -ADD mhd_transport.jar mhd_transport.jar +ADD target/mhd_transport.jar mhd_transport.jar #暴露容器端口 Docker镜像告知Docker宿主机应用监听了端口 EXPOSE 8006 # 运行jar包 diff --git a/mhd_transport/pom.xml b/mhd_transport/pom.xml index 325a1dce5..1c550a5cc 100644 --- a/mhd_transport/pom.xml +++ b/mhd_transport/pom.xml @@ -74,9 +74,14 @@ mhd-common-redis - + + + com.dameng + DmJdbcDriver18 + 8.1.1.193 @@ -150,4 +155,17 @@ + + + mhd_transport + + + + com.spotify + dockerfile-maven-plugin + + + + + diff --git a/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/command/CreateMaterialCommand.java b/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/command/CreateMaterialCommand.java index b2d17df81..29eadb406 100644 --- a/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/command/CreateMaterialCommand.java +++ b/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/command/CreateMaterialCommand.java @@ -1,5 +1,6 @@ package com.linke.transport.application.service.warehouse.material.command; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; @@ -25,6 +26,7 @@ public class CreateMaterialCommand { private String name; @ApiModelProperty(value = "物料型号") + @TableField("\"MODEL\"") // 字段名转义 private String model; @NotBlank(message = "物料单位不能为空") diff --git a/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/command/UpdateMaterialCommand.java b/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/command/UpdateMaterialCommand.java index d393e4118..8d513ac30 100644 --- a/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/command/UpdateMaterialCommand.java +++ b/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/command/UpdateMaterialCommand.java @@ -1,5 +1,6 @@ package com.linke.transport.application.service.warehouse.material.command; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; @@ -24,6 +25,7 @@ public class UpdateMaterialCommand { @ApiModelProperty(value = "物料名称") private String name; @ApiModelProperty(value = "物料型号") + @TableField("\"MODEL\"") // 字段名转义 private String model; @ApiModelProperty(value = "物料单位") private String unit; diff --git a/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/query/MaterialQueryCommand.java b/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/query/MaterialQueryCommand.java index d1d28e9e5..c55028e91 100644 --- a/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/query/MaterialQueryCommand.java +++ b/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/query/MaterialQueryCommand.java @@ -1,5 +1,6 @@ package com.linke.transport.application.service.warehouse.material.query; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -17,6 +18,7 @@ public class MaterialQueryCommand { @ApiModelProperty(name = "名称") private String name; @ApiModelProperty(name = "型号") + @TableField("\"MODEL\"") // 字段名转义 private String model; @ApiModelProperty("物料编码") private String materialCode; diff --git a/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/vo/MaterialVO.java b/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/vo/MaterialVO.java index c77c8d87b..85fee3a81 100644 --- a/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/vo/MaterialVO.java +++ b/mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/vo/MaterialVO.java @@ -1,5 +1,6 @@ package com.linke.transport.application.service.warehouse.material.vo; +import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; @@ -24,6 +25,7 @@ public class MaterialVO{ @ApiModelProperty("名称") private String name; @ApiModelProperty("型号") + @TableField("\"MODEL\"") // 字段名转义 private String model; @ApiModelProperty("单位") private String unit; diff --git a/mhd_transport/src/main/java/com/linke/transport/domain/warehouse/material/model/Material.java b/mhd_transport/src/main/java/com/linke/transport/domain/warehouse/material/model/Material.java index 151deb94f..ead5426f8 100644 --- a/mhd_transport/src/main/java/com/linke/transport/domain/warehouse/material/model/Material.java +++ b/mhd_transport/src/main/java/com/linke/transport/domain/warehouse/material/model/Material.java @@ -1,5 +1,6 @@ package com.linke.transport.domain.warehouse.material.model; +import com.baomidou.mybatisplus.annotation.TableField; import com.linke.transport.domain.warehouse.material.MaterialCodeGenerator; import com.linke.transport.domain.warehouse.material.exception.MaterialDomainException; import com.mhd.common.core.utils.StringUtils; @@ -20,8 +21,10 @@ public class Material { private Long ownerId; private String category; private String name; + @TableField("\"MODEL\"") // 字段名转义 private String model; private String unit; + @TableField("\"VALUE\"") // 字段名转义 private BigDecimal value; private boolean codeManaged; private String remark; diff --git a/mhd_transport/src/main/java/com/linke/transport/infrastructure/config/CamelCaseMapPlugin.java b/mhd_transport/src/main/java/com/linke/transport/infrastructure/config/CamelCaseMapPlugin.java new file mode 100644 index 000000000..ef791c4bc --- /dev/null +++ b/mhd_transport/src/main/java/com/linke/transport/infrastructure/config/CamelCaseMapPlugin.java @@ -0,0 +1,57 @@ +package com.linke.transport.infrastructure.config; + +import com.linke.transport.infrastructure.util.CamelCaseUtils; +import org.apache.ibatis.executor.resultset.ResultSetHandler; +import org.apache.ibatis.plugin.*; +import org.springframework.stereotype.Component; + +import java.sql.Statement; +import java.util.List; +import java.util.Map; +import java.util.Properties; + +/** + * MyBatis插件:拦截Map类型结果,转换Key为驼峰 + */ +@Intercepts({@Signature( + type = ResultSetHandler.class, + method = "handleResultSets", + args = {Statement.class} +)}) +@Component +public class CamelCaseMapPlugin implements Interceptor { + + @Override + public Object intercept(Invocation invocation) throws Throwable { + // 执行原方法获取结果 + Object result = invocation.proceed(); + // 处理结果:如果是List且元素是Map,转换Key + if (result instanceof List) { + List> list = (List>) result; + for (int i = 0; i < list.size(); i++) { + Object item = list.get(i); + if (item instanceof Map) { + @SuppressWarnings("unchecked") + Map map = (Map) item; + // 转换Key为驼峰 + list.set(i, CamelCaseUtils.convertMapKeyToCamel(map)); + } + } + } + return result; + } + + @Override + public Object plugin(Object target) { + // 只拦截ResultSetHandler类型 + if (target instanceof ResultSetHandler) { + return Plugin.wrap(target, this); + } + return target; + } + + @Override + public void setProperties(Properties properties) { + // 可配置参数,此处无需处理 + } +} \ No newline at end of file diff --git a/mhd_transport/src/main/java/com/linke/transport/infrastructure/util/CamelCaseUtils.java b/mhd_transport/src/main/java/com/linke/transport/infrastructure/util/CamelCaseUtils.java new file mode 100644 index 000000000..90cc892e2 --- /dev/null +++ b/mhd_transport/src/main/java/com/linke/transport/infrastructure/util/CamelCaseUtils.java @@ -0,0 +1,54 @@ +package com.linke.transport.infrastructure.util; + +import org.apache.commons.lang3.StringUtils; + +import java.util.HashMap; +import java.util.Map; + +/** + * 字符串工具类扩展:下划线/大写转驼峰 + */ +public class CamelCaseUtils { + + /** + * 大写下划线转驼峰(如:USER_NAME → userName) + */ + public static String toCamelCase(String str) { + if (StringUtils.isBlank(str)) { + return str; + } + // 先转小写,再处理下划线 + str = str.toLowerCase(); + StringBuilder sb = new StringBuilder(); + boolean nextUpperCase = false; + for (int i = 0; i < str.length(); i++) { + char c = str.charAt(i); + if (c == '_') { + nextUpperCase = true; + } else { + if (nextUpperCase) { + sb.append(Character.toUpperCase(c)); + nextUpperCase = false; + } else { + sb.append(c); + } + } + } + return sb.toString(); + } + + /** + * 批量转换Map的Key为驼峰 + */ + public static Map convertMapKeyToCamel(Map map) { + if (map == null || map.isEmpty()) { + return map; + } + Map newMap = new HashMap<>(map.size()); + for (Map.Entry entry : map.entrySet()) { + String camelKey = toCamelCase(entry.getKey()); + newMap.put(camelKey, entry.getValue()); + } + return newMap; + } +} \ No newline at end of file diff --git a/mhd_transport/src/main/java/com/linke/transport/infrastructure/warehouse/material/persistence/MaterialDO.java b/mhd_transport/src/main/java/com/linke/transport/infrastructure/warehouse/material/persistence/MaterialDO.java index 7e999f70e..17a85d872 100644 --- a/mhd_transport/src/main/java/com/linke/transport/infrastructure/warehouse/material/persistence/MaterialDO.java +++ b/mhd_transport/src/main/java/com/linke/transport/infrastructure/warehouse/material/persistence/MaterialDO.java @@ -21,6 +21,7 @@ public class MaterialDO { private Long ownerId; private String category; private String name; + @TableField("\"MODEL\"") // 字段名转义 private String model; private String unit; private BigDecimal value; diff --git a/mhd_transport/src/main/resources/bootstrap.yml b/mhd_transport/src/main/resources/bootstrap.yml index 8599d2f67..464240e6c 100644 --- a/mhd_transport/src/main/resources/bootstrap.yml +++ b/mhd_transport/src/main/resources/bootstrap.yml @@ -18,13 +18,15 @@ spring: cloud: nacos: discovery: - server-addr: 127.0.0.1:8848 +# server-addr: 127.0.0.1:8848 # 线上测试环境配置使用ip+端口号 - #server-addr: 10.33.0.129:6000 +# server-addr: 10.33.0.129:6010r + server-addr: 10.33.0.129:6010 config: - server-addr: 127.0.0.1:8848 +# server-addr: 127.0.0.1:8848 # 线上测试环境配置使用ip+端口号 - #server-addr: 10.33.0.129:6000 +# server-addr: 10.33.0.129:6010 + server-addr: 10.33.0.129:6010 group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置 file-extension: yml #默认properties # 共享配置 diff --git a/mhd_transport/src/main/resources/mapper/inventory/InventoryMapper.xml b/mhd_transport/src/main/resources/mapper/inventory/InventoryMapper.xml index cd6261d26..ad43e907e 100644 --- a/mhd_transport/src/main/resources/mapper/inventory/InventoryMapper.xml +++ b/mhd_transport/src/main/resources/mapper/inventory/InventoryMapper.xml @@ -33,12 +33,12 @@ i.material_id, m.category AS material_category, m.name AS material_name, - m.model AS material_model, + m."MODEL" AS material_model, i.quantity, m.unit, m.weight, m.code_managed, - m.value, + m."VALUE", i.machine_serial_no, i.created_at FROM @@ -91,7 +91,7 @@ i.material_id, m.category AS material_category, m.name AS material_name, - m.model AS material_model, + m."MODEL" AS material_model, i.quantity, m.unit, m.weight, diff --git a/pom.xml b/pom.xml index 387dc574c..0aa436c21 100644 --- a/pom.xml +++ b/pom.xml @@ -43,6 +43,30 @@ 2.13.2 3.16.2 2.7.3 + + + 3.12.0 + 3.1.0 + 3.1.0 + 1.4.13 + + 3.2.12 + 2023.0.3 + 2023.0.1.2 + + + 3.5.6 + 2.1.0 + + + 4.5.14 + 3.0.5 + 1.78 + 4.4.0 + 2.16.0 + 8.5.2 + 1.0.23 + @@ -286,7 +310,7 @@ - + @@ -334,6 +358,104 @@ + + + + src/main/resources + true + + + + + src/test/resources + true + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${plugin.maven.compiler.version} + + ${java.version} + ${java.version} + utf-8 + + + + org.apache.maven.plugins + maven-resources-plugin + ${plugin.maven.resources.version} + + UTF-8 + + + + org.apache.maven.plugins + maven-source-plugin + ${plugin.maven.source.version} + + + attach-sources + verify + + jar-no-fork + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + + package + + repackage + + + + + true + + + + com.spotify + dockerfile-maven-plugin + 1.4.10 + + + default + + build + + + + + ${project.build.finalName} + ${project.version} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + org.apache.maven.plugins + maven-resources-plugin + + + org.apache.maven.plugins + maven-source-plugin + + + + diff --git a/sql/20251106_user.sql b/sql/20251106_user.sql index 37a7a7c61..1e564d568 100644 --- a/sql/20251106_user.sql +++ b/sql/20251106_user.sql @@ -1,3 +1,11 @@ alter table user ADD COLUMN `validity_period_management` int DEFAULT 0 COMMENT '有效期管理 0-否 1-是'; - =====================================截止2025-11-14 正式数据库已同步完成================================ \ No newline at end of file + =====================================截止2025-11-14 正式数据库已同步完成================================ + +------nc对接20251128 + + alter table user ADD COLUMN `salesperson_nc_code` varchar(255) DEFAULT NULL COMMENT '业务员nc编码'; + +alter table user ADD COLUMN `document_preparer_nc_code` varchar(255) DEFAULT NULL COMMENT '制单员nc编码'; + + alter table user_shipper ADD COLUMN `customer_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; + + + + +