下片界面添加打印标签,对下片清除绑架功能部分字段未重置进行完善
New file |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | // import {useRouter} from 'vue-router' |
| | | // import {changeFilterEvent, filterChanged} from "@/hook" |
| | | // import {useI18n} from 'vue-i18n' |
| | | // import deepClone from "@/utils/deepClone"; |
| | | import companyInfo from "@/lang/companyInfo" |
| | | |
| | | const company = companyInfo() |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | // let router = useRouter() |
| | | let produceList = ref([]) |
| | | let labelList = ref([]) |
| | | let titleList = ref([]) |
| | | let dataList = ref([]) |
| | | let list = ref([]) |
| | | let lastList=ref([]) |
| | | |
| | | let filterData = ref({}) |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | |
| | | // const {currentRoute} = useRouter() |
| | | // const route = currentRoute.value |
| | | // data.value.printList = JSON.parse(route.query.printList) |
| | | // const type = route.query.type |
| | | // const faceOrientation = route.query.faceOrientation |
| | | // const lableType = route.query.lableType |
| | | let props = defineProps({ |
| | | printFlowCardId: null, |
| | | printLayer: null, |
| | | }) |
| | | |
| | | onMounted(async () => { |
| | | console.log(props.printFlowCardId,props.printLayer) |
| | | const response = await request.post('/unLoadGlass/downGlassInfo/downGlassLabelPrint',{ |
| | | flowCardId:props.printFlowCardId, |
| | | layer:props.printLayer |
| | | }); |
| | | if (response.code == 200) { |
| | | console.log("lastList.value",response.data) |
| | | lastList.value=response.data; |
| | | |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | |
| | | } |
| | | |
| | | ) |
| | | |
| | | |
| | | // // 打印方法 |
| | | // const printFlowCard = () => { |
| | | // // 需要打印的局部区域赋予"print-wrap"的id |
| | | // let el = document.getElementById("printFlowCard"); |
| | | // let doc = document; |
| | | // let body = doc.body || doc.getElementsByTagName("body")[0]; |
| | | // let printId = "print-" + Date.now(); |
| | | |
| | | // // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式) |
| | | // let content = doc.createElement("div"); |
| | | // content.id = printId; |
| | | |
| | | // // 样式控制与打印无关的元素隐藏 |
| | | // let style = doc.createElement("style"); |
| | | // style.innerHTML = |
| | | // "body>#" + |
| | | // printId + |
| | | // "{display:none}@media print{" + |
| | | // "@page {" + |
| | | // " size: auto; " + |
| | | // " margin: 2mm 2mm 2mm 2mm; " + |
| | | // " }body>:not(#" + |
| | | // printId + |
| | | // "){display:none !important}body>#" + |
| | | // printId + |
| | | // "{display:block;padding-top:1px}}"; |
| | | // // |
| | | // content.innerHTML = el.outerHTML; |
| | | // // // console.log("el.outerHTML", el.outerHTML); |
| | | // body.appendChild(style); |
| | | |
| | | // // 与style元素设置的样式相配合 |
| | | // // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式) |
| | | // body.appendChild(content); |
| | | // setTimeout(() => { |
| | | // window.print(); |
| | | // body.removeChild(content); |
| | | // body.removeChild(style); |
| | | // }, 20); |
| | | // } |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <el-button id="printButton" @click="printFlowCard();">打印</el-button> --> |
| | | <div id="printFlowCard" > |
| | | <template v-for="(item,id) in lastList"> |
| | | <div id="entirety" > |
| | | <div style="position: absolute;font-weight: bold;margin-left: 5px;" v-if="item.tempering_layout_id!=null">{{ item.tempering_layout_id }}/{{ item.tempering_feed_sequence }}</div> |
| | | <div class="row1"> |
| | | <span>{{ item.customer_name }}</span> |
| | | <span>{{ item.order_id }}</span> |
| | | </div> |
| | | <div class="row2"> |
| | | <span>{{ item.project }}</span> |
| | | <span>{{ item.building_number }}</span> |
| | | </div> |
| | | <div class="row3" v-if="item.other_columns!=null&&(JSON.parse(item.other_columns).S02!=null)">{{JSON.parse(item.other_columns).S02}}={{item.quantity}}</div> |
| | | <div class="row3" v-else>{{Math.round(item.width)}}x{{Math.round(item.height)}}={{item.quantity}}</div> |
| | | <div class="row5"> |
| | | <span>{{item.glass_child }}</span> |
| | | <span>{{ item.processing_note }}</span> |
| | | </div> |
| | | </div> |
| | | <div style="width: 20px" v-if="id%2===0"></div> |
| | | </template> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | * { |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | #printButton { |
| | | /*margin-top: -20px;*/ |
| | | width: 100px; |
| | | } |
| | | |
| | | #printFlowCard { |
| | | display: flex; |
| | | justify-content: left; |
| | | flex-wrap: wrap; |
| | | width: 500px; |
| | | } |
| | | |
| | | #entirety{ |
| | | text-align: center; |
| | | width: 48%; |
| | | height: 160px; |
| | | border: black 1px; |
| | | word-wrap: break-word; |
| | | } |
| | | |
| | | .row1 { |
| | | font-size: 12pt; |
| | | font-weight: bold; |
| | | height: 35px; |
| | | } |
| | | .row1 span { |
| | | font-size: 12pt; |
| | | } |
| | | |
| | | .row2 { |
| | | font-size: 14pt; |
| | | font-weight: bold; |
| | | height: 35px; |
| | | } |
| | | .row2 span { |
| | | font-size: 12pt; |
| | | } |
| | | span { |
| | | font-size: 12pt; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .row3 { |
| | | margin-top: -5px; |
| | | height: 35px; |
| | | font-size: 22pt; |
| | | font-weight: bolder; |
| | | line-height: 35px; |
| | | } |
| | | |
| | | .row5 { |
| | | height: 50px; |
| | | font-weight: bold; |
| | | font-size: 12pt; |
| | | margin-left: 20px; |
| | | } |
| | | .row5 span { |
| | | font-size: 12pt; |
| | | } |
| | | |
| | | .row6 { |
| | | height: 15px; |
| | | font-weight: bold; |
| | | font-size: 8pt; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @media print { |
| | | div { |
| | | page-break-inside: avoid; |
| | | } |
| | | @page { |
| | | size: auto; /* auto is the initial value */ |
| | | margin: 2mm 2mm 2mm 2mm; /* this affects the margin in the printer settings */ |
| | | |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | import PrintFlow from "@/views/UnLoadGlass/PrintFlow.vue"; |
| | | import Landingindication from "./Landingindication.vue"; |
| | | import Landingindicationtwo from "./Landingindicationtwo.vue"; |
| | | import PrintLabel from "@/views/UnLoadGlass/PrintCustomLabelSemi1.vue"; |
| | | |
| | | const router = useRouter() |
| | | const {t} = useI18n() |
| | |
| | | const selectValuesa = reactive({}); |
| | | const selectOptionsa = ref([]); |
| | | const dialogTableVisible = ref(false) |
| | | const dialogTableVisible1 = ref(false) |
| | | const printFlowCardId = ref('') |
| | | const printLayer = ref('') |
| | | const now = new Date(); |
| | |
| | | printFlowCard(); // 替换成你要执行的函数名 |
| | | //dialogTableVisible.value = false; |
| | | }, 1000); |
| | | |
| | | } |
| | | const open1 = async (row) => { |
| | | |
| | | printFlowCardId.value = row.flowCardId; |
| | | printLayer.value = row.layer |
| | | dialogTableVisible1.value = true; |
| | | // setTimeout(() => { |
| | | // printFlowCard1(); // 替换成你要执行的函数名 |
| | | // //dialogTableVisible1.value = false; |
| | | // }, 1000); |
| | | } |
| | | |
| | | const printFlowCard = () => { |
| | |
| | | }, 20); |
| | | } |
| | | |
| | | const printFlowCard1 = () => { |
| | | // 需要打印的局部区域赋予"print-wrap"的id |
| | | let el = document.getElementById("printFlowCard"); |
| | | let doc = document; |
| | | let body = doc.body || doc.getElementsByTagName("body")[0]; |
| | | let printId = "print-" + Date.now(); |
| | | |
| | | // 创建无副作用的打印容器(因不确定页面的打印元素有无其它样式) |
| | | let content = doc.createElement("div"); |
| | | content.id = printId; |
| | | |
| | | // 样式控制与打印无关的元素隐藏 |
| | | let style = doc.createElement("style"); |
| | | style.innerHTML = |
| | | "body>#" + |
| | | printId + |
| | | "{display:none}@media print{" + |
| | | "@page {" + |
| | | " size: auto; " + |
| | | " margin: 2mm 2mm 2mm 2mm; " + |
| | | " }body>:not(#" + |
| | | printId + |
| | | "){display:none !important}body>#" + |
| | | printId + |
| | | "{display:block;padding-top:1px}}"; |
| | | // |
| | | content.innerHTML = el.outerHTML; |
| | | // // console.log("el.outerHTML", el.outerHTML); |
| | | body.appendChild(style); |
| | | |
| | | // 与style元素设置的样式相配合 |
| | | // 把打印内容的元素添加到body(作为body的子元素,可用body的子选择器 '>' 控制打印样式) |
| | | body.appendChild(content); |
| | | setTimeout(() => { |
| | | window.print(); |
| | | body.removeChild(content); |
| | | body.removeChild(style); |
| | | }, 20); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | <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 height="200px" ref="table" @selection-change="handleSelectionChange" :data="tableData" |
| | | <el-table height="350px" ref="table" @selection-change="handleSelectionChange" :data="tableData" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"> |
| | | <el-table-column prop="workstationId" align="center" :label="$t('reportWork.lowerbit')" min-width="80"/> |
| | | <el-table-column prop="workstationId" align="center" :label="$t('reportWork.shelfnumber')" |
| | |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" :label="$t('reportWork.operate')" align="center" width="200"> |
| | | <el-table-column fixed="right" :label="$t('reportWork.operate')" align="center" width="400"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain v-show="scope.row.enableState !== '已启用'" |
| | | @click="handleBindRack(scope.row)">{{ $t('reportWork.bindingshelves') }} |
| | | </el-button> |
| | | <el-button size="mini" type="text" plain @click="handleBindRack2(scope.row)">{{ $t('reportWork.clear') |
| | | }}</el-button> |
| | | <el-button @click="open(scope.row)" :disabled="scope.row.flowCardId == null">打印</el-button> |
| | | <el-button @click="open(scope.row)" :disabled="scope.row.flowCardId == null">打印流程卡</el-button> |
| | | <el-button @click="open1(scope.row)" :disabled="scope.row.flowCardId == null">打印标签</el-button> |
| | | </template> |
| | | |
| | | </el-table-column> |
| | |
| | | <print-flow id="child" :printFlowCardId="printFlowCardId" :printLayer="printLayer" |
| | | 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=""/> |
| | | </el-dialog> |
| | | |
| | | </template> |
| | | <style scoped> |
| | |
| | | List<Map<String, Object>> selectProject(@Param("processId") String processId,@Param("technologyNumber") Integer technologyNumber); |
| | | |
| | | List<Map<String, Object>> selectFlowCard(@Param("processId") String processId,@Param("technologyNumber") Integer technologyNumber); |
| | | |
| | | List<Map<String, Object>> selectLabel(@Param("processId") String processId,@Param("technologyNumber") Integer technologyNumber); |
| | | } |
| | |
| | | List<Map<String, Object>> selectProject(String processId, Integer technologyNumber); |
| | | |
| | | List<Map<String, Object>> selectFlowCard(String processId, Integer technologyNumber); |
| | | |
| | | List<Map<String, Object>> selectLabel(String processId, Integer technologyNumber); |
| | | } |
| | |
| | | public List<Map<String, Object>> selectFlowCard(String processId, Integer technologyNumber){ |
| | | return baseMapper.selectFlowCard(processId, technologyNumber); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectLabel(String processId, Integer technologyNumber){ |
| | | return baseMapper.selectLabel(processId, technologyNumber); |
| | | } |
| | | } |
| | |
| | | group by fc.process_id |
| | | </select> |
| | | |
| | | <select id="selectLabel" resultType="java.util.Map"> |
| | | select fc.process_id, |
| | | o.order_id, |
| | | o.project, |
| | | o.customer_id, |
| | | ogd.child_width as width, |
| | | ogd.child_height as height, |
| | | od.quantity, |
| | | od.order_number as orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | ogd.glass_child, |
| | | ogd.process, |
| | | c.customer_abbreviation as customer_name, |
| | | ifnull(od.processing_note, '') as processing_note, |
| | | bgt.type_name, |
| | | od.other_columns, |
| | | od.building_number, |
| | | od.bend_radius |
| | | from sd.order as o |
| | | left join sd.order_detail as od on o.order_id = od.order_id |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id = od.order_id and ogd.order_number = od.order_number |
| | | left join pp.flow_card as fc on o.order_id = fc.order_id and |
| | | od.order_number = fc.order_number and |
| | | fc.technology_number = ogd.technology_number |
| | | left join sd.product pt on pt.id = od.product_id |
| | | left join sd.customer c on c.id = o.customer_id |
| | | left join sd.basic_glass_type bgt on bgt.type_id = pt.type_id |
| | | where fc.process_id = #{processId} |
| | | and fc.technology_number = #{technologyNumber} |
| | | group by od.order_number, od.width, od.height |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | return Result.build(200, "查询成功", downGlassInfoService.downGlassPrint(downGlassInfo)); |
| | | } |
| | | |
| | | @PostMapping("/downGlassLabelPrint") |
| | | public Result downGlassLabelPrint(@RequestBody DownGlassInfo downGlassInfo) { |
| | | return Result.build(200, "查询成功", downGlassInfoService.downGlassLabelPrint(downGlassInfo)); |
| | | } |
| | | |
| | | } |
| | |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Repository |
| | | public interface DownGlassInfoMapper extends BaseMapper<DownGlassInfo> { |
| | |
| | | * @return |
| | | */ |
| | | List<DownGlassInfoDTO> queryWorkStationFlowCard(@Param(value = "workList") List<Integer> workList); |
| | | |
| | | /** |
| | | * 获取下片信息 |
| | | * |
| | | * @param processId,technologyNumber |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> downGlassLabelPrint(@Param("processId") String processId, @Param("technologyNumber") Integer technologyNumber); |
| | | |
| | | } |
| | |
| | | */ |
| | | String setDownGlassInfoRequest(DownGlassInfoRequest request); |
| | | |
| | | /** |
| | | * 流程卡打印查询 |
| | | * |
| | | * @param downGlassInfo |
| | | * @return |
| | | */ |
| | | List<Map<String, List<Map<String, Object>>>> downGlassPrint(DownGlassInfo downGlassInfo); |
| | | |
| | | /** |
| | | * 工位是否满架查询 |
| | | * |
| | | * @return |
| | | */ |
| | | List<DownWorkstation> queryWorkStationIsFull(); |
| | | |
| | | |
| | | /** |
| | | * 标签打印查询 |
| | | * |
| | | * @param downGlassInfo |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> downGlassLabelPrint(DownGlassInfo downGlassInfo); |
| | | } |
| | |
| | | queryWrapper.eq("flow_card_id", downGlassInfo.getFlowCardId()) |
| | | .eq("layer", downGlassInfo.getLayer()) |
| | | .select("flow_card_id", "layer", "width", "height", "filmsid", "thickness", "glass_type", "COUNT(*) AS quantity") |
| | | .groupBy("flow_card_id", "layer", "width", "height", "filmsid", "thickness", "glass_type","id") |
| | | .groupBy("flow_card_id", "layer", "width", "height", "filmsid", "thickness", "glass_type", "id") |
| | | .orderByAsc("id"); |
| | | List<Map<String, Object>> resultList = baseMapper.selectMaps(queryWrapper); |
| | | |
| | | log.info("MES落架数据:{}", resultList); |
| | | |
| | | List<Map<String, Object>> projectInfo = flowCardService.selectProject(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer()); |
| | |
| | | listMap.add(result); |
| | | return listMap; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> downGlassLabelPrint(DownGlassInfo downGlassInfo) { |
| | | //获取下片玻璃的顺序 |
| | | // QueryWrapper<DownGlassInfo> queryWrapper = Wrappers.query(); |
| | | // queryWrapper |
| | | // .eq("flow_card_id", downGlassInfo.getFlowCardId()) |
| | | // .eq("layer", downGlassInfo.getLayer()) |
| | | // .select("flow_card_id", "layer", "width", "height", "filmsid", "thickness", "glass_type", "COUNT(*) AS quantity") |
| | | // .groupBy("flow_card_id", "layer", "width", "height", "filmsid", "thickness", "glass_type", "id") |
| | | // .orderByAsc("id"); |
| | | // List<Map<String, Object>> resultList = baseMapper.selectMaps(queryWrapper); |
| | | List<Map<String, Object>> resultList = baseMapper.downGlassLabelPrint(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer()); |
| | | log.info("MES落架数据:{}", resultList); |
| | | //获取ERP标签所需的信息 |
| | | List<Map<String, Object>> labelInfo = flowCardService.selectLabel(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer()); |
| | | log.info("标签数据:{}", labelInfo); |
| | | |
| | | for (Map<String, Object> row : resultList) { |
| | | int glass_type = (int) row.get("glass_type"); |
| | | int layer = (int) row.get("layer"); |
| | | for (Map<String, Object> row1 : labelInfo) { |
| | | int orderNumber = (int) row1.get("orderNumber"); |
| | | int technologyNumber = (int) row1.get("technologyNumber"); |
| | | if (orderNumber == glass_type && technologyNumber == layer) { |
| | | |
| | | String order_id = (String) row1.get("order_id"); |
| | | String project = (String) row1.get("project"); |
| | | Long customer_id = (Long) row1.get("customer_id"); |
| | | BigDecimal width = (BigDecimal) row1.get("width"); |
| | | BigDecimal height = (BigDecimal) row1.get("height"); |
| | | Long quantity = (Long) row1.get("quantity"); |
| | | String glass_child = (String) row1.get("glass_child"); |
| | | String process = (String) row1.get("process"); |
| | | String customer_name = (String) row1.get("customer_name"); |
| | | String processing_note = (String) row1.get("processing_note"); |
| | | String other_colunmns = (String) row1.get("other_colunmns"); |
| | | String building_number = (String) row1.get("building_number"); |
| | | String bend_radius = (String) row1.get("bend_radius"); |
| | | |
| | | row.put("orderNumber", orderNumber); |
| | | row.put("technology_number", technologyNumber); |
| | | row.put("order_id", order_id); |
| | | row.put("project", project); |
| | | row.put("customer_id", customer_id); |
| | | row.put("width", width); |
| | | row.put("height", height); |
| | | row.put("quantity", quantity); |
| | | row.put("glass_child", glass_child); |
| | | row.put("process", process); |
| | | row.put("customer_name", customer_name); |
| | | row.put("processing_note", processing_note); |
| | | row.put("other_colunmns", other_colunmns); |
| | | row.put("building_number", building_number); |
| | | row.put("bend_radius", bend_radius); |
| | | } |
| | | } |
| | | } |
| | | return resultList; |
| | | } |
| | | |
| | | } |
| | |
| | | item.put("width", downWorkstionAndDownGlassinfo.getTotalwidth()); |
| | | item.put("fillColor", "yellow"); |
| | | item.put("content", downWorkstionAndDownGlassinfo.getFlowCardId()); |
| | | if (downWorkstionAndDownGlassinfo.getFlowCardId()!=""&&downWorkstionAndDownGlassinfo.getFlowCardId()!=null&&downWorkstionAndDownGlassinfo.getTotalQuantity() == downWorkstionAndDownGlassinfo.getRacksNumber() + downWorkstionAndDownGlassinfo.getRacksNumber()) { |
| | | if (downWorkstionAndDownGlassinfo.getFlowCardId() != "" && downWorkstionAndDownGlassinfo.getFlowCardId() != null && downWorkstionAndDownGlassinfo.getTotalQuantity() == downWorkstionAndDownGlassinfo.getRacksNumber() + downWorkstionAndDownGlassinfo.getRacksNumber()) { |
| | | item.put("fullCardColor", "red"); |
| | | } else { |
| | | item.put("fullCardColor", "blue"); |
| | |
| | | updateWrapper.set("flow_card_id", null) |
| | | .set("total_quantity", 0) |
| | | .set("racks_number", 0) |
| | | .set("other_number", 0) |
| | | .set("layer", null) |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | baseMapper.update(new DownWorkstation(), updateWrapper); |
| | |
| | | </foreach> |
| | | ORDER BY T.RACKS_NUMBER DESC |
| | | </select> |
| | | |
| | | <select id="selectFlowCard" resultType="java.util.Map"> |
| | | select fc.order_number, |
| | | concat(round(ogd.child_width), "*", round(ogd.child_height)) as child_width, |
| | | od.quantity, |
| | | round(ogd.total_area, 2) as total_area, |
| | | od.perimeter, |
| | | od.bend_radius, |
| | | concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks, |
| | | od.other_columns, |
| | | round(ogd.child_width) as width, |
| | | round(ogd.child_height) as height, |
| | | pd.separation, |
| | | fc.technology_number |
| | | from pp.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 |
| | | fc.technology_number = ogd.technology_number |
| | | left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number |
| | | left join sd.product_detail as pd |
| | | on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number |
| | | where fc.process_id = #{processId} |
| | | and position(fc.technology_number in #{technologyNumber}) |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | order by IF(sort != NULL || sort != '', sort, fc.order_number) |
| | | |
| | | </select> |
| | | |
| | | <select id="selectProject" resultType="java.util.Map"> |
| | | select o.customer_name, |
| | | o.project, |
| | | (select process |
| | | from sd.order_glass_detail |
| | | where order_id = fc.order_id |
| | | and order_number = fc.order_number |
| | | and technology_number = fc.technology_number) as process, |
| | | od.edging_type, |
| | | (select glass_child |
| | | from sd.order_glass_detail |
| | | where order_id = fc.order_id |
| | | and order_number = fc.order_number |
| | | and technology_number = fc.technology_number) as glass_child, |
| | | od.product_name, |
| | | o.processing_note, |
| | | fc.process_id, |
| | | SUM(od.quantity) as quantity, |
| | | round(SUM(ogd.total_area), 2) as gross_area, |
| | | sum(od.weight) as weight, |
| | | 1 as technologyNumber, |
| | | concat(fc.process_id, '/', 1) as processIdNumber, |
| | | concat('对应我司单号', o.batch) AS otherRemarks |
| | | from pp.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 |
| | | fc.technology_number = ogd.technology_number |
| | | left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number |
| | | left join sd.`order` as o on o.order_id = fc.order_id |
| | | left join sd.product as p on p.id = od.product_id |
| | | left join (select ogd.order_id, |
| | | ogd.order_number, |
| | | ogd.technology_number, |
| | | ogd.glass_child, |
| | | GROUP_CONCAT(glass_child SEPARATOR ' ') AS concatenated_glass_child |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.order_id = left (#{processId} |
| | | , 10) |
| | | and position (ogd.technology_number in #{technologyNumber}) |
| | | GROUP BY order_id, order_number) as ogdc |
| | | on ogdc.order_id = ogd.order_id and ogdc.order_number = ogd.order_number and |
| | | ogdc.technology_number = ogd.technology_number |
| | | where fc.process_id = #{processId} |
| | | and position(fc.technology_number in #{technologyNumber}) |
| | | group by fc.process_id |
| | | </select> |
| | | |
| | | <select id="downGlassLabelPrint" resultType="java.util.Map"> |
| | | select a.flow_card_id, |
| | | a.layer, |
| | | a.width, |
| | | a.height, |
| | | a.filmsid, |
| | | a.thickness, |
| | | a.glass_type, |
| | | COUNT(*) AS quantity, |
| | | b.tempering_layout_id, |
| | | b.tempering_feed_sequence |
| | | from down_glass_info a |
| | | inner join glass_info b on a.glass_id = b.glass_id |
| | | where a.flow_card_id = #{processId} |
| | | and a.layer = #{technologyNumber} |
| | | group by a.flow_card_id, a.layer, a.width, a.height, a.filmsid, a.thickness, a.glass_type, a.id |
| | | order by a.id |
| | | </select> |
| | | |
| | | |
| | | </mapper> |