hongjli
2025-05-20 67e1e623bdd4b59ac5f1bdb16363a66a511ebdaa
Merge remote-tracking branch 'origin/dev' into dev
已修改9个文件
77 ■■■■■ 文件已修改
aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsMaterialProductGroupManagementController.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsPlatePlanMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsPlateProcessStatMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineMoServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelinePredictionServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | 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/ApsPlateStandardRequireServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlatePlanMapper.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateProcessStatMapper.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aps-modules/aps-core/src/main/java/com/aps/core/controller/mainPlan/ApsMaterialProductGroupManagementController.java
@@ -37,7 +37,7 @@
     * 查询物料产品组数据管理列表
     */
    @Operation(summary = "查询物料产品组数据管理列表", description = "分页查询")
//    @RequiresPermissions("materialProductGroup:management:list")
    @RequiresPermissions("materialProductGroup:management:list")
    @GetMapping("/list")
    public TableDataInfo list(ApsMaterialProductGroupManagement apsGasPipelineMo)
    {
@@ -47,9 +47,9 @@
    }
    @Operation(summary = "导入手工气体预测数据", description = "批量导入")
    @Log(title = "导入手工气体预测数据", businessType = BusinessType.IMPORT)
//    @RequiresPermissions("materialProductGroup:mo:import")
    @Operation(summary = "导入产品组数据", description = "批量导入")
    @Log(title = "导入产品组数据", businessType = BusinessType.IMPORT)
    @RequiresPermissions("materialProductGroup:management:import")
    @PostMapping("/importData")
    public AjaxResult importData(MultipartFile file) throws Exception {
@@ -60,7 +60,7 @@
     * 导出物料产品组数据管理列表
     */
    @Operation(summary = "导出物料产品组数据管理列表", description = "导出")
//    @RequiresPermissions("materialProductGroup:management:export")
    @RequiresPermissions("materialProductGroup:management:export")
    @Log(title = "物料产品组数据管理", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, ApsMaterialProductGroupManagement apsMaterialProductGroupManagement)
@@ -85,7 +85,7 @@
     * 新增物料产品组数据管理
     */
    @Operation(summary = "新增物料产品组数据管理", description = "单个新增")
//    @RequiresPermissions("materialProductGroup:management:add")
    @RequiresPermissions("materialProductGroup:management:add")
    @Log(title = "物料产品组数据管理", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody ApsMaterialProductGroupManagement apsMaterialProductGroupManagement)
@@ -97,8 +97,8 @@
     * 修改物料产品组数据管理
     */
    @Operation(summary = "修改物料产品组数据管理", description = "单个修改")
//    @RequiresPermissions("materialProductGroup:management:edit")
    @Log(title = "物料产品组数据管理", businessType = BusinessType.UPDATE)
    @RequiresPermissions("materialProductGroup:management:edit")
    @Log(title = "修改物料产品组数据管理", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody ApsMaterialProductGroupManagement apsMaterialProductGroupManagement)
    {
@@ -109,7 +109,7 @@
     * 删除物料产品组数据管理
     */
    @Operation(summary = "删除物料产品组数据管理", description = "批量删除")
//    @RequiresPermissions("materialProductGroup:management:remove")
    @RequiresPermissions("materialProductGroup:management:remove")
    @Log(title = "物料产品组数据管理", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsPlatePlanMapper.java
@@ -74,7 +74,7 @@
     */
    public List<ApsPlatePlan> selectPlateRedundantOrderList(ApsPlatePlan apsPlatePlan);
    List<ApsPlatePlan> selectPlatePlanByPlantMajor(String plant,String professionalAffiliation);
    List<ApsPlatePlan> selectPlatePlanByPlantMajor(String plant);
    /**
     * 获取一条未匹配的子计划
aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsPlateProcessStatMapper.java
@@ -60,7 +60,9 @@
     * @return 结果
     */
    public int deleteApsPlateProcessStatByIds(String[] ids);
    /**统计临时数据*/
    /**统计临时数据
     * 批量设置的计划完工日期> 导入的需求日期>  工单自身的计划完工日期
     * */
    List<ApsPlateProcessStat> queryTempStat();
    /**
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineMoServiceImpl.java
@@ -118,6 +118,9 @@
            /*数据列从1开始*/
            for (int i = 1; i <= rows; i++) {
                Row row = sheet.getRow(i);
                if (row.getCell(0) == null){
                    continue;
                }
                String mo = row.getCell(0).getStringCellValue();
                if (StringUtils.isEmpty(mo)){
                    continue;
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelinePredictionServiceImpl.java
@@ -121,6 +121,10 @@
            /*数据列从1开始*/
            for (int i = 1; i <= rows; i++) {
                Row row = sheet.getRow(i);
                if (row.getCell(0) == null){
                    continue;
                }
                String materialCode = row.getCell(0).getStringCellValue();
                if (StringUtils.isEmpty(materialCode)){
                    continue;
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsMaterialProductGroupManagementServiceImpl.java
@@ -122,6 +122,9 @@
            /*数据列从1开始*/
            for (int i = 1; i <= rows; i++) {
                Row row = sheet.getRow(i);
                if (row.getCell(0) == null) {
                    continue;
                }
                String materialCode = row.getCell(0).getStringCellValue();
                if (StringUtils.isEmpty(materialCode)){
                    continue;
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateStandardRequireServiceImpl.java
@@ -172,10 +172,8 @@
        requireBatchService.initRequireBatch();
        /*定义工厂为南通 */
        String plantCode="FORTUNA";
        /*定义主单类型为钣金主单*/
        String mainOrderType = "main";
        /*获取钣金主单信息*/
        List<ApsPlatePlan> mainPlans = platePlanMapper.selectPlatePlanByPlantMajor(plantCode,mainOrderType);
        List<ApsPlatePlan> mainPlans = platePlanMapper.selectPlatePlanByPlantMajor(plantCode);
        Hashtable<String, ApsMaterialStorageManagement> usedStorage = new Hashtable<>();
        /*内存中存储子件工单*/
        Hashtable<String, List<ApsPlatePlan>> subPlans = new Hashtable<>();
@@ -183,13 +181,9 @@
        for (ApsPlatePlan mainPlan : mainPlans) {
            String itemNumber = mainPlan.getItemNumber();
            /*根据料号 获取BOM Header */
            List<ApsPlateStandardRequire> requiresList=new ArrayList<>();
            List<ApsPlateStandardRequireBomStockDetail> stockDetailsList=new ArrayList<>();
            List<ApsPlateStandardRequireBomOrderDetail> orderDetailsList=new ArrayList<>();
            log.info("开始生成需求:工单号:"+mainPlan.getDocumentNumber());
            /*当前Bom节点处理完成后,处理下级BOM*/
            getBomRequires(plantCode, "0","0",itemNumber,BigDecimal.ONE, batchNum, null
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlatePlanMapper.xml
@@ -277,15 +277,19 @@
    </update>
    <select id="selectPlatePlanByPlantMajor" parameterType="com.aps.core.domain.ApsPlate.ApsPlatePlan" resultMap="ApsPlatePlanResult">
        select  id,document_number,main_part_number,item_number,plant,professional_affiliation,production_quantity,require_id,
        unmatched_quantity,version, production_base,plan_end_day,order_create_time,low_order_code
        from aps_plate_plan
        <where>
        with rd as (
            select doc_no,require_date   from aps_plate_require_date where del_flag=0
        )
        select
            app.id,app.document_number,app.main_part_number,app.item_number,app.plant,app.professional_affiliation,app.production_quantity,app.require_id,
            app.unmatched_quantity,app.version, app.production_base,app.order_create_time,app.low_order_code,
            app.plan_end_day as orign_end_day,
            COALESCE(rd.require_date,app.plan_end_day) as plan_end_day
        from aps_plate_plan as  app
        left join rd  on app.document_number=rd.doc_no
        where app.del_flag='0'  and app.professional_affiliation = 'main'
            <if test="plant != null "> and plant = #{plant} </if>
            <if test="professionalAffiliation != null "> and professional_affiliation = 'main' </if>
              and del_flag='0'
        </where>
        order by document_number asc,id asc
        order by document_number ,id
    </select>
    <select id="selectUnMatchPlateSubPlan" parameterType="com.aps.core.domain.ApsPlate.ApsPlatePlan" resultMap="ApsPlatePlanResult">
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlate/ApsPlateProcessStatMapper.xml
@@ -133,6 +133,8 @@
    </delete>
    <select id="queryTempStat" resultMap="ApsPlateProcessStatResult">
        with    dt as ( select doc_no,require_date   from aps_plate_require_date where del_flag=0),
                rd as ( select doc_no,plan_end_day   from aps_plate_standard_require_order_end_day where del_flag=0)
        select row_number() over (partition by rt.work_order_no order by rt.process_number desc ) as num,
                rt.work_order_no,
               rt.process_name,
@@ -144,13 +146,16 @@
               rt.process_plan_start_day,
               rt.process_plan_end_day,
               pl.plan_end_day,
                COALESCE(rd.plan_end_day,pl.plan_end_day)                                         as order_plan_end_day
               rd.plan_end_day as modify_day,
               dt.require_date,
               COALESCE(rd.plan_end_day, COALESCE(dt.require_date, pl.plan_end_day)  )            as order_plan_end_day
        from aps_plate_plan as pl
                 left join aps_process_route as rt on pl.document_number = rt.work_order_no
                 left join aps_plate_standard_require_order_end_day as rd on pl.document_number = rd.doc_no  and rd.del_flag =0
        where pl.document_number is not null and rt.work_order_no is not null and
              (pl.plan_end_day is not null or rd.plan_end_day is not null )
        order by rt.work_order_no asc, rt.process_number desc
                 left join rd on    pl.document_number = rd.doc_no
                 left join dt on    pl.document_number=dt.doc_no
        where pl.document_number is not null
          and rt.work_order_no is not null
        order by rt.work_order_no, rt.process_number desc
    </select>
    <update id="removeOtherStat" parameterType="String">
        delete from aps_plate_process_stat where batch_number != #{batchNumber}