Просмотр исходного кода

Merge branch 'master' into dev

lazhaoqian 4 лет назад
Родитель
Сommit
55c42a4af4
16 измененных файлов с 803 добавлено и 42 удалено
  1. 110 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/appVersion/TAppVersionController.java
  2. 15 2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TCntrnoController.java
  3. 4 0
      ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
  4. 71 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/wechat/VersionUtil.java
  5. 53 29
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TCntrno.java
  6. 7 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/mapper/TCntrnoMapper.java
  7. 7 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/ITCntrnoService.java
  8. 5 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TCntrnoServiceImpl.java
  9. 18 0
      ruoyi-shipping/src/main/resources/mapper/shipping/TCntrnoMapper.xml
  10. 109 0
      ruoyi-warehouse/src/main/java/com/ruoyi/appVersion/domain/TAppVersion.java
  11. 68 0
      ruoyi-warehouse/src/main/java/com/ruoyi/appVersion/mapper/TAppVersionMapper.java
  12. 64 0
      ruoyi-warehouse/src/main/java/com/ruoyi/appVersion/service/ITAppVersionService.java
  13. 144 0
      ruoyi-warehouse/src/main/java/com/ruoyi/appVersion/service/impl/TAppVersionServiceImpl.java
  14. 1 1
      ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/impl/TFeeServiceImpl.java
  15. 18 10
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java
  16. 109 0
      ruoyi-warehouse/src/main/resources/mapper/appVersion/TAppVersionMapper.xml

+ 110 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/appVersion/TAppVersionController.java

@@ -0,0 +1,110 @@
+package com.ruoyi.web.controller.appVersion;
+
+import java.util.List;
+
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.appVersion.domain.TAppVersion;
+import com.ruoyi.appVersion.service.ITAppVersionService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * APP版本信息Controller
+ *
+ * @author ruoyi
+ * @date 2021-06-16
+ */
+@RestController
+@RequestMapping("/appVersion/version")
+public class TAppVersionController extends BaseController {
+    @Autowired
+    private ITAppVersionService tAppVersionService;
+
+    /**
+     * 查询APP版本信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('appVersion:version:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TAppVersion tAppVersion) {
+        startPage();
+        List<TAppVersion> list = tAppVersionService.selectTAppVersionList(tAppVersion);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出APP版本信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('appVersion:version:export')")
+    @Log(title = "APP版本信息", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TAppVersion tAppVersion) {
+        List<TAppVersion> list = tAppVersionService.selectTAppVersionList(tAppVersion);
+        ExcelUtil<TAppVersion> util = new ExcelUtil<TAppVersion>(TAppVersion.class);
+        return util.exportExcel(list, "version");
+    }
+
+    /**
+     * 获取APP版本信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('appVersion:version:query')")
+    @GetMapping(value = "/{fId}")
+    public AjaxResult getInfo(@PathVariable("fId") Long fId) {
+        return AjaxResult.success(tAppVersionService.selectTAppVersionById(fId));
+    }
+
+    /**
+     * 新增APP版本信息
+     */
+    @PreAuthorize("@ss.hasPermi('appVersion:version:add')")
+    @Log(title = "APP版本信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TAppVersion tAppVersion) {
+        return toAjax(tAppVersionService.insertTAppVersion(tAppVersion));
+    }
+
+    /**
+     * 修改APP版本信息
+     */
+    @PreAuthorize("@ss.hasPermi('appVersion:version:edit')")
+    @Log(title = "APP版本信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TAppVersion tAppVersion) {
+        return toAjax(tAppVersionService.updateTAppVersion(tAppVersion));
+    }
+
+    /**
+     * 删除APP版本信息
+     */
+    @PreAuthorize("@ss.hasPermi('appVersion:version:remove')")
+    @Log(title = "APP版本信息", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{fIds}")
+    public AjaxResult remove(@PathVariable Long[] fIds) {
+        return toAjax(tAppVersionService.deleteTAppVersionByIds(fIds));
+    }
+
+    /**
+     * 获取app版本信息
+     * @return
+     */
+    @Log(title = "获取APP版本信息", businessType = BusinessType.DELETE)
+    @GetMapping("getAppVersion")
+    public AjaxResult getAppVersion(Integer integer){
+        if (integer == null){
+            return AjaxResult.error("参数不能为空");
+        }
+        return tAppVersionService.getAppVersion(integer);
+    }
+}

+ 15 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TCntrnoController.java

@@ -69,9 +69,9 @@ public class TCntrnoController extends BaseController
     @GetMapping("/export")
     public AjaxResult export(TCntrno tCntrno)
     {
-        List<TCntrno> list = tCntrnoService.selectTCntrnoList(tCntrno);
+        List<TCntrno> list = tCntrnoService.selectTcntrnoMessage(tCntrno);
         ExcelUtil<TCntrno> util = new ExcelUtil<TCntrno>(TCntrno.class);
-        return util.exportExcel(list, "cntrno");
+        return util.exportExcel(list, "箱信息");
     }
 
     /**
@@ -239,6 +239,19 @@ public class TCntrnoController extends BaseController
         }
     }
 
+    /**
+     * 商务端获取集装箱 箱号、地点、空重
+     * @param tCntrno
+     * @return
+     */
+    @GetMapping("/getTcntrnoFno")
+    public TableDataInfo getTcntrnoFno(TCntrno tCntrno)
+    {
+        startPage();
+        List<Map<String, Object>> list = tCntrnoService.getTcntrnoFno(tCntrno);
+        return getDataTable(list);
+    }
+
 
 
 

+ 4 - 0
ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java

@@ -121,6 +121,10 @@ public class Constants
      * 字典管理 cache key
      */
     public static final String SYS_DICT_KEY = "sys_dict:";
+    /**
+     * app版本管理 cache key
+     */
+    public static final String SYS_VERSION_KEY = "sys_version:";
 
     /**
      * 资源映射路径 前缀

+ 71 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/wechat/VersionUtil.java

@@ -0,0 +1,71 @@
+package com.ruoyi.common.utils.wechat;
+
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.core.domain.entity.SysDictData;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Author ZhaoQian La
+ * @Date 2021/6/16 9:40
+ * @Version 1.0
+ */
+
+/**
+ * 版本控制工具类
+ */
+public class VersionUtil {
+    /**
+     * 分隔符
+     */
+    public static final String SEPARATOR = ",";
+
+    /**
+     * 设置版本信息缓存
+     *
+     * @param key 参数键
+     * @param dictDatas 版本信息数据列表
+     */
+    public static void setDictCache(String key, String dictDatas)
+    {
+        SpringUtils.getBean(RedisCache.class).setCacheObject(getCacheKey(key), dictDatas);
+    }
+
+    /**
+     * 获取字版本信息缓存
+     *
+     * @param key 参数键
+     * @return dictDatas 版本信息数据列表
+     */
+    public static String getDictCache(String key)
+    {
+        String cacheObject = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key));
+        if (StringUtils.isNotEmpty(cacheObject)){
+            return cacheObject;
+        }
+        return null;
+    }
+    /**
+     * 清空版本缓存
+     */
+    public static void clearDictCache(String configKey)
+    {
+        Collection<String> keys = SpringUtils.getBean(RedisCache.class).keys(Constants.SYS_VERSION_KEY + configKey);
+        SpringUtils.getBean(RedisCache.class).deleteObject(keys);
+    }
+
+    /**
+     * 设置cache key
+     *
+     * @param configKey 参数键
+     * @return 缓存键key
+     */
+    public static String getCacheKey(String configKey)
+    {
+        return Constants.SYS_VERSION_KEY + configKey;
+    }
+}

+ 53 - 29
ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TCntrno.java

@@ -6,6 +6,7 @@ import java.util.List;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
+import lombok.With;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -29,64 +30,87 @@ public class TCntrno extends BaseEntity
     @Excel(name = "箱号")
     private String fNo;
 
+    //箱类型中文
+    @Excel(name = "箱类型")
+    private String typeidName;
+
+    //地点中文名称
+    @Excel(name = "地点")
+    private String addressName;
+
+    //箱主中文
+    @Excel(name = "箱主")
+    private String ownerName;
+
+    //箱来源中文
+    @Excel(name = "箱来源")
+    private String sourceName;
+
+    //箱状态中文
+    @Excel(name = "箱状态")
+    private String cntrstatusName;
+
+    //租赁方式中文
+    @Excel(name = "租赁方式")
+    private String rentName;
+
+    //空重中文
+    @Excel(name = "空重")
+    private String updateEFName;
+
+    /*备注*/
+    @Excel(name = "备注")
+    private String remark;
+
+    /*创建者*/
+    @Excel(name = "录入人")
+    private String createBy;
+
+    /* 创建时间*/
+    @Excel(name = "录入时间",dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date createTime;
+
+    /* 更新者*/
+    @Excel(name = "最新修改人")
+    private String updateBy;
+
+    /* 更新时间*/
+    @Excel(name = "最新修改时间",dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date updateTime;
+
+
     /** 箱类型(存t_cntr 编号 存储id) */
-    @Excel(name = "箱类型", readConverterExp = "存=t_cntr,编=号,存=储id")
     private Long fTypeid;
 
     /** 箱主(选择数据字典 铁路凯和) */
-    @Excel(name = "箱主", readConverterExp = "选=择数据字典,铁=路凯和")
     private String fOwner;
 
     /** 箱来源(数据字典 自由,租赁、买入、合作) */
-    @Excel(name = "箱来源", readConverterExp = "数=据字典,自=由,租赁、买入、合作")
     private String fSource;
 
     /** 租赁方式(数据字典 长租、短租) */
-    @Excel(name = "租赁方式", readConverterExp = "数=据字典,长=租、短租")
     private String fRent;
 
     /** 最新时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "最新时间", width = 30, dateFormat = "yyyy-MM-dd")
+    //@Excel(name = "最新时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date fUpdatetime;
 
     /** 最新地点 */
-    @Excel(name = "最新地点")
     private String fUpdateaddress;
-
     /** 数据字典  空重 */
-    @Excel(name = "数据字典  空重")
     private String fUpdateef;
-
     /** 数据字典 好 坏 */
-    @Excel(name = "数据字典 好 坏")
     private String fCntrstatus;
-
     /** 默认 T ,正常T 停用F 下拉选择 */
-    @Excel(name = "默认 T ,正常T 停用F 下拉选择")
     private String fStatus;
     /**数据字典 调箱动作*/
-    @Excel(name = "数据字典 调箱动作")
     private String fOpctnstatus;
-    @Excel(name = "铅封号")
     private String fSealno;
-
     //提单号
     private String fMblno;
-    //箱主中文
-    private String ownerName;
-    //箱类型中文
-    private String typeidName;
-    //箱来源中文
-    private String sourceName;
-    //租赁方式中文
-    private String rentName;
-    //空重中文
-    private String updateEFName;
-    //地点中文名称
-    private String addressName;
-    //箱状态中文
-    private String cntrstatusName;
     //查询时间区间
     private List<String> cLoadDate;
     //集装箱尺码

+ 7 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/mapper/TCntrnoMapper.java

@@ -105,4 +105,11 @@ public interface TCntrnoMapper
      * @return 结果
      */
     public int insertTCntrnoList(List<TCntrno> tCntrno);
+
+    /**
+     * 获取 箱号、地点、空重
+     * @param tCntrno
+     * @return
+     */
+    public List<Map<String, Object>> getTcntrnoFno(TCntrno tCntrno);
 }

+ 7 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/ITCntrnoService.java

@@ -136,4 +136,11 @@ public interface ITCntrnoService
      * @return
      */
     public AjaxResult batch(String tCntrno, LoginUser loginUser);
+
+    /**
+     * 获取 箱号、地点、空重
+     * @param tCntrno
+     * @return
+     */
+    public List<Map<String, Object>> getTcntrnoFno(TCntrno tCntrno);
 }

+ 5 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TCntrnoServiceImpl.java

@@ -489,6 +489,11 @@ public class TCntrnoServiceImpl implements ITCntrnoService {
         }
     }
 
+    @Override
+    public List<Map<String, Object>> getTcntrnoFno(TCntrno tCntrno) {
+        return tCntrnoMapper.getTcntrnoFno(tCntrno);
+    }
+
     /**
      * set字段
      *

+ 18 - 0
ruoyi-shipping/src/main/resources/mapper/shipping/TCntrnoMapper.xml

@@ -429,6 +429,24 @@
             </trim>
         </foreach>
     </insert>
+    <select id="getTcntrnoFno" parameterType="TCntrno" resultType="map">
+        SELECT
+        tc.f_no,
+        address.f_name addressName,
+        sdda.dict_label updateEFName
+        FROM
+        t_cntrno tc
+        LEFT JOIN sys_dict_data sdda ON sdda.dict_value = tc.f_updateEF
+        AND sdda.dict_type = 'f_updateEF'
+        LEFT JOIN t_address address ON address.f_id = tc.f_updateaddress
+        <where>
+            tc.f_status = 'T'
+            <if test="fNo != null  and fNo != ''">and tc.f_no like concat('%', #{fNo}, '%') </if>
+            <if test="fUpdateaddress != null  and fUpdateaddress != ''">and tc.f_updateaddress = #{fUpdateaddress}</if>
+            <if test="fUpdateef != null  and fUpdateef != ''">and tc.f_updateEF = #{fUpdateef}</if>
+        </where>
+        ORDER BY tc.f_no
+    </select>
 
 
 </mapper>

+ 109 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/appVersion/domain/TAppVersion.java

@@ -0,0 +1,109 @@
+package com.ruoyi.appVersion.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * APP版本信息对象 t_app_version
+ * 
+ * @author ruoyi
+ * @date 2021-06-16
+ */
+public class TAppVersion extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long fId;
+
+    /** key */
+    @Excel(name = "key")
+    private String fParamkey;
+
+    /** value */
+    @Excel(name = "value")
+    private String fParamvalue;
+
+    /** 0 正常 1 停用 */
+    @Excel(name = "0 正常 1 停用")
+    private Integer fStatus;
+
+    /** 扩展 */
+    @Excel(name = "扩展")
+    private String fParamlabel;
+    //状态中文名
+    private String fStatusName;
+
+    public String getfStatusName() {
+        return fStatusName;
+    }
+
+    public void setfStatusName(String fStatusName) {
+        this.fStatusName = fStatusName;
+    }
+
+    public void setfId(Long fId)
+    {
+        this.fId = fId;
+    }
+
+    public Long getfId() 
+    {
+        return fId;
+    }
+    public void setfParamkey(String fParamkey) 
+    {
+        this.fParamkey = fParamkey;
+    }
+
+    public String getfParamkey() 
+    {
+        return fParamkey;
+    }
+    public void setfParamvalue(String fParamvalue) 
+    {
+        this.fParamvalue = fParamvalue;
+    }
+
+    public String getfParamvalue() 
+    {
+        return fParamvalue;
+    }
+    public void setfStatus(Integer fStatus) 
+    {
+        this.fStatus = fStatus;
+    }
+
+    public Integer getfStatus() 
+    {
+        return fStatus;
+    }
+    public void setfParamlabel(String fParamlabel) 
+    {
+        this.fParamlabel = fParamlabel;
+    }
+
+    public String getfParamlabel() 
+    {
+        return fParamlabel;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("fId", getfId())
+            .append("fParamkey", getfParamkey())
+            .append("fParamvalue", getfParamvalue())
+            .append("fStatus", getfStatus())
+            .append("fParamlabel", getfParamlabel())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .append("fStatusName", getfStatusName())
+            .toString();
+    }
+}

+ 68 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/appVersion/mapper/TAppVersionMapper.java

@@ -0,0 +1,68 @@
+package com.ruoyi.appVersion.mapper;
+
+import java.util.List;
+import com.ruoyi.appVersion.domain.TAppVersion;
+
+/**
+ * APP版本信息Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2021-06-16
+ */
+public interface TAppVersionMapper 
+{
+    /**
+     * 查询APP版本信息
+     * 
+     * @param fId APP版本信息ID
+     * @return APP版本信息
+     */
+    public TAppVersion selectTAppVersionById(Long fId);
+
+    /**
+     * 查询APP版本信息列表
+     * 
+     * @param tAppVersion APP版本信息
+     * @return APP版本信息集合
+     */
+    public List<TAppVersion> selectTAppVersionList(TAppVersion tAppVersion);
+
+    /**
+     * 新增APP版本信息
+     * 
+     * @param tAppVersion APP版本信息
+     * @return 结果
+     */
+    public int insertTAppVersion(TAppVersion tAppVersion);
+
+    /**
+     * 修改APP版本信息
+     * 
+     * @param tAppVersion APP版本信息
+     * @return 结果
+     */
+    public int updateTAppVersion(TAppVersion tAppVersion);
+
+    /**
+     * 删除APP版本信息
+     * 
+     * @param fId APP版本信息ID
+     * @return 结果
+     */
+    public int deleteTAppVersionById(Long fId);
+
+    /**
+     * 批量删除APP版本信息
+     * 
+     * @param fIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTAppVersionByIds(Long[] fIds);
+    /**
+     * 批量修改APP版本信息
+     *
+     * @param fIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int updateTAppVersionFstatus(Long[] fIds);
+}

+ 64 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/appVersion/service/ITAppVersionService.java

@@ -0,0 +1,64 @@
+package com.ruoyi.appVersion.service;
+
+import java.util.List;
+import com.ruoyi.appVersion.domain.TAppVersion;
+import com.ruoyi.common.core.domain.AjaxResult;
+
+/**
+ * APP版本信息Service接口
+ * 
+ * @author ruoyi
+ * @date 2021-06-16
+ */
+public interface ITAppVersionService 
+{
+    /**
+     * 查询APP版本信息
+     * 
+     * @param fId APP版本信息ID
+     * @return APP版本信息
+     */
+    public TAppVersion selectTAppVersionById(Long fId);
+
+    /**
+     * 查询APP版本信息列表
+     * 
+     * @param tAppVersion APP版本信息
+     * @return APP版本信息集合
+     */
+    public List<TAppVersion> selectTAppVersionList(TAppVersion tAppVersion);
+
+    /**
+     * 新增APP版本信息
+     * 
+     * @param tAppVersion APP版本信息
+     * @return 结果
+     */
+    public int insertTAppVersion(TAppVersion tAppVersion);
+
+    /**
+     * 修改APP版本信息
+     * 
+     * @param tAppVersion APP版本信息
+     * @return 结果
+     */
+    public int updateTAppVersion(TAppVersion tAppVersion);
+
+    /**
+     * 批量删除APP版本信息
+     * 
+     * @param fIds 需要删除的APP版本信息ID
+     * @return 结果
+     */
+    public int deleteTAppVersionByIds(Long[] fIds);
+
+    /**
+     * 删除APP版本信息信息
+     * 
+     * @param fId APP版本信息ID
+     * @return 结果
+     */
+    public int deleteTAppVersionById(Long fId);
+
+    public AjaxResult getAppVersion(Integer integer);
+}

+ 144 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/appVersion/service/impl/TAppVersionServiceImpl.java

@@ -0,0 +1,144 @@
+package com.ruoyi.appVersion.service.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.wechat.VersionUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.appVersion.mapper.TAppVersionMapper;
+import com.ruoyi.appVersion.domain.TAppVersion;
+import com.ruoyi.appVersion.service.ITAppVersionService;
+
+/**
+ * APP版本信息Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2021-06-16
+ */
+@Service
+public class TAppVersionServiceImpl implements ITAppVersionService 
+{
+    @Autowired
+    private TAppVersionMapper tAppVersionMapper;
+
+    /**
+     * 查询APP版本信息
+     * 
+     * @param fId APP版本信息ID
+     * @return APP版本信息
+     */
+    @Override
+    public TAppVersion selectTAppVersionById(Long fId)
+    {
+        return tAppVersionMapper.selectTAppVersionById(fId);
+    }
+
+    /**
+     * 查询APP版本信息列表
+     * 
+     * @param tAppVersion APP版本信息
+     * @return APP版本信息
+     */
+    @Override
+    public List<TAppVersion> selectTAppVersionList(TAppVersion tAppVersion)
+    {
+        return tAppVersionMapper.selectTAppVersionList(tAppVersion);
+    }
+
+    /**
+     * 新增APP版本信息
+     * 
+     * @param tAppVersion APP版本信息
+     * @return 结果
+     */
+    @Override
+    public int insertTAppVersion(TAppVersion tAppVersion)
+    {
+        tAppVersion.setCreateTime(DateUtils.getNowDate());
+        tAppVersion.setCreateBy(SecurityUtils.getUsername());
+        int i = tAppVersionMapper.insertTAppVersion(tAppVersion);
+        if (i > 0){
+            VersionUtil.setDictCache(tAppVersion.getfParamkey(),tAppVersion.getfParamvalue());
+        }
+        return i;
+    }
+
+    /**
+     * 修改APP版本信息
+     * 
+     * @param tAppVersion APP版本信息
+     * @return 结果
+     */
+    @Override
+    public int updateTAppVersion(TAppVersion tAppVersion)
+    {
+        tAppVersion.setUpdateTime(DateUtils.getNowDate());
+        tAppVersion.setUpdateBy(SecurityUtils.getUsername());
+        int i = tAppVersionMapper.updateTAppVersion(tAppVersion);
+        if (i > 0){
+            VersionUtil.clearDictCache(tAppVersion.getfParamkey());
+            VersionUtil.setDictCache(tAppVersion.getfParamkey(),tAppVersion.getfParamvalue());
+        }
+        return i;
+    }
+
+    /**
+     * 批量删除APP版本信息
+     * 
+     * @param fIds 需要删除的APP版本信息ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTAppVersionByIds(Long[] fIds)
+    {
+        int i = tAppVersionMapper.updateTAppVersionFstatus(fIds);
+        if (i > 0){
+            for (Long fId : fIds) {
+                TAppVersion tAppVersion = tAppVersionMapper.selectTAppVersionById(fId);
+                VersionUtil.clearDictCache(tAppVersion.getfParamkey());
+            }
+        }
+        return i;
+    }
+
+    /**
+     * 删除APP版本信息信息
+     * 
+     * @param fId APP版本信息ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTAppVersionById(Long fId)
+    {
+        TAppVersion tAppVersion = tAppVersionMapper.selectTAppVersionById(fId);
+        int i = tAppVersionMapper.deleteTAppVersionById(fId);
+        if (i > 0){
+            VersionUtil.clearDictCache(tAppVersion.getfParamkey());
+        }
+        return i;
+    }
+
+    @Override
+    public AjaxResult getAppVersion(Integer integer) {
+        Map<String,Object> map = new HashMap<>();
+        if (integer == 1){  //1 安卓
+            map.put("version",VersionUtil.getDictCache("android_version"));
+            map.put("url",VersionUtil.getDictCache("android_url"));
+            map.put("plus_msg",VersionUtil.getDictCache("android_plus_msg"));
+            map.put("minimum_Version",VersionUtil.getDictCache("android_minimum_Version"));
+            return AjaxResult.success("success",map);
+        }else if (integer == 2){ //2 ios
+            map.put("version",VersionUtil.getDictCache("ios_version"));
+            map.put("url",VersionUtil.getDictCache("ios_url"));
+            map.put("plus_msg",VersionUtil.getDictCache("ios_plus_msg"));
+            map.put("minimum_Version",VersionUtil.getDictCache("ios_minimum_Version"));
+            return AjaxResult.success("success",map);
+        }
+        return AjaxResult.success();
+    }
+}

+ 1 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/impl/TFeeServiceImpl.java

@@ -946,7 +946,7 @@ public class TFeeServiceImpl implements ITFeeService {
             auditItems.setIffinalItem("F");
             auditItems.setBillNo(tFee.getfBillno()); // 业务编号
             auditItems.setRefno1(String.valueOf(tFee.getfCorpid())); // 货权方
-            auditItems.setRefno2(tFee.getfBilltype());// 财务类型
+            auditItems.setRefno2(fBilltype);// 财务类型
             auditItems.setRefno3(tFee.gettMblno());// 提单号
             auditItems.setSendUserId(loginUser.getUser().getUserId());
             auditItems.setSendName(loginUser.getUsername());

+ 18 - 10
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -774,6 +774,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         String key = "";//键
         long actId = 0L;//活动id
         Long fPid = null;
+        Long billStatus = null;
         Map<String, Object> map = new HashMap<>();
         if ("KHDD".equals(billsType)) {
             actId = 410L;
@@ -787,6 +788,11 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         if ("0".equals(sysConfig.getConfigValue())) {
             isApprove = true;
         }
+        if (isApprove) {
+            billStatus = 4L;
+        } else {
+            billStatus = 6L;
+        }
         TWarehouseBills warehouseBills = JSONArray.parseObject(tWarehousebills, TWarehouseBills.class);
         JSONArray jsonCrArray = JSONArray.parseArray(tWarehousebillsCntr);
         List<TWarehousebillsCntr> tWarehousebillsCntrs = JSONObject.parseArray(jsonCrArray.toJSONString(), TWarehousebillsCntr.class);
@@ -804,11 +810,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             warehouseBills.setfCorpid(clientFid);
             warehouseBills.setfContacts(loginUser.getUser().getUserName());
             warehouseBills.setfTel(loginUser.getUser().getPhonenumber());
-            if (isApprove) {
-                warehouseBills.setfBillstatus(4L);
-            } else {
-                warehouseBills.setfBillstatus(6L);
-            }
+            warehouseBills.setfBillstatus(billStatus);
+            warehouseBills.setfTimes(1L);
             int i = tWarehouseBillsMapper.insertTWarehousebills(warehouseBills);
             if (CollectionUtils.isNotEmpty(tWarehousebillsCntrs)) {
                 for (TWarehousebillsCntr warehousebillsCntr : tWarehousebillsCntrs) {
@@ -830,11 +833,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             fPid = warehouseBills.getfId();
             warehouseBills.setUpdateTime(DateUtils.getNowDate());
             warehouseBills.setUpdateBy(SecurityUtils.getUsername());
-            if (isApprove) {
-                warehouseBills.setfBillstatus(4L);
-            } else {
-                warehouseBills.setfBillstatus(6L);
-            }
+            warehouseBills.setfBillstatus(billStatus);
+            warehouseBills.setfTimes(tWarehouseBills.getfTimes() + 1);
             tWarehouseBillsMapper.updateTWarehousebills(warehouseBills);
             tWarehousebillsCntrMapper.deleteTWarehousebillsCntrfPid(warehouseBills.getfId());
             if (CollectionUtils.isNotEmpty(tWarehousebillsCntrs)) {
@@ -871,6 +871,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             auditItems.setAuditOpTime(new Date());
             auditItems.setAuditMsg("提交");
             auditItems.setAuditStatus("O");
+            auditItems.setFidStatus("f_billstatus");
+            auditItems.setTimes(1L);
             AjaxResult approvalFlow = auditItemsService.createApprovalFlow(auditItems);
 //            Long code = Long.valueOf(String.valueOf(approvalFlow.get("code"))).longValue();
             String code = approvalFlow.get("code").toString();
@@ -973,6 +975,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
             return AjaxResult.error("当前数据不允许提交");
         }
+        warehouseBills.setfTimes(tWarehouseBills.getfTimes() + 1);
         tWarehouseBillsMapper.updateTWarehousebills(warehouseBills);
         tWarehousebillsCntritemsMapper.deleteTWarehousebillsCntritemsfPid(warehouseBills.getfId());
         if (CollectionUtils.isNotEmpty(tWarehousebillsCntritemsList)) {
@@ -1008,6 +1011,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             auditItems.setAuditOpTime(new Date());
             auditItems.setAuditMsg("提交");
             auditItems.setAuditStatus("O");
+            auditItems.setFidStatus("f_billstatus");
+            auditItems.setTimes(1L);
             AjaxResult approvalFlow = auditItemsService.createApprovalFlow(auditItems);
 //            Long code = Long.valueOf(String.valueOf(approvalFlow.get("code"))).longValue();
             String code = approvalFlow.get("code").toString();
@@ -2294,6 +2299,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         if (tWarehouseBills.getfBillstatus() != 11L) {
             return AjaxResult.error("订单未审核完成,暂不支持维护提单号");
         }
+        warehouseBills.setfTimes(tWarehouseBills.getfTimes() + 1);
         /*TWarehouseBills bills = new TWarehouseBills();
         bills.setfId(warehouseBills.getfId());
         bills.setfMblno(warehouseBills.getfMblno());*/
@@ -2391,6 +2397,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             auditItems.setAuditOpTime(new Date());
             auditItems.setAuditMsg("提交");
             auditItems.setAuditStatus("O");
+            auditItems.setFidStatus("f_billstatus");
+            auditItems.setTimes(1L);
             AjaxResult approvalFlow = auditItemsService.createApprovalFlow(auditItems);
 //            Long code = Long.valueOf(String.valueOf(approvalFlow.get("code"))).longValue();
             String code = approvalFlow.get("code").toString();

+ 109 - 0
ruoyi-warehouse/src/main/resources/mapper/appVersion/TAppVersionMapper.xml

@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.appVersion.mapper.TAppVersionMapper">
+    
+    <resultMap type="TAppVersion" id="TAppVersionResult">
+        <result property="fId"    column="f_id"    />
+        <result property="fParamkey"    column="f_paramKey"    />
+        <result property="fParamvalue"    column="f_paramValue"    />
+        <result property="fStatus"    column="f_status"    />
+        <result property="fParamlabel"    column="f_paramLabel"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectTAppVersionVo">
+        select f_id, f_paramKey, f_paramValue, f_status,
+               CASE
+                   WHEN f_status = '0' THEN
+                       '正常'
+                   WHEN f_status = '1' THEN
+                       '停用'
+                   END AS fStatusName,
+               f_paramLabel, create_by, create_time, update_by, update_time, remark from t_app_version
+    </sql>
+
+    <select id="selectTAppVersionList" parameterType="TAppVersion" resultMap="TAppVersionResult">
+        <include refid="selectTAppVersionVo"/>
+        <where>  
+            <if test="fParamkey != null  and fParamkey != ''"> and f_paramKey = #{fParamkey}</if>
+            <if test="fParamvalue != null  and fParamvalue != ''"> and f_paramValue = #{fParamvalue}</if>
+            <if test="fStatus != null "> and f_status = #{fStatus}</if>
+            <if test="fParamlabel != null  and fParamlabel != ''"> and f_paramLabel = #{fParamlabel}</if>
+        </where>
+    </select>
+    
+    <select id="selectTAppVersionById" parameterType="Long" resultMap="TAppVersionResult">
+        <include refid="selectTAppVersionVo"/>
+        where f_id = #{fId}
+    </select>
+        
+    <insert id="insertTAppVersion" parameterType="TAppVersion">
+        insert into t_app_version
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="fId != null">f_id,</if>
+            <if test="fParamkey != null">f_paramKey,</if>
+            <if test="fParamvalue != null">f_paramValue,</if>
+            <if test="fStatus != null">f_status,</if>
+            <if test="fParamlabel != null">f_paramLabel,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="fId != null">#{fId},</if>
+            <if test="fParamkey != null">#{fParamkey},</if>
+            <if test="fParamvalue != null">#{fParamvalue},</if>
+            <if test="fStatus != null">#{fStatus},</if>
+            <if test="fParamlabel != null">#{fParamlabel},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTAppVersion" parameterType="TAppVersion">
+        update t_app_version
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="fParamkey != null">f_paramKey = #{fParamkey},</if>
+            <if test="fParamvalue != null">f_paramValue = #{fParamvalue},</if>
+            <if test="fStatus != null">f_status = #{fStatus},</if>
+            <if test="fParamlabel != null">f_paramLabel = #{fParamlabel},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where f_id = #{fId}
+    </update>
+
+    <delete id="deleteTAppVersionById" parameterType="Long">
+        delete from t_app_version where f_id = #{fId}
+    </delete>
+    <update id="updateTAppVersionFstatus" parameterType="TAppVersion">
+        update t_app_version
+        set f_status = 1
+        where f_id in
+        <foreach item="fId" collection="array" open="(" separator="," close=")">
+            #{fId}
+        </foreach>
+    </update>
+
+    <delete id="deleteTAppVersionByIds" parameterType="String">
+        delete from t_app_version where f_id in 
+        <foreach item="fId" collection="array" open="(" separator="," close=")">
+            #{fId}
+        </foreach>
+    </delete>
+    
+</mapper>