Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
| | |
| | | </el-header> |
| | | <div id="line"></div> |
| | | <el-container> |
| | | <el-aside :width="isCollapse ? '30px' : '200px'" style="background-color: #fff;"> |
| | | <el-aside :width="isCollapse ? '0px' : '200px'" style="background-color: #fff;"> |
| | | <el-row :span="20"> |
| | | <el-menu :default-active="activePath" class="el-menu-vertical-demo" > |
| | | <div class="menu"> |
| | |
| | | |
| | | ul li { |
| | | height: 28px; |
| | | width: 200px; |
| | | width: 180px; |
| | | line-height: 30px; |
| | | /* background: rgb(128, 128, 128); */ |
| | | color: #000000; |
| | |
| | | dialoglea.value = true; // 打开绑定架子对话框 |
| | | fetchFlowCardId(); |
| | | }; |
| | | const selectproject = () => { |
| | | dialogFormVisible.value = true; |
| | | selectgong(); |
| | | }; |
| | | // 值班信息 |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | |
| | | const requestData = { |
| | | state: 100 |
| | | }; |
| | | // 调用接口获取选项数据的函数 |
| | | |
| | | |
| | | |
| | | |
| | | const selectgong = async (queryString: string) => { |
| | | try { |
| | | const response = await request.post('/loadGlass/optimizeProject/listByState',{ |
| | | ...requestData, |
| | | query: queryString |
| | | }) |
| | | if (response.code == 200) { |
| | | titleSelectJson.value.processType = response.data; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | const fetchOptions = async (queryString: string) => { |
| | | try { |
| | | // 发送请求到后端接口 |
| | |
| | | ...requestData, |
| | | query: queryString // 将查询字符串作为参数传递 |
| | | }); |
| | | |
| | | if (response.code == 200) { |
| | | titleSelectJson.value.processType = response.data; |
| | | // titleSelectJson.value.processType = response.data; |
| | | console.log(response.data); |
| | | |
| | | } else { |
| | |
| | | message: t('basicData.pause'), |
| | | }) |
| | | } |
| | | |
| | | }; |
| | | // 删除 |
| | | const handleConfirma = async () => { |
| | |
| | | patternThickness: 0, |
| | | number: 0 |
| | | }); |
| | | |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | |
| | | const uniqueHeights = new Set(response.data.map(item => item.height)); |
| | | const uniqueFilmsIds = new Set(response.data.map(item => item.filmsId)); |
| | | const uniqueThicknesses = new Set(response.data.map(item => item.thickness)); |
| | | |
| | | selectOptions.value = Array.from(uniqueWidths).map(width => ({ |
| | | value: width, |
| | | label: width, |
| | |
| | | // 开始上片 |
| | | const handle = async () => { |
| | | if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') { |
| | | |
| | | try { |
| | | let engineeringId = window.localStorage.getItem('engineeringId') |
| | | console.log(engineeringId); |
| | | |
| | | const response = await request.post('/loadGlass/engineering/engineering/changeTask', { |
| | | engineerId: engineeringId, |
| | | state: 1, |
| | |
| | | <el-button @click="confirmCutting" style="margin-left: 30px;margin-top: -3px;" >{{ $t('basicData.change') }}</el-button> |
| | | |
| | | </div> |
| | | <el-button :disabled="!canSelectProject" style="margin-top: 5px;margin-left: 15px;" type="primary" @click="dialogFormVisible = true">{{ $t('basicData.selectproject') }}</el-button> |
| | | <el-button :disabled="!canSelectProject" style="margin-top: 5px;margin-left: 15px;" type="primary" @click="selectproject">{{ $t('basicData.selectproject') }}</el-button> |
| | | <el-button :disabled="!canSelectProject" :style="{ backgroundColor: canStartLoading ? 'green' : 'initial',color: canStartLoading ? 'white' : 'black', }" style="margin-top: 5px;margin-left: 20px;" @click="handleBind">{{ $t('basicData.startloading') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="warning" @click="handleBinda">{{ $t('basicData.stop') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button> |
| | |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisibleb = ref(false) |
| | | const dialogFormVisiblec = ref(false) |
| | | const dialogFormVisibles = ref(false) |
| | | const tableData = ref([]) |
| | | const tableDatagh = ref([]) |
| | | const tableDatab = ref([]) |
| | |
| | | const tableDataf = ref([]) |
| | | const tableDatae = ref([]) |
| | | const tableDatax = ref([]) |
| | | const tableDatas = ref([]) |
| | | const carPosition = ref([]) |
| | | const ganghua = ref('') |
| | | const adjustedRects = ref([]); |
| | |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // 指定流程卡 |
| | | const brokes = async(row) => { |
| | | try { |
| | | const confirmResult = await ElMessageBox.confirm( |
| | | t('searchOrder.specifytemperinga'), |
| | | t('searchOrder.prompt'), |
| | | { |
| | | confirmButtonText: t('searchOrder.yes'), |
| | | cancelButtonText: t('searchOrder.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ); |
| | | if (confirmResult === 'confirm') { |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageDetails/appointFlowCard",{ |
| | | flowCardId: row.flow_card_id, |
| | | layer: row.layer, |
| | | }); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | } catch (error) { |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // 出片队列拿走 |
| | | const brokeb = async(row) => { |
| | | try { |
| | |
| | | } catch (error) { |
| | | // console.error('Error fetching rects :', error); |
| | | } |
| | | |
| | | |
| | | }); |
| | | const fetchFlows = async () => { |
| | | try { |
| | | const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectFlowCardByCache'); |
| | | if (response.code === 200) { |
| | | tableDatas.value = response.data |
| | | } else { |
| | | ElMessage.warning(response.msg) |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rects :', error); |
| | | } |
| | | } |
| | | |
| | | |
| | | const fetchFlow = async () => { |
| | | try { |
| | | const response = await request.post('/cacheVerticalGlass/bigStorageCageDetails/selectTemperingGlass') |
| | |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="success" @click="dialogFormVisibleb = true">{{ $t('searchOrder.productionqueue') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="warning" @click="handleganghua">{{ $t('searchOrder.temperingqueries') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisibles=true;fetchFlows()">非钢化流程卡查询</el-button> |
| | | <el-switch style="margin-top: 5px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('searchOrder.temperedswitch')" @change="handleChange" /> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 100px;"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisibles" top="5vh" width="85%" :title="$t('searchOrder.temperingqueries')"> |
| | | <el-table ref="table" style="margin-top: 20px;height: 500px;" |
| | | :data="tableDatas" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="flow_card_id" fixed align="center" :label="$t('searchOrder.processcards')"/> |
| | | <el-table-column prop="layer" align="center" label="层" /> |
| | | <el-table-column prop="count" align="center" :label="$t('searchOrder.numberglasses')" /> |
| | | <el-table-column fixed="right" :label="$t('searchOrder.operate')" align="center" > |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="brokes(scope.row)">指定流程卡</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | </template> |
| | | <style scoped> |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | |
| | | const printLoading = ref(true) |
| | | const fullFlowCard = ref('') |
| | | const autoPrint = ref(false) |
| | | const takeGlass = ref([]) |
| | | const scanGlass = ref([]) |
| | | |
| | | |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisiblea2 = ref(false) |
| | | const dialogFormVisibleaDownGlass = ref(false) |
| | | const dialogFormVisibleaDownGlasss = ref(false) |
| | | // 数据 |
| | | const loading = ref(false); |
| | | // 弹框显示控制 |
| | |
| | | } |
| | | if (data.autoPrint != null) { |
| | | autoPrint.value = data.autoPrint[0]; |
| | | } |
| | | if (data.takeGlass != null) { |
| | | takeGlass.value = data.takeGlass[0]; |
| | | } |
| | | if (data.scanGlass != null) { |
| | | scanGlass.value = data.scanGlass[0]; |
| | | } |
| | | |
| | | //自动打印 |
| | |
| | | <el-button style="margin-top: 10px;margin-left: 10px;margin-bottom: 10px;" id="searchButton" type="primary" |
| | | @click="dialogFormVisibleaDownGlass = true">落架详情 |
| | | </el-button> |
| | | <el-switch style="margin-top: 10px;margin-left: 15px;margin-bottom: 10px;" v-model="autoPrint" class="mb-2" :inactive-text="$t('自动打印')" |
| | | @change="handleChange"/> |
| | | <el-button style="margin-top: 10px;margin-left: 10px;margin-bottom: 10px;" id="searchButton" type="primary" |
| | | @click="dialogFormVisibleaDownGlasss = true">人工下片 |
| | | </el-button> |
| | | <el-switch style="margin-top: 10px;margin-left: 15px;margin-bottom: 10px;" v-model="autoPrint" class="mb-2" |
| | | :inactive-text="$t('自动打印')" @change="handleChange" /> |
| | | <el-card style="flex: 1;" v-loading="loading"> |
| | | <el-card style="flex: 1;margin-left: 4px;margin-top: 1px;" v-loading="loading"> |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | |
| | | </el-table> |
| | | |
| | | </div> |
| | | <el-dialog v-model="dialogFormVisibleaDownGlass" top="2vh" width="97%" |
| | | :title="$t('searchOrder.cageinformation')"> |
| | | <el-dialog v-model="dialogFormVisibleaDownGlass" top="2vh" width="97%" :title="$t('落架信息')"> |
| | | <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('请选择工位')" clearable> |
| | | <el-option label="全部" value="0"></el-option> |
| | | <el-option label="1" value="1"></el-option> |
| | |
| | | </el-select> |
| | | |
| | | <span class="demonstration">时间段</span> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" start-placeholder="开始日期" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | end-placeholder="结束日期"> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" start-placeholder="开始日期" |
| | | value-format="YYYY-MM-DD hh:mm:ss" end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | |
| | | <el-button type="primary" style="margin-left: 10px;" @click="selectDownGlassData()">{{ |
| | |
| | | <el-table-column prop="Filmsid" align="center" :label="$t('膜系')" min-width="120"/> |
| | | <el-table-column prop="thickness" align="center" label="厚度" min-width="120"/> |
| | | <el-table-column prop="glassId" align="center" :label="$t('玻璃id')" min-width="120"/> |
| | | |
| | | </el-table> |
| | | </el-dialog> |
| | | |
| | | <el-dialog v-model="dialogFormVisibleaDownGlasss" top="2vh" width="97%" :title="$t('人工下片信息')"> |
| | | <div style="display:flex;justify-content: space-around;"> |
| | | <el-card style="display: flex; justify-content: center; align-items: center; width:800px; height: 800px;"> |
| | | <div |
| | | :style="{ width: takeGlass.width + 'px', height: takeGlass.height + 'px', backgroundColor: '#e1f3d8', transform: 'scale(' + 800 / (takeGlass.width > takeGlass.height ? takeGlass.width : takeGlass.height) + ')' }"> |
| | | <div style="font-size: 50px; text-align: center;"> |
| | | <div>{{ takeGlass.flowCardId }}</div> |
| | | <div>{{ takeGlass.width }}</div> |
| | | <div>{{ takeGlass.height }}</div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | <el-card style="display: flex; justify-content: center; align-items: center; width: 800px; height: 800px;"> |
| | | <div |
| | | :style="{ width: scanGlass.width + 'px', height: scanGlass.height + 'px', backgroundColor: '#e1f3d8', transform: 'scale(' + 800 / (scanGlass.width > scanGlass.height ? scanGlass.width : scanGlass.height) + ')' }"> |
| | | <div style="font-size: 50px; text-align: center;"> |
| | | <div>{{ scanGlass.flowCardId }}</div> |
| | | <div>{{ scanGlass.width }}</div> |
| | | <div>{{ scanGlass.height }}</div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </el-dialog> |
| | | </el-card> |
| | | <!-- workstationId: '1', |
| | | workstationId: '1005', |
| | |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | <el-dialog id="sizePrintCalrd1" v-model="dialogTableVisible1" destroy-on-close > |
| | | <print-label id="printFlowCard" :printFlowCardId="printFlowCardId" :printLayer="printLayer" |
| | | style=""/> |
| | | <print-label id="printFlowCard" :printFlowCardId="printFlowCardId" :printLayer="printLayer" style="" /> |
| | | </el-dialog> |
| | | |
| | | </template> |
| | |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.github.xiaoymin</groupId> |
| | | <artifactId>knife4j-spring-boot-starter</artifactId> |
| | | <version>2.0.9</version> |
| | | </dependency> |
| | | <!-- 2.0~2.2 Knife4j 2.0.0 ~ 2.0.6--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.github.xiaoymin</groupId>--> |
| | | <!-- <artifactId>knife4j-spring-boot-starter</artifactId>--> |
| | | <!-- <version>2.0.6</version>--> |
| | | <!-- <groupId>io.springfox</groupId>--> |
| | | <!-- <artifactId>springfox-swagger2</artifactId>--> |
| | | <!-- <version>2.7.0</version>--> |
| | | <!-- </dependency>--> |
| | | |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger2</artifactId> |
| | | <version>2.7.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger-ui</artifactId> |
| | | <version>2.7.0</version> |
| | | </dependency> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>io.springfox</groupId>--> |
| | | <!-- <artifactId>springfox-swagger-ui</artifactId>--> |
| | | <!-- <version>2.7.0</version>--> |
| | | <!-- </dependency>--> |
| | | |
| | | <!--hutool java验证方法类--> |
| | | <dependency> |
| | |
| | | <artifactId>mssql-jdbc</artifactId> |
| | | <version>6.4.0.jre8</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.liquibase</groupId> |
| | | <artifactId>liquibase-core</artifactId> |
| | | <version>3.8.1</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | * A09出片目标位置 d02卧转立 钢化出片 3001 |
| | | * A10出片目标位置 d05卧转立 人工出片 3002 |
| | | */ |
| | | public static final Integer TEMPERING_OUT_TARGET_POSITION = 3001; |
| | | public static final Integer TEMPERING_OUT_TARGET_POSITION = 3002; |
| | | public static final Integer ARTIFICIAL_OUT_TARGET_POSITION = 3002; |
| | | |
| | | /** |
| | |
| | | public static final Integer SLOT_ON = 1; |
| | | public static final Integer SLOT_OFF = 0; |
| | | |
| | | /** |
| | | * 下片任务玻璃状态 |
| | | * 生成任务0 |
| | | * 出片任务2 |
| | | */ |
| | | public static final Integer UNLOAD_GLASS_CREATE = 0; |
| | | public static final Integer UNLOAD_GLASS_OUT = 1; |
| | | public static final Integer UNLOAD_GLASS_DOWN = 2; |
| | | |
| | | } |
| | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import springfox.documentation.builders.ApiInfoBuilder; |
| | | import springfox.documentation.builders.ParameterBuilder; |
| | | import springfox.documentation.builders.PathSelectors; |
| | | import springfox.documentation.builders.RequestHandlerSelectors; |
| | | import springfox.documentation.schema.ModelRef; |
| | | import springfox.documentation.service.*; |
| | | import springfox.documentation.service.ApiInfo; |
| | | import springfox.documentation.service.Contact; |
| | | import springfox.documentation.spi.DocumentationType; |
| | | import springfox.documentation.spi.service.contexts.SecurityContext; |
| | | import springfox.documentation.spring.web.plugins.Docket; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhan_py |
| | |
| | | @Configuration |
| | | public class Swagger2Config { |
| | | |
| | | |
| | | @Bean |
| | | public Docket webApiConfig() { |
| | | List<Parameter> pars = new ArrayList<>(); |
| | | ParameterBuilder tokenPar = new ParameterBuilder(); |
| | | tokenPar.name("userId") |
| | | .description("用户token") |
| | | //.defaultValue(JwtHelper.createToken(1L, "admin")) |
| | | .defaultValue("1") |
| | | .modelRef(new ModelRef("string")) |
| | | .parameterType("header") |
| | | .required(false) |
| | | .build(); |
| | | pars.add(tokenPar.build()); |
| | | public Docket moduleDocket() { |
| | | return docket("mes接口文档", "com.mes"); |
| | | } |
| | | |
| | | |
| | | private Docket docket(String groupName, String basePackages) { |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .groupName("webApi") |
| | | .apiInfo(webApiInfo()) |
| | | .groupName(groupName) |
| | | .apiInfo(apiInfo()) |
| | | .select() |
| | | //只显示api路径下的页面 |
| | | .apis(RequestHandlerSelectors.basePackage("com.mes")) |
| | | .apis(RequestHandlerSelectors.basePackage(basePackages)) |
| | | .paths(PathSelectors.any()) |
| | | .build() |
| | | .globalOperationParameters(pars) |
| | | .securitySchemes(Collections.EMPTY_LIST) |
| | | .securityContexts(Arrays.asList(securityContext())); |
| | | } |
| | | |
| | | private SecurityContext securityContext() { |
| | | return SecurityContext.builder() |
| | | .securityReferences(defaultAuth()) |
| | | .forPaths(PathSelectors.any()) |
| | | .build(); |
| | | } |
| | | |
| | | private List<SecurityReference> defaultAuth() { |
| | | AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); |
| | | AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; |
| | | authorizationScopes[0] = authorizationScope; |
| | | return Arrays.asList(new SecurityReference("Authorization", authorizationScopes)); |
| | | } |
| | | |
| | | |
| | | private ApiInfo webApiInfo() { |
| | | private ApiInfo apiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title("网站-API文档") |
| | | .description("本文档描述了mes网站微服务接口定义") |
| | | .version("1.0") |
| | | .contact(new Contact("zhan_py", "", "")) |
| | | .title("mes接口文档系统") |
| | | .description("mesApi接口文档系统") |
| | | .license("Powered By mes") |
| | | .licenseUrl("http://127.0.0.1") |
| | | .termsOfServiceUrl("http://127.0.0.1") |
| | | .contact(new Contact("mes", "http://127.0.0.1", "beibo@mes.com")) |
| | | .version("V1.0.0") |
| | | .build(); |
| | | } |
| | | |
| | | |
| | | // @Bean |
| | | // public Docket webApiConfig() { |
| | | // List<Parameter> pars = new ArrayList<>(); |
| | | // ParameterBuilder tokenPar = new ParameterBuilder(); |
| | | // tokenPar.name("userId") |
| | | // .description("用户token") |
| | | // .defaultValue("1") |
| | | // .modelRef(new ModelRef("string")) |
| | | // .parameterType("header") |
| | | // .required(false) |
| | | // .build(); |
| | | // pars.add(tokenPar.build()); |
| | | // |
| | | // return new Docket(DocumentationType.SWAGGER_2) |
| | | // .apiInfo(webApiInfo()) |
| | | // .select() |
| | | // //只显示api路径下的页面 |
| | | // .apis(RequestHandlerSelectors.basePackage("com.mes")) |
| | | // .paths(PathSelectors.any()) |
| | | // .build() |
| | | // .globalOperationParameters(pars) |
| | | // .securitySchemes(Collections.EMPTY_LIST) |
| | | // .securityContexts(Arrays.asList(securityContext())); |
| | | // } |
| | | // |
| | | // private SecurityContext securityContext() { |
| | | // return SecurityContext.builder() |
| | | // .securityReferences(defaultAuth()) |
| | | // .forPaths(PathSelectors.any()) |
| | | // .build(); |
| | | // } |
| | | // |
| | | // private List<SecurityReference> defaultAuth() { |
| | | // AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); |
| | | // AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; |
| | | // authorizationScopes[0] = authorizationScope; |
| | | // return Arrays.asList(new SecurityReference("Authorization", authorizationScopes)); |
| | | // } |
| | | // |
| | | // |
| | | // private ApiInfo webApiInfo() { |
| | | // return new ApiInfoBuilder() |
| | | // .title("网站-API文档") |
| | | // .description("本文档描述了mes网站微服务接口定义") |
| | | // .version("1.0") |
| | | // .contact(new Contact("zhan_py", "", "")) |
| | | // .build(); |
| | | // } |
| | | } |
| | |
| | | List<DamagePrint> selectDamagePrint(Damage damage); |
| | | |
| | | List<DamagePrint> selectDamagePrintDetails(Damage damage); |
| | | |
| | | void deleteByGlassId(String glassId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.damage.entity.Damage; |
| | | import com.mes.damage.entity.DamagePrint; |
| | | import com.mes.damage.mapper.DamageMapper; |
| | |
| | | } |
| | | this.saveBatch(damageList); |
| | | } |
| | | |
| | | /** |
| | | * 拿走打印数据查询 |
| | | */ |
| | |
| | | } |
| | | return damageMapper.selectJoinList(DamagePrint.class,listDamage); |
| | | } |
| | | |
| | | /** |
| | | * 拿走打印打印详情查询 |
| | | */ |
| | |
| | | ); |
| | | return listDamage; |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByGlassId(String glassId) { |
| | | baseMapper.delete( |
| | | new LambdaQueryWrapper<Damage>() |
| | | .eq(Damage::getGlassId, glassId) |
| | | .in(Damage::getType, Const.GLASS_STATE_DAMAGE, Const.GLASS_STATE_TAKE) |
| | | ); |
| | | } |
| | | } |
| | |
| | | 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; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | @SpringBootApplication |
| | | @MapperScan("com.mes.*.mapper") |
| | | @EnableDiscoveryClient |
| | | @EnableSwagger2 |
| | | @EnableSwagger2WebMvc |
| | | @EnableScheduling |
| | | public class CacheGlassModuleApplication { |
| | | |
| | |
| | | //加笼子里面是否有玻璃,有先出,无玻璃先进 |
| | | boolean outFlase = outTo(Integer.parseInt(out08Glassstate), |
| | | Integer.parseInt(out10Glassstate), confirmationWrodAddress, glassIdeValue, Integer.parseInt(currentSlot)); |
| | | log.info("出片任务是否完成:{},失败且玻璃id:{}不为空则执行进片任务", outFlase, glassIdeValue); |
| | | log.info("出片任务是否完成:{},且玻璃id:{}不为空则执行进片任务", outFlase, glassIdeValue); |
| | | if (!outFlase && StringUtils.isNotBlank(glassIdeValue)) { |
| | | inTo(glassIdeValue, confirmationWrodAddress, currentSlot); |
| | | } |
| | |
| | | active: dev |
| | | application: |
| | | name: cacheGlass |
| | | liquibase: |
| | | enabled: false |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | |
| | | 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; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | */ |
| | | @Slf4j |
| | | @SpringBootApplication |
| | | @EnableSwagger2 |
| | | @EnableSwagger2WebMvc |
| | | @EnableDiscoveryClient |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | | @EnableScheduling |
| | |
| | | package com.mes.bigstorage.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | return Result.build(200, "查询成功", flowCardIdCount); |
| | | } |
| | | |
| | | @ApiOperation("指定流程卡") |
| | | @PostMapping("/appointFlowCard") |
| | | public Result appointFlowCard(@RequestBody BigStorageCageDetails bigStorageCageDetails) { |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList=bigStorageCageDetailsService.list( |
| | | new LambdaQueryWrapper<BigStorageCageDetails>() |
| | | .eq(BigStorageCageDetails::getState,Const.GLASS_STATE_ARTIFICIAL) |
| | | ); |
| | | if(bigStorageCageDetailsList.size()==0){ |
| | | bigStorageCageDetailsService.update( |
| | | new LambdaUpdateWrapper<BigStorageCageDetails>() |
| | | .set(BigStorageCageDetails::getState,Const.GLASS_STATE_ARTIFICIAL) |
| | | .eq(BigStorageCageDetails::getFlowCardId,bigStorageCageDetails.getFlowCardId()) |
| | | .eq(BigStorageCageDetails::getLayer,bigStorageCageDetails.getLayer()) |
| | | .eq(BigStorageCageDetails::getState,Const.GLASS_STATE_IN) |
| | | ); |
| | | return Result.build(200, "指定流程卡成功", 1); |
| | | }else{ |
| | | return Result.build(200, "指定流程卡成功", 1); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | * 工程号 |
| | | */ |
| | | @ApiModelProperty(value = "层", position = 17) |
| | | private String layer; |
| | | private int layer; |
| | | |
| | | /** |
| | | * 进片任务 |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | |
| | | public void plcToHomeEdgFreeCarTask() { |
| | | Date startDate = new Date(); |
| | | log.info("大理片笼空车进片任务开始执行时间:{}", startDate); |
| | | PlcParameterObject plcMesObject = S7object.getinstance().PlcMesObject; |
| | | String mesD03Address = plcMesObject.getPlcParameter("MESToD03").getValue(); |
| | | String mesD05Address = plcMesObject.getPlcParameter("MESToD05").getValue(); |
| | | log.info("MESToD03:{},MESToD05:{}", mesD03Address, mesD05Address); |
| | | if ("2".equals(mesD03Address) || "2".equals(mesD05Address)) { |
| | | log.info("有启动信号,MESToD03:{},MESToD05:{}", mesD03Address, mesD05Address); |
| | | } |
| | | PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; |
| | | String e01Status = plcParameterObject.getPlcParameter("E01State").getValue(); |
| | | String d03ToMES = plcParameterObject.getPlcParameter("D03ToMES").getValue(); |
| | |
| | | if (glassCount < inCarMaxSize) { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightFirst); |
| | | } else { |
| | | if (glassCount < inCarMaxSize + 1) { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst); |
| | | } else { |
| | | return Boolean.FALSE; |
| | | } |
| | | } |
| | | } else { |
| | | flag = Boolean.FALSE; |
| | |
| | | if (remainWidth >= widthFirst) { |
| | | if (remainWidth - widthFirst - glassGap >= widthSecond) { |
| | | if (glassCount < inCarMaxSize) { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightSecond); |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst, heightFirst); |
| | | } else { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightSecond); |
| | | if (glassCount < inCarMaxSize + 1) { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst); |
| | | } else { |
| | | return Boolean.FALSE; |
| | | } |
| | | } |
| | | } else { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightSecond); |
| | | if (glassCount < inCarMaxSize + 1) { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_RUN, widthFirst, heightFirst); |
| | | } else { |
| | | return Boolean.FALSE; |
| | | } |
| | | } |
| | | } else { |
| | | flag = Boolean.FALSE; |
| | |
| | | bigStorageCageFeedTask.setWidth(width); |
| | | bigStorageCageFeedTask.setHeight(height); |
| | | bigStorageCageFeedTask.setCreateTime(new Date()); |
| | | //删除理片笼表拿走/破损数据数据 |
| | | damageService.deleteByGlassId(glassId); |
| | | return bigStorageCageFeedTaskService.save(bigStorageCageFeedTask); |
| | | } |
| | | |
| | |
| | | active: cz |
| | | application: |
| | | name: cacheVerticalGlass |
| | | liquibase: |
| | | enabled: false |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | |
| | | 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; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | */ |
| | | @Slf4j |
| | | @SpringBootApplication |
| | | @EnableSwagger2 |
| | | @EnableSwagger2WebMvc |
| | | @EnableDiscoveryClient |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | | @EnableScheduling |
| | |
| | | active: dev |
| | | application: |
| | | name: glassStorage |
| | | liquibase: |
| | | enabled: false |
| | | |
| | | |
| | | mybatis-plus: |
| | |
| | | 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; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | */ |
| | | @Slf4j |
| | | @SpringBootApplication |
| | | @EnableSwagger2 |
| | | @EnableSwagger2WebMvc |
| | | @EnableDiscoveryClient |
| | | @EnableScheduling |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | |
| | | active: dev |
| | | application: |
| | | name: loadGlass |
| | | liquibase: |
| | | enabled: false |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | |
| | | 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; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | */ |
| | | @Slf4j |
| | | @SpringBootApplication |
| | | @EnableSwagger2 |
| | | @EnableSwagger2WebMvc |
| | | @EnableDiscoveryClient |
| | | @EnableScheduling |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | |
| | | active: dev |
| | | application: |
| | | name: temperingGlass |
| | | liquibase: |
| | | enabled: true |
| | | change-log: classpath:changelog/changelog.sql |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
New file |
| | |
| | | --liquibase formatted sql |
| | | |
| | | --changeset zsh:20240904001 |
| | | --preconditions onFail:CONTINUE onError:CONTINUE |
| | | --precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_dict_type'; |
| | | CREATE TABLE sys_dict_type |
| | | ( |
| | | dict_id BIGINT AUTO_INCREMENT PRIMARY KEY, |
| | | dict_name VARCHAR(32) NOT NULL, |
| | | dict_type VARCHAR(32) NOT NULL, |
| | | state CHAR(1) NOT NULL DEFAULT TRUE, |
| | | description VARCHAR(32), |
| | | create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, |
| | | deleted char(1) DEFAULT 0 |
| | | ); |
| | | --rollback DROP TABLE sys_dict_type; |
| | | |
| | | --changeset zsh:20240904002 |
| | | --preconditions onFail:CONTINUE onError:CONTINUE |
| | | --precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'sys_dict_data'; |
| | | CREATE TABLE sys_dict_data |
| | | ( |
| | | dict_id BIGINT AUTO_INCREMENT PRIMARY KEY, |
| | | dict_sort INT NOT NULL, |
| | | dict_label VARCHAR(32) NOT NULL, |
| | | dict_value VARCHAR(32) NOT NULL, |
| | | dict_type VARCHAR(32) NOT NULL, |
| | | dict_type_value varchar(32), |
| | | state CHAR(1) NOT NULL DEFAULT TRUE, |
| | | description VARCHAR(32), |
| | | create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, |
| | | deleted char(1) DEFAULT 0 |
| | | ); |
| | | --rollback DROP TABLE sys_dict_data; |
| | | |
| | | |
| | | --changeset zsh:20240904003 |
| | | --preconditions onFail:CONTINUE onError:CONTINUE |
| | | --precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM sys_dict_type WHERE dict_type in ('clearGlass', 'silver', 'doubleSilver', 'thirdSilver', 'ultraClear', 'heatReflect'); |
| | | INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted) |
| | | VALUES ('白玻', 'clearGlass', '1', '0', '0'); |
| | | INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted) |
| | | VALUES ('单银', 'silver', '1', '1', '0'); |
| | | INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted) |
| | | VALUES ('双银', 'doubleSilver', '1', '2', '0'); |
| | | INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted) |
| | | VALUES ('三银', 'thirdSilver', '1', '3', '0'); |
| | | INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted) |
| | | VALUES ('超白', 'ultraClear', '1', '4', '0'); |
| | | INSERT INTO sys_dict_type (dict_name, dict_type, state, description, deleted) |
| | | VALUES ('热反射', 'heatReflect', '1', '5', '0'); |
| | | --rollback DELETE FROM sys_dict_type WHERE dict_type in ('clearGlass', 'silver', 'doubleSilver', 'thirdSilver', 'ultraClear', 'heatReflect'); |
| | | |
| | | --changeset zsh:20240904004 |
| | | --preconditions onFail:CONTINUE onError:CONTINUE |
| | | --precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM sys_dict_data WHERE dict_type in ('clearGlass', 'silver', 'doubleSilver', 'thirdSilver', 'ultraClear', 'heatReflect'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (1, '白玻', 'clearGlass', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (2, '超白', 'ultraClear', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (3, '来料白玻', 'incomingClearGlass', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (4, '欧州茶', 'europeTeaColor', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (5, '水晶灰', 'cristalGrey', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (6, '灰玻', 'grayGlass', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (7, '灰镀膜', 'grayCoating', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (8, '磨砂', 'frosted', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (9, '福特蓝', 'fordBlue', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (10, '福特蓝镀膜', 'fordBlueCoating', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (11, '蓝星灰', 'blueAstralGrey', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (12, '蓝玻', 'blueGlass', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (13, '超白长虹', 'ultraClearChanghong', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (14, '金晶灰', 'jinjinGrey', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (15, '金晶灰茶', 'jinjinTeaGrey', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (16, '镀膜', 'coatingFilm', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (17, '长虹', 'clearGlassChanghong', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (18, '阳光膜', 'solorControl', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (19, '高反底透', 'arGlass', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (20, '高白', 'arClear', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (21, '黑玻', 'blackGlass', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (22, '玉砂', 'emery', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (23, '超白磨砂', 'ultraClearFrosted', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (24, '金茶玻', 'goldenTea', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (25, '蓝灰镀膜', 'blueGraycoatingFilm', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (26, '单项透视', 'onePoint', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (27, '超白镀膜', 'ultraClearCoatingFilm', '白玻', '0', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (1, 'F绿', 'fGreen', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (2, 'F绿lowe', 'fGreenLowe', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (3, 'F绿镀膜', 'fGreenCoating', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (4, 'Low-e', 'lowe', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (5, 'super52', 'super52', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (6, '中玻在线', 'zgOnlineGlass', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (7, '北玻60离线lowe', 'ng60OfflineLowe', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (8, '南玻在线lowe', 'csgOnlineLowe', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (9, '台玻81A', 'tg81a', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (10, '台玻lowe70', 'tgLowe70', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (11, '台玻LOWE78', 'tgLowe78', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (12, '河北金瑞lowe80', 'hbJinruiLowe80', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (13, '福特蓝lowe', 'fordBlueLowe', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (14, '福莱特FXB60', 'flatFxb60', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (15, '福莱特lowe60', 'flatLowe60', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (16, '福莱特lowe70', 'flatLowe70', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (17, '福莱特lowe80', 'flatLowe80', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (18, '耀皮在线LOWE', 'sypOnlineLowe', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (19, '超白Lowe', 'ultraClearLowe', '单银', '1', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (1, '双银lowe', 'doubleSilverLowe', '双银', '2', '1', '1', '0'); |
| | | INSERT INTO sys_dict_data(dict_sort, dict_label, dict_value, dict_type, dict_type_value, state, description, deleted) |
| | | VALUES (2, '超白双银Lowe', 'ultraDoubleSilverLowe', '双银', '2', '1', '1', '0'); |
| | | --rollback DELETE FROM sys_dict_data WHERE dict_type in ('clearGlass', 'silver', 'doubleSilver', 'thirdSilver', 'ultraClear', 'heatReflect'); |
| | | |
| | | |
| | | |
| | |
| | | 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; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | */ |
| | | @Slf4j |
| | | @SpringBootApplication |
| | | @EnableSwagger2 |
| | | @EnableSwagger2WebMvc |
| | | @EnableDiscoveryClient |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | | @EnableScheduling |
| | |
| | | @ApiOperation("新增虚拟工位") |
| | | @PostMapping("/insertDownWorkstation") |
| | | public Result insertDownWorkstation() { |
| | | DownWorkstation downWorkstation = new DownWorkstation(); |
| | | downWorkstation.setTotalQuantity(0); |
| | | downWorkstation.setRacksNumber(0); |
| | | downWorkstation.setOtherNumber(0); |
| | | downWorkstation.setDeviceId(3); |
| | | downWorkstation.setEnableState(1); |
| | | downWorkstation.setWorkState(1); |
| | | downWorkstationService.save(downWorkstation); |
| | | downWorkstationService.insertDownWorkstation(); |
| | | return Result.build(200, "新增成功", 1); |
| | | } |
| | | |
| | |
| | | String closeAlarmSignal(); |
| | | |
| | | void autoPrint(Boolean flag); |
| | | |
| | | void insertDownWorkstation(); |
| | | } |
| | |
| | | .set("layer", layer) |
| | | .set("other_number", otherNumber) |
| | | .eq("workstation_id", workstationId); |
| | | // .eq("id", workstationId); |
| | | |
| | | this.update(updateWrapper); |
| | | |
| | |
| | | redisUtil.setCacheObject("autoPrint", flag); |
| | | } |
| | | |
| | | @Override |
| | | public void insertDownWorkstation() { |
| | | DownWorkstation downWorkstation = new DownWorkstation(); |
| | | downWorkstation.setWorkstationId(7); |
| | | downWorkstation.setTotalQuantity(0); |
| | | downWorkstation.setRacksNumber(0); |
| | | downWorkstation.setOtherNumber(0); |
| | | downWorkstation.setDeviceId(3); |
| | | downWorkstation.setEnableState(1); |
| | | downWorkstation.setWorkState(1); |
| | | baseMapper.insert(downWorkstation); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | List<String> glassList = downGlassTaskList.stream().map(DownGlassTask::getGlassId).collect(Collectors.toList()); |
| | | //将任务表中的数据删除 |
| | | downGlassTaskService.remove(new LambdaQueryWrapper<DownGlassTask>().in(DownGlassTask::getTaskType, Const.GLASS_CACHE_TYPE_OUT_ALL).in(DownGlassTask::getGlassId, glassList)); |
| | | //清除下片玻璃信息表数据 |
| | | downGlassInfoService.remove(new LambdaQueryWrapper<DownGlassInfo>().in(DownGlassInfo::getGlassId, glassList)); |
| | | //下片数量-1 |
| | | for (DownGlassTask downGlassTask : downGlassTaskList |
| | | ) { |
| | | if (Const.GLASS_CACHE_TYPE_OUT_ALL.equals(downGlassTask.getTaskType())) { |
| | | downWorkstationService.update( |
| | | new LambdaUpdateWrapper<DownWorkstation>() |
| | | .setSql("racks_number = racks_number-1") |
| | | .eq(DownWorkstation::getWorkstationId, downGlassTask.getEndCell()) |
| | | ); |
| | | |
| | | } |
| | | } |
| | | List<Damage> damageList = downGlassTaskList.stream().map(e -> { |
| | | Damage damage = new Damage(); |
| | | damage.setGlassId(e.getGlassId()); |
| | |
| | | log.info("有空架子,将流程卡与架子好绑定,执行进片任务 结束"); |
| | | //绑定流程卡 |
| | | downWorkstationService.updateFlowCardIdAndCount(glassInfo.getFlowCardId(), list.get(0).getWorkstationId(), glassInfo.getLayer()); |
| | | // downWorkstationService.updateFlowCardIdAndCount(glassInfo.getFlowCardId(), list.get(0).getId(), glassInfo.getLayer()); |
| | | checkFlag = Boolean.TRUE; |
| | | } |
| | | } |
| | |
| | | downStorageCageDetailsService.save(downStorageCageDetails); |
| | | // 生成进片任务 |
| | | initDownGlassTask(glassInfo, 0, nearestEmpty.getSlot(), Const.GLASS_CACHE_TYPE_IN); |
| | | //删除理片笼表拿走/破损数据数据 |
| | | damageService.deleteByGlassId(glassInfo.getGlassId()); |
| | | } |
| | | |
| | | public Boolean outTo(String glassStatus06, String out08Glassstate, String glassStatus11, String |
| | |
| | | if (null != emptyDownWorkstation) { |
| | | log.info("获取到空架子信息,绑定流程卡"); |
| | | downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getWorkstationId(), downStorageCageDetails.getLayer()); |
| | | // downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getId(), downStorageCageDetails.getLayer()); |
| | | endCell = emptyDownWorkstation.getWorkstationId(); |
| | | } else { |
| | | //todo:增加虚拟工位,绑定流程卡 |
| | | // downWorkstationService.insertDownWorkstation(); |
| | | // endCell = Const.G13_WORK_STATION; |
| | | // downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getId(), downStorageCageDetails.getLayer()); |
| | | log.info("没有空架子信息,无法绑定流程卡"); |
| | | return Boolean.FALSE; |
| | | } |
| | |
| | | //生成任务信息 |
| | | GlassInfo glassInfo = new GlassInfo(); |
| | | BeanUtils.copyProperties(downStorageCageDetails, glassInfo); |
| | | //删除理片笼表拿走/破损数据数据 |
| | | damageService.deleteByGlassId(glassInfo.getGlassId()); |
| | | return initDownGlassTask(glassInfo, downStorageCageDetails.getSlot(), endCell, taskType); |
| | | } |
| | | |
| | |
| | | package com.mes.job;
|
| | |
|
| | | import cn.hutool.json.JSONObject;
|
| | | import cn.smallbun.screw.core.util.CollectionUtils;
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
| | | import com.mes.common.config.Const;
|
| | |
| | | import com.mes.downstorage.service.DownStorageCageService;
|
| | | import com.mes.downworkstation.entity.DownWorkstation;
|
| | | import com.mes.downworkstation.service.DownWorkstationService;
|
| | | import com.mes.glassinfo.entity.GlassInfo;
|
| | | import com.mes.glassinfo.service.GlassInfoService;
|
| | | import com.mes.tools.DateUtil;
|
| | | import com.mes.tools.WebSocketServer;
|
| | | import lombok.extern.slf4j.Slf4j;
|
| | | import org.apache.commons.lang.StringUtils;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.beans.factory.annotation.Value;
|
| | | import org.springframework.scheduling.annotation.Scheduled;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import java.io.BufferedReader;
|
| | | import java.io.InputStreamReader;
|
| | | import java.net.Socket;
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
| | | private DownGlassInfoService downGlassInfoService;
|
| | | @Autowired
|
| | | private DownGlassTaskService downGlassTaskService;
|
| | | @Autowired
|
| | | private GlassInfoService glassInfoService;
|
| | |
|
| | | @Value("${mes.scan.ip}")
|
| | | private String scanIp;
|
| | |
|
| | | @Value("${mes.scan.port}")
|
| | | private Integer scanPort;
|
| | |
|
| | | @Autowired
|
| | | private RedisUtil redisUtil;
|
| | |
| | | new QueryWrapper<DownGlassTask>()
|
| | | .select("Top 1 *")
|
| | | .eq("end_cell", Const.G13_WORK_STATION)
|
| | | .lt("task_status", Const.UNLOAD_GLASS_DOWN)
|
| | | .orderByDesc("id")
|
| | |
|
| | | );
|
| | | jsonObject4.append("takeGlass", takeGlass);
|
| | |
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | @Scheduled(fixedDelay = Long.MAX_VALUE)
|
| | | public void scanCodeTask() {
|
| | | log.info("扫描任务已启动");
|
| | | while (true) {
|
| | | new Thread(() -> {
|
| | | try (Socket socket = new Socket(scanIp, scanPort);
|
| | | BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()))) {
|
| | | // 接收服务器响应
|
| | | String response;
|
| | | log.info("等待扫码中......");
|
| | | while ((response = in.readLine()) != null) {
|
| | | log.info("扫描到的玻璃id:{}", response);
|
| | | List<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("scanCode");
|
| | | if (CollectionUtils.isNotEmpty(sendwServer)) {
|
| | | //按照玻璃id获取玻璃信息返回给前端界面,具体需要哪些数据待确认
|
| | | GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>()
|
| | | .eq(GlassInfo::getGlassId, response).last("limit 1"));
|
| | | if (null == glassInfo) {
|
| | | log.info("按照玻璃id:{},无法找到玻璃信息", response);
|
| | | } else {
|
| | | sendwServer.get(0).sendMessage(glassInfo.toString());
|
| | | }
|
| | | }
|
| | | }
|
| | | } catch (Exception exception) {
|
| | | log.info("读取异常,原因为{}", exception.getMessage());
|
| | | }
|
| | | }).start();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | active: dev |
| | | application: |
| | | name: unLoadGlass |
| | | liquibase: |
| | | enabled: false |
| | | |
| | | |
| | | mybatis-plus: |
| | |
| | | throughWidth: 3000 |
| | | throughHeight: 2500 |
| | | threshold: 5 #下片的最大阈值 |
| | | scan: |
| | | ip: 127.0.0.1 |
| | | port: 5000 |
| | |
| | | <type>pom</type> |
| | | <scope>import</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.plugin</groupId> |
| | | <artifactId>spring-plugin-core</artifactId> |
| | | <version>2.0.0.RELEASE</version> |
| | | </dependency> |
| | | </dependencies> |
| | | </dependencyManagement> |
| | | |