Merge remote-tracking branch 'origin/master'
| | |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | var url="/cacheGlass/edgStorageCage/edgStorageCageGlass?edgStorageCageId="+row.id; |
| | | console.log(url); |
| | | console.log(row); |
| | | const response = await request.post(url, { |
| | | esdId: row.esdId |
| | | glassId:row.glass_id |
| | | }) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/glassStorage/rawGlassStorageDetails/deleteWarehousing",[row.slotId]) |
| | | // const response = await request.post("/glassStorage/rawGlassStorageDetails/deleteWarehousing",{ |
| | | // slotId: row.slotId |
| | | // }) |
| | | |
| | | var url="/glassStorage/rawGlassStorageDetails/deleteWarehousing?slotId="+row.slotId; |
| | | const response = await request.post(url) |
| | | // const response = await request.post("/glassStorage/rawGlassStorageDetails/deleteWarehousing",[row.slotId]) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/glassStorage/rawGlassStorageDetails/outWarehousing",[row.slotId]) |
| | | var url="/glassStorage/rawGlassStorageDetails/outWarehousing?slotId="+row.slotId; |
| | | const response = await request.post(url) |
| | | // const response = await request.post("/glassStorage/rawGlassStorageDetails/outWarehousing",[row.slotId]) |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | |
| | | <el-button id="searchButton" type="info" @click="dialogFormVisiblec = true;dialogFormVisibleb = false;dialogFormVisible = false;dialogFormVisiblea = false">{{ $t('processCard.print') }}</el-button> |
| | | <div v-if="dialogFormVisible" > |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading"> |
| | | <div style="width: 50%;float: left;background-color: #f4f4f5;height: 430px;"> |
| | | <div style="width: 49%;float: right;background-color: #f4f4f5;height: 430px;"> |
| | | <div v-if="adjustedRects1.length > 0"> |
| | | <!-- <div style="text-align: center;">炉号:{{ engineerIdDisplay }}-{{ adjustedRects[0].temperingLayoutId }}</div> --> |
| | | <div style="text-align: center;"> 炉号:{{ adjustedRects1[0].engineerId }}-{{ adjustedRects1[0].temperingLayoutId }} </div> |
| | |
| | | </el-scrollbar> |
| | | </div> |
| | | </div> |
| | | <div style="width: 49%;float: right;background-color: #f4f4f5;height: 430px;"> |
| | | <div style="width: 50%;float: left;background-color: #f4f4f5;height: 430px;"> |
| | | <div v-if="adjustedRects2.length > 0"> |
| | | <div style="text-align: center;"> 炉号:{{ adjustedRects2[0].engineerId }}-{{ adjustedRects2[0].temperingLayoutId }} </div> |
| | | <!-- <div style="text-align: center;">炉号:{{ engineerIdDisplay2 }}-{{ adjustedRects[0].temperingLayoutId }}</div> --> |
| | |
| | | const selectedRow = ref(null); // 存储选中的行数据 |
| | | const temperingtotal = ref(0); |
| | | const glasstotal = ref(0); |
| | | const fulltotals = ref(0); |
| | | const temperingengineerId=ref(''); |
| | | // 当前页码和每页显示的条数 |
| | | const currentPage = ref(1); |
| | |
| | | tableDatagh.value = response.data |
| | | temperingtotal.value = response.data.length |
| | | let totalCount = 0; |
| | | let fullCount = 0; |
| | | response.data.forEach(item => { |
| | | totalCount += item.count2 || 0; |
| | | totalCount += item.count1 || 0; |
| | | if(item.count2-item.count1-item.count4==0){ |
| | | fullCount+=1; |
| | | } |
| | | }); |
| | | glasstotal.value = totalCount; |
| | | fulltotals.value = fullCount; |
| | | |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <el-form-item :label="$t('满炉数量')" style="width: 14vw"> |
| | | {{ fulltotals }} |
| | | </el-form-item> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <el-form-item :label="$t('当前指定工程')" style="width: 14vw"> |
| | | {{ temperingengineerId }} |
| | | </el-form-item> |
| | |
| | | <el-table-column prop="count2" align="center" :label="$t('总数量')" min-width="150" /> |
| | | <el-table-column prop="count1" align="center" :label="$t('笼子内数量')" min-width="150" /> |
| | | <el-table-column prop="count3" align="center" :label="$t('缺少数量')" min-width="150" /> |
| | | <el-table-column prop="count4" align="center" :label="$t('破损/拿走数量')" min-width="150" /> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" width="250"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="brokee(scope.row)">{{ $t('searchOrder.specifytempering') }}</el-button> |
| | |
| | | @PostMapping("/submitDamage") |
| | | public Result submitDamage(@RequestBody List<Damage> damageList) { |
| | | damageService.submitDamage(damageList); |
| | | damageList.forEach(damage -> damage.setStatus(2)); |
| | | damageList.forEach(damage -> damage.setStatus(3)); |
| | | damageService.updateBatchById(damageList); |
| | | return Result.build(200,"报工成功",1); |
| | | } |
| | |
| | | } |
| | | if (damage.getType() == 1) { |
| | | if (submitReport(damage)) { |
| | | damage.setStatus(2); |
| | | damage.setStatus(3); |
| | | } else { |
| | | damage.setStatus(1); |
| | | } |
| | |
| | | wrapper.select("tempering_layout_id,engineer_id,max(id) as id") |
| | | .eq("state",2) |
| | | .groupBy("tempering_layout_id,engineer_id") |
| | | .orderByDesc("id"); |
| | | .orderByAsc("id"); |
| | | return temperingMapper.selectList(wrapper); |
| | | } |
| | | |
| | |
| | | EdgStorageCageDetails edgDItem = edgStorageCageDetailsMapper.selectById(edgStorageCageDetails.getId()); |
| | | if (edgItem != null) { |
| | | //移除 (破损,目前两个概念混合在一起,建议拆开) |
| | | EdgStorageCageDetails result = edgStorageCageDetailsMapper.selectOne(new MPJLambdaWrapper<EdgStorageCageDetails>().eq(EdgStorageCageDetails::getSlot, edgStorageCageId)); |
| | | EdgStorageCageDetails result = edgStorageCageDetailsMapper.selectOne( |
| | | new MPJLambdaWrapper<EdgStorageCageDetails>() |
| | | .eq(EdgStorageCageDetails::getSlot, edgStorageCageId) |
| | | .eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | ); |
| | | if (result != null) { |
| | | result.setSlot(0); |
| | | result.setState(201); |
| | | Damage damage =new Damage(); |
| | | damage.setGlassId(edgStorageCageDetails.getGlassId()); |
| | | damage.setLine(1002); |
| | | damage.setWorkingProcedure("卧式理片"); |
| | | damage.setStatus(2); |
| | | damage.setLine(2001); |
| | | damage.setWorkingProcedure("磨边"); |
| | | damage.setStatus(1); |
| | | damage.setType(8); |
| | | damageService.insertDamage(damage); |
| | | edgStorageCageDetailsMapper.updateById(result); |
| | | } |
| | |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public BigStorageCageOutTask() { |
| | | } |
| | | |
| | | public BigStorageCageOutTask(String glassId, Integer startSlot, Integer endSlot, double width, double height, Integer trainNumber, Integer serialNumber, Integer taskState) { |
| | | public BigStorageCageOutTask(String glassId, Integer startSlot, Integer endSlot, double width, double height, Integer trainNumber, Integer serialNumber, Integer taskState, Date createTime) { |
| | | this.glassId = glassId; |
| | | this.startSlot = startSlot; |
| | | this.endSlot = endSlot; |
| | |
| | | this.trainNumber = trainNumber; |
| | | this.serialNumber = serialNumber; |
| | | this.taskState = taskState; |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "任务状态", position = 8) |
| | | private Integer taskState; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间", position = 9) |
| | | private Date createTime; |
| | | |
| | | @TableLogic |
| | | private int deleted; |
| | | |
| | |
| | | int serialNumber = 1; |
| | | for (BigStorageCageDetails item : list) { |
| | | outTasks.add(new BigStorageCageOutTask(item.getGlassId(), first.getSlot(), second.getSlot(), |
| | | item.getWidth() * 10, item.getHeight() * 10, 1, serialNumber++, Const.BIG_STORAGE_OUT_NEW)); |
| | | item.getWidth() * 10, item.getHeight() * 10, 1, serialNumber++, Const.BIG_STORAGE_OUT_NEW, new Date())); |
| | | } |
| | | //新增调度任务 |
| | | bigStorageCageOutTaskService.saveBatch(outTasks); |
| | |
| | | List<BigStorageCageOutTask> outSuccessGlass = bigStorageCageOutTaskService.list(new LambdaQueryWrapper<BigStorageCageOutTask>() |
| | | .in(BigStorageCageOutTask::getGlassId, glassIds).in(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_ALL)); |
| | | if (CollectionUtils.isNotEmpty(outSuccessGlass)) { |
| | | for (BigStorageCageOutTask bigStorageCageOutTask:outSuccessGlass |
| | | ) { |
| | | if(bigStorageCageOutTask.getEndSlot().equals(Const.ARTIFICIAL_OUT_TARGET_POSITION)){ |
| | | temperingGlassInfoService.update( |
| | | new LambdaUpdateWrapper<TemperingGlassInfo>() |
| | | .set(TemperingGlassInfo::getState,Const.TEMPERING_END) |
| | | .eq(TemperingGlassInfo::getGlassId,bigStorageCageOutTask.getGlassId()) |
| | | ); |
| | | } |
| | | } |
| | | log.info("3、获取出片已完成的玻璃信息id:{}", outSuccessGlass); |
| | | List<UpdateBigStorageCageDTO> storageCageDTOList = outSuccessGlass.stream().map(e -> { |
| | | UpdateBigStorageCageDTO storageCageDTO = new UpdateBigStorageCageDTO(); |
| | |
| | | int minLength = Math.min((int) e.getWidth(), (int) e.getHeight()); |
| | | if (maxX + minLength <= xMaxSize) { |
| | | bigStorageCageOutTaskList.add(new BigStorageCageOutTask(e.getGlassId(), e.getSlot(), Const.TEMPERING_OUT_TARGET_POSITION, |
| | | e.getWidth() * 10, e.getHeight() * 10, 0, 0, 1)); |
| | | e.getWidth() * 10, e.getHeight() * 10, 0, 0, 1, new Date())); |
| | | maxX = Math.max(maxX, e.getXCoordinate()); |
| | | } else { |
| | | break; |
| | |
| | | |
| | | } else { |
| | | bigStorageCageOutTaskList.add(new BigStorageCageOutTask(e.getGlassId(), e.getSlot(), Const.ARTIFICIAL_OUT_TARGET_POSITION, |
| | | e.getWidth() * 10, e.getHeight(), 0, 0, 1)); |
| | | e.getWidth() * 10, e.getHeight(), 0, 0, 1, new Date())); |
| | | } |
| | | } |
| | | Assert.isFalse(CollectionUtils.isEmpty(bigStorageCageOutTaskList), "未获取出片数据,结束出片任务"); |
| | |
| | | int minLength = Math.min((int) e.getWidth(), (int) e.getHeight()); |
| | | if (maxX + minLength <= xMaxSize) { |
| | | bigStorageCageOutTaskList.add(new BigStorageCageOutTask(e.getGlassId(), e.getSlot(), Const.TEMPERING_OUT_TARGET_POSITION, |
| | | e.getWidth() * 10, e.getHeight() * 10, trainNumber, serialNumber++, 1)); |
| | | e.getWidth() * 10, e.getHeight() * 10, trainNumber, serialNumber++, 1, new Date())); |
| | | maxX = Math.max(maxX, e.getXCoordinate()); |
| | | } else { |
| | | remainWidth = carWidth - maxLength - glassGap; |
| | |
| | | serialNumber = 1; |
| | | maxX = e.getXCoordinate(); |
| | | bigStorageCageOutTaskList.add(new BigStorageCageOutTask(e.getGlassId(), e.getSlot(), Const.TEMPERING_OUT_TARGET_POSITION, |
| | | e.getWidth() * 10, e.getHeight(), trainNumber, serialNumber++, 1)); |
| | | e.getWidth() * 10, e.getHeight(), trainNumber, serialNumber++, 1, new Date())); |
| | | } |
| | | } else { |
| | | bigStorageCageOutTaskList.add(new BigStorageCageOutTask(e.getGlassId(), e.getSlot(), Const.ARTIFICIAL_OUT_TARGET_POSITION, |
| | | e.getWidth() * 10, e.getHeight(), trainNumber, serialNumber++, 1)); |
| | | e.getWidth() * 10, e.getHeight(), trainNumber, serialNumber++, 1, new Date())); |
| | | } |
| | | } |
| | | Assert.isFalse(CollectionUtils.isEmpty(bigStorageCageOutTaskList), "未获取出片数据,结束出片任务"); |
| | | log.info("获取出片任务数据{}条,执行保存", bigStorageCageOutTaskList.size()); |
| | | bigStorageCageOutTaskService.saveBatch(bigStorageCageOutTaskList); |
| | | for (BigStorageCageOutTask bigStorageCageOutTask : bigStorageCageOutTaskList |
| | | ) { |
| | | bigStorageCageOutTaskService.save(bigStorageCageOutTask); |
| | | } |
| | | // bigStorageCageOutTaskService.saveBatch(bigStorageCageOutTaskList); |
| | | List<String> glassIds = bigStorageCageOutTaskList.stream().map(BigStorageCageOutTask::getGlassId).collect(Collectors.toList()); |
| | | log.info("将出片玻璃{}玻璃状态改为已出片", glassIds); |
| | | bigStorageCageDetailsService.update(new LambdaUpdateWrapper<BigStorageCageDetails>() |
| | |
| | | </update> |
| | | |
| | | <select id="selectTemperingGlassCount" resultType="java.util.Map"> |
| | | select a.engineer_id,a.tempering_layout_id,count2,count1,count2-count1 as count3 from |
| | | select a.engineer_id,a.tempering_layout_id,count2,count1,count2-count1 as count3,count(c.glass_id) as count4 from |
| | | (select engineer_id,tempering_layout_id,count(*) as count1 from big_storage_cage_details where state=100 group by engineer_id,tempering_layout_id) as a |
| | | left join |
| | | (select engineer_id,tempering_layout_id,count(*) as count2 from glass_info group by engineer_id,tempering_layout_id) as b |
| | | on a.engineer_id=b.engineer_id and a.tempering_layout_id=b.tempering_layout_id |
| | | left join damage as c on a.engineer_id=c.engineer_id and a.tempering_layout_id=c.tempering_layout_id and (type = 8 or type = 9) |
| | | group by a.engineer_id,a.tempering_layout_id |
| | | order by a.engineer_id,a.tempering_layout_id |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.mes.rawglassdetails.entity.RawGlassStorageDetails; |
| | | import com.mes.rawglassdetails.service.RawGlassStorageDetailsService; |
| | | import com.mes.rawglassstation.service.RawGlassStorageStationService; |
| | | import com.mes.rawglasstask.entity.RawGlassStorageTask; |
| | | import com.mes.rawglasstask.service.RawGlassStorageTaskService; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author wangfei |
| | |
| | | @Resource private RawGlassStorageStationService rawGlassStorageStationService; |
| | | |
| | | @Resource private RawGlassStorageTaskService rawGlassStorageTaskService; |
| | | |
| | | @Resource private RawGlassStorageDetailsService rawGlassStorageDetailsService; |
| | | |
| | | @Scheduled(fixedDelay = 2000) |
| | | public void sendRawGlassMessage() { |
| | |
| | | e.sendMessage(String.valueOf(jsonObject)); |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** todo:入库任务:吊装位有玻璃,先去工位表查询空格子,生成入库任务从吊装位到目标格子 */ |
| | | // @Scheduled(fixedDelay = 1000) |
| | | // public void sendRawGlassMessage() { |
| | | //// List<RawGlassStorageDetails> rawGlassStorageDetailsList = rawGlassStorageDetailsService.List(new RawGlassStorageDetails()) |
| | | // Wrapper<RawGlassStorageDetails> queryWrapper = null; |
| | | // List<RawGlassStorageDetails> detailsList = rawGlassStorageDetailsService.list(null); |
| | | // queryWrapper.eq(RawGlassStorageDetails::getState, 100); |
| | | // if(detailsList.size() >0){ |
| | | // //查找格子表details空格子 |
| | | // List<String> slotIds = detailsList.stream() |
| | | // .map(RawGlassStorageDetails::getSlotId) |
| | | // .collect(Collectors.toList()); |
| | | // list(new LambdaQueryWrapper<RawGlassStorageTask>() |
| | | // .in(CollectionUtil.isNotEmpty(request.getState()), RawGlassStorageTask::getState, request.getState()) |
| | | // .in(CollectionUtil.isNotEmpty(request.getSlotId()), RawGlassStorageTask::getSlotId, request.getSlotId()) |
| | | // .orderByDesc(RawGlassStorageTask::getCreateTime)); |
| | | // }if(slotIds.size()>0){ |
| | | // //生成入库任务 |
| | | // } |
| | | // |
| | | // } |
| | | |
| | | |
| | | |
| | | /** todo:出库任务:1、点出库,立马生成出片任务 2、点出库修改工位详情内的状态为待出库,定时任务扫描生成出库任务 */ |
| | | |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | @ApiOperation("原片入库") |
| | | @PostMapping("/patternWarehousing") |
| | | public Result<String> patternWarehousing(@Validated @RequestBody RawGlassRequest request) { |
| | | |
| | | return Result.build( |
| | | 200, "入库已完成,等待任务执行", rawGlassStorageDetailsService.patternWarehousing(request)); |
| | | } |
| | |
| | | private String createTime; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | boolean work=engineeringService.changeTask(engineering.getEngineerId(),engineering.getState()); |
| | | List<UpPattenUsage> glass = upPattenUsageService.prioritylist(); |
| | | optimizeProjectService.changeTask(engineering.getEngineerId(), 200); |
| | | return Result.build(200, "保存成功", work); |
| | | if (work) { |
| | | return Result.build(200, "保存成功"+engineering.getEngineerId(), true); |
| | | }else { |
| | | return Result.build(200, "保存失败"+engineering.getEngineerId(), false); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | temperingGlassInfo.setState(damage.getStatus()); |
| | | temperingGlassInfo.setGlassId(damage.getGlassId()); |
| | | int result=temperingGlassInfoService.updateTemperingState(temperingGlassInfo); |
| | | if(damage.getStatus()>5) { |
| | | damage.setType(damage.getStatus()); |
| | | damage.setStatus(1); |
| | | damageService.insertDamage(damage); |
| | | } |
| | | // if(damage.getStatus()>5) { |
| | | // damage.setType(damage.getStatus()); |
| | | // damage.setStatus(1); |
| | | // damageService.insertDamage(damage); |
| | | // } |
| | | return Result.build(200, "破损成功", result); |
| | | } |
| | | |
| | |
| | | port: 8084 |
| | | spring: |
| | | profiles: |
| | | active: prod |
| | | active: cz |
| | | application: |
| | | name: temperingGlass |
| | | liquibase: |
| | | enabled: true |
| | | enabled: false |
| | | change-log: classpath:changelog/changelog.sql |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | |
| | | //更新工位其他玻璃信息的数量 |
| | | QueryWrapper<Damage> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("process_id", downWorkstation.getFlowCardId()); |
| | | queryWrapper.gt("type", 3); |
| | | if (downWorkstation.getLayer() != 0) { |
| | | queryWrapper.eq("technology_number", downWorkstation.getLayer()); |
| | | } |
| | | int otherNumber = damageService.count(queryWrapper); |
| | | downWorkstationService.update(new LambdaUpdateWrapper<DownWorkstation>().set(DownWorkstation::getOtherNumber, otherNumber) |
| | | .eq(DownWorkstation::getWorkstationId, downWorkstation.getWorkstationId())); |
| | |
| | |
|
| | | @Scheduled(fixedDelay = Long.MAX_VALUE)
|
| | | public void scanCodeTask() {
|
| | | JSONObject jsonObject = new JSONObject();
|
| | | log.info("扫描任务已启动");
|
| | | while (true) {
|
| | | JSONObject jsonObject = new JSONObject();
|
| | | try (Socket socket = new Socket(scanIp, scanPort);
|
| | | BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()))) {
|
| | | // 接收服务器响应
|