YYC
2023-11-05 a6013fee1895815cda77bfdcb5e5b9f4d190640b
结算页面
已添加3个文件
已修改2个文件
1102 ■■■■■ 文件已修改
igds-inout/src/main/java/com/ld/igds/inout/service/HSettleService.java 175 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/view/Settle.view.xml 848 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/view/SettlePR.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/m/service/HCreditService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/m/view/Credit.view.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
    }
}
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">银行行别代码</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">法定代表人</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>
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);
    }
}
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);
    }
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>