| | |
| | | <thead> |
| | | <tr v-for="(itemFlow,index) in item.detail" :key="index"> |
| | | <td colspan="34"> |
| | | |
| | | <div style="float: left;"><img id="img-pic" style="width: 42px;height: 32px" src="@/assets/northGlass.ico" alt=""></div> |
| | | <div id="bj" style="float: right;font-size: 28px">补 {{ id + 1 }}</div> |
| | | <div style="left: 150px">{{ company.companyName }}</div> |
| | | <div>生产流程卡</div> |
| | |
| | | labelList = a |
| | | |
| | | props.lastList.length = 0; |
| | | for (let i = 0; i < list.value.length; i++) { |
| | | let count = list.value[i].data.length |
| | | for (let j = 0; j < count; j++) { |
| | | for (let k = 0; k < list.value[i].data[j].quantity; k++) { |
| | | props.lastList.push(list.value[i].data[j]) |
| | | // 遍历列表(替换 i 为更语义化的变量名) |
| | | for (const group of list.value) { |
| | | // 遍历每组中的数据(替换 j) |
| | | for (const item of group.data) { |
| | | const { quantity, newList } = item; |
| | | // 跳过 quantity 为 0 或无效的情况 |
| | | if (!quantity || quantity <= 0) continue; |
| | | |
| | | // 处理 newList:确保是数组,不足时用空对象兜底 |
| | | const safeNewList = Array.isArray(newList) ? newList : []; |
| | | |
| | | // 循环 quantity 次,添加数据到 lastList |
| | | for (let k = 0; k < quantity; k++) { |
| | | // 深拷贝 item,避免重复引用(关键!) |
| | | const newItem = JSON.parse(JSON.stringify(item)); |
| | | |
| | | // 若 newList 有对应索引数据,填充字段;否则置空 |
| | | const listItem = safeNewList[k]; |
| | | if (listItem) { |
| | | newItem.heat_layout_sort = listItem.glass_id || ''; // 兜底空字符串 |
| | | newItem.stockPolysId = `${listItem.stock_id || ''}/${listItem.polys_id || ''}`; // 避免 undefined/ |
| | | } else { |
| | | // 无对应数据时,字段置空(避免保留原始值) |
| | | newItem.heat_layout_sort = ''; |
| | | newItem.stockPolysId = ''; |
| | | } |
| | | |
| | | // 添加到目标列表 |
| | | props.lastList.push(newItem); |
| | | } |
| | | } |
| | | } |
| | | console.log(props) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | <thead> |
| | | <tr v-for="(itemFlow,index) in item.detail" :key="index"> |
| | | <td colspan="31"> |
| | | <div style="float: left;"><input style="border: none;font-size: 28px;width: 70px;margin: 5px "/></div> |
| | | <div style="float: left;"><img id="img-pic" style="width: 42px;height: 32px" src="@/assets/northGlass.ico" alt=""><input style="border: none;font-size: 28px;width: 70px;margin: 5px "/></div> |
| | | <div id="bj" v-if="printFc=='true'" style="float: right;font-size: 28px">{{ id + 1 }}</div> |
| | | <div id="bj" v-else style="float: right;font-size: 28px"></div> |
| | | <div>{{ company.companyName }}</div> |
| | |
| | | 打印人:{{user.user.userName}} |
| | | 时间:{{formattedTime}} |
| | | |
| | | <span style="font-weight: bolder;" > |
| | | 总数量:{{itemFlow.orderQuantity}} |
| | | 总面积:{{itemFlow.orderArea}} |
| | | </span> |
| | | |
| | | <span style="font-weight: bolder;" > |
| | | 打印总数量:{{totalQuantity}} |
| | | 打印总面积:{{totalArea}} |
| | |
| | | <td rowspan='2'>图号</td> |
| | | <td rowspan='2'>编号</td> |
| | | <td rowspan="2">小片顺序</td> |
| | | <td v-if="name=='浙江巨星嘉泰新材料有限公司'" rowspan='2' style="width: 90px">宽(弧长)×高</td> |
| | | <td v-if="name=='浙江巨星嘉泰新材料有限公司'" rowspan='2' style="width: 90px">宽(弧长)*高</td> |
| | | <td v-else rowspan='2' style="width: 90px">宽*高</td> |
| | | <td rowspan='2' >数量</td> |
| | | <td rowspan='2'>面积</td> |
| | |
| | | <td>{{ itemDatile.technology_number }}</td> |
| | | <td>{{ itemDatile.child_width }}</td> |
| | | <td class="item" style="width: 60px;height: 100%;"> |
| | | <input v-model="itemDatile.quantity" style="width: 100%;height: 100%" @keyup="handleSummary()"/> |
| | | <input v-model="itemDatile.quantity" style="width: 100%;height: 100%;font-weight: bold;" @keyup="handleSummary()"/> |
| | | </td> |
| | | <td>{{ itemDatile.total_area }}</td> |
| | | <td>{{ itemDatile.perimeter }}</td> |
| | |
| | | |
| | | <tr v-for="(itemtextareas,index) in item.detail" :key="index"> |
| | | <td colspan="31" style="width: 480px;height: 150px "> |
| | | <div style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 14px;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | <div v-if="name=='浙江巨星嘉泰新材料有限公司'" style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 16px;font-weight: bold;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | <div v-else style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 14px;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | |
| | | <thead> |
| | | <tr v-for="(itemFlow,index) in item.detail" :key="index"> |
| | | <td colspan="34"> |
| | | |
| | | <div style="float: left;"><img id="img-pic" style="width: 42px;height: 32px" src="@/assets/northGlass.ico" alt=""></div> |
| | | <div id="bj" style="float: right;font-size: 28px">补 {{ id + 1 }}</div> |
| | | <div style="left: 150px">{{ company.companyName }}</div> |
| | | <div>生产流程卡</div> |
| | |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(itemtextarea,index) in item.detail" :key="index"> |
| | | <td colspan="4" rowspan="5" style="width: 480px;height: 100px "> |
| | | <div> |
| | | |
| | | </div> |
| | | </td> |
| | | |
| | | <td>完工签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | <tr> |
| | | <td>质检签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2">生产签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | </tr> |
| | | <tr v-for="(itemtextareas,index) in item.detail" :key="index"> |
| | | <td colspan="34" rowspan="6" style="width: 99%;height: 150px "> |
| | | <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 11px;text-align: left">{{itemtextareas.processing_note}}</textarea> |
| | | <div v-if="name=='浙江巨星嘉泰新材料有限公司'" style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 16px;font-weight: bold;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | <div v-else style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 14px;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | |
| | | <thead> |
| | | <tr v-for="(itemFlow,index) in item.detail" :key="index"> |
| | | <td colspan="31"> |
| | | <div style="float: left;"><input style="border: none;font-size: 28px;width: 70px;margin: 5px "/></div> |
| | | <div style="float: left;"><img id="img-pic" style="width: 42px;height: 32px" src="@/assets/northGlass.ico" alt=""><input style="border: none;font-size: 28px;width: 70px;margin: 5px "/></div> |
| | | <div id="bj" style="float: right;font-size: 28px">{{ id + 1 }}</div> |
| | | <div>{{ company.companyName }}</div> |
| | | <div>生产流程卡<span style="font-weight: bold" v-if="printProject!=null">({{ printProject }})</span></div> |
| | |
| | | } |
| | | }) |
| | | labelList = a |
| | | for (let i = 0; i < list.value.length; i++) { |
| | | let count = list.value[i].data.length |
| | | for (let j = 0; j < count; j++) { |
| | | if (detailType==0){ |
| | | for (let k = 0; k < list.value[i].data[j].quantity; k++) { |
| | | props.lastList.push(list.value[i].data[j]) |
| | | // 遍历列表(替换 i 为更语义化的变量名) |
| | | for (const group of list.value) { |
| | | // 遍历每组中的数据(替换 j) |
| | | for (const item of group.data) { |
| | | const { quantity, newList } = item; |
| | | // 跳过 quantity 为 0 或无效的情况 |
| | | if (!quantity || quantity <= 0) continue; |
| | | |
| | | // 处理 newList:确保是数组,不足时用空对象兜底 |
| | | const safeNewList = Array.isArray(newList) ? newList : []; |
| | | |
| | | // 循环 quantity 次,添加数据到 lastList |
| | | for (let k = 0; k < quantity; k++) { |
| | | // 深拷贝 item,避免重复引用(关键!) |
| | | const newItem = JSON.parse(JSON.stringify(item)); |
| | | |
| | | // 若 newList 有对应索引数据,填充字段;否则置空 |
| | | const listItem = safeNewList[k]; |
| | | if (listItem) { |
| | | newItem.heat_layout_sort = listItem.glass_id || ''; // 兜底空字符串 |
| | | newItem.stockPolysId = `${listItem.stock_id || ''}/${listItem.polys_id || ''}`; // 避免 undefined/ |
| | | } else { |
| | | // 无对应数据时,字段置空(避免保留原始值) |
| | | newItem.heat_layout_sort = ''; |
| | | newItem.stockPolysId = ''; |
| | | } |
| | | |
| | | } |
| | | else { |
| | | for (let k = 0; k < list.value[i].data[j].quantity; k++) { |
| | | props.lastList.push(list.value[i].data[j]) |
| | | } |
| | | // 添加到目标列表 |
| | | props.lastList.push(newItem); |
| | | } |
| | | } |
| | | } |
| | |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(itemtextarea,index) in item.detail" :key="index"> |
| | | <td colspan="4" rowspan="5" style="width: 480px;height: 100px "> |
| | | <div> |
| | | |
| | | </div> |
| | | </td> |
| | | |
| | | <td>完工签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | <tr> |
| | | <td>质检签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2">生产签名</td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | </tr> |
| | | <tr v-for="(itemtextareas,index) in item.detail" :key="index"> |
| | | <td colspan="34" rowspan="6" style="width: 99%;height: 150px "> |
| | | <div style="width: 100%;height: 100%;"><textarea style="height: 99%;width: 99%;border: none;;font-size: 12px;text-align: left">{{itemtextareas.processing_note}}</textarea> |
| | | <div v-if="name=='浙江巨星嘉泰新材料有限公司'" style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 16px;font-weight: bold;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | <div v-else style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 14px;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | |
| | | let result = ref(null) |
| | | let props = defineProps({ |
| | | rowIndex:null, |
| | | orderId:null |
| | | orderId:null, |
| | | state:null |
| | | }) |
| | | |
| | | const form = reactive({ |
| | |
| | | type="primary" |
| | | :loading="converting" |
| | | @click="loadSupportedFormats" |
| | | :disabled="!form.format" |
| | | :disabled="!form.format || props.state !== 1 || converting" |
| | | > |
| | | <template #icon> |
| | | <el-icon><MagicStick /></el-icon> |
| | |
| | | </el-button> |
| | | |
| | | <el-button @click="handleReset" |
| | | :loading="converting"> |
| | | :loading="converting" |
| | | :disabled="props.state !== 1 || converting"> |
| | | <template #icon> |
| | | <el-icon><RefreshLeft /></el-icon> |
| | | </template> |
| | |
| | | </el-button> |
| | | <el-button |
| | | @click = 'deleteFile' |
| | | :disabled="props.state !== 1" |
| | | ><template #icon> |
| | | <el-icon><Delete /></el-icon> |
| | | </template> |
| | |
| | | component: () => import('../components/pp/TagStyleDesigner.vue'), |
| | | }, |
| | | { |
| | | path: 'printProjectDetailSmallPiece', |
| | | name: 'printProjectDetailSmallPiece', |
| | | component: () => import('../views/pp/processCard/PrintProjectDetailSmallPiece.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/processCard/selectProcessCard' |
| | | } |
| New file |
| | |
| | | <script setup> |
| | | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {useRouter} from 'vue-router' |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {VXETable} from "vxe-table"; |
| | | import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import PrintProcess from '@/components/pp/PrintProcess.vue' |
| | | import PrintLabel from '@/views/pp/processCard/PrintLabel.vue' |
| | | import PrintCustomLabel from '@/components/pp/PrintCustomLabelDetails.vue' |
| | | import PrintCustomLabelSemi from '@/components/pp/PrintCustomLabelSemi.vue' |
| | | import PrintCustomLabelXJ from '@/components/pp/PrintCustomLabelTwo.vue' |
| | | import PrintCustomLabelXJTwo from '@/components/pp/PrintCustomLabelXJTwo.vue' |
| | | import PrintCustomLabelProject from '@/components/pp/PrintCustomLabelProject.vue' |
| | | import SortDetail from '@/components/pp/SelectSortDetailProcessCard.vue' |
| | | import footSum from "@/hook/footSum" |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global"; |
| | | import TagStyleDesigner from "@/components/pp/TagStyleDesigner.vue"; |
| | | import {hiprint} from "vue-plugin-hiprint"; |
| | | import QueuePrinter from "@/hook/queue" |
| | | import TagStyleSet from "@/hook/tagStyleSet"; |
| | | import {createTemplate} from "@/hook/createTemplateTag"; |
| | | |
| | | const company = companyInfo() |
| | | |
| | | |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | const dialogTableVisible = ref(false) |
| | | const dialogTableVisibleLabel = ref(false) |
| | | const dialogTableVisibleCustomLabel = ref(false) |
| | | const dialogTableVisibleLabelXJ = ref(false) |
| | | const dialogTableVisibleLabelXJTwo = ref(false) |
| | | const dialogTableVisibleLabelProject = ref(false) |
| | | const printVisible = ref(false) |
| | | let selectRecords = ref(null) |
| | | let titleStyleVisible = ref(false) |
| | | let lastList = ref([]) |
| | | const selectRecordsData = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | const xGrid = ref(null) |
| | | const xGridDetail = ref(null) |
| | | |
| | | |
| | | |
| | | const tagType = ref() |
| | | |
| | | //排序 |
| | | let editRow = ref({ |
| | | processId: null, |
| | | technologyNumber: null, |
| | | process: null |
| | | }) |
| | | |
| | | //打印 |
| | | let printRow = ref({ |
| | | list: null, |
| | | printMergeVal: null, |
| | | like: null |
| | | }) |
| | | |
| | | //标签 |
| | | let labelRow = ref({ |
| | | list: null,//勾选的数据 |
| | | faceOrientation: null,//内外面 |
| | | type: null,//标签模板 |
| | | lableType: null,//标签类型 |
| | | dataType: null,//标签类型 |
| | | detailType: 0//是否是工程明细打印 |
| | | }) |
| | | |
| | | |
| | | onMounted(async () => { |
| | | await getTags(); |
| | | await hiprint.init(); |
| | | |
| | | }) |
| | | let hiprintTemplate = ref() |
| | | |
| | | |
| | | |
| | | |
| | | const tags = ref([]) |
| | | |
| | | const tag = ref({ |
| | | id: null, |
| | | name: null, |
| | | type: 1, |
| | | tagWidth: null, |
| | | tagHeight: null, |
| | | value: null, |
| | | size: null |
| | | }) |
| | | |
| | | const changeTag = () => { |
| | | hiprintTemplate.value = new hiprint.PrintTemplate({}); |
| | | hiprintTemplate.value.design("#hiprint-printTemplate2",{grid:true}); |
| | | const json = tag.value.value |
| | | hiprintTemplate.value.update(json) |
| | | } |
| | | //标签类型 |
| | | const lableType = ref('1') |
| | | |
| | | //合片流程卡打印下拉选项 |
| | | |
| | | const printContent = ref({ |
| | | id: 'child', |
| | | |
| | | }) |
| | | |
| | | const printContentLabel = ref({ |
| | | id: 'childLabel', |
| | | }) |
| | | |
| | | |
| | | //打印类型 |
| | | const printType = ref() |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | dataType: [], |
| | | }) |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | const getTags = () => { |
| | | request.get('tagStyle/getTagList').then(res => { |
| | | res.data.forEach(item => { |
| | | item.value = JSON.parse(item.value) |
| | | }) |
| | | tags.value = res.data |
| | | }) |
| | | } |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | |
| | | let projectNo = route.query.projectNo |
| | | let stockId = route.query.stockId |
| | | let flowData=ref({ |
| | | projectNo:projectNo, |
| | | stockId:stockId |
| | | }) |
| | | |
| | | // 第一次加载查询 |
| | | request.post(`/processCard/selectPrintProjectDetailSmallPiece`,flowData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | xGrid.value.reloadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }).catch(err => { |
| | | console.log('请求地址错误:', err.config.url); |
| | | console.log('错误详情:', err); |
| | | }); |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'printFlowCard_1', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollX: {enabled: true}, |
| | | scrollY: {enabled: true, gt: 0},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'project_no', |
| | | title: t('ingredientsStock.projectNo'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'stock_id', |
| | | title: t('processCard.layoutNumber'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'polys_id', |
| | | title: t('小片序号'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'glass_id', |
| | | title: t('玻璃编号'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'o_width', |
| | | title: t('order.width'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'o_height', |
| | | title: t('order.height'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'printLabel3', name: t('basicData.print'), status: 'primary'}, |
| | | ], |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["glass_count"] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | }, |
| | | }) |
| | | |
| | | const gridEvents = { |
| | | toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | selectRecords = $grid.getCheckboxRecords() |
| | | let type = printType.value |
| | | let faceOrientation = '' |
| | | let lableTypes = lableType.value |
| | | let lableTitle = lableType.text |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'printLabel3': { |
| | | if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) { |
| | | ElMessage.warning(t('processCard.projectMsg1')) |
| | | return |
| | | } |
| | | if (tag.value.name == null || tag.value.name == '') { |
| | | ElMessage.warning(t('processCard.projectMsg2')) |
| | | return |
| | | } |
| | | let name = company.companyName |
| | | labelRow.value.list = JSON.stringify(selectRecords) |
| | | if (name == '新疆恒鑫玻璃科技有限公司') { |
| | | labelRow.value.type = '恒鑫带数量' |
| | | labelRow.value.dataType = 3 |
| | | dialogTableVisibleLabelXJTwo.value = true |
| | | } else { |
| | | labelRow.value.type = tag.value.name |
| | | labelRow.value.dataType = 3 |
| | | labelRow.value.lableType = lableTypes |
| | | labelRow.value.switch = true |
| | | lastList.value = [] |
| | | dialogTableVisibleLabelProject.value = true |
| | | } |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | |
| | | |
| | | const printObjectProcess = (type) => { |
| | | const list = tag.value.value |
| | | list.panels[0].printElements.forEach(element => { |
| | | element.options.fontFamily = 'Arial' |
| | | if( element.options.field !== undefined){ |
| | | if(type===3 ){ |
| | | element.options.hideTitle = true |
| | | } |
| | | } |
| | | if(type!==3){ |
| | | element.options.hideTitle = false |
| | | if( element.options.field === undefined){ |
| | | element.options.hideTitle = true |
| | | } |
| | | } |
| | | }) |
| | | |
| | | //hiprintTemplate.value.update(list) |
| | | let object = JSON.parse(JSON.stringify(lastList.value)) |
| | | //判断是否为表格 |
| | | let columnsNum = null |
| | | if(list.panels[0].printElements[0].options.field==='table'){ |
| | | object = {table:lastList.value} |
| | | columnsNum = (list.panels[0].printElements[0].options.gridColumns || 1) |
| | | } |
| | | //判断是否有 嵌套自定义纸张 |
| | | if(tag.value.tagHeight && tag.value.tagWidth){ |
| | | const print =createTemplate(list,object,tag.value.tagWidth,tag.value.tagHeight) |
| | | hiprintTemplate.value.update(print.template) |
| | | object = print.printData |
| | | } |
| | | hiprintTemplate.value.print(object) |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <div> |
| | | <label>{{ $t('processCard.labelStyle') }}:</label> |
| | | <el-select v-model="tag" :placeholder="$t('processCard.pleaseSelect')" style="width: 140px" @change="changeTag"> |
| | | <el-option |
| | | v-for="(tag,index) in tags" |
| | | :key="index" |
| | | :label="tag.name" |
| | | :value="tag" |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | height="100%" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" |
| | | type="text" |
| | | @input="changeFilterEvent($event, option, $panel)" |
| | | @keyup.enter.native="$panel.confirmFilter()"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | |
| | | <!-- 成品标签两列新疆--> |
| | | <el-dialog |
| | | id="sizeCustom" |
| | | v-model="dialogTableVisibleLabelXJTwo" |
| | | :title="$t('processCard.printLabel')" |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printContentLabel" :icon="Printer" circle/> |
| | | </template> |
| | | <print-custom-label-x-j-two id="childLabel" |
| | | :dataType="labelRow.dataType" |
| | | :faceOrientation="labelRow.faceOrientation" |
| | | :lableType="labelRow.lableType" |
| | | :list="labelRow.list" |
| | | :type="labelRow.type" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | |
| | | <!-- 成品标签工程打印--> |
| | | <el-dialog |
| | | id="sizeCustom" |
| | | v-model="dialogTableVisibleLabelProject" |
| | | :title="$t('processCard.printLabel')" |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <!-- <el-button :icon="Printer" circle @click="printObjectProcess(1)"/>--> |
| | | <!-- <el-button @click="printObjectProcess(3)" >{{ $t('processCard.noTitle') }}</el-button>--> |
| | | <el-tooltip |
| | | class="box-item" |
| | | effect="dark" |
| | | :content="$t('processCard.yesTitle')" |
| | | placement="top" |
| | | > |
| | | <el-button :icon="Printer" circle @click="printObjectProcess(1)"/> |
| | | </el-tooltip> |
| | | <el-tooltip |
| | | class="box-item" |
| | | effect="dark" |
| | | :content="$t('processCard.noTitle')" |
| | | placement="top" |
| | | > |
| | | <el-button @click="printObjectProcess(3)"> |
| | | <i class="vxe-icon-print"></i> |
| | | </el-button> |
| | | </el-tooltip> |
| | | </template> |
| | | <print-custom-label-project id="childLabel" |
| | | :detailType="labelRow.detailType" |
| | | :faceOrientation="labelRow.faceOrientation" |
| | | :lableType="labelRow.lableType" |
| | | :lastList='lastList' |
| | | :list="labelRow.list" |
| | | :switch="labelRow.switch" |
| | | :titleList="labelRow.titleList" |
| | | :type="labelRow.type" |
| | | |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer { |
| | | width: 99%; |
| | | height: 92%; |
| | | } |
| | | |
| | | |
| | | :deep(#sizeCheck .el-dialog__body) { |
| | | height: 90%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | :deep(#sizePrintCalrd .el-dialog__body) { |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | :deep(#sizeCustom .el-dialog__body) { |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | :deep(#sizeCustomSemi .el-dialog__body) { |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | :deep(#titleStyle .el-dialog__body) { |
| | | height: 85%; |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | </style> |
| | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'printLabel3', name: t('basicData.print'), status: 'primary'}, |
| | | {code: 'printSmallPiece', name: t('小片打印'), status: 'primary'}, |
| | | ], |
| | | zoom: true, |
| | | custom: true |
| | |
| | | } |
| | | break |
| | | } |
| | | case 'printSmallPiece': { |
| | | if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) { |
| | | ElMessage.warning(t('processCard.projectMsg1')) |
| | | return |
| | | } |
| | | let stock_id=[] |
| | | for (let i=0;i<selectRecords.length;i++){ |
| | | stock_id.push(selectRecords[i].stock_id) |
| | | } |
| | | console.log(stock_id) |
| | | router.push({path: '/main/processCard/printProjectDetailSmallPiece', query: {projectNo: projectNo,stockId:JSON.stringify(stock_id)}}) |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | { code: 'sizeCheck', name: t('basicData.sizeReview'), prefixIcon: 'vxe-icon-eye-fill', visible: true, disabled: false }, |
| | | { code: 'updateOrderId', name: t('searchOrder.updateOrderId'), prefixIcon: 'vxe-icon-eye-fill', visible: true, disabled: false }, |
| | | { code: 'reportingTransfer', name: t('searchOrder.reportingTransfer'), prefixIcon: 'vxe-icon-send', visible: true, disabled: true }, |
| | | { code: 'uploadPicture', name: t('order.graphic'),prefixIcon: 'vxe-icon-picture-fill', visible: true, } |
| | | { code: 'uploadPicture', name: t('order.graphic'),prefixIcon: 'vxe-icon-picture-fill', visible: true, }, |
| | | { code: 'fileUpload', name: t('上传dwg文件'),prefixIcon: 'vxe-icon-picture-fill', visible: true, } |
| | | ] |
| | | ] |
| | | } |
| | |
| | | return |
| | | } |
| | | rowIndex=row |
| | | if(orderTypeState.value===1){ |
| | | fileUploadVisible.value=true |
| | | }else{ |
| | | alienEditorVisible.value=true |
| | | alienEditorVisible.value=true |
| | | break |
| | | } |
| | | case 'fileUpload':{ |
| | | const row = xGrid.value.getCurrentRecord() |
| | | if(row===null){ |
| | | ElMessage.warning(t('components.pleaseClickToSelectARowFirst')) |
| | | return |
| | | } |
| | | rowIndex=row |
| | | fileUploadVisible.value=true |
| | | break |
| | | } |
| | | |
| | | } |
| | |
| | | <upload-picture |
| | | :rowIndex="rowIndex" |
| | | :orderId="titleUploadData.orderId" |
| | | :state="orderTypeState" |
| | | /> |
| | | </el-dialog> |
| | | |
| | |
| | | <!-- <artifactId>spring-boot-starter-websocket</artifactId>--> |
| | | <!-- </dependency>--> |
| | | |
| | | <!-- |
| | | <dependency> |
| | | <groupId>io.netty</groupId> |
| | | <artifactId>netty-all</artifactId> |
| | | <version>4.1.36.Final</version> |
| | | </dependency> |
| | | --> |
| | | |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | |
| | | <version>21.11</version> |
| | | </dependency> |
| | | |
| | | <!--redis--> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | <version>2.5.9</version> |
| | | </dependency> |
| | | <!--redis连接池依赖--> |
| | | <dependency> |
| | | <groupId>org.apache.commons</groupId> |
| | | <artifactId>commons-pool2</artifactId> |
| | | </dependency> |
| | | |
| | | <!--jackson json工具--> |
| | | <dependency> |
| | | <groupId>com.fasterxml.jackson.core</groupId> |
| | | <artifactId>jackson-databind</artifactId> |
| | | <version>2.12.6</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.fasterxml.jackson.datatype</groupId> |
| | | <artifactId>jackson-datatype-jsr310</artifactId> |
| | | <version>2.12.6</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cache.annotation.EnableCaching; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import org.springframework.transaction.annotation.EnableTransactionManagement; |
| | | |
| | | //springboot 启动入口 |
| | | @SpringBootApplication |
| | | @EnableCaching |
| | | @EnableScheduling |
| | | @EnableTransactionManagement//事务注解 |
| | | //@Transactional//在service里面有多表操作,开启事务注解 |
| | | public class ErpApplication { |
| | |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.FlowCardService; |
| | | import com.example.erp.tools.DownExcel; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | @ApiOperation("工程明细打印查询") |
| | | @PostMapping("/selectPrintProjectDetails/{projectNo}") |
| | | public Result selectPrintProjectDetails( |
| | | @PathVariable String projectNo) { |
| | | public Result selectPrintProjectDetails( @PathVariable String projectNo) { |
| | | return Result.success(flowCardService.getPrintProjectDetails(projectNo)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("工程明细小片打印查询") |
| | | @PostMapping("/selectPrintProjectDetailSmallPiece") |
| | | public Result selectPrintProjectDetailSmallPiece( |
| | | @RequestBody Map<String, Object> object) throws JsonProcessingException { |
| | | return Result.success(flowCardService.selectPrintProjectDetailSmallPiece(object)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("工程明细打印标签查询") |
| | | @PostMapping("/getPrintCustomDataProjectNoDetail/{type}/{detailType}") |
| | | public Result getPrintCustomDataProjectNoDetail( |
| | |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.ReportingWorkService; |
| | | import com.example.erp.service.userInfo.LogService; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | throw new ServiceException(Constants.Code_600, "上工序已完工数量小于本工序报工数量,请检查"); |
| | | } |
| | | } |
| | | @ApiOperation("mes报工接口测试") |
| | | @PostMapping ("/mesReportingWork1") |
| | | public Result mesReportingWork1(@RequestBody Map<String,Object> reportingWork) throws JsonProcessingException { |
| | | return reportingWorkService.mesReportingWorkSv1(reportingWork); |
| | | // if(aBoolean){ |
| | | // return Result.success(aBoolean); |
| | | // }else{ |
| | | // throw new ServiceException(Constants.Code_600, "上工序已完工数量小于本工序报工数量,请检查"); |
| | | // } |
| | | } |
| | | |
| | | @ApiOperation("mes报工次破新增") |
| | | @PostMapping ("/mesSaveReportingWorkWorn") |
| | | public Result mesSaveReportingWorkWorn(@RequestBody Map<String,Object> reportingWork) { |
| New file |
| | |
| | | package com.example.erp.dto.sd; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class OrderProcessSortDTO { |
| | | private String sort; |
| | | private String process; |
| | | //判断是否是复合工序 |
| | | private String recombination; |
| | | |
| | | } |
| | |
| | | //版图ID |
| | | @TableField(select = false,exist = false) |
| | | private String stockId; |
| | | //小片序号 |
| | | @TableField(select = false,exist = false) |
| | | private Integer polysId; |
| | | //小片数量 |
| | | @TableField(select = false,exist = false) |
| | | private String glassCount; |
| | |
| | | |
| | | List<Map<String, Object>> getPrintCustomDataSemi(String processId, String technologyNumber, String process, Integer orderNumber, Integer printQuantity); |
| | | |
| | | List<Map<String, Object>> getgetPrintCustomDataSemiSp(String processId, String technologyNumber, Integer orderNumber); |
| | | |
| | | List<Map<String, String>> selectPrintNotMp(String orderId); |
| | | |
| | | List<Map<String, String>> selectPrintNotMergeMp(String orderId); |
| | | |
| | | List<Map<String, String>> getRepairPrintCustomDataSemi(String processId, String technologyNumber, String reportingWorkId, Integer orderNumber); |
| | | List<Map<String, Object>> getRepairPrintCustomDataSemi(String processId, String technologyNumber, String reportingWorkId, Integer orderNumber); |
| | | |
| | | List<Map<String, String>> getReworkPrintCustomDataSemi(String processId, String technologyNumber, String reportingWorkId, Integer orderNumber); |
| | | |
| | |
| | | |
| | | List<Map<String, Object>> getPrintProjectDetailsMp(String projectNo); |
| | | |
| | | List<Map<String, Object>> getPrintCustomDataProjectDetail(String projectNo, String stockId); |
| | | List<Map<String, Object>> getPrintProjectDetailsMpSp(String projectNo,List<Integer> stockId); |
| | | |
| | | List<Map<String, Object>> getPrintCustomDataProjectDetail(String projectNo, String stockId,Integer polysId); |
| | | |
| | | List<Map<String, Object>> getPrintCustomDataProject(String projectNo); |
| | | |
| | |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.dto.sd.OrderProcessSortDTO; |
| | | import com.example.erp.entity.pp.ReportingWorkDetail; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | String getBehindProcess(String processId, String orderNumber, String technologyNumber, String thisProcess,String orderId); |
| | | |
| | | List<OrderProcessDetail> selectProcessCardProgressSv(String orderId, String processId, String orderNumber, String technologyNumber, String process); |
| | | |
| | | List<OrderProcessSortDTO> selectProcessSort(String orderId, String processId, String orderNumber, String technologyNumber); |
| | | } |
| | |
| | | import com.example.erp.mapper.sd.*; |
| | | import com.example.erp.service.userInfo.LogService; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | //获取工序对应的别称 |
| | | String processName = flowCardMapper.getProcessName(processSub); |
| | | //processName.equals("stepC") || processName.equals("stepD") |
| | | if (processName.equals("stepC") || processName.equals("stepD")) {//工艺是否包含夹胶中空 |
| | | if (processName.equals("stepC") || processName.equals("stepD")) {//工艺是否包含夹胶中空,流程卡查询合并 |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListLimt(flowCard.getProcessId(), |
| | | String.valueOf("null".equals(compound) |
| | | ? flowCard.getTechnologyNumber()//正常层 |
| | |
| | | itemmap.put("detailList", detailList); |
| | | } |
| | | } else { |
| | | if (merge.equals("1") && flowCard.getMerge().equals(1)) {//否 |
| | | if (merge.equals("1") && flowCard.getMerge().equals(1)) {//未启用,配置文件flowCardMerge值为1 |
| | | // 检查是否已经处理过该 processId,如果处理过则跳过 |
| | | if (processedKeys.contains(uniqueKey)) { |
| | | continue; |
| | |
| | | |
| | | } |
| | | |
| | | } else {//否 |
| | | //流程卡明细数据 |
| | | if (printLike.equals("") || printLike.equals("null")) { |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListMerge(flowCard.getProcessId(), printMerge, flowCard.getOrderId())); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber(), flowCard.getProcess(), flashback, landingSequence); |
| | | itemmap.put("detailList", detailList); |
| | | } else { |
| | | itemmap.put("detail", flowCardMapper.getPrimaryList(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId())); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailListLike(flowCard.getProcessId(), printMerge, flowCard.getProcess(), flashback, landingSequence); |
| | | itemmap.put("detailList", detailList); |
| | | } |
| | | } |
| | | |
| | | //工艺流程 |
| | |
| | | // 判断是否为非空字符串 |
| | | if (orderNumber != null && !orderNumber.trim().isEmpty()) { |
| | | |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemi( |
| | | List<Map<String, Object>> customDataSemi =flowCardMapper.getPrintCustomDataSemi( |
| | | flowCard.getProcessId(), |
| | | flowCard.getTechnologyNumber(), |
| | | flowCard.getProcess(), |
| | | flowCard.getOrderNumber(), flowCard.getPrintQuantity() |
| | | )); |
| | | flowCard.getOrderNumber(), flowCard.getPrintQuantity()); |
| | | for (Map<String, Object> dataMap : customDataSemi) { |
| | | dataMap.put("newList", flowCardMapper.getgetPrintCustomDataSemiSp( |
| | | flowCard.getProcessId(), |
| | | dataMap.get("technologyNumber").toString(), |
| | | flowCard.getOrderNumber() |
| | | )); |
| | | } |
| | | itemmap.put("data", customDataSemi); |
| | | } else { |
| | | //用于天津现场流程卡打印界面的小片标签打印 |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemiTj( |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> selectPrintProjectDetailSmallPiece(Map<String, Object> object) throws JsonProcessingException { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | String projectNo=object.get("projectNo").toString(); |
| | | String stockIdsStr=object.get("stockId").toString(); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | if (stockIdsStr != null && !stockIdsStr.isEmpty()) { |
| | | List<Integer> list = objectMapper.readValue(stockIdsStr, new TypeReference<List<Integer>>() {}); |
| | | map.put("data", flowCardMapper.getPrintProjectDetailsMpSp(projectNo,list)); |
| | | } |
| | | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getPrintCustomDataProjectNoDetailSv(String type, Integer detailType, Map<String, Object> object) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | //是否是工程明细打印 |
| | | if (detailType == 0) {//工程打印明细 |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProjectDetail(flowCard.getProjectNo(), flowCard.getStockId())); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProjectDetail(flowCard.getProjectNo(), flowCard.getStockId(),flowCard.getPolysId())); |
| | | |
| | | |
| | | } |
| | | //非工程打印 |
| | |
| | | } |
| | | else{//小片标签 |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getRepairPrintCustomDataSemi(flowCard.getProcessId(),flowCard.getTechnologyNumber(),flowCard.getReportingWorkId(),flowCard.getOrderNumber())); |
| | | List<Map<String,Object>> customDataSemi =flowCardMapper.getRepairPrintCustomDataSemi(flowCard.getProcessId(),flowCard.getTechnologyNumber(),flowCard.getReportingWorkId(),flowCard.getOrderNumber()); |
| | | for (Map<String, Object> dataMap : customDataSemi) { |
| | | dataMap.put("newList", flowCardMapper.getgetPrintCustomDataSemiSp( |
| | | flowCard.getProcessId(), |
| | | dataMap.get("technologyNumber").toString(), |
| | | flowCard.getOrderNumber() |
| | | )); |
| | | } |
| | | itemmap.put("data", customDataSemi); |
| | | list.add(itemmap); |
| | | } |
| | | |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aspose.cad.internal.I.S; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | 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.example.erp.common.AsyncQueryExecutor; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.dto.pp.OrderNumberTransferDTO; |
| | | import com.example.erp.dto.sd.OrderProcessSortDTO; |
| | | import com.example.erp.entity.pp.*; |
| | | import com.example.erp.entity.sd.*; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | | import com.example.erp.entity.userInfo.Log; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.mapper.mm.FinishedOperateLogMapper; |
| | | import com.example.erp.mapper.pp.*; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.mapper.sd.*; |
| | | import com.example.erp.mapper.userInfo.LogMapper; |
| | | import com.example.erp.service.mm.FinishedGoodsInventoryService; |
| | | import com.example.erp.service.sd.OrderProcessDetailService; |
| | | import com.example.erp.service.userInfo.LogService; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import com.example.erp.tools.JacksonUtil; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.core.type.TypeReference; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | |
| | | import javax.annotation.PreDestroy; |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Service |
| | | @DS("pp") |
| | |
| | | private final ReportingWorkDetailMapper reportingWorkDetailMapper; |
| | | private final OrderMapper orderMapper; |
| | | private final OrderDetailMapper orderDetailMapper; |
| | | |
| | | private final FlowCardMapper flowCardMapper; |
| | | |
| | | private final OrderProcessDetailService orderProcessDetailService; |
| | | |
| | | private final LogService logService; |
| | | |
| | | private final LogMapper logMapper; |
| | | private final OrderGlassDetailMapper orderGlassDetailMapper; |
| | | private final SysErrorService sysErrorService; |
| | |
| | | private final ReworkMapper reworkMapper; |
| | | private final BasicDataMapper basicDataMapper; |
| | | private final FinishedGoodsInventoryService finishedGoodsInventoryService; |
| | | private final StringRedisTemplate stringRedisTemplate; |
| | | |
| | | @Resource |
| | | private AsyncQueryExecutor asyncExecutor; |
| | |
| | | List<ReportingWork> ReportingWorks = reportingWorkMapper.selectJoinList(ReportingWork.class, |
| | | new MPJLambdaWrapper<ReportingWork>() |
| | | .select(ReportingWork::getReportingWorkId) |
| | | .leftJoin(ReportingWorkDetail.class, ReportingWorkDetail::getReportingWorkId, ReportingWork::getReportingWorkId) |
| | | .leftJoin(ReportingWorkDetail.class, |
| | | ReportingWorkDetail::getReportingWorkId, |
| | | ReportingWork::getReportingWorkId) |
| | | .eq(ReportingWork::getProcessId,reportingWork.getProcessId()) |
| | | .eq(ReportingWork::getThisProcess,reportingWork.getThisProcess()) |
| | | .eq(ReportingWork::getDeviceName,reportingWork.getDeviceName()) |
| | |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e +Arrays.toString(e.getStackTrace())); |
| | | sysError.setFunc("汉玻mes报工"); |
| | | sysError.setFunc("mes报工"); |
| | | sysErrorService.insert(sysError); |
| | | throw new ServiceException(Constants.Code_500, "数据请求异常,请检查"); |
| | | |
| | |
| | | map.put("breakageReason", reportingWorkMapper.selectBasicNameByType("breakagereason")); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | //@Transactional(rollbackFor = Exception.class , noRollbackFor = ServiceException.class) |
| | | public Result mesReportingWorkSv1(Map<String, Object> reportingWorkMap) throws JsonProcessingException { |
| | | |
| | | //设置回滚点 |
| | | //Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | //接收解析主附表信息 |
| | | String titleJson = JacksonUtil.writeValueAsString(reportingWorkMap.get("title")); |
| | | String detailJson = JacksonUtil.writeValueAsString(reportingWorkMap.get("detail")); |
| | | ReportingWork reportingWork = JacksonUtil.readValue(titleJson, ReportingWork.class); |
| | | ReportingWorkDetail reportingWorkDetail = JacksonUtil.readValue(detailJson, ReportingWorkDetail.class); |
| | | String Base_KEY = reportingWork.getProcessId()+":"+reportingWork.getThisProcess()+":"+reportingWork.getDeviceName(); |
| | | String reportingWork_KEY = Base_KEY+":title"; |
| | | String reportingWorkDetail_KEY = Base_KEY+":detail:"+reportingWorkDetail.getOrderNumber()+":"+reportingWorkDetail.getTechnologyNumber(); |
| | | |
| | | String process_KEY = reportingWork.getProcessId()+":process:"+reportingWorkDetail.getOrderNumber()+":"+reportingWorkDetail.getTechnologyNumber(); |
| | | |
| | | //判断工序是否存在redis中 |
| | | if(!Boolean.TRUE.equals(stringRedisTemplate.hasKey(process_KEY+":"+reportingWork.getThisProcess()))){ |
| | | List<OrderProcessSortDTO> orderProcessSortDTOList = orderProcessDetailMapper.selectProcessSort( |
| | | reportingWork.getOrderId(), |
| | | reportingWork.getProcessId(), |
| | | reportingWorkDetail.getOrderNumber(), |
| | | reportingWorkDetail.getTechnologyNumber() |
| | | ); |
| | | if (orderProcessSortDTOList.isEmpty()){ |
| | | throw new ServiceException(Constants.Code_600, "未检测到流程卡信息,请检查"); |
| | | } |
| | | |
| | | orderProcessSortDTOList.forEach(orderProcessSortDTO -> { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("sort",orderProcessSortDTO.getSort()); |
| | | map.put("recombination",orderProcessSortDTO.getRecombination()); |
| | | stringRedisTemplate.opsForHash().putAll(process_KEY+":"+orderProcessSortDTO.getProcess(), map); |
| | | }); |
| | | } |
| | | String recombination = (String) stringRedisTemplate.opsForHash().get(process_KEY+":"+reportingWork.getThisProcess(),"recombination"); |
| | | |
| | | if (!recombination.isEmpty()){ |
| | | throw new ServiceException(Constants.Code_600, "复合工序请到ERP中进行报工"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //判断是否redis此报工编号key是否存在 |
| | | if(Boolean.TRUE.equals(stringRedisTemplate.hasKey(reportingWork_KEY))){ |
| | | stringRedisTemplate.opsForHash().increment( |
| | | reportingWork_KEY, |
| | | "thisCompletedQuantity", |
| | | reportingWork.getThisCompletedQuantity() |
| | | ); |
| | | } |
| | | else{ |
| | | stringRedisTemplate.opsForHash().putAll( |
| | | reportingWork_KEY, |
| | | JacksonUtil.readValueObjectToString(reportingWork,new TypeReference<Map<String, String>>() {}) |
| | | ); |
| | | } |
| | | //判断是否redis此报工明细中key是否存在 |
| | | if(Boolean.TRUE.equals(stringRedisTemplate.hasKey(reportingWorkDetail_KEY))){ |
| | | stringRedisTemplate.opsForHash().increment( |
| | | reportingWorkDetail_KEY, |
| | | "completedQuantity", |
| | | reportingWorkDetail.getCompletedQuantity() |
| | | ); |
| | | }else { |
| | | stringRedisTemplate.opsForHash().putAll( |
| | | reportingWorkDetail_KEY, |
| | | JacksonUtil.readValueObjectToString(reportingWorkDetail,new TypeReference<Map<String, String>>() {}) |
| | | ); |
| | | } |
| | | return Result.success("提交成功"); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.example.erp.tools; |
| | | |
| | | import com.fasterxml.jackson.core.JacksonException; |
| | | import com.fasterxml.jackson.core.type.TypeReference; |
| | | import com.fasterxml.jackson.databind.JavaType; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; |
| | | import org.springframework.boot.json.JsonParseException; |
| | | |
| | | import java.util.List; |
| | | import java.util.concurrent.Callable; |
| | | |
| | | |
| | | // 将繁琐的异常处理进行了解决 |
| | | public class JacksonUtil { |
| | | /** |
| | | * 工具类不需要创建实例对象 |
| | | */ |
| | | private JacksonUtil(){ |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 给ObjectMapper进行单例模式,由于ObjectMapper 是线程安全的,可以复用,放置重复创建影响性能 |
| | | */ |
| | | private static final ObjectMapper objectMapper; |
| | | |
| | | static { |
| | | objectMapper = new ObjectMapper(); |
| | | objectMapper.registerModule(new JavaTimeModule()); |
| | | } |
| | | |
| | | public static ObjectMapper getObjectMapper(){ |
| | | |
| | | return objectMapper; |
| | | } |
| | | |
| | | public static final <T> T tryParse(Callable<T> parser) { |
| | | return JacksonUtil.tryParse(parser, JacksonException.class); |
| | | } |
| | | |
| | | public static final <T> T tryParse(Callable<T> parser, Class<? extends Exception> check) { |
| | | try { |
| | | return parser.call(); |
| | | } |
| | | catch (Exception ex) { |
| | | if (check.isAssignableFrom(ex.getClass())) { |
| | | throw new JsonParseException(ex); |
| | | } |
| | | throw new IllegalStateException(ex); |
| | | } |
| | | } |
| | | |
| | | // 普通对象和List对象共同使用 |
| | | public static String writeValueAsString(Object object){ |
| | | return JacksonUtil.tryParse(()->{ |
| | | return JacksonUtil.getObjectMapper().writeValueAsString(object); |
| | | }); |
| | | } |
| | | |
| | | // 普通对象的反序列化 |
| | | public static <T> T readValue(String str,Class<T> valueType){ |
| | | return JacksonUtil.tryParse(()->{ |
| | | return JacksonUtil.getObjectMapper().readValue(str,valueType); |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | public static <T> T readValueObjectToString(Object object,TypeReference<T> valueType){ |
| | | String str = JacksonUtil.tryParse(()->{ |
| | | return JacksonUtil.getObjectMapper().writeValueAsString(object); |
| | | }); |
| | | |
| | | return JacksonUtil.tryParse(()->{ |
| | | return JacksonUtil.getObjectMapper().readValue(str,valueType); |
| | | }); |
| | | } |
| | | |
| | | |
| | | // List类型的反序列化 |
| | | public static <T> T readListValue(String str,Class<?> valueType){ |
| | | JavaType javaType = JacksonUtil.getObjectMapper().getTypeFactory().constructParametricType(List.class,valueType); |
| | | return JacksonUtil.tryParse(()->{ |
| | | return JacksonUtil.getObjectMapper().readValue(str,javaType); |
| | | }); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import io.netty.channel.group.ChannelGroup; |
| | | import io.netty.channel.group.DefaultChannelGroup; |
| | | import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; |
| | | import io.netty.util.concurrent.GlobalEventExecutor; |
| | | import org.springframework.context.annotation.Bean; |
| | | |
| | | /** |
| | | * MyChannelHandlerPool |
| | |
| | | |
| | | public static ChannelGroup channelGroup = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE); |
| | | |
| | | public void sendMsg(String message){ |
| | | /*public void sendMsg(String message){ |
| | | channelGroup.writeAndFlush(new TextWebSocketFrame(message)); |
| | | } |
| | | }*/ |
| | | } |
| | | |
| | | |
| | |
| | | package com.example.erp.tools.netty; |
| | | |
| | | import io.netty.channel.ChannelHandlerContext; |
| | | import io.netty.channel.SimpleChannelInboundHandler; |
| | | import io.netty.handler.codec.http.FullHttpRequest; |
| | | import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | public class MyWebSocketHandler extends SimpleChannelInboundHandler<TextWebSocketFrame> { |
| | | |
| | | public class MyWebSocketHandler { |
| | | // public class MyWebSocketHandler extends SimpleChannelInboundHandler<TextWebSocketFrame> { |
| | | /* |
| | | @Override |
| | | public void channelActive(ChannelHandlerContext ctx) throws Exception { |
| | | System.out.println("与客户端建立连接,通道开启!"); |
| | |
| | | }else{ |
| | | return map; |
| | | } |
| | | } |
| | | }*/ |
| | | } |
| | | |
| | |
| | | package com.example.erp.tools.netty; |
| | | |
| | | import io.netty.bootstrap.ServerBootstrap; |
| | | import io.netty.channel.ChannelFuture; |
| | | import io.netty.channel.ChannelInitializer; |
| | | import io.netty.channel.ChannelOption; |
| | | import io.netty.channel.EventLoopGroup; |
| | | import io.netty.channel.nio.NioEventLoopGroup; |
| | | import io.netty.channel.socket.SocketChannel; |
| | | import io.netty.channel.socket.nio.NioServerSocketChannel; |
| | | import io.netty.handler.codec.http.HttpObjectAggregator; |
| | | import io.netty.handler.codec.http.HttpServerCodec; |
| | | import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler; |
| | | import io.netty.handler.stream.ChunkedWriteHandler; |
| | | |
| | | /** |
| | | * NettyServer Netty服务器配置 |
| | | * @author zhengkai.blog.csdn.net |
| | |
| | | this.port = port; |
| | | } |
| | | |
| | | public void start() throws Exception { |
| | | /*public void start() throws Exception { |
| | | EventLoopGroup bossGroup = new NioEventLoopGroup(); |
| | | |
| | | EventLoopGroup group = new NioEventLoopGroup(); |
| | |
| | | group.shutdownGracefully().sync(); // 释放线程池资源 |
| | | bossGroup.shutdownGracefully().sync(); |
| | | } |
| | | } |
| | | }*/ |
| | | } |
| | | |
| | | |
| | |
| | | multipart: |
| | | max-file-size: 50MB |
| | | max-request-size: 50MB |
| | | redis: |
| | | host: ${ip} |
| | | database: 15 |
| | | port: 6379 |
| | | password: 123456 |
| | | lettuce: |
| | | pool: |
| | | max-active: 8 #最大连接 |
| | | max-idle: 8 #最大空闲连接 |
| | | min-idle: 0 #最小空闲连接 |
| | | max-wait: 1000ms #获取连接的最大等待时间 |
| | | datasource: |
| | | dynamic: |
| | | primary: user_info #设置默认的数据源或者数据源组,默认值即为master |
| | |
| | | concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber, |
| | | concat('对应我司单号', o.batch) AS otherRemarks, |
| | | '' as qrcode, |
| | | ifnull(rack,"") as rack |
| | | ifnull(rack,"") as rack, |
| | | o.quantity as orderQuantity, |
| | | o.area as orderArea |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number) |
| | | </select> |
| | | |
| | | <select id="getgetPrintCustomDataSemiSp"> |
| | | select * from pp.optimize_detail opd |
| | | where opd.process_id= #{processId} and opd.order_sort = #{orderNumber} |
| | | <if test="technologyNumber != null and technologyNumber != ''"> |
| | | and opd.layer = #{technologyNumber} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <select id="selectPrintNotMp"> |
| | | select fc.id, |
| | | fc.order_id, |
| | |
| | | concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber, |
| | | concat('对应我司单号', o.batch) AS otherRemarks, |
| | | fc.technology_number as qrcode, |
| | | o.other_remarks |
| | | o.other_remarks, |
| | | o.quantity as orderQuantity, |
| | | o.area as orderArea |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | ORDER BY opd.stock_id |
| | | </select> |
| | | |
| | | <select id="getPrintProjectDetailsMpSp"> |
| | | SELECT opd.project_no,opd.stock_id,opd.polys_id,o_width,o_height,p_width,p_height,opd.glass_id |
| | | FROM optimize_detail as opd left join optimize_layout as opl on opl.project_no=opd.project_no and opl.stock_id=opd.stock_id |
| | | where opd.project_no=#{projectNo} and opd.stock_id in |
| | | <foreach item="item" index="index" collection="stockId" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | order BY opd.stock_id |
| | | </select> |
| | | |
| | | <select id="getPrintCustomDataProjectDetail"> |
| | | select |
| | | opt.glass_id as heat_layout_sort , |
| | |
| | | left join sd.product_detail as pd on pd.prod_id = p.id and pd.sort_num = od.order_number and |
| | | pd.glass_sort = fc.technology_number |
| | | where opt.project_no=#{projectNo} and opt.stock_id=#{stockId} |
| | | <if test="polysId != null"> |
| | | and opt.polys_id=#{polysId} |
| | | </if> |
| | | order by opt.stock_id,opt.polys_id |
| | | </select> |
| | | |
| | |
| | | <select id="mesSelectWorkBasicDeviceMp"> |
| | | SELECT bdp.id,bdp.basic_type,bdp.basic_name, bd.basic_name as basic_category FROM sd.basic_data as bd left join `basic_data_produce` as bdp |
| | | on bd.id=bdp.basic_category |
| | | where bd.basic_category="process" and bdp.basic_type="device" and bd.basic_name = #{process} |
| | | where bd.basic_category="process" and bdp.basic_type="device" |
| | | </select> |
| | | |
| | | <select id="mesSelectWorkBasicTeamsMp"> |
| | | select id,login_name,user_name,address from erp_user_info.`user` |
| | | select id,login_name,user_name,address from erp_user_info.`user` where address is not null |
| | | </select> |
| | | </mapper> |
| | |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <select id="selectProcessSort"> |
| | | select a.process, |
| | | ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS sort, |
| | | ifnull(b.nickname,"") as recombination |
| | | from sd.order_process_detail as a |
| | | inner join sd.basic_data as b |
| | | on a.process = b.basic_name and b.basic_category = 'process' |
| | | where a.order_id = #{orderId} |
| | | and a.process_id = #{processId} |
| | | and a.order_number =#{orderNumber} |
| | | and a.technology_number =#{technologyNumber} |
| | | </select> |
| | | </mapper> |
| | |
| | | package com.example.erp; |
| | | |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | |
| | | import static org.apache.tomcat.jni.Lock.trylock; |
| | | |
| | | @SpringBootTest |
| | | class ErpApplicationTests { |
| | | @Autowired |
| | | private StringRedisTemplate stringRedisTemplate; |
| | | |
| | | @Test |
| | | void contextLoads() { |
| | |
| | | |
| | | @Test |
| | | void test() { |
| | | |
| | | // stringRedisTemplate.opsForValue().set("test", "test"); |
| | | // Object test = stringRedisTemplate.opsForValue().get("test"); |
| | | } |
| | | |
| | | } |