diff --git a/pom.xml b/pom.xml
index c5660d6b..374bdc15 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,6 +34,7 @@
9.0.102
1.2.13
5.3.39
+ 5.8.26
@@ -193,6 +194,14 @@
fastjson
${fastjson.version}
+
+ cn.hutool
+ hutool-bom
+ ${hutool.version}
+ pom
+
+ import
+
diff --git a/ruoyi-admin/src/main/resources/templates/manage/order/edit.html b/ruoyi-admin/src/main/resources/templates/manage/order/edit.html
index 69ddaf39..8bf877e9 100644
--- a/ruoyi-admin/src/main/resources/templates/manage/order/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/manage/order/edit.html
@@ -93,9 +93,9 @@
diff --git a/ruoyi-admin/src/main/resources/templates/system/customer/add.html b/ruoyi-admin/src/main/resources/templates/system/customer/add.html
index 6ee02b0a..6c9739f8 100644
--- a/ruoyi-admin/src/main/resources/templates/system/customer/add.html
+++ b/ruoyi-admin/src/main/resources/templates/system/customer/add.html
@@ -83,7 +83,7 @@
diff --git a/ruoyi-admin/src/main/resources/templates/system/customer/edit.html b/ruoyi-admin/src/main/resources/templates/system/customer/edit.html
index fd2583aa..ddb88d5f 100644
--- a/ruoyi-admin/src/main/resources/templates/system/customer/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/system/customer/edit.html
@@ -84,7 +84,7 @@
diff --git a/ruoyi-admin/src/main/resources/templates/system/customer/info.html b/ruoyi-admin/src/main/resources/templates/system/customer/info.html
index c1944b47..d6e24c92 100644
--- a/ruoyi-admin/src/main/resources/templates/system/customer/info.html
+++ b/ruoyi-admin/src/main/resources/templates/system/customer/info.html
@@ -48,7 +48,7 @@
-
+
@@ -149,7 +149,7 @@
title: '联系邮件'
},
{
- field: 'industryTyoe',
+ field: 'industryType',
title: '所属行业'
},
{
diff --git a/ruoyi-sip/pom.xml b/ruoyi-sip/pom.xml
index e4c44506..1864f890 100644
--- a/ruoyi-sip/pom.xml
+++ b/ruoyi-sip/pom.xml
@@ -31,5 +31,9 @@
org.projectlombok
lombok
+
+ cn.hutool
+ hutool-core
+
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/ExternalController.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/ExternalController.java
new file mode 100644
index 00000000..afbac1b9
--- /dev/null
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/controller/ExternalController.java
@@ -0,0 +1,49 @@
+package com.ruoyi.sip.controller;
+
+
+import com.ruoyi.common.annotation.Anonymous;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.sip.dto.ApiDataQueryDto;
+import com.ruoyi.sip.service.IDeliveryListService;
+import com.ruoyi.sip.service.IOrderInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author : ch
+ * @version : 1.0
+ * @ClassName : ExternalController
+ * @Description :
+ * @DATE : Created in 17:34 2025/5/13
+ *
Copyright: Copyright(c) 2025
+ * Company : 紫光汇智信息技术有限公司
+ * Modification History:
+ * Date Author Version Discription
+ * --------------------------------------------------------------------------
+ * 2025/05/13 ch 1.0 Why & What is modified: <修改原因描述> *
+ */
+@RestController
+@RequestMapping("/api")
+public class ExternalController {
+ @Autowired
+ private IDeliveryListService deliveryListService;
+ @Autowired
+ private IOrderInfoService orderInfoService;
+
+ @GetMapping("/v1/order/info")
+ @Anonymous
+ public AjaxResult getOrderInfo(@Validated ApiDataQueryDto dto) {
+ return AjaxResult.success(orderInfoService.getOrderInfo(dto));
+ }
+
+
+
+ @GetMapping("/v1/number/info")
+ @Anonymous
+ private AjaxResult getNumberInfo(@Validated ApiDataQueryDto dto){
+ return AjaxResult.success(deliveryListService.getNumberInfo(dto));
+ }
+}
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/AgentInfo.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/AgentInfo.java
index 8e167953..07f53bd6 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/AgentInfo.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/AgentInfo.java
@@ -1,7 +1,11 @@
package com.ruoyi.sip.domain;
import java.util.Date;
+import java.util.List;
+
import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@@ -13,6 +17,8 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author mula
* @date 2025-05-13
*/
+@Data
+@ToString
public class AgentInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
@@ -23,6 +29,7 @@ public class AgentInfo extends BaseEntity
/** 办事处编码 */
@Excel(name = "办事处编码")
private String agentCode;
+ private List agentCodeList;
/** 办公处名称 */
@Excel(name = "办公处名称")
@@ -62,153 +69,4 @@ public class AgentInfo extends BaseEntity
/** 数据状态 */
private Integer status;
- public void setId(Long id)
- {
- this.id = id;
- }
-
- public Long getId()
- {
- return id;
- }
-
- public void setAgentCode(String agentCode)
- {
- this.agentCode = agentCode;
- }
-
- public String getAgentCode()
- {
- return agentCode;
- }
-
- public void setAgentName(String agentName)
- {
- this.agentName = agentName;
- }
-
- public String getAgentName()
- {
- return agentName;
- }
-
- public void setProvince(String province)
- {
- this.province = province;
- }
-
- public String getProvince()
- {
- return province;
- }
-
- public void setCity(String city)
- {
- this.city = city;
- }
-
- public String getCity()
- {
- return city;
- }
-
- public void setAddress(String address)
- {
- this.address = address;
- }
-
- public String getAddress()
- {
- return address;
- }
-
- public void setContactPerson(String contactPerson)
- {
- this.contactPerson = contactPerson;
- }
-
- public String getContactPerson()
- {
- return contactPerson;
- }
-
- public void setContactPhone(String contactPhone)
- {
- this.contactPhone = contactPhone;
- }
-
- public String getContactPhone()
- {
- return contactPhone;
- }
-
- public void setContactEmail(String contactEmail)
- {
- this.contactEmail = contactEmail;
- }
-
- public String getContactEmail()
- {
- return contactEmail;
- }
-
- public void setCreateAt(Date createAt)
- {
- this.createAt = createAt;
- }
-
- public Date getCreateAt()
- {
- return createAt;
- }
-
- public void setUpdateAt(Date updateAt)
- {
- this.updateAt = updateAt;
- }
-
- public Date getUpdateAt()
- {
- return updateAt;
- }
-
- public void setDeleteAt(Date deleteAt)
- {
- this.deleteAt = deleteAt;
- }
-
- public Date getDeleteAt()
- {
- return deleteAt;
- }
-
- public void setStatus(Integer status)
- {
- this.status = status;
- }
-
- public Integer getStatus()
- {
- return status;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("id", getId())
- .append("agentCode", getAgentCode())
- .append("agentName", getAgentName())
- .append("province", getProvince())
- .append("city", getCity())
- .append("address", getAddress())
- .append("contactPerson", getContactPerson())
- .append("contactPhone", getContactPhone())
- .append("contactEmail", getContactEmail())
- .append("remark", getRemark())
- .append("createAt", getCreateAt())
- .append("updateAt", getUpdateAt())
- .append("deleteAt", getDeleteAt())
- .append("status", getStatus())
- .toString();
- }
}
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/CustomerInfo.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/CustomerInfo.java
index 863e5d54..3a9e4c2c 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/CustomerInfo.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/CustomerInfo.java
@@ -1,6 +1,8 @@
package com.ruoyi.sip.domain;
import java.util.Date;
+import java.util.List;
+
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;
@@ -27,6 +29,7 @@ public class CustomerInfo extends BaseEntity
/** 客户编码 */
@Excel(name = "客户编码")
private String customerCode;
+ private List customerCodeList;
/** 客户名称 */
@Excel(name = "客户名称")
@@ -62,7 +65,7 @@ public class CustomerInfo extends BaseEntity
/** 所属行业 */
@Excel(name = "所属行业")
- private String industryTyoe;
+ private String industryType;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/OrderInfo.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/OrderInfo.java
index c134ec6b..7704af03 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/OrderInfo.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/domain/OrderInfo.java
@@ -3,6 +3,9 @@ package com.ruoyi.sip.domain;
import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@@ -14,6 +17,8 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author mula
* @date 2025-04-11
*/
+@Data
+@ToString
public class OrderInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
@@ -39,6 +44,8 @@ public class OrderInfo extends BaseEntity
/** 客户名称 */
@Excel(name = "客户名称")
private String customerName;
+ //客户编码
+ private String customerCode;
/** 客户联系人 */
private String customerContact;
@@ -54,8 +61,8 @@ public class OrderInfo extends BaseEntity
private String orderType;
/** 代表处编码 */
- private Long orderDept;
- private String orderDeptName;
+ private String orderAgentCode;
+ private String orderAgentName;
/** 代理商编码 */
private Long partnerDept;
@@ -75,6 +82,8 @@ public class OrderInfo extends BaseEntity
/** 更新时间 */
private Date updatedAt;
+ private Date updatedAtStart;
+ private Date updatedAtEnd;
/** 删除时间,软删除 */
private Date deletedAt;
@@ -82,224 +91,5 @@ public class OrderInfo extends BaseEntity
/** 合同清单信息 */
private List orderListList;
- public void setId(Long id)
- {
- this.id = id;
- }
- public Long getId()
- {
- return id;
- }
-
- public void setProjectCode(String projectCode)
- {
- this.projectCode = projectCode;
- }
-
- public String getProjectCode()
- {
- return projectCode;
- }
-
- public void setOrderCode(String orderCode)
- {
- this.orderCode = orderCode;
- }
-
- public String getOrderCode()
- {
- return orderCode;
- }
-
- public void setVersionCode(String versionCode)
- {
- this.versionCode = versionCode;
- }
-
- public String getVersionCode()
- {
- return versionCode;
- }
-
- public void setOrderName(String orderName)
- {
- this.orderName = orderName;
- }
-
- public String getOrderName()
- {
- return orderName;
- }
-
- public void setCustomerName(String customerName)
- {
- this.customerName = customerName;
- }
-
- public String getCustomerName()
- {
- return customerName;
- }
-
- public void setCustomerContact(String customerContact)
- {
- this.customerContact = customerContact;
- }
-
- public String getCustomerContact()
- {
- return customerContact;
- }
-
- public void setCustomerPhone(String customerPhone)
- {
- this.customerPhone = customerPhone;
- }
-
- public String getCustomerPhone()
- {
- return customerPhone;
- }
-
- public void setCustomerEmail(String customerEmail)
- {
- this.customerEmail = customerEmail;
- }
-
- public String getCustomerEmail()
- {
- return customerEmail;
- }
-
- public void setOrderType(String orderType)
- {
- this.orderType = orderType;
- }
-
- public String getOrderType()
- {
- return orderType;
- }
-
- public void setOrderDept(Long orderDept)
- {
- this.orderDept = orderDept;
- }
-
- public Long getOrderDept()
- {
- return orderDept;
- }
-
- public void setPartnerDept(Long partnerDept)
- {
- this.partnerDept = partnerDept;
- }
-
- public Long getPartnerDept()
- {
- return partnerDept;
- }
-
- public void setOrderDate(Date orderDate)
- {
- this.orderDate = orderDate;
- }
-
- public Date getOrderDate()
- {
- return orderDate;
- }
-
- public void setStatus(Long status)
- {
- this.status = status;
- }
-
- public Long getStatus()
- {
- return status;
- }
-
- public void setCreatedAt(Date createdAt)
- {
- this.createdAt = createdAt;
- }
-
- public Date getCreatedAt()
- {
- return createdAt;
- }
-
- public void setUpdatedAt(Date updatedAt)
- {
- this.updatedAt = updatedAt;
- }
-
- public Date getUpdatedAt()
- {
- return updatedAt;
- }
-
- public void setDeletedAt(Date deletedAt)
- {
- this.deletedAt = deletedAt;
- }
-
- public Date getDeletedAt()
- {
- return deletedAt;
- }
-
- public List getOrderListList()
- {
- return orderListList;
- }
-
- public void setOrderListList(List orderListList)
- {
- this.orderListList = orderListList;
- }
-
- public String getOrderDeptName() {
- return orderDeptName;
- }
-
- public void setOrderDeptName(String orderDeptName) {
- this.orderDeptName = orderDeptName;
- }
-
- public String getPartnerDeptName() {
- return partnerDeptName;
- }
-
- public void setPartnerDeptName(String partnerDeptName) {
- this.partnerDeptName = partnerDeptName;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("id", getId())
- .append("projectCode", getProjectCode())
- .append("orderCode", getOrderCode())
- .append("versionCode", getVersionCode())
- .append("orderName", getOrderName())
- .append("customerName", getCustomerName())
- .append("customerContact", getCustomerContact())
- .append("customerPhone", getCustomerPhone())
- .append("customerEmail", getCustomerEmail())
- .append("orderType", getOrderType())
- .append("orderDept", getOrderDept())
- .append("partnerDept", getPartnerDept())
- .append("orderDate", getOrderDate())
- .append("status", getStatus())
- .append("remark", getRemark())
- .append("createdAt", getCreatedAt())
- .append("updatedAt", getUpdatedAt())
- .append("deletedAt", getDeletedAt())
- .append("orderListList", getOrderListList())
- .toString();
- }
}
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/dto/ApiDataQueryDto.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/dto/ApiDataQueryDto.java
new file mode 100644
index 00000000..595f7e0b
--- /dev/null
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/dto/ApiDataQueryDto.java
@@ -0,0 +1,31 @@
+package com.ruoyi.sip.dto;
+
+
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.constraints.*;
+import java.util.Date;
+
+/**
+ * @author : ch
+ * @version : 1.0
+ * @ClassName : ApiDataQueryDto
+ * @Description :
+ * @DATE : Created in 17:42 2025/5/13
+ * Copyright: Copyright(c) 2025
+ * Company : 紫光汇智信息技术有限公司
+ * Modification History:
+ * Date Author Version Discription
+ * --------------------------------------------------------------------------
+ * 2025/05/13 ch 1.0 Why & What is modified: <修改原因描述> *
+ */
+@Data
+public class ApiDataQueryDto {
+ @NotNull(message = "查询开始时间不能为空")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date queryStartTime;
+ @NotNull(message = "查询结束时间不能为空")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date queryEndTime;
+}
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IDeliveryListService.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IDeliveryListService.java
index 56c35d9c..1ceea39e 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IDeliveryListService.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IDeliveryListService.java
@@ -4,6 +4,8 @@ import java.util.List;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.sip.domain.DeliveryList;
+import com.ruoyi.sip.dto.ApiDataQueryDto;
+import com.ruoyi.sip.vo.DeliveryInfoVo;
/**
* 发货清单Service接口
@@ -62,4 +64,6 @@ public interface IDeliveryListService
public int deleteDeliveryListById(Long id);
AjaxResult importData(List deliveryList, Long deliveryId);
+
+ List getNumberInfo(ApiDataQueryDto dto);
}
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IOrderInfoService.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IOrderInfoService.java
index 1a22a75d..272102b6 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IOrderInfoService.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/IOrderInfoService.java
@@ -5,6 +5,8 @@ import java.util.List;
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
import com.ruoyi.sip.domain.OrderInfo;
import com.ruoyi.sip.domain.OrderList;
+import com.ruoyi.sip.dto.ApiDataQueryDto;
+import com.ruoyi.sip.vo.OrderInfoVo;
/**
* 合同档案Service接口
@@ -63,4 +65,12 @@ public interface IOrderInfoService
public int deleteOrderInfoById(Long id);
List selectOrderInfoByMaintenance(MaintenanceRecordsDto dto);
+
+ /**
+ * 根据查询获取该时间段的合同信息
+ *
+ * @param dto
+ * @return
+ */
+ List getOrderInfo(ApiDataQueryDto dto);
}
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/DeliveryListServiceImpl.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/DeliveryListServiceImpl.java
index 9a82045f..c48741ed 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/DeliveryListServiceImpl.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/DeliveryListServiceImpl.java
@@ -1,9 +1,6 @@
package com.ruoyi.sip.service.impl;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
+import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@@ -12,8 +9,10 @@ import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.sip.domain.OrderList;
import com.ruoyi.sip.domain.ProductInfo;
+import com.ruoyi.sip.dto.ApiDataQueryDto;
import com.ruoyi.sip.mapper.OrderInfoMapper;
import com.ruoyi.sip.mapper.ProductInfoMapper;
+import com.ruoyi.sip.vo.DeliveryInfoVo;
import org.springframework.stereotype.Service;
import com.ruoyi.sip.mapper.DeliveryListMapper;
import com.ruoyi.sip.domain.DeliveryList;
@@ -135,4 +134,16 @@ public class DeliveryListServiceImpl implements IDeliveryListService {
deliveryListMapper.insertBatch(deliveryList);
return AjaxResult.success("导入成功");
}
+
+ @Override
+ public List getNumberInfo(ApiDataQueryDto dto) {
+
+
+
+
+
+
+
+ return Collections.emptyList();
+ }
}
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/OrderInfoServiceImpl.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/OrderInfoServiceImpl.java
index 9d72394e..e75721da 100644
--- a/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/OrderInfoServiceImpl.java
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/service/impl/OrderInfoServiceImpl.java
@@ -3,18 +3,22 @@ package com.ruoyi.sip.service.impl;
import java.util.Collections;
import java.util.List;
-import com.ruoyi.sip.domain.MaintenanceRecordsDto;
+import cn.hutool.core.collection.CollUtil;
+import com.ruoyi.sip.domain.*;
+import com.ruoyi.sip.dto.ApiDataQueryDto;
+import com.ruoyi.sip.service.IAgentInfoService;
+import com.ruoyi.sip.service.ICustomerInfoService;
+import com.ruoyi.sip.vo.OrderInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Map;
+import java.util.function.Function;
import java.util.stream.Collectors;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional;
-import com.ruoyi.sip.domain.OrderList;
import com.ruoyi.sip.mapper.OrderInfoMapper;
-import com.ruoyi.sip.domain.OrderInfo;
import com.ruoyi.sip.service.IOrderInfoService;
import com.ruoyi.common.core.text.Convert;
@@ -29,7 +33,10 @@ public class OrderInfoServiceImpl implements IOrderInfoService
{
@Autowired
private OrderInfoMapper orderInfoMapper;
-
+ @Autowired
+ private IAgentInfoService agentInfoService;
+ @Autowired
+ private ICustomerInfoService customerInfoService;
/**
* 查询合同档案
*
@@ -144,6 +151,65 @@ public class OrderInfoServiceImpl implements IOrderInfoService
return orderInfoMapper.selectOrderInfoByMaintenance(dto);
}
+
+ @Override
+ public List getOrderInfo(ApiDataQueryDto dto) {
+ OrderInfo queryParams = new OrderInfo();
+ queryParams.setUpdatedAtStart(dto.getQueryStartTime());
+ queryParams.setUpdatedAtEnd(dto.getQueryEndTime());
+
+ List orderInfos = orderInfoMapper.selectOrderInfoList(queryParams);
+ //查询代表处信息
+ AgentInfo agentInfoQueryParams = new AgentInfo();
+ agentInfoQueryParams.setAgentCodeList(orderInfos.stream().map(OrderInfo::getOrderAgentCode).collect(Collectors.toList()));
+ List agentInfos = agentInfoService.selectAgentInfoList(agentInfoQueryParams);
+ Map agentInfoMap = agentInfos.stream().collect(Collectors.toMap(AgentInfo::getAgentCode, Function.identity(), (v1, v2) -> v1));
+ //查询客户信息
+ CustomerInfo customerInfoQueryParams = new CustomerInfo();
+ customerInfoQueryParams.setCustomerCodeList(orderInfos.stream().map(OrderInfo::getCustomerCode).collect(Collectors.toList()));
+ List customerInfos = customerInfoService.selectCustomerInfoList(customerInfoQueryParams);
+ Map customerInfoMap = customerInfos.stream().collect(Collectors.toMap(CustomerInfo::getCustomerCode, Function.identity(), (v1, v2) -> v1));
+
+ if (CollUtil.isNotEmpty(orderInfos)) {
+ return orderInfos.stream().map(orderInfo -> {
+ OrderInfoVo orderInfoVo = new OrderInfoVo();
+ orderInfoVo.setOrderCode(orderInfo.getOrderCode());
+ orderInfoVo.setOrderName(orderInfo.getOrderName());
+ orderInfoVo.setVersionCode(orderInfo.getVersionCode());
+ //todo 这里为固定值 待确认
+ orderInfoVo.setBgProperty("1");
+ AgentInfo agentInfo = agentInfoMap.get(orderInfo.getOrderAgentCode());
+ if (agentInfo != null) {
+ //目前三个代表处都是同一个
+ orderInfoVo.setOrderAgentCode(agentInfo.getAgentCode());
+ orderInfoVo.setOrderAgentName(agentInfo.getAgentName());
+ orderInfoVo.setDeliveredAgentCode(agentInfo.getAgentCode());
+ orderInfoVo.setDeliveredAgentName(agentInfo.getAgentName());
+ orderInfoVo.setRevenueAgentCode(agentInfo.getAgentCode());
+ orderInfoVo.setRevenueAgentName(agentInfo.getAgentName());
+ orderInfoVo.setSaleName(agentInfo.getContactPerson());
+ orderInfoVo.setSaleEmail(agentInfo.getContactEmail());
+ orderInfoVo.setSalePhone(agentInfo.getContactPhone());
+ }
+ CustomerInfo customerInfo = customerInfoMap.get(orderInfo.getCustomerCode());
+ if (customerInfo != null) {
+ orderInfoVo.setCustomerCode(customerInfo.getCustomerCode());
+ orderInfoVo.setCustomerName(customerInfo.getCustomerName());
+ orderInfoVo.setCustomerPostcode(customerInfo.getCustomerPostcode());
+ orderInfoVo.setIndustryType(customerInfo.getIndustryType());
+ orderInfoVo.setCustomerAddress(customerInfo.getAddress());
+ orderInfoVo.setContactPerson(customerInfo.getContactPerson());
+ orderInfoVo.setContactEmail(customerInfo.getContactEmail());
+ orderInfoVo.setContactPhone(customerInfo.getContactPhone());
+ }
+ return orderInfoVo;
+ }).collect(Collectors.toList());
+ }
+
+
+ return Collections.emptyList();
+ }
+
/**
* 新增合同清单信息
*
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/vo/DeliveryInfoVo.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/vo/DeliveryInfoVo.java
new file mode 100644
index 00000000..8ba8f582
--- /dev/null
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/vo/DeliveryInfoVo.java
@@ -0,0 +1,32 @@
+package com.ruoyi.sip.vo;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author : ch
+ * @version : 1.0
+ * @ClassName : DeliveryInfoVo
+ * @Description : 条码信息
+ * @DATE : Created in 17:28 2025/5/13
+ * Copyright: Copyright(c) 2025
+ * Company : 紫光汇智信息技术有限公司
+ * Modification History:
+ * Date Author Version Discription
+ * --------------------------------------------------------------------------
+ * 2025/05/13 ch 1.0 Why & What is modified: <修改原因描述> *
+ */
+@Data
+public class DeliveryInfoVo {
+ //合同号
+ private String orderCode;
+ //版本号
+ private String versionCode;
+ //条码
+ private String serialNumber;
+ //服务开始时间
+ private Date startTime;
+ //服务结束时间
+ private Date endTime;
+}
diff --git a/ruoyi-sip/src/main/java/com/ruoyi/sip/vo/OrderInfoVo.java b/ruoyi-sip/src/main/java/com/ruoyi/sip/vo/OrderInfoVo.java
new file mode 100644
index 00000000..16befe98
--- /dev/null
+++ b/ruoyi-sip/src/main/java/com/ruoyi/sip/vo/OrderInfoVo.java
@@ -0,0 +1,61 @@
+package com.ruoyi.sip.vo;
+
+
+import lombok.Data;
+
+/**
+ * @author : ch
+ * @version : 1.0
+ * @ClassName : OrderInfoVo
+ * @Description : 对外api 接口 合同信息
+ * @DATE : Created in 17:23 2025/5/13
+ * Copyright: Copyright(c) 2025
+ * Company : 紫光汇智信息技术有限公司
+ * Modification History:
+ * Date Author Version Discription
+ * --------------------------------------------------------------------------
+ * 2025/05/13 ch 1.0 Why & What is modified: <修改原因描述> *
+ */
+@Data
+public class OrderInfoVo {
+ //合同号
+ private String orderCode;
+ //项目名称
+ private String orderName;
+ //版本号
+ private String versionCode;
+ //下单代表处
+ private String orderAgentName;
+ private String orderAgentCode;
+ //交付代表
+ private String deliveredAgentName;
+ private String deliveredAgentCode;
+ //收益代表
+ private String revenueAgentName;
+ private String revenueAgentCode;
+ //销售人员
+ private String saleName;
+ private String saleEmail;
+ private String salePhone;
+
+ // 客户编码
+ private String customerCode;
+ // 客户名称
+ private String customerName;
+ //客户邮编
+ private String customerPostcode;
+ //BG属性
+ private String bgProperty;
+ //一级行业
+ private String industryType;
+ //客户地址
+ private String customerAddress;
+ //客户联系人
+ private String contactPerson;
+ //客户电话
+ private String contactPhone;
+ //客户邮箱
+ private String contactEmail;
+
+
+}
diff --git a/ruoyi-sip/src/main/resources/mapper/manage/CustomerInfoMapper.xml b/ruoyi-sip/src/main/resources/mapper/manage/CustomerInfoMapper.xml
index 37ab2ae3..94c271a0 100644
--- a/ruoyi-sip/src/main/resources/mapper/manage/CustomerInfoMapper.xml
+++ b/ruoyi-sip/src/main/resources/mapper/manage/CustomerInfoMapper.xml
@@ -15,7 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
@@ -29,21 +29,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
@@ -65,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
contact_person,
contact_phone,
contact_email,
- Industry_tyoe,
+ industry_type,
remark,
create_at,
update_at,
@@ -83,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{contactPerson},
#{contactPhone},
#{contactEmail},
- #{industryTyoe},
+ #{industryType},
#{remark},
#{createAt},
#{updateAt},
@@ -104,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
contact_person = #{contactPerson},
contact_phone = #{contactPhone},
contact_email = #{contactEmail},
- Industry_tyoe = #{industryTyoe},
+ industry_type = #{industryType},
remark = #{remark},
create_at = #{createAt},
update_at = #{updateAt},
diff --git a/ruoyi-sip/src/main/resources/mapper/manage/OrderInfoMapper.xml b/ruoyi-sip/src/main/resources/mapper/manage/OrderInfoMapper.xml
index 9703edc9..d3ec3819 100644
--- a/ruoyi-sip/src/main/resources/mapper/manage/OrderInfoMapper.xml
+++ b/ruoyi-sip/src/main/resources/mapper/manage/OrderInfoMapper.xml
@@ -11,11 +11,12 @@
+
-
+
@@ -48,12 +49,13 @@
order_code,
version_code,
order_name,
+ customer_code,
customer_name,
customer_contact,
customer_phone,
customer_email,
order_type,
- order_dept,
+ order_agent_code,
partner_dept,
order_date,
status,
@@ -74,6 +76,18 @@
'%')
and order_type = #{orderType}
+
+
+ and updated_at between #{updatedAtStart} and #{updatedAtEnd}
+
+
+ and updated_at = ]]> #{updatedAtStart}
+
+
+ and updated_at #{updatedAtEnd}
+
+
+
@@ -88,7 +102,7 @@
t1.customer_phone,
t1.customer_email,
t1.order_type,
- t1.order_dept,
+ t1.order_agent_code,
t1.partner_dept,
t1.order_date,
t1.status,
@@ -96,10 +110,10 @@
t1.created_at,
t1.updated_at,
t1.deleted_at,
- t2.dept_name as order_dept_name,
+ t2.agent_name as order_agent_name,
t3.dept_name as partner_dept_name
from order_info t1
- left join sys_dept t2 on t1.order_dept = t2.dept_id
+ left join agent_info t2 on t1.order_agent_code = t2.agent_code
left join sys_dept t3 on t1.partner_dept = t3.dept_id
where t1.id = #{id}
@@ -163,12 +177,12 @@
customer_phone,
customer_email,
order_type,
- order_dept,
+ order_agent_code,
partner_dept,
order_date,
status,
remark,
- created_at,status
+ created_at,updated_at,status
#{projectCode},
@@ -180,12 +194,12 @@
#{customerPhone},
#{customerEmail},
#{orderType},
- #{orderDept},
+ #{orderAgentCode},
#{partnerDept},
#{orderDate},
#{status},
#{remark},
- NOW(),0
+ NOW(),now(),0
@@ -201,7 +215,7 @@
customer_phone = #{customerPhone},
customer_email = #{customerEmail},
order_type = #{orderType},
- order_dept = #{orderDept},
+ order_agent_code = #{orderAgentCode},
partner_dept = #{partnerDept},
order_date = #{orderDate},
status = #{status},
@@ -233,12 +247,13 @@
update order_info
set deleted_at=NOW(),
+ updated_at=now(),
status=1
where id = #{id}
- update order_info set deleted_at=NOW(), status=1 where id in
+ update order_info set deleted_at=NOW(), updated_at=NOW(), status=1 where id in
#{id}
diff --git a/ruoyi-sip/src/main/resources/mapper/system/AgentInfoMapper.xml b/ruoyi-sip/src/main/resources/mapper/system/AgentInfoMapper.xml
index e8368b46..ecc2ae53 100644
--- a/ruoyi-sip/src/main/resources/mapper/system/AgentInfoMapper.xml
+++ b/ruoyi-sip/src/main/resources/mapper/system/AgentInfoMapper.xml
@@ -29,6 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and agent_code = #{agentCode}
+ and agent_code in
+
+ #{item}
+
+
and agent_name like concat('%', #{agentName}, '%')