From 67e4ad9f17200a6a7ef361714534eaec5bf9e7da Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期五, 23 五月 2025 16:21:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java | 12 +-
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java | 14 +-
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsStandardProcess.java | 188 +++++++++++++++++++++++-----------------------
3 files changed, 106 insertions(+), 108 deletions(-)
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java
index 0b08b15..9547d84 100644
--- a/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsGasPipelineCapacityPlanController.java
@@ -50,7 +50,7 @@
* 鏌ヨ姘斾綋绠¤矾浜ц兘瑙勫垝鍒楄〃
*/
@Operation(summary = "鏌ヨ姘斾綋绠¤矾浜ц兘瑙勫垝鍒楄〃", description = "鍒嗛〉鏌ヨ")
-// @RequiresPermissions("aps:gasPipelineCapacityPlan:list")
+ @RequiresPermissions("aps:gasPipelineCapacityPlan:list")
@GetMapping("/list")
public TableDataInfo list(ApsGasPipelineCapacityPlan apsGasPipelineCapacityPlan) {
// startPage();
@@ -66,8 +66,8 @@
apsGasPipelineCapacityPlanTemp.setProcessName(apsStandardProcessTemp.getProcessName());
apsGasPipelineCapacityPlanTemp.setOrgCode(apsStandardProcessTemp.getPlant());
apsGasPipelineCapacityPlanTemp.setWorkshop(apsShops.stream()
- .filter(shop -> Objects.equals(shop.getShopName(), apsStandardProcessTemp.getWorkShop()))
- .map(ApsShop::getShopCode)
+ .filter(shop -> Objects.equals(shop.getShopCode(), apsStandardProcessTemp.getWorkShop()))
+ .map(ApsShop::getShopName)
.findFirst()
.orElse(null));
list.add(apsGasPipelineCapacityPlanTemp);
@@ -105,8 +105,8 @@
apsGasPipelineCapacityPlanTemp.setProcessName(process.getProcessName());
apsGasPipelineCapacityPlanTemp.setOrgCode(process.getPlant());
apsGasPipelineCapacityPlanTemp.setWorkshop(apsShops.stream()
- .filter(shop -> Objects.equals(shop.getShopName(), process.getWorkShop()))
- .map(ApsShop::getShopCode)
+ .filter(shop -> Objects.equals(shop.getShopCode(), process.getWorkShop()))
+ .map(ApsShop::getShopName)
.findFirst()
.orElse(null));
list.add(apsGasPipelineCapacityPlanTemp);
@@ -134,7 +134,7 @@
* 澶嶅埗姘斾綋绠¤矾浜ц兘瑙勫垝
*/
@Operation(summary = "澶嶅埗姘斾綋绠¤矾浜ц兘瑙勫垝", description = "澶嶅埗")
-// @RequiresPermissions("aps:gasPipelineCapacityPlan:copy")
+ @RequiresPermissions("aps:gasPipelineCapacityPlan:copy")
@Log(title = "澶嶅埗姘斾綋绠¤矾浜ц兘瑙勫垝", businessType = BusinessType.INSERT)
@PutMapping("/copy")
public AjaxResult copy(
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsStandardProcess.java b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsStandardProcess.java
index e6f7157..298e489 100644
--- a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsStandardProcess.java
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsStandardProcess.java
@@ -14,14 +14,13 @@
/**
* 鏍囧噯宸ュ簭瀵硅薄 aps_standard_process
- *
+ *
* @author hjy
* @date 2025-04-23
*/
@Schema(description = "鏍囧噯宸ュ簭瀹炰綋")
-public class ApsStandardProcess extends BaseEntity
-{
+public class ApsStandardProcess extends BaseEntity {
private static final long serialVersionUID = 1L;
@Id
@@ -32,75 +31,102 @@
@Schema(description = "涓婚敭id", type = "Long")
private Long id;
- /** 宸ュ簭缂栫爜 */
+ /**
+ * 宸ュ簭缂栫爜
+ */
@Schema(description = "宸ュ簭缂栫爜", type = "String")
@Excel(name = "宸ュ簭缂栫爜")
private String processNumber;
- /** 宸ュ簭鍚嶇О */
+ /**
+ * 宸ュ簭鍚嶇О
+ */
@Schema(description = "宸ュ簭鍚嶇О", type = "String")
@Excel(name = "宸ュ簭鍚嶇О")
private String processName;
- /** 璧勬簮缁� */
+ /**
+ * 璧勬簮缁�
+ */
@Schema(description = "璧勬簮缁�", type = "String")
@Excel(name = "璧勬簮缁�")
private String resourceGroupName;
- /** 涓撲笟 */
+ /**
+ * 涓撲笟
+ */
@Schema(description = "涓撲笟", type = "String")
@Excel(name = "涓撲笟")
private String major;
- /** 浜ц兘妯″瀷: 鐙崰/鍚堟壒 */
+ /**
+ * 浜ц兘妯″瀷: 鐙崰/鍚堟壒
+ */
@Schema(description = "浜ц兘妯″瀷", type = "String")
@Excel(name = "浜ц兘妯″瀷")
private String model;
- /** 璁捐浜ц兘 */
+ /**
+ * 璁捐浜ц兘
+ */
@Schema(description = "璁捐浜ц兘", type = "String")
@Excel(name = "璁捐浜ц兘")
private BigDecimal designCapacity;
- /** 宸ュ巶Id */
+ /**
+ * 宸ュ巶Id
+ */
@Schema(description = "宸ュ巶Id", type = "String")
// @Excel(name = "宸ュ巶Id")
private String plantId;
- /** 宸ュ巶 */
+ /**
+ * 宸ュ巶
+ */
@Schema(description = "閫傜敤宸ュ巶", type = "String")
@Excel(name = "閫傜敤宸ュ巶")
private String plant;
- /** 杞﹂棿Id */
+ /**
+ * 杞﹂棿Id
+ */
@Schema(description = "杞﹂棿Id", type = "String")
// @Excel(name = "杞﹂棿Id")
private String workShopId;
- /** 杞﹂棿 */
+ /**
+ * 杞﹂棿
+ */
@Schema(description = "閫傜敤杞﹂棿", type = "String")
@Excel(name = "閫傜敤杞﹂棿")
private String workShop;
- /** 鏃ュ巻Id */
+ /**
+ * 鏃ュ巻Id
+ */
@Schema(description = "鏃ュ巻Id", type = "Long")
// @Excel(name = "鏃ュ巻Id")
private Long workCalenderId;
- /** 鏃ュ巻鎻忚堪 */
+ /**
+ * 鏃ュ巻鎻忚堪
+ */
@Schema(description = "鏃ュ巻鎻忚堪", type = "String")
@Excel(name = "鏃ュ巻鎻忚堪")
private String workCalender;
- /** 浜ц兘妯″瀷Id */
+ /**
+ * 浜ц兘妯″瀷Id
+ */
@Schema(description = "浜ц兘妯″瀷Id", type = "Long")
// @Excel(name = "浜ц兘妯″瀷Id")
private Long modelId;
- /** 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� */
+ /**
+ * 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�
+ */
@Schema(description = "鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�", type = "String")
private String delFlag;
-
public String getMajor() {
@@ -111,168 +137,140 @@
this.major = major;
}
- public void setId(Long id)
- {
+ public void setId(Long id) {
this.id = id;
}
- public Long getId()
- {
+ public Long getId() {
return id;
}
- public void setProcessNumber(String processNumber)
- {
+ public void setProcessNumber(String processNumber) {
this.processNumber = processNumber;
}
- public String getProcessNumber()
- {
+ public String getProcessNumber() {
return processNumber;
}
- public void setProcessName(String processName)
- {
+ public void setProcessName(String processName) {
this.processName = processName;
}
- public String getProcessName()
- {
+ public String getProcessName() {
return processName;
}
- public void setResourceGroupName(String resourceGroupName)
- {
+ public void setResourceGroupName(String resourceGroupName) {
this.resourceGroupName = resourceGroupName;
}
- public String getResourceGroupName()
- {
+ public String getResourceGroupName() {
return resourceGroupName;
}
- public void setModel(String model)
- {
+ public void setModel(String model) {
this.model = model;
}
- public String getModel()
- {
+ public String getModel() {
return model;
}
- public void setDesignCapacity(BigDecimal designCapacity)
- {
+ public void setDesignCapacity(BigDecimal designCapacity) {
this.designCapacity = designCapacity;
}
- public BigDecimal getDesignCapacity()
- {
+ public BigDecimal getDesignCapacity() {
return designCapacity;
}
- public void setPlantId(String plantId)
- {
+ public void setPlantId(String plantId) {
this.plantId = plantId;
}
- public String getPlantId()
- {
+ public String getPlantId() {
return plantId;
}
- public void setPlant(String plant)
- {
+ public void setPlant(String plant) {
this.plant = plant;
}
- public String getPlant()
- {
+ public String getPlant() {
return plant;
}
- public void setWorkShopId(String workShopId)
- {
+ public void setWorkShopId(String workShopId) {
this.workShopId = workShopId;
}
- public String getWorkShopId()
- {
+ public String getWorkShopId() {
return workShopId;
}
- public void setWorkShop(String workShop)
- {
+ public void setWorkShop(String workShop) {
this.workShop = workShop;
}
- public String getWorkShop()
- {
+ public String getWorkShop() {
return workShop;
}
- public void setWorkCalenderId(Long workCalenderId)
- {
+ public void setWorkCalenderId(Long workCalenderId) {
this.workCalenderId = workCalenderId;
}
- public Long getWorkCalenderId()
- {
+ public Long getWorkCalenderId() {
return workCalenderId;
}
- public void setDelFlag(String delFlag)
- {
+ public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
- public String getDelFlag()
- {
+ public String getDelFlag() {
return delFlag;
}
- public void setModelId(Long modelId)
- {
+ public void setModelId(Long modelId) {
this.modelId = modelId;
}
- public Long getModelId()
- {
+ public Long getModelId() {
return modelId;
}
- public void setWorkCalender(String workCalender)
- {
+ public void setWorkCalender(String workCalender) {
this.workCalender = workCalender;
}
- public String getWorkCalender()
- {
+ public String getWorkCalender() {
return workCalender;
}
@Override
public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("id", getId())
- .append("processNumber", getProcessNumber())
- .append("processName", getProcessName())
- .append("resourceGroupName", getResourceGroupName())
- .append("model", getModel())
- .append("designCapacity", getDesignCapacity())
- .append("plantId", getPlantId())
- .append("plant", getPlant())
- .append("workShopId", getWorkShopId())
- .append("workShop", getWorkShop())
- .append("workCalenderId", getWorkCalenderId())
- .append("delFlag", getDelFlag())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("modelId", getModelId())
- .append("workCalender", getWorkCalender())
- .append("major", getMajor())
- .toString();
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("processNumber", getProcessNumber())
+ .append("processName", getProcessName())
+ .append("resourceGroupName", getResourceGroupName())
+ .append("model", getModel())
+ .append("designCapacity", getDesignCapacity())
+ .append("plantId", getPlantId())
+ .append("plant", getPlant())
+ .append("workShopId", getWorkShopId())
+ .append("workShop", getWorkShop())
+ .append("workCalenderId", getWorkCalenderId())
+ .append("delFlag", getDelFlag())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .append("modelId", getModelId())
+ .append("workCalender", getWorkCalender())
+ .append("major", getMajor())
+ .toString();
}
}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java
index 82853f5..6a23bcf 100644
--- a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java
@@ -175,21 +175,21 @@
// 鎵归噺鎻掑叆缁熻鏁版嵁
log.info("閽i噾璁″垝澶ц〃锛氳绠楁瘡涓伐鍗曚腑姣忎釜杞﹂棿鐨勫紑濮嬨�佺粨鏉熸椂闂�");
List<ApsPlateProcessShopStat> statsToInsert = new ArrayList<>();
- for (ApsPlatePlan plan : planList) {
- log.info("閽i噾璁″垝澶ц〃锛氳绠楀伐鍗曪細"+plan.getDocumentNumber());
- for (ApsShop shop : shopList) {
+ log.info("閽i噾璁″垝澶ц〃V1锛氬紑濮嬭绠楁瘡涓伐鍗曡溅闂村伐鏃�");
+ planList.stream().parallel().forEach(plan -> {
+ shopList.stream().parallel().forEach(shop -> {
ApsPlateProcessShopStat stat = createShopStat(plan, shop, shopToProcessNames, statList);
statsToInsert.add(stat);
- }
- }
+ });
+ });
log.info("閽i噾璁″垝澶ц〃锛氭壒閲忎繚瀛樺伐搴忓紑宸ュ拰瀹屽伐鏃堕棿");
List<List<ApsPlateProcessStat>> processStatBatchList = ListUtil.split(statList, 1000);
- processStatBatchList.forEach(batch -> apsPlateProcessStatMapper.batchInsertPlateStat(batch));
+ processStatBatchList.stream().parallel().forEach(batch -> apsPlateProcessStatMapper.batchInsertPlateStat(batch));
log.info("閽i噾璁″垝澶ц〃锛氭壒閲忎繚瀛樺伐鍗�-杞﹂棿鏃堕棿淇℃伅");
List<List<ApsPlateProcessShopStat>> shopStatBatchList = ListUtil.split(statsToInsert, 1000);
- shopStatBatchList.forEach(batch -> apsPlateProcessShopStatMapper.batchInsert(batch));
+ shopStatBatchList.stream().parallel().forEach(batch -> apsPlateProcessShopStatMapper.batchInsert(batch));
}else {
if(shopProcesses.isEmpty()){
log.error("閽i噾璁″垝澶ц〃锛氭湭鎵惧埌鏍囧噯宸ュ簭鏁版嵁锛�");
--
Gitblit v1.9.3