Merge remote-tracking branch 'refs/remotes/origin/dev' into nanguangmall

This commit is contained in:
赵辉
2025-12-10 09:28:06 +08:00
158 changed files with 4032 additions and 324 deletions
@@ -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);
}
@@ -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<Boolean> deleteBusinessDocumentDetail(@RequestBody BusinessDocumentDetaliDTO businessDocumentDetaliDTO);
@ApiOperation(value = "查询对账单对应的订单", notes = "查询对账单对应的订单")
@PostMapping(value = "/feign/outBoundSummary/getOrderListByReconciliation")
public R<List<TmsOrder>> getOrderListByReconciliation(@RequestBody ReconciliationDTO reconciliationDTO);
}
@@ -162,6 +162,13 @@ public class RemoteUserFeignFallbackFactory implements FallbackFactory<UserServi
public R<LoginUser> getUserByTopOrganizationUserPhone(@RequestBody UserDTO userDTO, String source) {
return R.fail("获取组织用户失败:" + throwable.getMessage());
}
@Override
public AjaxResult<?> getShipperSummaryData(Long userId) {
return AjaxResult.error("查询失败" + throwable.getMessage());
}
};
}
}
@@ -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<WlhyServiceFei
res.setCode(R.FAIL);
return res;
}
@Override
public R<List<TmsOrder>> getOrderListByReconciliation(ReconciliationDTO reconciliationDTO) {
R<List<TmsOrder>> res = new R<>();
res.setMsg("查询失败"+cause.getMessage());
res.setCode(R.FAIL);
return res;
}
};
}
}
+3 -2
View File
@@ -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"]
+14
View File
@@ -85,4 +85,18 @@
</plugins>
</build>
<profiles>
<profile>
<id>mhd-auth</id>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
+4 -4
View File
@@ -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
# 共享配置
@@ -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";
@@ -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;
}
@@ -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;
}
@@ -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;
}
@@ -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<SKitem> item;
}
@@ -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;
}
@@ -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;
}
@@ -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;
}
@@ -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;
}
@@ -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<Ysitem> item;
}
@@ -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;
}
@@ -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;
}
@@ -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 = "配载方式ID0-数量,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;
}
@@ -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;
}
@@ -206,4 +206,7 @@ public class UserShipperPo {
private Integer monthlySettlementFlag;
@ApiModelProperty(name = "货源单自动审核(1-是 2-否)")
private Integer isAutoAuditOrder;
@ApiModelProperty(name = "客户nc编码")
private String customerNcCode;
}
+2 -2
View File
@@ -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包
+16
View File
@@ -127,4 +127,20 @@
</plugins>
</build>
<profiles>
<profile>
<id>mhd-gateway</id>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
+6 -4
View File
@@ -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
# 共享配置
+2 -2
View File
@@ -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包
+21 -1
View File
@@ -54,9 +54,14 @@
</dependency>
<!-- Mysql Connector -->
<dependency>
<!--<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>-->
<dependency>
<groupId>com.dameng</groupId>
<artifactId>DmJdbcDriver18</artifactId>
<version>8.1.1.193</version>
</dependency>
<!-- Mhd Common DataSource -->
@@ -143,4 +148,19 @@
</plugins>
</build>
<profiles>
<profile>
<id>mhd-modules-system</id>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -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<Map<String, Object>> list = (List<Map<String, Object>>) result;
for (int i = 0; i < list.size(); i++) {
Object item = list.get(i);
if (item instanceof Map<?, ?>) {
@SuppressWarnings("unchecked")
Map<String, Object> map = (Map<String, Object>) 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) {
// 可配置参数,此处无需处理
}
}
@@ -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 <V> Map<String, V> convertMapKeyToCamel(Map<String, V> map) {
if (map == null || map.isEmpty()) {
return map;
}
Map<String, V> newMap = new HashMap<>(map.size());
for (Map.Entry<String, V> entry : map.entrySet()) {
String camelKey = toCamelCase(entry.getKey());
newMap.put(camelKey, entry.getValue());
}
return newMap;
}
}
@@ -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
# 共享配置
@@ -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
</sql>
@@ -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
<include refid="common_where"></include>
</select>
@@ -71,7 +71,7 @@
city_name,
city_remark
FROM
`sys_city`
sys_city
WHERE
province_code = #{values}
ORDER BY
@@ -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
</sql>
@@ -43,7 +43,7 @@
a.update_by_name,
a.del_flag
FROM
`sys_county` a
sys_county a
WHERE
a.del_flag = 1
<include refid="common_where"></include>
@@ -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
</select>
@@ -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
@@ -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
</sql>
@@ -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
<include refid="common_where"></include>
</select>
@@ -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
@@ -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
</sql>
@@ -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
@@ -170,7 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
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)
@@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectMaterialClassifyPo">
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
</sql>
<sql id="selectMaterialClassifyPo1">
@@ -47,10 +47,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and code = #{code}
</if>
<if test="name != null and name != ''">
and `name` like concat('%', #{name}, '%')
and name like concat('%', #{name}, '%')
</if>
<if test="level != null ">
and `level` = #{level}
and level = #{level}
</if>
<if test="parentCode != null and parentCode != ''">
and parent_code = #{parentCode}
@@ -93,6 +93,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectMaterialClassifyPo"/>
WHERE
FIND_IN_SET(#{parentCode}, code_path) > 0
ORDER BY `level` ASC
ORDER BY level ASC
</select>
</mapper>
@@ -82,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and update_by_name like concat('%', #{updateByName}, '%')
</if>
<if test="number != null">
and `number` = #{number}
and number = #{number}
</if>
<if test="remark != null and remark != ''">
and remark like concat('%',#{remark},'%')
@@ -29,7 +29,7 @@
</resultMap>
<sql id="selectMenuVo">
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
</sql>
@@ -54,13 +54,13 @@
</select>
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
order by m.parent_id, m.order_num
</select>
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type,m.sys_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type,m.sys_type, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
@@ -82,7 +82,7 @@
</select>
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
@@ -151,7 +151,7 @@
<if test="orderNum != null">order_num = #{orderNum},</if>
<if test="path != null and path != ''">path = #{path},</if>
<if test="component != null">component = #{component},</if>
<if test="query != null">`query` = #{query},</if>
<if test="query != null">query = #{query},</if>
<if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if>
<if test="isCache != null and isCache != ''">is_cache = #{isCache},</if>
<if test="menuType != null and menuType != ''">menu_type = #{menuType},</if>
@@ -174,7 +174,7 @@
<if test="orderNum != null">order_num,</if>
<if test="path != null and path != ''">path,</if>
<if test="component != null and component != ''">component,</if>
<if test="query != null and query != ''">`query`,</if>
<if test="query != null and query != ''">query,</if>
<if test="isFrame != null and isFrame != ''">is_frame,</if>
<if test="isCache != null and isCache != ''">is_cache,</if>
<if test="menuType != null and menuType != ''">menu_type,</if>
@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.accounting_id,
a.charge_amount,
a.tenant_phone,
a.`status`,
a.status,
a.del_flag,
a.create_by,
a.create_time,
+2 -7
View File
@@ -1,16 +1,11 @@
# 基础镜像
FROM kdvolder/jdk8
# author
MAINTAINER manhuoda
FROM arm64v8/openjdk:8
#指定东八区时区
ENV TZ Asia/Shanghai
#指定utf-8编码格
ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8"
# VOLUME 指定了临时文件目录为/tmp。
# 其效果是在主机 /var/lib/docker 目录下创建了一个临时文件,并链接到容器的/tmp
VOLUME /tmp
#将当前jar 复制到容器根目录下
ADD mhd-user-center.jar mhd-user-center.jar
ADD target/mhd-user-center.jar mhd-user-center.jar
#暴露容器端口 Docker镜像告知Docker宿主机应用监听了端口
EXPOSE 8007
# 运行jar包
+20 -1
View File
@@ -93,9 +93,14 @@
<!-- <version>5.1.47</version>&lt;!&ndash;依据自己本地数据库的版本进行跳转 &ndash;&gt;-->
<!-- </dependency>-->
<!-- Mysql Connector -->
<dependency>
<!--<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>-->
<dependency>
<groupId>com.dameng</groupId>
<artifactId>DmJdbcDriver18</artifactId>
<version>8.1.1.193</version>
</dependency>
<!--import mybatis plus 它会自动引入mybatis及mybatis spring切勿重复引用以免冲突-->
<dependency>
@@ -169,4 +174,18 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>mhd-user-center</id>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -19,6 +19,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -39,6 +40,7 @@ public class AgentSignApplicationService {
@Resource
private ThirdPartyServiceFeign thirdPartyServiceFeign;
@Lazy
@Autowired
private MotorcadeCollectionApplicationService motorcadeCollectionApplicationService;
// @Autowired
@@ -36,6 +36,7 @@ import com.mhd.user.interfaces.dto.MotorcadeCollectionDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@@ -56,6 +57,7 @@ import java.util.Map;
public class MotorcadeCollectionApplicationService {
@Autowired
private MotorcadeCollectionDomainService motorcadeCollectionDomainService;
@Lazy
@Autowired
private AgentSignApplicationService agentSignApplicationService;
@Autowired
@@ -32,6 +32,7 @@ import com.mhd.user.domain.roleAggregate.service.RoleDomainService;
import com.mhd.user.domain.userAggregate.entity.UserRoleEntity;
import com.mhd.user.domain.userAggregate.entity.UserShipperEntity;
import com.mhd.user.domain.userAggregate.event.ShipperEventPublisher;
import com.mhd.user.domain.userAggregate.repository.po.UserDriverPo;
import com.mhd.user.domain.userAggregate.repository.todo.*;
import com.mhd.user.domain.userAggregate.service.*;
import com.mhd.user.infrastructure.feign.ProductServiceFeign;
@@ -1022,4 +1023,9 @@ public class UserShipperApplicationService {
public SettlementInfoQueryVo getSettlementInfoByUserId(Long userId) {
return userShipperDomainService.getSettlementInfoByUserId(userId);
}
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId) {
return userShipperDomainService.getShipperSummaryData(userId);
}
}
@@ -56,6 +56,6 @@ public interface MotorcadeMapper extends BaseMapper<Motorcade>
List<UserDriverPo> fleetInviteDriverList(@Param("motorcadeDriverDO") MotorcadeDriverDO motorcadeDriverDO);
@Select("SELECT m.* FROM `motorcade_driver` md LEFT JOIN motorcade m ON md.motorcade_id = m.motorcade_id WHERE md.del_flag = 1 AND m.del_flag = 1 AND md.user_id = #{userId} AND m.motorcade_header_id != #{userId}")
@Select("SELECT m.* FROM motorcade_driver md LEFT JOIN motorcade m ON md.motorcade_id = m.motorcade_id WHERE md.del_flag = 1 AND m.del_flag = 1 AND md.user_id = #{userId} AND m.motorcade_header_id != #{userId}")
List<MotorcadePo> getAllOtherMotorcade(@Param("userId") Long userId);
}
@@ -37,6 +37,6 @@ public interface MotorcadeRecordMapper extends BaseMapper<MotorcadeRecord>
*/
List<MotorcadeRecordPo> invitationRecordListPC(@Param("motorcadeRecordDo")MotorcadeRecordDO motorcadeRecordDo);
@Select("SELECT * FROM `motorcade_record` WHERE del_flag = 1 AND motorcade_id IN (SELECT motorcade_id FROM motorcade WHERE del_flag = 1 and motorcade_header_id = #{userId})")
@Select("SELECT * FROM motorcade_record WHERE del_flag = 1 AND motorcade_id IN (SELECT motorcade_id FROM motorcade WHERE del_flag = 1 and motorcade_header_id = #{userId})")
List<MotorcadeRecord> getByMotorHeaderId(@Param("userId") Long userId);
}
@@ -12,7 +12,7 @@ import java.util.List;
public interface CustomAuthUserMapper extends BaseMapper<CustomAuthUserEntity> {
List<CustomAuthRoleOrUserPO> getCustomAuthByRoleOrUserId(CustomAuthDO customAuthDO);
@Select("SELECT * FROM `custom_auth_role` WHERE role_id IN (SELECT role_id FROM user_role WHERE user_id = #{userId})")
@Select("SELECT * FROM custom_auth_role WHERE role_id IN (SELECT role_id FROM user_role WHERE user_id = #{userId})")
List<CustomAuthRoleOrUserPO> getCustomAuthByRole(@Param("userId") Long userId);
void deleteCustomAuthUserByUserId(CustomAuthDO customAuthDO);
@@ -14,7 +14,7 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("user")
@TableName("\"USER\"")
public class UserEntity extends BaseVOEntity {
@ApiModelProperty(name = "用户ID")
@@ -159,4 +159,10 @@ public class UserEntity extends BaseVOEntity {
@ApiModelProperty(name = "有效期管理 0-否 1-是")
private Integer validityPeriodManagement;
@ApiModelProperty(name = "业务员nc编码")
private String salespersonNcCode;
@ApiModelProperty(name = "制单员nc编码")
private String documentPreparerNcCode;
}
@@ -191,4 +191,7 @@ public class UserShipperEntity extends BaseVOEntity {
private BigDecimal authorizedUsedAmount;
private String remark;
@ApiModelProperty(name = "客户nc编码")
private String customerNcCode;
}
@@ -58,4 +58,6 @@ public interface UserShipperRepositoryInterface extends IService<UserShipperEnti
SettlementInfoQueryVo getAuthorizedAmountByShipperId(Long shipperId);
SettlementInfoQueryVo getSettlementInfoByUserId(Long userId);
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId);
}
@@ -37,6 +37,6 @@ public interface DriverVehicleBindMapper extends BaseMapper<DriverVehicleBind>
*/
List<VehicleDriverBindAppPo> queryVehicleBindInfo(@Param("driverVehicleBindDo") DriverVehicleBindDo driverVehicleBindDo);
@Select("SELECT count(driver_vehicle_bind_id) FROM `driver_vehicle_bind` WHERE (user_id = #{userId} OR driver_bind_id = #{userId}) AND del_flag = 1 ")
@Select("SELECT count(driver_vehicle_bind_id) FROM driver_vehicle_bind WHERE (user_id = #{userId} OR driver_bind_id = #{userId}) AND del_flag = 1 ")
Integer selectByUserId(@Param("userId") Long userId);
}
@@ -51,7 +51,7 @@ public interface UserMapper extends BaseMapper<UserEntity> {
List<UserDriverEnterprisePo> getAllDriverByOrganization(@Param("topOrganizationId") Long topOrganizationId);
@Select("SELECT COUNT(*) FROM `user` WHERE del_flag = 1 AND create_by = #{userId} AND user_id != #{userId}")
@Select("SELECT COUNT(*) FROM \"USER\" WHERE del_flag = 1 AND create_by = #{userId} AND user_id != #{userId}")
Integer selectCreatByUserId(@Param("userId") Long userId);
@@ -64,7 +64,7 @@ public interface UserMapper extends BaseMapper<UserEntity> {
*/
List<UserAppPo> selectAppUserListByRoleCode(UserDO userDO);
@Select("SELECT * FROM `user` WHERE del_flag = 1 AND organization_id = #{organizationId} AND user_account_type = 3 limit 1")
@Select("SELECT * FROM \"USER\" WHERE del_flag = 1 AND organization_id = #{organizationId} AND user_account_type = 3 limit 1")
UserEntity selectByTopOrganizationId(@Param("organizationId") Long organizationId);
@@ -26,4 +26,6 @@ public interface UserShipperMapper extends BaseMapper<UserShipperEntity> {
List<UserShipperEntity> getChooseShipper(@Param("userIdList") List<Long> userIdList);
List<UserShipperEntity> selectBySealId(@Param("userShipperEntity") UserShipperEntity userShipperEntity);
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId);
}
@@ -161,4 +161,9 @@ public class UserShipperRepositoryImpl extends ServiceImpl<UserShipperMapper, Us
BeanUtils.copyProperties(entity, queryVo);
return queryVo;
}
@Override
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId) {
return shipperMapper.getShipperSummaryData(userId);
}
}
@@ -254,4 +254,7 @@ public class UserShipperPo implements Serializable {
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(name = "客户nc编码")
private String customerNcCode;
}
@@ -248,4 +248,10 @@ public class UserDO extends BaseVOEntity {
@ApiModelProperty(name = "有效期管理 0-否 1-是")
private Integer validityPeriodManagement;
@ApiModelProperty(name = "业务员nc编码")
private String salespersonNcCode;
@ApiModelProperty(name = "制单员nc编码")
private String documentPreparerNcCode;
}
@@ -225,4 +225,7 @@ public class UserShipperDO extends UserDO {
private Integer freightNode;
private String remark;
@ApiModelProperty(name = "客户nc编码")
private String customerNcCode;
}
@@ -223,4 +223,8 @@ public class UserShipperDomainService {
public SettlementInfoQueryVo getSettlementInfoByUserId(Long userId) {
return userShipperRepositoryInterface.getSettlementInfoByUserId(userId);
}
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId) {
return userShipperRepositoryInterface.getShipperSummaryData(userId);
}
}
@@ -0,0 +1,57 @@
package com.mhd.user.infrastructure.config;
import com.mhd.user.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<Map<String, Object>> list = (List<Map<String, Object>>) result;
for (int i = 0; i < list.size(); i++) {
Object item = list.get(i);
if (item instanceof Map<?, ?>) {
@SuppressWarnings("unchecked")
Map<String, Object> map = (Map<String, Object>) 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) {
// 可配置参数此处无需处理
}
}
@@ -0,0 +1,54 @@
package com.mhd.user.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 <V> Map<String, V> convertMapKeyToCamel(Map<String, V> map) {
if (map == null || map.isEmpty()) {
return map;
}
Map<String, V> newMap = new HashMap<>(map.size());
for (Map.Entry<String, V> entry : map.entrySet()) {
String camelKey = toCamelCase(entry.getKey());
newMap.put(camelKey, entry.getValue());
}
return newMap;
}
}
@@ -235,4 +235,10 @@ public class UserDTO extends BaseVOEntity {
@ApiModelProperty(name = "有效期管理 0-否 1-是")
private Integer validityPeriodManagement;
@ApiModelProperty("业务员nc编码")
private String salespersonNcCode;
@ApiModelProperty( "制单员nc编码")
private String documentPreparerNcCode;
}
@@ -191,4 +191,7 @@ public class UserShipperDTO extends UserDTO {
@ApiModelProperty(name = "备注信息")
private String remark;
@ApiModelProperty("客户nc编码")
private String customerNcCode;
}
@@ -199,4 +199,10 @@ public class UserShipperAPI extends BaseController {
SettlementInfoQueryVo infoQueryVo = userShipperApplicationService.getSettlementInfoByUserId(userId);
return R.ok(infoQueryVo);
}
@ApiOperation("查询委托方汇总数据")
@GetMapping("/getShipperSummaryData/{userId}")
public AjaxResult<?> getShipperSummaryData(@PathVariable Long userId) {
return AjaxResult.success(userShipperApplicationService.getShipperSummaryData(userId));
}
}
@@ -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: 127.0.0.1:8848
# 线上测试环境配置 容器名+端口号
#server-addr: mhd-nacos:8848
server-addr: 10.33.0.129:6010
# server-addr: 116.204.23.92:8848
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
file-extension: yml #默认properties
# 共享配置
@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.update_by,
a.update_by_name
FROM
`custom_auth_role` a
custom_auth_role a
WHERE
a.del_flag = 1
</sql>
@@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="deleteCustomAuthRoleByRoleId" parameterType="com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO">
DELETE
FROM
`custom_auth_role` a
custom_auth_role a
WHERE
a.del_flag = 1
<include refid="common_where"/>
@@ -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
</sql>
@@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="deleteCustomAuthUserByUserId" parameterType="com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO">
DELETE
FROM
`custom_auth_user` a
custom_auth_user a
WHERE
a.del_flag = 1
<include refid="common_where"/>
@@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.createTime,
a.user_id
FROM
( SELECT MAX( create_time ) createTime, user_id FROM `driver_current_position` GROUP BY user_id ) a
( SELECT MAX( create_time ) createTime, user_id FROM driver_current_position GROUP BY user_id ) a
) u
WHERE
u.excTime = 1
@@ -82,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
address,
license_plate
FROM
`driver_current_position`
driver_current_position
WHERE
create_Time >= #{time}
AND license_plate IS NOT NULL
@@ -96,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
address,
license_plate
FROM
`driver_current_position`
driver_current_position
WHERE
create_Time <![CDATA[<]]> #{time}
AND license_plate IS NOT NULL
@@ -108,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.user_name,
b.user_phone
FROM driver_current_position a
left join user b on a.user_id = b.user_id
left join "USER" b on a.user_id = b.user_id
WHERE license_plate = #{licensePlate}
ORDER BY create_by DESC
LIMIT 1
@@ -48,9 +48,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
u.user_name AS userName,
u.user_phone AS userPhone
FROM
`driver_vehicle_bind` b
driver_vehicle_bind b
LEFT JOIN
`user` u
"USER" u
ON b.user_id = u.user_id
WHERE
vehicle_id = #{values}
@@ -66,8 +66,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.vehicle_id,
b.vehicle_license_plate_number
FROM
`driver_vehicle_bind` b
LEFT JOIN `user` u ON b.driver_bind_id = u.user_id
driver_vehicle_bind b
LEFT JOIN "USER" u ON b.driver_bind_id = u.user_id
WHERE
b.del_flag = 1
<include refid="where_two"></include>
@@ -7,7 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT
d.motorcade_id
FROM
`motorcade` d
motorcade d
WHERE
d.del_flag = 1 AND
d.motorcade_header_id = #{values}
@@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.user_id,
b.create_by
FROM
`motorcade_driver` a
motorcade_driver a
left join user_driver b on a.user_id = b.user_id
WHERE
a.del_flag = 1
@@ -149,7 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
u.user_id,
COUNT(b.vehicle_id) AS vehicle_num
FROM
`user_driver` u
user_driver u
LEFT JOIN
driver_vehicle_bind b
ON u.user_id = b.driver_bind_id and b.del_flag = 1
@@ -254,12 +254,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
m.*,
COUNT( d.user_id ) AS driver_num,
SUM( dvb.vehicle_num ) AS vehicle_num,
GROUP_CONCAT(d.user_id) AS userIds,
WM_CONCAT(d.user_id) AS userIds,
u.user_phone
FROM
motorcade m
LEFT JOIN motorcade_driver d ON m.motorcade_id = d.motorcade_id AND d.del_flag = 1
LEFT JOIN `user` u ON u.user_id = m.motorcade_header_id
LEFT JOIN "USER" u ON u.user_id = m.motorcade_header_id
LEFT JOIN (
SELECT
u.user_id,
@@ -312,7 +312,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mc.file_id,
mc.agreement_url_pdf
from motorcade_driver md
left join user u on md.user_id = u.user_id and u.del_flag = 1
left join "USER" u on md.user_id = u.user_id and u.del_flag = 1
left join user_driver ud on ud.user_id = md.user_id and ud.del_flag = 1
left join driver_vehicle_bind dvb
on md.user_id = dvb.driver_bind_id and dvb.del_flag = 1
@@ -332,10 +332,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ud.*,
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
LEFT JOIN (SELECT
user_id,
GROUP_CONCAT( DISTINCT r.role_code SEPARATOR '&amp;' ) roleCode
LISTAGG(DISTINCT r.role_code, '&amp;') WITHIN GROUP(ORDER BY r.role_code) AS roleCode
FROM
role r
LEFT JOIN user_role ur ON r.role_id = ur.role_id
@@ -103,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
motorcade_record mr
LEFT JOIN user_driver ud ON mr.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 driver_vehicle_bind dvb ON dvb.user_id = mr.user_id
AND dvb.del_flag = 1
WHERE
@@ -136,7 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mr.motorcade_id,
mr.motorcade_name
FROM motorcade_record mr
LEFT JOIN `user` u ON mr.user_id = u.user_id
LEFT JOIN "USER" u ON mr.user_id = u.user_id
LEFT JOIN driver_vehicle_bind dvb ON dvb.driver_bind_id = mr.user_id AND dvb.default_flag = 1
AND dvb.del_flag = 1
WHERE mr.del_flag = 1
@@ -15,7 +15,7 @@
a.role_remark,
a.role_data_scope,
a.role_status
FROM `role` a
FROM role a
WHERE a.del_flag = 1
</sql>
@@ -44,9 +44,9 @@
a.role_grade,
COUNT(DISTINCT u.user_id) roleUserCount
FROM
`role` a
role a
LEFT JOIN user_role b on a.role_id = b.role_id
left join user u on b.user_id = u.user_id and u.del_flag = 1
left join "USER" u on b.user_id = u.user_id and u.del_flag = 1
WHERE
a.del_flag = 1
<include refid="common_where"></include>
@@ -67,7 +67,7 @@
a.role_data_scope,
a.role_status
FROM
`role` a
role a
WHERE
a.del_flag=1
<include refid="common_where"></include>
@@ -86,7 +86,7 @@
a.role_remark,
a.role_data_scope,
a.role_status
FROM `role` a
FROM role a
WHERE a.role_id = #{value}
</select>
<select id="selectByRoleId" parameterType="com.mhd.common.core.domain.po.RolePO"
@@ -159,7 +159,7 @@
<!-- 根据组织ID物理删除角色 -->
<select id="deleteByOrganizationId" parameterType="java.lang.Long">
DELETE
FROM `role` a
FROM role a
WHERE a.del_flag = 1
and a.organization_id = #{value}
</select>
@@ -167,9 +167,9 @@
<!-- 根据IDs合集查询角色名称 -->
<select id="findRoleNameByRoleIds" parameterType="java.lang.Long" resultType="java.lang.String">
SELECT
GROUP_CONCAT( a.role_name SEPARATOR ';' ) AS roleName
LISTAGG(DISTINCT a.role_name, ';') WITHIN GROUP(ORDER BY a.role_name) AS roleName
FROM
`role` a
role a
WHERE
a.del_flag = 1
AND a.role_id IN
@@ -10,7 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.role_id,
a.menu_id
FROM
`role_menu` a
role_menu a
WHERE
a.del_flag = 1
</sql>
@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="removeByRoleId" parameterType="java.lang.Long">
DELETE
FROM
`role_menu` a
role_menu a
WHERE
a.del_flag = 1
and a.role_id = #{roleId}
@@ -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
</sql>
<select id="selectList" parameterType="com.mhd.user.domain.userAggregate.repository.todo.UserDataPermissionDO"
@@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="deleteByUserId" parameterType="com.mhd.user.domain.userAggregate.repository.todo.UserDataPermissionDO" >
DELETE
FROM
`user_data_permission` a
user_data_permission a
WHERE
a.del_flag = 1
and a.user_id = #{userId}
@@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select
a.*
from user_driver_enterprise a
LEFT JOIN `user` b ON a.user_id = b.user_id AND b.del_flag = 1
LEFT JOIN "USER" b ON a.user_id = b.user_id AND b.del_flag = 1
where
a.del_flag = 1 and a.driver_type = 1
</sql>
@@ -17,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select
a.*
from user_driver_enterprise a
LEFT JOIN `user` b ON a.user_id = b.user_id AND b.del_flag = 1
LEFT JOIN "USER" b ON a.user_id = b.user_id AND b.del_flag = 1
where
a.del_flag = 1 and a.driver_type = 2
</sql>
@@ -78,13 +78,13 @@
ude.driver_enterprise_license_long,
ude.driver_enterprise_fill,
ude.driver_enterprise_fill_time,
GROUP_CONCAT(dvb.vehicle_license_plate_number) AS vehicleLicensePlateNumber,
WM_CONCAT(dvb.vehicle_license_plate_number) AS vehicleLicensePlateNumber,
dvb.vehicle_id ,
GROUP_CONCAT(m.motorcade_name) AS driverTeamName,
WM_CONCAT(m.motorcade_name) AS driverTeamName,
ud.driver_enterprise_name companyName
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
LEFT JOIN user_driver_enterprise ude ON a.user_id = ude.user_id AND ude.del_flag = 1
LEFT JOIN driver_vehicle_bind dvb ON a.user_id = dvb.user_id AND dvb.del_flag = 1
LEFT JOIN motorcade m ON a.driver_id = m.motorcade_header_id AND m.del_flag = 1
@@ -107,7 +107,7 @@
a.driver_license_back_url,
a.driver_license_number,
a.driver_license_long,
a.driver_work_license_authority_code,
cast(a.driver_work_license_authority_code as BIGINT) as driver_work_license_authority_code,
a.driver_work_license_authority_name,
a.driver_work_license_number,
a.driver_work_license_type_id,
@@ -187,14 +187,14 @@
ude.driver_corp_idcard_number,
r.roleName,
dvb.vehicle_id,
GROUP_CONCAT(DISTINCT dvb.vehicle_license_plate_number ) AS vehicleLicensePlateNumber,
GROUP_CONCAT(DISTINCT m.motorcade_name ) AS driverTeamName
WM_CONCAT(DISTINCT dvb.vehicle_license_plate_number ) AS vehicleLicensePlateNumber,
WM_CONCAT(DISTINCT m.motorcade_name ) AS driverTeamName
FROM
user b
"USER" b
LEFT JOIN (
SELECT
user_id,
GROUP_CONCAT( DISTINCT r.role_name SEPARATOR '&amp;' ) roleName
LISTAGG(DISTINCT r.role_name, '&amp;') WITHIN GROUP(ORDER BY r.role_name) AS roleName
FROM
role r
LEFT JOIN user_role ur ON r.role_id = ur.role_id
@@ -302,11 +302,11 @@
ude.driver_corp_legal_name,
ude.driver_corp_name,
ude.driver_corp_idcard_number,
GROUP_CONCAT(dvb.vehicle_license_plate_number) AS vehicleLicensePlateNumber,
GROUP_CONCAT(m.motorcade_name) AS driverTeamName,
WM_CONCAT(dvb.vehicle_license_plate_number) AS vehicleLicensePlateNumber,
WM_CONCAT(m.motorcade_name) AS driverTeamName,
md.motorcade_id motorcade_header_id
FROM `user` b
LEFT JOIN `user_driver` a ON a.user_id = b.user_id AND b.del_flag = 1
FROM "USER" b
LEFT JOIN user_driver a ON a.user_id = b.user_id AND b.del_flag = 1
LEFT JOIN user_driver_enterprise ude ON a.user_id = ude.user_id AND ude.del_flag = 1
LEFT JOIN driver_vehicle_bind dvb ON a.user_id = dvb.user_id AND dvb.del_flag = 1
LEFT JOIN motorcade m ON a.driver_id = m.motorcade_header_id AND m.del_flag = 1
@@ -316,7 +316,7 @@
<select id="selectUserDriverByUserId" parameterType="java.lang.Long" resultType="java.lang.Long">
SELECT a.driver_id
FROM `user_driver` a
FROM user_driver a
WHERE a.del_flag = 1
AND a.user_id = #{values}
</select>
@@ -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 '&amp;') roleName
from "USER" b
left join (select user_id, WM_CONCAT(r.role_name separator '&amp;') 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 '&amp;' ) roleCode
LISTAGG(DISTINCT r.role_code, '&amp;') 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
<if test="userDriverDO.topOrganizationId != null and userDriverDO.topOrganizationId != ''">
@@ -1037,9 +1037,9 @@
<select id="getDriverCountByMatter" parameterType="com.mhd.common.core.domain.todo.StatisticalMattersDo"
resultType = "java.lang.Integer">
select
a.`count` + b.`count`
from (select count(1) as `count`
from user u
a.count + b.count
from (select count(1) as count
from "USER" u
left join user_driver ud on u.user_id = ud.user_id
<where>
u.del_flag = 1
@@ -1054,8 +1054,8 @@
ifnull(
sum(case when ude.driver_enterprise_fill = 2 then 1 end)
+
sum(case when ude.driver_captain_fill = 2 then 1 end), 0) as `count`
from user u
sum(case when ude.driver_captain_fill = 2 then 1 end), 0) as count
from "USER" u
left join user_driver_enterprise ude on u.user_id = ude.user_id
<where>
u.del_flag = 1
@@ -1077,7 +1077,7 @@
ude.driver_enterprise_name,
ude.driver_enterprise_code
from user_driver ud
left join user u on u.user_id = ud.user_id
left join "USER" u on u.user_id = ud.user_id
left join user_driver_enterprise ude
on ude.user_driver_enterprise_id = ud.user_driver_enterprise_id and ude.del_flag = 1 and
driver_type = 1
@@ -1107,7 +1107,7 @@
ude.driver_enterprise_fill,
ud.driver_captain_fill
FROM
user b
"USER" b
LEFT JOIN user_driver a ON a.user_id = b.user_id
LEFT JOIN user_driver_enterprise ude ON b.user_id = ude.user_id
AND ude.driver_type = 1
@@ -1139,7 +1139,7 @@
a.user_id,
a.create_by
FROM
user u
"USER" u
LEFT JOIN user_driver a ON u.user_id = a.user_id
LEFT JOIN motorcade_driver md ON a.user_id = md.user_id
LEFT JOIN motorcade m ON m.motorcade_id = md.motorcade_id
@@ -8,21 +8,16 @@
SELECT a.user_id,
a.top_organization_id,
a.organization_id,
a.organization_name,
a.role_id,
a.role_name,
a.user_phone,
a.role_code,
a.user_phone,
a.user_name,
a.user_account,
a.last_login_time,
COALESCE(CONCAT( a.user_name, ' ', a.user_phone, ' ', a.user_account)
,a.user_name, ' ', a.user_phone, ' ', a.user_account) AS userShowName,
a.user_member_code,
a.user_password,
a.user_salt,
a.role_name,
a.organization_name,
a.user_pay_password,
a.user_idcard_number,
@@ -76,7 +71,7 @@
a.ding_user_id,
a.ding_dept_id,
a.validity_period_management
FROM `user` a
FROM "USER" a
where a.del_flag = 1
</sql>
@@ -99,9 +94,9 @@
u.user_idcard_number as userIdcardNumber,
u.top_organization_id AS topOrganizationId
FROM
`user_shipper` s
user_shipper s
LEFT JOIN
`user` u
"user" u
ON u.user_id = s.user_id
<where>
<if test="topOrganizationId != null "> and u.top_organization_id = #{topOrganizationId}</if>
@@ -120,9 +115,9 @@
u.user_idcard_number as userIdcardNumber,
u.top_organization_id AS topOrganizationId
FROM
`user_shipper` s
user_shipper s
LEFT JOIN
`user` u
"user" u
ON u.user_id = s.user_id and u.del_flag = 1
<where>
s.del_flag = 1 and s.shipper_fill = 3
@@ -416,7 +411,7 @@
a.user_account,
a.avatar
FROM
`user` a
"user" a
WHERE
a.del_flag = 1
<include refid="common_where1"></include>
@@ -451,7 +446,7 @@
u.user_birthday,
ude.driver_captain_fill
from user_driver_enterprise ude
left join user u on ude.user_id = u.user_id and u.del_flag = 1
left join "USER" u on ude.user_id = u.user_id and u.del_flag = 1
where ude.del_flag = 1
and ude.driver_type = 2
and u.user_id = #{userId}
@@ -538,7 +533,7 @@
when datediff(dvb.vehicle_checkout_period_validity, NOW()) &lt; 0 then 2
else 0
end) as drivingPermitExpStatus
from user u
from "USER" u
left join user_driver ud on u.user_id = ud.user_id and ud.del_flag = 1
left join user_driver_enterprise ude on u.user_id = ude.user_id and ude.del_flag = 1 and ude.driver_type = 1
left join driver_vehicle_bind dvb
@@ -663,7 +658,7 @@
us.shipper_enterprise_name,
us.shipper_type
FROM
`user` u
"user" u
LEFT JOIN user_shipper us ON u.user_id = us.user_id
WHERE
u.del_flag = 1
@@ -681,7 +676,7 @@
ude.driver_enterprise_name,
ude.driver_type
FROM
`user` u
"user" u
LEFT JOIN user_driver_enterprise ude ON u.user_id = ude.user_id
WHERE
u.del_flag = 1
@@ -705,7 +700,7 @@
a.user_account,
a.avatar
FROM
`user` a
"user" a
WHERE
a.del_flag = 1
and a.top_organization_id = #{topOrganizationId}
@@ -714,9 +709,9 @@
<select id="findAllShipperInfo" resultType="com.mhd.user.interfaces.vo.QueryAllShipperInfoVo">
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 '&amp;') 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, '&amp;') 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
@@ -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
</sql>
<select id="selectList" parameterType="com.mhd.user.domain.userAggregate.repository.todo.UserMenuDo"
@@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="deleteByUserId" parameterType="java.lang.Long" >
DELETE
FROM
`user_menu` a
user_menu a
WHERE
a.del_flag = 1
and a.user_id = #{value}
@@ -10,7 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.user_id,
a.role_id
FROM
`user_role` a
user_role a
</sql>
<select id="userRoleMenuList" resultType="com.mhd.common.core.domain.po.UserRoleMenuPO">
SELECT
@@ -40,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="deleteByUserId" parameterType="java.lang.Long" >
DELETE
FROM
`user_role` a
user_role a
WHERE
a.del_flag = 1
and a.user_id = #{userId}
@@ -73,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getUserIdByRoleCode" resultType="java.lang.Long">
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
<where>
@@ -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
</sql>
@@ -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 '&amp;') 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, '&amp;') 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
<where>
u.del_flag = 1
+2 -2
View File
@@ -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包
+37 -1
View File
@@ -73,9 +73,14 @@
<groupId>com.mhd</groupId>
<artifactId>mhd-common-redis</artifactId>
</dependency>
<dependency>
<!--<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>-->
<dependency>
<groupId>com.dameng</groupId>
<artifactId>DmJdbcDriver18</artifactId>
<version>8.1.1.193</version>
</dependency>
<!--添加druid连接池 依赖 -->
<dependency>
@@ -139,6 +144,24 @@
<artifactId>alibaba-dingtalk-service-sdk</artifactId>
<version>2.0.0</version>
</dependency>
<!--用友NC65对接-->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-http-apache</artifactId>
<version>0.2.9-beta</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
@@ -159,4 +182,17 @@
</plugins>
</build>
<profiles>
<profile>
<id>mhd_finance</id>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -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 ="<ufinterface account=\"NKNC\" billtype=\"F0\" businessunitcode=\"\" filename=\"\" groupcode=\"CNK\" isexchange=\"Y\" orgcode=\"NG10\" receiver=\"NG10\" replace=\"Y\" roottag=\"\" sender=\"NKT_MY\">";
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 ="<ufinterface account=\"NKNC\" billtype=\"F0\" businessunitcode=\"\" filename=\"\" groupcode=\"CNK\" isexchange=\"Y\" orgcode=\"NG10\" receiver=\"NG10\" replace=\"Y\" roottag=\"\" sender=\"NKT_MY\">";
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();
}
};*/
}
@@ -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<NcLogPO> 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);
}
}
@@ -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);
@@ -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);
}
}
@@ -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;
}
@@ -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<NcLog>
{
/**
* 分页查询请填写功能名称列表
*/
public List<NcLogPO> queryList(NcLogDO ncLogDO);
/**
* 新增请填写功能名称
*/
public Boolean insert(NcLogDO ncLogDO);
/**
* 修改请填写功能名称
*/
public Boolean update(NcLogDO ncLogDO);
/**
* 批量删除请填写功能名称
*/
public Boolean delete(Long[] ncLogIds);
/**
* 查询请填写功能名称
*/
public NcLogPO getInfo(Long ncLogId);
}
@@ -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<NcLog>
{
/**
* 查询请填写功能名称列表
*/
public List<NcLogPO> queryList(NcLogDO ncLogDO);
}
@@ -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<NcLogMapper, NcLog> implements INcLogService{
@Autowired
private NcLogMapper ncLogMapper;
/**
* 查询请填写功能名称列表
*/
@Override
public List<NcLogPO> 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<NcLog> 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;
}
}
@@ -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;
}
@@ -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<Long> organizationIdList;
@ApiModelProperty(name = "权限菜单ID")
private Long permissionMenuId;
}
@@ -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<NcLogPO> 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);
}
}
@@ -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;
}
@@ -62,5 +62,9 @@ public interface IReconciliationService extends IService<Reconciliation>
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);
}
@@ -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<ReconciliationMapper, Reconciliation> 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<ReconciliationMapper, Reconc
return 0;
}
@Override
public boolean synchronousNc(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.getSynchronousStatus()==1){
throw new ServiceException("该记录已同步,不需要再次同步");
}
/* if(reconciliation.getIsInvoice()!=2){
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<Ysitem> ysitemList=new ArrayList<Ysitem>();
ReconciliationDTO reconciliationDTO=new ReconciliationDTO();
reconciliationDTO.setInnerNumber(reconciliation.getInnerNumber());
R<List<TmsOrder>> result=wlhyServiceFeign.getOrderListByReconciliation(reconciliationDTO);
if(result.getCode()==200){
List<TmsOrder> list=result.getData();
if(ObjectUtil.isNotNull(list)){
for(TmsOrder tmsOrder:list){
R<TmsTransportNote> 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<SKitem> ysitemList=new ArrayList<SKitem>();
ReconciliationDTO reconciliationDTO=new ReconciliationDTO();
reconciliationDTO.setInnerNumber(reconciliation.getInnerNumber());
R<List<TmsOrder>> result=wlhyServiceFeign.getOrderListByReconciliation(reconciliationDTO);
if(result.getCode()==200){
List<TmsOrder> 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 ="<ufinterface account=\"NKNC\" billtype=\"F0\" businessunitcode=\"\" filename=\"\" groupcode=\"CNK\" isexchange=\"Y\" orgcode=\"NG10\" receiver=\"NG10\" replace=\"Y\" roottag=\"\" sender=\"NKT_MY\">";
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;
}
}
@@ -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;
}
@@ -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;
}
@@ -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);

Some files were not shown because too many files have changed in this diff Show More