From a6013fee1895815cda77bfdcb5e5b9f4d190640b Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期日, 05 十一月 2023 00:08:35 +0800
Subject: [PATCH] 结算页面

---
 igds-inout/src/main/java/com/ld/igds/m/service/HCreditService.java     |    2 
 igds-inout/src/main/java/com/ld/igds/inout/service/HSettleService.java |  175 +++++++++
 igds-inout/src/main/java/com/ld/igds/inout/view/Settle.view.xml        |  848 ++++++++++++++++++++++++++++++++++++++++++++
 igds-inout/src/main/java/com/ld/igds/m/view/Credit.view.xml            |   18 
 igds-inout/src/main/java/com/ld/igds/inout/view/SettlePR.java          |   59 +++
 5 files changed, 1,091 insertions(+), 11 deletions(-)

diff --git a/igds-inout/src/main/java/com/ld/igds/inout/service/HSettleService.java b/igds-inout/src/main/java/com/ld/igds/inout/service/HSettleService.java
new file mode 100644
index 0000000..ca68ddf
--- /dev/null
+++ b/igds-inout/src/main/java/com/ld/igds/inout/service/HSettleService.java
@@ -0,0 +1,175 @@
+package com.ld.igds.inout.service;
+
+import com.bstek.bdf2.core.orm.hibernate.HibernateDao;
+import com.bstek.dorado.data.provider.Page;
+import com.ld.igds.check.dto.CheckItemData;
+import com.ld.igds.constant.RedisConst;
+import com.ld.igds.m.InoutManageUtil;
+import com.ld.igds.models.*;
+import com.ld.igds.models.InoutSettle;
+import com.ld.igds.util.ContextUtil;
+import com.ld.igds.util.DateUtil;
+import com.ld.igds.util.RedisUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.time.DateFormatUtils;
+import org.hibernate.Session;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Component
+public class HSettleService extends HibernateDao {
+
+    public static final String BEAN_ID = "hSettleServiceImpl";
+
+    public static final String CACHE_SETTLE_ID = "SETTLE_ID";
+
+    @Autowired
+    private RedisUtil redisUtil;
+
+    public void pageList(Page<InoutSettle> page, Map<String, Object> param)
+            throws Exception {
+
+        String hql = " from " + InoutSettle.class.getName()
+                + " where companyId=:companyId ";
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", ContextUtil.getCompanyId());
+
+        if (null != param) {
+            String str = (String) param.get("depotId");
+            if (StringUtils.isNotEmpty(str)) {
+                hql += " and depotId=:depotId ";
+                args.put("depotId", str);
+            }
+
+            str = (String) param.get("contractId");
+            if (StringUtils.isNotEmpty(str)) {
+                hql += " and contractId=:contractId ";
+                args.put("contractId", str);
+            }
+
+            str = (String) param.get("bizType");
+            if (StringUtils.isNotEmpty(str)) {
+                hql += " and bizType=:bizType ";
+                args.put("bizType", str);
+            }
+
+
+            str = (String) param.get("deptId");
+            if (StringUtils.isNotEmpty(str)) {
+                hql += " and deptId=:deptId ";
+                args.put("deptId", str);
+            }
+
+            Date date = (Date) param.get("start");
+            if (null != date) {
+                hql += " and payTime >= :start ";
+                args.put("start", DateUtil.getCurZero(date));
+            }
+
+            date = (Date) param.get("end");
+            if (null != date) {
+                hql += " and payTime <= :end ";
+                args.put("end", DateUtil.getNextZero(date));
+            }
+
+        }
+        String countHql = "select count(*) " + hql;
+        hql += " order by id desc ";
+        this.pagingQuery(page, hql, countHql, args);
+    }
+
+
+    public void saveData(InoutSettle data) {
+        Session session = this.getSessionFactory().openSession();
+        if (StringUtils.isEmpty(data.getCompanyId())) {
+            data.setCompanyId(ContextUtil.getCompanyId());
+        }
+        if (StringUtils.isEmpty(data.getDeptId())) {
+            data.setDeptId(ContextUtil.subDeptId(null));
+        }
+        if (null == data.getPayTime()) {
+            data.setPayTime(new Date());
+        }
+        try {
+            data.setUpdateTime(new Date());
+            if (StringUtils.isEmpty(data.getId())) {
+                String id = createId(data.getPayTime(), data.getCompanyId());
+                data.setId(id);
+                session.save(data);
+            } else {
+                session.update(data);
+            }
+        } finally {
+            session.flush();
+            session.close();
+        }
+    }
+
+    public void delData(InoutSettle data) {
+        Session session = this.getSessionFactory().openSession();
+        try {
+            if (null != data.getId()) {
+                session.delete(data);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            session.flush();
+            session.close();
+        }
+    }
+
+    public String createId(Date date, String companyId) {
+        // 鏃堕棿鎴虫爣绛�
+        String timeKey = DateFormatUtils.format(date, "yyyyMMdd");
+
+        // 浠庣紦瀛樹腑鑾峰彇宸叉湁鐨勭粍缁囩紪鐮�
+        String cacheKey = RedisConst.buildKey(companyId, this.CACHE_SETTLE_ID);
+
+        String cacheId = (String) redisUtil.get(cacheKey);
+
+        if (null != cacheId && cacheId.indexOf(timeKey) >= 0) {
+            String temp = cacheId.substring(cacheId.length() - 4);
+            Integer i = Integer.valueOf(temp);
+            i++;
+            cacheId = timeKey + String.format("%04d", i);
+        } else {
+            Map<String, Object> args = new HashMap<>();
+            args.put("timeKey", timeKey + "%");
+            List<InoutSettle> result = getMaxId(args);
+
+            if (null == result || result.size() == 0) {
+                cacheId = timeKey + "0001";
+            } else {
+                String temp = result.get(0).getId();
+                String tempNum = temp.substring(temp.length() - 4);
+                Integer i = Integer.valueOf(tempNum);
+                cacheId = timeKey + String.format("%04d", ++i);
+            }
+        }
+        // 鏇存柊缂撳瓨
+        redisUtil.set(cacheKey, cacheId);
+
+        return cacheId;
+    }
+
+    public List<InoutSettle> getMaxId(Map<String, Object> param) {
+
+        String hql = "from " + InoutSettle.class.getName() + " where 1 = 1 ";
+        Map<String, Object> args = new HashMap<String, Object>();
+        if (null != param) {
+            String str = (String) param.get("timeKey");
+            if (StringUtils.isNotEmpty(str)) {
+                hql += " and id like :timeKey";
+                args.put("timeKey", str);
+            }
+        }
+        hql += " order by  id desc ";
+        return this.query(hql, args);
+    }
+}
diff --git a/igds-inout/src/main/java/com/ld/igds/inout/view/Settle.view.xml b/igds-inout/src/main/java/com/ld/igds/inout/view/Settle.view.xml
new file mode 100644
index 0000000..b8eeb50
--- /dev/null
+++ b/igds-inout/src/main/java/com/ld/igds/inout/view/Settle.view.xml
@@ -0,0 +1,848 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ViewConfig>
+  <Arguments/>
+  <Context/>
+  <Model>
+    <DataType name="dtMain">
+      <Property name="creationType">com.ld.igds.models.InoutSettle</Property>
+      <PropertyDef name="id">
+        <Property/>
+        <Property name="label">娴佹按鍙�</Property>
+      </PropertyDef>
+      <PropertyDef name="companyId">
+        <Property/>
+        <Property name="label">缁勭粐缂栫爜</Property>
+      </PropertyDef>
+      <PropertyDef name="deptId">
+        <Property/>
+        <Property name="label">搴撳尯缂栫爜</Property>
+        <Property name="mapping">
+          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#loadParents&quot;).getResult()}</Property>
+          <Property name="keyProperty">id</Property>
+          <Property name="valueProperty">name</Property>
+        </Property>
+      </PropertyDef>
+      <PropertyDef name="inoutType">
+        <Property/>
+        <Property name="label">鍑哄叆搴撶被鍨�</Property>
+        <Property name="mapping">
+          <Property name="keyProperty">key</Property>
+          <Property name="valueProperty">value</Property>
+          <Property name="mapValues">
+            <Collection>
+              <Entity>
+                <Property name="key">0</Property>
+                <Property name="value">0锛氱幇閲�</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">1</Property>
+                <Property name="value">1锛氳浆璐�</Property>
+              </Entity>
+            </Collection>
+          </Property>
+        </Property>
+      </PropertyDef>
+      <PropertyDef name="bizType">
+        <Property/>
+        <Property name="label">澶勭悊鏂瑰紡</Property>
+        <Property name="mapping">
+          <Property name="keyProperty">key</Property>
+          <Property name="valueProperty">value</Property>
+          <Property name="mapValues">
+            <Collection>
+              <Entity>
+                <Property name="key">0</Property>
+                <Property name="value">0锛氬崟杞︾粨绠�</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">1</Property>
+                <Property name="value">1锛氬悎鍚岀粨绠�</Property>
+              </Entity>
+            </Collection>
+          </Property>
+        </Property>
+      </PropertyDef>
+      <PropertyDef name="depotId">
+        <Property/>
+        <Property name="label">鎵�灞炰粨搴�</Property>
+        <Property name="mapping">
+          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
+          <Property name="keyProperty">id</Property>
+          <Property name="valueProperty">name</Property>
+        </Property>
+      </PropertyDef>
+      <PropertyDef name="contractId">
+        <Property/>
+        <Property name="label">鍚堝悓缂栫爜</Property>
+      </PropertyDef>
+      <PropertyDef name="contractName">
+        <Property/>
+        <Property name="label">鍚堝悓鍚嶇О</Property>
+      </PropertyDef>
+      <PropertyDef name="payPrice">
+        <Property name="dataType">Double</Property>
+        <Property name="label">鍗曚环</Property>
+        <Property name="displayFormat">#0.000鍏�/鍏枻</Property>
+        <Property name="required">true</Property>
+      </PropertyDef>
+      <PropertyDef name="payMoney">
+        <Property name="dataType">Double</Property>
+        <Property name="label">缁撶畻鎬婚</Property>
+        <Property name="displayFormat">#0.000鍏�</Property>
+        <Property name="required">true</Property>
+      </PropertyDef>
+      <PropertyDef name="settleWeight">
+        <Property name="dataType">double</Property>
+        <Property name="label">缁撶畻閲嶉噺</Property>
+        <Property name="displayFormat">#0.000鍏枻</Property>
+        <Property name="required">true</Property>
+      </PropertyDef>
+      <PropertyDef name="payTime">
+        <Property name="dataType">DateTime</Property>
+        <Property name="label">缁撶畻鏃堕棿</Property>
+        <Property name="required">true</Property>
+      </PropertyDef>
+      <PropertyDef name="payType">
+        <Property/>
+        <Property name="label">浠樻鏂瑰紡</Property>
+        <Property name="mapping">
+          <Property name="keyProperty">key</Property>
+          <Property name="valueProperty">value</Property>
+          <Property name="mapValues">
+            <Collection>
+              <Entity>
+                <Property name="key">0</Property>
+                <Property name="value">0锛氱幇閲�</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">1</Property>
+                <Property name="value">1锛氳浆璐�</Property>
+              </Entity>
+            </Collection>
+          </Property>
+        </Property>
+        <Property name="required">true</Property>
+      </PropertyDef>
+      <PropertyDef name="payee">
+        <Property/>
+        <Property name="label">鏀舵浜�</Property>
+      </PropertyDef>
+      <PropertyDef name="payeeId">
+        <Property/>
+        <Property name="label">鏀舵浜鸿韩浠借瘉鍙�</Property>
+      </PropertyDef>
+      <PropertyDef name="bankCategory">
+        <Property/>
+        <Property name="label">閾惰琛屽埆浠g爜</Property>
+        <Property name="mapping">
+          <Property name="mapValues">${dorado.getDataProvider(&quot;dicTriggerPR#dicTrigger&quot;).getResult(&quot;KHKHH&quot;)}</Property>
+          <Property name="keyProperty">code</Property>
+          <Property name="valueProperty">name</Property>
+        </Property>
+      </PropertyDef>
+      <PropertyDef name="bankCode">
+        <Property/>
+        <Property name="label">寮�鎴疯鍙�</Property>
+      </PropertyDef>
+      <PropertyDef name="bank">
+        <Property/>
+        <Property name="label">寮�鎴疯鍚嶇О</Property>
+      </PropertyDef>
+      <PropertyDef name="bankNum">
+        <Property/>
+        <Property name="label">閾惰璐﹀彿</Property>
+      </PropertyDef>
+      <PropertyDef name="payUnit">
+        <Property/>
+        <Property name="label">浠樻鍗曚綅</Property>
+      </PropertyDef>
+      <PropertyDef name="payUser">
+        <Property/>
+        <Property name="label">浠樻鎿嶄綔浜�</Property>
+      </PropertyDef>
+      <PropertyDef name="remarks">
+        <Property/>
+        <Property name="label">澶囨敞淇℃伅</Property>
+      </PropertyDef>
+      <PropertyDef name="updateTime">
+        <Property name="dataType">DateTime</Property>
+        <Property name="label">鏁版嵁鏇存柊鏃堕棿</Property>
+      </PropertyDef>
+    </DataType>
+    <DataType name="dtParam">
+      <PropertyDef name="bizType">
+        <Property name="label">澶勭悊鏂瑰紡</Property>
+        <Property name="mapping">
+          <Property name="mapValues">
+            <Collection>
+              <Entity>
+                <Property name="key">0</Property>
+                <Property name="value">0锛氬崟杞︾粨绠�</Property>
+              </Entity>
+              <Entity>
+                <Property name="key">1</Property>
+                <Property name="value">1锛氬悎鍚岀粨绠�</Property>
+              </Entity>
+            </Collection>
+          </Property>
+          <Property name="keyProperty">key</Property>
+          <Property name="valueProperty">value</Property>
+        </Property>
+      </PropertyDef>
+      <PropertyDef name="depotId">
+        <Property></Property>
+        <Property name="label">鎵�灞炰粨搴�</Property>
+        <Property name="mapping">
+          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#loadParents&quot;).getResult()}</Property>
+          <Property name="keyProperty">id</Property>
+          <Property name="valueProperty">name</Property>
+        </Property>
+      </PropertyDef>
+      <PropertyDef name="contractName">
+        <Property></Property>
+        <Property name="label">鍚堝悓鍚嶇О</Property>
+      </PropertyDef>
+      <PropertyDef name="contractId">
+        <Property name="label">鍚堝悓缂栫爜</Property>
+      </PropertyDef>
+      <PropertyDef name="start">
+        <Property name="label">寮�濮嬫椂闂�</Property>
+        <Property name="dataType">Date</Property>
+      </PropertyDef>
+      <PropertyDef name="end">
+        <Property name="label">缁撴潫鏃堕棿</Property>
+        <Property name="dataType">Date</Property>
+      </PropertyDef>
+    </DataType>
+    <DataType name="dtContract">
+      <Property name="creationType">com.ld.igds.models.InoutContract</Property>
+      <PropertyDef name="id">
+        <Property/>
+        <Property name="label">ID_</Property>
+      </PropertyDef>
+      <PropertyDef name="companyId">
+        <Property/>
+        <Property name="label">缁勭粐缂栫爜</Property>
+      </PropertyDef>
+      <PropertyDef name="deptId">
+        <Property/>
+        <Property name="label">搴撳尯缂栫爜</Property>
+      </PropertyDef>
+      <PropertyDef name="name">
+        <Property/>
+        <Property name="label">鍚堝悓鍚嶇О</Property>
+      </PropertyDef>
+      <PropertyDef name="planId">
+        <Property/>
+        <Property name="label">璁″垝缂栫爜</Property>
+      </PropertyDef>
+      <PropertyDef name="planName">
+        <Property/>
+        <Property name="label">璁″垝鍚嶇О</Property>
+      </PropertyDef>
+      <PropertyDef name="type">
+        <Property/>
+        <Property name="label">涓氬姟绫诲埆</Property>
+      </PropertyDef>
+      <PropertyDef name="customerType">
+        <Property/>
+        <Property name="label">瀹㈡埛绫诲瀷</Property>
+      </PropertyDef>
+      <PropertyDef name="year">
+        <Property/>
+        <Property name="label">骞翠唤</Property>
+      </PropertyDef>
+      <PropertyDef name="customerId">
+        <Property/>
+        <Property name="label">绀句細淇$敤鐮�</Property>
+      </PropertyDef>
+      <PropertyDef name="customerName">
+        <Property/>
+        <Property name="label">瀹㈡埛鍚嶇О</Property>
+      </PropertyDef>
+      <PropertyDef name="fddbr">
+        <Property/>
+        <Property name="label">娉曞畾浠h〃浜�</Property>
+      </PropertyDef>
+      <PropertyDef name="txdz">
+        <Property/>
+        <Property name="label">閫氳鍦板潃</Property>
+      </PropertyDef>
+      <PropertyDef name="yzbm">
+        <Property/>
+        <Property name="label">閭斂缂栫爜</Property>
+      </PropertyDef>
+      <PropertyDef name="lxrxm">
+        <Property/>
+        <Property name="label">鑱旂郴浜哄鍚�</Property>
+      </PropertyDef>
+      <PropertyDef name="lxrdh">
+        <Property/>
+        <Property name="label">鑱旂郴鐢佃瘽</Property>
+      </PropertyDef>
+      <PropertyDef name="sfzh">
+        <Property/>
+        <Property name="label">韬唤璇佸彿</Property>
+      </PropertyDef>
+      <PropertyDef name="dzyx">
+        <Property/>
+        <Property name="label">鐢靛瓙淇$</Property>
+      </PropertyDef>
+      <PropertyDef name="signingTime">
+        <Property name="dataType">Date</Property>
+        <Property name="label">绛捐鏃堕棿</Property>
+      </PropertyDef>
+      <PropertyDef name="signAddress">
+        <Property/>
+        <Property name="label">绛剧害鍦扮偣</Property>
+      </PropertyDef>
+      <PropertyDef name="beginTime">
+        <Property name="dataType">Date</Property>
+        <Property name="label">绾﹀畾寮�濮嬫椂闂�</Property>
+      </PropertyDef>
+      <PropertyDef name="endTime">
+        <Property name="dataType">Date</Property>
+        <Property name="label">绾﹀畾瀹屾垚鏃堕棿</Property>
+      </PropertyDef>
+      <PropertyDef name="relEndTime">
+        <Property name="dataType">Date</Property>
+        <Property name="label">瀹為檯瀹屾垚鏃堕棿</Property>
+      </PropertyDef>
+      <PropertyDef name="foodVariety">
+        <Property/>
+        <Property name="label">绮鍝佺</Property>
+      </PropertyDef>
+      <PropertyDef name="foodType">
+        <Property/>
+        <Property name="label">绮鎬ц川</Property>
+      </PropertyDef>
+      <PropertyDef name="price">
+        <Property name="dataType">Double</Property>
+        <Property name="label">鍚堝悓鍗曚环锛屽厓/鍚�</Property>
+      </PropertyDef>
+      <PropertyDef name="money">
+        <Property name="dataType">Double</Property>
+        <Property name="label">鍚堝悓鎬婚噾棰�</Property>
+      </PropertyDef>
+      <PropertyDef name="contactAmount">
+        <Property name="dataType">Double</Property>
+        <Property name="label">鍚堝悓鏁伴噺</Property>
+      </PropertyDef>
+      <PropertyDef name="completeNum">
+        <Property name="dataType">Double</Property>
+        <Property name="label">灞ョ害鏁伴噺</Property>
+      </PropertyDef>
+      <PropertyDef name="lybzj">
+        <Property name="dataType">Double</Property>
+        <Property name="label">灞ョ害淇濊瘉閲�</Property>
+      </PropertyDef>
+      <PropertyDef name="lyl">
+        <Property name="dataType">Double</Property>
+        <Property name="label">灞ョ害鐜�</Property>
+      </PropertyDef>
+      <PropertyDef name="jsjg">
+        <Property name="dataType">Double</Property>
+        <Property name="label">缁撶畻浠锋牸锛屽厓/鍚�</Property>
+      </PropertyDef>
+      <PropertyDef name="jszje">
+        <Property name="dataType">Double</Property>
+        <Property name="label">缁撶畻鎬婚噾棰�</Property>
+      </PropertyDef>
+      <PropertyDef name="jsyhtyzx">
+        <Property/>
+        <Property name="label">缁撶畻涓庡悎鍚屼竴鑷存��</Property>
+      </PropertyDef>
+      <PropertyDef name="jsyhtbyzyy">
+        <Property/>
+        <Property name="label">涓嶄竴鑷村師鍥�</Property>
+      </PropertyDef>
+      <PropertyDef name="customerBank">
+        <Property/>
+        <Property name="label">瀹㈡埛寮�鎴疯</Property>
+      </PropertyDef>
+      <PropertyDef name="customerBankAccount">
+        <Property/>
+        <Property name="label">瀹㈡埛鏂硅处鍙�</Property>
+      </PropertyDef>
+      <PropertyDef name="customerSignUser">
+        <Property/>
+        <Property name="label">瀹㈡埛绛剧害浜�</Property>
+      </PropertyDef>
+      <PropertyDef name="bank">
+        <Property/>
+        <Property name="label">鏈柟寮�鎴疯</Property>
+      </PropertyDef>
+      <PropertyDef name="bankAccount">
+        <Property/>
+        <Property name="label">鏈柟璐﹀彿</Property>
+      </PropertyDef>
+      <PropertyDef name="signUser">
+        <Property/>
+        <Property name="label">鏈柟绛剧害浜�</Property>
+      </PropertyDef>
+      <PropertyDef name="payType">
+        <Property/>
+        <Property name="label">鏀粯鏂瑰紡</Property>
+      </PropertyDef>
+      <PropertyDef name="createUser">
+        <Property/>
+        <Property name="label">鍒涘缓浜�</Property>
+      </PropertyDef>
+      <PropertyDef name="auditUser">
+        <Property/>
+        <Property name="label">瀹℃壒浜�</Property>
+      </PropertyDef>
+      <PropertyDef name="auditDate">
+        <Property name="dataType">Date</Property>
+        <Property name="label">瀹℃壒鏃堕棿</Property>
+      </PropertyDef>
+      <PropertyDef name="auditStatus">
+        <Property/>
+        <Property name="label">瀹℃壒鐘舵��</Property>
+      </PropertyDef>
+      <PropertyDef name="createTime">
+        <Property name="dataType">Date</Property>
+        <Property name="label">鍒涘缓鏃堕棿</Property>
+      </PropertyDef>
+      <PropertyDef name="wcrq">
+        <Property name="dataType">Date</Property>
+        <Property name="label">瀹屾垚鏃堕棿</Property>
+      </PropertyDef>
+      <PropertyDef name="hqzz">
+        <Property/>
+        <Property name="label">璐ф潈缁勭粐</Property>
+      </PropertyDef>
+      <PropertyDef name="updateTime">
+        <Property name="dataType">Date</Property>
+        <Property name="label">鏇存柊鏃堕棿</Property>
+      </PropertyDef>
+    </DataType>
+  </Model>
+  <View layout="padding:5;regionPadding:5">
+    <ClientEvent name="onReady">addMain = function(){&#xD;
+view.get(&quot;#dsMain&quot;).insert({});&#xD;
+ view.get(&quot;#dialogMain&quot;).show();&#xD;
+};&#xD;
+view.get(&quot;#dsParam&quot;).insert({});</ClientEvent>
+    <Property name="packages">font-awesome,css-common</Property>
+    <DataSet id="dsMain">
+      <Property name="dataProvider">settlePR#pageList</Property>
+      <Property name="dataType">[dtMain]</Property>
+      <Property name="pageSize">20</Property>
+    </DataSet>
+    <DataSet id="dsParam">
+      <Property name="dataType">dtParam</Property>
+    </DataSet>
+    <Container layout="regionPadding:10" layoutConstraint="top">
+      <Property name="exClassName">bg-color</Property>
+      <Property name="contentOverflow">hidden</Property>
+      <Property name="height">55</Property>
+      <Label layoutConstraint="left">
+        <Property name="text">鑿滃崟鏍忥細</Property>
+      </Label>
+      <Button layoutConstraint="left">
+        <ClientEvent name="onClick">addMain();</ClientEvent>
+        <Property name="caption">鏂板</Property>
+        <Property name="exClassName">btn-default</Property>
+        <Property name="iconClass">fa fa-plus</Property>
+      </Button>
+      <Button layoutConstraint="left">
+        <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
+if(data){&#xD;
+   view.get(&quot;#dialogMain&quot;).show();&#xD;
+}else{&#xD;
+	$alert(&quot;璇峰嬀閫夐渶瑕佷慨鏀圭殑鏁版嵁锛�&quot;);&#xD;
+}</ClientEvent>
+        <Property name="caption">璋冩暣</Property>
+        <Property name="exClassName">btn-warm</Property>
+        <Property name="iconClass">fa fa-pencil</Property>
+      </Button>
+      <Button layoutConstraint="left">
+        <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
+if(!data){&#xD;
+  return;&#xD;
+}&#xD;
+view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,data).execute(function(result){&#xD;
+if(result){&#xD;
+  $alert(result);&#xD;
+  return;&#xD;
+}else{&#xD;
+  data.remove();&#xD;
+ }&#xD;
+});</ClientEvent>
+        <Property name="caption">鍒犻櫎</Property>
+        <Property name="exClassName">btn-warn</Property>
+        <Property name="iconClass">fa fa-minus</Property>
+      </Button>
+    </Container>
+    <AutoForm>
+      <Property name="cols">*,*,*,*</Property>
+      <Property name="dataSet">dsParam</Property>
+      <Property name="labelAlign">right</Property>
+      <Property name="exClassName">bg-color</Property>
+      <AutoFormElement>
+        <Property name="name">bizType</Property>
+        <Property name="property">bizType</Property>
+        <Editor/>
+      </AutoFormElement>
+      <AutoFormElement>
+        <Property name="name">depotId</Property>
+        <Property name="property">depotId</Property>
+        <Editor/>
+      </AutoFormElement>
+      <AutoFormElement>
+        <Property name="name">contractName</Property>
+        <Property name="property">contractName</Property>
+        <Property name="trigger">ddContract</Property>
+        <Editor/>
+      </AutoFormElement>
+      <AutoFormElement>
+        <Property name="name">start</Property>
+        <Property name="property">start</Property>
+        <Editor/>
+      </AutoFormElement>
+      <AutoFormElement>
+        <Property name="name">end</Property>
+        <Property name="property">end</Property>
+        <Editor/>
+      </AutoFormElement>
+      <Container layout="regionPadding:10" layoutConstraint="top">
+        <Property name="exClassName">bg-color</Property>
+        <Button layoutConstraint="left">
+          <ClientEvent name="onClick">var param = view.get(&quot;#dsParam.data&quot;);&#xD;
+view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,param.toJSON()).flushAsync();</ClientEvent>
+          <Property name="caption">鏌ヨ</Property>
+          <Property name="exClassName">btn-default</Property>
+          <Property name="iconClass">fa fa-refresh</Property>
+        </Button>
+        <Button>
+          <ClientEvent name="onClick">view.get(&quot;#dsParam&quot;).setData({});&#xD;
+view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,{}).flushAsync();</ClientEvent>
+          <Property name="exClassName">btn-warn</Property>
+          <Property name="iconClass">fa fa-refresh</Property>
+          <Property name="caption">閲嶇疆</Property>
+        </Button>
+      </Container>
+    </AutoForm>
+    <Container layout="regionPadding:10" layoutConstraint="center">
+      <Property name="exClassName">bg-color</Property>
+      <DataGrid layoutConstraint="center padding:5px">
+        <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
+if(data){&#xD;
+   view.get(&quot;#dialogMain&quot;).show();&#xD;
+}</ClientEvent>
+        <Property name="dataSet">dsMain</Property>
+        <Property name="readOnly">true</Property>
+        <RowNumColumn/>
+        <DataColumn name="id">
+          <Property name="property">id</Property>
+        </DataColumn>
+        <DataColumn name="inoutType">
+          <Property name="property">inoutType</Property>
+        </DataColumn>
+        <DataColumn name="bizType">
+          <Property name="property">bizType</Property>
+        </DataColumn>
+        <DataColumn name="depotId">
+          <Property name="property">depotId</Property>
+        </DataColumn>
+        <DataColumn name="contractName">
+          <Property name="property">contractName</Property>
+        </DataColumn>
+        <DataColumn name="payPrice">
+          <Property name="property">payPrice</Property>
+        </DataColumn>
+        <DataColumn name="payMoney">
+          <Property name="property">payMoney</Property>
+        </DataColumn>
+        <DataColumn name="settleWeight">
+          <Property name="property">settleWeight</Property>
+        </DataColumn>
+        <DataColumn name="payTime">
+          <Property name="property">payTime</Property>
+        </DataColumn>
+        <DataColumn name="payee">
+          <Property name="property">payee</Property>
+        </DataColumn>
+        <DataColumn name="updateTime">
+          <Property name="property">updateTime</Property>
+        </DataColumn>
+      </DataGrid>
+    </Container>
+    <Container layout="regionPadding:10" layoutConstraint="bottom">
+      <Property name="exClassName">bg-color</Property>
+      <DataPilot layoutConstraint="right">
+        <Property name="itemCodes">pageSize,pages</Property>
+        <Property name="dataSet">dsMain</Property>
+      </DataPilot>
+    </Container>
+    <Dialog id="dialogMain" layout="padding:5;regionPadding:10">
+      <Property name="width">85%</Property>
+      <Property name="caption">缁撶畻淇℃伅</Property>
+      <Property name="iconClass">fa fa-flag-o</Property>
+      <Property name="closeable">false</Property>
+      <Buttons>
+        <Button>
+          <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
+if(data.validate() != 'ok'){&#xD;
+	$notify(&quot;鏁版嵁鏍¢獙澶辫触锛侊紒&quot;);&#xD;
+    return;&#xD;
+}&#xD;
+view.get(&quot;#uaAction&quot;).set(&quot;parameter&quot;,data).execute();&#xD;
+self.get(&quot;parent&quot;).hide();</ClientEvent>
+          <Property name="caption">纭</Property>
+          <Property name="iconClass">fa fa-check-circle</Property>
+          <Property name="width">90</Property>
+        </Button>
+        <Button>
+          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
+self.get(&quot;parent&quot;).hide();</ClientEvent>
+          <Property name="caption">鍙栨秷</Property>
+          <Property name="iconClass">fa fa-times-circle</Property>
+          <Property name="width">90</Property>
+        </Button>
+      </Buttons>
+      <Children>
+        <Container layout="regionPadding:5">
+          <FieldSet>
+            <Property name="caption">鍩烘湰淇℃伅</Property>
+            <Buttons/>
+            <Children>
+              <AutoForm>
+                <Property name="dataSet">dsMain</Property>
+                <Property name="cols">*,*,*</Property>
+                <Property name="labelWidth">150</Property>
+                <Property name="labelAlign">right</Property>
+                <Property name="labelSeparator">锛�</Property>
+                <AutoFormElement>
+                  <Property name="name">id</Property>
+                  <Property name="property">id</Property>
+                  <Property name="readOnly">true</Property>
+                  <Editor>
+                    <TextEditor>
+                      <Property name="blankText"> -- 绯荤粺鑷姩鐢熸垚 --</Property>
+                    </TextEditor>
+                  </Editor>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">deptId</Property>
+                  <Property name="property">deptId</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">inoutType</Property>
+                  <Property name="property">inoutType</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">bizType</Property>
+                  <Property name="property">bizType</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">depotId</Property>
+                  <Property name="property">depotId</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">contractId</Property>
+                  <Property name="property">contractId</Property>
+                  <Property name="trigger">ddContract</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">contractName</Property>
+                  <Property name="property">contractName</Property>
+                  <Property name="trigger">ddContract</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">payPrice</Property>
+                  <Property name="property">payPrice</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">payMoney</Property>
+                  <Property name="property">payMoney</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">settleWeight</Property>
+                  <Property name="property">settleWeight</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">payTime</Property>
+                  <Property name="property">payTime</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">payType</Property>
+                  <Property name="property">payType</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">payee</Property>
+                  <Property name="property">payee</Property>
+                  <Editor>
+                    <TextEditor>
+                      <Property name="blankText"> -- 鏀舵浜哄崟浣嶅悕绉版垨涓汉鍧囧彲 --</Property>
+                    </TextEditor>
+                  </Editor>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">payeeId</Property>
+                  <Property name="property">payeeId</Property>
+                  <Editor>
+                    <TextEditor>
+                      <Property name="blankText"> -- 鏀舵浜烘槸涓汉鏃跺~鍐� --</Property>
+                    </TextEditor>
+                  </Editor>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">bankCategory</Property>
+                  <Property name="property">bankCategory</Property>
+                  <Editor>
+                    <TextEditor>
+                      <Property name="blankText"> -- 缁撶畻鏂瑰紡涓鸿浆璐︽椂濉啓 --</Property>
+                    </TextEditor>
+                  </Editor>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">bankCode</Property>
+                  <Property name="property">bankCode</Property>
+                  <Editor>
+                    <TextEditor>
+                      <Property name="blankText"> -- 缁撶畻鏂瑰紡涓鸿浆璐︽椂蹇呭~鍐�--</Property>
+                    </TextEditor>
+                  </Editor>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">bank</Property>
+                  <Property name="property">bank</Property>
+                  <Editor>
+                    <TextEditor>
+                      <Property name="blankText"> -- 缁撶畻鏂瑰紡涓鸿浆璐︽椂濉啓 --</Property>
+                    </TextEditor>
+                  </Editor>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">bankNum</Property>
+                  <Property name="property">bankNum</Property>
+                  <Editor>
+                    <TextEditor>
+                      <Property name="blankText"> -- 缁撶畻鏂瑰紡涓鸿浆璐︽椂濉啓 --</Property>
+                    </TextEditor>
+                  </Editor>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">payUnit</Property>
+                  <Property name="property">payUnit</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">payUser</Property>
+                  <Property name="property">payUser</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement>
+                  <Property name="name">updateTime</Property>
+                  <Property name="property">updateTime</Property>
+                  <Editor/>
+                </AutoFormElement>
+                <AutoFormElement layoutConstraint="colSpan:3">
+                  <Property name="name">remarks</Property>
+                  <Property name="property">remarks</Property>
+                  <Editor>
+                    <TextArea/>
+                  </Editor>
+                </AutoFormElement>
+              </AutoForm>
+            </Children>
+          </FieldSet>
+        </Container>
+      </Children>
+      <Tools/>
+    </Dialog>
+    <UpdateAction id="uaAction">
+      <Property name="dataResolver">settlePR#saveData</Property>
+      <UpdateItem>
+        <Property name="dataSet">dsMain</Property>
+        <Property name="dataPath">[#current]</Property>
+      </UpdateItem>
+    </UpdateAction>
+    <AjaxAction id="ajaxDel">
+      <Property name="confirmMessage">纭畾瑕佸垹闄ゅ悧锛�</Property>
+      <Property name="service">settlePR#delData</Property>
+    </AjaxAction>
+    <CustomDropDown id="ddContract">
+      <Property name="minHeight">317</Property>
+      <Property name="assignmentMap">contractId=id,contractName=name</Property>
+      <Property name="minWidth">550</Property>
+      <Property name="autoOpen">false</Property>
+      <Container layout="regionPadding:5">
+        <DataSet id="dsContract">
+          <Property name="dataProvider">contractManagePR#pageContract</Property>
+          <Property name="dataType">[dtContract]</Property>
+          <Property name="parameter"></Property>
+          <Property name="pageSize">5</Property>
+        </DataSet>
+        <Container layout="hbox regionPadding:5">
+          <TextEditor id="key3">
+            <Property name="blankText"> -- 鍚堝悓鍚嶇О鎴栬�呮墍灞炶鍒� --</Property>
+            <Property name="width">200</Property>
+          </TextEditor>
+          <Button>
+            <ClientEvent name="onClick">var key = view.get(&quot;#key3.value&quot;);&#xD;
+view.get(&quot;#dsContract&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();</ClientEvent>
+            <Property name="caption">鏌ヨ</Property>
+            <Property name="iconClass">fa fa-search</Property>
+          </Button>
+          <Button>
+            <ClientEvent name="onClick">var data = view.get(&quot;#dsContract.data:#&quot;);&#xD;
+if(data){&#xD;
+	view.get(&quot;#ddContract&quot;).close(data.toJSON());&#xD;
+}</ClientEvent>
+            <Property name="iconClass">fa fa-check</Property>
+            <Property name="caption">纭畾</Property>
+          </Button>
+        </Container>
+        <DataGrid>
+          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsContract.data:#&quot;);&#xD;
+if(data){&#xD;
+	view.get(&quot;#ddContract&quot;).close(data.toJSON());&#xD;
+}</ClientEvent>
+          <Property name="dataSet">dsContract</Property>
+          <Property name="readOnly">true</Property>
+          <DataColumn>
+            <Property name="property">id</Property>
+            <Property name="width">100</Property>
+            <Property name="align">center</Property>
+            <Property name="name">id</Property>
+            <Property name="visible">false</Property>
+          </DataColumn>
+          <DataColumn name="name">
+            <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
+arg.processDefault = true;</ClientEvent>
+            <Property name="property">name</Property>
+            <Property name="align">center</Property>
+          </DataColumn>
+          <DataColumn>
+            <Property name="property">planName</Property>
+            <Property name="align">center</Property>
+            <Property name="name">planName</Property>
+          </DataColumn>
+          <DataColumn>
+            <Property name="property">year</Property>
+            <Property name="width">80</Property>
+            <Property name="align">center</Property>
+            <Property name="name">year</Property>
+          </DataColumn>
+        </DataGrid>
+        <DataPilot layoutConstraint="bottom">
+          <Property name="dataSet">dsContract</Property>
+        </DataPilot>
+      </Container>
+    </CustomDropDown>
+  </View>
+</ViewConfig>
diff --git a/igds-inout/src/main/java/com/ld/igds/inout/view/SettlePR.java b/igds-inout/src/main/java/com/ld/igds/inout/view/SettlePR.java
new file mode 100644
index 0000000..397de59
--- /dev/null
+++ b/igds-inout/src/main/java/com/ld/igds/inout/view/SettlePR.java
@@ -0,0 +1,59 @@
+package com.ld.igds.inout.view;
+
+import com.bstek.dorado.annotation.DataProvider;
+import com.bstek.dorado.annotation.DataResolver;
+import com.bstek.dorado.annotation.Expose;
+import com.bstek.dorado.data.provider.Page;
+import com.ld.igds.inout.service.HSettleService;
+import com.ld.igds.models.InoutSettle;
+import com.ld.igds.models.InoutVarietyChange;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @Author: YYC
+ * @Description:
+ * @DateTime: 2023-11-4 22:05
+ **/
+@Component
+public class SettlePR {
+
+
+    @Autowired
+    private HSettleService settleService;
+
+    /**
+     * settlePR#pageList
+     *
+     * @param page
+     * @param param
+     * @throws Exception
+     */
+    @DataProvider
+    public void pageList(Page<InoutSettle> page, Map<String, Object> param) throws Exception {
+        settleService.pageList(page, param);
+    }
+
+    /**
+     * settlePR#saveData
+     *
+     * @param data
+     */
+    @DataResolver
+    public void saveData(InoutSettle data) {
+        settleService.saveData(data);
+    }
+
+    /**
+     * settlePR#delData
+     *
+     * @param data
+     */
+    @Expose
+    public void delData(InoutSettle data) {
+        settleService.delData(data);
+    }
+
+}
diff --git a/igds-inout/src/main/java/com/ld/igds/m/service/HCreditService.java b/igds-inout/src/main/java/com/ld/igds/m/service/HCreditService.java
index b41fa21..849abb7 100644
--- a/igds-inout/src/main/java/com/ld/igds/m/service/HCreditService.java
+++ b/igds-inout/src/main/java/com/ld/igds/m/service/HCreditService.java
@@ -37,7 +37,7 @@
 				args.put("customerName", "%" + str + "%");
 			}
 		}
-		hql += " order by zhgxsj";
+		hql += " order by updateTime";
 
 		return this.query(hql,args);
 	}
diff --git a/igds-inout/src/main/java/com/ld/igds/m/view/Credit.view.xml b/igds-inout/src/main/java/com/ld/igds/m/view/Credit.view.xml
index 95bd3f6..57bbb25 100644
--- a/igds-inout/src/main/java/com/ld/igds/m/view/Credit.view.xml
+++ b/igds-inout/src/main/java/com/ld/igds/m/view/Credit.view.xml
@@ -43,13 +43,13 @@
         <Property name="label">璇勫畾骞翠唤</Property>
         <Property name="required">false</Property>
       </PropertyDef>
-      <PropertyDef name="zhgxsj">
-        <Property name="dataType">DateTime</Property>
-        <Property name="label">鏇存柊鏃堕棿</Property>
-      </PropertyDef>
       <PropertyDef name="pddw">
         <Property></Property>
         <Property name="label">璇勫畾鍗曚綅</Property>
+      </PropertyDef>
+      <PropertyDef name="updateTime">
+        <Property name="dataType">Date</Property>
+        <Property name="label">鏁版嵁鏇存柊鏃堕棿</Property>
       </PropertyDef>
     </DataType>
   </Model>
@@ -130,10 +130,8 @@
           <Property name="align">center</Property>
           <Property name="name">pddw</Property>
         </DataColumn>
-        <DataColumn>
-          <Property name="property">zhgxsj</Property>
-          <Property name="align">center</Property>
-          <Property name="name">zhgxsj</Property>
+        <DataColumn name="updateTime">
+          <Property name="property">updateTime</Property>
         </DataColumn>
       </DataGrid>
     </Container>
@@ -205,8 +203,8 @@
             <Editor/>
           </AutoFormElement>
           <AutoFormElement>
-            <Property name="name">zhgxsj</Property>
-            <Property name="property">zhgxsj</Property>
+            <Property name="name">updateTime</Property>
+            <Property name="property">updateTime</Property>
             <Editor/>
           </AutoFormElement>
         </AutoForm>

--
Gitblit v1.9.3