jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/package.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/api/main/om/productionOrde/productionOrde.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/views/main/kb/BalanceShaft/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/views/main/kb/crankshaft/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/views/main/om/productionOrde/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -81,18 +81,18 @@ /** * 获取生产工单详细信息 */ // @PreAuthorize("@ss.hasPermi('om:productionOrde:query')") // @GetMapping(value = "/{id}") // public AjaxResult getInfo(@PathVariable("id") Long id) // { // return success(omProductionOrdeInfoService.selectOmProductionOrdeInfoById(id)); // } @PreAuthorize("@ss.hasPermi('om:productionOrde:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(omProductionOrdeInfoService.selectOmProductionOrdeInfoById(id)); } /** * 获取生产工单详细信息 */ @PreAuthorize("@ss.hasPermi('om:productionOrde:query')") @GetMapping("/{ids}") @GetMapping("/ids/{ids}") public AjaxResult getInfo(@PathVariable Long[] ids) { return success(omProductionOrdeInfoService.selectOmProductionOrdeInfoByIds(ids)); @@ -115,6 +115,7 @@ @PostMapping("/orderSchedulingForBoxCode") public AjaxResult addOrderSchedulingForBoxCode(@RequestBody OmProductionOrdeInfo omProductionOrdeInfo) { //获取当前时间 LocalDateTime date= LocalDateTime.now(); //创建日期时间对象格式化器,日期格式类似: 2023-05-23 22:18:38 @@ -122,42 +123,45 @@ //将时间转化为对应格式的字符串 String fomateDate=date.format(formatter).toString(); Integer startCode = Integer.parseInt(omProductionOrdeInfo.getStartCode());//开始编号 Integer planQty = Math.toIntExact(omProductionOrdeInfo.getPlanQty());//计划数量 String dateTimeRule = omProductionOrdeInfo.getDateTimeRule(); String engineNo = ""; if(planQty>0) { for (int i = 0; i < planQty; i++) { engineNo = omProductionOrdeInfo.getTypeZ() + " " + dateTimeRule + StringUtils.leftPad(String.valueOf(startCode), 3, "0"); BsOrderScheduling bsOrderScheduling = new BsOrderScheduling(); bsOrderScheduling.setOrderNo(omProductionOrdeInfo.getWorkOrderNo()); bsOrderScheduling.setModel(omProductionOrdeInfo.getTypeZ()); bsOrderScheduling.setEngineNo(engineNo); bsOrderScheduling.setProductionStatus("1"); bsOrderScheduling.setOperator(getUserName()); bsOrderScheduling.setOperateTime(fomateDate); bsOrderScheduling.setProductType(omProductionOrdeInfo.getTypeL());//产品类型 bsOrderScheduling.setWhetherOrPrint("0"); bsOrderSchedulingService.insertBsOrderScheduling(bsOrderScheduling); startCode++; Long[] id=omProductionOrdeInfo.getIdNums(); OmProductionOrdeInfo ProductionOrde; for (int a=0;a<id.length;a++){ ProductionOrde=omProductionOrdeInfoService.selectOmProductionOrdeInfoById(id[a]); Integer planQty = Math.toIntExact(ProductionOrde.getPlanQty());//计划数量 String engineNo = ""; if(planQty>0) { for (int i = 0; i < planQty; i++) { engineNo = omProductionOrdeInfo.getTypeZ() + " " + dateTimeRule + StringUtils.leftPad(String.valueOf(startCode), 3, "0"); BsOrderScheduling bsOrderScheduling = new BsOrderScheduling(); bsOrderScheduling.setOrderNo(ProductionOrde.getWorkOrderNo()); bsOrderScheduling.setModel(ProductionOrde.getTypeZ()); bsOrderScheduling.setEngineNo(engineNo); bsOrderScheduling.setProductionStatus("1"); bsOrderScheduling.setOperator(getUserName()); bsOrderScheduling.setOperateTime(fomateDate); bsOrderScheduling.setProductType(ProductionOrde.getTypeL());//产品类型 bsOrderScheduling.setWhetherOrPrint("0"); bsOrderSchedulingService.insertBsOrderScheduling(bsOrderScheduling); startCode++; } } //新增机型序号 BsModelNumber bsModelNumber = new BsModelNumber(); bsModelNumber.setModel(omProductionOrdeInfo.getTypeZ()); bsModelNumber.setModelDate(dateTimeRule); bsModelNumber.setMaxnumValue((startCode - 1) + ""); bsModelNumber.setSaveTime(fomateDate); bsModelNumber.setLastNumber((startCode - 1) + ""); bsModelNumberService.insertBsModelNumber(bsModelNumber); //更新工单状态 ProductionOrde.setOrderStatus("2"); omProductionOrdeInfoService.updateOmProductionOrdeInfo(ProductionOrde); } //更新工单状态 omProductionOrdeInfo.setOrderStatus("2"); return toAjax(omProductionOrdeInfoService.updateOmProductionOrdeInfo(omProductionOrdeInfo)); //新增机型序号 BsModelNumber bsModelNumber = new BsModelNumber(); bsModelNumber.setModel(omProductionOrdeInfo.getTypeZ()); bsModelNumber.setModelDate(dateTimeRule); bsModelNumber.setMaxnumValue((startCode - 1) + ""); bsModelNumber.setSaveTime(fomateDate); bsModelNumber.setLastNumber((startCode - 1) + ""); bsModelNumberService.insertBsModelNumber(bsModelNumber); return toAjax(1); } /** jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
@@ -63,7 +63,7 @@ bsTechnologyRouteChildInfoService); miloService.subscriptionFromOpcUa(collect,opcUaSubscription); miloService.subscriptionFromOpcUa(collect,100,opcUaSubscription); } jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -206,6 +206,9 @@ OPCUaSubscription.miloService.writeToOpcUa(entity3);//写SN ReadWriteEntity entity5 = new ReadWriteEntity("CFL4HX.HOP020.PrintCode2", printcode[1]); OPCUaSubscription.miloService.writeToOpcUa(entity5);//写SN ReadWriteEntity entity6 = new ReadWriteEntity("CFL4HX.HOP020.SNDoor", "1"); logger.info("发动机号{},请求打码内容写入成功,返回SNDoor信号信号1",SNCode); miloService.writeToOpcByte(entity6); } System.out.println(entity); jcdm-main/src/main/resources/mapper/da/paramCollection/DaParamCollectionMapper.xml
@@ -49,6 +49,7 @@ <if test="paramValue != null and paramValue != ''"> and param_value = #{paramValue}</if> <if test="dateConditions != null and dateConditions != ''"> and collection_time BETWEEN #{startTime} AND #{endTime}</if> </where> ORDER BY id DESC </select> <select id="selectDaParamCollectionById" parameterType="Long" resultMap="DaParamCollectionResult"> jcdm-main/src/main/resources/mapper/da/passingStationCollection/DaPassingStationCollectionMapper.xml
@@ -48,6 +48,7 @@ <if test="outRsSign != null "> and out_rs_sign = #{outRsSign}</if> <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> and outbound_time between #{startTime} and #{endTime}</if> </where> ORDER BY id DESC </select> <select id="selectDaPassingStationCollectionById" parameterType="Long" resultMap="DaPassingStationCollectionResult"> jcdm-ui/package.json
@@ -73,6 +73,7 @@ "eslint": "7.15.0", "eslint-plugin-vue": "7.2.0", "lint-staged": "10.5.3", "qrcodejs2": "^0.0.2", "runjs": "4.4.2", "sass": "1.32.13", "sass-loader": "10.1.1", jcdm-ui/src/api/main/om/productionOrde/productionOrde.js
@@ -33,6 +33,13 @@ }) } export function getProductionOrdes(ids) { return request({ url: '/om/productionOrde/ids/' + ids, method: 'get' }) } // 新增订单排产 export function addOrderSchedulingForBoxCode(data) { return request({ jcdm-ui/src/views/main/kb/BalanceShaft/index.vue
@@ -1,5 +1,12 @@ <template> <div class="app-container"> <el-card class="box-card" style="height: 60px" > <template> <div class="container" type="flex" justify="center" style="text-align:center"> <el-divider><span style="font-size:30px;color:black"><strong>平衡轴扫码上线</strong></span></el-divider> </div> </template> </el-card> <el-row :gutter="3"> <el-col :span="6"> <el-card shadow="always" class="boxSize"> jcdm-ui/src/views/main/kb/crankshaft/index.vue
@@ -3,11 +3,7 @@ <el-card class="box-card" style="height: 60px" > <template> <div class="container" type="flex" justify="center" style="text-align:center"> <!-- <el-row type="flex" justify="center" style="text-align:center;height: 12px" >--> <!-- <el-col type="flex" justify="center" :span="14" style="text-align:center">--> <el-divider><span style="font-size:30px;color:black"><strong>曲轴码扫码上线</strong></span></el-divider> <!-- </el-col>--> <!-- </el-row>--> <el-divider><span style="font-size:30px;color:black"><strong>曲轴扫码上线</strong></span></el-divider> </div> </template> </el-card> @@ -67,6 +63,8 @@ <span class="el-icon-thumb" style="font-size:40px;color:black"></span> <span style="font-size:45px;color:black"><strong>强制上线</strong></span> </el-button> <!-- <el-button @click="print">打印</el-button>--> <!-- <el-button @click="test1">生成二维码</el-button>--> </el-col> </el-row> </el-card> @@ -98,6 +96,7 @@ import {listLineInfo} from "@/api/main/bs/lineInfo/lineInfo"; import { setSNCode } from "@/api/main/da/opcuaconfig/opcuaconfig"; import {getIp, listStationConf} from "@/api/main/sc/stationConf"; import QRCode from "qrcodejs2"; export default { components: { }, @@ -213,6 +212,40 @@ parseQRCode(code) { this.form.engineNo = code; }, // print() { // 本页面直接打印(有bug单岁先不要删) // let oldStr = window.document.body.innerHTML; // let newStr = document.getElementById('printMe').innerHTML; // document.body.innerHTML = newStr; // window.print(); // document.body.innerHTML = oldStr; // return false; // 新开页面打印 // document.getElementById('canvasWrapper').innerHTML = ''; // let newStr = document.getElementById('printMe').innerHTML; // let newWin = window.open('', '_blank'); // newWin.document.body.innerHTML = newStr; // newWin.print(); // return false; // }, // test1(){ // document.getElementById('canvasWrapper').innerHTML = '' // this.$nextTick(() => { // let qrCode = new QRCode('canvasWrapper',{ // width: 80, // height: 80, // padding: 0, // margin: 0, // // text: this.packCode, // text:"88888", // colorDark: '#000', // colorLight: '#fff' // }) // }) // // console.log(this.packCode) // // this.print() // }, }, } jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -9,6 +9,9 @@ <el-form-item label-width="80" label="生产订单" prop="workOrderNo"> <el-input v-model="queryParams.workOrderNo" placeholder="请输入生产订单" clearable @keyup.enter.native="handleQuery"/> </el-form-item> <el-form-item style="margin-left: 14px" label="产品编号" prop="productCode"> <el-input v-model="queryParams.productCode" placeholder="请输入产品编号" clearable @keyup.enter.native="handleQuery"/> </el-form-item> <!-- <el-form-item label="产品名称" prop="productName">--> <!-- <el-input v-model="queryParams.productName" placeholder="请输入产品名称" clearable @keyup.enter.native="handleQuery"/>--> <!-- </el-form-item>--> @@ -28,9 +31,6 @@ </el-form-item> </el-form> <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="advancedShowSearch" label-width="68px"> <el-form-item style="margin-left: 14px" label="产品编号" prop="productCode"> <el-input v-model="queryParams.productCode" placeholder="请输入产品编号" clearable @keyup.enter.native="handleQuery"/> </el-form-item> <el-form-item label="机型" prop="typeZ"> <el-input v-model="queryParams.typeZ" placeholder="请输入机型" clearable @keyup.enter.native="handleQuery"/> </el-form-item> @@ -323,7 +323,7 @@ import { listProductBom } from "@/api/main/bs/ProductBom/ProductBom"; import { listTechnologyRoute} from "@/api/main/bs/technologyRoute/technologyRoute"; import ItemSelect from "@/components/itemSelect/single.vue"; import { addOrderSchedulingForBoxCode,getProductionNotice, upDownMove, listProductionOrde, getProductionOrde, delProductionOrde, addProductionOrde, updateProductionOrde } from "@/api/main/om/productionOrde/productionOrde"; import { addOrderSchedulingForBoxCode,getProductionNotice, upDownMove, listProductionOrde, getProductionOrde,getProductionOrdes, delProductionOrde, addProductionOrde, updateProductionOrde } from "@/api/main/om/productionOrde/productionOrde"; import { listOrderScheduling, getOrderScheduling, @@ -699,7 +699,7 @@ this.initWorkshop(); this.reset(); const id = Row.id || this.ids getProductionOrde(id).then(response => { getProductionOrdes(id).then(response => { console.log(response.data) console.log(response.data.productCode) this.materialQueryParams.materialCode = response.data.productCode;