From e4b29858a41c7359ba9d6ab035583b68f5428294 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com>
Date: Thu, 27 Aug 2026 13:58:10 +0800
Subject: [PATCH 01/45] =?UTF-8?q?=E5=8D=97=E5=B2=90GPS=E4=B8=89=E6=96=B9?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../server/NanqiGpsApplicationService.java | 214 ++++++++++++++++++
.../infrastructure/dict/NanqiGpsConstant.java | 64 ++++++
.../interfaces/dto/gps/NanqiGpsLoginDTO.java | 28 +++
.../interfaces/facade/NanqiGpsApi.java | 80 +++++++
.../interfaces/vo/gps/NanqiGpsLocationVO.java | 92 ++++++++
5 files changed, 478 insertions(+)
create mode 100644 mhd_thrid_party/src/main/java/com/linke/thirdParty/application/server/NanqiGpsApplicationService.java
create mode 100644 mhd_thrid_party/src/main/java/com/linke/thirdParty/infrastructure/dict/NanqiGpsConstant.java
create mode 100644 mhd_thrid_party/src/main/java/com/linke/thirdParty/interfaces/dto/gps/NanqiGpsLoginDTO.java
create mode 100644 mhd_thrid_party/src/main/java/com/linke/thirdParty/interfaces/facade/NanqiGpsApi.java
create mode 100644 mhd_thrid_party/src/main/java/com/linke/thirdParty/interfaces/vo/gps/NanqiGpsLocationVO.java
diff --git a/mhd_thrid_party/src/main/java/com/linke/thirdParty/application/server/NanqiGpsApplicationService.java b/mhd_thrid_party/src/main/java/com/linke/thirdParty/application/server/NanqiGpsApplicationService.java
new file mode 100644
index 000000000..3d5aa0741
--- /dev/null
+++ b/mhd_thrid_party/src/main/java/com/linke/thirdParty/application/server/NanqiGpsApplicationService.java
@@ -0,0 +1,214 @@
+package com.linke.thirdParty.application.server;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.linke.thirdParty.domain.departInterfaceInfo.repository.todo.SysDepartInterfaceInfoDo;
+import com.linke.thirdParty.infrastructure.dict.NanqiGpsConstant;
+import com.linke.thirdParty.interfaces.vo.gps.NanqiGpsLocationVO;
+import com.mhd.common.core.domain.po.thirdparty.SysDepartInterfaceInfoPo;
+import com.mhd.common.core.exception.ServiceException;
+import com.mhd.common.core.utils.HttpClientUtil;
+import com.mhd.common.redis.service.RedisService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.DigestUtils;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * 南岐车联网GPS平台 对接应用服务
+ *
+ *
提供两个接口:
+ *
+ * - login:登录获取 sessionId,并缓存到 Redis
+ * - queryByPlate:根据车牌号+sessionId 查询车辆实时定位
+ *
+ *
+ * @author mhd
+ */
+@Slf4j
+@Service
+public class NanqiGpsApplicationService {
+
+ @Autowired
+ private SysDepartInterfaceInfoApplicationService interfaceInfoApplicationService;
+
+ @Autowired
+ private RedisService redisService;
+
+ /**
+ * 南岐登录账号
+ */
+ private String userId = NanqiGpsConstant.DEFAULT_USER_ID;
+
+ /**
+ * 南岐登录密码(明文)
+ */
+ private String password = NanqiGpsConstant.DEFAULT_PASSWORD;
+
+ /**
+ * 从三方接口配置表读取南岐配置(interfaceType = nanqi_gps),未配置则使用默认值
+ */
+ private void getBaseInfo() {
+ SysDepartInterfaceInfoDo sysDepartInterfaceInfoDo = new SysDepartInterfaceInfoDo();
+ sysDepartInterfaceInfoDo.setInterfaceType(NanqiGpsConstant.INTERFACE_TYPE);
+ List sysDepartInterfaceInfoPos = interfaceInfoApplicationService.queryList1(sysDepartInterfaceInfoDo);
+ if (sysDepartInterfaceInfoPos == null || sysDepartInterfaceInfoPos.isEmpty()) {
+ return;
+ }
+ for (SysDepartInterfaceInfoPo info : sysDepartInterfaceInfoPos) {
+ String key = info.getInterfaceTypeKey();
+ String value = info.getInterfaceTypeValue();
+ if ("userId".equals(key)) {
+ userId = value;
+ } else if ("password".equals(key)) {
+ password = value;
+ }
+ }
+ }
+
+ /**
+ * 登录获取 sessionId(若 Redis 已有有效 sessionId 则直接复用)
+ *
+ * @return sessionId
+ */
+ public String login() {
+ return getSessionId();
+ }
+
+ /**
+ * 获取有效 sessionId:优先从 Redis 取,取不到则调用登录接口重新获取
+ *
+ * @return sessionId
+ */
+ public String getSessionId() {
+ String cacheKey = NanqiGpsConstant.SESSION_ID_KEY;
+ String sessionId = redisService.getCacheObject(cacheKey);
+ if (sessionId != null && !sessionId.isEmpty()) {
+ return sessionId;
+ }
+ // 重新登录
+ getBaseInfo();
+ sessionId = doLogin(userId, password, NanqiGpsConstant.LOGIN_TYPE_USER);
+ if (sessionId != null && !sessionId.isEmpty()) {
+ redisService.setCacheObject(cacheKey, sessionId, NanqiGpsConstant.SESSION_ID_EXPIRE_SECONDS, TimeUnit.SECONDS);
+ }
+ return sessionId;
+ }
+
+ /**
+ * 手动刷新 sessionId(强制重新登录,忽略缓存)
+ *
+ * @return sessionId
+ */
+ public String refreshSessionId() {
+ redisService.deleteObject(NanqiGpsConstant.SESSION_ID_KEY);
+ return getSessionId();
+ }
+
+ /**
+ * 执行南岐登录接口
+ *
+ * @param loginUserId 登录账号
+ * @param loginPassword 登录密码(明文)
+ * @param loginType user-用户 car-车辆/人员
+ * @return sessionId
+ */
+ private String doLogin(String loginUserId, String loginPassword, String loginType) {
+ Map params = new HashMap<>();
+ params.put("userId", loginUserId);
+ // 密码需要 MD5 32 位小写加密
+ String md5Pwd = DigestUtils.md5DigestAsHex(loginPassword.getBytes()).toLowerCase();
+ params.put("password", md5Pwd);
+ params.put("loginType", loginType == null ? NanqiGpsConstant.LOGIN_TYPE_USER : loginType);
+ params.put("loginWay", NanqiGpsConstant.DEFAULT_LOGIN_WAY);
+ params.put("loginLang", NanqiGpsConstant.DEFAULT_LOGIN_LANG);
+
+ String result = HttpClientUtil.doGet(NanqiGpsConstant.LOGIN_URL, params);
+ log.info("南岐GPS登录返回: {}", result);
+ JSONObject json = JSON.parseObject(result);
+ if (json == null) {
+ throw new ServiceException("南岐GPS登录接口无响应");
+ }
+ Integer rspCode = json.getInteger("rspCode");
+ if (rspCode == null || rspCode != 1) {
+ throw new ServiceException("南岐GPS登录失败:" + json.getString("rspDesc"));
+ }
+ return json.getString("sessionId");
+ }
+
+ /**
+ * 根据车牌号查询车辆实时定位
+ *
+ * @param carPlate 车牌号
+ * @return 车辆定位信息
+ */
+ public NanqiGpsLocationVO queryByPlate(String carPlate) {
+ if (carPlate == null || carPlate.trim().isEmpty()) {
+ throw new ServiceException("车牌号不能为空");
+ }
+ String sessionId = getSessionId();
+ if (sessionId == null || sessionId.isEmpty()) {
+ throw new ServiceException("获取南岐GPS sessionId失败");
+ }
+
+ Map params = new HashMap<>();
+ params.put("carPlate", carPlate.trim());
+ params.put("sessionId", sessionId);
+
+ String result = HttpClientUtil.doGet(NanqiGpsConstant.GET_GPS_URL, params);
+ log.info("南岐GPS查询车辆[{}]返回: {}", carPlate, result);
+ JSONObject json = JSON.parseObject(result);
+ if (json == null) {
+ throw new ServiceException("南岐GPS查询接口无响应");
+ }
+ Integer rspCode = json.getInteger("rspCode");
+ if (rspCode == null || rspCode != 1) {
+ // 可能是 sessionId 失效,尝试刷新后重试一次
+ String newSessionId = refreshSessionId();
+ params.put("sessionId", newSessionId);
+ result = HttpClientUtil.doGet(NanqiGpsConstant.GET_GPS_URL, params);
+ json = JSON.parseObject(result);
+ if (json == null || !Integer.valueOf(1).equals(json.getInteger("rspCode"))) {
+ throw new ServiceException("南岐GPS查询失败:" + (json == null ? "" : json.getString("rspDesc")));
+ }
+ }
+
+ NanqiGpsLocationVO vo = new NanqiGpsLocationVO();
+ vo.setRspCode(json.getInteger("rspCode"));
+ vo.setRspDesc(json.getString("rspDesc"));
+
+ JSONArray list = json.getJSONArray("list");
+ if (list != null && !list.isEmpty()) {
+ JSONObject loc = list.getJSONObject(0);
+ vo.setCarId(loc.getString("carId"));
+ vo.setCarPlate(loc.getString("carPlate"));
+ vo.setCarName(loc.getString("carName"));
+ vo.setTeamId(loc.getString("teamId"));
+ vo.setTeamName(loc.getString("teamName"));
+ vo.setTime(loc.getString("time"));
+ vo.setLng(loc.getBigDecimal("lng"));
+ vo.setLat(loc.getBigDecimal("lat"));
+ vo.setSpeed(loc.getBigDecimal("speed"));
+ vo.setDrct(loc.getString("drct"));
+ vo.setMile(loc.getString("mile"));
+ vo.setPreMile(loc.getString("preMile"));
+ vo.setSatl(loc.getString("satl"));
+ vo.setSgn(loc.getString("sgn"));
+ vo.setAddr(loc.getString("addr"));
+ vo.setState(loc.getString("state"));
+ vo.setStateCn(loc.getString("stateCn"));
+ vo.setDrvName(loc.getString("drvName"));
+ vo.setDrvPhone(loc.getString("drvPhone"));
+ vo.setCarType(loc.getString("carType"));
+ vo.setExpState(loc.getString("expState"));
+ vo.setExpTime(loc.getString("expTime"));
+ }
+ return vo;
+ }
+}
diff --git a/mhd_thrid_party/src/main/java/com/linke/thirdParty/infrastructure/dict/NanqiGpsConstant.java b/mhd_thrid_party/src/main/java/com/linke/thirdParty/infrastructure/dict/NanqiGpsConstant.java
new file mode 100644
index 000000000..87d43c1c0
--- /dev/null
+++ b/mhd_thrid_party/src/main/java/com/linke/thirdParty/infrastructure/dict/NanqiGpsConstant.java
@@ -0,0 +1,64 @@
+package com.linke.thirdParty.infrastructure.dict;
+
+/**
+ * 南岐车联网GPS平台 接口常量
+ *
+ * @author mhd
+ */
+public class NanqiGpsConstant {
+
+ /**
+ * 三方接口配置表 interfaceType(对应 sys_depart_interface_info 表)
+ */
+ public static final String INTERFACE_TYPE = "nanqi_gps";
+
+ /**
+ * 登录接口地址(第一接口)
+ */
+ public static final String LOGIN_URL = "http://iov.yotugo.com/gps-web/api/login.jsp";
+
+ /**
+ * 车辆定位查询接口地址(第二接口)
+ */
+ public static final String GET_GPS_URL = "http://iov.yotugo.com/gps-web/api/get_gps_r_plate.jsp";
+
+ /**
+ * 登录账号(默认值,可被 sys_depart_interface_info 配置覆盖,key 为 userId)
+ */
+ public static final String DEFAULT_USER_ID = "zhnanqi";
+
+ /**
+ * 登录密码(默认值,明文,可被配置覆盖,key 为 password)
+ */
+ public static final String DEFAULT_PASSWORD = "nq123456";
+
+ /**
+ * 登录方式:默认 interface
+ */
+ public static final String DEFAULT_LOGIN_WAY = "interface";
+
+ /**
+ * 登录语言:默认中文
+ */
+ public static final String DEFAULT_LOGIN_LANG = "zh_CN";
+
+ /**
+ * 登录类型:car 表示按车辆/人员登录
+ */
+ public static final String LOGIN_TYPE_CAR = "car";
+
+ /**
+ * 登录类型:user 表示按用户登录
+ */
+ public static final String LOGIN_TYPE_USER = "user";
+
+ /**
+ * sessionId 缓存 key 前缀
+ */
+ public static final String SESSION_ID_KEY = "nanqi_gps:sessionId:";
+
+ /**
+ * sessionId 缓存时长(秒),默认 12 小时
+ */
+ public static final long SESSION_ID_EXPIRE_SECONDS = 12 * 60 * 60L;
+}
diff --git a/mhd_thrid_party/src/main/java/com/linke/thirdParty/interfaces/dto/gps/NanqiGpsLoginDTO.java b/mhd_thrid_party/src/main/java/com/linke/thirdParty/interfaces/dto/gps/NanqiGpsLoginDTO.java
new file mode 100644
index 000000000..86bc94718
--- /dev/null
+++ b/mhd_thrid_party/src/main/java/com/linke/thirdParty/interfaces/dto/gps/NanqiGpsLoginDTO.java
@@ -0,0 +1,28 @@
+package com.linke.thirdParty.interfaces.dto.gps;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 南岐GPS 登录入参
+ *
+ * @author mhd
+ */
+@Data
+@ApiModel("南岐GPS 登录入参")
+public class NanqiGpsLoginDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "登录用户/车牌号(loginType=user填用户ID,loginType=car填车牌号),为空时使用平台配置的账号", required = false)
+ private String userId;
+
+ @ApiModelProperty(value = "登录密码(明文,内部会MD5小写加密),为空时使用平台配置的密码", required = false)
+ private String password;
+
+ @ApiModelProperty(value = "登录类型:user-用户 car-车辆/人员,默认car", required = false)
+ private String loginType;
+}
diff --git a/mhd_thrid_party/src/main/java/com/linke/thirdParty/interfaces/facade/NanqiGpsApi.java b/mhd_thrid_party/src/main/java/com/linke/thirdParty/interfaces/facade/NanqiGpsApi.java
new file mode 100644
index 000000000..68a05de21
--- /dev/null
+++ b/mhd_thrid_party/src/main/java/com/linke/thirdParty/interfaces/facade/NanqiGpsApi.java
@@ -0,0 +1,80 @@
+package com.linke.thirdParty.interfaces.facade;
+
+import com.linke.thirdParty.application.server.NanqiGpsApplicationService;
+import com.linke.thirdParty.interfaces.vo.gps.NanqiGpsLocationVO;
+import com.mhd.common.core.exception.ServiceException;
+import com.mhd.common.core.web.domain.AjaxResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 南岐车联网GPS平台 接口
+ *
+ * @author mhd
+ */
+@RestController
+@RequestMapping("/nanqiGps")
+@Api(tags = "南岐车联网GPS")
+@Slf4j
+public class NanqiGpsApi {
+
+ @Autowired
+ private NanqiGpsApplicationService nanqiGpsApplicationService;
+
+ /**
+ * 登录获取 sessionId
+ */
+ @ApiOperation(value = "登录获取sessionId", notes = "登录获取南岐GPS平台sessionId(Redis缓存复用)")
+ @GetMapping(value = "/login")
+ public AjaxResult login() {
+ try {
+ String sessionId = nanqiGpsApplicationService.login();
+ return AjaxResult.success("操作成功", sessionId);
+ } catch (ServiceException e) {
+ return AjaxResult.error(500, e.getMessage());
+ } catch (Exception e) {
+ log.error("南岐GPS登录失败", e);
+ return AjaxResult.error(500, "操作失败" + e.getMessage());
+ }
+ }
+
+ /**
+ * 手动刷新 sessionId
+ */
+ @ApiOperation(value = "手动刷新sessionId", notes = "强制重新登录南岐GPS平台,忽略缓存")
+ @GetMapping(value = "/refreshSessionId")
+ public AjaxResult refreshSessionId() {
+ try {
+ String sessionId = nanqiGpsApplicationService.refreshSessionId();
+ return AjaxResult.success("操作成功", sessionId);
+ } catch (ServiceException e) {
+ return AjaxResult.error(500, e.getMessage());
+ } catch (Exception e) {
+ log.error("南岐GPS刷新sessionId失败", e);
+ return AjaxResult.error(500, "操作失败" + e.getMessage());
+ }
+ }
+
+ /**
+ * 根据车牌号查询车辆实时定位
+ */
+ @ApiOperation(value = "根据车牌号查询车辆实时定位", notes = "通过车牌号查询南岐GPS车辆实时定位")
+ @GetMapping(value = "/queryByPlate")
+ public AjaxResult queryByPlate(@RequestParam(value = "carPlate") String carPlate) {
+ try {
+ NanqiGpsLocationVO vo = nanqiGpsApplicationService.queryByPlate(carPlate);
+ return AjaxResult.success("操作成功", vo);
+ } catch (ServiceException e) {
+ return AjaxResult.error(500, e.getMessage());
+ } catch (Exception e) {
+ log.error("南岐GPS查询车辆[{}]定位失败", carPlate, e);
+ return AjaxResult.error(500, "操作失败" + e.getMessage());
+ }
+ }
+}
diff --git a/mhd_thrid_party/src/main/java/com/linke/thirdParty/interfaces/vo/gps/NanqiGpsLocationVO.java b/mhd_thrid_party/src/main/java/com/linke/thirdParty/interfaces/vo/gps/NanqiGpsLocationVO.java
new file mode 100644
index 000000000..2dec12d35
--- /dev/null
+++ b/mhd_thrid_party/src/main/java/com/linke/thirdParty/interfaces/vo/gps/NanqiGpsLocationVO.java
@@ -0,0 +1,92 @@
+package com.linke.thirdParty.interfaces.vo.gps;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * 南岐GPS 车辆定位信息 VO(对应文档 表1 常用字段)
+ *
+ * @author mhd
+ */
+@Data
+@ApiModel("南岐GPS 车辆定位信息")
+public class NanqiGpsLocationVO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("应答结果:1成功 0失败")
+ private Integer rspCode;
+
+ @ApiModelProperty("应答描述")
+ private String rspDesc;
+
+ @ApiModelProperty("车辆id")
+ private String carId;
+
+ @ApiModelProperty("车牌号")
+ private String carPlate;
+
+ @ApiModelProperty("车辆名")
+ private String carName;
+
+ @ApiModelProperty("车队id")
+ private String teamId;
+
+ @ApiModelProperty("车队名称")
+ private String teamName;
+
+ @ApiModelProperty("定位时间")
+ private String time;
+
+ @ApiModelProperty("经度(WGS84)")
+ private BigDecimal lng;
+
+ @ApiModelProperty("纬度(WGS84)")
+ private BigDecimal lat;
+
+ @ApiModelProperty("速度(千米/小时)")
+ private BigDecimal speed;
+
+ @ApiModelProperty("方向 0~360")
+ private String drct;
+
+ @ApiModelProperty("平台总里程(千米)")
+ private String mile;
+
+ @ApiModelProperty("今日里程(千米)")
+ private String preMile;
+
+ @ApiModelProperty("定位信号:0无 弱<=3 中<=6 强>6")
+ private String satl;
+
+ @ApiModelProperty("通讯信号:0无 弱<=10 中<=20 强>20")
+ private String sgn;
+
+ @ApiModelProperty("地理描述")
+ private String addr;
+
+ @ApiModelProperty("车辆定位状态")
+ private String state;
+
+ @ApiModelProperty("车辆状态文字")
+ private String stateCn;
+
+ @ApiModelProperty("驾驶员")
+ private String drvName;
+
+ @ApiModelProperty("驾驶员电话")
+ private String drvPhone;
+
+ @ApiModelProperty("车辆类型")
+ private String carType;
+
+ @ApiModelProperty("服务到期状态:1已到期 0未到期")
+ private String expState;
+
+ @ApiModelProperty("服务期限")
+ private String expTime;
+}
From 3349552e10fe9f218ef81cf057faa1bbcd9922f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com>
Date: Fri, 28 Aug 2026 17:32:02 +0800
Subject: [PATCH 02/45] =?UTF-8?q?=E7=BB=93=E7=AE=97=E5=AF=B9=E8=B1=A1?=
=?UTF-8?q?=E6=94=B9=E9=80=A0;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/mhd/system/api/OmsServiceFeign.java | 2 +-
.../mhd/system/api/SystemServiceFeign.java | 6 +
.../domain/ContractManageDetailFeignDTO.java | 110 +++++++++
.../api/domain/ContractManageFeignDTO.java | 228 ++++++++++++++++++
.../RemoteSystemFeignFallbackFactory.java | 6 +
.../ContractManageApplicationService.java | 31 +++
.../contractManage/entity/ContractManage.java | 12 +
.../repository/po/ContractManagePO.java | 13 +
.../repository/todo/ContractManageDO.java | 12 +
.../dto/contractManage/ContractManageDTO.java | 12 +
.../contractManage/ContractManageApi.java | 20 ++
.../mapper/basic/ContractManageMapper.xml | 6 +
...SettlementCustomersApplicationService.java | 143 ++++++++++-
...ntCustomersNcConfigApplicationService.java | 87 +++++++
...CustomersParametersApplicationService.java | 87 +++++++
.../entity/SettlementCustomers.java | 3 +-
.../persistence/SettlementCustomersImpl.java | 25 +-
.../repository/po/SettlementCustomersPO.java | 8 +
.../todo/SettlementCustomersDO.java | 9 +
.../entity/SettlementCustomersNcConfig.java | 80 ++++++
.../ISettlementCustomersNcConfigService.java | 42 ++++
.../SettlementCustomersNcConfigMapper.java | 23 ++
.../SettlementCustomersNcConfigImpl.java | 81 +++++++
.../po/SettlementCustomersNcConfigPO.java | 77 ++++++
.../todo/SettlementCustomersNcConfigDO.java | 81 +++++++
...tlementCustomersNcConfigDomainService.java | 59 +++++
.../entity/SettlementCustomersParameters.java | 69 ++++++
...ISettlementCustomersParametersService.java | 42 ++++
.../SettlementCustomersParametersMapper.java | 23 ++
.../SettlementCustomersParametersImpl.java | 81 +++++++
.../po/SettlementCustomersParametersPO.java | 64 +++++
.../todo/SettlementCustomersParametersDO.java | 68 ++++++
...ementCustomersParametersDomainService.java | 59 +++++
.../SettlementCustomersNcConfigAssembler.java | 71 ++++++
...ettlementCustomersParametersAssembler.java | 71 ++++++
.../SettlementCustomersDTO.java | 10 +
.../SettlementCustomersNcConfigDTO.java | 78 ++++++
.../SettlementCustomersParametersDTO.java | 65 +++++
.../SettlementCustomersNcConfigApi.java | 91 +++++++
.../SettlementCustomersParametersApi.java | 92 +++++++
.../mapper/SettlementCustomersMapper.xml | 2 +
.../SettlementCustomersNcConfigMapper.xml | 90 +++++++
.../SettlementCustomersParametersMapper.xml | 84 +++++++
43 files changed, 2308 insertions(+), 15 deletions(-)
create mode 100644 mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/ContractManageDetailFeignDTO.java
create mode 100644 mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/ContractManageFeignDTO.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomersNcConfig/SettlementCustomersNcConfigApplicationService.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomersParameters/SettlementCustomersParametersApplicationService.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/entity/SettlementCustomersNcConfig.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/facade/ISettlementCustomersNcConfigService.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/mapper/SettlementCustomersNcConfigMapper.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/persistence/SettlementCustomersNcConfigImpl.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/po/SettlementCustomersNcConfigPO.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/todo/SettlementCustomersNcConfigDO.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/service/SettlementCustomersNcConfigDomainService.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/entity/SettlementCustomersParameters.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/facade/ISettlementCustomersParametersService.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/mapper/SettlementCustomersParametersMapper.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/persistence/SettlementCustomersParametersImpl.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/po/SettlementCustomersParametersPO.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/todo/SettlementCustomersParametersDO.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/service/SettlementCustomersParametersDomainService.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/interfaces/assembler/settlementCustomersNcConfig/SettlementCustomersNcConfigAssembler.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/interfaces/assembler/settlementCustomersParameters/SettlementCustomersParametersAssembler.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/settlementCustomersNcConfig/SettlementCustomersNcConfigDTO.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/settlementCustomersParameters/SettlementCustomersParametersDTO.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/interfaces/facadeApi/SettlementCustomersNcConfigApi.java
create mode 100644 mhd_bms/src/main/java/com/mhd/bms/interfaces/facadeApi/SettlementCustomersParametersApi.java
create mode 100644 mhd_bms/src/main/resources/mapper/SettlementCustomersNcConfigMapper.xml
create mode 100644 mhd_bms/src/main/resources/mapper/SettlementCustomersParametersMapper.xml
diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java
index 4ef3bed80..6a9fd6081 100644
--- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java
+++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/OmsServiceFeign.java
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.concurrent.CompletableFuture;
-@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.102.192.33:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
+@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://127.0.0.1:8017",fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
public interface OmsServiceFeign {
diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/SystemServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/SystemServiceFeign.java
index f9abbe1f6..af6d318b4 100644
--- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/SystemServiceFeign.java
+++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/SystemServiceFeign.java
@@ -12,6 +12,7 @@ import com.mhd.common.core.domain.entity.R;
import com.mhd.common.core.domain.po.SysMultistageDictPo;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.system.api.domain.ContainerFeignPO;
+import com.mhd.system.api.domain.ContractManageFeignDTO;
import com.mhd.system.api.domain.SysDictData;
import com.mhd.system.api.factory.RemoteSystemFeignFallbackFactory;
import com.mhd.system.api.feign.FeignAutoConfiguration;
@@ -390,4 +391,9 @@ public interface SystemServiceFeign {
public AjaxResult matchForMaterialImport(@RequestParam("keyword") String keyword,
@RequestParam("organizationId") Long organizationId);
+
+ @ApiOperation("保存临时合同管理")
+ @PostMapping("/contractManageApi/feignSave")
+ public AjaxResult feignSave(@RequestBody ContractManageFeignDTO contractManageFeignDTO);
+
}
\ No newline at end of file
diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/ContractManageDetailFeignDTO.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/ContractManageDetailFeignDTO.java
new file mode 100644
index 000000000..621f28c83
--- /dev/null
+++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/ContractManageDetailFeignDTO.java
@@ -0,0 +1,110 @@
+package com.mhd.system.api.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.mhd.common.core.annotation.Excel;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 合同管理详情对象 contract_manage_detail
+ *
+ * @author gen
+ * @date 2024-06-07
+ */
+
+@Data
+public class ContractManageDetailFeignDTO extends BaseVOEntity{
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("合同管理详情id")
+ private Long contractManageDetailId;
+
+ @ApiModelProperty("合同管理id")
+ @Excel(name = "合同管理id")
+ private Long contractManageId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("结算科目类型(1-通用,2-临时)")
+ @Excel(name = "结算科目类型", readConverterExp = "1=-通用,2-临时")
+ private Integer subjectType;
+
+ @ApiModelProperty("一级费用科目code")
+ @Excel(name = "一级费用科目code")
+ private String firstSubjectCode;
+
+ @ApiModelProperty("一级费用科目")
+ @Excel(name = "一级费用科目")
+ private String firstSubjectName;
+
+ @ApiModelProperty("二级费用科目code")
+ @Excel(name = "二级费用科目code")
+ private String secondSubjectCode;
+
+ @ApiModelProperty("二级费用科目")
+ @Excel(name = "二级费用科目")
+ private String secondSubjectName;
+
+ @ApiModelProperty("计费策略id")
+ @Excel(name = "计费策略id")
+ private Long accountingStrategyId;
+
+ @ApiModelProperty("计费策略")
+ @Excel(name = "计费策略")
+ private String accountingStrategy;
+
+ @ApiModelProperty("计费策略编码")
+ @Excel(name = "计费策略编码")
+ private String accountingStrategyCode;
+
+ @ApiModelProperty("计费周期")
+ @Excel(name = "计费周期")
+ private String billingAttributes;
+
+ @ApiModelProperty("计费周期编码")
+ @Excel(name = "计费周期编码")
+ private String billingAttributesCode;
+
+ @ApiModelProperty("合同有效日期")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @Excel(name = "合同有效日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date subjectEffectiveDate;
+
+ @ApiModelProperty("合同到期日期")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @Excel(name = "合同到期日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date subjectExpirationDate;
+
+
+ @ApiModelProperty(name = "组织ID集合")
+ private List organizationIdList;
+
+ @ApiModelProperty(name = "权限菜单ID")
+ private Long permissionMenuId;
+
+ @ApiModelProperty("单据类型code")
+ private String documentTypeCode;
+
+ @ApiModelProperty("单据类型")
+ private String documentType;
+
+ @ApiModelProperty("费用类别编码")
+ private String serviceItemsCode;
+
+ @ApiModelProperty("费用类别名称")
+ private String serviceItemsName;
+}
\ No newline at end of file
diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/ContractManageFeignDTO.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/ContractManageFeignDTO.java
new file mode 100644
index 000000000..626bc8ea9
--- /dev/null
+++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/ContractManageFeignDTO.java
@@ -0,0 +1,228 @@
+package com.mhd.system.api.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.mhd.common.core.annotation.Excel;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 合同管理对象 contract_manage
+ *
+ * @author gen
+ * @date 2024-06-07
+ */
+
+@Data
+public class ContractManageFeignDTO extends BaseVOEntity{
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("合同管理id")
+ private Long contractManageId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("原始合同编号")
+ @Excel(name = "原始合同编号")
+ private String originalContractNumber;
+
+ @ApiModelProperty("合同编号")
+ @Excel(name = "合同编号")
+ private String contractNumber;
+
+ @ApiModelProperty("合同名称")
+ @Excel(name = "合同名称")
+ private String contractName;
+
+ @ApiModelProperty("是否通用合同(1-是,2-否)")
+ @Excel(name = "是否通用合同", readConverterExp = "1=-是,2-否")
+ private Integer commonContractFlag;
+
+ @ApiModelProperty("合同类型(1-仓储,2-运输,3-其他)")
+ @Excel(name = "合同类型", readConverterExp = "1=-仓储,2-运输,3=-其他")
+ private Integer contractType;
+
+ @ApiModelProperty("合同状态(1-未生效,2-使用中,3-已过期,4-已作废)")
+ @Excel(name = "合同状态", readConverterExp = "1=-未生效,2-使用中,3-已过期,4-已作废")
+ private Integer contractState;
+
+ @ApiModelProperty("签订单位")
+ @Excel(name = "签订单位")
+ private String signingUnit;
+
+ @ApiModelProperty("结算主体")
+ @Excel(name = "结算主体")
+ private String settlementCustomers;
+
+ @ApiModelProperty("结算主体id")
+ @Excel(name = "结算主体id")
+ private Long settlementCustomersId;
+
+ @ApiModelProperty("结算主体code")
+ @Excel(name = "结算主体code")
+ private String settlementCustomersCode;
+
+ @ApiModelProperty("我司身份(1-甲方,2-乙方)")
+ @Excel(name = "我司身份", readConverterExp = "1=-甲方,2-乙方")
+ private Integer ourIdentity;
+
+ @ApiModelProperty("账期(1-每月,2-双月,3-季度)")
+ @Excel(name = "账期", readConverterExp = "1=-每月,2-双月,3-季度")
+ private Integer accountingPeriod;
+
+ @ApiModelProperty("合同签订日期")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @Excel(name = "合同签订日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date signingDate;
+
+ @ApiModelProperty("合同生效日期")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @Excel(name = "合同生效日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date effectiveDate;
+
+ @ApiModelProperty("合同到期日期")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @Excel(name = "合同到期日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date expirationDate;
+
+ @ApiModelProperty("备注")
+ @Excel(name = "备注")
+ private String remark;
+
+ @ApiModelProperty("合同正本附件地址")
+ @Excel(name = "合同正本附件地址")
+ private String contractOriginalUrl;
+
+ @ApiModelProperty("廉政协议附件地址")
+ @Excel(name = "廉政协议附件地址")
+ private String integrityAgreementUrl;
+
+ @ApiModelProperty("安全协议附件地址")
+ @Excel(name = "安全协议附件地址")
+ private String securityProtocolUrl;
+
+ @ApiModelProperty("其他附件地址")
+ @Excel(name = "其他附件地址")
+ private String otherAttachmentsUrl;
+
+ @ApiModelProperty("合同正本附件原始文件名")
+ private String contractOriginalName;
+
+ @ApiModelProperty("廉政协议附件原始文件名")
+ private String integrityAgreementName;
+
+ @ApiModelProperty("安全协议附件原始文件名")
+ private String securityProtocolName;
+
+ @ApiModelProperty("其他附件原始文件名(多文件时与 otherAttachmentsUrl 同分隔符、同顺序)")
+ private String otherAttachmentsName;
+
+ @ApiModelProperty("我司签订人")
+ @Excel(name = "我司签订人")
+ private String ourSinged;
+
+ @ApiModelProperty("我司签订人联系方式")
+ @Excel(name = "我司签订人联系方式")
+ private String ourSingedPhone;
+
+ @ApiModelProperty("我司经办人")
+ @Excel(name = "我司经办人")
+ private String ourOperator;
+
+ @ApiModelProperty("我司经办人联系方式")
+ @Excel(name = "我司经办人联系方式")
+ private String ourOperatorPhone;
+
+ @ApiModelProperty("对方签订人")
+ @Excel(name = "对方签订人")
+ private String theySinged;
+
+ @ApiModelProperty("对方签订人联系方式")
+ @Excel(name = "对方签订人联系方式")
+ private String theySingedPhone;
+
+ @ApiModelProperty("对方经办人")
+ @Excel(name = "对方经办人")
+ private String theyOperator;
+
+ @ApiModelProperty("对方经办人联系方式")
+ @Excel(name = "对方经办人联系方式")
+ private String theyOperatorPhone;
+
+ @ApiModelProperty(name = "组织ID集合")
+ private List organizationIdList;
+
+ @ApiModelProperty(name = "权限菜单ID")
+ private Long permissionMenuId;
+
+ @ApiModelProperty(name = "合同科目详情列表")
+ private List contractManageDetailDTOList;
+
+ @ApiModelProperty("合同管理ids")
+ private String contractManageIds;
+
+ @ApiModelProperty(name = "合同签订查询条件开始日期")
+ private String signingDateStart;
+ @ApiModelProperty(name = "合同签订查询条件结束日期")
+ private String signingDateEnd;
+
+ @ApiModelProperty(name = "合同生效查询条件开始日期")
+ private String effectiveDateStart;
+ @ApiModelProperty(name = "合同生效查询条件结束日期")
+ private String effectiveDateEnd;
+
+ @ApiModelProperty(name = "合同到期查询条件开始日期")
+ private String expirationDateStart;
+ @ApiModelProperty(name = "合同到期查询条件结束日期")
+ private String expirationDateEnd;
+
+ @ApiModelProperty(name = "结算主体基础数据id(可以是用户id也可以是企业id)")
+ private String settlementId;
+
+ @ApiModelProperty(name = "是否自动出账(1-是,2-否)")
+ private Integer automaticFlag;
+
+ @ApiModelProperty("出账日期")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date paymentDate;
+
+ @ApiModelProperty(name = "出账天数")
+ private Integer billDays;
+
+ @ApiModelProperty(name = "主体类型(1-货主,2-客户,3-承运商)")
+ private Integer principalType;
+
+ @ApiModelProperty("客户类型")
+ private String customerType;
+
+ @ApiModelProperty("客户类型编码")
+ private String customerTypeCode;
+
+ @ApiModelProperty(name = "是否包含运输费用(1-包含,2-包含)")
+ private Integer transportationCosts;
+
+ @ApiModelProperty("客户类型")
+ private String contractRentType;
+
+ @ApiModelProperty("客户类型编码")
+ private String contractRentTypeName;
+
+ @ApiModelProperty("仓库温层类型")
+ private String warehouseTempLayerType;
+
+ @ApiModelProperty("仓库温层类型编码")
+ private String warehouseTempLayerTypeName;
+}
\ No newline at end of file
diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteSystemFeignFallbackFactory.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteSystemFeignFallbackFactory.java
index a4b0bfe44..d1bb306cc 100644
--- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteSystemFeignFallbackFactory.java
+++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteSystemFeignFallbackFactory.java
@@ -13,6 +13,7 @@ import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.system.api.AssociationWarehouseFeign;
import com.mhd.system.api.SystemServiceFeign;
import com.mhd.system.api.domain.ContainerFeignPO;
+import com.mhd.system.api.domain.ContractManageFeignDTO;
import com.mhd.system.api.domain.SysDictData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -318,6 +319,11 @@ public class RemoteSystemFeignFallbackFactory implements FallbackFactory
and a.top_organization_id = #{contractManageDO.topOrganizationId}
+
+ and a.contract_rent_type = #{contractManageDO.contractRentType}
+
+
+ and a.warehouse_temp_layer_type = #{contractManageDO.warehouseTempLayerType}
+
and b.FIRST_SUBJECT_CODE = #{contractManageDO.firstSubjectCode}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomers/SettlementCustomersApplicationService.java b/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomers/SettlementCustomersApplicationService.java
index 76879467f..66d41ca11 100644
--- a/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomers/SettlementCustomersApplicationService.java
+++ b/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomers/SettlementCustomersApplicationService.java
@@ -1,5 +1,6 @@
package com.mhd.bms.application.server.settlementCustomers;
+import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson2.JSONObject;
@@ -10,11 +11,14 @@ import com.mhd.bms.domain.settlementCustomers.repository.po.SettlementCustomersP
import com.mhd.bms.domain.settlementCustomers.repository.todo.SettlementCustomersDO;
import com.mhd.bms.domain.settlementCustomers.repository.persistence.SettlementCustomersImpl;
import com.mhd.bms.domain.settlementCustomers.service.SettlementCustomersDomainService;
+import com.mhd.bms.domain.settlementCustomersNcConfig.entity.SettlementCustomersNcConfig;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.facade.ISettlementCustomersNcConfigService;
+import com.mhd.bms.domain.settlementCustomersParameters.entity.SettlementCustomersParameters;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.facade.ISettlementCustomersParametersService;
import com.mhd.bms.interfaces.dto.settlementCustomers.SettlementCustomersDTO;
-import com.mhd.common.core.domain.po.SysDictDataVo;
-import com.mhd.common.core.domain.po.UserDriverPo;
-import com.mhd.common.core.domain.po.UserPo;
-import com.mhd.common.core.domain.po.UserShipperPo;
+import com.mhd.bms.interfaces.dto.settlementCustomersNcConfig.SettlementCustomersNcConfigDTO;
+import com.mhd.bms.interfaces.dto.settlementCustomersParameters.SettlementCustomersParametersDTO;
+import com.mhd.common.core.domain.po.*;
import com.mhd.common.core.enums.DictCode;
import com.mhd.common.core.exception.ServiceException;
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
@@ -25,19 +29,20 @@ import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.security.utils.SecurityUtils;
import com.mhd.system.api.SystemServiceFeign;
import com.mhd.system.api.UserServiceFeign;
+import com.mhd.system.api.domain.BatchDetailFeignPO;
+import com.mhd.system.api.domain.ContractManageFeignDTO;
+import com.mhd.system.api.domain.WarehouseFeignPO;
import com.mhd.system.api.model.LoginUser;
import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -60,6 +65,10 @@ public class SettlementCustomersApplicationService {
private SettlementCustomersMapper settlementCustomersMapper;
@Autowired
private SettlementCustomersImpl settlementCustomersImpl;
+ @Autowired
+ private ISettlementCustomersParametersService settlementCustomersParametersService;
+ @Autowired
+ private ISettlementCustomersNcConfigService settlementCustomersNcConfigService;
private static final int SYNC_BATCH_SIZE = 500;
@@ -138,7 +147,38 @@ public class SettlementCustomersApplicationService {
settlementCustomersDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
settlementCustomersDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
settlementCustomersDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
- return settlementCustomersDomainService.insert(settlementCustomersDO);
+ Boolean insert = settlementCustomersDomainService.insert(settlementCustomersDO);
+ if (insert) {
+ List settlementCustomersNcConfigDTOList = settlementCustomersDO.getSettlementCustomersNcConfigDTOList();
+ if (CollectionUtil.isNotEmpty(settlementCustomersNcConfigDTOList)) {
+ for (SettlementCustomersNcConfigDTO settlementCustomersNcConfigDTO : settlementCustomersNcConfigDTOList) {
+ SettlementCustomersNcConfig settlementCustomersNcConfig = new SettlementCustomersNcConfig();
+ settlementCustomersNcConfigDTO.setSettlementCustomersId(settlementCustomersDO.getSettlementCustomersId());
+ settlementCustomersNcConfigDTO.setOrganizationId(settlementCustomersDO.getOrganizationId());
+ settlementCustomersNcConfigDTO.setTopOrganizationId(settlementCustomersDO.getTopOrganizationId());
+ settlementCustomersNcConfigDTO.setOrganizationName(settlementCustomersDO.getOrganizationName());
+ BeanUtils.copyProperties(settlementCustomersNcConfigDTO, settlementCustomersNcConfig);
+ settlementCustomersNcConfigService.save(settlementCustomersNcConfig);
+ }
+ }
+ List settlementCustomersParametersDTOList = settlementCustomersDO.getSettlementCustomersParametersDTOList();
+ if (CollectionUtil.isNotEmpty(settlementCustomersParametersDTOList)) {
+ for (SettlementCustomersParametersDTO settlementCustomersParametersDTO : settlementCustomersParametersDTOList) {
+ SettlementCustomersParameters settlementCustomersParameters = new SettlementCustomersParameters();
+ settlementCustomersParametersDTO.setSettlementCustomersId(settlementCustomersDO.getSettlementCustomersId());
+ settlementCustomersParametersDTO.setOrganizationId(settlementCustomersDO.getOrganizationId());
+ settlementCustomersParametersDTO.setTopOrganizationId(settlementCustomersDO.getTopOrganizationId());
+ settlementCustomersParametersDTO.setOrganizationName(settlementCustomersDO.getOrganizationName());
+ settlementCustomersParametersDTO.setSettlementCustomersCode(settlementCustomersDO.getSettlementCustomersCode());
+ settlementCustomersParametersDTO.setSettlementEntity(settlementCustomersDO.getSettlementEntity());
+ settlementCustomersParametersDTO.setSettlementEntityId(settlementCustomersDO.getSettlementEntityId());
+ BeanUtils.copyProperties(settlementCustomersParametersDTO, settlementCustomersParameters);
+ settlementCustomersParametersService.save(settlementCustomersParameters);
+ }
+ }
+ }
+
+ return insert;
}
/**
@@ -216,9 +256,89 @@ public class SettlementCustomersApplicationService {
}
//处理数据字典
handleDict(settlementCustomersDO);
+
+ List settlementCustomersNcConfigDTOList = settlementCustomersDO.getSettlementCustomersNcConfigDTOList();
+ if (CollectionUtil.isNotEmpty(settlementCustomersNcConfigDTOList)) {
+ settlementCustomersNcConfigService.remove(new LambdaQueryWrapper()
+ .eq(SettlementCustomersNcConfig::getSettlementCustomersId, settlementCustomersDO.getSettlementCustomersId()));
+ for (SettlementCustomersNcConfigDTO settlementCustomersNcConfigDTO : settlementCustomersNcConfigDTOList) {
+ SettlementCustomersNcConfig settlementCustomersNcConfig = new SettlementCustomersNcConfig();
+ settlementCustomersNcConfigDTO.setSettlementCustomersId(settlementCustomersDO.getSettlementCustomersId());
+ settlementCustomersNcConfigDTO.setOrganizationId(settlementCustomersDO.getOrganizationId());
+ settlementCustomersNcConfigDTO.setTopOrganizationId(settlementCustomersDO.getTopOrganizationId());
+ settlementCustomersNcConfigDTO.setOrganizationName(settlementCustomersDO.getOrganizationName());
+ BeanUtils.copyProperties(settlementCustomersNcConfigDTO, settlementCustomersNcConfig);
+ settlementCustomersNcConfigService.save(settlementCustomersNcConfig);
+ }
+ }
+ List settlementCustomersParametersDTOList = settlementCustomersDO.getSettlementCustomersParametersDTOList();
+ if (CollectionUtil.isNotEmpty(settlementCustomersParametersDTOList)) {
+ settlementCustomersParametersService.remove(new LambdaQueryWrapper()
+ .eq(SettlementCustomersParameters::getSettlementCustomersId, settlementCustomersDO.getSettlementCustomersId()));
+ for (SettlementCustomersParametersDTO settlementCustomersParametersDTO : settlementCustomersParametersDTOList) {
+ SettlementCustomersParameters settlementCustomersParameters = new SettlementCustomersParameters();
+ settlementCustomersParametersDTO.setSettlementCustomersId(settlementCustomersDO.getSettlementCustomersId());
+ settlementCustomersParametersDTO.setOrganizationId(settlementCustomersDO.getOrganizationId());
+ settlementCustomersParametersDTO.setTopOrganizationId(settlementCustomersDO.getTopOrganizationId());
+ settlementCustomersParametersDTO.setOrganizationName(settlementCustomersDO.getOrganizationName());
+ settlementCustomersParametersDTO.setSettlementCustomersCode(settlementCustomersDO.getSettlementCustomersCode());
+ settlementCustomersParametersDTO.setSettlementEntity(settlementCustomersDO.getSettlementEntity());
+ settlementCustomersParametersDTO.setSettlementEntityId(settlementCustomersDO.getSettlementEntityId());
+ BeanUtils.copyProperties(settlementCustomersParametersDTO, settlementCustomersParameters);
+ Long contractManageId1 = settlementCustomersParameters.getContractManageId();
+ if (contractManageId1==null) {
+ ContractManageFeignDTO contractManageDTO = new ContractManageFeignDTO();
+ contractManageDTO.setSettlementCustomersCode(settlementCustomersDO.getSettlementCustomersCode());
+ contractManageDTO.setContractRentType("TEMP");
+ contractManageDTO.setContractRentTypeName("临时合同");
+ contractManageDTO.setOriginalContractNumber(generateHtCode());
+ contractManageDTO.setContractName("临时合同");
+ contractManageDTO.setSigningUnit(settlementCustomersDO.getOrganizationName());
+ contractManageDTO.setCustomerTypeCode("1");
+ contractManageDTO.setCommonContractFlag(2);
+ contractManageDTO.setSigningDate(new Date());
+ contractManageDTO.setEffectiveDate(new Date());
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(9999, Calendar.DECEMBER, 31, 0, 0, 0);
+ Date date = calendar.getTime();
+ contractManageDTO.setExpirationDate(date);
+ contractManageDTO.setContractState(2);
+ contractManageDTO.setPaymentDate(new Date());
+ contractManageDTO.setBillDays(10);
+ AjaxResult ajaxResult = systemServiceFeign.feignSave(contractManageDTO);
+ if (ajaxResult != null && "200".equals(String.valueOf(ajaxResult.get("code")))) {
+ ContractManageFeignDTO contractManageFeignDTO = com.alibaba.fastjson.JSON.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult.get("data")), ContractManageFeignDTO.class);
+ Long contractManageId = contractManageFeignDTO.getContractManageId();
+ String originalContractNumber = contractManageFeignDTO.getOriginalContractNumber();
+ settlementCustomersParameters.setContractManageId(contractManageId);
+ settlementCustomersParameters.setContractNumber(originalContractNumber);
+ } else {
+ throw new ServiceException("创建临时合同失败");
+ }
+ }
+ settlementCustomersParametersService.save(settlementCustomersParameters);
+ }
+ }
return settlementCustomersDomainService.update(settlementCustomersDO);
}
+ private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyMMdd");
+ private static final Random RANDOM = new Random();
+
+ /**
+ * 生成编码:HT + 当天yyMMdd + 6位随机数字
+ * 示例:HT260828123456
+ * @return 编码字符串
+ */
+ public static String generateHtCode() {
+ // 当天yyMMdd
+ String dateStr = LocalDate.now().format(FORMATTER);
+ // 6位随机数 000000‑999999
+ int randomNum = RANDOM.nextInt(1_000_000);
+ String randomStr = String.format("%06d", randomNum);
+ return "HT" + dateStr + randomStr;
+ }
+
/**
* 批量删除结算对象
*/
@@ -433,6 +553,7 @@ public class SettlementCustomersApplicationService {
? userShipperPo.getTopOrganizationId()
: loginUser.getUserPo().getTopOrganizationId());
saveEntity.setCreateTime(new Date());
+ saveEntity.setOrgCode(userShipperPo.getOrgCode());
return saveEntity;
}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomersNcConfig/SettlementCustomersNcConfigApplicationService.java b/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomersNcConfig/SettlementCustomersNcConfigApplicationService.java
new file mode 100644
index 000000000..fa1d51765
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomersNcConfig/SettlementCustomersNcConfigApplicationService.java
@@ -0,0 +1,87 @@
+package com.mhd.bms.application.server.settlementCustomersNcConfig;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.mhd.bms.domain.settlementCustomersNcConfig.entity.SettlementCustomersNcConfig;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.po.SettlementCustomersNcConfigPO;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.todo.SettlementCustomersNcConfigDO;
+import com.mhd.bms.domain.settlementCustomersNcConfig.service.SettlementCustomersNcConfigDomainService;
+import com.mhd.bms.interfaces.dto.settlementCustomersNcConfig.SettlementCustomersNcConfigDTO;
+import com.mhd.common.core.exception.ServiceException;
+import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
+import com.mhd.common.core.exception.digitalLogisticsException.UserError;
+import com.mhd.common.core.utils.StringUtils;
+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;
+import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * 结算对象NC配置ApplicationService
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Service
+@Slf4j
+public class SettlementCustomersNcConfigApplicationService {
+
+ @Autowired
+ private SettlementCustomersNcConfigDomainService settlementCustomersNcConfigDomainService;
+
+ /**
+ * 分页查询结算对象NC配置列表
+ */
+ public List queryList(SettlementCustomersNcConfigDO settlementCustomersNcConfigDO) {
+ return settlementCustomersNcConfigDomainService.queryList(settlementCustomersNcConfigDO);
+ }
+
+ /**
+ * 新增结算对象NC配置
+ */
+ public Boolean insert(SettlementCustomersNcConfigDO settlementCustomersNcConfigDO) {
+ LoginUser loginUser = SecurityUtils.getLoginUser();
+ if (ObjectUtil.isNull(loginUser)) {
+ throw new DigitalLogisticsException(UserError.TIMEOUT);
+ }
+ settlementCustomersNcConfigDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
+ settlementCustomersNcConfigDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
+ settlementCustomersNcConfigDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
+ return settlementCustomersNcConfigDomainService.insert(settlementCustomersNcConfigDO);
+ }
+
+ /**
+ * 修改结算对象NC配置
+ */
+ public Boolean update(SettlementCustomersNcConfigDO settlementCustomersNcConfigDO) {
+ LoginUser loginUser = SecurityUtils.getLoginUser();
+ if (ObjectUtil.isNull(loginUser)) {
+ throw new DigitalLogisticsException(UserError.TIMEOUT);
+ }
+ return settlementCustomersNcConfigDomainService.update(settlementCustomersNcConfigDO);
+ }
+
+ /**
+ * 获取结算对象NC配置详细信息
+ */
+ public SettlementCustomersNcConfigPO getInfo(Long id) {
+ return settlementCustomersNcConfigDomainService.getInfo(id);
+ }
+
+ /**
+ * 批量删除结算对象NC配置
+ */
+ public Boolean deleteByIds(SettlementCustomersNcConfigDTO settlementCustomersNcConfigDTO) {
+ if (!StringUtils.isNotEmpty(settlementCustomersNcConfigDTO.getIds())) {
+ throw new ServiceException("id不能为空");
+ }
+ Set idSet = Stream.of(settlementCustomersNcConfigDTO.getIds().split(",")).collect(Collectors.toSet());
+ Long[] ids = idSet.stream().map(Long::valueOf).toArray(Long[]::new);
+ return settlementCustomersNcConfigDomainService.delete(ids);
+ }
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomersParameters/SettlementCustomersParametersApplicationService.java b/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomersParameters/SettlementCustomersParametersApplicationService.java
new file mode 100644
index 000000000..47959ecc6
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomersParameters/SettlementCustomersParametersApplicationService.java
@@ -0,0 +1,87 @@
+package com.mhd.bms.application.server.settlementCustomersParameters;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.mhd.bms.domain.settlementCustomersParameters.entity.SettlementCustomersParameters;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.po.SettlementCustomersParametersPO;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.todo.SettlementCustomersParametersDO;
+import com.mhd.bms.domain.settlementCustomersParameters.service.SettlementCustomersParametersDomainService;
+import com.mhd.bms.interfaces.dto.settlementCustomersParameters.SettlementCustomersParametersDTO;
+import com.mhd.common.core.exception.ServiceException;
+import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
+import com.mhd.common.core.exception.digitalLogisticsException.UserError;
+import com.mhd.common.core.utils.StringUtils;
+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;
+import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * 结算对象参数ApplicationService
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Service
+@Slf4j
+public class SettlementCustomersParametersApplicationService {
+
+ @Autowired
+ private SettlementCustomersParametersDomainService settlementCustomersParametersDomainService;
+
+ /**
+ * 分页查询结算对象参数列表
+ */
+ public List queryList(SettlementCustomersParametersDO settlementCustomersParametersDO) {
+ return settlementCustomersParametersDomainService.queryList(settlementCustomersParametersDO);
+ }
+
+ /**
+ * 新增结算对象参数
+ */
+ public Boolean insert(SettlementCustomersParametersDO settlementCustomersParametersDO) {
+ LoginUser loginUser = SecurityUtils.getLoginUser();
+ if (ObjectUtil.isNull(loginUser)) {
+ throw new DigitalLogisticsException(UserError.TIMEOUT);
+ }
+ settlementCustomersParametersDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
+ settlementCustomersParametersDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
+ settlementCustomersParametersDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
+ return settlementCustomersParametersDomainService.insert(settlementCustomersParametersDO);
+ }
+
+ /**
+ * 修改结算对象参数
+ */
+ public Boolean update(SettlementCustomersParametersDO settlementCustomersParametersDO) {
+ LoginUser loginUser = SecurityUtils.getLoginUser();
+ if (ObjectUtil.isNull(loginUser)) {
+ throw new DigitalLogisticsException(UserError.TIMEOUT);
+ }
+ return settlementCustomersParametersDomainService.update(settlementCustomersParametersDO);
+ }
+
+ /**
+ * 获取结算对象参数详细信息
+ */
+ public SettlementCustomersParametersPO getInfo(Long id) {
+ return settlementCustomersParametersDomainService.getInfo(id);
+ }
+
+ /**
+ * 批量删除结算对象参数
+ */
+ public Boolean deleteByIds(SettlementCustomersParametersDTO settlementCustomersParametersDTO) {
+ if (!StringUtils.isNotEmpty(settlementCustomersParametersDTO.getIds())) {
+ throw new ServiceException("id不能为空");
+ }
+ Set idSet = Stream.of(settlementCustomersParametersDTO.getIds().split(",")).collect(Collectors.toSet());
+ Long[] ids = idSet.stream().map(Long::valueOf).toArray(Long[]::new);
+ return settlementCustomersParametersDomainService.delete(ids);
+ }
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/entity/SettlementCustomers.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/entity/SettlementCustomers.java
index cd49f93d7..52d80fbcf 100644
--- a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/entity/SettlementCustomers.java
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/entity/SettlementCustomers.java
@@ -94,6 +94,7 @@ public class SettlementCustomers extends BaseVOEntity{
@ApiModelProperty("默认结算币种")
private String settlementCurrency;
-
+ @ApiModelProperty(name = "组织代码")
+ private String orgCode;
}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/repository/persistence/SettlementCustomersImpl.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/repository/persistence/SettlementCustomersImpl.java
index 9b176f853..4cecec153 100644
--- a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/repository/persistence/SettlementCustomersImpl.java
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/repository/persistence/SettlementCustomersImpl.java
@@ -1,11 +1,16 @@
package com.mhd.bms.domain.settlementCustomers.repository.persistence;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mhd.bms.domain.settlementCustomers.entity.SettlementCustomers;
import com.mhd.bms.domain.settlementCustomers.repository.facade.ISettlementCustomersService;
import com.mhd.bms.domain.settlementCustomers.repository.mapper.SettlementCustomersMapper;
import com.mhd.bms.domain.settlementCustomers.repository.po.SettlementCustomersPO;
import com.mhd.bms.domain.settlementCustomers.repository.todo.SettlementCustomersDO;
+import com.mhd.bms.domain.settlementCustomersNcConfig.entity.SettlementCustomersNcConfig;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.mapper.SettlementCustomersNcConfigMapper;
+import com.mhd.bms.domain.settlementCustomersParameters.entity.SettlementCustomersParameters;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.mapper.SettlementCustomersParametersMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -23,6 +28,10 @@ import java.util.List;
public class SettlementCustomersImpl extends ServiceImpl implements ISettlementCustomersService{
@Autowired
private SettlementCustomersMapper settlementCustomersMapper;
+ @Autowired
+ private SettlementCustomersParametersMapper settlementCustomersParametersMapper;
+ @Autowired
+ private SettlementCustomersNcConfigMapper settlementCustomersNcConfigMapper;
/**
* 查询结算对象列表
@@ -30,7 +39,19 @@ public class SettlementCustomersImpl extends ServiceImpl queryList(SettlementCustomersDO settlementCustomersDO)
{
- return settlementCustomersMapper.queryList(settlementCustomersDO);
+ List settlementCustomersPOS = settlementCustomersMapper.queryList(settlementCustomersDO);
+ if (settlementCustomersPOS != null && settlementCustomersPOS.size() > 0) {
+ for (SettlementCustomersPO settlementCustomersPO : settlementCustomersPOS) {
+ Long settlementCustomersId = settlementCustomersPO.getSettlementCustomersId();
+ List settlementCustomersParameters = settlementCustomersParametersMapper.selectList(new LambdaQueryWrapper()
+ .eq(SettlementCustomersParameters::getSettlementCustomersId, settlementCustomersId));
+ List settlementCustomersNcConfigs = settlementCustomersNcConfigMapper.selectList(new LambdaQueryWrapper()
+ .eq(SettlementCustomersNcConfig::getSettlementCustomersId, settlementCustomersId));
+ settlementCustomersPO.setSettlementCustomersParameters(settlementCustomersParameters);
+ settlementCustomersPO.setSettlementCustomersNcConfigs(settlementCustomersNcConfigs);
+ }
+ }
+ return settlementCustomersPOS;
}
@Override
@@ -88,4 +109,4 @@ public class SettlementCustomersImpl extends ServiceImpl settlementCustomersNcConfigs;
+ List settlementCustomersParameters;
}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/repository/todo/SettlementCustomersDO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/repository/todo/SettlementCustomersDO.java
index 413b81ed6..6c90e5c4e 100644
--- a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/repository/todo/SettlementCustomersDO.java
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/repository/todo/SettlementCustomersDO.java
@@ -1,5 +1,7 @@
package com.mhd.bms.domain.settlementCustomers.repository.todo;
+import com.mhd.bms.interfaces.dto.settlementCustomersNcConfig.SettlementCustomersNcConfigDTO;
+import com.mhd.bms.interfaces.dto.settlementCustomersParameters.SettlementCustomersParametersDTO;
import com.mhd.common.core.annotation.Excel;
import lombok.Data;
import java.util.Date;
@@ -131,5 +133,12 @@ public class SettlementCustomersDO extends BaseVOEntity{
@ApiModelProperty("单据类型编码")
private String documentTypeCode;
+ @ApiModelProperty(name = "组织代码")
+ private String orgCode;
+ @ApiModelProperty("结算对象参数")
+ private List settlementCustomersParametersDTOList;
+
+ @ApiModelProperty("结算对象nc配置")
+ private List settlementCustomersNcConfigDTOList;
}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/entity/SettlementCustomersNcConfig.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/entity/SettlementCustomersNcConfig.java
new file mode 100644
index 000000000..e1c23835d
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/entity/SettlementCustomersNcConfig.java
@@ -0,0 +1,80 @@
+package com.mhd.bms.domain.settlementCustomersNcConfig.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.mhd.common.core.annotation.Excel;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+ * 结算对象对象 settlement_customers
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+
+@Data
+public class SettlementCustomersNcConfig extends BaseVOEntity{
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("id")
+ @TableId(type = IdType.AUTO)
+ private Long id;
+
+ @ApiModelProperty("结算对象id")
+ private Long settlementCustomersId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("nc编码")
+ @Excel(name = "nc编码")
+ private String ncCode;
+
+ @ApiModelProperty("结算方式")
+ @Excel(name = "结算方式")
+ private String ncSettleMethod;
+
+ @ApiModelProperty("仓库温层类型")
+ @Excel(name = "仓库温层类型")
+ private String warehouseTempLayerType;
+
+ @ApiModelProperty("散租计费配置")
+ @Excel(name = "散租计费配置")
+ private String scatterRentBillingConfig;
+
+ @ApiModelProperty("结算方式")
+ @Excel(name = "结算方式")
+ private String ncSettleMethodName;
+
+ @ApiModelProperty("仓库温层类型")
+ @Excel(name = "仓库温层类型")
+ private String warehouseTempLayerTypeName;
+
+ @ApiModelProperty("散租计费配置")
+ @Excel(name = "散租计费配置")
+ private String scatterRentBillingConfigName;
+
+ @ApiModelProperty("欠租期上限 (月)")
+ @Excel(name = "欠租期上限 (月)")
+ private Integer oweRentMaxMonth;
+
+ @ApiModelProperty("账期 (天)")
+ @Excel(name = "账期 (天)")
+ private Integer accountPeriodDay;
+
+ @ApiModelProperty("备注")
+ @Excel(name = "备注")
+ private String remark;
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/facade/ISettlementCustomersNcConfigService.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/facade/ISettlementCustomersNcConfigService.java
new file mode 100644
index 000000000..d1b92331a
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/facade/ISettlementCustomersNcConfigService.java
@@ -0,0 +1,42 @@
+package com.mhd.bms.domain.settlementCustomersNcConfig.repository.facade;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.mhd.bms.domain.settlementCustomersNcConfig.entity.SettlementCustomersNcConfig;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.po.SettlementCustomersNcConfigPO;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.todo.SettlementCustomersNcConfigDO;
+
+import java.util.List;
+
+/**
+ * 结算对象NC配置Service接口
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+public interface ISettlementCustomersNcConfigService extends IService {
+
+ /**
+ * 分页查询结算对象NC配置列表
+ */
+ public List queryList(SettlementCustomersNcConfigDO settlementCustomersNcConfigDO);
+
+ /**
+ * 新增结算对象NC配置
+ */
+ public Boolean insert(SettlementCustomersNcConfigDO settlementCustomersNcConfigDO);
+
+ /**
+ * 修改结算对象NC配置
+ */
+ public Boolean update(SettlementCustomersNcConfigDO settlementCustomersNcConfigDO);
+
+ /**
+ * 批量删除结算对象NC配置
+ */
+ public Boolean delete(Long[] ids);
+
+ /**
+ * 查询结算对象NC配置
+ */
+ public SettlementCustomersNcConfigPO getInfo(Long id);
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/mapper/SettlementCustomersNcConfigMapper.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/mapper/SettlementCustomersNcConfigMapper.java
new file mode 100644
index 000000000..8631ffbea
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/mapper/SettlementCustomersNcConfigMapper.java
@@ -0,0 +1,23 @@
+package com.mhd.bms.domain.settlementCustomersNcConfig.repository.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.mhd.bms.domain.settlementCustomersNcConfig.entity.SettlementCustomersNcConfig;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.po.SettlementCustomersNcConfigPO;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.todo.SettlementCustomersNcConfigDO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 结算对象NC配置Mapper接口
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+public interface SettlementCustomersNcConfigMapper extends BaseMapper {
+
+ /**
+ * 查询结算对象NC配置列表
+ */
+ public List queryList(@Param("settlementCustomersNcConfigDO") SettlementCustomersNcConfigDO settlementCustomersNcConfigDO);
+
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/persistence/SettlementCustomersNcConfigImpl.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/persistence/SettlementCustomersNcConfigImpl.java
new file mode 100644
index 000000000..d73c6f6dd
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/persistence/SettlementCustomersNcConfigImpl.java
@@ -0,0 +1,81 @@
+package com.mhd.bms.domain.settlementCustomersNcConfig.repository.persistence;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.mhd.bms.domain.settlementCustomersNcConfig.entity.SettlementCustomersNcConfig;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.facade.ISettlementCustomersNcConfigService;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.mapper.SettlementCustomersNcConfigMapper;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.po.SettlementCustomersNcConfigPO;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.todo.SettlementCustomersNcConfigDO;
+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;
+
+/**
+ * 结算对象NC配置Service业务层处理
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Service
+public class SettlementCustomersNcConfigImpl extends ServiceImpl implements ISettlementCustomersNcConfigService {
+
+ @Autowired
+ private SettlementCustomersNcConfigMapper settlementCustomersNcConfigMapper;
+
+ /**
+ * 查询结算对象NC配置列表
+ */
+ @Override
+ public List queryList(SettlementCustomersNcConfigDO settlementCustomersNcConfigDO) {
+ return settlementCustomersNcConfigMapper.queryList(settlementCustomersNcConfigDO);
+ }
+
+ /**
+ * 新增结算对象NC配置
+ */
+ @Override
+ public Boolean insert(SettlementCustomersNcConfigDO settlementCustomersNcConfigDO) {
+ SettlementCustomersNcConfig settlementCustomersNcConfig = new SettlementCustomersNcConfig();
+ BeanUtils.copyProperties(settlementCustomersNcConfigDO, settlementCustomersNcConfig);
+ return this.save(settlementCustomersNcConfig);
+ }
+
+ /**
+ * 修改结算对象NC配置
+ */
+ @Override
+ public Boolean update(SettlementCustomersNcConfigDO settlementCustomersNcConfigDO) {
+ SettlementCustomersNcConfig settlementCustomersNcConfig = new SettlementCustomersNcConfig();
+ BeanUtils.copyProperties(settlementCustomersNcConfigDO, settlementCustomersNcConfig);
+ return this.updateById(settlementCustomersNcConfig);
+ }
+
+ /**
+ * 批量删除结算对象NC配置
+ */
+ @Override
+ public Boolean delete(Long[] ids) {
+ List list = new ArrayList<>();
+ for (Long id : ids) {
+ SettlementCustomersNcConfig settlementCustomersNcConfig = new SettlementCustomersNcConfig();
+ settlementCustomersNcConfig.setId(id);
+ settlementCustomersNcConfig.setDelFlag(2);
+ list.add(settlementCustomersNcConfig);
+ }
+ return this.updateBatchById(list);
+ }
+
+ /**
+ * 查询结算对象NC配置
+ */
+ @Override
+ public SettlementCustomersNcConfigPO getInfo(Long id) {
+ SettlementCustomersNcConfig settlementCustomersNcConfig = this.getById(id);
+ SettlementCustomersNcConfigPO settlementCustomersNcConfigPO = new SettlementCustomersNcConfigPO();
+ BeanUtils.copyProperties(settlementCustomersNcConfig, settlementCustomersNcConfigPO);
+ return settlementCustomersNcConfigPO;
+ }
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/po/SettlementCustomersNcConfigPO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/po/SettlementCustomersNcConfigPO.java
new file mode 100644
index 000000000..ea98b9086
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/po/SettlementCustomersNcConfigPO.java
@@ -0,0 +1,77 @@
+package com.mhd.bms.domain.settlementCustomersNcConfig.repository.po;
+
+import com.mhd.common.core.annotation.Excel;
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+
+/**
+ * 结算对象NC配置对象 settlement_customers_nc_config
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Data
+@ApiModel(value = "结算对象NC配置对象", description = "结算对象NC配置响应对象")
+public class SettlementCustomersNcConfigPO extends BaseVOEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("id")
+ private Long id;
+
+ @ApiModelProperty("结算对象id")
+ private Long settlementCustomersId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("nc编码")
+ @Excel(name = "nc编码")
+ private String ncCode;
+
+ @ApiModelProperty("结算方式")
+ @Excel(name = "结算方式")
+ private String ncSettleMethod;
+
+ @ApiModelProperty("仓库温层类型")
+ @Excel(name = "仓库温层类型")
+ private String warehouseTempLayerType;
+
+ @ApiModelProperty("散租计费配置")
+ @Excel(name = "散租计费配置")
+ private String scatterRentBillingConfig;
+
+ @ApiModelProperty("结算方式")
+ @Excel(name = "结算方式")
+ private String ncSettleMethodName;
+
+ @ApiModelProperty("仓库温层类型")
+ @Excel(name = "仓库温层类型")
+ private String warehouseTempLayerTypeName;
+
+ @ApiModelProperty("散租计费配置")
+ @Excel(name = "散租计费配置")
+ private String scatterRentBillingConfigName;
+
+ @ApiModelProperty("欠租期上限 (月)")
+ @Excel(name = "欠租期上限 (月)")
+ private Integer oweRentMaxMonth;
+
+ @ApiModelProperty("账期 (天)")
+ @Excel(name = "账期 (天)")
+ private Integer accountPeriodDay;
+
+ @ApiModelProperty("备注")
+ @Excel(name = "备注")
+ private String remark;
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/todo/SettlementCustomersNcConfigDO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/todo/SettlementCustomersNcConfigDO.java
new file mode 100644
index 000000000..466947395
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/repository/todo/SettlementCustomersNcConfigDO.java
@@ -0,0 +1,81 @@
+package com.mhd.bms.domain.settlementCustomersNcConfig.repository.todo;
+
+import com.mhd.common.core.annotation.Excel;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+
+/**
+ * 结算对象NC配置对象 settlement_customers_nc_config
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Data
+public class SettlementCustomersNcConfigDO extends BaseVOEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("id")
+ private Long id;
+
+ @ApiModelProperty("结算对象id")
+ private Long settlementCustomersId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("nc编码")
+ @Excel(name = "nc编码")
+ private String ncCode;
+
+ @ApiModelProperty("结算方式")
+ @Excel(name = "结算方式")
+ private String ncSettleMethod;
+
+ @ApiModelProperty("仓库温层类型")
+ @Excel(name = "仓库温层类型")
+ private String warehouseTempLayerType;
+
+ @ApiModelProperty("散租计费配置")
+ @Excel(name = "散租计费配置")
+ private String scatterRentBillingConfig;
+
+ @ApiModelProperty("结算方式")
+ @Excel(name = "结算方式")
+ private String ncSettleMethodName;
+
+ @ApiModelProperty("仓库温层类型")
+ @Excel(name = "仓库温层类型")
+ private String warehouseTempLayerTypeName;
+
+ @ApiModelProperty("散租计费配置")
+ @Excel(name = "散租计费配置")
+ private String scatterRentBillingConfigName;
+
+ @ApiModelProperty("欠租期上限 (月)")
+ @Excel(name = "欠租期上限 (月)")
+ private Integer oweRentMaxMonth;
+
+ @ApiModelProperty("账期 (天)")
+ @Excel(name = "账期 (天)")
+ private Integer accountPeriodDay;
+
+ @ApiModelProperty("备注")
+ @Excel(name = "备注")
+ private String remark;
+
+ @ApiModelProperty(name = "创建时间查询条件开始日期")
+ private String createTimeStart;
+
+ @ApiModelProperty(name = "创建时间查询条件结束日期")
+ private String createTimeEnd;
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/service/SettlementCustomersNcConfigDomainService.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/service/SettlementCustomersNcConfigDomainService.java
new file mode 100644
index 000000000..257ccec6b
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersNcConfig/service/SettlementCustomersNcConfigDomainService.java
@@ -0,0 +1,59 @@
+package com.mhd.bms.domain.settlementCustomersNcConfig.service;
+
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.facade.ISettlementCustomersNcConfigService;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.po.SettlementCustomersNcConfigPO;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.todo.SettlementCustomersNcConfigDO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 结算对象NC配置领域服务
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Service
+@Slf4j
+public class SettlementCustomersNcConfigDomainService {
+
+ @Autowired
+ private ISettlementCustomersNcConfigService settlementCustomersNcConfigService;
+
+ /**
+ * 分页查询结算对象NC配置列表
+ */
+ public List queryList(SettlementCustomersNcConfigDO settlementCustomersNcConfigDO) {
+ return settlementCustomersNcConfigService.queryList(settlementCustomersNcConfigDO);
+ }
+
+ /**
+ * 新增结算对象NC配置
+ */
+ public Boolean insert(SettlementCustomersNcConfigDO settlementCustomersNcConfigDO) {
+ return settlementCustomersNcConfigService.insert(settlementCustomersNcConfigDO);
+ }
+
+ /**
+ * 修改结算对象NC配置
+ */
+ public Boolean update(SettlementCustomersNcConfigDO settlementCustomersNcConfigDO) {
+ return settlementCustomersNcConfigService.update(settlementCustomersNcConfigDO);
+ }
+
+ /**
+ * 批量删除结算对象NC配置
+ */
+ public Boolean delete(Long[] ids) {
+ return settlementCustomersNcConfigService.delete(ids);
+ }
+
+ /**
+ * 获取结算对象NC配置详细信息
+ */
+ public SettlementCustomersNcConfigPO getInfo(Long id) {
+ return settlementCustomersNcConfigService.getInfo(id);
+ }
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/entity/SettlementCustomersParameters.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/entity/SettlementCustomersParameters.java
new file mode 100644
index 000000000..4fe19b3a6
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/entity/SettlementCustomersParameters.java
@@ -0,0 +1,69 @@
+package com.mhd.bms.domain.settlementCustomersParameters.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.mhd.common.core.annotation.Excel;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+ * 结算对象对象 settlement_customers
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+
+@Data
+public class SettlementCustomersParameters extends BaseVOEntity{
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("id")
+ @TableId(type = IdType.AUTO)
+ private Long id;
+
+ @ApiModelProperty("结算对象id")
+ private Long settlementCustomersId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("结算对象编码")
+ @Excel(name = "结算对象编码")
+ private String settlementCustomersCode;
+
+ @ApiModelProperty("结算主体id")
+ @Excel(name = "结算主体id")
+ private Long settlementEntityId;
+
+ @ApiModelProperty("结算主体")
+ @Excel(name = "结算主体")
+ private String settlementEntity;
+
+ @ApiModelProperty("合同编号")
+ @Excel(name = "合同编号")
+ private String contractNumber;
+
+ @ApiModelProperty("合同管理id")
+ private Long contractManageId;
+
+ @ApiModelProperty("参数内容")
+ @Excel(name = "参数内容")
+ private String content;
+
+ @ApiModelProperty("参数名称")
+ @Excel(name = "参数名称")
+ private String parametersName;
+
+
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/facade/ISettlementCustomersParametersService.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/facade/ISettlementCustomersParametersService.java
new file mode 100644
index 000000000..97a8a3840
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/facade/ISettlementCustomersParametersService.java
@@ -0,0 +1,42 @@
+package com.mhd.bms.domain.settlementCustomersParameters.repository.facade;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.mhd.bms.domain.settlementCustomersParameters.entity.SettlementCustomersParameters;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.po.SettlementCustomersParametersPO;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.todo.SettlementCustomersParametersDO;
+
+import java.util.List;
+
+/**
+ * 结算对象参数Service接口
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+public interface ISettlementCustomersParametersService extends IService {
+
+ /**
+ * 分页查询结算对象参数列表
+ */
+ public List queryList(SettlementCustomersParametersDO settlementCustomersParametersDO);
+
+ /**
+ * 新增结算对象参数
+ */
+ public Boolean insert(SettlementCustomersParametersDO settlementCustomersParametersDO);
+
+ /**
+ * 修改结算对象参数
+ */
+ public Boolean update(SettlementCustomersParametersDO settlementCustomersParametersDO);
+
+ /**
+ * 批量删除结算对象参数
+ */
+ public Boolean delete(Long[] ids);
+
+ /**
+ * 查询结算对象参数
+ */
+ public SettlementCustomersParametersPO getInfo(Long id);
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/mapper/SettlementCustomersParametersMapper.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/mapper/SettlementCustomersParametersMapper.java
new file mode 100644
index 000000000..620eb4784
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/mapper/SettlementCustomersParametersMapper.java
@@ -0,0 +1,23 @@
+package com.mhd.bms.domain.settlementCustomersParameters.repository.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.mhd.bms.domain.settlementCustomersParameters.entity.SettlementCustomersParameters;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.po.SettlementCustomersParametersPO;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.todo.SettlementCustomersParametersDO;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 结算对象参数Mapper接口
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+public interface SettlementCustomersParametersMapper extends BaseMapper {
+
+ /**
+ * 查询结算对象参数列表
+ */
+ public List queryList(@Param("settlementCustomersParametersDO") SettlementCustomersParametersDO settlementCustomersParametersDO);
+
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/persistence/SettlementCustomersParametersImpl.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/persistence/SettlementCustomersParametersImpl.java
new file mode 100644
index 000000000..51f397a5c
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/persistence/SettlementCustomersParametersImpl.java
@@ -0,0 +1,81 @@
+package com.mhd.bms.domain.settlementCustomersParameters.repository.persistence;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.mhd.bms.domain.settlementCustomersParameters.entity.SettlementCustomersParameters;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.facade.ISettlementCustomersParametersService;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.mapper.SettlementCustomersParametersMapper;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.po.SettlementCustomersParametersPO;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.todo.SettlementCustomersParametersDO;
+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 2024-06-17
+ */
+@Service
+public class SettlementCustomersParametersImpl extends ServiceImpl implements ISettlementCustomersParametersService {
+
+ @Autowired
+ private SettlementCustomersParametersMapper settlementCustomersParametersMapper;
+
+ /**
+ * 查询结算对象参数列表
+ */
+ @Override
+ public List queryList(SettlementCustomersParametersDO settlementCustomersParametersDO) {
+ return settlementCustomersParametersMapper.queryList(settlementCustomersParametersDO);
+ }
+
+ /**
+ * 新增结算对象参数
+ */
+ @Override
+ public Boolean insert(SettlementCustomersParametersDO settlementCustomersParametersDO) {
+ SettlementCustomersParameters settlementCustomersParameters = new SettlementCustomersParameters();
+ BeanUtils.copyProperties(settlementCustomersParametersDO, settlementCustomersParameters);
+ return this.save(settlementCustomersParameters);
+ }
+
+ /**
+ * 修改结算对象参数
+ */
+ @Override
+ public Boolean update(SettlementCustomersParametersDO settlementCustomersParametersDO) {
+ SettlementCustomersParameters settlementCustomersParameters = new SettlementCustomersParameters();
+ BeanUtils.copyProperties(settlementCustomersParametersDO, settlementCustomersParameters);
+ return this.updateById(settlementCustomersParameters);
+ }
+
+ /**
+ * 批量删除结算对象参数
+ */
+ @Override
+ public Boolean delete(Long[] ids) {
+ List list = new ArrayList<>();
+ for (Long id : ids) {
+ SettlementCustomersParameters settlementCustomersParameters = new SettlementCustomersParameters();
+ settlementCustomersParameters.setId(id);
+ settlementCustomersParameters.setDelFlag(2);
+ list.add(settlementCustomersParameters);
+ }
+ return this.updateBatchById(list);
+ }
+
+ /**
+ * 查询结算对象参数
+ */
+ @Override
+ public SettlementCustomersParametersPO getInfo(Long id) {
+ SettlementCustomersParameters settlementCustomersParameters = this.getById(id);
+ SettlementCustomersParametersPO settlementCustomersParametersPO = new SettlementCustomersParametersPO();
+ BeanUtils.copyProperties(settlementCustomersParameters, settlementCustomersParametersPO);
+ return settlementCustomersParametersPO;
+ }
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/po/SettlementCustomersParametersPO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/po/SettlementCustomersParametersPO.java
new file mode 100644
index 000000000..0dccab69e
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/po/SettlementCustomersParametersPO.java
@@ -0,0 +1,64 @@
+package com.mhd.bms.domain.settlementCustomersParameters.repository.po;
+
+import com.mhd.common.core.annotation.Excel;
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+
+/**
+ * 结算对象参数对象 settlement_customers_parameters
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Data
+@ApiModel(value = "结算对象参数对象", description = "结算对象参数响应对象")
+public class SettlementCustomersParametersPO extends BaseVOEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("id")
+ private Long id;
+
+ @ApiModelProperty("结算对象id")
+ private Long settlementCustomersId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("结算对象编码")
+ @Excel(name = "结算对象编码")
+ private String settlementCustomersCode;
+
+ @ApiModelProperty("结算主体id")
+ @Excel(name = "结算主体id")
+ private Long settlementEntityId;
+
+ @ApiModelProperty("结算主体")
+ @Excel(name = "结算主体")
+ private String settlementEntity;
+
+ @ApiModelProperty("合同编号")
+ @Excel(name = "合同编号")
+ private String contractNumber;
+
+ @ApiModelProperty("合同管理id")
+ private Long contractManageId;
+
+ @ApiModelProperty("参数内容")
+ @Excel(name = "参数内容")
+ private String content;
+
+ @ApiModelProperty("参数名称")
+ @Excel(name = "参数名称")
+ private String parametersName;
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/todo/SettlementCustomersParametersDO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/todo/SettlementCustomersParametersDO.java
new file mode 100644
index 000000000..9cce537a9
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/repository/todo/SettlementCustomersParametersDO.java
@@ -0,0 +1,68 @@
+package com.mhd.bms.domain.settlementCustomersParameters.repository.todo;
+
+import com.mhd.common.core.annotation.Excel;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+
+/**
+ * 结算对象参数对象 settlement_customers_parameters
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Data
+public class SettlementCustomersParametersDO extends BaseVOEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("id")
+ private Long id;
+
+ @ApiModelProperty("结算对象id")
+ private Long settlementCustomersId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("结算对象编码")
+ @Excel(name = "结算对象编码")
+ private String settlementCustomersCode;
+
+ @ApiModelProperty("结算主体id")
+ @Excel(name = "结算主体id")
+ private Long settlementEntityId;
+
+ @ApiModelProperty("结算主体")
+ @Excel(name = "结算主体")
+ private String settlementEntity;
+
+ @ApiModelProperty("合同编号")
+ @Excel(name = "合同编号")
+ private String contractNumber;
+
+ @ApiModelProperty("合同管理id")
+ private Long contractManageId;
+
+ @ApiModelProperty("参数内容")
+ @Excel(name = "参数内容")
+ private String content;
+
+ @ApiModelProperty("参数名称")
+ @Excel(name = "参数名称")
+ private String parametersName;
+
+ @ApiModelProperty(name = "创建时间查询条件开始日期")
+ private String createTimeStart;
+
+ @ApiModelProperty(name = "创建时间查询条件结束日期")
+ private String createTimeEnd;
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/service/SettlementCustomersParametersDomainService.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/service/SettlementCustomersParametersDomainService.java
new file mode 100644
index 000000000..683bde910
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomersParameters/service/SettlementCustomersParametersDomainService.java
@@ -0,0 +1,59 @@
+package com.mhd.bms.domain.settlementCustomersParameters.service;
+
+import com.mhd.bms.domain.settlementCustomersParameters.repository.facade.ISettlementCustomersParametersService;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.po.SettlementCustomersParametersPO;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.todo.SettlementCustomersParametersDO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 结算对象参数领域服务
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Service
+@Slf4j
+public class SettlementCustomersParametersDomainService {
+
+ @Autowired
+ private ISettlementCustomersParametersService settlementCustomersParametersService;
+
+ /**
+ * 分页查询结算对象参数列表
+ */
+ public List queryList(SettlementCustomersParametersDO settlementCustomersParametersDO) {
+ return settlementCustomersParametersService.queryList(settlementCustomersParametersDO);
+ }
+
+ /**
+ * 新增结算对象参数
+ */
+ public Boolean insert(SettlementCustomersParametersDO settlementCustomersParametersDO) {
+ return settlementCustomersParametersService.insert(settlementCustomersParametersDO);
+ }
+
+ /**
+ * 修改结算对象参数
+ */
+ public Boolean update(SettlementCustomersParametersDO settlementCustomersParametersDO) {
+ return settlementCustomersParametersService.update(settlementCustomersParametersDO);
+ }
+
+ /**
+ * 批量删除结算对象参数
+ */
+ public Boolean delete(Long[] ids) {
+ return settlementCustomersParametersService.delete(ids);
+ }
+
+ /**
+ * 获取结算对象参数详细信息
+ */
+ public SettlementCustomersParametersPO getInfo(Long id) {
+ return settlementCustomersParametersService.getInfo(id);
+ }
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/interfaces/assembler/settlementCustomersNcConfig/SettlementCustomersNcConfigAssembler.java b/mhd_bms/src/main/java/com/mhd/bms/interfaces/assembler/settlementCustomersNcConfig/SettlementCustomersNcConfigAssembler.java
new file mode 100644
index 000000000..15656190e
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/interfaces/assembler/settlementCustomersNcConfig/SettlementCustomersNcConfigAssembler.java
@@ -0,0 +1,71 @@
+package com.mhd.bms.interfaces.assembler.settlementCustomersNcConfig;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.todo.SettlementCustomersNcConfigDO;
+import com.mhd.bms.interfaces.dto.settlementCustomersNcConfig.SettlementCustomersNcConfigDTO;
+import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
+import com.mhd.common.core.exception.digitalLogisticsException.UserError;
+import com.mhd.common.core.utils.bean.BeanUtils;
+import com.mhd.common.core.utils.IgnoreNullUtil;
+import com.mhd.common.security.utils.SecurityUtils;
+import com.mhd.system.api.model.LoginUser;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+/**
+ * 结算对象NC配置Assembler
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Component
+public class SettlementCustomersNcConfigAssembler {
+
+ /**
+ * 转换实体
+ */
+ public SettlementCustomersNcConfigDO toDO(SettlementCustomersNcConfigDTO settlementCustomersNcConfigDTO) {
+ SettlementCustomersNcConfigDO settlementCustomersNcConfigDO = new SettlementCustomersNcConfigDO();
+ // 拷贝
+ BeanUtils.copyProperties(settlementCustomersNcConfigDTO, settlementCustomersNcConfigDO, IgnoreNullUtil.getNullPropertyNames(settlementCustomersNcConfigDTO));
+ LoginUser loginUser = SecurityUtils.getLoginUser();
+ if (ObjectUtil.isNull(loginUser)) {
+ throw new DigitalLogisticsException(UserError.TIMEOUT);
+ }
+ // 获取用户姓名,优先使用userPo中的userName,如果为空则使用realname,最后使用username
+ String userName = null;
+ if (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null) {
+ userName = loginUser.getUserPo().getUserName();
+ } else if (loginUser.getRealname() != null) {
+ userName = loginUser.getRealname();
+ } else {
+ userName = loginUser.getUsername();
+ }
+ // 获取登录人id
+ Long userId = loginUser.getUserid();
+ if (settlementCustomersNcConfigDTO.getId() != null) {
+ if (userId != null) {
+ settlementCustomersNcConfigDO.setUpdateBy(userId);
+ } else {
+ settlementCustomersNcConfigDO.setUpdateBy(0L);
+ }
+ settlementCustomersNcConfigDO.setUpdateByName(userName);
+ settlementCustomersNcConfigDO.setUpdateTime(new Date());
+ } else {
+ if (userId != null) {
+ settlementCustomersNcConfigDO.setCreateBy(userId);
+ settlementCustomersNcConfigDO.setUpdateBy(userId);
+ } else {
+ settlementCustomersNcConfigDO.setCreateBy(0L);
+ settlementCustomersNcConfigDO.setUpdateBy(0L);
+ }
+ settlementCustomersNcConfigDO.setCreateByName(userName);
+ settlementCustomersNcConfigDO.setUpdateByName(userName);
+ settlementCustomersNcConfigDO.setCreateTime(new Date());
+ settlementCustomersNcConfigDO.setUpdateTime(new Date());
+ settlementCustomersNcConfigDO.setDelFlag(1);
+ }
+ return settlementCustomersNcConfigDO;
+ }
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/interfaces/assembler/settlementCustomersParameters/SettlementCustomersParametersAssembler.java b/mhd_bms/src/main/java/com/mhd/bms/interfaces/assembler/settlementCustomersParameters/SettlementCustomersParametersAssembler.java
new file mode 100644
index 000000000..3f3f6602f
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/interfaces/assembler/settlementCustomersParameters/SettlementCustomersParametersAssembler.java
@@ -0,0 +1,71 @@
+package com.mhd.bms.interfaces.assembler.settlementCustomersParameters;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.todo.SettlementCustomersParametersDO;
+import com.mhd.bms.interfaces.dto.settlementCustomersParameters.SettlementCustomersParametersDTO;
+import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
+import com.mhd.common.core.exception.digitalLogisticsException.UserError;
+import com.mhd.common.core.utils.bean.BeanUtils;
+import com.mhd.common.core.utils.IgnoreNullUtil;
+import com.mhd.common.security.utils.SecurityUtils;
+import com.mhd.system.api.model.LoginUser;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+/**
+ * 结算对象参数Assembler
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Component
+public class SettlementCustomersParametersAssembler {
+
+ /**
+ * 转换实体
+ */
+ public SettlementCustomersParametersDO toDO(SettlementCustomersParametersDTO settlementCustomersParametersDTO) {
+ SettlementCustomersParametersDO settlementCustomersParametersDO = new SettlementCustomersParametersDO();
+ // 拷贝
+ BeanUtils.copyProperties(settlementCustomersParametersDTO, settlementCustomersParametersDO, IgnoreNullUtil.getNullPropertyNames(settlementCustomersParametersDTO));
+ LoginUser loginUser = SecurityUtils.getLoginUser();
+ if (ObjectUtil.isNull(loginUser)) {
+ throw new DigitalLogisticsException(UserError.TIMEOUT);
+ }
+ // 获取用户姓名,优先使用userPo中的userName,如果为空则使用realname,最后使用username
+ String userName = null;
+ if (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null) {
+ userName = loginUser.getUserPo().getUserName();
+ } else if (loginUser.getRealname() != null) {
+ userName = loginUser.getRealname();
+ } else {
+ userName = loginUser.getUsername();
+ }
+ // 获取登录人id
+ Long userId = loginUser.getUserid();
+ if (settlementCustomersParametersDTO.getId() != null) {
+ if (userId != null) {
+ settlementCustomersParametersDO.setUpdateBy(userId);
+ } else {
+ settlementCustomersParametersDO.setUpdateBy(0L);
+ }
+ settlementCustomersParametersDO.setUpdateByName(userName);
+ settlementCustomersParametersDO.setUpdateTime(new Date());
+ } else {
+ if (userId != null) {
+ settlementCustomersParametersDO.setCreateBy(userId);
+ settlementCustomersParametersDO.setUpdateBy(userId);
+ } else {
+ settlementCustomersParametersDO.setCreateBy(0L);
+ settlementCustomersParametersDO.setUpdateBy(0L);
+ }
+ settlementCustomersParametersDO.setCreateByName(userName);
+ settlementCustomersParametersDO.setUpdateByName(userName);
+ settlementCustomersParametersDO.setCreateTime(new Date());
+ settlementCustomersParametersDO.setUpdateTime(new Date());
+ settlementCustomersParametersDO.setDelFlag(1);
+ }
+ return settlementCustomersParametersDO;
+ }
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/settlementCustomers/SettlementCustomersDTO.java b/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/settlementCustomers/SettlementCustomersDTO.java
index 71bf8914f..ec4c2a180 100644
--- a/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/settlementCustomers/SettlementCustomersDTO.java
+++ b/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/settlementCustomers/SettlementCustomersDTO.java
@@ -1,5 +1,8 @@
package com.mhd.bms.interfaces.dto.settlementCustomers;
+import com.mhd.bms.domain.settlementCustomersNcConfig.entity.SettlementCustomersNcConfig;
+import com.mhd.bms.interfaces.dto.settlementCustomersNcConfig.SettlementCustomersNcConfigDTO;
+import com.mhd.bms.interfaces.dto.settlementCustomersParameters.SettlementCustomersParametersDTO;
import com.mhd.common.core.annotation.Excel;
import lombok.Data;
import java.util.Date;
@@ -130,4 +133,11 @@ public class SettlementCustomersDTO extends BaseVOEntity{
@ApiModelProperty("单据类型编码")
private String documentTypeCode;
+ @ApiModelProperty(name = "组织代码")
+ private String orgCode;
+
+ @ApiModelProperty("结算对象参数")
+ private List settlementCustomersParametersDTOList;
+ @ApiModelProperty("结算对象nc配置")
+ private List settlementCustomersNcConfigDTOList;
}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/settlementCustomersNcConfig/SettlementCustomersNcConfigDTO.java b/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/settlementCustomersNcConfig/SettlementCustomersNcConfigDTO.java
new file mode 100644
index 000000000..76fc83c55
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/settlementCustomersNcConfig/SettlementCustomersNcConfigDTO.java
@@ -0,0 +1,78 @@
+package com.mhd.bms.interfaces.dto.settlementCustomersNcConfig;
+
+import com.mhd.common.core.annotation.Excel;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+
+/**
+ * 结算对象NC配置对象 settlement_customers_nc_config
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Data
+public class SettlementCustomersNcConfigDTO extends BaseVOEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("id")
+ private Long id;
+
+ @ApiModelProperty("结算对象id")
+ private Long settlementCustomersId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("nc编码")
+ @Excel(name = "nc编码")
+ private String ncCode;
+
+ @ApiModelProperty("结算方式")
+ @Excel(name = "结算方式")
+ private String ncSettleMethod;
+
+ @ApiModelProperty("仓库温层类型")
+ @Excel(name = "仓库温层类型")
+ private String warehouseTempLayerType;
+
+ @ApiModelProperty("散租计费配置")
+ @Excel(name = "散租计费配置")
+ private String scatterRentBillingConfig;
+
+ @ApiModelProperty("结算方式")
+ @Excel(name = "结算方式")
+ private String ncSettleMethodName;
+
+ @ApiModelProperty("仓库温层类型")
+ @Excel(name = "仓库温层类型")
+ private String warehouseTempLayerTypeName;
+
+ @ApiModelProperty("散租计费配置")
+ @Excel(name = "散租计费配置")
+ private String scatterRentBillingConfigName;
+
+ @ApiModelProperty("欠租期上限 (月)")
+ @Excel(name = "欠租期上限 (月)")
+ private Integer oweRentMaxMonth;
+
+ @ApiModelProperty("账期 (天)")
+ @Excel(name = "账期 (天)")
+ private Integer accountPeriodDay;
+
+ @ApiModelProperty("备注")
+ @Excel(name = "备注")
+ private String remark;
+
+ @ApiModelProperty("ids(批量删除用)")
+ private String ids;
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/settlementCustomersParameters/SettlementCustomersParametersDTO.java b/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/settlementCustomersParameters/SettlementCustomersParametersDTO.java
new file mode 100644
index 000000000..fdfa67981
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/interfaces/dto/settlementCustomersParameters/SettlementCustomersParametersDTO.java
@@ -0,0 +1,65 @@
+package com.mhd.bms.interfaces.dto.settlementCustomersParameters;
+
+import com.mhd.common.core.annotation.Excel;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+
+/**
+ * 结算对象参数对象 settlement_customers_parameters
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Data
+public class SettlementCustomersParametersDTO extends BaseVOEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("id")
+ private Long id;
+
+ @ApiModelProperty("结算对象id")
+ private Long settlementCustomersId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("结算对象编码")
+ @Excel(name = "结算对象编码")
+ private String settlementCustomersCode;
+
+ @ApiModelProperty("结算主体id")
+ @Excel(name = "结算主体id")
+ private Long settlementEntityId;
+
+ @ApiModelProperty("结算主体")
+ @Excel(name = "结算主体")
+ private String settlementEntity;
+
+ @ApiModelProperty("合同编号")
+ @Excel(name = "合同编号")
+ private String contractNumber;
+
+ @ApiModelProperty("合同管理id")
+ private Long contractManageId;
+
+ @ApiModelProperty("参数内容")
+ @Excel(name = "参数内容")
+ private String content;
+
+ @ApiModelProperty("参数名称")
+ @Excel(name = "参数名称")
+ private String parametersName;
+
+ @ApiModelProperty("ids(批量删除用)")
+ private String ids;
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/interfaces/facadeApi/SettlementCustomersNcConfigApi.java b/mhd_bms/src/main/java/com/mhd/bms/interfaces/facadeApi/SettlementCustomersNcConfigApi.java
new file mode 100644
index 000000000..b3b7f78af
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/interfaces/facadeApi/SettlementCustomersNcConfigApi.java
@@ -0,0 +1,91 @@
+package com.mhd.bms.interfaces.facadeApi;
+
+import java.util.List;
+
+import com.mhd.bms.application.server.settlementCustomersNcConfig.SettlementCustomersNcConfigApplicationService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import com.mhd.bms.interfaces.dto.settlementCustomersNcConfig.SettlementCustomersNcConfigDTO;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.todo.SettlementCustomersNcConfigDO;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.po.SettlementCustomersNcConfigPO;
+import com.mhd.bms.interfaces.assembler.settlementCustomersNcConfig.SettlementCustomersNcConfigAssembler;
+import javax.annotation.Resource;
+import com.mhd.common.core.web.controller.BaseController;
+import com.mhd.common.core.web.domain.AjaxResult;
+import com.mhd.common.core.web.page.TableDataInfo;
+
+/**
+ * 结算对象NC配置Api
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@Api(tags = "结算对象NC配置")
+@RestController
+@RequestMapping("/settlementCustomersNcConfigApi")
+public class SettlementCustomersNcConfigApi extends BaseController {
+
+ @Autowired
+ private SettlementCustomersNcConfigApplicationService settlementCustomersNcConfigApplicationService;
+
+ @Resource
+ private SettlementCustomersNcConfigAssembler settlementCustomersNcConfigAssembler;
+
+ /**
+ * 分页查询结算对象NC配置列表
+ */
+ @ApiOperation("查询结算对象NC配置列表")
+ @GetMapping("/list")
+ public TableDataInfo list(SettlementCustomersNcConfigDTO settlementCustomersNcConfigDTO) {
+ SettlementCustomersNcConfigDO settlementCustomersNcConfigDO = new SettlementCustomersNcConfigDO();
+ BeanUtils.copyProperties(settlementCustomersNcConfigDTO, settlementCustomersNcConfigDO);
+ startPage();
+ List list = settlementCustomersNcConfigApplicationService.queryList(settlementCustomersNcConfigDO);
+ return getDataTable(list);
+ }
+
+ /**
+ * 保存结算对象NC配置
+ */
+ @ApiOperation("保存结算对象NC配置")
+ @PostMapping("/save")
+ public AjaxResult save(@RequestBody SettlementCustomersNcConfigDTO settlementCustomersNcConfigDTO) {
+ try {
+ // 转换实体
+ SettlementCustomersNcConfigDO settlementCustomersNcConfigDO = settlementCustomersNcConfigAssembler.toDO(settlementCustomersNcConfigDTO);
+ if (settlementCustomersNcConfigDTO.getId() != null) {
+ return toAjax(settlementCustomersNcConfigApplicationService.update(settlementCustomersNcConfigDO));
+ } else {
+ return toAjax(settlementCustomersNcConfigApplicationService.insert(settlementCustomersNcConfigDO));
+ }
+ } catch (Exception e) {
+ return AjaxResult.error("操作失败:" + e.getMessage());
+ }
+ }
+
+ /**
+ * 批量删除结算对象NC配置
+ */
+ @ApiOperation("批量删除结算对象NC配置")
+ @PostMapping("/deleteByIds")
+ public AjaxResult deleteByIds(@RequestBody SettlementCustomersNcConfigDTO settlementCustomersNcConfigDTO) {
+ try {
+ settlementCustomersNcConfigApplicationService.deleteByIds(settlementCustomersNcConfigDTO);
+ return AjaxResult.success("操作成功");
+ } catch (Exception e) {
+ return AjaxResult.error(e.getMessage());
+ }
+ }
+
+ /**
+ * 获取结算对象NC配置详细信息
+ */
+ @ApiOperation("获取结算对象NC配置")
+ @GetMapping(value = "/getInfoById")
+ public AjaxResult getInfoById(SettlementCustomersNcConfigDTO settlementCustomersNcConfigDTO) {
+ return AjaxResult.success(settlementCustomersNcConfigApplicationService.getInfo(settlementCustomersNcConfigDTO.getId()));
+ }
+}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/interfaces/facadeApi/SettlementCustomersParametersApi.java b/mhd_bms/src/main/java/com/mhd/bms/interfaces/facadeApi/SettlementCustomersParametersApi.java
new file mode 100644
index 000000000..8e0a67ca9
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/interfaces/facadeApi/SettlementCustomersParametersApi.java
@@ -0,0 +1,92 @@
+package com.mhd.bms.interfaces.facadeApi;
+
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import com.mhd.bms.application.server.settlementCustomersParameters.SettlementCustomersParametersApplicationService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import com.mhd.bms.interfaces.dto.settlementCustomersParameters.SettlementCustomersParametersDTO;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.todo.SettlementCustomersParametersDO;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.po.SettlementCustomersParametersPO;
+import com.mhd.bms.interfaces.assembler.settlementCustomersParameters.SettlementCustomersParametersAssembler;
+import javax.annotation.Resource;
+import com.mhd.common.core.web.controller.BaseController;
+import com.mhd.common.core.web.domain.AjaxResult;
+import com.mhd.common.core.web.page.TableDataInfo;
+
+/**
+ * 结算对象参数Api
+ *
+ * @author gen
+ * @date 2024-06-17
+ */
+@RestController
+@RequestMapping("/settlementCustomersParametersApi")
+public class SettlementCustomersParametersApi extends BaseController {
+
+ @Autowired
+ private SettlementCustomersParametersApplicationService settlementCustomersParametersApplicationService;
+
+ @Resource
+ private SettlementCustomersParametersAssembler settlementCustomersParametersAssembler;
+
+ /**
+ * 分页查询结算对象参数列表
+ */
+ @ApiOperation("查询结算对象参数列表")
+ @GetMapping("/list")
+ public TableDataInfo list(SettlementCustomersParametersDTO settlementCustomersParametersDTO) {
+ SettlementCustomersParametersDO settlementCustomersParametersDO = new SettlementCustomersParametersDO();
+ BeanUtils.copyProperties(settlementCustomersParametersDTO, settlementCustomersParametersDO);
+ startPage();
+ List list = settlementCustomersParametersApplicationService.queryList(settlementCustomersParametersDO);
+ return getDataTable(list);
+ }
+
+ /**
+ * 保存结算对象参数
+ */
+ @ApiOperation("保存结算对象参数")
+ @PostMapping("/save")
+ public AjaxResult save(@RequestBody SettlementCustomersParametersDTO settlementCustomersParametersDTO) {
+ try {
+ // 转换实体
+ SettlementCustomersParametersDO settlementCustomersParametersDO = settlementCustomersParametersAssembler.toDO(settlementCustomersParametersDTO);
+ if (settlementCustomersParametersDTO.getId() != null) {
+ return toAjax(settlementCustomersParametersApplicationService.update(settlementCustomersParametersDO));
+ } else {
+ return toAjax(settlementCustomersParametersApplicationService.insert(settlementCustomersParametersDO));
+ }
+ } catch (Exception e) {
+ return AjaxResult.error("操作失败:" + e.getMessage());
+ }
+ }
+
+ /**
+ * 批量删除结算对象参数
+ */
+ @ApiOperation("批量删除结算对象参数")
+ @PostMapping("/deleteByIds")
+ public AjaxResult deleteByIds(@RequestBody SettlementCustomersParametersDTO settlementCustomersParametersDTO) {
+ try {
+ settlementCustomersParametersApplicationService.deleteByIds(settlementCustomersParametersDTO);
+ return AjaxResult.success("操作成功");
+ } catch (Exception e) {
+ return AjaxResult.error(e.getMessage());
+ }
+ }
+
+ /**
+ * 获取结算对象参数详细信息
+ */
+ @ApiOperation("获取结算对象参数")
+ @GetMapping(value = "/getInfoById")
+ public AjaxResult getInfoById(SettlementCustomersParametersDTO settlementCustomersParametersDTO) {
+ return AjaxResult.success(settlementCustomersParametersApplicationService.getInfo(settlementCustomersParametersDTO.getId()));
+ }
+}
diff --git a/mhd_bms/src/main/resources/mapper/SettlementCustomersMapper.xml b/mhd_bms/src/main/resources/mapper/SettlementCustomersMapper.xml
index e2fd28e11..e3b71ac36 100644
--- a/mhd_bms/src/main/resources/mapper/SettlementCustomersMapper.xml
+++ b/mhd_bms/src/main/resources/mapper/SettlementCustomersMapper.xml
@@ -43,6 +43,7 @@
+
@@ -115,6 +116,7 @@
bd.business_state,
bd.document_type,
bd.document_type_code,
+ a.org_code,
bd.create_time as business_create_time
from settlement_customers a
left join "NGWL_TEST_USER"."USER_SHIPPER" b on a.settlement_entity_id = b.user_id
diff --git a/mhd_bms/src/main/resources/mapper/SettlementCustomersNcConfigMapper.xml b/mhd_bms/src/main/resources/mapper/SettlementCustomersNcConfigMapper.xml
new file mode 100644
index 000000000..b5008151b
--- /dev/null
+++ b/mhd_bms/src/main/resources/mapper/SettlementCustomersNcConfigMapper.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ a.id,
+ a.settlement_customers_id,
+ a.top_organization_id,
+ a.organization_id,
+ a.organization_name,
+ a.nc_code,
+ a.nc_settle_method,
+ a.warehouse_temp_layer_type,
+ a.scatter_rent_billing_config,
+ a.nc_settle_method_name,
+ a.warehouse_temp_layer_type_name,
+ a.scatter_rent_billing_config_name,
+ a.owe_rent_max_month,
+ a.account_period_day,
+ a.remark,
+ a.create_time,
+ a.create_by,
+ a.create_by_name,
+ a.update_time,
+ a.update_by,
+ a.update_by_name,
+ a.del_flag
+
+
+
+
+
diff --git a/mhd_bms/src/main/resources/mapper/SettlementCustomersParametersMapper.xml b/mhd_bms/src/main/resources/mapper/SettlementCustomersParametersMapper.xml
new file mode 100644
index 000000000..58c2a4b5b
--- /dev/null
+++ b/mhd_bms/src/main/resources/mapper/SettlementCustomersParametersMapper.xml
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ a.id,
+ a.settlement_customers_id,
+ a.top_organization_id,
+ a.organization_id,
+ a.organization_name,
+ a.settlement_customers_code,
+ a.settlement_entity_id,
+ a.settlement_entity,
+ a.contract_number,
+ a.contract_manage_id,
+ a.content,
+ a.parameters_name,
+ a.create_time,
+ a.create_by,
+ a.create_by_name,
+ a.update_time,
+ a.update_by,
+ a.update_by_name,
+ a.del_flag
+
+
+
+
+
From 2c60dc8f84500e98c2a3b4703904407bd5858baf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=A5=8E=E5=85=B4?= <2220574228@qq.com>
Date: Tue, 1 Sep 2026 16:58:39 +0800
Subject: [PATCH 03/45] =?UTF-8?q?bms=E6=94=B9=E9=80=A0;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/mhd/system/api/BmsServiceFeign.java | 4 +
.../mhd/system/api/SystemServiceFeign.java | 5 +
.../api/domain/BusinessDocumentFeign.java | 197 ++++++++++++++++++
.../domain/ContractManageParametersFeign.java | 52 +++++
.../RemoteBmsFeignFallbackFactory.java | 8 +-
.../RemoteSystemFeignFallbackFactory.java | 6 +
.../ContractManageApplicationService.java | 77 ++++++-
...actManageParametersApplicationService.java | 72 +++++++
.../contractManage/entity/ContractManage.java | 22 +-
.../repository/po/ContractManagePO.java | 18 ++
.../repository/todo/ContractManageDO.java | 16 ++
.../service/ContractManageDomainService.java | 16 ++
.../entity/ContractManageParameters.java | 52 +++++
.../IContractManageParametersService.java | 47 +++++
.../ContractManageParametersMapper.java | 26 +++
.../ContractManageParametersImpl.java | 86 ++++++++
.../po/ContractManageParametersPO.java | 51 +++++
.../todo/ContractManageParametersDO.java | 49 +++++
...ContractManageParametersDomainService.java | 105 ++++++++++
.../ContractManageParametersAssembler.java | 65 ++++++
.../dto/contractManage/ContractManageDTO.java | 25 ++-
.../ContractManageParametersDTO.java | 48 +++++
.../ContractManageParametersApi.java | 105 ++++++++++
.../mapper/basic/ContractManageMapper.xml | 12 ++
.../basic/ContractManageParametersMapper.xml | 53 +++++
...SettlementCustomersApplicationService.java | 16 ++
.../SettlementCustomersDomainService.java | 21 +-
mhd_oms/pom.xml | 6 +-
.../IReservationStockInOrderService.java | 2 +
.../mapper/ReservationStockInOrderMapper.java | 2 +
.../ReservationStockInOrderImpl.java | 4 +
...rvationStockInOrderApplicationService.java | 23 ++
.../ReservationStockInOrderDomainService.java | 4 +
.../ReservationStockInOrderApi.java | 22 ++
.../ReservationStockInOrderMapper.xml | 8 +
.../MaterialInventoryApplicationService.java | 113 +++++++++-
.../facade/IMaterialInventoryService.java | 11 +
.../mapper/MaterialInventoryMapper.java | 12 ++
.../persistence/MaterialInventoryImpl.java | 21 ++
.../MaterialInventoryDomainService.java | 23 +-
.../MaterialInventoryApi.java | 21 ++
.../MaterialInventoryMapper.xml | 51 +++++
42 files changed, 1561 insertions(+), 16 deletions(-)
create mode 100644 mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/BusinessDocumentFeign.java
create mode 100644 mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/ContractManageParametersFeign.java
create mode 100644 mhd-modules/mhd-system/src/main/java/com/mhd/basic/application/service/contractManageParameters/ContractManageParametersApplicationService.java
create mode 100644 mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/entity/ContractManageParameters.java
create mode 100644 mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/facade/IContractManageParametersService.java
create mode 100644 mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/mapper/ContractManageParametersMapper.java
create mode 100644 mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/persistence/ContractManageParametersImpl.java
create mode 100644 mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/po/ContractManageParametersPO.java
create mode 100644 mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/todo/ContractManageParametersDO.java
create mode 100644 mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/service/ContractManageParametersDomainService.java
create mode 100644 mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/assember/contractManageParameters/ContractManageParametersAssembler.java
create mode 100644 mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/dto/contractManageParameters/ContractManageParametersDTO.java
create mode 100644 mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/facade/contractManageParameters/ContractManageParametersApi.java
create mode 100644 mhd-modules/mhd-system/src/main/resources/mapper/basic/ContractManageParametersMapper.xml
diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java
index 4ba01f192..c46ed32b1 100644
--- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java
+++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/BmsServiceFeign.java
@@ -3,6 +3,7 @@ package com.mhd.system.api;
import com.mhd.common.core.constant.ServiceNameConstants;
import com.mhd.common.core.domain.dto.BusinessDataPushDTO;
import com.mhd.common.core.web.domain.AjaxResult;
+import com.mhd.system.api.domain.BusinessDocumentFeign;
import com.mhd.system.api.factory.RemoteBmsFeignFallbackFactory;
import com.mhd.system.api.feign.FeignAutoConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
@@ -68,4 +69,7 @@ public interface BmsServiceFeign {
*/
@PostMapping("/businessDocumentApi/wholeRentSynchronizationZXF")
public AjaxResult wholeRentSynchronizationZXF(@RequestBody BusinessDataPushDTO businessDataPushDTO);
+
+ @PostMapping("/businessDocumentApi/save")
+ public AjaxResult feignSaveBusinessDocument(@RequestBody BusinessDocumentFeign businessDocumentFeign);
}
\ No newline at end of file
diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/SystemServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/SystemServiceFeign.java
index af6d318b4..1105c8faa 100644
--- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/SystemServiceFeign.java
+++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/SystemServiceFeign.java
@@ -13,6 +13,7 @@ import com.mhd.common.core.domain.po.SysMultistageDictPo;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.system.api.domain.ContainerFeignPO;
import com.mhd.system.api.domain.ContractManageFeignDTO;
+import com.mhd.system.api.domain.ContractManageParametersFeign;
import com.mhd.system.api.domain.SysDictData;
import com.mhd.system.api.factory.RemoteSystemFeignFallbackFactory;
import com.mhd.system.api.feign.FeignAutoConfiguration;
@@ -396,4 +397,8 @@ public interface SystemServiceFeign {
@PostMapping("/contractManageApi/feignSave")
public AjaxResult feignSave(@RequestBody ContractManageFeignDTO contractManageFeignDTO);
+ @ApiOperation("Feign保存合约信息规则维护")
+ @PostMapping("/contractManageParametersApi/feignSave")
+ public AjaxResult feignSaveContractParameters(@RequestBody ContractManageParametersFeign contractManageParametersFeign);
+
}
\ No newline at end of file
diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/BusinessDocumentFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/BusinessDocumentFeign.java
new file mode 100644
index 000000000..a25cdc40c
--- /dev/null
+++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/BusinessDocumentFeign.java
@@ -0,0 +1,197 @@
+package com.mhd.system.api.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.mhd.common.core.annotation.Excel;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+
+/**
+ * 业务单据对象 business_document
+ *
+ * @author gen
+ * @date 2024-06-21
+ */
+
+@Data
+public class BusinessDocumentFeign extends BaseVOEntity{
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("业务单据记录id")
+ @TableId(type = IdType.AUTO)
+ private Long businessDocumentId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("业务流水")
+ @Excel(name = "业务流水")
+ private String businessFlow;
+
+ @ApiModelProperty("状态(1-未生效,2-已生效,3-已计费,4-已驳回,5-已作废")
+ @Excel(name = "状态", readConverterExp = "状态(1-未生效,2-已生效,3-已计费,4-已驳回,5-已作废")
+ private Integer businessState;
+
+ @ApiModelProperty("来源模块")
+ @Excel(name = "来源模块")
+ private String belongModule;
+
+ @ApiModelProperty("来源模块code")
+ @Excel(name = "来源模块code")
+ private String belongModuleCode;
+
+ @ApiModelProperty("数据来源(1-系统生成,2-手工录入)")
+ @Excel(name = "数据来源", readConverterExp = "1=-系统生成,2-手工录入")
+ private Integer dataSources;
+
+ @ApiModelProperty("单据类型id")
+ @Excel(name = "单据类型id")
+ private Long documentTypeId;
+
+ @ApiModelProperty("单据类型code")
+ @Excel(name = "单据类型code")
+ private String documentTypeCode;
+
+ @ApiModelProperty("单据类型")
+ @Excel(name = "单据类型")
+ private String documentType;
+
+ @ApiModelProperty("原始业务单号")
+ @Excel(name = "原始业务单号")
+ private String originalBusinessNum;
+
+ @ApiModelProperty("项目编码")
+ @Excel(name = "项目编码")
+ private String projectCode;
+
+ @ApiModelProperty("项目名称")
+ @Excel(name = "项目名称")
+ private String projectName;
+
+ @ApiModelProperty("合同编号")
+ @Excel(name = "合同编号")
+ private String contractNumber;
+
+ @ApiModelProperty("合同名称")
+ @Excel(name = "合同名称")
+ private String contractName;
+
+ @ApiModelProperty("账单金额")
+ @Excel(name = "账单金额")
+ private BigDecimal billAmount;
+
+ @ApiModelProperty("预计费金额")
+ @Excel(name = "预计费金额")
+ private BigDecimal estimatedCost;
+
+ @ApiModelProperty("一级费用科目code")
+ @Excel(name = "一级费用科目code")
+ private String firstSubjectCode;
+
+ @ApiModelProperty("一级费用科目(结算项)")
+ @Excel(name = "一级费用科目")
+ private String firstSubjectName;
+
+ @ApiModelProperty("二级费用科目code")
+ @Excel(name = "二级费用科目code")
+ private String secondSubjectCode;
+
+ @ApiModelProperty("二级费用科目(结算项)")
+ @Excel(name = "二级费用科目")
+ private String secondSubjectName;
+
+ @ApiModelProperty("结算对象id")
+ @Excel(name = "结算对象id")
+ private Long settlementCustomersId;
+
+ @ApiModelProperty("结算对象code")
+ @Excel(name = "结算对象code")
+ private String settlementCustomersCode;
+
+ @ApiModelProperty("结算对象")
+ @Excel(name = "结算对象")
+ private String settlementEntity;
+
+ @ApiModelProperty("计费时间")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @Excel(name = "计费时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date billingTime;
+
+ @ApiModelProperty("单据表单json数据")
+ @Excel(name = "单据表单json数据")
+ private String documentFormJson;
+
+ @ApiModelProperty("合同管理id")
+ @Excel(name = "合同管理id", readConverterExp = "合同管理id")
+ private Long contractManageId;
+
+ @ApiModelProperty("项目管理id")
+ @Excel(name = "项目管理id", readConverterExp = "项目管理id")
+ private Long projectManageId;
+
+ @ApiModelProperty("原始流水号")
+ @Excel(name = "原始流水号")
+ private String originalSerialNumber;
+
+ @ApiModelProperty("费用类型code(服务项)")
+ @Excel(name = "费用类型code(服务项)")
+ private String serviceItemsCode;
+
+ @ApiModelProperty("费用类型")
+ @Excel(name = "费用类型")
+ private String serviceItemsName;
+
+ @ApiModelProperty("费用类型id(服务项)")
+ @Excel(name = "费用类型id(服务项)")
+ private Long serviceItemsManageId;
+
+ @ApiModelProperty("单据备注")
+ @Excel(name = "单据备注")
+ private String remark;
+
+ @ApiModelProperty("审核备注")
+ @Excel(name = "审核备注")
+ private String reviewRemarks;
+
+ @ApiModelProperty("结算方式(1-现金,2-油卡)")
+ private Integer settlementWay;
+
+ @ApiModelProperty("结算币种")
+ private String settlementCurrency;
+ @ApiModelProperty("业务员ID")
+ private String salesmanId;
+ @ApiModelProperty("业务员名称")
+ private String salesmanName;
+ @ApiModelProperty("税率")
+ private Double taxRate;
+ @ApiModelProperty("收款帐户")
+ private String paymentAccountId;
+ @ApiModelProperty("收款帐户名称")
+ private String paymentAccountName;
+
+ @ApiModelProperty("计费单位")
+ private String billingUnit;
+ @ApiModelProperty("计费单位2")
+ private String billingUnit2;
+ @ApiModelProperty("计费数量")
+ private BigDecimal billingNum;
+ @ApiModelProperty("计费单价")
+ private BigDecimal billingUnitPrice;
+ @ApiModelProperty("nc科目编码")
+ private String ncSubjectCode;
+}
\ No newline at end of file
diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/ContractManageParametersFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/ContractManageParametersFeign.java
new file mode 100644
index 000000000..77018b8dc
--- /dev/null
+++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/domain/ContractManageParametersFeign.java
@@ -0,0 +1,52 @@
+package com.mhd.system.api.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.mhd.common.core.annotation.Excel;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+ * 合约信息规则维护表
+ *
+ * @author gen
+ * @date 2024-06-07
+ */
+
+@Data
+public class ContractManageParametersFeign extends BaseVOEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("合同管理id")
+ @TableId(type = IdType.AUTO)
+ private Long id;
+
+ @ApiModelProperty("合同管理id")
+ private Long contractManageId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("合同编号")
+ @Excel(name = "合同编号")
+ private String contractNumber;
+
+ @ApiModelProperty("合同名称")
+ @Excel(name = "合同名称")
+ private String contractName;
+
+ @ApiModelProperty("合约信息规则维护")
+ @Excel(name = "合约信息规则维护表")
+ private String parametersJson;
+}
\ No newline at end of file
diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteBmsFeignFallbackFactory.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteBmsFeignFallbackFactory.java
index 1ff15b40c..091297e45 100644
--- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteBmsFeignFallbackFactory.java
+++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteBmsFeignFallbackFactory.java
@@ -6,6 +6,7 @@ import com.mhd.common.core.domain.po.OrganizationPo;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.system.api.BmsServiceFeign;
import com.mhd.system.api.ProductServiceFeign;
+import com.mhd.system.api.domain.BusinessDocumentFeign;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
@@ -66,6 +67,11 @@ public class RemoteBmsFeignFallbackFactory implements FallbackFactory list = contractManageDomainService.queryList(contractManageDO);
+
+ if (!list.isEmpty()) {
+ List contractManageIds = list.stream()
+ .map(ContractManagePO::getContractManageId)
+ .collect(Collectors.toList());
+ List allParams = contractManageParametersDomainService.queryListByManageIds(contractManageIds);
+ Map> paramsMap = allParams.stream()
+ .collect(Collectors.groupingBy(ContractManageParametersPO::getContractManageId));
+ for (ContractManagePO po : list) {
+ po.setContractManageParametersList(paramsMap.getOrDefault(po.getContractManageId(), new ArrayList<>()));
+ }
+ }
+
+ return list;
}
// public BigDecimal getAmount(List subjectAndPriceReturnList) {
@@ -610,6 +636,7 @@ public class ContractManageApplicationService {
*/
//20260702取消同一时间段不能有相同合同校验
//checkContract(contractManageDO);
+ checkUniqueActiveContract(contractManageDO);
handleData(contractManageDO);
handleDict(contractManageDO);
contractManageDO.setContractNumber(OrderSequence.getOrderCode("HT"));
@@ -618,6 +645,7 @@ public class ContractManageApplicationService {
contractManageDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
boolean flag = contractManageDomainService.insert(contractManageDO);
handleDetils(contractManageDO, true);
+ handleParameters(contractManageDO);
return flag;
}
@@ -638,6 +666,7 @@ public class ContractManageApplicationService {
*/
//20260702取消同一时间段不能有相同合同校验
//checkContract(contractManageDO);
+ checkUniqueActiveContract(contractManageDO);
handleData(contractManageDO);
handleDict(contractManageDO);
contractManageDO.setContractNumber(OrderSequence.getOrderCode("HT"));
@@ -645,7 +674,7 @@ public class ContractManageApplicationService {
contractManageDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
contractManageDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
boolean flag = contractManageDomainService.insert(contractManageDO);
- if (flag) {
+ if (!flag) {
throw new ServiceException("新增合同管理失败,请检查数据");
}
handleDetils(contractManageDO, true);
@@ -779,6 +808,26 @@ public class ContractManageApplicationService {
}
}
+ private void checkUniqueActiveContract(ContractManageDO contractManageDO) {
+ if (contractManageDO.getContractState() != null && contractManageDO.getContractState() != 2) {
+ return;
+ }
+ if (contractManageDO.getSettlementCustomersId() == null
+ || StringUtils.isEmpty(contractManageDO.getWarehouseTempLayerType())
+ || StringUtils.isEmpty(contractManageDO.getContractRentType())) {
+ return;
+ }
+ long count = contractManageDomainService.countByUniqueKey(
+ contractManageDO.getSettlementCustomersId(),
+ contractManageDO.getWarehouseTempLayerType(),
+ contractManageDO.getContractRentType(),
+ contractManageDO.getContractManageId()
+ );
+ if (count > 0) {
+ throw new ServiceException("同一结算客户、同一温层、同一租赁类型只能存在一个使用中的合同");
+ }
+ }
+
/**
* 处理合同详情
*/
@@ -877,6 +926,26 @@ public class ContractManageApplicationService {
}
}
+ private void handleParameters(ContractManageDO contractManageDO) {
+ List existingList = contractManageParametersDomainService.queryListByManageId(contractManageDO.getContractManageId());
+ if (!existingList.isEmpty()) {
+ Long[] ids = existingList.stream().map(ContractManageParametersPO::getId).toArray(Long[]::new);
+ contractManageParametersDomainService.delete(ids);
+ }
+ if (StringUtils.isNotEmpty(contractManageDO.getParametersJson())) {
+ ContractManageParametersDTO dto = new ContractManageParametersDTO();
+ dto.setContractManageId(contractManageDO.getContractManageId());
+ dto.setContractNumber(contractManageDO.getContractNumber());
+ dto.setContractName(contractManageDO.getContractName());
+ dto.setParametersJson(contractManageDO.getParametersJson());
+ dto.setOrganizationId(contractManageDO.getOrganizationId());
+ dto.setOrganizationName(contractManageDO.getOrganizationName());
+ dto.setTopOrganizationId(contractManageDO.getTopOrganizationId());
+ ContractManageParametersDO parametersDO = contractManageParametersAssembler.toDO(dto);
+ contractManageParametersDomainService.insert(parametersDO);
+ }
+ }
+
/**
* 修改合同管理
*/
@@ -884,8 +953,10 @@ public class ContractManageApplicationService {
public Boolean update(ContractManageDO contractManageDO) {
validateContractType(contractManageDO.getContractType());
//checkContract(contractManageDO);
+ checkUniqueActiveContract(contractManageDO);
handleData(contractManageDO);
handleDetils(contractManageDO, false);
+ handleParameters(contractManageDO);
handleDict(contractManageDO);
return contractManageDomainService.update(contractManageDO);
}
@@ -911,6 +982,8 @@ public class ContractManageApplicationService {
ContractManagePO result = contractManageDomainService.getInfo(contractManageId);
List contractManageDetailPOList = contractManageDetailDomainService.queryListByManageId(result.getContractManageId());
result.setContractManageDetailPOList(contractManageDetailPOList);
+ List paramsList = contractManageParametersDomainService.queryListByManageId(result.getContractManageId());
+ result.setContractManageParametersList(paramsList);
return result;
}
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/application/service/contractManageParameters/ContractManageParametersApplicationService.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/application/service/contractManageParameters/ContractManageParametersApplicationService.java
new file mode 100644
index 000000000..1b1ad2aa9
--- /dev/null
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/application/service/contractManageParameters/ContractManageParametersApplicationService.java
@@ -0,0 +1,72 @@
+package com.mhd.basic.application.service.contractManageParameters;
+
+import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
+import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
+import com.mhd.basic.domain.contractManageParameters.service.ContractManageParametersDomainService;
+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 2024-06-07
+ */
+@Service
+@Slf4j
+public class ContractManageParametersApplicationService {
+ @Autowired
+ private ContractManageParametersDomainService contractManageParametersDomainService;
+
+
+ /**
+ * 分页查询合约信息规则维护表列表
+ */
+
+ public List queryList(ContractManageParametersDO contractManageParametersDO) {
+ LoginUser loginUser = SecurityUtils.getLoginUser();
+ if (loginUser != null){
+ Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
+ if (topOrganizationId != null && topOrganizationId != 1){
+ contractManageParametersDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
+ }
+ }
+ return contractManageParametersDomainService.queryList(contractManageParametersDO);
+ }
+
+
+ /**
+ * 新增合约信息规则维护表
+ */
+ public Boolean insert(ContractManageParametersDO contractManageParametersDO) {
+
+ return contractManageParametersDomainService.insert(contractManageParametersDO);
+ }
+
+ /**
+ * 修改合约信息规则维护表
+ */
+ public Boolean update(ContractManageParametersDO contractManageParametersDO) {
+ return contractManageParametersDomainService.update(contractManageParametersDO);
+ }
+
+ /**
+ * 批量删除合约信息规则维护表
+ */
+ public boolean delete(Long[] ids) {
+ return contractManageParametersDomainService.delete(ids);
+ }
+
+ /**
+ * 获取合约信息规则维护表详细信息
+ */
+ public ContractManageParametersPO getInfo(Long id)
+ {
+ return contractManageParametersDomainService.getInfo(id);
+ }
+
+
+}
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/entity/ContractManage.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/entity/ContractManage.java
index f6164a5e8..da25eac0a 100644
--- a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/entity/ContractManage.java
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/entity/ContractManage.java
@@ -192,16 +192,30 @@ public class ContractManage extends BaseVOEntity{
@ApiModelProperty(name = "是否包含运输费用(1-包含,2-包含)")
private Integer transportationCosts;
- @ApiModelProperty("客户类型")
+ @ApiModelProperty("合同租赁类型")
private String contractRentType;
- @ApiModelProperty("客户类型编码")
+ @ApiModelProperty("合同租赁类型")
private String contractRentTypeName;
- @ApiModelProperty("客户类型")
+ @ApiModelProperty("仓库温层类型")
private String warehouseTempLayerType;
- @ApiModelProperty("客户类型编码")
+ @ApiModelProperty("仓库温层类型")
private String warehouseTempLayerTypeName;
+ @ApiModelProperty("续期提前天数")
+ private Integer renewalAdvanceDays;
+
+ @ApiModelProperty("标的物")
+ private String subjectMatter;
+
+ @ApiModelProperty("性质")
+ private String nature;
+
+ @ApiModelProperty("合同最初起始日")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @Excel(name = "合同最初起始日", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date initialStartDate;
+
}
\ No newline at end of file
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/repository/po/ContractManagePO.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/repository/po/ContractManagePO.java
index 882259a00..83d580820 100644
--- a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/repository/po/ContractManagePO.java
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/repository/po/ContractManagePO.java
@@ -1,6 +1,7 @@
package com.mhd.basic.domain.contractManage.repository.po;
import com.mhd.basic.domain.contractManageDetail.repository.po.ContractManageDetailPO;
+import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
import com.mhd.basic.interfaces.dto.contractManageDetail.ContractManageDetailDTO;
import com.mhd.common.core.annotation.Excel;
import lombok.Data;
@@ -209,4 +210,21 @@ public class ContractManagePO extends BaseVOEntity{
private String warehouseTempLayerTypeName;
private String isMany;
+
+ @ApiModelProperty("合约信息规则维护列表")
+ private List contractManageParametersList;
+
+ @ApiModelProperty("续期提前天数")
+ private Integer renewalAdvanceDays;
+
+ @ApiModelProperty("标的物")
+ private String subjectMatter;
+
+ @ApiModelProperty("性质")
+ private String nature;
+
+ @ApiModelProperty("合同最初起始日")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @Excel(name = "合同最初起始日", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date initialStartDate;
}
\ No newline at end of file
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/repository/todo/ContractManageDO.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/repository/todo/ContractManageDO.java
index 028244045..3eec53c8a 100644
--- a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/repository/todo/ContractManageDO.java
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/repository/todo/ContractManageDO.java
@@ -240,4 +240,20 @@ public class ContractManageDO extends BaseVOEntity{
@ApiModelProperty("一级费用科目code")
private String firstSubjectCode;
+
+ @ApiModelProperty("合约信息规则维护JSON")
+ private String parametersJson;
+
+ @ApiModelProperty("续期提前天数")
+ private Integer renewalAdvanceDays;
+
+ @ApiModelProperty("标的物")
+ private String subjectMatter;
+
+ @ApiModelProperty("性质")
+ private String nature;
+
+ @ApiModelProperty("合同最初起始日")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date initialStartDate;
}
\ No newline at end of file
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/service/ContractManageDomainService.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/service/ContractManageDomainService.java
index d4b05c992..6d1606e88 100644
--- a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/service/ContractManageDomainService.java
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManage/service/ContractManageDomainService.java
@@ -193,6 +193,22 @@ public class ContractManageDomainService {
}
+ /**
+ * 同结算客户+同温层+同租赁类型+使用中 的合同数量(用于唯一性校验)
+ */
+ public long countByUniqueKey(Long settlementCustomersId, String warehouseTempLayerType, String contractRentType, Long excludeId) {
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(ContractManage::getSettlementCustomersId, settlementCustomersId);
+ wrapper.eq(ContractManage::getWarehouseTempLayerType, warehouseTempLayerType);
+ wrapper.eq(ContractManage::getContractRentType, contractRentType);
+ wrapper.eq(ContractManage::getContractState, 2);
+ wrapper.eq(ContractManage::getDelFlag, 1);
+ if (excludeId != null) {
+ wrapper.ne(ContractManage::getContractManageId, excludeId);
+ }
+ return contractManageService.count(wrapper);
+ }
+
public ContractManagePO getGeneralContract() {
ContractManagePO contractManagePO = new ContractManagePO();
LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/entity/ContractManageParameters.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/entity/ContractManageParameters.java
new file mode 100644
index 000000000..428f32365
--- /dev/null
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/entity/ContractManageParameters.java
@@ -0,0 +1,52 @@
+package com.mhd.basic.domain.contractManageParameters.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 lombok.Data;
+
+
+/**
+ * 合约信息规则维护表
+ *
+ * @author gen
+ * @date 2024-06-07
+ */
+
+@Data
+public class ContractManageParameters extends BaseVOEntity {
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("合同管理id")
+ @TableId(type = IdType.AUTO)
+ private Long id;
+
+ @ApiModelProperty("合同管理id")
+ private Long contractManageId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("合同编号")
+ @Excel(name = "合同编号")
+ private String contractNumber;
+
+ @ApiModelProperty("合同名称")
+ @Excel(name = "合同名称")
+ private String contractName;
+
+ @ApiModelProperty("合约信息规则维护")
+ @Excel(name = "合约信息规则维护表")
+ private String parametersJson;
+}
\ No newline at end of file
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/facade/IContractManageParametersService.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/facade/IContractManageParametersService.java
new file mode 100644
index 000000000..f335cc106
--- /dev/null
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/facade/IContractManageParametersService.java
@@ -0,0 +1,47 @@
+package com.mhd.basic.domain.contractManageParameters.repository.facade;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
+import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
+import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
+
+import java.util.List;
+
+/**
+ * 合约信息规则维护表Service接口
+ *
+ * @author gen
+ * @date 2024-06-07
+ */
+public interface IContractManageParametersService extends IService
+{
+ /**
+ * 分页查询合约信息规则维护表列表
+ */
+ public List queryList(ContractManageParametersDO contractManageParametersDO);
+
+ /**
+ * 新增合约信息规则维护表
+ */
+ public Boolean insert(ContractManageParametersDO contractManageParametersDO);
+
+ /**
+ * 修改合约信息规则维护表
+ */
+ public Boolean update(ContractManageParametersDO contractManageParametersDO);
+
+ /**
+ * 批量删除合约信息规则维护表
+ */
+ public Boolean delete(Long[] ids);
+
+ /**
+ * 查询合约信息规则维护表
+ */
+ public ContractManageParametersPO getInfo(Long id);
+
+ /**
+ * 根据合同管理id查询合约信息规则维护列表
+ */
+ List getListByContractManageId(Long contractManageId);
+}
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/mapper/ContractManageParametersMapper.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/mapper/ContractManageParametersMapper.java
new file mode 100644
index 000000000..70d1f8cec
--- /dev/null
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/mapper/ContractManageParametersMapper.java
@@ -0,0 +1,26 @@
+package com.mhd.basic.domain.contractManageParameters.repository.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
+import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
+import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
+import org.apache.ibatis.annotations.Param;
+/**
+ * 合约信息规则维护表Mapper接口
+ *
+ * @author gen
+ * @date 2024-06-07
+ */
+public interface ContractManageParametersMapper extends BaseMapper
+{
+ /**
+ * 查询合约信息规则维护表列表
+ */
+ public List queryList(@Param("contractManageParametersDO") ContractManageParametersDO contractManageParametersDO);
+
+ /**
+ * 根据合同管理id查询合约信息规则维护列表
+ */
+ List getListByContractManageId(@Param("contractManageId") Long contractManageId);
+}
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/persistence/ContractManageParametersImpl.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/persistence/ContractManageParametersImpl.java
new file mode 100644
index 000000000..83523bfda
--- /dev/null
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/persistence/ContractManageParametersImpl.java
@@ -0,0 +1,86 @@
+package com.mhd.basic.domain.contractManageParameters.repository.persistence;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
+import com.mhd.basic.domain.contractManageParameters.repository.facade.IContractManageParametersService;
+import com.mhd.basic.domain.contractManageParameters.repository.mapper.ContractManageParametersMapper;
+import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
+import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
+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 2024-06-07
+ */
+@Service
+public class ContractManageParametersImpl extends ServiceImpl implements IContractManageParametersService{
+ @Autowired
+ private ContractManageParametersMapper contractManageParametersMapper;
+
+ /**
+ * 查询合约信息规则维护表列表
+ */
+ @Override
+ public List queryList(ContractManageParametersDO contractManageParametersDO)
+ {
+ return contractManageParametersMapper.queryList(contractManageParametersDO);
+ }
+
+ /**
+ * 新增合约信息规则维护表
+ */
+ @Override
+ public Boolean insert(ContractManageParametersDO contractManageParametersDO) {
+ ContractManageParameters contractManageParameters = new ContractManageParameters();
+ BeanUtils.copyProperties(contractManageParametersDO,contractManageParameters);
+ return this.save(contractManageParameters);
+ }
+
+ /**
+ * 修改合约信息规则维护表
+ */
+ @Override
+ public Boolean update(ContractManageParametersDO contractManageParametersDO) {
+ ContractManageParameters contractManageParameters = new ContractManageParameters();
+ BeanUtils.copyProperties(contractManageParametersDO,contractManageParameters);
+ return this.updateById(contractManageParameters);
+ }
+
+ /**
+ * 批量删除合约信息规则维护表
+ */
+ @Override
+ public Boolean delete(Long[] ids ) {
+ List list = new ArrayList<>();
+ for (Long id : ids) {
+ ContractManageParameters contractManageParameters = new ContractManageParameters();
+ contractManageParameters.setId(id);
+ contractManageParameters.setDelFlag(2);
+ list.add(contractManageParameters);
+ }
+ return this.updateBatchById(list);
+ }
+
+ /**
+ * 查询合约信息规则维护表
+ */
+ @Override
+ public ContractManageParametersPO getInfo(Long id) {
+ ContractManageParameters contractManageParameters = this.getById(id);
+ ContractManageParametersPO contractManageParametersPO = new ContractManageParametersPO();
+ BeanUtils.copyProperties(contractManageParameters,contractManageParametersPO);
+ return contractManageParametersPO;
+ }
+
+ @Override
+ public List getListByContractManageId(Long contractManageId) {
+ return contractManageParametersMapper.getListByContractManageId(contractManageId);
+ }
+}
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/po/ContractManageParametersPO.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/po/ContractManageParametersPO.java
new file mode 100644
index 000000000..6c76a08a2
--- /dev/null
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/po/ContractManageParametersPO.java
@@ -0,0 +1,51 @@
+package com.mhd.basic.domain.contractManageParameters.repository.po;
+
+import com.mhd.common.core.annotation.Excel;
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+
+
+/**
+ * 合约信息规则维护表对象 contract_manage_parameters
+ *
+ * @author gen
+ * @date 2024-06-07
+ */
+
+@Data
+@ApiModel(value = "合约信息规则维护表对象", description = "合约信息规则维护表响应对象")
+public class ContractManageParametersPO extends BaseVOEntity{
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("合同管理id")
+ private Long id;
+
+ @ApiModelProperty("合同管理id")
+ private Long contractManageId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("合同编号")
+ @Excel(name = "合同编号")
+ private String contractNumber;
+
+ @ApiModelProperty("合同名称")
+ @Excel(name = "合同名称")
+ private String contractName;
+
+ @ApiModelProperty("合约信息规则维护")
+ @Excel(name = "合约信息规则维护表")
+ private String parametersJson;
+}
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/todo/ContractManageParametersDO.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/todo/ContractManageParametersDO.java
new file mode 100644
index 000000000..dc4a0d8a1
--- /dev/null
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/repository/todo/ContractManageParametersDO.java
@@ -0,0 +1,49 @@
+package com.mhd.basic.domain.contractManageParameters.repository.todo;
+
+import com.mhd.common.core.annotation.Excel;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+
+
+/**
+ * 合约信息规则维护表对象 contract_manage_parameters
+ *
+ * @author gen
+ * @date 2024-06-07
+ */
+
+@Data
+public class ContractManageParametersDO extends BaseVOEntity{
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("合同管理id")
+ private Long id;
+
+ @ApiModelProperty("合同管理id")
+ private Long contractManageId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("合同编号")
+ @Excel(name = "合同编号")
+ private String contractNumber;
+
+ @ApiModelProperty("合同名称")
+ @Excel(name = "合同名称")
+ private String contractName;
+
+ @ApiModelProperty("合约信息规则维护")
+ @Excel(name = "合约信息规则维护表")
+ private String parametersJson;
+}
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/service/ContractManageParametersDomainService.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/service/ContractManageParametersDomainService.java
new file mode 100644
index 000000000..c8cfe039b
--- /dev/null
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/domain/contractManageParameters/service/ContractManageParametersDomainService.java
@@ -0,0 +1,105 @@
+package com.mhd.basic.domain.contractManageParameters.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.mhd.basic.domain.contractManageParameters.entity.ContractManageParameters;
+import com.mhd.basic.domain.contractManageParameters.repository.facade.IContractManageParametersService;
+import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
+import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+/**
+ * 合约信息规则维护表
+ *
+ * @author gen
+ * @date 2024-06-07
+ */
+@Service
+@Slf4j
+public class ContractManageParametersDomainService {
+
+ @Autowired
+ private IContractManageParametersService contractManageParametersService;
+
+
+ /**
+ * 分页查询合约信息规则维护表列表
+ */
+ public List queryList(ContractManageParametersDO contractManageParametersDO) {
+ return contractManageParametersService.queryList(contractManageParametersDO);
+ }
+
+
+ /**
+ * 新增合约信息规则维护表
+ */
+ public Boolean insert(ContractManageParametersDO contractManageParametersDO) {
+
+ return contractManageParametersService.insert(contractManageParametersDO);
+ }
+
+ /**
+ * 修改合约信息规则维护表
+ */
+ public Boolean update(ContractManageParametersDO contractManageParametersDO) {
+ return contractManageParametersService.update(contractManageParametersDO);
+ }
+
+ /**
+ * 批量删除合约信息规则维护表
+ */
+ public Boolean delete(Long[] ids) {
+ return contractManageParametersService.delete(ids);
+ }
+
+ /**
+ * 获取合约信息规则维护表详细信息
+ */
+ public ContractManageParametersPO getInfo(Long id)
+ {
+ return contractManageParametersService.getInfo(id);
+ }
+
+ /**
+ * 根据合同管理id查询合约信息规则维护列表
+ * @param contractManageId
+ * @return
+ */
+ public List queryListByManageId(Long contractManageId) {
+ List resultList = new ArrayList<>();
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(ContractManageParameters::getContractManageId,contractManageId);
+ queryWrapper.eq(ContractManageParameters::getDelFlag,1);
+ List contractManageParametersList = contractManageParametersService.list(queryWrapper);
+ if(contractManageParametersList.size()>0){
+ for (ContractManageParameters contractManageParameters : contractManageParametersList) {
+ ContractManageParametersPO contractManageParametersPO = new ContractManageParametersPO();
+ BeanUtils.copyProperties(contractManageParameters,contractManageParametersPO);
+ resultList.add(contractManageParametersPO);
+ }
+ }
+ return resultList;
+ }
+
+ public List queryListByManageIds(Collection contractManageIds) {
+ List resultList = new ArrayList<>();
+ if (contractManageIds == null || contractManageIds.isEmpty()) {
+ return resultList;
+ }
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.in(ContractManageParameters::getContractManageId, contractManageIds);
+ queryWrapper.eq(ContractManageParameters::getDelFlag, 1);
+ List entityList = contractManageParametersService.list(queryWrapper);
+ for (ContractManageParameters entity : entityList) {
+ ContractManageParametersPO po = new ContractManageParametersPO();
+ BeanUtils.copyProperties(entity, po);
+ resultList.add(po);
+ }
+ return resultList;
+ }
+}
\ No newline at end of file
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/assember/contractManageParameters/ContractManageParametersAssembler.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/assember/contractManageParameters/ContractManageParametersAssembler.java
new file mode 100644
index 000000000..f68062690
--- /dev/null
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/assember/contractManageParameters/ContractManageParametersAssembler.java
@@ -0,0 +1,65 @@
+package com.mhd.basic.interfaces.assember.contractManageParameters;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
+import com.mhd.basic.interfaces.dto.contractManageParameters.ContractManageParametersDTO;
+import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
+import com.mhd.common.core.exception.digitalLogisticsException.UserError;
+import com.mhd.common.core.utils.bean.BeanUtils;
+import com.mhd.common.core.utils.IgnoreNullUtil;
+import com.mhd.common.security.utils.SecurityUtils;
+import com.mhd.system.api.model.LoginUser;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+/**
+ * 合约信息规则维护表Assembler
+ *
+ * @author gen
+ * @date 2024-06-07
+ */
+@Component
+public class ContractManageParametersAssembler {
+
+ /**
+ * 转换实体
+ */
+ public ContractManageParametersDO toDO(ContractManageParametersDTO contractManageParametersDTO) {
+ ContractManageParametersDO contractManageParametersDO = new ContractManageParametersDO();
+ // 拷贝
+ BeanUtils.copyProperties(contractManageParametersDTO, contractManageParametersDO, IgnoreNullUtil.getNullPropertyNames(contractManageParametersDTO));
+ LoginUser loginUser = SecurityUtils.getLoginUser();
+ if (ObjectUtil.isNull(loginUser)) {
+ throw new DigitalLogisticsException(UserError.TIMEOUT);
+ }
+ String userName = loginUser.getUsername();
+ // 获取登录人id
+ Long userId = loginUser.getUserid();
+ if(contractManageParametersDTO.getId() != null){
+ if(userId != null){
+ contractManageParametersDO.setUpdateBy(userId);
+ }else {
+ contractManageParametersDO.setUpdateBy(new Long("0"));
+ }
+ contractManageParametersDO.setUpdateByName(userName);
+ contractManageParametersDO.setUpdateTime(new Date());
+
+ }else {
+ if(userId != null){
+ contractManageParametersDO.setCreateBy(userId);
+ contractManageParametersDO.setUpdateBy(userId);
+ }else {
+ contractManageParametersDO.setCreateBy(new Long("0"));
+ contractManageParametersDO.setUpdateBy(new Long("0"));
+ }
+ contractManageParametersDO.setCreateByName(userName);
+ contractManageParametersDO.setUpdateByName(userName);
+ contractManageParametersDO.setCreateTime(new Date());
+ contractManageParametersDO.setUpdateTime(new Date());
+ contractManageParametersDO.setDelFlag(1);
+ }
+ return contractManageParametersDO;
+ }
+
+}
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/dto/contractManage/ContractManageDTO.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/dto/contractManage/ContractManageDTO.java
index 7701786df..229340afd 100644
--- a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/dto/contractManage/ContractManageDTO.java
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/dto/contractManage/ContractManageDTO.java
@@ -217,15 +217,32 @@ public class ContractManageDTO extends BaseVOEntity{
@ApiModelProperty(name = "是否包含运输费用(1-包含,2-包含)")
private Integer transportationCosts;
- @ApiModelProperty("客户类型")
+ @ApiModelProperty("合同租赁类型code")
private String contractRentType;
- @ApiModelProperty("客户类型编码")
+ @ApiModelProperty("合同租赁类型名称")
private String contractRentTypeName;
- @ApiModelProperty("仓库温层类型")
+ @ApiModelProperty("仓库温层类型code")
private String warehouseTempLayerType;
- @ApiModelProperty("仓库温层类型编码")
+ @ApiModelProperty("仓库温层类型编码名称")
private String warehouseTempLayerTypeName;
+
+ @ApiModelProperty("合约信息规则维护JSON")
+ private String parametersJson;
+
+ @ApiModelProperty("续期提前天数")
+ private Integer renewalAdvanceDays;
+
+ @ApiModelProperty("标的物")
+ private String subjectMatter;
+
+ @ApiModelProperty("性质")
+ private String nature;
+
+ @ApiModelProperty("合同最初起始日")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @Excel(name = "合同最初起始日", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date initialStartDate;
}
\ No newline at end of file
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/dto/contractManageParameters/ContractManageParametersDTO.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/dto/contractManageParameters/ContractManageParametersDTO.java
new file mode 100644
index 000000000..a67e8840a
--- /dev/null
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/dto/contractManageParameters/ContractManageParametersDTO.java
@@ -0,0 +1,48 @@
+package com.mhd.basic.interfaces.dto.contractManageParameters;
+
+import com.mhd.common.core.annotation.Excel;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+import com.mhd.common.core.web.domain.BaseVOEntity;
+
+/**
+ * 合约信息规则维护表对象 contract_manage_parameters
+ *
+ * @author gen
+ * @date 2024-06-07
+ */
+
+@Data
+public class ContractManageParametersDTO extends BaseVOEntity{
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("合同管理id")
+ private Long id;
+
+ @ApiModelProperty("合同管理id")
+ private Long contractManageId;
+
+ @ApiModelProperty("一级组织表ID")
+ @Excel(name = "一级组织表ID")
+ private Long topOrganizationId;
+
+ @ApiModelProperty("组织表ID")
+ @Excel(name = "组织表ID")
+ private Long organizationId;
+
+ @ApiModelProperty("组织名称")
+ @Excel(name = "组织名称")
+ private String organizationName;
+
+ @ApiModelProperty("合同编号")
+ @Excel(name = "合同编号")
+ private String contractNumber;
+
+ @ApiModelProperty("合同名称")
+ @Excel(name = "合同名称")
+ private String contractName;
+
+ @ApiModelProperty("合约信息规则维护")
+ @Excel(name = "合约信息规则维护表")
+ private String parametersJson;
+}
diff --git a/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/facade/contractManageParameters/ContractManageParametersApi.java b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/facade/contractManageParameters/ContractManageParametersApi.java
new file mode 100644
index 000000000..761a0d5dd
--- /dev/null
+++ b/mhd-modules/mhd-system/src/main/java/com/mhd/basic/interfaces/facade/contractManageParameters/ContractManageParametersApi.java
@@ -0,0 +1,105 @@
+package com.mhd.basic.interfaces.facade.contractManageParameters;
+
+import java.util.List;
+
+import com.mhd.basic.interfaces.assember.contractManageParameters.ContractManageParametersAssembler;
+import com.mhd.system.api.domain.ContractManageParametersFeign;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.mhd.basic.interfaces.dto.contractManageParameters.ContractManageParametersDTO;
+import com.mhd.basic.domain.contractManageParameters.repository.todo.ContractManageParametersDO;
+import com.mhd.basic.domain.contractManageParameters.repository.po.ContractManageParametersPO;
+import com.mhd.basic.application.service.contractManageParameters.ContractManageParametersApplicationService;
+import javax.annotation.Resource;
+import com.mhd.common.core.web.controller.BaseController;
+import com.mhd.common.core.web.domain.AjaxResult;
+import com.mhd.common.core.web.page.TableDataInfo;
+
+/**
+ * 合约信息规则维护表Api
+ *
+ * @author gen
+ * @date 2024-06-07
+ */
+@RestController
+@RequestMapping("/contractManageParametersApi")
+public class ContractManageParametersApi extends BaseController{
+ @Autowired
+ private ContractManageParametersApplicationService contractManageParametersApplicationService;
+
+ @Resource
+ private ContractManageParametersAssembler contractManageParametersAssembler;
+
+ /**
+ * 分页查询合约信息规则维护表列表
+ */
+ @ApiOperation("查询合约信息规则维护表列表")
+ @GetMapping("/list")
+ public TableDataInfo list(ContractManageParametersDTO contractManageParametersDTO)
+ {
+ //转换实体
+ ContractManageParametersDO contractManageParametersDO = contractManageParametersAssembler.toDO(contractManageParametersDTO);
+ startPage();
+ List list = contractManageParametersApplicationService.queryList(contractManageParametersDO);
+ return getDataTable(list);
+ }
+
+ /**
+ * 编辑合约信息规则维护表
+ */
+ @ApiOperation("编辑合约信息规则维护表")
+ @PostMapping("/edit")
+ public AjaxResult edit(@RequestBody ContractManageParametersDTO contractManageParametersDTO)
+ {
+ //转换实体
+ ContractManageParametersDO contractManageParametersDO = contractManageParametersAssembler.toDO(contractManageParametersDTO);
+ if(contractManageParametersDTO.getId() != null){
+ return toAjax(contractManageParametersApplicationService.update(contractManageParametersDO));
+ }else {
+ return toAjax(contractManageParametersApplicationService.insert(contractManageParametersDO));
+ }
+ }
+
+ /**
+ * 批量删除合约信息规则维护表
+ */
+ @ApiOperation("批量删除合约信息规则维护表")
+ @DeleteMapping("/deleteByIds/{ids}")
+ public AjaxResult delete(@PathVariable Long[] ids)
+ {
+ return toAjax(contractManageParametersApplicationService.delete(ids));
+ }
+
+ /**
+ * 获取合约信息规则维护表详细信息
+ */
+ @ApiOperation("获取合约信息规则维护表")
+ @GetMapping(value = "/getInfo/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return AjaxResult.success(contractManageParametersApplicationService.getInfo(id));
+ }
+
+ @ApiOperation("Feign保存合约信息规则维护")
+ @PostMapping("/feignSave")
+ public AjaxResult feignSave(@RequestBody ContractManageParametersFeign contractManageParametersFeign)
+ {
+ try {
+ ContractManageParametersDTO contractManageParametersDTO = new ContractManageParametersDTO();
+ BeanUtils.copyProperties(contractManageParametersFeign, contractManageParametersDTO);
+ ContractManageParametersDO contractManageParametersDO = contractManageParametersAssembler.toDO(contractManageParametersDTO);
+ return toAjax(contractManageParametersApplicationService.insert(contractManageParametersDO));
+ } catch (Exception e) {
+ return AjaxResult.error(e.getMessage());
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/basic/ContractManageMapper.xml b/mhd-modules/mhd-system/src/main/resources/mapper/basic/ContractManageMapper.xml
index 8055043aa..988aefebd 100644
--- a/mhd-modules/mhd-system/src/main/resources/mapper/basic/ContractManageMapper.xml
+++ b/mhd-modules/mhd-system/src/main/resources/mapper/basic/ContractManageMapper.xml
@@ -210,6 +210,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and b.FIRST_SUBJECT_CODE = #{contractManageDO.firstSubjectCode}
+
+ and a.renewal_advance_days = #{contractManageDO.renewalAdvanceDays}
+
+
+ and a.subject_matter like concat('%', #{contractManageDO.subjectMatter}, '%')
+
+
+ and a.nature = #{contractManageDO.nature}
+
+
+ and a.initial_start_date = #{contractManageDO.initialStartDate}
+
\ No newline at end of file
diff --git a/mhd-modules/mhd-system/src/main/resources/mapper/basic/ContractManageParametersMapper.xml b/mhd-modules/mhd-system/src/main/resources/mapper/basic/ContractManageParametersMapper.xml
new file mode 100644
index 000000000..ac42df8f6
--- /dev/null
+++ b/mhd-modules/mhd-system/src/main/resources/mapper/basic/ContractManageParametersMapper.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+ select
+ *
+ from contract_manage_parameters
+
+
+
+
+
+ and contract_manage_id = #{contractManageId}
+
+
+ and top_organization_id = #{topOrganizationId}
+
+
+ and organization_id = #{organizationId}
+
+
+ and organization_name like concat('%', #{organizationName}, '%')
+
+
+ and contract_number like concat('%', #{contractNumber}, '%')
+
+
+ and contract_name like concat('%', #{contractName}, '%')
+
+
+
+
+
+
+
+
diff --git a/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomers/SettlementCustomersApplicationService.java b/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomers/SettlementCustomersApplicationService.java
index 66d41ca11..9b622d0eb 100644
--- a/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomers/SettlementCustomersApplicationService.java
+++ b/mhd_bms/src/main/java/com/mhd/bms/application/server/settlementCustomers/SettlementCustomersApplicationService.java
@@ -31,6 +31,7 @@ import com.mhd.system.api.SystemServiceFeign;
import com.mhd.system.api.UserServiceFeign;
import com.mhd.system.api.domain.BatchDetailFeignPO;
import com.mhd.system.api.domain.ContractManageFeignDTO;
+import com.mhd.system.api.domain.ContractManageParametersFeign;
import com.mhd.system.api.domain.WarehouseFeignPO;
import com.mhd.system.api.model.LoginUser;
import lombok.extern.slf4j.Slf4j;
@@ -39,6 +40,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
@@ -243,6 +245,7 @@ public class SettlementCustomersApplicationService {
/**
* 修改结算对象
*/
+ @Transactional
public Boolean update(SettlementCustomersDO settlementCustomersDO) {
LoginUser loginUser = SecurityUtils.getLoginUser();
if (ObjectUtil.isNull(loginUser)) {
@@ -305,6 +308,7 @@ public class SettlementCustomersApplicationService {
contractManageDTO.setContractState(2);
contractManageDTO.setPaymentDate(new Date());
contractManageDTO.setBillDays(10);
+ contractManageDTO.setContractType(1);
AjaxResult ajaxResult = systemServiceFeign.feignSave(contractManageDTO);
if (ajaxResult != null && "200".equals(String.valueOf(ajaxResult.get("code")))) {
ContractManageFeignDTO contractManageFeignDTO = com.alibaba.fastjson.JSON.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(ajaxResult.get("data")), ContractManageFeignDTO.class);
@@ -312,6 +316,18 @@ public class SettlementCustomersApplicationService {
String originalContractNumber = contractManageFeignDTO.getOriginalContractNumber();
settlementCustomersParameters.setContractManageId(contractManageId);
settlementCustomersParameters.setContractNumber(originalContractNumber);
+ ContractManageParametersFeign contractManageParametersFeign = new ContractManageParametersFeign();
+ contractManageParametersFeign.setContractManageId(contractManageId);
+ contractManageParametersFeign.setContractName(contractManageFeignDTO.getContractName());
+ contractManageParametersFeign.setContractNumber(contractManageFeignDTO.getContractNumber());
+ contractManageParametersFeign.setParametersJson(settlementCustomersParametersDTO.getContent());
+ contractManageParametersFeign.setOrganizationId(settlementCustomersDO.getOrganizationId());
+ contractManageParametersFeign.setOrganizationName(settlementCustomersDO.getOrganizationName());
+ contractManageParametersFeign.setTopOrganizationId(settlementCustomersDO.getTopOrganizationId());
+ AjaxResult paramResult = systemServiceFeign.feignSaveContractParameters(contractManageParametersFeign);
+ if (paramResult == null || !"200".equals(String.valueOf(paramResult.get("code")))) {
+ throw new ServiceException("保存合同参数失败");
+ }
} else {
throw new ServiceException("创建临时合同失败");
}
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/service/SettlementCustomersDomainService.java b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/service/SettlementCustomersDomainService.java
index e19edf83e..2da9d3ecf 100644
--- a/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/service/SettlementCustomersDomainService.java
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/settlementCustomers/service/SettlementCustomersDomainService.java
@@ -5,6 +5,10 @@ import com.mhd.bms.domain.settlementCustomers.entity.SettlementCustomers;
import com.mhd.bms.domain.settlementCustomers.repository.facade.ISettlementCustomersService;
import com.mhd.bms.domain.settlementCustomers.repository.po.SettlementCustomersPO;
import com.mhd.bms.domain.settlementCustomers.repository.todo.SettlementCustomersDO;
+import com.mhd.bms.domain.settlementCustomersNcConfig.entity.SettlementCustomersNcConfig;
+import com.mhd.bms.domain.settlementCustomersNcConfig.repository.facade.ISettlementCustomersNcConfigService;
+import com.mhd.bms.domain.settlementCustomersParameters.entity.SettlementCustomersParameters;
+import com.mhd.bms.domain.settlementCustomersParameters.repository.facade.ISettlementCustomersParametersService;
import com.mhd.common.security.utils.SecurityUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -24,6 +28,11 @@ public class SettlementCustomersDomainService {
@Autowired
private ISettlementCustomersService settlementCustomersService;
+ @Autowired
+ private ISettlementCustomersNcConfigService settlementCustomersNcConfigService;
+
+ @Autowired
+ private ISettlementCustomersParametersService settlementCustomersParametersService;
/**
* 分页查询结算对象列表
@@ -64,7 +73,17 @@ public class SettlementCustomersDomainService {
*/
public SettlementCustomersPO getInfo(Long settlementCustomersId)
{
- return settlementCustomersService.getInfo(settlementCustomersId);
+ SettlementCustomersPO info = settlementCustomersService.getInfo(settlementCustomersId);
+
+ LambdaQueryWrapper ncConfigWrapper = new LambdaQueryWrapper<>();
+ ncConfigWrapper.eq(SettlementCustomersNcConfig::getSettlementCustomersId, settlementCustomersId);
+ info.setSettlementCustomersNcConfigs(settlementCustomersNcConfigService.list(ncConfigWrapper));
+
+ LambdaQueryWrapper parametersWrapper = new LambdaQueryWrapper<>();
+ parametersWrapper.eq(SettlementCustomersParameters::getSettlementCustomersId, settlementCustomersId);
+ info.setSettlementCustomersParameters(settlementCustomersParametersService.list(parametersWrapper));
+
+ return info;
}
diff --git a/mhd_oms/pom.xml b/mhd_oms/pom.xml
index 0e328f990..170cf7d1f 100644
--- a/mhd_oms/pom.xml
+++ b/mhd_oms/pom.xml
@@ -127,7 +127,11 @@
com.mhd
mhd-common-log
-
+
+ com.xuxueli
+ xxl-job-core
+ 2.4.0
+
diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/facade/IReservationStockInOrderService.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/facade/IReservationStockInOrderService.java
index 5e62c95f9..068e4b62a 100644
--- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/facade/IReservationStockInOrderService.java
+++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/facade/IReservationStockInOrderService.java
@@ -66,4 +66,6 @@ public interface IReservationStockInOrderService extends IService queryPushBmsList();
}
\ No newline at end of file
diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/mapper/ReservationStockInOrderMapper.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/mapper/ReservationStockInOrderMapper.java
index 8f6078a99..6c3f72dd8 100644
--- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/mapper/ReservationStockInOrderMapper.java
+++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/mapper/ReservationStockInOrderMapper.java
@@ -77,4 +77,6 @@ public interface ReservationStockInOrderMapper extends BaseMapper generateReserveOrderNumber1(@Param("prefix") String prefix);
int existsByOrderNumber(@Param("inOrderNumber") String inOrderNumber);
+
+ public List queryPushBmsList();
}
\ No newline at end of file
diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/persistence/ReservationStockInOrderImpl.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/persistence/ReservationStockInOrderImpl.java
index 26d21686d..d7c311578 100644
--- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/persistence/ReservationStockInOrderImpl.java
+++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/repository/persistence/ReservationStockInOrderImpl.java
@@ -770,5 +770,9 @@ public class ReservationStockInOrderImpl extends ServiceImpl queryPushBmsList() {
+ return stockInOrderMapper.queryPushBmsList();
+ }
+
}
\ No newline at end of file
diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderApplicationService.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderApplicationService.java
index fe3a31e02..b84d86932 100644
--- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderApplicationService.java
+++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderApplicationService.java
@@ -18,6 +18,8 @@ import com.mhd.oms.domain.gwLog.repository.mapper.GwLogMapper;
import com.mhd.oms.domain.reservationInMaterialDetail.entity.ReservationInMaterialDetail;
import com.mhd.oms.domain.reservationInMaterialDetail.repository.mapper.ReservationInMaterialDetailMapper;
import com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO;
+import com.mhd.oms.domain.reservationMaterialInventory.repository.facade.IReservationMaterialInventoryService;
+import com.mhd.oms.domain.reservationMaterialInventory.repository.mapper.ReservationMaterialInventoryMapper;
import com.mhd.oms.domain.reservationStockInOrder.entity.ReservationStockInOrder;
import com.mhd.oms.domain.reservationStockInOrder.repository.mapper.ReservationStockInOrderMapper;
import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO;
@@ -76,6 +78,8 @@ public class ReservationStockInOrderApplicationService {
private ReservationStockInOrderMapper reservationStockInOrderMapper;
@Autowired
private ReservationInMaterialDetailMapper reservationInMaterialDetailMapper;
+ @Autowired
+ private IReservationMaterialInventoryService reservationMaterialInventoryService;
// @Autowired
// private IMaterialBaseInfoService materialBaseInfoService;
private static final String PUSH_API_URL = "http://10.102.192.15/nagu-erp-api/transfer/pushData";
@@ -2285,4 +2289,23 @@ public class ReservationStockInOrderApplicationService {
public String generateReserveOrderNumber1() {
return stockInOrderDomainService.generateReserveOrderNumber1();
}
+
+ public List queryPushBmsList() {
+ return stockInOrderDomainService.queryPushBmsList();
+ }
+
+ public void pushBillingRecord() {
+
+ //reservationMaterialInventoryService
+ // 当天应该推送的数据
+ List reservationStockInOrderPOS = stockInOrderDomainService.queryPushBmsList();
+ if (reservationStockInOrderPOS!=null&&reservationStockInOrderPOS.size()>0){
+ for (ReservationStockInOrderPO reservationStockInOrderPO : reservationStockInOrderPOS) {
+ String inOrderNumber = reservationStockInOrderPO.getInOrderNumber();
+ ReservationInMaterialDetail reservationInMaterialDetail = reservationInMaterialDetailMapper.selectOne(new LambdaQueryWrapper()
+ .eq(ReservationInMaterialDetail::getInOrderNumber, inOrderNumber)
+ .eq(ReservationInMaterialDetail::getDelFlag, 0));
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderDomainService.java b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderDomainService.java
index 591c799b1..ce5d6f45f 100644
--- a/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderDomainService.java
+++ b/mhd_oms/src/main/java/com/mhd/oms/domain/reservationStockInOrder/service/ReservationStockInOrderDomainService.java
@@ -1474,4 +1474,8 @@ public class ReservationStockInOrderDomainService {
// 与 generateReserveOrderNumber 收敛为同一套跨表取号逻辑,避免两份实现日后分叉
return generateReserveOrderNumber();
}
+
+ public List queryPushBmsList() {
+ return stockInOrderService.queryPushBmsList();
+ }
}
\ No newline at end of file
diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/reservationStockInOrder/ReservationStockInOrderApi.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/reservationStockInOrder/ReservationStockInOrderApi.java
index e7894a630..623fb7e32 100644
--- a/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/reservationStockInOrder/ReservationStockInOrderApi.java
+++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/reservationStockInOrder/ReservationStockInOrderApi.java
@@ -16,6 +16,8 @@ import com.mhd.system.api.domain.InMaterialDetail;
import com.mhd.system.api.domain.InMaterialDetailTZPD;
import com.mhd.system.api.domain.StockInOrder;
import com.mhd.system.api.domain.StockInOrderTZPD;
+import com.xxl.job.core.context.XxlJobHelper;
+import com.xxl.job.core.handler.annotation.XxlJob;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
@@ -299,4 +301,24 @@ public class ReservationStockInOrderApi extends BaseController {
return AjaxResult.success(stockInOrderApplicationService.generateReserveOrderNumber1());
}
+ /**
+ * 1. 简单任务示例(Bean模式)
+ * 这里的 demoJobHandler 必须和调度中心配置一致
+ */
+// @XxlJob("pushBillingRecord")
+ public void pushBillingRecord() {
+ // 获取任务参数
+ String param = XxlJobHelper.getJobParam();
+ logger.info("XXL-JOB 开始入库业务单推送bms计费流水,参数:{}", param);
+
+ try {
+ stockInOrderApplicationService.pushBillingRecord();
+ // 设置任务执行结果
+ XxlJobHelper.handleSuccess("入库业务单推送bms计费流水执行成功");
+ } catch (Exception e) {
+ logger.error("XXL-JOB 执行失败", e);
+ XxlJobHelper.handleFail("入库业务单推送bms计费流水执行失败:" + e.getMessage());
+ }
+ }
+
}
\ No newline at end of file
diff --git a/mhd_oms/src/main/resources/mapper/reservationStockInOrder/ReservationStockInOrderMapper.xml b/mhd_oms/src/main/resources/mapper/reservationStockInOrder/ReservationStockInOrderMapper.xml
index 8d7578d06..801e14f34 100644
--- a/mhd_oms/src/main/resources/mapper/reservationStockInOrder/ReservationStockInOrderMapper.xml
+++ b/mhd_oms/src/main/resources/mapper/reservationStockInOrder/ReservationStockInOrderMapper.xml
@@ -688,4 +688,12 @@
+
+
\ No newline at end of file
diff --git a/mhd_wms/src/main/java/com/mhd/wms/application/service/materialInventory/MaterialInventoryApplicationService.java b/mhd_wms/src/main/java/com/mhd/wms/application/service/materialInventory/MaterialInventoryApplicationService.java
index 8f6e08d00..ef042c5cc 100644
--- a/mhd_wms/src/main/java/com/mhd/wms/application/service/materialInventory/MaterialInventoryApplicationService.java
+++ b/mhd_wms/src/main/java/com/mhd/wms/application/service/materialInventory/MaterialInventoryApplicationService.java
@@ -3,16 +3,21 @@ package com.mhd.wms.application.service.materialInventory;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.alibaba.nacos.common.utils.CollectionUtils;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mhd.common.core.exception.ServiceException;
import com.mhd.common.core.utils.bean.BeanUtils;
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.BmsServiceFeign;
import com.mhd.system.api.SystemServiceFeign;
import com.mhd.system.api.domain.BatchDetailFeignPO;
+import com.mhd.system.api.domain.BusinessDocumentFeign;
import com.mhd.system.api.domain.cache.AssociationWarehouseCacheDO;
import com.mhd.system.api.domain.cache.SystemServiceCacheUtil;
import com.mhd.system.api.model.LoginUser;
+import com.mhd.wms.domain.materialBaseInfo.entity.MaterialBaseInfo;
+import com.mhd.wms.domain.materialBaseInfo.repository.mapper.MaterialBaseInfoMapper;
import com.mhd.wms.domain.materialInventory.repository.mapper.MaterialInventoryMapper;
import com.mhd.wms.domain.materialInventory.repository.po.MaterialInventoryPO;
import com.mhd.wms.domain.materialInventory.repository.po.MaterialInventoryQueryListPO;
@@ -32,9 +37,12 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.ZoneId;
import java.util.*;
import java.util.stream.Collectors;
@@ -49,8 +57,10 @@ import java.util.stream.Collectors;
public class MaterialInventoryApplicationService {
@Autowired
private MaterialInventoryDomainService materialInventoryDomainService;
- @Autowired
+ @Resource
private SystemServiceFeign systemServiceFeign;
+ @Resource
+ private BmsServiceFeign bmsServiceFeign;
@Autowired
private MaterialInventoryMapper materialInventoryMapper;
@Autowired
@@ -59,6 +69,8 @@ public class MaterialInventoryApplicationService {
private IStockOutOrderService stockOutOrderService;
@Autowired
private OutMaterialDetailMapper outMaterialDetailMapper;
+ @Autowired
+ private MaterialBaseInfoMapper materialBaseInfoMapper;
/**
@@ -873,4 +885,101 @@ public class MaterialInventoryApplicationService {
}
}
}
-}
+
+ public void pushBillingRecord(String shipperId) {
+ //非首次推送
+ List materialInventoryPOS = materialInventoryDomainService.queryPushBms(shipperId);
+ if (materialInventoryPOS==null || materialInventoryPOS.size()==0) return;
+ for (MaterialInventoryPO materialInventoryPO : materialInventoryPOS) {
+ Date createTime = materialInventoryPO.getCreateTime();
+ Long materialBaseInfoId = materialInventoryPO.getMaterialBaseInfoId();
+ String lotNumber = materialInventoryPO.getLotNumber();
+ String inOrderNumber = materialInventoryPO.getInOrderNumber();
+ List