YYC
2023-08-16 7e2a72d1a9c73320b0f4b7e7a580372f7af55e04
损益管理页面优化
已修改9个文件
186 ■■■■ 文件已修改
igds-inout/src/main/java/com/ld/igds/m/service/HLossOverService.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/m/service/HMAtockChangeService.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/m/service/HVarietyChangeService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/m/view/LossOver.view.xml 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/m/view/StockChange.view.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/m/view/VarietyChange.view.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/models/InoutLossOver.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/models/InoutStockChange.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/models/InoutVarietyChange.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/m/service/HLossOverService.java
@@ -84,9 +84,6 @@
        Session session = this.getSessionFactory().openSession();
        data.setUpdateTime(new Date());
        data.setUpdateUser(ContextUtil.getLoginUserCName());
        if ("OVER".equals(data.getType())) {
            data.setAmount(0 - data.getAmount());
        }
        try {
            if (null == data.getId()) {
@@ -104,14 +101,12 @@
                if (data.getSubmitTime().before(curDate)) {
                    data.setSubmitTime(curDate);
                }
                String id = createId(data.getSubmitTime(), data.getCompanyId(), data.getHwdm());
                String id = createId(data.getSubmitTime(), data.getCompanyId(), data.getType());
//                String id = addInoutDataByLossOver(data);
                data.setCzbz("i");
                data.setId(id);
                session.save(data);
            } else {
                data.setCzbz("u");
                session.update(data);
            }
        } catch (Exception e) {
@@ -202,7 +197,7 @@
        return this.query(hql, args);
    }
    public String createId(Date date, String companyId, String freightId) {
    public String createId(Date date, String companyId, String type) {
        // 时间戳标签
        String timeKey = DateFormatUtils.format(date, "yyyyMMdd");
@@ -212,17 +207,16 @@
        String cacheId = (String) redisUtil.get(cacheKey);
        if (null != cacheId && cacheId.indexOf(freightId + timeKey) >= 0) {
        if (null != cacheId && cacheId.indexOf(timeKey) >= 0) {
            String temp = cacheId.substring(cacheId.length() - 3);
            Integer i = Integer.valueOf(temp);
            cacheId = freightId + timeKey + String.format("%03d", ++i);
            cacheId = timeKey + String.format("%03d", ++i);
        } else {
            Map<String, Object> args = new HashMap<>();
            args.put("timeKey", freightId + timeKey + "%");
            args.put("timeKey", timeKey + "%");
            List<InoutLossOver> result = getMaxId(args);
            if (null == result || result.size() == 0) {
                cacheId = freightId + timeKey + "001";
                cacheId = timeKey + "001";
            } else {
                int max = 0;
                int num;
@@ -230,7 +224,7 @@
                    num = Integer.parseInt(inoutLossOver.getId().substring(inoutLossOver.getId().length() - 3));
                    max = Math.max(max, num);
                }
                cacheId = freightId + timeKey + String.format("%03d", ++max);
                cacheId = timeKey + String.format("%03d", ++max);
            }
        }
        // 更新缓存
igds-inout/src/main/java/com/ld/igds/m/service/HMAtockChangeService.java
@@ -61,13 +61,11 @@
        data.setUpdateTime(new Date());
        data.setUpdateUser(ContextUtil.getLoginUserCName());
        try {
            if (null == data.getCzbz()) {
            if (null == data.getId()) {
                String id = createId(data.getChangeDate(), ContextUtil.getCompanyId());
                data.setId(id);
                data.setCzbz("i");
                session.save(data);
            } else {
                data.setCzbz("u");
                session.update(data);
            }
        } catch (Exception e) {
igds-inout/src/main/java/com/ld/igds/m/service/HVarietyChangeService.java
@@ -79,12 +79,10 @@
        try {
            if (null == data.getId()) {
                String id = createId(data.getChangeTime(), ContextUtil.getCompanyId(), data.getHwdm());
                String id = createId(data.getChangeTime(), ContextUtil.getCompanyId());
                data.setId(id);
                data.setCzbz("i");
                session.save(data);
            } else {
                data.setCzbz("u");
                session.update(data);
            }
        } catch (Exception e) {
@@ -141,7 +139,7 @@
        return this.query(hql, args);
    }
    public String createId(Date date, String companyId, String freightId) {
    public String createId(Date date, String companyId) {
        // 时间戳标签
        String timeKey = DateFormatUtils.format(date, "yyyyMMdd");
@@ -151,18 +149,18 @@
        String cacheId = (String) redisUtil.get(cacheKey);
        if (null != cacheId && cacheId.indexOf(freightId + timeKey) >= 0) {
        if (null != cacheId && cacheId.indexOf(timeKey) >= 0) {
            String temp = cacheId.substring(cacheId.length() - 3);
            Integer i = Integer.valueOf(temp);
            i++;
            cacheId = freightId + timeKey + String.format("%03d", i);
            cacheId = timeKey + String.format("%03d", i);
        } else {
            Map<String, Object> args = new HashMap<>();
            args.put("timeKey", freightId + timeKey + "%");
            args.put("timeKey", timeKey + "%");
            List<InoutVarietyChange> result = getMaxId(args);
            if (null == result || result.size() == 0) {
                cacheId = freightId + timeKey + "001";
                cacheId = timeKey + "001";
            } else {
                int max = 0;
                int num;
@@ -170,7 +168,7 @@
                    num = Integer.parseInt(varietyChange.getId().substring(varietyChange.getId().length() - 3));
                    max = Math.max(max, num);
                }
                cacheId = freightId + timeKey + String.format("%03d", ++max);
                cacheId = timeKey + String.format("%03d", ++max);
            }
        }
        // 更新缓存
igds-inout/src/main/java/com/ld/igds/m/view/LossOver.view.xml
@@ -31,9 +31,8 @@
        <Property name="label">类型</Property>
      </PropertyDef>
      <PropertyDef name="submitTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">登记时间</Property>
        <Property name="displayFormat">Y-m-d H:i</Property>
        <Property name="dataType">Date</Property>
        <Property name="label">业务日期</Property>
      </PropertyDef>
      <PropertyDef name="depotId">
        <Property></Property>
@@ -65,10 +64,6 @@
      <PropertyDef name="remark">
        <Property></Property>
        <Property name="label">备注</Property>
      </PropertyDef>
      <PropertyDef name="hwdm">
        <Property></Property>
        <Property name="label">货位代码</Property>
      </PropertyDef>
      <PropertyDef name="rkjz">
        <Property name="dataType">double</Property>
@@ -184,11 +179,6 @@
      <PropertyDef name="infoLdsh">
        <Property></Property>
        <Property name="label">审核说明</Property>
      </PropertyDef>
      <PropertyDef name="czbz">
        <Property></Property>
        <Property name="label">操作标志</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtParam">
@@ -407,13 +397,13 @@
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">companyId</Property>
                <Property name="property">companyId</Property>
                <Property name="name">submitTime</Property>
                <Property name="property">submitTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">submitTime</Property>
                <Property name="property">submitTime</Property>
                <Property name="name">deptId</Property>
                <Property name="property">deptId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
@@ -426,16 +416,13 @@
                <Property name="property">amount</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">deptId</Property>
                <Property name="property">deptId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">hwdm</Property>
                <Property name="property">hwdm</Property>
                <Editor/>
              </AutoFormElement>
              <Label>
                <Property name="text">说明:损溢重量在损耗页面和溢出页面均填正数</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                  <Property name="padding-left">80px</Property>
                </Property>
              </Label>
              <AutoFormElement>
                <Property name="name">rkjz</Property>
                <Property name="property">rkjz</Property>
@@ -482,11 +469,6 @@
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">syyy</Property>
                <Property name="property">syyy</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">updateUser</Property>
                <Property name="property">updateUser</Property>
                <Editor/>
@@ -496,9 +478,10 @@
                <Property name="property">updateTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">czbz</Property>
                <Property name="property">czbz</Property>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">syyy</Property>
                <Property name="property">syyy</Property>
                <Property name="editorType">TextArea</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
igds-inout/src/main/java/com/ld/igds/m/view/StockChange.view.xml
@@ -90,14 +90,6 @@
        <Property></Property>
        <Property name="label">更新人</Property>
      </PropertyDef>
      <PropertyDef name="dchwdm">
        <Property></Property>
        <Property name="label">倒出货位代码</Property>
      </PropertyDef>
      <PropertyDef name="drhwdm">
        <Property></Property>
        <Property name="label">倒入货位代码</Property>
      </PropertyDef>
      <PropertyDef name="bzw">
        <Property></Property>
        <Property name="label">包装物</Property>
@@ -106,11 +98,6 @@
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="czbz">
        <Property></Property>
        <Property name="label">操作标志</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="bzbjs">
        <Property name="dataType">Integer</Property>
@@ -348,8 +335,8 @@
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">companyId</Property>
            <Property name="property">companyId</Property>
            <Property name="name">deptId</Property>
            <Property name="property">deptId</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
@@ -363,23 +350,8 @@
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">deptId</Property>
            <Property name="property">deptId</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">type</Property>
            <Property name="property">type</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">dchwdm</Property>
            <Property name="property">dchwdm</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">drhwdm</Property>
            <Property name="property">drhwdm</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
igds-inout/src/main/java/com/ld/igds/m/view/VarietyChange.view.xml
@@ -96,11 +96,6 @@
        <Property></Property>
        <Property name="label">备注</Property>
      </PropertyDef>
      <PropertyDef name="hwdm">
        <Property></Property>
        <Property name="label">货位代码</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="ccshr">
        <Property></Property>
        <Property name="label">仓储审核人</Property>
@@ -160,11 +155,6 @@
      <PropertyDef name="infoLdsh">
        <Property></Property>
        <Property name="label">审核说明</Property>
      </PropertyDef>
      <PropertyDef name="czbz">
        <Property></Property>
        <Property name="label">操作标志</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtParam">
@@ -382,18 +372,8 @@
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">companyId</Property>
                <Property name="property">companyId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">approvalId</Property>
                <Property name="property">approvalId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">hwdm</Property>
                <Property name="property">hwdm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
igds-inout/src/main/java/com/ld/igds/models/InoutLossOver.java
@@ -42,9 +42,6 @@
    @PropertyDef(label = "所属仓库")
    private String depotId;
    @Column(name = "hwdm", length = 50)
    @PropertyDef(label = "货位代码")
    private String hwdm;
    @Column(name = "TYPE_", length = 10)
    @PropertyDef(label = "类型", description = "损耗/溢出")
@@ -92,21 +89,6 @@
    @PropertyDef(label = "重量", description = "损溢数量KG;损耗为正数,溢余为负数")
    private Double amount;
//    @PropertyDef(label = "其中:成货位前损耗(公斤)" )
//    @Column(name = "qzchwqsh", precision = 20, scale = 6)
//    private double qzchwqsh;
//
//    @PropertyDef(label = "其中水杂减量(公斤)" )
//    @Column(name = "qzszkl", precision = 20, scale = 6)
//    private double qzszkl;
//
//    @PropertyDef(label = "其中:自然损耗定额(公斤)" )
//    @Column(name = "qzzrshde", precision = 20, scale = 6)
//    private double qzzrshde;
//
//    @PropertyDef(label = "超耗数量(公斤)" )
//    @Column(name = "chsl", precision = 20, scale = 6)
//    private double chsl;
    @PropertyDef(label = "损益是否正常", description = "0:正常 1:不正常")
    @Column(name = "sysfzc", length = 1)
@@ -187,9 +169,5 @@
    @Column(name = "UPDATE_USER_", length = 50)
    @PropertyDef(label = "更新人")
    private String updateUser;
    @PropertyDef(label = "操作标志", description = "i:新增数据(默认)u:更新数据d:删除数据")
    @Column(name = "czbz", length = 1)
    private String czbz;
}
igds-inout/src/main/java/com/ld/igds/models/InoutStockChange.java
@@ -67,10 +67,6 @@
    @PropertyDef(label = "倒仓数量", description = "单位:公斤")
    private Double number = 0.0;
    @Column(name = "czbz", length = 1)
    @PropertyDef(label = "操作标志", description = "i:新增数据(默认)u:更新数据 d:删除数据")
    private String czbz;
    @Column(name = "UPDATE_TIME_")
    @PropertyDef(label = "最后更新时间")
    private Date updateTime;
@@ -78,14 +74,6 @@
    @Column(name = "UPDATE_USER_", length = 50)
    @PropertyDef(label = "更新人")
    private String updateUser;
    @Column(name = "dchwdm", length = 30)
    @PropertyDef(label = "倒出货位代码", description = "关联货位信息接口货位代码")
    private String dchwdm;
    @Column(name = "drhwdm", length = 30)
    @PropertyDef(label = "倒入货位代码", description = "关联货位信息接口货位代码")
    private String drhwdm;
    @Column(name = "bzw", length = 1)
    @PropertyDef(label = "包装物", description = "1:麻袋 2:编织袋 3:散装 9:其他")
igds-inout/src/main/java/com/ld/igds/models/InoutVarietyChange.java
@@ -31,10 +31,6 @@
    @PropertyDef(label = "组织编码")
    private String companyId;
    @Column(name = "hwdm", length = 30)
    @PropertyDef(label = "货位代码", description = "关联货位信息接口货位代码")
    private String hwdm;
    @Column(name = "DEPT_ID_", length = 40)
    @PropertyDef(label = "分库编码")
    private String deptId;
@@ -140,11 +136,6 @@
    @Column(name = "INFO_LDSH_", length = 200)
    @PropertyDef(label = "审核说明")
    private String infoLdsh;
    @Column(name = "czbz", length = 1)
    @PropertyDef(label = "操作标志", description = "i:新增数据(默认)u:更新数据 d:删除数据")
    private String czbz;
    @Column(name = "UPDATE_TIME_")
    @PropertyDef(label = "最后更新时间")