From b4b15671788a5899ab144935c5084c2497acfd65 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期二, 06 一月 2026 16:31:43 +0800
Subject: [PATCH] 出库通知单优化修改
---
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeOut.view.xml | 54 +++++++++++++++++++++++++-
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java | 45 ++++++++++++++++++++--
2 files changed, 91 insertions(+), 8 deletions(-)
diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
index c06bd91..428f7a7 100644
--- a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
@@ -128,23 +128,21 @@
* @return
*/
public String saveOrUpdateIn(InoutNoticeIn data) {
- //濡傛灉鍏ュ簱閫氱煡鍗曠被鍨嬩负鑷缓閫氱煡鍗曪紝楠岃瘉浠撳簱鏄惁鏄湭瑙e帇寰椾粨搴擄紝鏄垯涓嶅厑璁镐繚瀛�
+ //濡傛灉鍏ュ簱閫氱煡鍗曠被鍨嬩负搴撳尯閫氱煡鍗曪紝楠岃瘉浠撳簱鏄惁鏄湭瑙e帇寰椾粨搴擄紝鏄垯涓嶅厑璁镐繚瀛�
//鑾峰彇鎵�鏈夎川鎶煎悎鍚屾暟鎹�
List<PledgeContract> pledgeContracts = pledgeContractService.listAll(null);
if("10".equals(data.getType())){
- //"搴撳尯閫氱煡鍗�"
//鍦ㄨ川鎶煎悎鍚屾壘鍒版湭瑙e帇锛屼笖璐ㄦ娂浠撳簱鍖呭惈褰撳墠浠撳簱鐨勬暟鎹�
for (PledgeContract pledgeContract : pledgeContracts) {
if(pledgeContract.getDepotIds().contains(data.getDepotId())){
if(pledgeContract.getStatus().equals(Constant.YN_N)){
- return "鍏ュ簱浠撳簱鎵�鍦ㄨ川鎶煎悎鍚屻��"+pledgeContract.getName()+"銆戞湭瑙e帇锛岃瑙e帇鍚庡啀淇濆瓨锛�";
+ return "鍏ュ簱浠撳簱鏈В鍘嬶紝鏃犳硶淇濆瓨锛�";
}
}
}
}
- //濡傛灉鍏ュ簱閫氱煡鍗曠被鍨嬩负閾惰閫氱煡鍗�
+ //濡傛灉鍏ュ簱閫氱煡鍗曠被鍨嬩负鐩戠閫氱煡鍗�
if("20".equals(data.getType())){
- //"鐩戠閫氱煡鍗�"
//1.楠岃瘉閾惰鏄惁濉啓锛屾湭濉啓锛屽垯涓嶅厑璁镐繚瀛�
if(StringUtils.isEmpty(data.getBankId())){
return "鐩戠潱閾惰涓嶈兘涓虹┖锛�";
@@ -280,6 +278,43 @@
* @return
*/
public String saveOrUpdateOut(InoutNoticeOut data) {
+ //濡傛灉鍑哄簱閫氱煡鍗曠被鍨嬩负搴撳尯閫氱煡鍗曪紝楠岃瘉浠撳簱鏄惁鏄湭瑙e帇寰椾粨搴擄紝鏄垯涓嶅厑璁镐繚瀛�
+ //鑾峰彇鎵�鏈夎川鎶煎悎鍚屾暟鎹�
+ List<PledgeContract> pledgeContracts = pledgeContractService.listAll(null);
+ if("10".equals(data.getType())){
+ //鍦ㄨ川鎶煎悎鍚屾壘鍒版湭瑙e帇锛屼笖璐ㄦ娂浠撳簱鍖呭惈褰撳墠浠撳簱鐨勬暟鎹�
+ for (PledgeContract pledgeContract : pledgeContracts) {
+ if(pledgeContract.getDepotIds().contains(data.getDepotId())){
+ if(pledgeContract.getStatus().equals(Constant.YN_N)){
+ return "鍑哄簱浠撳簱鏈В鍘嬶紝鏃犳硶淇濆瓨锛�";
+ }
+ }
+ }
+ }
+ //濡傛灉鍑哄簱閫氱煡鍗曠被鍨嬩负鐩戠閫氱煡鍗�
+ if("20".equals(data.getType())){
+ //1.楠岃瘉閾惰鏄惁濉啓锛屾湭濉啓锛屽垯涓嶅厑璁镐繚瀛�
+ if(StringUtils.isEmpty(data.getBankId())){
+ return "鐩戠潱閾惰涓嶈兘涓虹┖锛�";
+
+ }
+ //2.楠岃瘉閾惰鍜屼粨搴撶殑瀵瑰簲鍏崇郴鏄惁姝g‘锛屼笉姝g‘鍒欎笉鍏佽淇濆瓨
+ //鍦ㄨ川鎶煎悎鍚屾壘鍒版湭瑙e帇锛屼笖璐ㄦ娂浠撳簱鍖呭惈褰撳墠浠撳簱鐨� 閾惰-浠撳簱锛堣川鎶煎悎鍚屽叧绯伙級
+ Map<String, PledgeContract> bankDepotMap = new HashMap<>();
+ for (PledgeContract pledgeContract : pledgeContracts) {
+ if(pledgeContract.getDepotIds().contains(data.getDepotId())){
+ if(pledgeContract.getStatus().equals(Constant.YN_N)){
+ bankDepotMap.put(pledgeContract.getPledgeBank(), pledgeContract);
+ }
+ }
+ }
+ //鍦╩ap涓鎵惧尮閰嶉摱琛岀殑鏁版嵁锛屽鏋滄病鏈夊尮閰嶇殑鏁版嵁锛屽垯涓嶅厑璁镐繚瀛�
+ if(!bankDepotMap.containsKey(data.getBankId())){
+ return "鏈壘鍒板搴旂殑璐ㄦ娂鍚堝悓锛岃妫�鏌ョ洃鐫i摱琛屾垨鑰呭嚭搴撲粨搴撳~鍐欐槸鍚︽纭紒";
+
+ }
+ }
+
if (null == data.getUpdateBy()) {
data.setUpdateBy(ContextUtil.getLoginUserName());
data.setUpdateTime(new Date());
diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeOut.view.xml b/fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeOut.view.xml
index 8940d47..f19f133 100644
--- a/fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeOut.view.xml
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeOut.view.xml
@@ -58,7 +58,7 @@
<Property></Property>
<Property name="label">鍑哄簱浠撳簱</Property>
<Property name="mapping">
- <Property name="mapValues">${dorado.getDataProvider("deptPR#getDeptByUserType").getResult()}</Property>
+ <Property name="mapValues">${dorado.getDataProvider("depotPR#getData").getResult()}</Property>
<Property name="keyProperty">id</Property>
<Property name="valueProperty">name</Property>
</Property>
@@ -175,6 +175,16 @@
<Property></Property>
<Property name="label">鏇存柊浜�</Property>
</PropertyDef>
+ <PropertyDef name="bankId">
+ <Property></Property>
+ <Property name="label">鐩戠潱閾惰</Property>
+ <Property name="mapping">
+ <Property name="mapValues">${dorado.getDataProvider("bankPR#listAll").getResult()}</Property>
+ <Property name="keyProperty">id</Property>
+ <Property name="valueProperty">name</Property>
+ </Property>
+ <Property name="visible">true</Property>
+ </PropertyDef>
</DataType>
</Model>
<View layout="padding:10">
@@ -204,6 +214,12 @@
<Property name="dataType">dtNoticeParam</Property>
<Property name="dataProvider">inoutNoticePR#getYearQuery</Property>
<Property name="loadMode">manual</Property>
+ </DataSet>
+ <DataSet id="dsDepotList">
+ <Property name="dataProvider">depotPR#getData</Property>
+ <Property name="userData">浠撳簱鍒楄〃涓嬫媺妗�</Property>
+ <Property name="loadMode">manual</Property>
+ <Property name="dataType">[dtDepot]</Property>
</DataSet>
<Container>
<Property name="className">c-param</Property>
@@ -467,7 +483,13 @@
<AutoFormElement>
<Property name="name">type</Property>
<Property name="property">type</Property>
- <Property name="editorType">RadioGroup</Property>
+ <Property name="trigger">autoMappingDropDown1</Property>
+ <Editor/>
+ </AutoFormElement>
+ <AutoFormElement id="formItemBank">
+ <Property name="name">bankId</Property>
+ <Property name="property">bankId</Property>
+ <Property name="hideMode">visibility</Property>
<Editor/>
</AutoFormElement>
<AutoFormElement>
@@ -478,6 +500,7 @@
<AutoFormElement>
<Property name="name">depotId</Property>
<Property name="property">depotId</Property>
+ <Property name="trigger">dsDepotDropDown</Property>
<Editor/>
</AutoFormElement>
<AutoFormElement>
@@ -491,7 +514,7 @@
<Property name="trigger">defaultYearDropDown</Property>
<Editor/>
</AutoFormElement>
- <AutoFormElement>
+ <AutoFormElement layoutConstraint="colSpan:2">
<Property name="name">customerName</Property>
<Property name="property">customerName</Property>
<Editor/>
@@ -580,6 +603,31 @@
</Children>
<Tools/>
</Dialog>
+ <DataSetDropDown id="dsDepotDropDown">
+ <ClientEvent name="onOpen">
+var entity = view.get("#dsMain.data:#");
+if(!entity){
+ $alert("璇峰厛閫夋嫨鎵�灞炲垎搴�");
+}else{
+ var deptId = entity.get("deptId");
+ if(!deptId){
+ $alert("璇峰厛閫夋嫨鎵�灞炲垎搴�");
+ }else{
+ view.get("#dsDepotList").set("parameter",entity.get("deptId")).flushAsync();
+ }
+}</ClientEvent>
+ <Property name="dataSet">dsDepotList</Property>
+ <Property name="height">450</Property>
+ <Property name="autoOpen">true</Property>
+ <Property name="assignmentMap">depotId=id</Property>
+ <Property name="width">400</Property>
+ <DataColumn>
+ <Property name="align">center</Property>
+ <Property name="name">name</Property>
+ <Property name="property">name</Property>
+ <Editor/>
+ </DataColumn>
+ </DataSetDropDown>
<UpdateAction id="updateSave">
<Property name="dataResolver">inoutNoticePR#saveOut</Property>
<UpdateItem>
--
Gitblit v1.9.3