已添加6个文件
已修改10个文件
767 ■■■■■ 文件已修改
aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsWeldSeamStandardController.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsPlate/ApsPlateProcessShopStatController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsPlanTask.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsPlate/ApsPlateProcessShopPlanStat.java 175 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsPlate/ApsPlateRequireDate.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsWeldSeamStandard.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsPlateProcessShopStatMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWeldSeamStandardMapper.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/IApsWeldSeamStandardService.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineMoServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsMaterialProductGroupManagementServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java 332 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamStandardServiceImpl.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsMaterialProductGroupManagementMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateProcessShopStatMapper.xml 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsWeldSeamStandardMapper.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsWeldSeamStandardController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
package com.aps.core.controller.basicData;
import java.util.List;
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.RestController;
import com.aps.core.domain.ApsWeldSeamStandard;
import com.aps.core.service.IApsWeldSeamStandardService;
import com.aps.common.core.web.controller.BaseController;
import com.aps.common.core.web.page.TableDataInfo;
/**
 * ç„Šç¼æ ‡å‡†Controller
 *
 * @author user
 * @date 2023-11-05
 */
@RestController
@RequestMapping("/weldSeamStandard")
public class ApsWeldSeamStandardController extends BaseController
{
    @Autowired
    private IApsWeldSeamStandardService apsWeldSeamStandardService;
    /**
     * æŸ¥è¯¢ç„Šç¼æ ‡å‡†åˆ—表
     */
    @GetMapping("/list")
    public TableDataInfo list(ApsWeldSeamStandard apsWeldSeamStandard)
    {
        startPage();
        List<ApsWeldSeamStandard> list = apsWeldSeamStandardService.selectApsWeldSeamStandardList(apsWeldSeamStandard);
        return getDataTable(list);
    }
}
aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsPlate/ApsPlateProcessShopStatController.java
@@ -34,7 +34,7 @@
     */
    @Operation(summary = "钣金计划大表", description = "导出功能")
    @Log(title = "钣金车间统计", businessType = BusinessType.EXPORT)
    @RequiresPermissions("plateProcessShopStat:export")
    //@RequiresPermissions("plateProcessShopStat:export")
    @PostMapping("/export")
    public void export(HttpServletResponse response, ApsPlateProcessShopStat apsPlateProcessShopStat)
    {
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsPlanTask.java
@@ -8,6 +8,7 @@
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;
@@ -34,6 +35,7 @@
    @TableField(value = "id")
    @TableId(type = IdType.INPUT)
    @Schema(description = "主键ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;
    /**
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsPlate/ApsPlateProcessShopPlanStat.java
@@ -29,44 +29,24 @@
    private String mainPartNumber;
    /** ä¸»ä»¶å®¢æˆ· */
    @Schema(description = "主件客户,来自ERP", type = "String")
    @Schema(description = "主件客户", type = "String")
    @Excel(name = "主件客户")
    private String customer;
    /** ä¸»ä»¶è®¢å•交期 */
    @Schema(description = "主件订单交期,来自ERP", type = "String")
    @Excel(name = "主件订单交期")
    private BigInteger mainOrderDelivery;
    @Schema(description = "建树行", type = "String")
    @Excel(name = "建树行")
    private String requireTrackId;;
    /** ä¸šåŠ¡ç±»åž‹ */
    @Schema(description = "业务类型", type = "String")
    @Excel(name = "业务类型")
    private String businessType;
    /** ç•ªå· */
    @Schema(description = "需求追溯号,由APS产生", type = "String")
    @Excel(name = "番号")
    private String designation;
    /** å•据号 */
    @Schema(description = "单据号", type = "String")
    @Excel(name = "单据号")
    private String documentNumber;
    /** éœ€æ±‚分类 */
    @Schema(description = "需求分类", type = "String")
    @Excel(name = "需求分类")
    private String requirementType;
    /** å•据状态 */
    @Schema(description = "单据状态", type = "String")
    @Excel(name = "单据状态")
    private String documentStatus;
    /** å½“前工序 */
    @Schema(description = "当前工序", type = "String")
    @Excel(name = "当前工序")
    private String workCenter;
    /** æ–™å· */
@@ -84,79 +64,114 @@
    @Excel(name = "版本号")
    private String versionNumber;
    /** ä½Žé˜¶ç */
    @Excel(name = "低阶码")
    private String lowOrderCode;
    /** ç”Ÿäº§æ•°é‡ */
    @Schema(description = "生产数量", type = "String")
    @Excel(name = "生产数量")
    private BigDecimal productionQuantity;
    /** å·¥å•创建时间 */
    @Schema(description = "工单创建时间,来自ERP", type = "String")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "工单创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date orderCreateTime;
    /** éœ€æ±‚分类 */
    @Schema(description = "需求分类", type = "String")
    @Excel(name = "需求分类")
    private String requirementType;
    /** å•据状态 */
    @Schema(description = "单据状态", type = "String")
    @Excel(name = "单据状态")
    private String documentStatus;
    /** å·¥å•审核时间 */
    @Schema(description = "工单审核时间,来自ERP", type = "String")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "工单审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "审核时间", type = "String")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date approveOn;
    /** å·¥å•开工时间 */
    @Schema(description = "工单开工时间,来自ERP", type = "String")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "工单开工时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startWorkDate;
    /** å†æ¬¡ç¡®è®¤å®Œå·¥æ—¶é—´ */
    @Schema(description = "再次确认完工时间,来自APS", type = "String")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "再次确认完工时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date workOrderConfirmTime;
    /** è®¡åˆ’完工日 */
    @Schema(description = "计划完工日", type = "String")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "计划完工日", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date planEndDay;
    /** ç‰ˆæœ¬å· */
    @Schema(description = "生产工厂,来自ERP", type = "String")
    @Excel(name = "生产工厂")
    private String productionBase;
    /** ç‰ˆæœ¬å· */
    @Schema(description = "齐套状况,来自ERP", type = "String")
    @Excel(name = "齐套状况")
    private String kittingCondition;
    /** è®¡åˆ’齐套时间 */
    @Schema(description = "计划齐套时间,来自ERP", type = "String")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "计划齐套时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date planKittingTime;
    /** å·¥åºå· */
    @Excel(name = "工序号")
    private String processNumber;
    /** æ‰€å±žéƒ¨é—¨ */
    @Excel(name = "所属部门")
    /** å½“前工序 */
    @Schema(description = "当前工序", type = "String")
    @Excel(name = "当前工序")
    private String workCenter;
    /** å½“前工序责任人 */
    @Excel(name = "当前工序责任人")
    private String department;
    /** çŠ¶æ€ */
    @Excel(name = "状态")
    private String opStatus;
    /** ä¸‹ä¸€é“工序 */
    @Excel(name = "下一道工序")
    private String nextOpName;
    /** ç³»ç»Ÿå®Œå·¥æ—¶é—´ */
    @Schema(description = "系统完工时间", type = "String")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "系统完工时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date planEndDay;
    /** å·¥å•创建时间 */
    @Schema(description = "工单创建时间", type = "String")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "工单创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date orderCreateTime;
    /** å·¥å•开工时间 */
    @Schema(description = "工单开工时间", type = "String")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "工单开工时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startWorkDate;
    @Schema(description = "剩余工序", type = "String")
    private String remainedProcess;
    /*--------*/
    /** å†æ¬¡ç¡®è®¤å®Œå·¥æ—¶é—´ */
    @Schema(description = "再次确认完工时间", type = "String")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "再次确认完工时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date workOrderConfirmTime;
    /** ç”Ÿäº§å·¥åŽ‚ */
    @Schema(description = "生产工厂", type = "String")
    @Excel(name = "生产工厂")
    private String productionBase;
    /** é½å¥—状况 */
    @Schema(description = "齐套状况", type = "String")
    @Excel(name = "齐套状况")
    private String kittingCondition;
    /** è®¡åˆ’齐套时间 */
    @Schema(description = "计划齐套时间", type = "String")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "计划齐套时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date planKittingTime;
    /** ä¸»ä»¶è®¢å•交期 */
    @Schema(description = "主件订单交期", type = "String")
    @Excel(name = "主件订单交期")
    private BigInteger mainOrderDelivery;
    /** ä¸‹é“工序所属部门 */
    @Excel(name = "下道工序所属部门")
    private String nextProcessDeparment;
    /** å½“前工序状态 */
    @Excel(name = "当前工序状态")
    private String opStatus;
    /** ä¸‹ä¸€å·¥åºåç§° */
    @Excel(name = "下一工序名称")
    private String nextOpName;
    /** ä½Žé˜¶ç */
    @Excel(name = "低阶码")
    private String lowOrderCode;
    /** è½¦é—´å·¥åºä¿¡æ¯ */
    private List<ApsPlateProcessShopStat> deptPlans=new ArrayList<>();
}
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsPlate/ApsPlateRequireDate.java
@@ -24,12 +24,14 @@
     * ä¸»é”®ID
     */
    @TableId(value = "id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;
    /**
     * å·¥å•Id
     */
    @TableField(value = "plan_id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long planId;
    /**
aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsWeldSeamStandard.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
package com.aps.core.domain;
import com.aps.common.core.annotation.Excel;
import com.aps.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
 * ç„Šç¼æ ‡å‡†å¯¹è±¡ aps_weld_seam_standard
 *
 * @author user
 * @date 2023-11-05
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ApsWeldSeamStandard extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** ä¸»é”®ID */
    private Long id;
    /** æ–™å· */
    @Excel(name = "料号")
    private String itemCode;
    /** å›¾å· */
    @Excel(name = "图号")
    private String itemFigure;
    /** ç‰ˆæœ¬å· */
    @Excel(name = "版本号")
    private String itemFigureVersion;
    /** å•件焊缝数(Hup) */
    @Excel(name = "单件焊缝数(Hup)")
    private BigDecimal hupQty;
    /** å•件焊缝数(LOD) */
    @Excel(name = "单件焊缝数(LOD)")
    private BigDecimal lodQty;
    /** ç„ŠæŽ¥å½¢å¼(hup\lod) */
    @Excel(name = "焊接形式")
    private String type;
    /** æ˜¯å¦åˆ é™¤(0否,1是) */
    private Integer delFlag;
}
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsPlateProcessShopStatMapper.java
@@ -1,6 +1,8 @@
package com.aps.core.mapper;
import java.util.List;
import com.aps.core.domain.ApsPlate.ApsPlateProcessShopPlanStat;
import com.aps.core.domain.ApsPlate.ApsPlateProcessShopStat;
import org.apache.ibatis.annotations.Mapper;
@@ -64,4 +66,9 @@
    int deleteAll();
    void batchInsert(List<ApsPlateProcessShopStat> stats);
    /**
     * é’£é‡‘计划大表 åŸºç¡€ä¿¡æ¯æŸ¥è¯¢
     * */
    List<ApsPlateProcessShopPlanStat> selectPlatePlanBaseTable();
}
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsWeldSeamStandardMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
package com.aps.core.mapper;
import java.util.List;
import com.aps.core.domain.ApsWeldSeamStandard;
import org.apache.ibatis.annotations.Mapper;
/**
 * ç„Šç¼æ ‡å‡†Mapper接口
 *
 * @author user
 * @date 2023-11-05
 */
@Mapper
public interface ApsWeldSeamStandardMapper
{
    /**
     * æŸ¥è¯¢ç„Šç¼æ ‡å‡†åˆ—表
     *
     * @param apsWeldSeamStandard ç„Šç¼æ ‡å‡†
     * @return ç„Šç¼æ ‡å‡†é›†åˆ
     */
    public List<ApsWeldSeamStandard> selectApsWeldSeamStandardList(ApsWeldSeamStandard apsWeldSeamStandard);
}
aps-modules/aps-core/src/main/java/com/aps/core/service/IApsWeldSeamStandardService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
package com.aps.core.service;
import java.util.List;
import com.aps.core.domain.ApsWeldSeamStandard;
/**
 * ç„Šç¼æ ‡å‡†Service接口
 *
 * @author user
 * @date 2023-11-05
 */
public interface IApsWeldSeamStandardService
{
    /**
     * æŸ¥è¯¢ç„Šç¼æ ‡å‡†åˆ—表
     *
     * @param apsWeldSeamStandard ç„Šç¼æ ‡å‡†
     * @return ç„Šç¼æ ‡å‡†é›†åˆ
     */
    public List<ApsWeldSeamStandard> selectApsWeldSeamStandardList(ApsWeldSeamStandard apsWeldSeamStandard);
}
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineMoServiceImpl.java
@@ -134,6 +134,7 @@
                    planEnd != null) {
                    ApsGasPipelineMo apsGasPipelineMo = new ApsGasPipelineMo();
                    apsGasPipelineMo.setMo(mo);
                    apsGasPipelineMo.setMaterialCode(materialNum);
                    apsGasPipelineMo.setId(IdUtil.getSnowflakeNextId());
                    apsGasPipelineMo.setFactory(factory);
                    apsGasPipelineMo.setCreateBy(SecurityUtils.getUsername());
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsMaterialProductGroupManagementServiceImpl.java
@@ -68,6 +68,8 @@
    @Override
    public int insertApsMaterialProductGroupManagement(ApsMaterialProductGroupManagement apsMaterialProductGroupManagement)
    {
        apsMaterialProductGroupManagement.setId(IdUtil.getSnowflakeNextId());
        apsMaterialProductGroupManagement.setCreateBy(SecurityUtils.getUsername());
        apsMaterialProductGroupManagement.setCreateTime(DateUtils.getNowDate());
        return apsMaterialProductGroupManagementMapper.insertApsMaterialProductGroupManagement(apsMaterialProductGroupManagement);
    }
@@ -82,6 +84,7 @@
    public int updateApsMaterialProductGroupManagement(ApsMaterialProductGroupManagement apsMaterialProductGroupManagement)
    {
        apsMaterialProductGroupManagement.setUpdateTime(DateUtils.getNowDate());
        apsMaterialProductGroupManagement.setUpdateBy(SecurityUtils.getUsername());
        return apsMaterialProductGroupManagementMapper.updateApsMaterialProductGroupManagement(apsMaterialProductGroupManagement);
    }
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java
@@ -2,11 +2,13 @@
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson2.JSON;
import com.alibaba.nacos.common.utils.JacksonUtils;
import com.aps.common.core.utils.DateUtils;
import com.aps.common.core.utils.bean.BeanUtils;
import com.aps.common.core.web.domain.AjaxResult;
import com.aps.common.security.utils.DictUtils;
import com.aps.common.security.utils.SecurityUtils;
@@ -17,8 +19,12 @@
import com.aps.core.domain.ApsPlate.ApsPlateProcessStat;
import com.aps.core.mapper.*;
import com.aps.system.api.domain.SysDictData;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.util.IOUtils;
@@ -257,7 +263,7 @@
        ApsShop apsShop = new ApsShop();
        apsShop.setPlantCode(PLANT_CODE);
        apsShop.setStatus("1");
        // èŽ·å–è½¦é—´åˆ—è¡¨å¹¶å¤„ç†ç©ºå€¼
        List<String> shopList = Optional.ofNullable(shopMapper.selectApsShopList(apsShop))
                .orElse(Collections.emptyList())
@@ -266,8 +272,7 @@
                .toList();
        // èŽ·å–è®¡åˆ’åˆ—è¡¨å’ŒçŠ¶æ€åˆ—è¡¨
        List<ApsPlatePlan> planList = Optional.ofNullable(apsPlatePlanMapper.selectApsPlatePlanList(platePlan))
                .orElse(Collections.emptyList());
        List<ApsPlateProcessShopPlanStat> planList = apsPlateProcessShopStatMapper.selectPlatePlanBaseTable();
        List<ApsPlateProcessShopStat> shopStates = Optional.ofNullable(apsPlateProcessShopStatMapper.selectApsPlateProcessShopStatList(new ApsPlateProcessShopStat()))
                .orElse(Collections.emptyList());
@@ -281,26 +286,22 @@
        List<SysDictData> documentStatusDic = DictUtils.getDictCache("aps_document_status");
        // æž„建结果列表
        List<ApsPlateProcessShopPlanStat> shopPlanStats = planList.stream()
                .map(plan -> {
                    ApsPlateProcessShopPlanStat shopPlanStat = new ApsPlateProcessShopPlanStat();
                    BeanUtils.copyProperties(plan, shopPlanStat); // ç¡®ä¿ç›®æ ‡å¯¹è±¡æ˜¯åˆæ³•的单个对象实例
        planList.forEach(
                 plan -> {
                    // æ ¹æ® docNo èŽ·å–å¯¹åº”çš„ shopStatList
                    List<ApsPlateProcessShopStat> shopStatList = shopStatesByDocNo.getOrDefault(plan.getDocumentNumber(), Collections.emptyList());
                    shopPlanStat.setDeptPlans(shopStatList);
                    plan.setDeptPlans(shopStatList);
                    if (businessTypeDic != null) {
                        businessTypeDic.stream().filter(x -> x.getDictValue().equals(plan.getBusinessType())).findFirst()
                                .ifPresent(sysDictData -> shopPlanStat.setBusinessType(sysDictData.getDictLabel()));
                                .ifPresent(sysDictData -> plan.setBusinessType(sysDictData.getDictLabel()));
                    }
                    if (documentStatusDic != null) {
                        documentStatusDic.stream().filter(x->x.getDictValue().equals(plan.getDocumentStatus()))
                                .findFirst().ifPresent(sysDictData -> shopPlanStat.setDocumentStatus(sysDictData.getDictLabel()));
                                .findFirst().ifPresent(sysDictData -> plan.setDocumentStatus(sysDictData.getDictLabel()));
                    }
                    return shopPlanStat;
                }).toList();
        });
        // æž„建返回结果
        AjaxResult success = AjaxResult.success(shopPlanStats);
        AjaxResult success = AjaxResult.success(planList);
        success.put("shopNames", shopList);
        return success;
    }
@@ -314,7 +315,7 @@
        response.setCharacterEncoding("utf-8");
        Map<String, CellStyle> styles = createStyles(wb);
        CellStyle title = styles.get("title");
        CellStyle titleStyle = styles.get("title");
        try
        {
@@ -324,222 +325,58 @@
            SXSSFSheet sheet = wb.getSheetAt(0);
            /*填写日期列 å’Œ å·¥æ—¶åˆ—*/
            SXSSFRow rowTitle = sheet.createRow(0);
            SXSSFCell mainPartNumberTitle = rowTitle.createCell(0);
            mainPartNumberTitle.setCellValue("主件料号");
            mainPartNumberTitle.setCellStyle(title);
            SXSSFCell businessTypeTitle = rowTitle.createCell(1);
            businessTypeTitle.setCellValue("业务类型");
            businessTypeTitle.setCellStyle(title);
            SXSSFCell documentNumberTitle = rowTitle.createCell(2);
            documentNumberTitle.setCellValue("单据号");
            documentNumberTitle.setCellStyle(title);
            SXSSFCell requirementTypeTitle = rowTitle.createCell(3);
            requirementTypeTitle.setCellValue("需求分类");
            requirementTypeTitle.setCellStyle(title);
            SXSSFCell documentStatusTitle = rowTitle.createCell(4);
            documentStatusTitle.setCellValue("单据状态");
            documentStatusTitle.setCellStyle(title);
            SXSSFCell approveDateTitle = rowTitle.createCell(5);
            approveDateTitle.setCellValue("审核时间");
            approveDateTitle.setCellStyle(title);
            SXSSFCell workCenterTitle = rowTitle.createCell(6);
            workCenterTitle.setCellValue("当前工序");
            workCenterTitle.setCellStyle(title);
            SXSSFCell departmentTitle = rowTitle.createCell(7);
            departmentTitle.setCellValue("当前工序负责人");
            departmentTitle.setCellStyle(title);
            SXSSFCell crtPcsStsTitle = rowTitle.createCell(8);
            crtPcsStsTitle.setCellValue("当前工序状态");
            crtPcsStsTitle.setCellStyle(title);
            SXSSFCell nextProcessTitle = rowTitle.createCell(9);
            nextProcessTitle.setCellValue("下一工序");
            nextProcessTitle.setCellStyle(title);
            Map<Integer, String> FrontTitleMap = initFrontTitle(shopNames);
            FrontTitleMap.forEach((index, titleName) -> {
                createCell(rowTitle, index, titleName, titleStyle);
            });
            SXSSFCell nextProcessDeparmentTitle = rowTitle.createCell(10);
            nextProcessDeparmentTitle.setCellValue("下一工序负责人");
            nextProcessDeparmentTitle.setCellStyle(title);
            SXSSFCell itemNumberTitle = rowTitle.createCell(11);
            itemNumberTitle.setCellValue("料号");
            itemNumberTitle.setCellStyle(title);
            SXSSFCell drawingNoTitle = rowTitle.createCell(12);
            drawingNoTitle.setCellValue("图号");
            drawingNoTitle.setCellStyle(title);
            SXSSFCell versionNumberTitle = rowTitle.createCell(13);
            versionNumberTitle.setCellValue("版本号");
            versionNumberTitle.setCellStyle(title);
            SXSSFCell lowNumTitle = rowTitle.createCell(14);
            lowNumTitle.setCellValue("低阶码");
            lowNumTitle.setCellStyle(title);
            SXSSFCell productionQuantityTitle = rowTitle.createCell(15);
            productionQuantityTitle.setCellValue("生产数量");
            productionQuantityTitle.setCellStyle(title);
            SXSSFCell planSendDateTitle = rowTitle.createCell(16);
            planSendDateTitle.setCellValue("工单计划下发时间");
            planSendDateTitle.setCellStyle(title);
            SXSSFCell planEndDayTitle = rowTitle.createCell(17);
            planEndDayTitle.setCellValue("系统完工时间");
            planEndDayTitle.setCellStyle(title);
            String firstShopName = shopNames.get(0);
            SXSSFCell firstShopBeginDateTitle = rowTitle.createCell(18);
            firstShopBeginDateTitle.setCellValue(firstShopName+"开工时间");
            firstShopBeginDateTitle.setCellStyle(title);
            SXSSFCell firstShopEndDateTitle = rowTitle.createCell(19);
            firstShopEndDateTitle.setCellValue(firstShopName+"完工时间");
            firstShopEndDateTitle.setCellStyle(title);
            /*焊接件齐套*/
            SXSSFCell hanJieQiTaoTitle= rowTitle.createCell(20);
            hanJieQiTaoTitle.setCellValue("焊接件齐套开始时间");
            hanJieQiTaoTitle.setCellStyle(title);
            int i1 = 19;
            for (int i = 1; i < shopNames.size(); i++) {
                String shopName = shopNames.get(i);
                SXSSFCell beginDateCell = rowTitle.createCell(i * 2 + i1);
                SXSSFCell endDateCell = rowTitle.createCell(i * 2 + i1+1);
                beginDateCell.setCellValue(shopName+"开工时间");
                endDateCell.setCellValue(shopName+"完工时间");
                beginDateCell.setCellStyle(title);
                endDateCell.setCellStyle(title);
            }
            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            for (int i = 0; i < table.size(); i++) {
                ApsPlateProcessShopPlanStat plan = table.get(i);
                //JSONObject jsonObject = (JSONObject) JSONObject.toJSON(plan);
                ObjectMapper mapper = new ObjectMapper();
                ObjectNode node = mapper.valueToTree(plan);
                SXSSFRow dataRow  = sheet.createRow(i+1);
                //主件料号
                SXSSFCell mainPartNumberCell = dataRow.createCell(0);
                mainPartNumberCell.setCellValue(plan.getMainPartNumber());
                //业务类型;
                SXSSFCell businessTypeCell= dataRow.createCell(1);
                businessTypeCell.setCellValue(plan.getBusinessType());
                LinkedHashMap<String,String>  frontTitles= frontTitleName();
                ArrayList<Map.Entry<String, String>> frontTitlesList = new ArrayList<Map.Entry<String, String>>(
                        frontTitles.entrySet());
                //单据号;
                SXSSFCell documentNumberCell = dataRow.createCell(2);
                documentNumberCell.setCellValue(plan.getDocumentNumber());
                for (int i1 = 0; i1 < frontTitlesList.size(); i1++) {
                //需求分类;
                SXSSFCell requirementTypeCell = dataRow.createCell(3);
                requirementTypeCell.setCellValue(plan.getRequirementType());
                    Map.Entry<String, String> entry = frontTitlesList.get(i1);
                    String filedKey = entry.getKey();
                    String fieldValue= node.get(filedKey).textValue();
                    createCell(dataRow, i1,fieldValue , null);
                }
                // å•据状态
                SXSSFCell documentStatusCell = dataRow.createCell(4);
                documentStatusCell.setCellValue(plan.getDocumentStatus());
                // å®¡æ ¸æ—¶é—´
                SXSSFCell approveDateCell = dataRow.createCell(5);
                approveDateCell.setCellValue("");
                //当前工序
                SXSSFCell workCenterCell = dataRow.createCell(6);
                workCenterCell.setCellValue(plan.getWorkCenter());
                //当前工序负责人;
                SXSSFCell departmentCell = dataRow.createCell(7);
                departmentCell.setCellValue(plan.getDepartment());
                /*当前工序状态*/
                SXSSFCell crtPcsStsCell = dataRow.createCell(8);
                crtPcsStsCell.setCellValue(plan.getOpStatus());
                //下一工序
                SXSSFCell nextProcessCell = dataRow.createCell(9);
                nextProcessCell.setCellValue(plan.getNextOpName());
                //下一工序工序负责人
                SXSSFCell nextProcessDeparmentCell = dataRow.createCell(10);
                nextProcessDeparmentCell.setCellValue(plan.getNextProcessDeparment());
                //料号
                SXSSFCell itemNumberCell = dataRow.createCell(11);
                itemNumberCell.setCellValue(plan.getItemNumber());
                // å›¾å·
                SXSSFCell drawingNoCell = dataRow.createCell(12);
                drawingNoCell.setCellValue(plan.getDrawingNo());
               //版本号
                SXSSFCell versionNumberCell = dataRow.createCell(13);
                versionNumberCell.setCellValue(plan.getVersionNumber());
                //低阶码
                SXSSFCell lowNumCell = dataRow.createCell(14);
                lowNumCell.setCellValue("");
                //生产数量
                SXSSFCell productionQuantityCell = dataRow.createCell(15);
                productionQuantityCell.setCellValue(plan.getProductionQuantity().toString());
                //工单计划下发时间
                SXSSFCell planSendDateCell = dataRow.createCell(16);
                planSendDateCell.setCellValue("");
                //系统完工时间
                SXSSFCell planEndDayCell = dataRow.createCell(17);
                planEndDayCell.setCellValue(dateFormat.format(plan.getPlanEndDay()));
                SXSSFCell firstShopBeginDateCell = dataRow.createCell(18);
                SXSSFCell firstShopEndDateCell = dataRow.createCell(19);
                plan.getDeptPlans().stream().filter(x->x.getShopName().equals(firstShopName)).findFirst().ifPresent(x->{
                    firstShopBeginDateCell.setCellValue(x.getPlanStartDate());
                    firstShopEndDateCell.setCellValue(x.getPlanEndDate());
                });
                /*焊接件齐套*/
                SXSSFCell hanJieQiTaoCell = dataRow.createCell(20);
                hanJieQiTaoCell.setCellValue("");
                for (int j = 1; j< shopNames.size(); j++) {
                    String shopName = shopNames.get(j);
                    SXSSFCell beginDateCell = dataRow.createCell(j * 2 + i1);
                    SXSSFCell endDateCell = dataRow.createCell(j * 2 + i1+1);
                int shopBeginIndex = frontTitlesList.size();
                for (int j = 0; j< shopNames.size(); j++) {
                    String shopName = shopNames.get(0);
                    SXSSFCell beginDateCell = dataRow.createCell(j * 2 + shopBeginIndex);
                    SXSSFCell endDateCell = dataRow.createCell(j * 2 + shopBeginIndex+1);
                    plan.getDeptPlans().stream().filter(x->x.getShopName().equals(shopName)).findFirst().ifPresent(x->{
                        beginDateCell.setCellValue(x.getPlanStartDate());
                        endDateCell.setCellValue(x.getPlanEndDate());
                    });
                }
                LinkedHashMap<String,String>  backTitles= backTitleName();
                ArrayList<Map.Entry<String, String>> backTitlesList = new ArrayList<Map.Entry<String, String>>(
                        backTitles.entrySet());
                int backBeginIndex = shopBeginIndex+shopNames.size()*2;
                for (int i1 = 0; i1 < backTitlesList.size(); i1++) {
                    Map.Entry<String, String> entry = backTitlesList.get(i1);
                    String filedKey = entry.getKey();
                    String fieldValue= node.get(filedKey).textValue();
                    createCell(dataRow, i1+backBeginIndex,fieldValue , null);
                }
            }
            for (int i = 0; i <  rowTitle.getLastCellNum(); i++) {
                sheet.setColumnWidth(i, 20 * 256);
            }
            wb.write(response.getOutputStream());
        }
        catch (Exception e)
@@ -552,6 +389,79 @@
        }
    }
    private  LinkedHashMap<String,String>  frontTitleName(){
        LinkedHashMap<String,String> map = new LinkedHashMap<>();
        map.put("mainPartNumber","主件料号");
        map.put("customer","主件客户");
        map.put("requireTrackId","建树行");
        map.put("businessType","业务类型");
        map.put("documentNumber","单据号");
        map.put("itemNumber","料号");
        map.put("drawingNo","图号");
        map.put("versionNumber","版本号");
        map.put("lowOrderCode","低阶码");
        map.put("productionQuantity","生产数量");
        map.put("requirementType","需求分类");
        map.put("documentStatus","单据状态");
        map.put("approveOn","审核时间");
        map.put("processNumber","工序号");
        map.put("workCenter","当前工序");
        map.put("department","当前工序责任人");
        map.put("opStatus","状态");
        map.put("nextOpName","下一道工序");
        map.put("planEndDay","系统完工时间");
        return map;
    }
    private LinkedHashMap<String,String>  backTitleName(){
        LinkedHashMap<String,String> map = new LinkedHashMap<>();
        map.put("orderCreateTime","工单创建时间");
        map.put("startWorkDate","工单开工时间");
        map.put("remainedProcess","剩余工序");
        return map;
    }
    private  Map<Integer,String> initFrontTitle(List<String> shopNames) {
        Map<Integer,String> map = new HashMap<>();
        Map<String,String>  frontTitles= frontTitleName();
        AtomicInteger index= new AtomicInteger();
        frontTitles.forEach((key,value)->{
            map.put(index.get(), value);
            index.getAndIncrement();
        });
        for (int i = 0; i < shopNames.size(); i++) {
            map.put(i * 2 + index.get(),shopNames.get(i) + "开始时间");
            map.put(i * 2 + index.get()+1,shopNames.get(i) + "结束时间");
        }
        Map<String,String>  backTitles= backTitleName();
        AtomicInteger begBackIndex= new AtomicInteger(frontTitles.size() + shopNames.size() * 2);
        backTitles.forEach((key,value)->{
            map.put(begBackIndex.get(),value);
            begBackIndex.getAndIncrement();
        });
        return map;
    }
    private static void createCell(SXSSFRow rowTitle, int column, String titleName, CellStyle cellStyle) {
        SXSSFCell cell = rowTitle.createCell(column);
        cell.setCellValue(titleName);
        if(null!=cellStyle){
            cell.setCellStyle(cellStyle);
        }
    }
    private Map<String,CellStyle> createStyles(SXSSFWorkbook wb)
    {
        Map<String,CellStyle> styles=new HashMap<>();
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsWeldSeamStandardServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
package com.aps.core.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.aps.core.mapper.ApsWeldSeamStandardMapper;
import com.aps.core.domain.ApsWeldSeamStandard;
import com.aps.core.service.IApsWeldSeamStandardService;
/**
 * ç„Šç¼æ ‡å‡†Service业务层处理
 *
 * @author user
 * @date 2023-11-05
 */
@Service
public class ApsWeldSeamStandardServiceImpl implements IApsWeldSeamStandardService
{
    @Autowired
    private ApsWeldSeamStandardMapper apsWeldSeamStandardMapper;
    /**
     * æŸ¥è¯¢ç„Šç¼æ ‡å‡†åˆ—表
     *
     * @param apsWeldSeamStandard ç„Šç¼æ ‡å‡†
     * @return ç„Šç¼æ ‡å‡†
     */
    @Override
    public List<ApsWeldSeamStandard> selectApsWeldSeamStandardList(ApsWeldSeamStandard apsWeldSeamStandard)
    {
        return apsWeldSeamStandardMapper.selectApsWeldSeamStandardList(apsWeldSeamStandard);
    }
}
aps-modules/aps-core/src/main/resources/mapper/core/ApsMaterialProductGroupManagementMapper.xml
@@ -69,8 +69,6 @@
            <if test="factory != null">factory = #{factory},</if>
            <if test="materialCode != null">material_code = #{materialCode},</if>
            <if test="domain != null">domain = #{domain},</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>
            <if test="isMain != null">is_main = #{isMain},</if>
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateProcessShopStatMapper.xml
@@ -131,4 +131,43 @@
        )
        </foreach>
    </insert>
    <!--钣金计划大表 å·¥å•基础信息查询-->
    <select id="selectPlatePlanBaseTable" resultType="com.aps.core.domain.ApsPlate.ApsPlateProcessShopPlanStat">
        with a as(
            select ap.document_number, string_agg(pr.process_name,',') as remained_process
            from aps_plate_plan as ap
                     left join aps_process_route as pr on ap.document_number=pr.work_order_no
            where cast(pr.process_number as numeric) > cast(ap.process_number as numeric)
            group by ap.document_number
        )
        select
            app.id,
            app.main_part_number,
            app.customer,
            app.business_type,
            app.document_number,
            app.item_number,
            app.drawing_no,
            app.version_number,
            app.low_order_code,
            app.production_quantity,
            app.requirement_type,
            app.document_status,
            app.approve_on,
            app.process_number,
            app.work_center,
            app.department,
            app.op_status,
            app.next_op_name,
            app.order_create_time,
            app.start_work_date,
            app.production_base,
            app.plan_end_day,
            a.remained_process
        from aps_plate_plan as app
                 left join a on app.document_number=a.document_number
        where app.del_flag='0';
    </select>
</mapper>
aps-modules/aps-core/src/main/resources/mapper/core/ApsWeldSeamStandardMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
<?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.ApsWeldSeamStandardMapper">
    <resultMap type="com.aps.core.domain.ApsWeldSeamStandard" id="ApsWeldSeamStandardResult">
        <result property="id"    column="id"    />
        <result property="itemCode"    column="item_code"    />
        <result property="itemFigure"    column="item_figure"    />
        <result property="itemFigureVersion"    column="item_figure_version"    />
        <result property="hupQty"    column="hup_qty"    />
        <result property="lodQty"    column="lod_qty"    />
        <result property="type"    column="type"    />
        <result property="delFlag"    column="del_flag"    />
    </resultMap>
    <sql id="selectApsWeldSeamStandardVo">
        select id, item_code, item_figure, item_figure_version, hup_qty, lod_qty, type, del_flag from aps_weld_seam_standard
    </sql>
    <select id="selectApsWeldSeamStandardList" parameterType="com.aps.core.domain.ApsWeldSeamStandard" resultMap="ApsWeldSeamStandardResult">
        <include refid="selectApsWeldSeamStandardVo"/>
        <where>
            <if test="itemCode != null  and itemCode != ''"> and item_code LIKE '%' || #{itemCode} || '%'</if>
            <if test="itemFigure != null  and itemFigure != ''"> and item_figure = #{itemFigure}</if>
            <if test="itemFigureVersion != null  and itemFigureVersion != ''"> and item_figure_version = #{itemFigureVersion}</if>
            <if test="hupQty != null "> and hup_qty = #{hupQty}</if>
            <if test="lodQty != null "> and lod_qty = #{lodQty}</if>
            <if test="type != null  and type != ''"> and type = #{type}</if>
            and del_flag = 0
        </where>
    </select>
</mapper>