1、结束功能从删除工程表信息改为将工程状态修改为6
2、中空大理片笼界面破损详情添加每片玻璃的破损
8个文件已修改
71 ■■■■ 已修改文件
hangzhoumesParent/common/servicebase/src/main/java/com/mes/engineering/service/impl/EngineeringServiceImpl.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassRelationInfoController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/entity/dto/LackDetailsDTO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/entity/vo/HollowBigStorageDetailsQueryVO.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassRelationInfoService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/engineering/service/impl/EngineeringServiceImpl.java
@@ -2,6 +2,7 @@
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mes.engineering.entity.Engineering;
@@ -107,6 +108,7 @@
                .last("limit 1");
        return engineeringMapper.selectOne(wrapper);
    }
    @Override
    public Engineering selectInitiates(Integer state,Integer cell) {
        //查询是否有开始上片的工程任务
@@ -156,9 +158,15 @@
    @Override
    public boolean deleteTask(String engineerId) {
        //删除工程表
        QueryWrapper<Engineering> wrapper = new QueryWrapper<>();
        wrapper.eq("engineer_id", engineerId);
        return this.remove(wrapper);
//        QueryWrapper<Engineering> wrapper = new QueryWrapper<>();
//        wrapper.eq("engineer_id", engineerId);
//        return this.remove(wrapper);
        //修改工程表状态
        return this.update(
                new LambdaUpdateWrapper<Engineering>()
                        .eq(Engineering::getEngineerId, engineerId)
                        .set(Engineering::getState, 6)
        );
    }
    @Override
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassRelationInfoController.java
@@ -2,6 +2,7 @@
import com.mes.damage.entity.request.DamageRequest;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.hollow.entity.dto.LackDetailsDTO;
import com.mes.hollow.entity.vo.HollowAllFlowCardVO;
import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO;
@@ -46,6 +47,13 @@
        return Result.success(lackDetailsList);
    }
    @ApiOperation("缺片玻璃信息详情")
    @PostMapping("/queryLackGlassByFlowCard")
    public Result<List<GlassInfo>> queryLackGlassByFlowCard(@RequestBody HollowBigStorageDetailsQueryVO query) {
        List<GlassInfo> lackGlassList = hollowGlassRelationInfoService.queryLackGlassByFlowCard(query);
        return Result.success(lackGlassList);
    }
//    @ApiOperation("查询指定流程卡及层数的缺片详情")
//    @PostMapping("/queryLackByFlowCard")
//    public Result<List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId) {
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/entity/dto/LackDetailsDTO.java
@@ -52,6 +52,10 @@
     * /*破损片数
     */
    private Integer damageCount;
    /**
     * /*补片数量
     */
    private Integer patchCount;
}
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/entity/vo/HollowBigStorageDetailsQueryVO.java
@@ -33,5 +33,13 @@
     * 产品名称
     */
    private String productName;
    /**
     * 序号
     */
    private Integer orderSort;
    /**
     * 层
     */
    private Integer layer;
}
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java
@@ -1,6 +1,7 @@
package com.mes.hollow.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.hollow.entity.HollowGlassRelationInfo;
import com.mes.hollow.entity.dto.HollowGlassDetailsDTO;
import com.mes.hollow.entity.dto.LackDetailsDTO;
@@ -36,5 +37,7 @@
     * @return
     */
    OrderDetailsDTO queryProductNameByFlowCardId(@Param("flowCardId") String flowCardId,@Param("productName") String productName,@Param("customerName") String customerName);
    List<GlassInfo> queryLackGlassByFlowCard(@Param("flowCardId") String flowCardId, @Param("orderSort") Integer orderSort, @Param("layer") Integer layer);
}
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassRelationInfoService.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.mes.damage.entity.request.DamageRequest;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.hollow.entity.HollowGlassRelationInfo;
import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO;
import com.mes.hollow.entity.dto.HollowBigStorageDTO;
@@ -50,5 +51,7 @@
    Integer getGlassGapByThickness(Double thickness);
    Boolean hollowBigStorageGlassDamage(DamageRequest request);
    List<GlassInfo> queryLackGlassByFlowCard(HollowBigStorageDetailsQueryVO query);
}
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
@@ -430,7 +430,9 @@
        List<GlassInfo> glassInfos = glassInfoService.list(new LambdaQueryWrapper<GlassInfo>()
                .eq(GlassInfo::getFlowCardId, request.getFlowCardId())
                .eq(GlassInfo::getLayer, request.getLayer())
                .eq(GlassInfo::getGlassType, request.getGlassType()));
                .eq(GlassInfo::getGlassType, request.getGlassType())
                .eq(request.getGlassId() != null, GlassInfo::getGlassId, request.getGlassId())
        );
        for (GlassInfo glassInfo : glassInfos) {
            //掰片报破损
            damageService.autoSubmitReport(glassInfo.getGlassId(), request.getLine(), request.getWorkingProcedure(), request.getRemark(), request.getState());
@@ -438,6 +440,11 @@
        return Boolean.TRUE;
    }
    @Override
    public List<GlassInfo> queryLackGlassByFlowCard(HollowBigStorageDetailsQueryVO query) {
        return baseMapper.queryLackGlassByFlowCard(query.getFlowCardId(), query.getOrderSort(), query.getLayer());
    }
    private void sortFlowCardIdList(List<HollowAllFlowCardVO> list) {
        Pattern pattern = Pattern.compile("^NG(\\d+)([A-Za-z]+)(\\d+)$");
hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
@@ -142,15 +142,15 @@
                 select process_id        as flow_card_id,
                        technology_number as layer,
                        order_number      as order_sort,
                        count(1)          as damage_count
                        count(distinct
                              case when type = 8 and status &lt; 3 then glass_id else null end)        as damage_count,
                        count(distinct case when type = 8 and status >= 3 then glass_id else null end) as patch_count
                 from damage
                 where process_id in (select flow_card_id from flow_card_id_info)
                   and type in (8, 9)
                   and status &lt; 3
                 group by process_id, technology_number, order_number
             ),
             result_count as (
                 select t.*, IFNULL(t1.damage_count, 0) damage_count
                 select t.*, IFNULL(t1.damage_count, 0) damage_count, IFNULL(t1.patch_count, 0) patch_count
                 from lack_count_temp t
                          left join damage_count_temp t1 on t.flow_card_id = t1.flow_card_id and t.layer = t1.layer and
                                                            t.order_sort = t1.order_sort
@@ -181,6 +181,20 @@
        )
        limit 1
    </select>
    <select id="queryLackGlassByFlowCard" resultType="com.mes.glassinfo.entity.GlassInfo">
        with glass_id_info as (
        select glass_id,order_sort from hollow_glass_relation_info where flow_card_id=#{flowCardId} and
        order_sort=#{orderSort} and layer=#{layer} and glass_id is not null
        ),
        damage_glass_id as (
        select glass_id from damage where process_id=#{flowCardId} and order_number=#{orderSort} and
        technology_number=#{layer} and type=8 and status &lt; 3 and glass_id is not null
        )
        select t.* from glass_info t left join glass_id_info t1 on t.glass_id=t1.glass_id
        left join damage_glass_id t2 on t.glass_id=t2.glass_id
        where t.flow_card_id=#{flowCardId} and t.glass_type=#{orderSort} and t.layer=#{layer} and t1.glass_id is null
        and t2.glass_id is null
    </select>
    <update id="clearDirtyFlowCardData">
        update hollow_glass_relation_info