Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
| | |
| | | </el-table-column>
|
| | |
|
| | | <!-- 操作列 -->
|
| | | <el-table-column label="操作" width="350">
|
| | | <el-table-column label="操作" width="250">
|
| | | <template #default="{ row }">
|
| | | <el-button type="primary" size="mini" @click="edithandleRowClick(row)">修改</el-button>
|
| | | <el-button type="danger" size="mini" @click="handleDelete(row)">删除</el-button>
|
| | | <el-button type="warning" size="mini" @click="handleCheckout(row)">出库</el-button>
|
| | | <el-button type="success" size="mini" @click="addglass()">添加原片</el-button>
|
| | | <!-- <el-button type="success" size="mini" @click="addglass()">添加原片</el-button> -->
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | |
|
| | |
|
| | | <el-table
|
| | | |
| | | </el-dialog>
|
| | |
|
| | |
|
| | | <el-table
|
| | | :data="tasktableData"
|
| | | style="width: 98%; height: 150px"
|
| | | @selection-change="handleSelectionChange"
|
| | |
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | | </el-dialog>
|
| | | </el-card>
|
| | |
|
| | | <!-- <div ref="chart" id="chart" style="width: 100%; height: 250px;"></div> -->
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | <div class="img-ypcc" >
|
| | |
|
| | |
|
| | | <div class="img-car1" :style="'z-index:999;left:297px;top:158px;position:absolute;'">
|
| | | <div class="img-car1" :style="'z-index:999;left:397px;top:205px;position:absolute;'">
|
| | | <div v-show="cellshow1" style="margin-top:10px;width:200px;height:5px;background-color:#409EFF;"></div>
|
| | | </div>
|
| | |
|
| | |
| | | </el-form-item>
|
| | |
|
| | | <el-form-item label="长度">
|
| | | <el-input v-model="formData.wid" required style="width: 250px; font-size: 20px" @focus="clearInput('wid')"></el-input>
|
| | | <el-input v-model="formData.width" required style="width: 250px; font-size: 20px" @focus="clearInput('wid')"></el-input>
|
| | | </el-form-item>
|
| | |
|
| | | <el-form-item label="高度">
|
| | | <el-input v-model="formData.heig" required style="width: 250px; font-size: 20px" @focus="clearInput('heig')"></el-input>
|
| | | <el-input v-model="formData.height" required style="width: 250px; font-size: 20px" @focus="clearInput('heig')"></el-input>
|
| | | </el-form-item>
|
| | |
|
| | | <el-form-item label="厚度">
|
| | | <el-input v-model="formData.thinkness" required style="width: 250px; font-size: 20px" @focus="clearInput('thinkness')"></el-input>
|
| | | <el-input v-model="formData.thickness" required style="width: 250px; font-size: 20px" @focus="clearInput('thinkness')"></el-input>
|
| | | </el-form-item>
|
| | |
|
| | | <el-form-item label="数量">
|
| | | <el-input-number v-model="formData.num" required :min="0" :max="9000" style="width: 250px; font-size: 20px" @focus="clearInput('num')"></el-input-number>
|
| | | <el-input-number v-model="formData.quantity" required :min="0" :max="9000" style="width: 250px; font-size: 20px" @focus="clearInput('num')"></el-input-number>
|
| | | </el-form-item>
|
| | | </el-form>
|
| | |
|
| | |
| | | </el-form-item>
|
| | | <el-form-item label="批次号">
|
| | | <el-input v-model="editForm.batchnumber"></el-input>
|
| | | </el-form-item>
|
| | | <el-form-item label="长度">
|
| | | <el-input v-model="editForm.length"></el-input>
|
| | | </el-form-item>
|
| | | <el-form-item label="高度">
|
| | | <el-input v-model="editForm.height"></el-input>
|
| | | </el-form-item>
|
| | | <el-form-item label="厚度">
|
| | | <el-input v-model="editForm.thickness"></el-input>
|
| | | </el-form-item>
|
| | | </el-form>
|
| | |
|
| | |
| | | import { ref, onMounted, onBeforeUnmount } from 'vue'; // 导入 Vue 3 的模块
|
| | | import * as echarts from 'echarts';
|
| | | import { ElMessage, ElMessageBox } from 'element-plus'
|
| | | import {tableData} from '@/stores/tableData.js';
|
| | |
|
| | |
|
| | |
|
| | | const loading = ref(false);
|
| | | const tableData = ref([
|
| | | {
|
| | | location: '1',
|
| | | type: 'Type A',
|
| | | length: '100',
|
| | | height: '50',
|
| | | thickness: '10',
|
| | | quantity: '5',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '2',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 0
|
| | | },
|
| | | {
|
| | | location: '3',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '4',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | },
|
| | | {
|
| | | location: '5',
|
| | | type: 'Type B',
|
| | | length: '120',
|
| | | height: '60',
|
| | | thickness: '12',
|
| | | quantity: '10',
|
| | | entry_time: '2024-06-19 10:00:00',
|
| | | batchnumber:"444",
|
| | | shelf_status: 1
|
| | | }
|
| | | // Add more data as needed
|
| | | ]);
|
| | | |
| | |
|
| | | const Hidden = ref(false)
|
| | |
|
| | |
| | | const editdialogVisible = ref(false);
|
| | | const editForm = ref({
|
| | | quantity: '',
|
| | | batchnumber: ''
|
| | | batchnumber: '',
|
| | | length:'',
|
| | | height:'',
|
| | | thickness:''
|
| | | });
|
| | | const editFormRef = ref(null);
|
| | | let currentRow = ref(null);
|
| | |
| | | // 处理行点击事件
|
| | | const edithandleRowClick = (row) => {
|
| | | currentRow.value = row;
|
| | | console.log(row)
|
| | | editForm.value.quantity = row.quantity.toString();
|
| | | editForm.value.batchnumber = row.batchnumber;
|
| | | editForm.value.length = row.length;
|
| | | editForm.value.height = row.height;
|
| | | editForm.value.thickness = row.thickness;
|
| | | editdialogVisible.value = true;
|
| | | console.log(editForm.value)
|
| | | };
|
| | |
| | | const edithandleDialogClose = () => {
|
| | | editForm.value.quantity = '';
|
| | | editForm.value.batchnumber = '';
|
| | | editForm.value.width = '';
|
| | | editForm.value.height = '';
|
| | | editForm.value.thickness = '';
|
| | | |
| | |
|
| | | currentRow.value = null;
|
| | | };
|
| | |
|
| | |
| | | background-image:url('../../assets/ypcc.png');
|
| | | background-repeat: no-repeat;
|
| | | background-attachment: local;
|
| | | min-height: 800px;
|
| | | width: 1600px;
|
| | | min-height: 600px;
|
| | | width: 1400px;
|
| | | max-width: 100%;
|
| | | background-size: 1400px 800px;
|
| | | background-size: 1400px 600px;
|
| | | overflow: hidden;
|
| | | position:relative
|
| | | position:relative;
|
| | | margin-top:0px
|
| | | }
|
| | |
|
| | | .img-car1{
|
| | |
| | | position: absolute;
|
| | | background-repeat: no-repeat;
|
| | | background-attachment: local;
|
| | | min-height: 200px;
|
| | | min-height: 400px;
|
| | | width: 200px;
|
| | | max-width: 100%;
|
| | | background-size: 200px 70px;
|
| | | background-size: 200px 170px;
|
| | | overflow: hidden;
|
| | | position:relative
|
| | | }
|
| | |
| | | } |
| | | }; |
| | | //确认 |
| | | |
| | | const handleConfirm = async () => { |
| | | try { |
| | | const firstPart = flowCardId.value.split('|')[0].trim(); // |
| | | const twoPart = flowCardId.value.split('|')[1].trim(); // |
| | | const response = await request.post('unLoadGlass/downWorkStation/updateFlowCardId', { |
| | | workstationId: workstationId.value, |
| | | flowCardId: flowCardId.value |
| | | flowCardId: firstPart, |
| | | layer:twoPart |
| | | |
| | | }); |
| | | |
| | | console.log(response) |
| | |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('reportWork.cardnumber')" min-width="120" /> |
| | | <el-table-column prop="totalquantity" align="center" :label="$t('reportWork.totalquantity')" min-width="120" /> |
| | | <el-table-column prop="racksnumber" align="center" :label="$t('reportWork.beendropped')" min-width="120" /> |
| | | <el-table-column prop="layer" align="center" label="层数" min-width="120" /> |
| | | <el-table-column prop="artificialnumber" align="center" label="人工下片数" min-width="120" /> |
| | | <el-table-column prop="work_state" align="center" :label="$t('reportWork.state')" min-width="120" /> |
| | | <el-table-column prop="deviceId" align="center" :label="$t('reportWork.devicenumber')" min-width="120" /> |
| | | <el-table-column |
| | |
| | | * A09出片目标位置 d02卧转立 钢化出片 3001 |
| | | * A10出片目标位置 d05卧转立 人工出片 3002 |
| | | */ |
| | | //todo:临时将钢化出片线路改为人工出片 |
| | | public static final Integer TEMPERING_OUT_TARGET_POSITION = 3002; |
| | | public static final Integer TEMPERING_OUT_TARGET_POSITION = 3001; |
| | | public static final Integer ARTIFICIAL_OUT_TARGET_POSITION = 3002; |
| | | |
| | | /** |
| | |
| | | * 2 卧转立进片完成 |
| | | * 3 大车进片完成 |
| | | * 4 大理片笼进片完成 |
| | | * 5 大理片笼进片失败 |
| | | * 6 大理片笼进片破损 |
| | | */ |
| | | public static final Integer BIG_STORAGE_IN_NEW = 1; |
| | | public static final Integer BIG_STORAGE_IN_UP = 2; |
| | | public static final Integer BIG_STORAGE_IN_CAR = 3; |
| | | public static final Integer BIG_STORAGE_IN_SLOT = 4; |
| | | public static final Integer BIG_STORAGE_IN_ERROR = 5; |
| | | public static final Integer BIG_STORAGE_IN_DAMAGE = 6; |
| | | public static final List<Integer> BIG_STORAGE_IN_UP_ALL = Arrays.asList(1, 2); |
| | | /** |
| | | * 卧转立出片请求 |
| | | * 1 任务生成 |
| | | * 2 玻璃进大车完成 |
| | | * 3 大车出片完成 |
| | | * 4 大理片笼进片失败 |
| | | * 5 大理片笼进片破损 |
| | | */ |
| | | public static final Integer BIG_STORAGE_OUT_NEW = 1; |
| | | public static final Integer BIG_STORAGE_OUT_CAR = 2; |
| | | public static final Integer BIG_STORAGE_OUT_SUCCESS = 3; |
| | | public static final Integer BIG_STORAGE_OUT_ERROR = 4; |
| | | public static final Integer BIG_STORAGE_OUT_DAMAGE = 5; |
| | | |
| | | /** |
| | | * 卧转立出片请求 |
| | |
| | | /** |
| | | * 工序 |
| | | */ |
| | | private Integer workingProcedure; |
| | | private String workingProcedure; |
| | | |
| | | /** |
| | | * 玻璃id |
| | |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.work_assignment.entity.WorkAssignment; |
| | | import com.mes.work_assignment.mapper.WorkAssignmentMapper; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | LambdaQueryWrapper<GlassInfo> glassInfoSelectWrapper=new LambdaQueryWrapper<>(); |
| | | glassInfoSelectWrapper.eq(GlassInfo::getGlassId,damage.getGlassId()); |
| | | GlassInfo glassInfo=glassInfoMapper.selectOne(glassInfoSelectWrapper); |
| | | BeanUtils.copyProperties(glassInfo, damage); |
| | | |
| | | LambdaQueryWrapper<WorkAssignment> workAssignmentSelectWrapper=new LambdaQueryWrapper<>(); |
| | | workAssignmentSelectWrapper |
| | | .eq(WorkAssignment::getLine,damage.getLine()) |
| | | .eq(WorkAssignment::getWorkProcesses,damage.getWorkingProcedure()); |
| | | WorkAssignment workAssignment=workAssignmentMapper.selectOne(workAssignmentSelectWrapper); |
| | | |
| | | damage.setTeamsGroupsName(workAssignment.getTeamsGroupsName()); |
| | | damage.setDeviceName(workAssignment.getDeviceName()); |
| | | |
| | | damage.setEngineerId(glassInfo.getEngineerId()); |
| | | damage.setTemperingLayoutId(glassInfo.getTemperingLayoutId()); |
| | | damage.setProcessId(glassInfo.getFlowCardId()); |
| | | damage.setOrderNumber(glassInfo.getGlassType()); |
| | | damage.setTechnologyNumber(glassInfo.getLayer()); |
| | | damage.setDamageTime(LocalDateTime.now()); |
| | | damage.setType(2); |
| | | baseMapper.insert(damage); |
| | | } |
| | | } |
| | |
| | | */ |
| | | void saveGlassInfo(List<GlassInfo> glassinfo); |
| | | |
| | | int getGlassInfoCountByFlowCardId(String flowCardId); |
| | | int getGlassInfoCountByFlowCardId(String flowCardId,int layer); |
| | | |
| | | /** |
| | | * @return |
| | |
| | | |
| | | |
| | | @Override |
| | | public int getGlassInfoCountByFlowCardId(String flowCardId) { |
| | | public int getGlassInfoCountByFlowCardId(String flowCardId,int layer) { |
| | | return baseMapper.selectCount(new QueryWrapper<GlassInfo>().lambda() |
| | | .eq(GlassInfo::getFlowCardId, flowCardId)); |
| | | .eq(GlassInfo::getFlowCardId, flowCardId) |
| | | .eq(GlassInfo::getLayer, layer)); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | new QueryWrapper<GlassInfo>() |
| | | .in("engineer_id", engineerIds) |
| | | .groupBy("flow_card_id") |
| | | .groupBy("layer") |
| | | ); |
| | | |
| | | // 转换为 List<Map<String, Object>> |
| | | List<Map<String, Object>> result = glassInfos.stream() |
| | | .map(glassInfo -> { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("flow_card_id", glassInfo.getFlowCardId()); |
| | | map.put("flow_card_id", glassInfo.getFlowCardId()+" | "+glassInfo.getLayer()); |
| | | // 如果还有其他字段需要添加到 map 中,在这里继续添加 |
| | | return map; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | log.info("result: {}", result); |
| | | log.info("result666: {}", result); |
| | | return result; |
| | | } |
| | | |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @DS("salve_hangzhoumes_1") |
| | | @DS("salve_hangzhoumes") |
| | | public interface TemperingGlassInfoMapper extends MPJBaseMapper<TemperingGlassInfo> { |
| | | |
| | | boolean saveBatch(@Param(value = "list") List<TemperingGlassInfo> list); |
| | |
| | | package com.mes.temperingglass.service.impl; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.mapper.TemperingGlassInfoMapper; |
| | | import com.mes.temperingglass.service.TemperingAgoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Service |
| | | @DS("salve_hangzhoumes") |
| | | public class TemperingAgoServiceImpl extends MPJBaseServiceImpl<TemperingGlassInfoMapper, TemperingGlassInfo> implements TemperingAgoService { |
| | | @Autowired |
| | | TemperingGlassInfoMapper temperingMapper; |
| | |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = baseMapper.selectList(feedWrapper); |
| | | |
| | | LambdaQueryWrapper<BigStorageCageFeedTask> feedTaskWrapper = new LambdaQueryWrapper<>(); |
| | | feedTaskWrapper.lt(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_SLOT); |
| | | feedTaskWrapper |
| | | .lt(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_SLOT) |
| | | .isNotNull(BigStorageCageFeedTask::getTargetSlot); |
| | | List<BigStorageCageFeedTask> bigStorageCageFeedTaskList = bigStorageCageFeedTaskMapper.selectList(feedTaskWrapper); |
| | | |
| | | Map<String, BigStorageCageFeedTask> listMap = bigStorageCageFeedTaskList.stream() |
| | |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | LambdaQueryWrapper<BigStorageCageFeedTask> feedTaskNoTargetWrapper = new LambdaQueryWrapper<>(); |
| | | feedTaskNoTargetWrapper |
| | | .lt(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_SLOT) |
| | | .isNull(BigStorageCageFeedTask::getTargetSlot); |
| | | List<BigStorageCageFeedTask> bigStorageCageFeedTaskNoTargetList = bigStorageCageFeedTaskMapper.selectList(feedTaskNoTargetWrapper); |
| | | for (BigStorageCageFeedTask bigStorageCageFeedTask:bigStorageCageFeedTaskNoTargetList |
| | | ) { |
| | | BigStorageCageDetails bigStorageCageDetails=new BigStorageCageDetails(); |
| | | LambdaQueryWrapper<GlassInfo> glassInfoWrapper = new LambdaQueryWrapper<>(); |
| | | glassInfoWrapper.eq(GlassInfo::getGlassId,bigStorageCageFeedTask.getGlassId()); |
| | | GlassInfo glassInfo= glassInfoMapper.selectOne(glassInfoWrapper); |
| | | BeanUtils.copyProperties(glassInfo, bigStorageCageDetails); |
| | | bigStorageCageDetailsList.add(bigStorageCageDetails); |
| | | } |
| | | return bigStorageCageDetailsList; |
| | | } else { |
| | | //出片任务数据 |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @DS("salve_hangzhoumes_1") |
| | | @DS("salve_hangzhoumes") |
| | | public interface BigStorageCageFeedTaskMapper extends MPJBaseMapper<BigStorageCageFeedTask> { |
| | | |
| | | List<Integer> querySitToUpGlass(); |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @DS("salve_hangzhoumes_1") |
| | | @DS("salve_hangzhoumes") |
| | | public interface BigStorageCageOutTaskMapper extends BaseMapper<BigStorageCageOutTask> { |
| | | |
| | | boolean saveBatch(@Param(value = "list") List<BigStorageCageOutTask> list); |
| | |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | |
| | | private JSONObject jsonObject = new JSONObject(); |
| | | public void hangzhoumes() throws InterruptedException { |
| | | public void dataBase1() throws InterruptedException { |
| | | List<Double> carPostion=new ArrayList<>(); |
| | | carPostion.add(0.25); |
| | | carPostion.add(0.5); |
| | |
| | | |
| | | } |
| | | |
| | | public void salve_hangzhoumes_1() throws InterruptedException { |
| | | public void dataBase2() throws InterruptedException { |
| | | //出片队列 |
| | | List<TemperingGlassInfo> temperingGlassInfoList= temperingGlassInfoService.list(); |
| | | jsonObject.append("temperingGlassInfoList", temperingGlassInfoList); |
| | |
| | | public void plcStorageCageTask() throws InterruptedException { |
| | | jsonObject = new JSONObject(); |
| | | try { |
| | | hangzhoumes(); |
| | | salve_hangzhoumes_1(); |
| | | dataBase1(); |
| | | dataBase2(); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("slicecage"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | |
| | | import com.mes.bigstoragetask.service.BigStorageCageOutTaskService; |
| | | import com.mes.common.S7object; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.device.PlcParameterObject; |
| | | import com.mes.edgglasstask.entity.EdgGlassTaskInfo; |
| | | import com.mes.edgglasstask.service.EdgGlassTaskInfoService; |
| | |
| | | private EdgGlassTaskInfoService edgGlassTaskInfoService; |
| | | @Resource |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | @Resource |
| | | private DamageService damageService; |
| | | |
| | | private static final String REQUEST_WORD = "1"; |
| | | |
| | |
| | | String d02State = plcParameterObject.getPlcParameter("D02ID").getValue(); |
| | | String d03State = plcParameterObject.getPlcParameter("D03State").getValue(); |
| | | String d05State = plcParameterObject.getPlcParameter("D05State").getValue(); |
| | | String mesD01Value = plcParameterObject.getPlcParameter("MESToD01").getValue(); |
| | | String mesD04Value = plcParameterObject.getPlcParameter("MESToD04").getValue(); |
| | | String mesD01Address = plcParameterObject.getPlcParameter("MESToD01").getAddress(); |
| | | String mesD04Address = plcParameterObject.getPlcParameter("MESToD04").getAddress(); |
| | | String d01ToMES = plcParameterObject.getPlcParameter("D01ToMES").getValue(); |
| | |
| | | log.info("两条线卧转立均在执行任务,结束本次扫描进卧转立任务"); |
| | | return; |
| | | } |
| | | //按照线路及玻璃id获取相邻两块玻璃 卧转立上的玻璃 |
| | | if (REQUEST_WORD.equals(d01ToMES) && (StringUtils.isBlank(d02State) || !REQUEST_WORD.equals(d03State))) { |
| | | //按照线路及玻璃id获取相邻两块玻璃 卧转立上的玻璃: 状态为0不操作(D01送片,0不操作,1允许送片),请求字为1, (02玻璃id为空或者卧转立未启动) |
| | | if (!REQUEST_WORD.equals(mesD01Value) && REQUEST_WORD.equals(d01ToMES) && (StringUtils.isBlank(d02State) || !REQUEST_WORD.equals(d03State))) { |
| | | judgeGlassTypeStatus(d01Id, Const.A09_OUT_TARGET_POSITION, mesD01Address); |
| | | } |
| | | if (REQUEST_WORD.equals(d04ToMES) && !REQUEST_WORD.equals(d05State)) { |
| | | // 状态为0不操作(D01送片,0不操作,1允许送片),请求字为1, 卧转立未启动 |
| | | if (!REQUEST_WORD.equals(mesD04Value) && REQUEST_WORD.equals(d04ToMES) && !REQUEST_WORD.equals(d05State)) { |
| | | judgeGlassTypeStatus(d04Id, Const.A10_OUT_TARGET_POSITION, mesD04Address); |
| | | } |
| | | Date endDate = new Date(); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 处理破损表任务 |
| | | */ |
| | | @Scheduled(fixedDelay = 300) |
| | | public void dealDamageTask() { |
| | | Date startDate = new Date(); |
| | | log.info("大理片笼破损玻璃清除任务开始执行时间:{}", startDate); |
| | | //获取进片任务表中状态为破损的数据 |
| | | List<BigStorageCageFeedTask> inDamageTaskInfoList = bigStorageCageFeedTaskService.list(new LambdaQueryWrapper<BigStorageCageFeedTask>() |
| | | .eq(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_DAMAGE)); |
| | | if (CollectionUtils.isNotEmpty(inDamageTaskInfoList)) { |
| | | bigStorageCageFeedTaskService.remove(new LambdaQueryWrapper<BigStorageCageFeedTask>().eq(BigStorageCageFeedTask::getTaskState, Const.BIG_STORAGE_IN_DAMAGE)); |
| | | //将破损信息新增入破损表 |
| | | for (BigStorageCageFeedTask bigStorageCageFeedTask : inDamageTaskInfoList) { |
| | | Damage damage = new Damage(); |
| | | damage.setGlassId(bigStorageCageFeedTask.getGlassId()); |
| | | damage.setLine(bigStorageCageFeedTask.getLine()); |
| | | damage.setWorkingProcedure("冷加工"); |
| | | damage.setRemark("进笼前卧转立"); |
| | | damage.setStatus(2); |
| | | damageService.insertDamage(damage); |
| | | } |
| | | } |
| | | //获取出片任务表中状态为破损的数据 |
| | | List<BigStorageCageOutTask> outDamageTaskInfoList = bigStorageCageOutTaskService.list(new LambdaQueryWrapper<BigStorageCageOutTask>() |
| | | .eq(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_OUT_DAMAGE)); |
| | | if (CollectionUtils.isNotEmpty(outDamageTaskInfoList)) { |
| | | bigStorageCageOutTaskService.remove(new LambdaQueryWrapper<BigStorageCageOutTask>().eq(BigStorageCageOutTask::getTaskState, Const.BIG_STORAGE_IN_DAMAGE)); |
| | | List<String> glassIdList = outDamageTaskInfoList.stream().map(BigStorageCageOutTask::getGlassId).collect(Collectors.toList()); |
| | | temperingGlassInfoService.remove(new LambdaQueryWrapper<TemperingGlassInfo>().in(TemperingGlassInfo::getGlassId, glassIdList)); |
| | | //将破损信息新增入破损表 |
| | | for (BigStorageCageOutTask bigStorageCageOutTask : outDamageTaskInfoList) { |
| | | Damage damage = new Damage(); |
| | | damage.setGlassId(bigStorageCageOutTask.getGlassId()); |
| | | damage.setLine(bigStorageCageOutTask.getEndSlot()); |
| | | damage.setWorkingProcedure("冷加工"); |
| | | damage.setRemark("出片后卧转立"); |
| | | damage.setStatus(2); |
| | | damageService.insertDamage(damage); |
| | | } |
| | | } |
| | | Date endDate = new Date(); |
| | | log.info("大理片笼破损玻璃清除任务结束时间:{},共耗时:{}ms,结束扫码任务", endDate, endDate.getTime() - startDate.getTime()); |
| | | return; |
| | | } |
| | | |
| | | /** |
| | | * 按照玻璃id判断玻璃状态及卧转立是否可直接启动 |
| | |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | salve_hangzhoumes_1: |
| | | url: jdbc:sqlserver://192.168.20.24:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | salve_hangzhoumes_1: |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | salve_hangzhoumes_1: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.job.PlcStorageCageTask; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | |
| | | PlcStorageCageTask plcStorageCageTask; |
| | | @Autowired |
| | | BigStorageCageDetailsService bigStorageCageDetailsService; |
| | | @Autowired |
| | | DamageService damageService; |
| | | |
| | | @Test |
| | | public void testFindPath() { |
| | |
| | | log.info("获取大理片笼信息:{}", bigStorageCageDetailsService.selectBigStorageCageDetails("P24060403|3|6")); |
| | | } |
| | | |
| | | @Test |
| | | public void insertDamage() { |
| | | Damage damage=new Damage(); |
| | | damage.setGlassId("P24060403|3|6"); |
| | | damage.setLine(2001); |
| | | damage.setWorkingProcedure("冷加工"); |
| | | damage.setRemark(""); |
| | | damage.setStatus(2); |
| | | damageService.insertDamage(damage); |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <parent> |
| | | <artifactId>moduleService</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>glassStorage</artifactId> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml</artifactId> |
| | | <version>5.2.4</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.code.gson</groupId> |
| | | <artifactId>gson</artifactId> |
| | | <version>2.8.9</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | | </properties> |
| | | |
| | | </project> |
New file |
| | |
| | | package com.mes; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/7 14:36RRRR |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | @SpringBootApplication |
| | | @EnableSwagger2 |
| | | @EnableDiscoveryClient |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | | @EnableScheduling |
| | | public class GlassStorageApplication { |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(GlassStorageApplication.class, args); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.loadposition.controller;
|
| | |
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | | import com.mes.loadposition.service.LoadPositionService;
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | | import io.swagger.annotations.ApiResponses;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/api/loadPosition")
|
| | | @Api(tags = " 控制器")
|
| | | public class LoadPositionController {
|
| | |
|
| | | @Autowired
|
| | | private LoadPositionService loadPositionService;
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | *
|
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<LoadPosition>> findList(@RequestBody LoadPosition params) {
|
| | | List<LoadPosition> result = loadPositionService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<LoadPosition> findById(@PathVariable("id") Long id) {
|
| | | LoadPosition loadPosition = loadPositionService.findById(id);
|
| | | return ResponseEntity.ok(loadPosition);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 新增
|
| | | *
|
| | | * @param loadPosition
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody LoadPosition loadPosition) {
|
| | | boolean result = loadPositionService.insert(loadPosition);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改
|
| | | *
|
| | | * @param loadPosition
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody LoadPosition loadPosition) {
|
| | | boolean result = loadPositionService.update(loadPosition);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = loadPositionService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.loadposition.entity;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @TableName("load_position")
|
| | | @ApiModel(value = "LoadPosition", description = " ")
|
| | | public class LoadPosition implements Serializable{
|
| | |
|
| | | private static final long serialVersionUID=1L;
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | @ApiModelProperty(" ")
|
| | | private Long id;
|
| | |
|
| | | /**
|
| | | * 架子编号
|
| | | */
|
| | | @ApiModelProperty("架子编号")
|
| | | private String number;
|
| | |
|
| | | /**
|
| | | * 机器编号
|
| | | */
|
| | | @ApiModelProperty("机器编号")
|
| | | private Long machineId;
|
| | |
|
| | | /**
|
| | | * 启用标记
|
| | | */
|
| | | @ApiModelProperty("启用标记")
|
| | | private String flag;
|
| | |
|
| | | /**
|
| | | * 工作状态
|
| | | */
|
| | | @ApiModelProperty("工作状态")
|
| | | private String state;
|
| | |
|
| | | /**
|
| | | * 仓储任务编号
|
| | | */
|
| | | @ApiModelProperty("仓储任务编号")
|
| | | private Long storageTaskId;
|
| | |
|
| | | /**
|
| | | * 上片位类型
|
| | | */
|
| | | @ApiModelProperty("上片位类型")
|
| | | private Integer typeFlag;
|
| | |
|
| | | /**
|
| | | * 线路
|
| | | */
|
| | | @ApiModelProperty("线路")
|
| | | private Integer routeGroup;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getNumber() {
|
| | | return number;
|
| | | }
|
| | |
|
| | | public void setNumber(String number) {
|
| | | this.number = number;
|
| | | }
|
| | |
|
| | | public Long getMachineId() {
|
| | | return machineId;
|
| | | }
|
| | |
|
| | | public void setMachineId(Long machineId) {
|
| | | this.machineId = machineId;
|
| | | }
|
| | |
|
| | | public String getFlag() {
|
| | | return flag;
|
| | | }
|
| | |
|
| | | public void setFlag(String flag) {
|
| | | this.flag = flag;
|
| | | }
|
| | |
|
| | | public String getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(String state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public Long getStorageTaskId() {
|
| | | return storageTaskId;
|
| | | }
|
| | |
|
| | | public void setStorageTaskId(Long storageTaskId) {
|
| | | this.storageTaskId = storageTaskId;
|
| | | }
|
| | |
|
| | | public Integer getTypeFlag() {
|
| | | return typeFlag;
|
| | | }
|
| | |
|
| | | public void setTypeFlag(Integer typeFlag) {
|
| | | this.typeFlag = typeFlag;
|
| | | }
|
| | |
|
| | | public Integer getRouteGroup() {
|
| | | return routeGroup;
|
| | | }
|
| | |
|
| | | public void setRouteGroup(Integer routeGroup) {
|
| | | this.routeGroup = routeGroup;
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.loadposition.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | |
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | | public interface LoadPositionMapper extends BaseMapper<LoadPosition> {
|
| | |
|
| | | } |
New file |
| | |
| | | <?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.mes.mapper.LoadPositionMapper">
|
| | |
|
| | | </mapper>
|
New file |
| | |
| | | package com.mes.loadposition.service;
|
| | |
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | |
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | public interface LoadPositionService extends IService<LoadPosition> {
|
| | |
|
| | | List<LoadPosition> findList(LoadPosition params);
|
| | |
|
| | | LoadPosition findById(Long id);
|
| | |
|
| | | boolean insert(LoadPosition loadPosition);
|
| | |
|
| | | boolean update(LoadPosition loadPosition);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.loadposition.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.mes.loadposition.entity.LoadPosition;
|
| | |
|
| | | import com.mes.loadposition.service.LoadPositionService;
|
| | | import com.mes.loadposition.mapper.LoadPositionMapper;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | public class LoadPositionServiceImpl extends ServiceImpl<LoadPositionMapper, LoadPosition> implements LoadPositionService {
|
| | |
|
| | | @Autowired
|
| | | private LoadPositionMapper loadPositionMapper;
|
| | |
|
| | | @Override
|
| | | public List<LoadPosition> findList(LoadPosition params){
|
| | | LambdaQueryWrapper<LoadPosition> query = Wrappers.lambdaQuery(LoadPosition.class);
|
| | | return loadPositionMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public LoadPosition findById(Long id) {
|
| | | return loadPositionMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(LoadPosition loadPosition) {
|
| | | return save(loadPosition);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(LoadPosition loadPosition) {
|
| | | return updateById(loadPosition);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return loadPositionMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.rawusage.controller;
|
| | |
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | | import io.swagger.annotations.ApiResponses;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | import com.mes.rawusage.service.RawUsageService;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/api/rawUsage")
|
| | | @Api(tags = " 控制器")
|
| | | public class RawUsageController {
|
| | |
|
| | | @Autowired
|
| | | private RawUsageService rawUsageService;
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | *
|
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<RawUsage>> findList(@RequestBody RawUsage params) {
|
| | | List<RawUsage> result = rawUsageService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<RawUsage> findById(@PathVariable("id") Long id) {
|
| | | RawUsage rawUsage = rawUsageService.findById(id);
|
| | | return ResponseEntity.ok(rawUsage);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 新增
|
| | | *
|
| | | * @param rawUsage
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody RawUsage rawUsage) {
|
| | | boolean result = rawUsageService.insert(rawUsage);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改
|
| | | *
|
| | | * @param rawUsage
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody RawUsage rawUsage) {
|
| | | boolean result = rawUsageService.update(rawUsage);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = rawUsageService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.rawusage.entity;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @TableName("raw_usage")
|
| | | @ApiModel(value = "RawUsage", description = " ")
|
| | | public class RawUsage implements Serializable{
|
| | |
|
| | | private static final long serialVersionUID=1L;
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | @ApiModelProperty(" ")
|
| | | private Long id;
|
| | |
|
| | | /**
|
| | | * 玻璃类型
|
| | | */
|
| | | @ApiModelProperty("玻璃类型")
|
| | | private String rawType;
|
| | |
|
| | | /**
|
| | | * 宽度
|
| | | */
|
| | | @ApiModelProperty("宽度")
|
| | | private Float rawWidth;
|
| | |
|
| | | /**
|
| | | * 高度
|
| | | */
|
| | | @ApiModelProperty("高度")
|
| | | private Float rawHeight;
|
| | |
|
| | | /**
|
| | | * 厚度
|
| | | */
|
| | | @ApiModelProperty("厚度")
|
| | | private Float rawThickness;
|
| | |
|
| | | /**
|
| | | * 状态
|
| | | */
|
| | | @ApiModelProperty("状态")
|
| | | private String state;
|
| | |
|
| | | /**
|
| | | * 颜色
|
| | | */
|
| | | @ApiModelProperty("颜色")
|
| | | private String color;
|
| | |
|
| | | /**
|
| | | * 总数量
|
| | | */
|
| | | @ApiModelProperty("总数量")
|
| | | private Integer pieces;
|
| | |
|
| | | /**
|
| | | * 剩余数量
|
| | | */
|
| | | @ApiModelProperty("剩余数量")
|
| | | private Integer leftPieces;
|
| | |
|
| | | /**
|
| | | * 物料编码
|
| | | */
|
| | | @ApiModelProperty("物料编码")
|
| | | private String qrcode;
|
| | |
|
| | | /**
|
| | | * 创建时间
|
| | | */
|
| | | @ApiModelProperty("创建时间")
|
| | | private Date createTime;
|
| | |
|
| | | /**
|
| | | * 生产日期
|
| | | */
|
| | | @ApiModelProperty("生产日期")
|
| | | private Date productionTime;
|
| | |
|
| | | /**
|
| | | * 批次号
|
| | | */
|
| | | @ApiModelProperty("批次号")
|
| | | private String batchId;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getRawType() {
|
| | | return rawType;
|
| | | }
|
| | |
|
| | | public void setRawType(String rawType) {
|
| | | this.rawType = rawType;
|
| | | }
|
| | |
|
| | | public Float getRawWidth() {
|
| | | return rawWidth;
|
| | | }
|
| | |
|
| | | public void setRawWidth(Float rawWidth) {
|
| | | this.rawWidth = rawWidth;
|
| | | }
|
| | |
|
| | | public Float getRawHeight() {
|
| | | return rawHeight;
|
| | | }
|
| | |
|
| | | public void setRawHeight(Float rawHeight) {
|
| | | this.rawHeight = rawHeight;
|
| | | }
|
| | |
|
| | | public Float getRawThickness() {
|
| | | return rawThickness;
|
| | | }
|
| | |
|
| | | public void setRawThickness(Float rawThickness) {
|
| | | this.rawThickness = rawThickness;
|
| | | }
|
| | |
|
| | | public String getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(String state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public String getColor() {
|
| | | return color;
|
| | | }
|
| | |
|
| | | public void setColor(String color) {
|
| | | this.color = color;
|
| | | }
|
| | |
|
| | | public Integer getPieces() {
|
| | | return pieces;
|
| | | }
|
| | |
|
| | | public void setPieces(Integer pieces) {
|
| | | this.pieces = pieces;
|
| | | }
|
| | |
|
| | | public Integer getLeftPieces() {
|
| | | return leftPieces;
|
| | | }
|
| | |
|
| | | public void setLeftPieces(Integer leftPieces) {
|
| | | this.leftPieces = leftPieces;
|
| | | }
|
| | |
|
| | | public String getQrcode() {
|
| | | return qrcode;
|
| | | }
|
| | |
|
| | | public void setQrcode(String qrcode) {
|
| | | this.qrcode = qrcode;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getProductionTime() {
|
| | | return productionTime;
|
| | | }
|
| | |
|
| | | public void setProductionTime(Date productionTime) {
|
| | | this.productionTime = productionTime;
|
| | | }
|
| | |
|
| | | public String getBatchId() {
|
| | | return batchId;
|
| | | }
|
| | |
|
| | | public void setBatchId(String batchId) {
|
| | | this.batchId = batchId;
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.rawusage.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | | public interface RawUsageMapper extends BaseMapper<RawUsage> {
|
| | |
|
| | | } |
New file |
| | |
| | | <?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.mes.rawusage.mapper.RawUsageMapper">
|
| | |
|
| | | </mapper>
|
New file |
| | |
| | | package com.mes.rawusage.service;
|
| | |
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | |
|
| | | import java.util.List;
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | public interface RawUsageService extends IService<RawUsage> {
|
| | |
|
| | | List<RawUsage> findList(RawUsage params);
|
| | |
|
| | | RawUsage findById(Long id);
|
| | |
|
| | | boolean insert(RawUsage rawUsage);
|
| | |
|
| | | boolean update(RawUsage rawUsage);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.rawusage.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.mes.rawusage.mapper.RawUsageMapper;
|
| | | import com.mes.rawusage.entity.RawUsage;
|
| | | import com.mes.rawusage.service.RawUsageService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | public class RawUsageServiceImpl extends ServiceImpl<RawUsageMapper, RawUsage> implements RawUsageService {
|
| | |
|
| | | @Autowired
|
| | | private RawUsageMapper rawUsageMapper;
|
| | |
|
| | | @Override
|
| | | public List<RawUsage> findList(RawUsage params){
|
| | | LambdaQueryWrapper<RawUsage> query = Wrappers.lambdaQuery(RawUsage.class);
|
| | | return rawUsageMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public RawUsage findById(Long id) {
|
| | | return rawUsageMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(RawUsage rawUsage) {
|
| | | return save(rawUsage);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(RawUsage rawUsage) {
|
| | | return updateById(rawUsage);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return rawUsageMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.shelfrack.controller;
|
| | |
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | | import io.swagger.annotations.ApiResponses;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | | import com.mes.shelfrack.service.ShelfRackService;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/api/shelfRack")
|
| | | @Api(tags = " 控制器")
|
| | | public class ShelfRackController {
|
| | |
|
| | | @Autowired
|
| | | private ShelfRackService shelfRackService;
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | *
|
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<ShelfRack>> findList(@RequestBody ShelfRack params) {
|
| | | List<ShelfRack> result = shelfRackService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<ShelfRack> findById(@PathVariable("id") Long id) {
|
| | | ShelfRack shelfRack = shelfRackService.findById(id);
|
| | | return ResponseEntity.ok(shelfRack);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 新增
|
| | | *
|
| | | * @param shelfRack
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody ShelfRack shelfRack) {
|
| | | boolean result = shelfRackService.insert(shelfRack);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改
|
| | | *
|
| | | * @param shelfRack
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody ShelfRack shelfRack) {
|
| | | boolean result = shelfRackService.update(shelfRack);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = shelfRackService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.shelfrack.entity;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @TableName("shelf_rack")
|
| | | @ApiModel(value = "ShelfRack", description = " ")
|
| | | public class ShelfRack implements Serializable{
|
| | |
|
| | | private static final long serialVersionUID=1L;
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | @ApiModelProperty(" ")
|
| | | private Long id;
|
| | |
|
| | | /**
|
| | | * 架子编号
|
| | | */
|
| | | @ApiModelProperty("架子编号")
|
| | | private String number;
|
| | |
|
| | | /**
|
| | | * 工作状态
|
| | | */
|
| | | @ApiModelProperty("工作状态")
|
| | | private String state;
|
| | |
|
| | | /**
|
| | | * 包号编号
|
| | | */
|
| | | @ApiModelProperty("包号编号")
|
| | | private Long rawPackageId;
|
| | |
|
| | | /**
|
| | | * 修改时间
|
| | | */
|
| | | @ApiModelProperty("修改时间")
|
| | | private Date modTime;
|
| | |
|
| | | /**
|
| | | * 启用状态
|
| | | */
|
| | | @ApiModelProperty("启用状态")
|
| | | private String enableState;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getNumber() {
|
| | | return number;
|
| | | }
|
| | |
|
| | | public void setNumber(String number) {
|
| | | this.number = number;
|
| | | }
|
| | |
|
| | | public String getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(String state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public Long getRawPackageId() {
|
| | | return rawPackageId;
|
| | | }
|
| | |
|
| | | public void setRawPackageId(Long rawPackageId) {
|
| | | this.rawPackageId = rawPackageId;
|
| | | }
|
| | |
|
| | | public Date getModTime() {
|
| | | return modTime;
|
| | | }
|
| | |
|
| | | public void setModTime(Date modTime) {
|
| | | this.modTime = modTime;
|
| | | }
|
| | |
|
| | | public String getEnableState() {
|
| | | return enableState;
|
| | | }
|
| | |
|
| | | public void setEnableState(String enableState) {
|
| | | this.enableState = enableState;
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.shelfrack.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | | public interface ShelfRackMapper extends BaseMapper<ShelfRack> {
|
| | |
|
| | | } |
New file |
| | |
| | | <?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.mes.shelfrack.mapper.ShelfRackMapper">
|
| | |
|
| | | </mapper>
|
New file |
| | |
| | | package com.mes.shelfrack.service;
|
| | |
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | |
|
| | | import java.util.List;
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | public interface ShelfRackService extends IService<ShelfRack> {
|
| | |
|
| | | List<ShelfRack> findList(ShelfRack params);
|
| | |
|
| | | ShelfRack findById(Long id);
|
| | |
|
| | | boolean insert(ShelfRack shelfRack);
|
| | |
|
| | | boolean update(ShelfRack shelfRack);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.shelfrack.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.mes.shelfrack.mapper.ShelfRackMapper;
|
| | | import com.mes.shelfrack.entity.ShelfRack;
|
| | | import com.mes.shelfrack.service.ShelfRackService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | public class ShelfRackServiceImpl extends ServiceImpl<ShelfRackMapper, ShelfRack> implements ShelfRackService {
|
| | |
|
| | | @Autowired
|
| | | private ShelfRackMapper shelfRackMapper;
|
| | |
|
| | | @Override
|
| | | public List<ShelfRack> findList(ShelfRack params){
|
| | | LambdaQueryWrapper<ShelfRack> query = Wrappers.lambdaQuery(ShelfRack.class);
|
| | | return shelfRackMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public ShelfRack findById(Long id) {
|
| | | return shelfRackMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(ShelfRack shelfRack) {
|
| | | return save(shelfRack);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(ShelfRack shelfRack) {
|
| | | return updateById(shelfRack);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return shelfRackMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.storagetask.controller;
|
| | |
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | | import io.swagger.annotations.ApiResponses;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import com.mes.storagetask.service.StorageTaskService;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @RestController
|
| | | @RequestMapping("/api/storageTask")
|
| | | @Api(tags = " 控制器")
|
| | | public class StorageTaskController {
|
| | |
|
| | | @Autowired
|
| | | private StorageTaskService storageTaskService;
|
| | |
|
| | | /**
|
| | | * 列表查询
|
| | | *
|
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "列表查询",notes = "列表查询",produces = "application/json")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @PostMapping("/findList")
|
| | | public ResponseEntity<List<StorageTask>> findList(@RequestBody StorageTask params) {
|
| | | List<StorageTask> result = storageTaskService.findList(params);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 查询
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "查询", notes = "查询详情")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
|
| | | @GetMapping("/{id}")
|
| | | public ResponseEntity<StorageTask> findById(@PathVariable("id") Long id) {
|
| | | StorageTask storageTask = storageTaskService.findById(id);
|
| | | return ResponseEntity.ok(storageTask);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 新增
|
| | | *
|
| | | * @param storageTask
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "新增", notes = "新增数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PostMapping
|
| | | public ResponseEntity<Boolean> insert( @RequestBody StorageTask storageTask) {
|
| | | boolean result = storageTaskService.insert(storageTask);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 修改
|
| | | *
|
| | | * @param storageTask
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "修改", notes = "修改数据")
|
| | | @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
| | | @PutMapping
|
| | | public ResponseEntity<Boolean> update( @RequestBody StorageTask storageTask) {
|
| | | boolean result = storageTaskService.update(storageTask);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | *
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "删除", notes = "删除数据")
|
| | | @DeleteMapping("/{id}")
|
| | | public ResponseEntity<Integer> delete(@PathVariable("id") Long id) {
|
| | | int result = storageTaskService.delete(id);
|
| | | return ResponseEntity.ok(result);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.storagetask.entity;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import io.swagger.annotations.ApiModel;
|
| | | import io.swagger.annotations.ApiModelProperty;
|
| | |
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @TableName("storage_task")
|
| | | @ApiModel(value = "StorageTask", description = " ")
|
| | | public class StorageTask implements Serializable{
|
| | |
|
| | | private static final long serialVersionUID=1L;
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | @ApiModelProperty(" ")
|
| | | private Long id;
|
| | |
|
| | | /**
|
| | | * 任务类型
|
| | | */
|
| | | @ApiModelProperty("任务类型")
|
| | | private String taskType;
|
| | |
|
| | | /**
|
| | | * 工作状态
|
| | | */
|
| | | @ApiModelProperty("工作状态")
|
| | | private String taskState;
|
| | |
|
| | | /**
|
| | | * 仓储架号
|
| | | */
|
| | | @ApiModelProperty("仓储架号")
|
| | | private String shelfRack;
|
| | |
|
| | | /**
|
| | | * 上片位编号
|
| | | */
|
| | | @ApiModelProperty("上片位编号")
|
| | | private String loadRack;
|
| | |
|
| | | /**
|
| | | * 线路
|
| | | */
|
| | | @ApiModelProperty("线路")
|
| | | private Integer routeGroup;
|
| | |
|
| | | /**
|
| | | * 创建时间
|
| | | */
|
| | | @ApiModelProperty("创建时间")
|
| | | private Date startTime;
|
| | |
|
| | | /**
|
| | | * 完成时间
|
| | | */
|
| | | @ApiModelProperty("完成时间")
|
| | | private Date finishTime;
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getTaskType() {
|
| | | return taskType;
|
| | | }
|
| | |
|
| | | public void setTaskType(String taskType) {
|
| | | this.taskType = taskType;
|
| | | }
|
| | |
|
| | | public String getTaskState() {
|
| | | return taskState;
|
| | | }
|
| | |
|
| | | public void setTaskState(String taskState) {
|
| | | this.taskState = taskState;
|
| | | }
|
| | |
|
| | | public String getShelfRack() {
|
| | | return shelfRack;
|
| | | }
|
| | |
|
| | | public void setShelfRack(String shelfRack) {
|
| | | this.shelfRack = shelfRack;
|
| | | }
|
| | |
|
| | | public String getLoadRack() {
|
| | | return loadRack;
|
| | | }
|
| | |
|
| | | public void setLoadRack(String loadRack) {
|
| | | this.loadRack = loadRack;
|
| | | }
|
| | |
|
| | | public Integer getRouteGroup() {
|
| | | return routeGroup;
|
| | | }
|
| | |
|
| | | public void setRouteGroup(Integer routeGroup) {
|
| | | this.routeGroup = routeGroup;
|
| | | }
|
| | |
|
| | | public Date getStartTime() {
|
| | | return startTime;
|
| | | }
|
| | |
|
| | | public void setStartTime(Date startTime) {
|
| | | this.startTime = startTime;
|
| | | }
|
| | |
|
| | | public Date getFinishTime() {
|
| | | return finishTime;
|
| | | }
|
| | |
|
| | | public void setFinishTime(Date finishTime) {
|
| | | this.finishTime = finishTime;
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.storagetask.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import org.apache.ibatis.annotations.Mapper;
|
| | | /**
|
| | | * |
| | | *
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | *
|
| | | */
|
| | | @Mapper
|
| | | public interface StorageTaskMapper extends BaseMapper<StorageTask> {
|
| | |
|
| | | } |
New file |
| | |
| | | <?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.mes.storagetask.mapper.StorageTaskMapper">
|
| | |
|
| | | </mapper>
|
New file |
| | |
| | | package com.mes.storagetask.service;
|
| | |
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | |
|
| | | import java.util.List;
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | public interface StorageTaskService extends IService<StorageTask> {
|
| | |
|
| | | List<StorageTask> findList(StorageTask params);
|
| | |
|
| | | StorageTask findById(Long id);
|
| | |
|
| | | boolean insert(StorageTask storageTask);
|
| | |
|
| | | boolean update(StorageTask storageTask);
|
| | |
|
| | | int delete(Long id);
|
| | |
|
| | | } |
New file |
| | |
| | | package com.mes.storagetask.service.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.mes.storagetask.mapper.StorageTaskMapper;
|
| | | import com.mes.storagetask.entity.StorageTask;
|
| | | import com.mes.storagetask.service.StorageTaskService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * @author system
|
| | | * @since 2024-07-09 14:51:27
|
| | | */
|
| | | @Service
|
| | | public class StorageTaskServiceImpl extends ServiceImpl<StorageTaskMapper, StorageTask> implements StorageTaskService {
|
| | |
|
| | | @Autowired
|
| | | private StorageTaskMapper storageTaskMapper;
|
| | |
|
| | | @Override
|
| | | public List<StorageTask> findList(StorageTask params){
|
| | | LambdaQueryWrapper<StorageTask> query = Wrappers.lambdaQuery(StorageTask.class);
|
| | | return storageTaskMapper.selectList(query);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public StorageTask findById(Long id) {
|
| | | return storageTaskMapper.selectById(id);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean insert(StorageTask storageTask) {
|
| | | return save(storageTask);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean update(StorageTask storageTask) {
|
| | | return updateById(storageTask);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int delete(Long id) {
|
| | | return storageTaskMapper.deleteById(id);
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | server: |
| | | port: 8086 |
| | | |
| | | spring: |
| | | profiles: |
| | | active: prod |
| | | application: |
| | | name: glassStorage |
| | | |
| | | |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | | |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://192.168.1.199:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://192.168.1.199:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | pp: |
| | | url: jdbc:mysql://192.168.1.199:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://192.168.1.199:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | # hangzhoumes: |
| | | # url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | # username: root |
| | | # password: beibo.123/ |
| | | # driver-class-name: com.mysql.cj.jdbc.Driver |
| | | # salve_hangzhoumes: |
| | | # url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes |
| | | # username: sa |
| | | # password: beibo.123/ |
| | | # driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | hangzhoumes: |
| | | url: jdbc:mysql:10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | url: jdbc:sqlserver://127.0.0.1:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | username: sa |
| | |
| | | /** |
| | | * 任务状态 0 未开始 1正在进行 2完成 |
| | | */ |
| | | private Integer taskStauts; |
| | | private Integer taskStatus; |
| | | |
| | | /** |
| | | * 创建时间 |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.mapper.DownGlassInfoMapper; |
| | | import com.mes.downglassinfo.mapper.DownGlassTaskMapper; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | @Autowired |
| | | private DownGlassInfoService downGlassInfoService; // MySQL Mapper |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private DownGlassTaskMapper downGlassTaskMapper; // SQL Server Mapper |
| | | |
| | | @Override |
| | |
| | | |
| | | // Step 2: 从 SQL Server 中过滤掉这些玻璃 ID 并查询任务 |
| | | QueryWrapper<DownGlassTask> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("task_stauts", 1) |
| | | queryWrapper.eq("task_status", 1) |
| | | .and(qw -> qw.eq("task_type", 2).or().eq("task_type", 3)); |
| | | |
| | | List<DownGlassInfo> excludedGlassIds = downGlassInfoService.list(); |
| | |
| | | @Override |
| | | public void updateTaskState(String id) { |
| | | UpdateWrapper<DownGlassTask> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("task_stauts", 2).eq("id", id); |
| | | updateWrapper.set("task_status", 2).eq("id", id); |
| | | baseMapper.update(new DownGlassTask(), updateWrapper); |
| | | } |
| | | |
| | |
| | | // 如果主键值不存在,则进行插入操作 |
| | | DownGlassTask newDownGlassTask = new DownGlassTask(); |
| | | BeanUtils.copyProperties(downGlassTask, newDownGlassTask); |
| | | newDownGlassTask.setTaskStauts(1); // 默认任务状态为1 |
| | | newDownGlassTask.setTaskStatus(1); // 默认任务状态为1 |
| | | newDownGlassTask.setCreateTime(new Date()); |
| | | int rows = baseMapper.insert(newDownGlassTask); |
| | | return rows > 0 ? rows : null; |
| | |
| | | |
| | | |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.entity.request.DownWorkRequest; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | //绑定架子 |
| | | @ApiOperation("绑定架子") |
| | | //绑定架子 |
| | | @ApiOperation("绑定架子") |
| | | @PostMapping("/updateFlowCardId") |
| | | public ResponseEntity<Map<String, Object>> updateFlowCardId(@RequestBody Map<String, Object> requestData) { |
| | | // 从 requestData 中获取传入的 flowCardId |
| | | String flowCardId = (String) requestData.get("flowCardId"); |
| | | int workstationId = (int) requestData.get("workstationId"); |
| | | public ResponseEntity<Map<String, Object>> updateFlowCardId(@RequestBody DownWorkRequest request) { |
| | | |
| | | // 查询对应 flowCardId 的玻璃信息总数量 |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId); |
| | | |
| | | // 更新 down_workstation 表中的总数量 |
| | | downWorkstationService.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId); |
| | | // 绑定架子 |
| | | downWorkstationService.updateFlowCardIdAndCount(request.getFlowCardId(), request.getWorkstationId(), request.getLayer()); |
| | | |
| | | // 构建响应数据 |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | |
| | | package com.mes.downworkstation.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | /** |
| | | * 总数量 |
| | | */ |
| | | @TableField("total_quantity") |
| | | private Integer totalquantity; |
| | | private Integer totalQuantity; |
| | | |
| | | /** |
| | | * 落架数量 |
| | | */ |
| | | @TableField("racks_number") |
| | | private Integer Racksnumber; |
| | | private Integer racksNumber; |
| | | /** |
| | | * 人工下片数量 |
| | | */ |
| | | private Integer artificialNumber; |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.downworkstation.entity;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.IdType;
|
| | | import com.baomidou.mybatisplus.annotation.TableField;
|
| | | import com.baomidou.mybatisplus.annotation.TableId;
|
| | | import lombok.Data;
|
| | | import lombok.EqualsAndHashCode;
|
| | |
| | | @Data
|
| | | @EqualsAndHashCode(callSuper = false)
|
| | |
|
| | | public class DownWorkstionAndDownGlassinfo
|
| | | {
|
| | | public class DownWorkstionAndDownGlassinfo {
|
| | | /**
|
| | | * 下片工位表id
|
| | | */
|
| | |
| | | private Integer workState;
|
| | |
|
| | |
|
| | | @TableField("total_quantity")
|
| | | private Integer totalquantity;
|
| | | private Integer totalQuantity;
|
| | |
|
| | | @TableField("racks_number")
|
| | | private Integer Racksnumber;
|
| | |
|
| | |
|
| | |
|
| | | private Integer racksNumber;
|
| | |
|
| | | /**
|
| | | * 顺序
|
New file |
| | |
| | | package com.mes.downworkstation.entity.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/7/10 14:10 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class DownWorkRequest { |
| | | |
| | | |
| | | /** |
| | | * 流程卡号 |
| | | */ |
| | | private String flowCardId; |
| | | |
| | | /** |
| | | * 工位id |
| | | */ |
| | | private int workstationId; |
| | | |
| | | /** |
| | | * 层数 |
| | | */ |
| | | private int layer; |
| | | } |
| | |
| | | |
| | | /** |
| | | * @param flowCardId |
| | | * @param glassInfoCount |
| | | * |
| | | * @param workstationId |
| | | * @return 更新架子和数量 |
| | | */ |
| | | int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId); |
| | | int updateFlowCardIdAndCount(String flowCardId, int workstationId,int layer); |
| | | |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.service.DamageService; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.mapper.DownGlassInfoMapper; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | |
| | | import com.mes.downworkstation.mapper.DownWorkstationTaskMapper; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.downworkstation.service.DownWorkstationTaskService; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private DownGlassInfoMapper downGlassInfoMapper; |
| | | @Autowired |
| | | private DownGlassTaskService downGlassTaskService; |
| | | |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | @Autowired |
| | | private DamageService damageservice; |
| | | |
| | | @Autowired |
| | | private DownWorkstationTaskService downWorkstationTaskService; |
| | |
| | | @Override |
| | | public int getTotalQuantity(int workstationId) { |
| | | DownWorkstation result = baseMapper.selectOne(new QueryWrapper<DownWorkstation>().lambda() |
| | | .select(DownWorkstation::getTotalquantity) |
| | | .select(DownWorkstation::getTotalQuantity) |
| | | .eq(DownWorkstation::getWorkstationId, workstationId)); |
| | | |
| | | return result != null ? result.getTotalquantity() : 0; |
| | | return result != null ? result.getTotalQuantity() : 0; |
| | | } |
| | | |
| | | |
| | |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | DownWorkstation result = baseMapper.selectOne(queryWrapper); |
| | | return result != null ? result.getRacksnumber() : 0; |
| | | return result != null ? result.getRacksNumber() : 0; |
| | | } |
| | | |
| | | //根据条件获取工位玻璃信息 |
| | |
| | | |
| | | |
| | | @Override |
| | | public int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId) { |
| | | public int updateFlowCardIdAndCount(String flowCardId, int workstationId,int layer) { |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId,layer); |
| | | QueryWrapper<Damage> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("process_id", flowCardId); |
| | | queryWrapper.eq("technology_number", layer); |
| | | |
| | | int artificialnumber=damageservice.count(queryWrapper); |
| | | UpdateWrapper<DownWorkstation> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("total_quantity", glassInfoCount) |
| | | .set("flow_card_id", flowCardId) |
| | | .set("layer", layer) |
| | | .set("artificial_number", artificialnumber) |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | return baseMapper.update(new DownWorkstation(), updateWrapper); |
| | |
| | | if (Details.size() > 0) { |
| | | DownStorageCageDetails downStorageCageDetails = Details.get(0); |
| | | String flowCardId = downStorageCageDetails.getFlowCardId(); |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId); |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId,1); |
| | | DownWorkstation downWorkstation = downWorkstationService.getOne(new LambdaQueryWrapper<DownWorkstation>().eq(DownWorkstation::getFlowCardId, null)); |
| | | List<DownWorkstation> downWorkstations = downWorkstationService.list(new LambdaQueryWrapper<DownWorkstation>() |
| | | .eq(DownWorkstation::getEnableState, 1)); |
| | |
| | | downGlassInfoService.insertDownGlassInfo(newdownGlassInfo); |
| | | log.info("插入数据到下片玻璃信息表"); |
| | | DownWorkstation downWorkstation1 = downWorkstationService.selectByFlowCardId(downGlassInfo.getFlowCardId()); |
| | | downWorkstationService.updateracksnumber(downGlassInfo.getFlowCardId(), downWorkstation1.getRacksnumber() + 1); |
| | | downWorkstationService.updateracksnumber(downGlassInfo.getFlowCardId(), downWorkstation1.getRacksNumber() + 1); |
| | | log.info("更新落架数量"); |
| | | // LambdaQueryWrapper<DownGlassTask> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(DownGlassTask::getGlassId, newdownGlassInfo.getGlassId()); |
| | |
| | | return Boolean.FALSE; |
| | | } |
| | | //更新落架玻璃数量 |
| | | downWorkstationService.update(new UpdateWrapper<DownWorkstation>().eq("flow_card_id", downStorageCageDetails.getFlowCardId()) |
| | | .eq("layer", downStorageCageDetails.getLayer()).setSql("racks_number = racks_number +1")); |
| | | if (endCell == 7) { |
| | | downWorkstationService.update(new UpdateWrapper<DownWorkstation>().eq("flow_card_id", downStorageCageDetails.getFlowCardId()) |
| | | .eq("layer", downStorageCageDetails.getLayer()).setSql("artificial_number = artificial_number +1")); |
| | | } else { |
| | | downWorkstationService.update(new UpdateWrapper<DownWorkstation>().eq("flow_card_id", downStorageCageDetails.getFlowCardId()) |
| | | .eq("layer", downStorageCageDetails.getLayer()).setSql("racks_number = racks_number +1")); |
| | | } |
| | | |
| | | //生成任务信息 |
| | | DownGlassInfo downGlassInfo = new DownGlassInfo(); |
| | | BeanUtils.copyProperties(downStorageCageDetails, downGlassInfo); |
| | |
| | | downGlassTask.setHeight((int) glassInfo.getHeight()); |
| | | downGlassTask.setFlowCardId(glassInfo.getFlowCardId()); |
| | | downGlassTask.setLayer(glassInfo.getLayer()); |
| | | downGlassTask.setTaskStauts(0); |
| | | downGlassTask.setTaskStatus(0); |
| | | downGlassTask.setCreateTime(new Date()); |
| | | downGlassTaskService.save(downGlassTask); |
| | | //向plc发送命令 |
| | |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://192.168.30.101:1433;databasename=hangzhoumes |
| | | url: jdbc:sqlserver://192.168.10.2:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | pp: |
| | | url: jdbc:mysql://127.0.0.1:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | @Test |
| | | public void testupdateFlowCardIdAndCount() { |
| | | log.info("绑定流程卡号和数量"); |
| | | downWorkstationServiceImpl.updateFlowCardIdAndCount("1", 1, 1); |
| | | downWorkstationServiceImpl.updateFlowCardIdAndCount("NG24060401A020", 1, 2); |
| | | |
| | | } |
| | | |
| | | @Test |
| | | public void testplc() { |
| | | log.info("测试"); |
| | | glassInfoServiceImpl.getGlassInfoCountByFlowCardId("NG24030702A01"); |
| | | glassInfoServiceImpl.getGlassInfoCountByFlowCardId("NG24030702A01",1); |
| | | |
| | | } |
| | | |
| | |
| | | <module>LoadGlassModule</module> |
| | | <module>TemperingGlassModule</module> |
| | | <module>UnLoadGlassModule</module> |
| | | <module>GlassStorageModule</module> |
| | | </modules> |
| | | |
| | | <properties> |