From df6bb7f982ca8a4ba57a87ef85aad58bfc4dd524 Mon Sep 17 00:00:00 2001
From: wenwj <‘1106994300@qq.com>
Date: 星期三, 09 四月 2025 17:37:30 +0800
Subject: [PATCH] 焊缝统计相关
---
aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsWeldSeamStatisticsController.java | 106 ++++++++
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWeldSeamMapper.java | 7
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWeldSeamStatisticsMapper.java | 61 ++++
aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsWeldSeamController.java | 12
aps-modules/aps-core/src/main/resources/mapper/core/ApsWeldSeamMapper.xml | 5
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamStatisticsServiceImpl.java | 96 +++++++
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsWeldSeamStatistics.java | 250 +++++++++++++++++++
aps-modules/aps-core/src/main/resources/mapper/core/ApsWeldSeamStatisticsMapper.xml | 138 ++++++++++
aps-modules/aps-core/src/main/java/com/aps/core/service/IApsWeldSeamStatisticsService.java | 61 ++++
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamServiceImpl.java | 16 +
10 files changed, 742 insertions(+), 10 deletions(-)
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsWeldSeamController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsWeldSeamController.java
index bfa990c..029627c 100644
--- a/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsWeldSeamController.java
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsWeldSeamController.java
@@ -38,7 +38,7 @@
/**
* 鏌ヨ鐒婄紳鍒楄〃
*/
- @RequiresPermissions("gasPiping:gasPiping:list")
+ @RequiresPermissions("weldSeam:weldSeam:list")
@GetMapping("/list")
public TableDataInfo list(ApsWeldSeam apsWeldSeam) {
// startPage();
@@ -49,7 +49,7 @@
/**
* 瀵煎嚭鐒婄紳鍒楄〃
*/
- @RequiresPermissions("gasPiping:gasPiping:export")
+ @RequiresPermissions("weldSeam:weldSeam:export")
@Log(title = "鐒婄紳", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ApsWeldSeam apsWeldSeam) {
@@ -79,7 +79,7 @@
/**
* 鑾峰彇鐒婄紳璇︾粏淇℃伅
*/
- @RequiresPermissions("gasPiping:gasPiping:query")
+ @RequiresPermissions("weldSeam:weldSeam:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) {
return success(apsWeldSeamService.selectApsWeldSeamById(id));
@@ -88,7 +88,7 @@
/**
* 鏂板鐒婄紳
*/
- @RequiresPermissions("gasPiping:gasPiping:add")
+ @RequiresPermissions("weldSeam:weldSeam:add")
@Log(title = "鐒婄紳", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ApsWeldSeam apsWeldSeam) {
@@ -98,7 +98,7 @@
/**
* 淇敼鐒婄紳
*/
- @RequiresPermissions("gasPiping:gasPiping:edit")
+ @RequiresPermissions("weldSeam:weldSeam:edit")
@Log(title = "鐒婄紳", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ApsWeldSeam apsWeldSeam) {
@@ -108,7 +108,7 @@
/**
* 鍒犻櫎鐒婄紳
*/
- @RequiresPermissions("gasPiping:gasPiping:remove")
+ @RequiresPermissions("weldSeam:weldSeam:remove")
@Log(title = "鐒婄紳", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) {
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsWeldSeamStatisticsController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsWeldSeamStatisticsController.java
new file mode 100644
index 0000000..6e905da
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsWeldSeamStatisticsController.java
@@ -0,0 +1,106 @@
+package com.aps.core.controller;
+
+import java.util.List;
+import java.io.IOException;
+
+import jakarta.servlet.http.HttpServletResponse;
+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.PutMapping;
+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.aps.common.log.annotation.Log;
+import com.aps.common.log.enums.BusinessType;
+import com.aps.common.security.annotation.RequiresPermissions;
+import com.aps.core.domain.ApsWeldSeamStatistics;
+import com.aps.core.service.IApsWeldSeamStatisticsService;
+import com.aps.common.core.web.controller.BaseController;
+import com.aps.common.core.web.domain.AjaxResult;
+import com.aps.common.core.utils.poi.ExcelUtil;
+import com.aps.common.core.web.page.TableDataInfo;
+
+/**
+ * 鐒婄紳缁熻Controller
+ *
+ * @author wwj
+ * @date 2025-04-09
+ */
+@RestController
+@RequestMapping("/weldSeamStatistics")
+public class ApsWeldSeamStatisticsController extends BaseController
+{
+ @Autowired
+ private IApsWeldSeamStatisticsService apsWeldSeamStatisticsService;
+
+ /**
+ * 鏌ヨ鐒婄紳缁熻鍒楄〃
+ */
+ @RequiresPermissions("weldSeamStatistics:weldSeamStatistics:list")
+ @GetMapping("/list")
+ public TableDataInfo list(ApsWeldSeamStatistics apsWeldSeamStatistics)
+ {
+ startPage();
+ List<ApsWeldSeamStatistics> list = apsWeldSeamStatisticsService.selectApsWeldSeamStatisticsList(apsWeldSeamStatistics);
+ return getDataTable(list);
+ }
+
+ /**
+ * 瀵煎嚭鐒婄紳缁熻鍒楄〃
+ */
+ @RequiresPermissions("weldSeamStatistics:weldSeamStatistics:export")
+ @Log(title = "鐒婄紳缁熻", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, ApsWeldSeamStatistics apsWeldSeamStatistics)
+ {
+ List<ApsWeldSeamStatistics> list = apsWeldSeamStatisticsService.selectApsWeldSeamStatisticsList(apsWeldSeamStatistics);
+ ExcelUtil<ApsWeldSeamStatistics> util = new ExcelUtil<ApsWeldSeamStatistics>(ApsWeldSeamStatistics.class);
+ util.exportExcel(response, list, "鐒婄紳缁熻鏁版嵁");
+ }
+
+ /**
+ * 鑾峰彇鐒婄紳缁熻璇︾粏淇℃伅
+ */
+ @RequiresPermissions("weldSeamStatistics:weldSeamStatistics:query")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") String id)
+ {
+ return success(apsWeldSeamStatisticsService.selectApsWeldSeamStatisticsById(id));
+ }
+
+ /**
+ * 鏂板鐒婄紳缁熻
+ */
+ @RequiresPermissions("weldSeamStatistics:weldSeamStatistics:add")
+ @Log(title = "鐒婄紳缁熻", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody ApsWeldSeamStatistics apsWeldSeamStatistics)
+ {
+ return toAjax(apsWeldSeamStatisticsService.insertApsWeldSeamStatistics(apsWeldSeamStatistics));
+ }
+
+ /**
+ * 淇敼鐒婄紳缁熻
+ */
+ @RequiresPermissions("weldSeamStatistics:weldSeamStatistics:edit")
+ @Log(title = "鐒婄紳缁熻", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody ApsWeldSeamStatistics apsWeldSeamStatistics)
+ {
+ return toAjax(apsWeldSeamStatisticsService.updateApsWeldSeamStatistics(apsWeldSeamStatistics));
+ }
+
+ /**
+ * 鍒犻櫎鐒婄紳缁熻
+ */
+ @RequiresPermissions("weldSeamStatistics:weldSeamStatistics:remove")
+ @Log(title = "鐒婄紳缁熻", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable String[] ids)
+ {
+ return toAjax(apsWeldSeamStatisticsService.deleteApsWeldSeamStatisticsByIds(ids));
+ }
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsWeldSeamStatistics.java b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsWeldSeamStatistics.java
new file mode 100644
index 0000000..26977f9
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsWeldSeamStatistics.java
@@ -0,0 +1,250 @@
+package com.aps.core.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.aps.common.core.annotation.Excel;
+import com.aps.common.core.web.domain.BaseEntity;
+
+/**
+ * 鐒婄紳缁熻瀵硅薄 aps_weld_seam_statistics
+ *
+ * @author wwj
+ * @date 2025-04-09
+ */
+public class ApsWeldSeamStatistics extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 涓婚敭id */
+ private String id;
+
+ /** 骞翠唤 */
+ @Excel(name = "骞翠唤")
+ private Long year;
+
+ /** 鏈堜唤 */
+ @Excel(name = "鏈堜唤")
+ private Long month;
+
+ /** 鐢熶骇鍩哄湴 */
+ @Excel(name = "鐢熶骇鍩哄湴")
+ private String productionBase;
+
+ /** 绠¤矾璁㈠崟闇�姹� */
+ @Excel(name = "绠¤矾璁㈠崟闇�姹�")
+ private Long pipingOrderRequirement;
+
+ /** 姘旀煖璁㈠崟闇�姹� */
+ @Excel(name = "姘旀煖璁㈠崟闇�姹�")
+ private Long gasOrderRequirement;
+
+ /** 绠¤矾棰勬祴闇�姹� */
+ @Excel(name = "绠¤矾棰勬祴闇�姹�")
+ private Long pipingPredictionRequirement;
+
+ /** 姘旀煖棰勬祴闇�姹� */
+ @Excel(name = "姘旀煖棰勬祴闇�姹�")
+ private Long gasPredictionRequirement;
+
+ /** 棰勭暀绱ф�ヨ鍗曚骇鍑� */
+ @Excel(name = "棰勭暀绱ф�ヨ鍗曚骇鍑�")
+ private Long reserveEmergencyOrderOutput;
+
+ /** 鍚堣 */
+ @Excel(name = "鍚堣")
+ private Long total;
+
+ /** 澶╂暟 */
+ @Excel(name = "澶╂暟")
+ private Long days;
+
+ /** 闇�姹傛棩鐒婄紳 */
+ @Excel(name = "闇�姹傛棩鐒婄紳")
+ private Long requirementDayWeldSeam;
+
+ /** 鐢熶骇鏃ョ剨缂� */
+ @Excel(name = "鐢熶骇鏃ョ剨缂�")
+ private Long productionDayWeldSeam;
+
+ /** 鏄惁婊¤冻 */
+ @Excel(name = "鏄惁婊¤冻")
+ private String isSatisfy;
+
+ /** 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� */
+ private String delFlag;
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setYear(Long year)
+ {
+ this.year = year;
+ }
+
+ public Long getYear()
+ {
+ return year;
+ }
+
+ public void setMonth(Long month)
+ {
+ this.month = month;
+ }
+
+ public Long getMonth()
+ {
+ return month;
+ }
+
+ public void setProductionBase(String productionBase)
+ {
+ this.productionBase = productionBase;
+ }
+
+ public String getProductionBase()
+ {
+ return productionBase;
+ }
+
+ public void setPipingOrderRequirement(Long pipingOrderRequirement)
+ {
+ this.pipingOrderRequirement = pipingOrderRequirement;
+ }
+
+ public Long getPipingOrderRequirement()
+ {
+ return pipingOrderRequirement;
+ }
+
+ public void setGasOrderRequirement(Long gasOrderRequirement)
+ {
+ this.gasOrderRequirement = gasOrderRequirement;
+ }
+
+ public Long getGasOrderRequirement()
+ {
+ return gasOrderRequirement;
+ }
+
+ public void setPipingPredictionRequirement(Long pipingPredictionRequirement)
+ {
+ this.pipingPredictionRequirement = pipingPredictionRequirement;
+ }
+
+ public Long getPipingPredictionRequirement()
+ {
+ return pipingPredictionRequirement;
+ }
+
+ public void setGasPredictionRequirement(Long gasPredictionRequirement)
+ {
+ this.gasPredictionRequirement = gasPredictionRequirement;
+ }
+
+ public Long getGasPredictionRequirement()
+ {
+ return gasPredictionRequirement;
+ }
+
+ public void setReserveEmergencyOrderOutput(Long reserveEmergencyOrderOutput)
+ {
+ this.reserveEmergencyOrderOutput = reserveEmergencyOrderOutput;
+ }
+
+ public Long getReserveEmergencyOrderOutput()
+ {
+ return reserveEmergencyOrderOutput;
+ }
+
+ public void setTotal(Long total)
+ {
+ this.total = total;
+ }
+
+ public Long getTotal()
+ {
+ return total;
+ }
+
+ public void setDays(Long days)
+ {
+ this.days = days;
+ }
+
+ public Long getDays()
+ {
+ return days;
+ }
+
+ public void setRequirementDayWeldSeam(Long requirementDayWeldSeam)
+ {
+ this.requirementDayWeldSeam = requirementDayWeldSeam;
+ }
+
+ public Long getRequirementDayWeldSeam()
+ {
+ return requirementDayWeldSeam;
+ }
+
+ public void setProductionDayWeldSeam(Long productionDayWeldSeam)
+ {
+ this.productionDayWeldSeam = productionDayWeldSeam;
+ }
+
+ public Long getProductionDayWeldSeam()
+ {
+ return productionDayWeldSeam;
+ }
+
+ public void setIsSatisfy(String isSatisfy)
+ {
+ this.isSatisfy = isSatisfy;
+ }
+
+ public String getIsSatisfy()
+ {
+ return isSatisfy;
+ }
+
+ public void setDelFlag(String delFlag)
+ {
+ this.delFlag = delFlag;
+ }
+
+ public String getDelFlag()
+ {
+ return delFlag;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("year", getYear())
+ .append("month", getMonth())
+ .append("productionBase", getProductionBase())
+ .append("pipingOrderRequirement", getPipingOrderRequirement())
+ .append("gasOrderRequirement", getGasOrderRequirement())
+ .append("pipingPredictionRequirement", getPipingPredictionRequirement())
+ .append("gasPredictionRequirement", getGasPredictionRequirement())
+ .append("reserveEmergencyOrderOutput", getReserveEmergencyOrderOutput())
+ .append("total", getTotal())
+ .append("days", getDays())
+ .append("requirementDayWeldSeam", getRequirementDayWeldSeam())
+ .append("productionDayWeldSeam", getProductionDayWeldSeam())
+ .append("isSatisfy", getIsSatisfy())
+ .append("delFlag", getDelFlag())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .toString();
+ }
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWeldSeamMapper.java b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWeldSeamMapper.java
index 29c4f56..8b50ad4 100644
--- a/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWeldSeamMapper.java
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWeldSeamMapper.java
@@ -20,6 +20,13 @@
* @return 鐒婄紳
*/
public ApsWeldSeam selectApsWeldSeamById(String id);
+ /**
+ * 鏌ヨ鐒婄紳
+ *
+ * @param workOrderNo 閫氳繃宸ュ崟鍙锋煡璇�
+ * @return 鐒婄紳
+ */
+ public ApsWeldSeam selectApsWeldSeamByWorkOrderNo(String workOrderNo);
/**
* 鏌ヨ鐒婄紳鍒楄〃
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWeldSeamStatisticsMapper.java b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWeldSeamStatisticsMapper.java
new file mode 100644
index 0000000..d3b9d3b
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWeldSeamStatisticsMapper.java
@@ -0,0 +1,61 @@
+package com.aps.core.mapper;
+
+import java.util.List;
+import com.aps.core.domain.ApsWeldSeamStatistics;
+
+/**
+ * 鐒婄紳缁熻Mapper鎺ュ彛
+ *
+ * @author wwj
+ * @date 2025-04-09
+ */
+public interface ApsWeldSeamStatisticsMapper
+{
+ /**
+ * 鏌ヨ鐒婄紳缁熻
+ *
+ * @param id 鐒婄紳缁熻涓婚敭
+ * @return 鐒婄紳缁熻
+ */
+ public ApsWeldSeamStatistics selectApsWeldSeamStatisticsById(String id);
+
+ /**
+ * 鏌ヨ鐒婄紳缁熻鍒楄〃
+ *
+ * @param apsWeldSeamStatistics 鐒婄紳缁熻
+ * @return 鐒婄紳缁熻闆嗗悎
+ */
+ public List<ApsWeldSeamStatistics> selectApsWeldSeamStatisticsList(ApsWeldSeamStatistics apsWeldSeamStatistics);
+
+ /**
+ * 鏂板鐒婄紳缁熻
+ *
+ * @param apsWeldSeamStatistics 鐒婄紳缁熻
+ * @return 缁撴灉
+ */
+ public int insertApsWeldSeamStatistics(ApsWeldSeamStatistics apsWeldSeamStatistics);
+
+ /**
+ * 淇敼鐒婄紳缁熻
+ *
+ * @param apsWeldSeamStatistics 鐒婄紳缁熻
+ * @return 缁撴灉
+ */
+ public int updateApsWeldSeamStatistics(ApsWeldSeamStatistics apsWeldSeamStatistics);
+
+ /**
+ * 鍒犻櫎鐒婄紳缁熻
+ *
+ * @param id 鐒婄紳缁熻涓婚敭
+ * @return 缁撴灉
+ */
+ public int deleteApsWeldSeamStatisticsById(String id);
+
+ /**
+ * 鎵归噺鍒犻櫎鐒婄紳缁熻
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+ * @return 缁撴灉
+ */
+ public int deleteApsWeldSeamStatisticsByIds(String[] ids);
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsWeldSeamStatisticsService.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsWeldSeamStatisticsService.java
new file mode 100644
index 0000000..f2657e6
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsWeldSeamStatisticsService.java
@@ -0,0 +1,61 @@
+package com.aps.core.service;
+
+import java.util.List;
+import com.aps.core.domain.ApsWeldSeamStatistics;
+
+/**
+ * 鐒婄紳缁熻Service鎺ュ彛
+ *
+ * @author wwj
+ * @date 2025-04-09
+ */
+public interface IApsWeldSeamStatisticsService
+{
+ /**
+ * 鏌ヨ鐒婄紳缁熻
+ *
+ * @param id 鐒婄紳缁熻涓婚敭
+ * @return 鐒婄紳缁熻
+ */
+ public ApsWeldSeamStatistics selectApsWeldSeamStatisticsById(String id);
+
+ /**
+ * 鏌ヨ鐒婄紳缁熻鍒楄〃
+ *
+ * @param apsWeldSeamStatistics 鐒婄紳缁熻
+ * @return 鐒婄紳缁熻闆嗗悎
+ */
+ public List<ApsWeldSeamStatistics> selectApsWeldSeamStatisticsList(ApsWeldSeamStatistics apsWeldSeamStatistics);
+
+ /**
+ * 鏂板鐒婄紳缁熻
+ *
+ * @param apsWeldSeamStatistics 鐒婄紳缁熻
+ * @return 缁撴灉
+ */
+ public int insertApsWeldSeamStatistics(ApsWeldSeamStatistics apsWeldSeamStatistics);
+
+ /**
+ * 淇敼鐒婄紳缁熻
+ *
+ * @param apsWeldSeamStatistics 鐒婄紳缁熻
+ * @return 缁撴灉
+ */
+ public int updateApsWeldSeamStatistics(ApsWeldSeamStatistics apsWeldSeamStatistics);
+
+ /**
+ * 鎵归噺鍒犻櫎鐒婄紳缁熻
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鐒婄紳缁熻涓婚敭闆嗗悎
+ * @return 缁撴灉
+ */
+ public int deleteApsWeldSeamStatisticsByIds(String[] ids);
+
+ /**
+ * 鍒犻櫎鐒婄紳缁熻淇℃伅
+ *
+ * @param id 鐒婄紳缁熻涓婚敭
+ * @return 缁撴灉
+ */
+ public int deleteApsWeldSeamStatisticsById(String id);
+}
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamServiceImpl.java
index 74cf169..9299fc9 100644
--- a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamServiceImpl.java
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamServiceImpl.java
@@ -2,6 +2,7 @@
import java.util.List;
+import com.aps.common.core.utils.StringUtils;
import com.aps.common.core.utils.uuid.IdUtils;
import com.aps.core.domain.ApsPartPlan;
import com.aps.core.domain.ApsPartPlanTemp;
@@ -13,6 +14,7 @@
import com.aps.core.mapper.ApsWeldSeamMapper;
import com.aps.core.domain.ApsWeldSeam;
import com.aps.core.service.IApsWeldSeamService;
+import org.springframework.transaction.annotation.Transactional;
/**
* 鐒婄紳Service涓氬姟灞傚鐞�
@@ -112,9 +114,17 @@
ids[i]=apsWeldSeamTemps.get(i).getId();
ApsWeldSeam apsWeldSeam=new ApsWeldSeam();
BeanUtils.copyProperties(apsWeldSeamTemps.get(i), apsWeldSeam);
- apsWeldSeam.setId(IdUtils.fastUUID());
- //鎻掑叆姝e紡琛紝骞惰褰�
- apsWeldSeamMapper.insertApsWeldSeam(apsWeldSeam);
+ //閫氳繃宸ュ崟鍙锋煡璇㈡槸鍚﹀瓨鍦ㄦ暟鎹�
+ ApsWeldSeam apsWeldSeam1=apsWeldSeamMapper.selectApsWeldSeamByWorkOrderNo(apsWeldSeam.getWorkOrderNo());
+ //褰撳伐鍗曞彿瀛樺湪鍒欐洿鏂版暟鎹惁鍒欐彃鍏ユ暟鎹�
+ if(StringUtils.isNotEmpty(apsWeldSeam1.getId())){
+ apsWeldSeam.setId(apsWeldSeam1.getId());
+ apsWeldSeamMapper.updateApsWeldSeam(apsWeldSeam);
+ }else {
+ //鎻掑叆姝e紡琛紝骞惰褰�
+ apsWeldSeam.setId(IdUtils.fastUUID());
+ apsWeldSeamMapper.insertApsWeldSeam(apsWeldSeam);
+ }
count++;
}
//鎻掑叆鏁伴噺涓庝复鏃惰〃鏌ヨ涓�鐩村垯鍒犻櫎涓存椂琛ㄦ暟鎹�
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamStatisticsServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamStatisticsServiceImpl.java
new file mode 100644
index 0000000..83c4232
--- /dev/null
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamStatisticsServiceImpl.java
@@ -0,0 +1,96 @@
+package com.aps.core.service.impl;
+
+import java.util.List;
+import com.aps.common.core.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.aps.core.mapper.ApsWeldSeamStatisticsMapper;
+import com.aps.core.domain.ApsWeldSeamStatistics;
+import com.aps.core.service.IApsWeldSeamStatisticsService;
+
+/**
+ * 鐒婄紳缁熻Service涓氬姟灞傚鐞�
+ *
+ * @author wwj
+ * @date 2025-04-09
+ */
+@Service
+public class ApsWeldSeamStatisticsServiceImpl implements IApsWeldSeamStatisticsService
+{
+ @Autowired
+ private ApsWeldSeamStatisticsMapper apsWeldSeamStatisticsMapper;
+
+ /**
+ * 鏌ヨ鐒婄紳缁熻
+ *
+ * @param id 鐒婄紳缁熻涓婚敭
+ * @return 鐒婄紳缁熻
+ */
+ @Override
+ public ApsWeldSeamStatistics selectApsWeldSeamStatisticsById(String id)
+ {
+ return apsWeldSeamStatisticsMapper.selectApsWeldSeamStatisticsById(id);
+ }
+
+ /**
+ * 鏌ヨ鐒婄紳缁熻鍒楄〃
+ *
+ * @param apsWeldSeamStatistics 鐒婄紳缁熻
+ * @return 鐒婄紳缁熻
+ */
+ @Override
+ public List<ApsWeldSeamStatistics> selectApsWeldSeamStatisticsList(ApsWeldSeamStatistics apsWeldSeamStatistics)
+ {
+ return apsWeldSeamStatisticsMapper.selectApsWeldSeamStatisticsList(apsWeldSeamStatistics);
+ }
+
+ /**
+ * 鏂板鐒婄紳缁熻
+ *
+ * @param apsWeldSeamStatistics 鐒婄紳缁熻
+ * @return 缁撴灉
+ */
+ @Override
+ public int insertApsWeldSeamStatistics(ApsWeldSeamStatistics apsWeldSeamStatistics)
+ {
+ apsWeldSeamStatistics.setCreateTime(DateUtils.getNowDate());
+ return apsWeldSeamStatisticsMapper.insertApsWeldSeamStatistics(apsWeldSeamStatistics);
+ }
+
+ /**
+ * 淇敼鐒婄紳缁熻
+ *
+ * @param apsWeldSeamStatistics 鐒婄紳缁熻
+ * @return 缁撴灉
+ */
+ @Override
+ public int updateApsWeldSeamStatistics(ApsWeldSeamStatistics apsWeldSeamStatistics)
+ {
+ apsWeldSeamStatistics.setUpdateTime(DateUtils.getNowDate());
+ return apsWeldSeamStatisticsMapper.updateApsWeldSeamStatistics(apsWeldSeamStatistics);
+ }
+
+ /**
+ * 鎵归噺鍒犻櫎鐒婄紳缁熻
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鐒婄紳缁熻涓婚敭
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteApsWeldSeamStatisticsByIds(String[] ids)
+ {
+ return apsWeldSeamStatisticsMapper.deleteApsWeldSeamStatisticsByIds(ids);
+ }
+
+ /**
+ * 鍒犻櫎鐒婄紳缁熻淇℃伅
+ *
+ * @param id 鐒婄紳缁熻涓婚敭
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteApsWeldSeamStatisticsById(String id)
+ {
+ return apsWeldSeamStatisticsMapper.deleteApsWeldSeamStatisticsById(id);
+ }
+}
diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsWeldSeamMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsWeldSeamMapper.xml
index 76b5888..fbdd6e2 100644
--- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsWeldSeamMapper.xml
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsWeldSeamMapper.xml
@@ -62,7 +62,10 @@
<include refid="selectApsWeldSeamVo"/>
where id = #{id}
</select>
-
+ <select id="selectApsWeldSeamByWorkOrderNo" parameterType="String" resultMap="ApsWeldSeamResult">
+ <include refid="selectApsWeldSeamVo"/>
+ where work_order_no = #{workOrderNo}
+ </select>
<insert id="insertApsWeldSeam" parameterType="ApsWeldSeam">
insert into aps_weld_seam
<trim prefix="(" suffix=")" suffixOverrides=",">
diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsWeldSeamStatisticsMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsWeldSeamStatisticsMapper.xml
new file mode 100644
index 0000000..0fa48b1
--- /dev/null
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsWeldSeamStatisticsMapper.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.aps.core.mapper.ApsWeldSeamStatisticsMapper">
+
+ <resultMap type="ApsWeldSeamStatistics" id="ApsWeldSeamStatisticsResult">
+ <result property="id" column="id" />
+ <result property="year" column="year" />
+ <result property="month" column="month" />
+ <result property="productionBase" column="production_base" />
+ <result property="pipingOrderRequirement" column="piping_order_requirement" />
+ <result property="gasOrderRequirement" column="gas_order_requirement" />
+ <result property="pipingPredictionRequirement" column="piping_prediction_requirement" />
+ <result property="gasPredictionRequirement" column="gas_prediction_requirement" />
+ <result property="reserveEmergencyOrderOutput" column="reserve_emergency_order_output" />
+ <result property="total" column="total" />
+ <result property="days" column="days" />
+ <result property="requirementDayWeldSeam" column="requirement_day_weld_seam" />
+ <result property="productionDayWeldSeam" column="production_day_weld_seam" />
+ <result property="isSatisfy" column="is_satisfy" />
+ <result property="delFlag" column="del_flag" />
+ <result property="createBy" column="create_by" />
+ <result property="createTime" column="create_time" />
+ <result property="updateBy" column="update_by" />
+ <result property="updateTime" column="update_time" />
+ </resultMap>
+
+ <sql id="selectApsWeldSeamStatisticsVo">
+ select id, year, month, production_base, piping_order_requirement, gas_order_requirement, piping_prediction_requirement, gas_prediction_requirement, reserve_emergency_order_output, total, days, requirement_day_weld_seam, production_day_weld_seam, is_satisfy, del_flag, create_by, create_time, update_by, update_time from aps_weld_seam_statistics
+ </sql>
+
+ <select id="selectApsWeldSeamStatisticsList" parameterType="ApsWeldSeamStatistics" resultMap="ApsWeldSeamStatisticsResult">
+ <include refid="selectApsWeldSeamStatisticsVo"/>
+ <where>
+ <if test="params.beginYear != null and params.beginYear != '' and params.endYear != null and params.endYear != ''"> and year between #{params.beginYear} and #{params.endYear}</if>
+ <if test="params.beginMonth != null and params.beginMonth != '' and params.endMonth != null and params.endMonth != ''"> and month between #{params.beginMonth} and #{params.endMonth}</if>
+ <if test="productionBase != null and productionBase != ''"> and production_base like concat('%', #{productionBase}, '%')</if>
+ <if test="pipingOrderRequirement != null "> and piping_order_requirement = #{pipingOrderRequirement}</if>
+ <if test="gasOrderRequirement != null "> and gas_order_requirement = #{gasOrderRequirement}</if>
+ <if test="pipingPredictionRequirement != null "> and piping_prediction_requirement = #{pipingPredictionRequirement}</if>
+ <if test="gasPredictionRequirement != null "> and gas_prediction_requirement = #{gasPredictionRequirement}</if>
+ <if test="reserveEmergencyOrderOutput != null "> and reserve_emergency_order_output = #{reserveEmergencyOrderOutput}</if>
+ <if test="total != null "> and total = #{total}</if>
+ <if test="days != null "> and days = #{days}</if>
+ <if test="requirementDayWeldSeam != null "> and requirement_day_weld_seam = #{requirementDayWeldSeam}</if>
+ <if test="productionDayWeldSeam != null "> and production_day_weld_seam = #{productionDayWeldSeam}</if>
+ <if test="isSatisfy != null and isSatisfy != ''"> and is_satisfy = #{isSatisfy}</if>
+ </where>
+ </select>
+
+ <select id="selectApsWeldSeamStatisticsById" parameterType="String" resultMap="ApsWeldSeamStatisticsResult">
+ <include refid="selectApsWeldSeamStatisticsVo"/>
+ where id = #{id}
+ </select>
+
+ <insert id="insertApsWeldSeamStatistics" parameterType="ApsWeldSeamStatistics">
+ insert into aps_weld_seam_statistics
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">id,</if>
+ <if test="year != null">year,</if>
+ <if test="month != null">month,</if>
+ <if test="productionBase != null">production_base,</if>
+ <if test="pipingOrderRequirement != null">piping_order_requirement,</if>
+ <if test="gasOrderRequirement != null">gas_order_requirement,</if>
+ <if test="pipingPredictionRequirement != null">piping_prediction_requirement,</if>
+ <if test="gasPredictionRequirement != null">gas_prediction_requirement,</if>
+ <if test="reserveEmergencyOrderOutput != null">reserve_emergency_order_output,</if>
+ <if test="total != null">total,</if>
+ <if test="days != null">days,</if>
+ <if test="requirementDayWeldSeam != null">requirement_day_weld_seam,</if>
+ <if test="productionDayWeldSeam != null">production_day_weld_seam,</if>
+ <if test="isSatisfy != null">is_satisfy,</if>
+ <if test="delFlag != null">del_flag,</if>
+ <if test="createBy != null">create_by,</if>
+ <if test="createTime != null">create_time,</if>
+ <if test="updateBy != null">update_by,</if>
+ <if test="updateTime != null">update_time,</if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">#{id},</if>
+ <if test="year != null">#{year},</if>
+ <if test="month != null">#{month},</if>
+ <if test="productionBase != null">#{productionBase},</if>
+ <if test="pipingOrderRequirement != null">#{pipingOrderRequirement},</if>
+ <if test="gasOrderRequirement != null">#{gasOrderRequirement},</if>
+ <if test="pipingPredictionRequirement != null">#{pipingPredictionRequirement},</if>
+ <if test="gasPredictionRequirement != null">#{gasPredictionRequirement},</if>
+ <if test="reserveEmergencyOrderOutput != null">#{reserveEmergencyOrderOutput},</if>
+ <if test="total != null">#{total},</if>
+ <if test="days != null">#{days},</if>
+ <if test="requirementDayWeldSeam != null">#{requirementDayWeldSeam},</if>
+ <if test="productionDayWeldSeam != null">#{productionDayWeldSeam},</if>
+ <if test="isSatisfy != null">#{isSatisfy},</if>
+ <if test="delFlag != null">#{delFlag},</if>
+ <if test="createBy != null">#{createBy},</if>
+ <if test="createTime != null">#{createTime},</if>
+ <if test="updateBy != null">#{updateBy},</if>
+ <if test="updateTime != null">#{updateTime},</if>
+ </trim>
+ </insert>
+
+ <update id="updateApsWeldSeamStatistics" parameterType="ApsWeldSeamStatistics">
+ update aps_weld_seam_statistics
+ <trim prefix="SET" suffixOverrides=",">
+ <if test="year != null">year = #{year},</if>
+ <if test="month != null">month = #{month},</if>
+ <if test="productionBase != null">production_base = #{productionBase},</if>
+ <if test="pipingOrderRequirement != null">piping_order_requirement = #{pipingOrderRequirement},</if>
+ <if test="gasOrderRequirement != null">gas_order_requirement = #{gasOrderRequirement},</if>
+ <if test="pipingPredictionRequirement != null">piping_prediction_requirement = #{pipingPredictionRequirement},</if>
+ <if test="gasPredictionRequirement != null">gas_prediction_requirement = #{gasPredictionRequirement},</if>
+ <if test="reserveEmergencyOrderOutput != null">reserve_emergency_order_output = #{reserveEmergencyOrderOutput},</if>
+ <if test="total != null">total = #{total},</if>
+ <if test="days != null">days = #{days},</if>
+ <if test="requirementDayWeldSeam != null">requirement_day_weld_seam = #{requirementDayWeldSeam},</if>
+ <if test="productionDayWeldSeam != null">production_day_weld_seam = #{productionDayWeldSeam},</if>
+ <if test="isSatisfy != null">is_satisfy = #{isSatisfy},</if>
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
+ <if test="createBy != null">create_by = #{createBy},</if>
+ <if test="createTime != null">create_time = #{createTime},</if>
+ <if test="updateBy != null">update_by = #{updateBy},</if>
+ <if test="updateTime != null">update_time = #{updateTime},</if>
+ </trim>
+ where id = #{id}
+ </update>
+
+ <delete id="deleteApsWeldSeamStatisticsById" parameterType="String">
+ delete from aps_weld_seam_statistics where id = #{id}
+ </delete>
+
+ <delete id="deleteApsWeldSeamStatisticsByIds" parameterType="String">
+ delete from aps_weld_seam_statistics where id in
+ <foreach item="id" collection="array" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </delete>
+</mapper>
\ No newline at end of file
--
Gitblit v1.9.3