1、结束功能从删除工程表信息改为将工程状态修改为6
2、中空大理片笼界面破损详情添加每片玻璃的破损
| | |
| | | |
| | | 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; |
| | |
| | | .last("limit 1"); |
| | | return engineeringMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public Engineering selectInitiates(Integer state,Integer cell) { |
| | | //查询是否有开始上片的工程任务 |
| | |
| | | @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 |
| | |
| | | |
| | | |
| | | 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; |
| | |
| | | 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) { |
| | |
| | | * /*破损片数 |
| | | */ |
| | | private Integer damageCount; |
| | | /** |
| | | * /*补片数量 |
| | | */ |
| | | private Integer patchCount; |
| | | |
| | | |
| | | } |
| | |
| | | * 产品名称 |
| | | */ |
| | | private String productName; |
| | | /** |
| | | * 序号 |
| | | */ |
| | | private Integer orderSort; |
| | | /** |
| | | * 层 |
| | | */ |
| | | private Integer layer; |
| | | |
| | | } |
| | |
| | | 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; |
| | |
| | | * @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); |
| | | } |
| | | |
| | |
| | | |
| | | 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; |
| | |
| | | Integer getGlassGapByThickness(Double thickness); |
| | | |
| | | Boolean hollowBigStorageGlassDamage(DamageRequest request); |
| | | |
| | | List<GlassInfo> queryLackGlassByFlowCard(HollowBigStorageDetailsQueryVO query); |
| | | } |
| | | |
| | |
| | | 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()); |
| | |
| | | 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+)$"); |
| | | |
| | |
| | | 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 < 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 < 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 |
| | |
| | | ) |
| | | 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 < 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 |