From 930d29f39d115fe76c305af4320c2acbcb30c445 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期四, 12 六月 2025 10:37:37 +0800
Subject: [PATCH] 优化SQL
---
igds-core/src/main/java/com/ld/igds/m/view/QualityManager.view.xml | 316 +++++++++++++++++++++++++++++++++++++--------------
1 files changed, 227 insertions(+), 89 deletions(-)
diff --git a/igds-core/src/main/java/com/ld/igds/m/view/QualityManager.view.xml b/igds-core/src/main/java/com/ld/igds/m/view/QualityManager.view.xml
index 3359796..611f58f 100644
--- a/igds-core/src/main/java/com/ld/igds/m/view/QualityManager.view.xml
+++ b/igds-core/src/main/java/com/ld/igds/m/view/QualityManager.view.xml
@@ -46,17 +46,6 @@
</Property>
<Property name="label">绮绛夌骇</Property>
</PropertyDef>
- <PropertyDef name="foodType">
- <Property name="label">绮鎬ц川</Property>
- <Property name="mapping">
- <Property name="mapValues">${dorado.getDataProvider("dicTriggerPR#dicTrigger").getResult("FOOD_TYPE_")}</Property>
- <Property name="keyProperty">code</Property>
- <Property name="valueProperty">name</Property>
- </Property>
- </PropertyDef>
- <PropertyDef name="foodLocation">
- <Property name="label">绮浜у湴</Property>
- </PropertyDef>
<PropertyDef name="type">
<Property name="label">妫�楠岀被鍒�</Property>
<Property name="mapping">
@@ -80,30 +69,35 @@
</PropertyDef>
<PropertyDef name="time">
<Property name="label">妫�楠屾椂闂�</Property>
- <Property name="dataType">Date</Property>
+ <Property name="dataType">DateTime</Property>
+ <Property name="required">true</Property>
</PropertyDef>
<PropertyDef name="result">
<Property name="label">妫�楠岀粨璁�</Property>
+ <Property name="required">true</Property>
</PropertyDef>
<PropertyDef name="checkArea">
<Property name="label">鎵︽牱鍖哄煙</Property>
</PropertyDef>
<PropertyDef name="checkUser">
<Property name="label">鎵︽牱浜�</Property>
+ <Property name="required">true</Property>
</PropertyDef>
<PropertyDef name="ypsl">
<Property name="label">鏍峰搧鏁伴噺</Property>
<Property name="dataType">Double</Property>
<Property name="displayFormat">0.## KG</Property>
+ <Property name="required">true</Property>
</PropertyDef>
<PropertyDef name="checkTime">
<Property name="label">鎵︽牱鏃堕棿</Property>
<Property name="dataType">Date</Property>
</PropertyDef>
<PropertyDef name="dbsl">
- <Property name="label">鏍峰搧浠h〃鏁伴噺</Property>
+ <Property name="label">浠h〃鏁伴噺</Property>
<Property name="dataType">Double</Property>
<Property name="displayFormat">0.## KG</Property>
+ <Property name="required">true</Property>
</PropertyDef>
<PropertyDef name="ypdj">
<Property name="label">鏍峰搧绛夌骇</Property>
@@ -112,6 +106,7 @@
<Property name="keyProperty">code</Property>
<Property name="valueProperty">name</Property>
</Property>
+ <Property name="required">true</Property>
</PropertyDef>
<PropertyDef name="normalYear">
<Property name="label">姝e父瀛樺偍骞撮檺</Property>
@@ -142,10 +137,12 @@
<PropertyDef name="unit">
<Property></Property>
<Property name="label">妫�楠屽崟浣�</Property>
+ <Property name="required">true</Property>
</PropertyDef>
<PropertyDef name="zblb">
<Property></Property>
<Property name="label">鎸囨爣绫诲埆</Property>
+ <Property name="required">true</Property>
</PropertyDef>
<PropertyDef name="qfrq">
<Property name="dataType">Date</Property>
@@ -158,6 +155,7 @@
<PropertyDef name="shrxm">
<Property></Property>
<Property name="label">瀹℃牳浜哄鍚�</Property>
+ <Property name="required">true</Property>
</PropertyDef>
<PropertyDef name="qydbh">
<Property></Property>
@@ -170,10 +168,55 @@
<PropertyDef name="ypbh">
<Property></Property>
<Property name="label">鏍峰搧缂栧彿</Property>
+ <Property name="required">true</Property>
</PropertyDef>
<PropertyDef name="updateTime">
<Property name="dataType">Date</Property>
<Property name="label">鏁版嵁鏇存柊鏃堕棿</Property>
+ </PropertyDef>
+ <PropertyDef name="spaqzbsfhg">
+ <Property></Property>
+ <Property name="label">椋熷搧鏄惁鍚堟牸</Property>
+ <Property name="mapping">
+ <Property name="keyProperty">code</Property>
+ <Property name="valueProperty">name</Property>
+ <Property name="mapValues">
+ <Collection>
+ <Entity>
+ <Property name="name">0-涓嶅悎鏍�</Property>
+ <Property name="code">0</Property>
+ </Entity>
+ <Entity>
+ <Property name="name">1-鍚堟牸</Property>
+ <Property name="code">1</Property>
+ </Entity>
+ </Collection>
+ </Property>
+ </Property>
+ <Property name="required">true</Property>
+ </PropertyDef>
+ <PropertyDef name="reportType">
+ <Property name="label">鎶ュ憡绫诲瀷</Property>
+ <Property name="mapping">
+ <Property name="keyProperty">code</Property>
+ <Property name="valueProperty">name</Property>
+ <Property name="mapValues">
+ <Collection>
+ <Entity>
+ <Property name="name">1-鍗曚綅妫�楠�</Property>
+ <Property name="code">1</Property>
+ </Entity>
+ <Entity>
+ <Property name="name">2-鏁翠綋妫�楠�(鍔犳潈骞冲潎)</Property>
+ <Property name="code">2</Property>
+ </Entity>
+ <Entity>
+ <Property name="name">3-鍏朵粬</Property>
+ <Property name="code">3</Property>
+ </Entity>
+ </Collection>
+ </Property>
+ </Property>
</PropertyDef>
<Reference name="checkItems">
<Property name="dataProvider">checkStandardPR#listCheckItemsByParam</Property>
@@ -186,6 +229,20 @@
</Entity>
</Property>
</Reference>
+ <PropertyDef name="fileId">
+ <Property></Property>
+ <Property name="label">闄勪欢id</Property>
+ </PropertyDef>
+ <PropertyDef name="fileName">
+ <Property></Property>
+ <Property name="label">闄勪欢鍚嶇О</Property>
+ <Property name="readOnly">true</Property>
+ </PropertyDef>
+ <PropertyDef name="fileTime">
+ <Property name="dataType">DateTime</Property>
+ <Property name="label">闄勪欢涓婁紶鏃堕棿</Property>
+ <Property name="readOnly">true</Property>
+ </PropertyDef>
</DataType>
<DataType name="dtQualityParam">
<PropertyDef name="depotId">
@@ -248,7 +305,7 @@
<Property name="label">妫�娴嬪��</Property>
</PropertyDef>
<PropertyDef name="remarks">
- <Property name="label">鍖栭獙缁撴灉</Property>
+ <Property name="label">澶囨敞</Property>
</PropertyDef>
<PropertyDef name="operaSymbolValue">
<Property></Property>
@@ -452,10 +509,9 @@
view.get("#ajaxGetDepot").set("parameter",depotId).execute(function(result){
if(result){
var data = view.get("#dsMain.data:#");
- data.set("foodLocation",result.foodLocation);
data.set("foodLevel",result.foodLevel);
data.set("foodVariety",result.foodVariety);
- data.set("foodType",result.foodType);
+ data.set("storeDate",result.storeDate);
}
});
};
@@ -467,8 +523,29 @@
data.set("checkItems",result);
}
}); 
-}; </ClientEvent>
+};
+/**
+ * 棰勮PDF鏂囦欢
+ */
+showFilePdf = function(){
+ var cur = view.get("#dsMain.data:#");
+ var fileName = cur.get("fileId");
+ var fileTime = new Date(cur.get("fileTime")).formatDate("y-m-d H:i:s");
+ if(!fileName){
+ $alert("娌℃湁鑾峰彇鍒版枃浠跺悕绉帮紝鏃犳硶棰勮銆�");
+ return;
+ }
+ if(!cur.get("fileTime")){
+ $alert("娌℃湁鑾峰彇鍒伴檮浠朵笂浼犳椂闂达紝鏃犳硶璁块棶銆�");
+ return;
+ }
+ 
+ var url = "./basic/file/show-pdf?fileName="+fileName+"&fileTime="+fileTime+"&filePathType=common";
+ 
+ window.open(url, "_blank");
+};</ClientEvent>
<Property name="packages">font-awesome,css-common</Property>
+ <Property name="javaScriptFile">./static/plugins/lodop/LodopFuncs.js</Property>
<DataSet id="dsMain">
<Property name="loadMode">lazy</Property>
<Property name="dataProvider">qualityManagerPR#listQuality</Property>
@@ -532,9 +609,9 @@
</Button>
<Button layoutConstraint="left">
<ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
- if(data){
- view.get("#dialogMain").show();
- }
+if(data){
+ view.get("#dialogMain").show();
+}
</ClientEvent>
<Property name="caption">淇敼</Property>
<Property name="exClassName">btn-warm</Property>
@@ -562,8 +639,25 @@
<ClientEvent name="onClick">view.get("#dsMain").flushAsync();
</ClientEvent>
<Property name="caption">鍒锋柊</Property>
- <Property name="exClassName">btn-default</Property>
- <Property name="iconClass">fa fa-refresh</Property>
+ <Property name="exClassName">btn-warm</Property>
+ <Property name="iconClass">fa fa-print</Property>
+ </Button>
+ <Button layoutConstraint="left">
+ <ClientEvent name="onClick">showFilePdf();</ClientEvent>
+ <Property name="exClassName">btn-normal</Property>
+ <Property name="caption">鏌ョ湅璐ㄦ闄勪欢</Property>
+ <Property name="iconClass">fa fa-picture-o</Property>
+ </Button>
+ <Button layoutConstraint="left">
+ <ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
+if (!data) {
+ $alert("璇峰厛閫夋嫨鏁版嵁锛�");
+ return;
+}
+printBill();</ClientEvent>
+ <Property name="caption">鎵撳嵃璐ㄦ鎶ュ憡</Property>
+ <Property name="exClassName">btn-warm</Property>
+ <Property name="iconClass">fa fa-print</Property>
</Button>
</Container>
<Container layout="regionPadding:10" layoutConstraint="center">
@@ -597,8 +691,7 @@
<Container layout="hbox regionPadding:15">
<Button layoutConstraint="left">
<ClientEvent name="onClick">var param = view.get("#dsParam.data");
- view.get("#dsMain").set("parameter",param.toJSON()).flushAsync();
- </ClientEvent>
+view.get("#dsMain").set("parameter",param.toJSON()).flushAsync(); </ClientEvent>
<Property name="caption">鏌ヨ</Property>
<Property name="exClassName">btn-default</Property>
<Property name="iconClass">fa fa-refresh</Property>
@@ -694,14 +787,13 @@
<Buttons>
<Button>
<ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
- if(data.validate() != 'ok'){
- $notify("鏁版嵁鏍¢獙澶辫触锛侊紒");
- return;
- }
- view.get("#uaAction").set("parameter",data).execute(function(){
- self.get("parent").hide();
- });
- </ClientEvent>
+if(data.validate() != 'ok'){
+ $notify("鏁版嵁鏍¢獙澶辫触锛侊紒");
+ return;
+ }
+ view.get("#uaAction").set("parameter",data).execute(function(){
+ self.get("parent").hide();
+}); </ClientEvent>
<Property name="caption">淇濆瓨</Property>
<Property name="iconClass">fa fa-check</Property>
<Property name="exClassName">btn-normal</Property>
@@ -725,7 +817,7 @@
<Property name="readOnly">false</Property>
<Property name="labelSeparator">:</Property>
<Property name="labelAlign">right</Property>
- <Property name="cols">*,*,*</Property>
+ <Property name="cols">*,*,*,*</Property>
<Property name="labelWidth">120</Property>
<AutoFormElement>
<Property name="name">depotId</Property>
@@ -804,6 +896,39 @@
<Property name="property">ypdj</Property>
<Editor/>
</AutoFormElement>
+ <AutoFormElement layoutConstraint="colSpan:1">
+ <Property name="name">storeDate</Property>
+ <Property name="property">storeDate</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement layoutConstraint="colSpan:1">
+ <Property name="name">result</Property>
+ <Property name="property">result</Property>
+ <Editor>
+ <TagEditor>
+ <Property name="availableTagsDataPath">.name</Property>
+ <Property name="availableTagsDataSet">dsResult</Property>
+ <Property name="textSeperator">#</Property>
+ </TagEditor>
+ </Editor>
+ </AutoFormElement>
+ <Label layoutConstraint="colSpan:3">
+ <Property name="text">璇存槑锛氬椤规寚鏍囨椂鎸夌収1:璐ㄩ噺鎸囨爣妫�楠�(杈炬爣,涓嶈揪鏍�)銆�2:鍌ㄥ瓨鍝佽川妫�楠�(瀹滃瓨,涓嶅疁瀛�)銆�3:椋熷搧瀹夊叏妫�楠�(鍚堟牸,涓嶅悎鏍�)杩欎釜椤哄簭濉啓妫�楠岀粨璁�</Property>
+ <Property name="style">
+ <Property name="color">blue</Property>
+ </Property>
+ </Label>
+ <AutoFormElement layoutConstraint="colSpan:2">
+ <Property name="name">zblb</Property>
+ <Property name="property">zblb</Property>
+ <Editor>
+ <TagEditor>
+ <Property name="textSeperator">#</Property>
+ <Property name="availableTagsDataSet">dsMetrics</Property>
+ <Property name="availableTagsDataPath">.name</Property>
+ </TagEditor>
+ </Editor>
+ </AutoFormElement>
<AutoFormElement>
<Property name="name">normalYear</Property>
<Property name="property">normalYear</Property>
@@ -820,39 +945,58 @@
</RadioGroup>
</Editor>
</AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">qydbh</Property>
+ <Property name="property">qydbh</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">ypbh</Property>
+ <Property name="property">ypbh</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">spaqzbsfhg</Property>
+ <Property name="property">spaqzbsfhg</Property>
+ <Editor/>
+ </AutoFormElement>
<AutoFormElement layoutConstraint="colSpan:2">
- <Property name="name">zblb</Property>
- <Property name="property">zblb</Property>
- <Editor>
- <TagEditor>
- <Property name="textSeperator">#</Property>
- <Property name="availableTagsDataSet">dsMetrics</Property>
- <Property name="availableTagsDataPath">.name</Property>
- </TagEditor>
- </Editor>
- </AutoFormElement>
- <AutoFormElement layoutConstraint="colSpan:1">
- <Property name="name">result</Property>
- <Property name="property">result</Property>
- <Editor>
- <TagEditor>
- <Property name="availableTagsDataPath">.name</Property>
- <Property name="availableTagsDataSet">dsResult</Property>
- <Property name="textSeperator">#</Property>
- </TagEditor>
- </Editor>
- </AutoFormElement>
- <Label layoutConstraint="colSpan:2">
- <Property name="text">璇存槑锛氬椤规寚鏍囨椂鎸夌収1:璐ㄩ噺鎸囨爣妫�楠�(杈炬爣,涓嶈揪鏍�)銆�2:鍌ㄥ瓨鍝佽川妫�楠�(瀹滃瓨,涓嶅疁瀛�)銆�3:椋熷搧瀹夊叏妫�楠�(鍚堟牸,涓嶅悎鏍�)杩欎釜椤哄簭濉啓妫�楠岀粨璁�</Property>
- <Property name="style">
- <Property name="color">blue</Property>
- </Property>
- </Label>
- <AutoFormElement layoutConstraint="colSpan:3">
<Property name="name">remark</Property>
<Property name="property">remark</Property>
<Editor/>
</AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">reportType</Property>
+ <Property name="property">reportType</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">fileName</Property>
+ <Property name="property">fileName</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement>
+ <Property name="name">fileTime</Property>
+ <Property name="property">fileTime</Property>
+ <Editor/>
+ </AutoFormElement>
+ <Container>
+ <Button layoutConstraint="left">
+ <Property name="action">uploadFile</Property>
+ <Property name="caption">闄勪欢涓婁紶...</Property>
+ <Property name="exClassName">btn-default</Property>
+ <Property name="iconClass">fa fa-cloud-upload</Property>
+ </Button>
+ <Label layoutConstraint="left">
+ <Property name="width">10px</Property>
+ </Label>
+ <Button layoutConstraint="left">
+ <ClientEvent name="onClick">showFilePdf();</ClientEvent>
+ <Property name="exClassName">btn-normal</Property>
+ <Property name="caption">棰勮</Property>
+ <Property name="iconClass">fa fa-picture-o</Property>
+ </Button>
+ </Container>
</AutoForm>
</Children>
</FieldSet>
@@ -918,33 +1062,6 @@
<Property name="align">center</Property>
<Property name="readOnly">true</Property>
</DataColumn>
- <DataColumn name="operaSymbolValue">
- <Property name="property">operaSymbolValue</Property>
- <Property name="align">center</Property>
- <Property name="caption">鏍囧噯鍊�</Property>
- <Property name="readOnly">true</Property>
- </DataColumn>
- <DataColumn name="deNum">
- <Property name="property">deNum</Property>
- <Property name="align">center</Property>
- </DataColumn>
- <DataColumn name="addNum">
- <Property name="property">addNum</Property>
- <Property name="align">center</Property>
- </DataColumn>
- <DataColumn name="dePrice">
- <Property name="property">dePrice</Property>
- <Property name="align">center</Property>
- </DataColumn>
- <DataColumn name="addPrice">
- <Property name="property">addPrice</Property>
- <Property name="align">center</Property>
- </DataColumn>
- <DataColumn name="result">
- <Property name="property">result</Property>
- <Property name="align">center</Property>
- <Property name="readOnly">true</Property>
- </DataColumn>
<DataColumn name="remarks">
<Property name="property">remarks</Property>
<Property name="align">center</Property>
@@ -990,7 +1107,7 @@
</TextEditor>
<Button>
<ClientEvent name="onClick">var key = view.get("#key2.value");
- view.get("#dsFoodOrigin").set("parameter",{key:key}).flushAsync();
+view.get("#dsFoodOrigin").set("parameter",{key:key}).flushAsync();
</ClientEvent>
<Property name="caption">鏌ヨ</Property>
<Property name="iconClass">fa fa-search</Property>
@@ -1047,5 +1164,26 @@
<Property name="property">cname</Property>
<Property name="assignmentMap">user=cname</Property>
</DataSetDropDown>
+ <AjaxAction id="ajaxQualityPrint">
+ <Property name="service">qualityManagerPR#printQualityBill</Property>
+ <Property name="executingMessage">姝e湪鎵ц鎵撳嵃鈥︹��</Property>
+ </AjaxAction>
+ <UploadAction id="uploadFile">
+ <ClientEvent name="onFileUploaded">var fileId = arg.returnValue;
+ if(fileId==("10")){
+ $alert("涓婁紶澶辫触锛氶檮浠跺悕绉颁负绌恒��");
+ return;
+ }
+ if(fileId==("20")){
+ $alert("涓婁紶澶辫触锛氶檮浠朵笉鏄痯df鏂囦欢銆�");
+ return;
+ }
+var data = view.get("#dsMain.data:#");
+data.set("fileId",fileId);
+data.set("fileName",arg.file.name);
+data.set("fileTime",new Date);</ClientEvent>
+ <Property name="fileResolver">myUploadProcessor#uploadCommonFile</Property>
+ <Filters/>
+ </UploadAction>
</View>
</ViewConfig>
--
Gitblit v1.9.3