From e782a347e59a182b4807efff70ac8ab5998eddc4 Mon Sep 17 00:00:00 2001 From: "DESKTOP-5DIJMF9\\admin" <2388969634@qq.com> Date: Fri, 3 Jan 2025 14:38:11 +0800 Subject: [PATCH] =?UTF-8?q?opt:=E4=BF=AE=E6=94=B9=E7=BB=84=E7=9B=98?= =?UTF-8?q?=E7=89=A9=E6=96=99=E6=9D=A1=E7=A0=81=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/md/pb/group_mater_print_query.jsp | 47 +++++++++---------- .../products/mes/md/pb/mater_print_set.jsp | 16 +++++-- .../products/mes/md/pb/pk_receivr_print.jsp | 22 ++++----- lxapp/src/wql/mes/md/pb/QSTORC_QC_DY.wql | 4 +- lxapp/src/wql/mes/md/pb/QSTORC_ZPWLBQ_01.wql | 12 ++--- lxapp/src/wql/mes/st/is/ST_IS_ISSUE_01.wql | 21 --------- .../md/pb/GroupMaterPrintServiceImpl.java | 12 +++-- .../md/pb/ProductGroupServiceImpl.java | 6 +-- 8 files changed, 63 insertions(+), 77 deletions(-) diff --git a/lxapp/app/products/mes/md/pb/group_mater_print_query.jsp b/lxapp/app/products/mes/md/pb/group_mater_print_query.jsp index 5ee4d61..0b07810 100644 --- a/lxapp/app/products/mes/md/pb/group_mater_print_query.jsp +++ b/lxapp/app/products/mes/md/pb/group_mater_print_query.jsp @@ -115,7 +115,6 @@ var fieldValues = $.getFieldValue({ formid : 'search_form' }); - debugger; var dataParam = { _SRVNAME : 'server.store.GroupMaterPrint', _SRVMETHOD : 'pageQueryList', @@ -288,18 +287,17 @@ } function print(data1) { - debugger; /* var data1 = { - param1:'HAE00254' - ,param2:'09月' - ,param3:'對中裝置, SWS9751 8-E1-A1-AB-LR WOB=2400' - ,param4:'载具:' - ,param5:'数量:' - ,param6:'01#HAE00175##1060' - ,param7:'工厂:1060' - ,param8:'库区:1043' - ,param9:'批次:20200913' - ,param10:'单号:5400000380' + param1 : rowsdtl[i].material_code, + param2 : month, + param3 : rowsdtl[i].material_name, + param4 : '载具:'+rowsdtl[i].carrier_no, + param5 : '数量:'+currentqty + rowsdtl[i].unit_name, + param7 : '工厂:'+rowsdtl[i].factory_code, + param8 : '库区:'+rowsdtl[i].ext_id, + param9 : '批次:'+rowsdtl[i].pcsn, + param10 : '单号:'+rowsdtl[i].po_code, + param11 : '收货人:'+rowsdtl[i].person_name }; */ var LODOP = init_Print({ @@ -312,42 +310,43 @@ //第一行 第一个参数 //LODOP.SET_PRINT_STYLEA(2,"FontName","隶书"); + LODOP.SET_PRINT_STYLE("FontSize", 24); + LODOP.SET_PRINT_STYLE("Bold", 1); + LODOP.ADD_PRINT_TEXT('2mm', '2mm', '58mm', '10mm', data1.param1); LODOP.SET_PRINT_STYLE("FontSize", 25); LODOP.SET_PRINT_STYLE("Bold", 1); - LODOP.ADD_PRINT_TEXT('2mm', '2mm', '50mm', '10mm', data1.param1); - //第一行 第二个参数 LODOP.ADD_PRINT_TEXT('2mm', '60mm', '30mm', '10mm', data1.param2); //第二行 第一个参数 - LODOP.SET_PRINT_STYLE("FontSize", 10); + LODOP.SET_PRINT_STYLE("FontSize", 11); LODOP.SET_PRINT_STYLE("Bold", 0); LODOP.ADD_PRINT_TEXT('10mm', '2mm', '80mm', '16mm', data1.param3); //第二行 第二个参数 - LODOP.SET_PRINT_STYLE("FontSize", 15); - LODOP.ADD_PRINT_TEXT('18mm', '2mm', '50mm', '18mm', data1.param4); + LODOP.SET_PRINT_STYLE("FontSize", 14); + LODOP.ADD_PRINT_TEXT('23mm', '2mm', '50mm', '18mm', data1.param4); //第三行 第一个参数 - LODOP.SET_PRINT_STYLE("FontSize", 15); + LODOP.SET_PRINT_STYLE("FontSize", 14); LODOP.SET_PRINT_STYLE("Bold", 0); - LODOP.ADD_PRINT_TEXT('24mm', '2mm', '50mm', '16mm', data1.param5); + LODOP.ADD_PRINT_TEXT('28mm', '2mm', '50mm', '16mm', data1.param5); //第四行 第一个参数 LODOP.SET_PRINT_STYLE("FontSize", 11); LODOP.SET_PRINT_STYLE("Bold", 0); - LODOP.ADD_PRINT_TEXT('30mm', '2mm', '60mm', '8mm', data1.param7); + LODOP.ADD_PRINT_TEXT('34mm', '2mm', '60mm', '8mm', data1.param7); //第五行 第一个参数 - LODOP.ADD_PRINT_TEXT('30mm', '25mm', '60mm', '8mm', data1.param8); + LODOP.ADD_PRINT_TEXT('34mm', '25mm', '60mm', '8mm', data1.param8); - LODOP.ADD_PRINT_TEXT('35mm', '2mm', '60mm', '8mm', data1.param9); + LODOP.ADD_PRINT_TEXT('38mm', '2mm', '60mm', '8mm', data1.param9); - LODOP.ADD_PRINT_TEXT('41mm', '2mm', '60mm', '8mm', data1.param10); + LODOP.ADD_PRINT_TEXT('42mm', '2mm', '60mm', '8mm', data1.param10); LODOP.ADD_PRINT_TEXT('46mm', '2mm', '60mm', '8mm', data1.param11); //打印二维码 - LODOP.ADD_PRINT_BARCODE('18mm', '45mm', '37mm', '37mm', "QRCode", + LODOP.ADD_PRINT_BARCODE('20mm', '45mm', '37mm', '37mm', "QRCode", data1.param6); //LODOP.SET_PRINT_STYLEA(0,"GroundColor","#0080FF"); LODOP.PRINT(); diff --git a/lxapp/app/products/mes/md/pb/mater_print_set.jsp b/lxapp/app/products/mes/md/pb/mater_print_set.jsp index ce68b07..537abe8 100644 --- a/lxapp/app/products/mes/md/pb/mater_print_set.jsp +++ b/lxapp/app/products/mes/md/pb/mater_print_set.jsp @@ -95,25 +95,31 @@ //LODOP.SET_PRINT_STYLEA(2,"FontName","隶书"); LODOP.SET_PRINT_STYLE("FontSize",18); LODOP.SET_PRINT_STYLE("Bold",1); + /* param1:'R30501030148' + ,param2:print_rows[i].material_name + ,param3:'01#'+print_rows[i].material_code+'#'+'#'+factory_code + ,param4:'工厂:'+factory_code + ,param5:'库区:'+ext_id + ,param6:date */ //离纸张顶端5mm,距左边5mm,宽30mm,高15mm,打印内容位data.param1 LODOP.ADD_PRINT_TEXT('5mm','5mm','45mm','15mm',data.param1); //第二行 第一个参数 LODOP.SET_PRINT_STYLE("FontSize",12); - LODOP.ADD_PRINT_TEXT('15mm','5mm','80mm','20mm',data.param2); + LODOP.ADD_PRINT_TEXT('12mm','5mm','80mm','20mm',data.param2); LODOP.SET_PRINT_STYLE("FontSize",12); - LODOP.ADD_PRINT_TEXT('25mm','5mm','45mm','20mm',data.param4); + LODOP.ADD_PRINT_TEXT('30mm','5mm','45mm','20mm',data.param4); LODOP.SET_PRINT_STYLE("FontSize",12); - LODOP.ADD_PRINT_TEXT('35mm','5mm','45mm','20mm',data.param5); + LODOP.ADD_PRINT_TEXT('37mm','5mm','45mm','20mm',data.param5); LODOP.SET_PRINT_STYLE("FontSize",12); - LODOP.ADD_PRINT_TEXT('45mm','5mm','45mm','20mm',data.param6); + LODOP.ADD_PRINT_TEXT('44mm','5mm','45mm','20mm',data.param6); //打印二维码 - LODOP.ADD_PRINT_BARCODE('20mm','40mm','35mm','35mm',"QRCode",data.param3); + LODOP.ADD_PRINT_BARCODE('26mm','40mm','35mm','35mm',"QRCode",data.param3); //LODOP.SET_PRINT_STYLEA(0,"GroundColor","#0080FF"); LODOP.PRINT(); diff --git a/lxapp/app/products/mes/md/pb/pk_receivr_print.jsp b/lxapp/app/products/mes/md/pb/pk_receivr_print.jsp index 49b7aee..4cafa66 100644 --- a/lxapp/app/products/mes/md/pb/pk_receivr_print.jsp +++ b/lxapp/app/products/mes/md/pb/pk_receivr_print.jsp @@ -104,7 +104,6 @@ } function print_carrier(){ - debugger; var rows = $.grid_getChecked({id : _gridid}); if(rows==null ||rows.length==0){ alert("请至少勾选一条数据进行打印"); @@ -122,7 +121,6 @@ else var currentqty = Number(rows[i].confirm_qty) .toFixed(0); - debugger; var data = { param1 : rows[i].material_code, param2 : month, @@ -139,14 +137,12 @@ param10 : '单号:'+rows[i].po_code, param11 : '收货人:'+rows[i].person_name } - print(data); print(data); } alert('打印成功!'); } function print(data1) { - debugger; /* var data1 = { param1:'HAE00254' ,param2:'09月' @@ -170,27 +166,27 @@ //第一行 第一个参数 //LODOP.SET_PRINT_STYLEA(2,"FontName","隶书"); + LODOP.SET_PRINT_STYLE("FontSize", 24); + LODOP.SET_PRINT_STYLE("Bold", 1); + LODOP.ADD_PRINT_TEXT('2mm', '2mm', '58mm', '10mm', data1.param1); LODOP.SET_PRINT_STYLE("FontSize", 25); LODOP.SET_PRINT_STYLE("Bold", 1); - LODOP.ADD_PRINT_TEXT('2mm', '2mm', '50mm', '10mm', data1.param1); - //第一行 第二个参数 LODOP.ADD_PRINT_TEXT('2mm', '60mm', '30mm', '10mm', data1.param2); //第二行 第一个参数 - LODOP.SET_PRINT_STYLE("FontSize", 10); + LODOP.SET_PRINT_STYLE("FontSize", 11); LODOP.SET_PRINT_STYLE("Bold", 0); LODOP.ADD_PRINT_TEXT('10mm', '2mm', '80mm', '20mm', data1.param3); //第二行 第二个参数 LODOP.SET_PRINT_STYLE("FontSize", 15); - LODOP.ADD_PRINT_TEXT('20mm', '2mm', '50mm', '20mm', data1.param4); + LODOP.ADD_PRINT_TEXT('22mm', '2mm', '50mm', '20mm', data1.param4); //第三行 第一个参数 LODOP.SET_PRINT_STYLE("FontSize", 15); LODOP.SET_PRINT_STYLE("Bold", 0); - LODOP.ADD_PRINT_TEXT('27mm', '2mm', '50mm', '20mm', data1.param5); - // LODOP.ADD_PRINT_TEXT('33mm','25mm','20mm','20mm','台'); + LODOP.ADD_PRINT_TEXT('28mm', '2mm', '50mm', '20mm', data1.param5); //第四行 第一个参数 LODOP.SET_PRINT_STYLE("FontSize", 11); @@ -200,11 +196,11 @@ //第五行 第一个参数 LODOP.ADD_PRINT_TEXT('35mm', '25mm', '60mm', '10mm', data1.param8); - LODOP.ADD_PRINT_TEXT('42mm', '2mm', '60mm', '10mm', data1.param9); + LODOP.ADD_PRINT_TEXT('40mm', '2mm', '60mm', '10mm', data1.param9); - LODOP.ADD_PRINT_TEXT('49mm', '2mm', '60mm', '20mm', data1.param10); + LODOP.ADD_PRINT_TEXT('46mm', '2mm', '60mm', '20mm', data1.param10); - LODOP.ADD_PRINT_TEXT('55mm', '2mm', '60mm', '20mm', data1.param11); + LODOP.ADD_PRINT_TEXT('52mm', '2mm', '60mm', '20mm', data1.param11); //打印二维码 LODOP.ADD_PRINT_BARCODE('20mm', '45mm', '37mm', '37mm', "QRCode", diff --git a/lxapp/src/wql/mes/md/pb/QSTORC_QC_DY.wql b/lxapp/src/wql/mes/md/pb/QSTORC_QC_DY.wql index 10b2671..ff84b8b 100644 --- a/lxapp/src/wql/mes/md/pb/QSTORC_QC_DY.wql +++ b/lxapp/src/wql/mes/md/pb/QSTORC_QC_DY.wql @@ -184,8 +184,8 @@ rm.remark, po_code = ( case when - rd.inv_type = 'PO' then rd.inv_code - else '' + ISNULL(rd.inv_code,'')<>'' then rd.inv_code + else rd.receive_code end ), '' AS carrier_no, diff --git a/lxapp/src/wql/mes/md/pb/QSTORC_ZPWLBQ_01.wql b/lxapp/src/wql/mes/md/pb/QSTORC_ZPWLBQ_01.wql index b9e983b..bb6d27a 100644 --- a/lxapp/src/wql/mes/md/pb/QSTORC_ZPWLBQ_01.wql +++ b/lxapp/src/wql/mes/md/pb/QSTORC_ZPWLBQ_01.wql @@ -78,7 +78,7 @@ WHERE cm.status = '0' OPTION 输入.group_type = "01" - cm.inv_type IN ('31','32','34','35','36') + cm.inv_type IN ('31','32','34','35','36','37') ENDOPTION OPTION 输入.group_type = "02" cm.inv_type IN ('33','42') @@ -150,7 +150,7 @@ WHERE cm.status = '0' OPTION 输入.group_type = "01" - cm.inv_type IN ('31','32','34','35','36') + cm.inv_type IN ('31','32','34','35','36','37') ENDOPTION OPTION 输入.group_type = "02" cm.inv_type IN ('33','42') @@ -220,7 +220,7 @@ WHERE cm.status = '0' and cm.inv_type IN ('61','11','18') OPTION 输入.group_type = "01" - cm.inv_type IN ('31','32','34','35','36') + cm.inv_type IN ('31','32','34','35','36','37') ENDOPTION OPTION 输入.group_type = "02" cm.inv_type IN ('33','42') @@ -301,7 +301,7 @@ WHERE cm.status = '0' and cm.inv_type IN ('12') OPTION 输入.group_type = "01" - cm.inv_type IN ('31','32','34','35','36') + cm.inv_type IN ('31','32','34','35','36','37') ENDOPTION OPTION 输入.group_type = "02" cm.inv_type IN ('33','42') @@ -379,7 +379,7 @@ LEFT JOIN view_sect_ext_id vs ON vs.sect_type = rd.sect_type LEFT JOIN view_sect_ext_id vs2 ON vs2.sect_uuid = rd.sect_uuid WHERE - cm.inv_type IN ( '31', '32', '33', '34', '35', '36' ) + cm.inv_type IN ( '31', '32', '33', '34', '35', '36','37' ) AND cm.status = '0' OPTION 输入.carrier_nosin <> "" cm.carrier_no IN (输入.carrier_nosin) @@ -538,7 +538,7 @@ FROM INNER JOIN MD_PB_MeasureUnit mu ON mu.measure_unit_uuid = mb.base_unit_uuid INNER JOIN MD_CS_Factory fa ON fa.factory_uuid = cm.factory_uuid WHERE - cm.inv_type NOT IN ( '31', '32', '33', '34', '35', '36','51','11','12','18','42','91','92','17' ) + cm.inv_type NOT IN ( '31', '32', '33', '34', '35', '36','37','51','11','12','18','42','91','92','17' ) AND cm.status = '0' OPTION 输入.carrier_nosin <> "" cm.carrier_no IN (输入.carrier_nosin) diff --git a/lxapp/src/wql/mes/st/is/ST_IS_ISSUE_01.wql b/lxapp/src/wql/mes/st/is/ST_IS_ISSUE_01.wql index 2bd6073..def493e 100644 --- a/lxapp/src/wql/mes/st/is/ST_IS_ISSUE_01.wql +++ b/lxapp/src/wql/mes/st/is/ST_IS_ISSUE_01.wql @@ -812,27 +812,6 @@ IF 输入.flag = "7" ENDIF -IF 输入.flag = "8" - PAGEQUERY - SELECT - min(bill.order_no) as order_no, - gro.group_code as group_code, - COUNT(DISTINCT bill.mater_id) as inv_qty, - sum (case when bill.audit_qty>0 then 1 else 0 end) as audit_qty - FROM - b_is_issue_bill bill - INNER JOIN b_bs_product_group gro on bill.group_id=gro.group_id - where 1=1 - OPTION 输入.stor_id <> "" - bill.stor_id = 输入.stor_id - ENDOPTION - GROUP BY - gro.group_code - ENDSELECT - ENDPAGEQUERY -ENDIF - - IF 输入.flag = "9" QUERY SELECT diff --git a/lxservice/com/noblelift/imp/products/mes/service/md/pb/GroupMaterPrintServiceImpl.java b/lxservice/com/noblelift/imp/products/mes/service/md/pb/GroupMaterPrintServiceImpl.java index 8353c09..29e3bf9 100644 --- a/lxservice/com/noblelift/imp/products/mes/service/md/pb/GroupMaterPrintServiceImpl.java +++ b/lxservice/com/noblelift/imp/products/mes/service/md/pb/GroupMaterPrintServiceImpl.java @@ -28,9 +28,15 @@ public class GroupMaterPrintServiceImpl implements GroupMaterPrintService { form.put("flag", "1"); // 构建查询参数 HashMap param = WDK.json2map(form); - param.put("searchBar", "%" + form.optString("searchBar") + "%"); - param.put("carrier_no", "%" + form.optString("carrier_no") + "%"); - param.put("material", "%" + form.optString("material") + "%"); + if (uString.isNotBlank(form.optString("searchBar"))) { + param.put("searchBar", "%" + form.optString("searchBar") + "%"); + } + if (uString.isNotBlank(form.optString("carrier_no"))) { + param.put("carrier_no", "%" + form.optString("carrier_no") + "%"); + } + if (uString.isNotBlank(form.optString("material"))) { + param.put("material", form.optString("material")); + } String date_begin = form.optString("date_begin"); String date_end = form.optString("date_end"); if (uString.isNotBlank(date_end)) { diff --git a/lxservice/com/noblelift/imp/products/mes/service/md/pb/ProductGroupServiceImpl.java b/lxservice/com/noblelift/imp/products/mes/service/md/pb/ProductGroupServiceImpl.java index d2ba813..d36cd52 100644 --- a/lxservice/com/noblelift/imp/products/mes/service/md/pb/ProductGroupServiceImpl.java +++ b/lxservice/com/noblelift/imp/products/mes/service/md/pb/ProductGroupServiceImpl.java @@ -83,12 +83,12 @@ public class ProductGroupServiceImpl implements ProductGroupService { WQLObject bwoCM = WQLObject.getWQLObject("ST_BS_WorkGroup"); for (int i = 0; i < allrows.size(); i++) { JSONObject joi = allrows.getJSONObject(i); - String group_id = joi.getString("group_id"); + String group_uuid = joi.getString("group_uuid"); int print_num_old = Integer - .parseInt(WdkUtil.getFieldByID("ST_BS_WorkGroup", "group_id", group_id, "print_times")); + .parseInt(WdkUtil.getFieldByID("ST_BS_WorkGroup", "group_uuid", group_uuid, "print_times")); HashMap mapCM = new HashMap(); mapCM.put("print_times", Integer.toString(print_num_old + 1)); - ResultBean rbCM = bwoCM.update(mapCM, "group_id = ? ", new String[] { group_id }); + ResultBean rbCM = bwoCM.update(mapCM, "group_uuid = ? ", new String[] { group_uuid }); }