Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | <span v-if="!(itemremark.S02==null&&itemremark.S03==null&&itemremark.S04==null&&itemremark.S05==null)"> |
| | | 编号:{{itemremark.S01}} |
| | | </span> |
| | | <span v-if="itemremark.S02!=null">备注1:{{itemremark.S02}}</span> |
| | | <span v-if="itemremark.S03!=null">备注2:{{itemremark.S03}}</span> |
| | | <span v-if="itemremark.S04!=null">备注3:{{itemremark.S04}}</span> |
| | | <span v-if="itemremark.S05!=null">备注4:{{itemremark.S05}}</span> |
| | | <span v-if="itemremark.S02!=null&&itemremark.S02!=''">备注1:{{itemremark.S02}}</span> |
| | | <span v-if="itemremark.S03!=null&&itemremark.S03!=''">备注2:{{itemremark.S03}}</span> |
| | | <span v-if="itemremark.S04!=null&&itemremark.S04!=''">备注3:{{itemremark.S04}}</span> |
| | | <span v-if="itemremark.S05!=null&&itemremark.S05!=''">备注4:{{itemremark.S05}}</span> |
| | | </div> |
| | | </div> |
| | | </td> |
| | |
| | | qualityInsTime:'质检时间', |
| | | completedArea:'完工面积', |
| | | wornArea:'次破面积', |
| | | pleaseGreaterThanOrEqual1:'请输入大于等于', |
| | | pleaseGreaterThanOrEqual1:'请输入小于等于', |
| | | pleaseGreaterThanOrEqual2:'的数字', |
| | | lossCount1:'损耗数', |
| | | lossCount2:'不能大于', |
| | |
| | | let dataList = ref([]) |
| | | let list = ref([]) |
| | | let lastList=ref([]) |
| | | let projectNo = ref([]) |
| | | let type = ref([]) |
| | | |
| | | let filterData = ref({}) |
| | | |
| | |
| | | }) |
| | | |
| | | |
| | | |
| | | 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 |
| | | const printType=route.query.printType |
| | | projectNo.value = route.query.projectNo |
| | | type.value = route.query.type |
| | | |
| | | onMounted(() => { |
| | | if (printType == 1) { |
| | | request.post(`/processCard/getSelectPrintLabel1`, data.value).then((res) => { |
| | | if(projectNo.value!=null){ |
| | | request.post(`/processCard/getSelectPrintLabel/${projectNo.value}/${type.value}`).then((res) => { |
| | | if (res.code == 200) { |
| | | produceList.value = deepClone(res.data.data) |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | let count = produceList.value[i].data.length |
| | | for (let j = 0; j < count; j++) { |
| | | for (let k = 0; k < produceList.value[i].data[j].quantity; k++) { |
| | | labelList.value.push(produceList.value[i].data[j]) |
| | | } |
| | | |
| | | } |
| | | } |
| | | labelList.value = deepClone(res.data.data) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | }else if(printType==2){ |
| | | request.post(`/processCard/getSelectPrintLabelDetails`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | produceList.value = deepClone(res.data.data) |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | let count = produceList.value[i].data.length |
| | | for (let j = 0; j < count; j++) { |
| | | for (let k = 0; k < produceList.value[i].data[j].quantity; k++) { |
| | | labelList.value.push(produceList.value[i].data[j]) |
| | | } |
| | | }else{ |
| | | data.value.printList = JSON.parse(route.query.printList) |
| | | if (printType == 1) { |
| | | request.post(`/processCard/getSelectPrintLabel1`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | produceList.value = deepClone(res.data.data) |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | let count = produceList.value[i].data.length |
| | | for (let j = 0; j < count; j++) { |
| | | for (let k = 0; k < produceList.value[i].data[j].quantity; k++) { |
| | | labelList.value.push(produceList.value[i].data[j]) |
| | | } |
| | | |
| | | } |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | }else if(printType==2){ |
| | | request.post(`/processCard/getSelectPrintLabelDetails`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | produceList.value = deepClone(res.data.data) |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | let count = produceList.value[i].data.length |
| | | for (let j = 0; j < count; j++) { |
| | | for (let k = 0; k < produceList.value[i].data[j].quantity; k++) { |
| | | labelList.value.push(produceList.value[i].data[j]) |
| | | } |
| | | |
| | | } |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | }) |
| | | |
| | |
| | | <div id="printFlowCard" > |
| | | <template v-for="(item,id) in labelList"> |
| | | <div id="entirety" > |
| | | <div class="row1"> |
| | | |
| | | <div class="row1" v-if="item.heat_layout_id!=null"> |
| | | <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div> |
| | | <span>{{ item.customer_name }}</span> |
| | | <span>{{ item.order_id }}</span> |
| | | <span v-if="item.process.includes('夹胶')">胶片</span> |
| | | <span v-else-if="item.process.includes('中空')">中空</span> |
| | | <span v-else-if="item.process.includes('百叶')">百叶</span> |
| | | <span v-else></span> |
| | | <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div> |
| | | </div> |
| | | <div class="row6" v-else> |
| | | <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div> |
| | | <span>{{ item.customer_name }}</span> |
| | | <span>{{ item.order_id }}</span> |
| | | <span v-if="item.process.includes('夹胶')">胶片</span> |
| | | <span v-else-if="item.process.includes('中空')">中空</span> |
| | | <span v-else-if="item.process.includes('百叶')">百叶</span> |
| | | <span v-else></span> |
| | | <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div> |
| | | </div> |
| | | |
| | | |
| | | <div class="row2"> |
| | | <span>{{item.project}}</span> |
| | | <span>{{ item.building_number }}</span> |
| | |
| | | height: 35px; |
| | | } |
| | | .row1 span { |
| | | font-size: 17pt; |
| | | font-size: 14pt; |
| | | } |
| | | .row2 { |
| | | font-size: 12pt; |
| | |
| | | font-weight: bold; |
| | | font-size: 10pt; |
| | | } |
| | | .row6 span { |
| | | font-size: 17pt; |
| | | } |
| | | |
| | | .cell{ |
| | | position: absolute; |
| | | font-weight: bold; |
| | | margin-left: 5px; |
| | | margin-top: 0px; |
| | | } |
| | | |
| | | .cell1{ |
| | | position: absolute; |
| | | font-weight: bold; |
| | | margin-left: 225px; |
| | | margin-top: -30px; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | projectNo.value = route.query.projectNo |
| | | type.value = route.query.type |
| | | |
| | | |
| | | |
| | | onMounted(() => { |
| | | if(projectNo.value!=null){ |
| | | request.post(`/processCard/getSelectPrintLabel/${projectNo.value}/${type.value}`).then((res) => { |
| | |
| | | </div> |
| | | </div>--> |
| | | <div id="entirety" v-for="(item,id) in labelList" > |
| | | <div class="row1"> |
| | | <div class="row1" v-if="item.heat_layout_id!=null"> |
| | | |
| | | <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div> |
| | | <span>{{ item.customer_name }}</span> |
| | | <span>{{ item.order_id }}</span> |
| | | <span v-if="item.process.includes('夹胶')">胶片</span> |
| | | <span v-else-if="item.process.includes('中空')">中空</span> |
| | | <span v-else-if="item.process.includes('百叶')">百叶</span> |
| | | <span v-else></span> |
| | | <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div> |
| | | <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div> |
| | | <span>{{ item.customer_name }}</span> |
| | | <span>{{ item.order_id }}</span> |
| | | <span v-if="item.process.includes('夹胶')">胶片</span> |
| | | <span v-else-if="item.process.includes('中空')">中空</span> |
| | | <span v-else-if="item.process.includes('百叶')">百叶</span> |
| | | <span v-else></span> |
| | | <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="row2" v-else> |
| | | <span>{{ item.customer_name }}</span> |
| | | <span>{{ item.order_id }}</span> |
| | | <span v-if="item.process.includes('夹胶')">胶片</span> |
| | | <span v-else-if="item.process.includes('中空')">中空</span> |
| | | <span v-else-if="item.process.includes('百叶')">百叶</span> |
| | | <span v-else></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.project}}</span> |
| | | <span>{{ item.building_number }}</span> |
| | | <span v-if="item.bend_radius!=null">R={{item.bend_radius}}</span> |
| | | </div> |
| | | <div class="row6"> |
| | | <span>{{item.glass_child}}</span> |
| | | <span>{{item.processing_note}}</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.project}}</span> |
| | | <span>{{ item.building_number }}</span> |
| | | <span v-if="item.bend_radius!=null">R={{item.bend_radius}}</span> |
| | | </div> |
| | | <div class="row6"> |
| | | <span>{{item.glass_child}}</span> |
| | | <span>{{item.processing_note}}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | height: 20px; |
| | | } |
| | | .row1 span { |
| | | font-size: 10pt; |
| | | font-weight: bold; |
| | | } |
| | | .row2 span { |
| | | font-size: 12pt; |
| | | font-weight: bold; |
| | | } |
| | |
| | | import PrintCustomLabelXJTwo from '@/components/pp/PrintCustomLabelXJTwo.vue' |
| | | import {Printer} from "@element-plus/icons-vue/global"; |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import {remove} from "xe-utils"; |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | |
| | |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | let titleStyleVisible = ref(false) |
| | | let print = ref("1") |
| | | |
| | | //标签 |
| | | let labelRow = ref({ |
| | |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | router.push({path: '/main/processCard/PrintLabel', query: { projectNo: row.project_no,type:1 }}) |
| | | if(parseInt(print.value)==1){ |
| | | router.push({path: '/main/processCard/PrintLabel', query: { projectNo: row.project_no,type:1 }}) |
| | | }else{ |
| | | router.push({path: '/main/processCard/PrintCustomLabelSemi2', query: { projectNo: row.project_no,type:1 }}) |
| | | } |
| | | |
| | | break |
| | | } |
| | | case 'edit1' :{ |
| | |
| | | |
| | | if (res.code == 200) { |
| | | if(hidePrintLabels=="true"){ |
| | | //删除下拉框 |
| | | remove(gridOptions.toolbarConfig.slots) |
| | | const button = {'code': 'printLabel', |
| | | status: 'primary', |
| | | 'name': "成品打印2"} |
| | |
| | | status: 'primary', |
| | | 'name': "明细打印"} |
| | | gridOptions.toolbarConfig.buttons.push(button2) |
| | | |
| | | } |
| | | produceList.value = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList.value) |
| | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | ], |
| | | |
| | | slots:{ |
| | | buttons: "toolbar_buttons" |
| | | }, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | id: 'childLabel', |
| | | }) |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <template #toolbar_buttons> |
| | | <vxe-select @change="changeOrderType" v-model="print" > |
| | | <vxe-option value="1" label="EPSON LQ-82KF ESC/P2"></vxe-option> |
| | | <vxe-option value="2" label="TSC TTP-244Pro"></vxe-option> |
| | | </vxe-select> |
| | | </template> |
| | | |
| | | |
| | | |
| | | |
| | | </vxe-grid> |
| | | <el-dialog |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | |
| | | <style scoped> |
| | | .main-div-customer { |
| | | width: 99%; |
| | |
| | | slots: {filter: 'num1_filter'}, |
| | | visible: true |
| | | }, |
| | | {field: 'glassNumber', width: 110,title: t('reportingWorks.glassNumber'),showOverflow:"ellipsis",filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}}, |
| | | {field: 'orderNumber', width: 100, title: t('order.OrderNum'),visible: true}, |
| | | {field: 'technologyNumber', width: 120, title: t('processCard.technologyNumber'),filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, showOverflow: "ellipsis",visible: true}, |
| | |
| | | }else if(row.quantity_card<row.completedQuantity){ |
| | | return new Error("完工数不能大于流程卡数量") |
| | | } |
| | | if(titleUploadData.value.reportingWorkId!=null && row.completedQuantity<row.minQuantity){ |
| | | const completedNum = |
| | | (row.completedQuantity === undefined || row.completedQuantity===null || row.completedQuantity==='') ? 0 : row.completedQuantity |
| | | if(titleUploadData.value.reportingWorkId!=null && completedNum>row.minQuantity){ |
| | | return new Error(`${t('reportingWorks.pleaseGreaterThanOrEqual1')} |
| | | ${row.minQuantity} |
| | | ${t('reportingWorks.pleaseGreaterThanOrEqual2')}`) |
| | |
| | | private String productName; |
| | | @ExcelProperty("弯钢半径") |
| | | private String bendRadius; |
| | | @ExcelProperty("编号") |
| | | private String glassNumber; |
| | | } |
| | |
| | | List<Map<String,String>> getSelectProcessJiajiao(); |
| | | |
| | | List<Map<String,String>> getSelectProcessDuoqu(); |
| | | |
| | | List<Map<String, String>> SelectReworlDetailMpReview(String processIdStr, String technologyStr, String process, String previousProcess); |
| | | } |
| | |
| | | //是第一道工序,查询流程卡数据 |
| | | map.put("Detail", reportingWorkMapper.SelectTechnologicalNumMp(processIdStr, technologyStr, process,reportType)); |
| | | } else { |
| | | //不是第一道工序,查询报工数据 |
| | | List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, technologyStr, process,previousProcess); |
| | | if(process.equals("中空")){ |
| | | String orderId = processIdStr.substring(0,10); |
| | | details.forEach( detail -> { |
| | | Integer glassId = orderGlassDetailMapper. |
| | | getMinIdByGroup(orderId, |
| | | String.valueOf(detail.get("order_number")), |
| | | String.valueOf(detail.get("group"))); |
| | | int listGlassId = Integer.parseInt(String.valueOf(detail.get("glassId"))); |
| | | if(listGlassId !=glassId){ |
| | | detail.put("rowClass","latter"); |
| | | ReportingWork retrievedData = (ReportingWork) map.get("data"); |
| | | if (retrievedData!=null){ |
| | | Integer reviewedState = retrievedData.getReviewedState(); |
| | | //根据审核状态查询未审核数据 |
| | | if (reviewedState==1){//已审核 |
| | | //不是第一道工序,查询报工数据 |
| | | List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, technologyStr, process,previousProcess); |
| | | if(process.equals("中空")){ |
| | | String orderId = processIdStr.substring(0,10); |
| | | details.forEach( detail -> { |
| | | Integer glassId = orderGlassDetailMapper. |
| | | getMinIdByGroup(orderId, |
| | | String.valueOf(detail.get("order_number")), |
| | | String.valueOf(detail.get("group"))); |
| | | int listGlassId = Integer.parseInt(String.valueOf(detail.get("glassId"))); |
| | | if(listGlassId !=glassId){ |
| | | detail.put("rowClass","latter"); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | map.put("Detail",details ); |
| | | }else { |
| | | //不是第一道工序,查询报工数据 |
| | | List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMpReview(processIdStr, technologyStr, process,previousProcess); |
| | | if(process.equals("中空")){ |
| | | String orderId = processIdStr.substring(0,10); |
| | | details.forEach( detail -> { |
| | | Integer glassId = orderGlassDetailMapper. |
| | | getMinIdByGroup(orderId, |
| | | String.valueOf(detail.get("order_number")), |
| | | String.valueOf(detail.get("group"))); |
| | | int listGlassId = Integer.parseInt(String.valueOf(detail.get("glassId"))); |
| | | if(listGlassId !=glassId){ |
| | | detail.put("rowClass","latter"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | map.put("Detail",details ); |
| | | } |
| | | } |
| | | |
| | | |
| | | map.put("Detail",details ); |
| | | } |
| | | |
| | | // 第一道工序(流程卡数+补片数量-完工数-次破数-返工未完成数-禁用数量) |
| | |
| | | |
| | | <select id="remakList"> |
| | | SELECT |
| | | JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S01')) AS S01, |
| | | JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S04')) AS S02, |
| | | JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S05')) AS S03, |
| | | JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S06')) AS S04, |
| | | JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S07')) AS S05 |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S01')),'') AS S01, |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S04')),'') AS S02, |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S05')),'') AS S03, |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S06')),'') AS S04, |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S07')),'') AS S05 |
| | | FROM flow_card as fc left join sd.order_detail as od on fc.order_id = od.order_id |
| | | and fc.order_number = od.order_number |
| | | WHERE fc.process_id=#{processId} |
| | |
| | | <result column="stockArea" property="stockArea"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="bend_radius" property="bendRadius"/> |
| | | <result column="glassNumber" property="glassNumber"/> |
| | | </resultMap> |
| | | |
| | | <!-- 流程卡进度--> |
| | |
| | | ifnull(f.inventory, 0) as inventory, |
| | | round(ifnull(f.inventory, 0) * a.area, 2) as inventoryArea, |
| | | ifnull(dd.quantity, 0) as shippedQuantity, |
| | | JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')) AS glassNumber |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber |
| | | from flow_card as c |
| | | left join |
| | | sd.order_detail as a |
| | |
| | | (odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num) / 1000000, 2) as stockArea, |
| | | od.product_name, |
| | | od.bend_radius |
| | | od.bend_radius, |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') AS glassNumber |
| | | |
| | | from sd.order_detail AS od |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | |
| | | </if> |
| | | <if test="workInProgressDTO.technologyNumber != null and workInProgressDTO.technologyNumber != ''"> |
| | | and ogd.technology_number regexp #{workInProgressDTO.technologyNumber} |
| | | </if> |
| | | <if test="workInProgressDTO.glassNumber != null and workInProgressDTO.glassNumber != ''"> |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{workInProgressDTO.glassNumber} |
| | | </if> |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | order by fc.process_id, fc.order_number, fc.technology_number |
| | |
| | | round( ogd.child_width * ogd.child_height * dd.breakage_quantity / 1000000, 2 ) as area, |
| | | IFNULL(dd.responsible_personnel,'') as personnel, |
| | | ogd.glass_child, |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS glassNumber |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') AS glassNumber |
| | | FROM |
| | | sd.ORDER AS o |
| | | LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = o.order_id |
| | |
| | | round(ifnull(f.inventory, 0) * a.area, 2) as inventoryArea, |
| | | ifnull(dd.quantity, 0) as shippedQuantity, |
| | | ifnull(dd.area, 0) as area, |
| | | JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')) AS glassNumber |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber |
| | | |
| | | from flow_card as c |
| | | left join |
| | |
| | | WHERE basic_type='product' AND basic_category='process' AND basic_name='钢化' |
| | | ) AS combined_results; |
| | | </select> |
| | | |
| | | <select id="SelectReworlDetailMpReview"> |
| | | SELECT |
| | | fc.order_number, |
| | | ogd.glass_child, |
| | | ogd.technology_number, |
| | | ogd.glass_address, |
| | | fc.quantity AS quantity_card, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape, |
| | | if((odpds.reporting_work_num_count + ifnull(c.patchNumSum,0) -odpd.reporting_work_num_count -odpd.broken_num ) < 0, |
| | | 0, |
| | | odpds.reporting_work_num_count + ifnull(c.patchNumSum,0) -odpd.reporting_work_num_count -odpd.broken_num) as quantity, |
| | | if((odpds.reporting_work_num_count + ifnull(c.patchNumSum,0) -odpd.reporting_work_num_count -odpd.broken_num) < 0, |
| | | 0, |
| | | odpds.reporting_work_num_count + ifnull(c.patchNumSum,0) -odpd.reporting_work_num_count -odpd.broken_num) as completedQuantity, |
| | | odpd.reporting_work_num as completed, |
| | | odpd.broken_num as onceBroken, |
| | | ogd.`group`, |
| | | if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag, -- 判断是否已经完成,已经完成不序号和同序号数量相同才能提交 |
| | | od.other_columns, |
| | | ogd.id as 'glassId' |
| | | ,rws.reviewed_state |
| | | FROM |
| | | sd.order_detail AS od |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | | ON od.order_id = ogd.order_id |
| | | AND od.order_number = ogd.order_number |
| | | <if test="process == '夹胶' or (process == '打胶和粘框' and previousProcess=='夹胶')"> |
| | | AND ogd.`group` = (select `group` |
| | | from sd.order_glass_detail |
| | | where order_id = ogd.order_id |
| | | and order_number = ogd.order_number |
| | | and POSITION(technology_number in #{technologyStr}) |
| | | limit 1) |
| | | </if> |
| | | |
| | | |
| | | LEFT JOIN flow_card AS fc |
| | | ON fc.order_id = ogd.order_id |
| | | and fc.production_id=ogd.production_id |
| | | AND fc.order_number = ogd.order_number |
| | | AND fc.technology_number = ogd.technology_number |
| | | left join sd.order_process_detail as odpd |
| | | ON odpd.order_id = fc.order_id |
| | | AND odpd.order_number = fc.order_number |
| | | AND odpd.technology_number = fc.technology_number |
| | | and odpd.process_id = fc.process_id |
| | | left join sd.order_process_detail as odpds |
| | | ON odpds.id = odpd.id-1 |
| | | left join |
| | | (SELECT |
| | | sum(rw.rework_num) as 'patchNumSum', |
| | | rw.process_id,rw.order_sort,rw.technology_number, |
| | | rwk.this_process |
| | | from |
| | | rework as rw |
| | | LEFT JOIN |
| | | reporting_work as rwk |
| | | on rw.reporting_work_id =rwk.reporting_work_id |
| | | where rwk.this_process=#{process} |
| | | and rw.review_status=0 |
| | | and rw.process_id = #{processIdStr} |
| | | GROUP BY rw.process_id,rw.order_sort,rw.technology_number) as c |
| | | on c.process_id = fc.process_id |
| | | and c.order_sort = fc.order_number |
| | | and c.technology_number = fc.technology_number |
| | | left join (select reviewed_state as reviewed_state , |
| | | process_id,a.reporting_work_id,b.technology_number,b.order_number |
| | | from reporting_work as a |
| | | left join reporting_work_detail as b on a.reporting_work_id = b.reporting_work_id |
| | | where this_process=#{previousProcess} and reviewed_state=0 and process_id= #{processIdStr} |
| | | and POSITION(b.technology_number in #{technologyStr}) |
| | | GROUP BY a.reporting_work_id,b.order_number,b.technology_number |
| | | ) as rws |
| | | on rws.process_id = fc.process_id and rws.order_number=fc.order_number and rws.technology_number=fc.technology_number |
| | | WHERE |
| | | fc.process_id = #{processIdStr} |
| | | <if test="process != '中空' and process != '夹胶' and process != '包装' and process != '打胶和粘框' "> |
| | | AND POSITION(fc.technology_number in #{technologyStr}) |
| | | </if> |
| | | AND odpd.process = #{process} |
| | | and rws.reviewed_state=0 |
| | | order by fc.order_number |
| | | </select> |
| | | </mapper> |