Browse Source

2024年9月26日17:05:14 中电禅道

纪新园 1 year ago
parent
commit
58bbfa78bc
31 changed files with 1255 additions and 109 deletions
  1. 2 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TCorpsController.java
  2. 27 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TWarehouseController.java
  3. 8 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TWarehouseWebcamController.java
  4. 3 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/check/TWarehouseCheckItemsController.java
  5. 24 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/TWarehouse.java
  6. 24 13
      ruoyi-warehouse/src/main/java/com/ruoyi/approvalFlow/service/impl/AuditPathsServiceImpl.java
  7. 308 0
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/domain/TContactsItems.java
  8. 28 0
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TContactsItemsMapper.java
  9. 2 0
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TWarehouseMapper.java
  10. 1 1
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/ITCorpsService.java
  11. 4 0
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/ITWarehouseService.java
  12. 2 0
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/ITWarehouseWebcamService.java
  13. 13 0
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/TContactsItemsService.java
  14. 17 0
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TContactsItemsServiceImpl.java
  15. 28 2
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TCorpsServiceImpl.java
  16. 166 13
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TWarehouseServiceImpl.java
  17. 79 4
      ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TWarehouseWebcamServiceImpl.java
  18. 28 0
      ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/domain/TWareHouseItemsExcel.java
  19. 55 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TEnclosure.java
  20. 28 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehouseBills.java
  21. 142 40
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitems.java
  22. 6 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/dto/WarehouseSubmitDTO.java
  23. 6 0
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/vo/WarehouseInfoVO.java
  24. 24 4
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseAgreementServiceImpl.java
  25. 68 19
      ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java
  26. 90 0
      ruoyi-warehouse/src/main/resources/mapper/basicData/TContactsItemsMapper.xml
  27. 13 3
      ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseMapper.xml
  28. 3 2
      ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml
  29. 18 1
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TEnclosureMapper.xml
  30. 20 3
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml
  31. 18 2
      ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

+ 2 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TCorpsController.java

@@ -109,6 +109,7 @@ public class TCorpsController extends BaseController {
     @RepeatSubmit
     public AjaxResult add(@RequestParam("corps") String tCorps,
                           @RequestParam("customerContacts") String tCustomerContacts,
+                          @RequestParam("ctnpriceItemsList") String ctnpriceItemsList,
                           @RequestParam("attach") String attach) {
         // 检验编号、名称、简称 唯一
         TCorps tCorps1 = JSONArray.parseObject(tCorps, TCorps.class);
@@ -126,7 +127,7 @@ public class TCorpsController extends BaseController {
                 return AjaxResult.error("未找到客户联系人信息,请确认");
             }
         }
-        return tCorpsService.insertTCorps(tCorps, tCustomerContacts, attach, SecurityUtils.getLoginUser());
+        return tCorpsService.insertTCorps(tCorps, tCustomerContacts, attach, SecurityUtils.getLoginUser(),ctnpriceItemsList);
     }
 
     /**

+ 27 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TWarehouseController.java

@@ -11,10 +11,14 @@ import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.TWarehouse;
 import com.ruoyi.common.core.domain.entity.TWarehouseImport;
+import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.ServletUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.framework.web.service.TokenService;
 import com.ruoyi.system.service.ISysDictDataService;
 import com.ruoyi.warehouseBusiness.domain.TAnnex;
 import com.ruoyi.warehouseBusiness.domain.dto.WarehouseSubmitDTO;
@@ -290,4 +294,27 @@ public class TWarehouseController extends BaseController {
     {
         return tWarehouseService.importTWarehouse(file,parentId);
     }
+
+
+    /**
+     * 仓储费请核
+     */
+    @PostMapping(value = "/agreementStorageSubmission")
+    @RepeatSubmit
+    public AjaxResult agreementStorageSubmission(@Validated @RequestBody WarehouseSubmitDTO tWarehouse) {
+        // 获取当前的用户
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return tWarehouseService.tWarehouseAgreementSubmit(tWarehouse, loginUser);
+    }
+
+    /**
+     * 撤销仓储费协议请核
+     */
+    @PostMapping(value = "/revoke")
+    @RepeatSubmit
+    public AjaxResult revoke(@Validated @RequestBody WarehouseSubmitDTO tWarehouse) {
+        // 获取当前的用户
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return tWarehouseService.revoke(tWarehouse, loginUser);
+    }
 }

+ 8 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TWarehouseWebcamController.java

@@ -134,4 +134,12 @@ public class TWarehouseWebcamController extends BaseController {
     public AjaxResult remove(@PathVariable Long[] fIds) {
         return toAjax(tWarehouseWebcamService.deleteTWarehouseWebcamByIds(fIds));
     }
+
+    /**
+     * 获取摄像头流地址
+     */
+    @GetMapping("/getWebcamUrl")
+    public AjaxResult getWebcamUrl(String deviceSerial,String projectId) {
+        return tWarehouseWebcamService.getWebcamUrl(deviceSerial,projectId);
+    }
 }

+ 3 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/check/TWarehouseCheckItemsController.java

@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -140,7 +141,8 @@ public class TWarehouseCheckItemsController extends BaseController
         if ("外部用户".equals(user.getDept().getDeptName())) {
             tWarehouseCheckItems.setfInspectorId(user.getUserId());
             if (StringUtils.isEmpty(tWarehouseCheckItems.getInspectionEndDate())) {
-                tWarehouseCheckItems.setInspectionEndDate(DateUtils.offsetMonth(-1) + "23:59:59");
+//                tWarehouseCheckItems.setInspectionEndDate(DateUtils.offsetMonth(-1) + "23:59:59");
+                tWarehouseCheckItems.setInspectionEndDate(DateUtils.getDate());
             }
         }
         startPage();

+ 24 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/TWarehouse.java

@@ -123,6 +123,30 @@ public class TWarehouse extends BaseEntity
     @Excel(name = "占地面积")
     private String fCoverArea;
 
+    /** 土地性质 */
+    @Excel(name = "土地性质")
+    private String landNature;
+
+    /** 审核状态 */
+    @Excel(name = "审核状态")
+    private String approvalStatus;
+
+    public String getApprovalStatus() {
+        return approvalStatus;
+    }
+
+    public void setApprovalStatus(String approvalStatus) {
+        this.approvalStatus = approvalStatus;
+    }
+
+    public String getLandNature() {
+        return landNature;
+    }
+
+    public void setLandNature(String landNature) {
+        this.landNature = landNature;
+    }
+
     public String getfProperties() {
         return fProperties;
     }

+ 24 - 13
ruoyi-warehouse/src/main/java/com/ruoyi/approvalFlow/service/impl/AuditPathsServiceImpl.java

@@ -15,6 +15,7 @@ import com.ruoyi.basicData.mapper.TCorpsMapper;
 import com.ruoyi.basicData.mapper.TFeesMapper;
 import com.ruoyi.basicData.mapper.TWarehouseMapper;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.TWarehouse;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.exception.WarehouseException;
 import com.ruoyi.common.utils.DictUtils;
@@ -35,7 +36,6 @@ import com.ruoyi.warehouseBusiness.mapper.*;
 import com.ruoyi.warehouseBusiness.service.impl.TWarehouseAgreementServiceImpl;
 import com.ruoyi.warehouseBusiness.service.impl.TWarehouseBillsServiceImpl;
 import com.ruoyi.warehouseBusiness.service.impl.TWarehousebillsModifyServiceImpl;
-import io.netty.util.internal.ObjectUtil;
 import org.apache.commons.compress.utils.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -292,16 +292,16 @@ public class AuditPathsServiceImpl implements IAuditPathsService {
         //判断特定字段是否为空,为空设置为空字符串,或设置为当前时间
         for (int i = 0; i < mapList.size(); i++) {
             Map<String, Object> objectMap = mapList.get(i);
-            if (objectMap.get("auditItem")==null){
-                objectMap.put("auditItem","");
+            if (objectMap.get("auditItem") == null) {
+                objectMap.put("auditItem", "");
             }
-            if (objectMap.get("auditMsg")==null){
-                objectMap.put("auditMsg","");
+            if (objectMap.get("auditMsg") == null) {
+                objectMap.put("auditMsg", "");
             }
-            if (objectMap.get("billTime")==null){
+            if (objectMap.get("billTime") == null) {
                 LocalDateTime now = LocalDateTime.now();
                 String time = now.toString();
-                objectMap.put("billTime",time);
+                objectMap.put("billTime", time);
             }
 //            if (objectMap.get("auditOpTime")==null){
 //                LocalDateTime now = LocalDateTime.now();
@@ -420,8 +420,8 @@ public class AuditPathsServiceImpl implements IAuditPathsService {
                                 List<TWarehousebillsfees> feesList = tWarehousebillsfeesMapper.selectWarehousebillsfeesByPId(auditItems.getBillId());
                                 // 过滤出明细信息查询是否存在已计算仓储费
                                 List<Long> ids = feesList.stream().filter(li -> null != li.getfBilltype()
-                                        && !li.getfBilltype().equals(WarehouseTypeEnum.KCZZ.getType())
-                                        && null != li.getSrcId())
+                                                && !li.getfBilltype().equals(WarehouseTypeEnum.KCZZ.getType())
+                                                && null != li.getSrcId())
                                         .map(TWarehousebillsfees::getSrcId).distinct().collect(toList());
                                 if (CollectionUtils.isNotEmpty(ids) && tWarehousebillsitemsMapper.selectIsCalculateStorageFeesByIds(ids) > 0) {
                                     throw new WarehouseException("计算费用中存在已计算仓储费信息");
@@ -429,9 +429,9 @@ public class AuditPathsServiceImpl implements IAuditPathsService {
 
                                 SysConfig sysConfig = sysConfigMapper.checkConfigKeyUnique("tFeesStatus");
                                 TFees ccf = feesMapper.seletFeesByCCF();
-                                if (!Objects.isNull(sysConfig)){
+                                if (!Objects.isNull(sysConfig)) {
                                     String configValue = sysConfig.getConfigValue();
-                                    if ("0".equals(configValue)){
+                                    if ("0".equals(configValue)) {
                                         // 获取仓储费,并判断费用中是否存在仓储费
                                         if (Objects.isNull(ccf)) {
                                             throw new WarehouseException("未找到仓储费费用信息");
@@ -446,7 +446,7 @@ public class AuditPathsServiceImpl implements IAuditPathsService {
                                             tFeesMapper.selectTFeesById(f.getfFeeid()).getfName().equals("仓储费")
                                     ).findFirst().orElse(null);
                                     // 更新子表仓储费截止日期
-                                    if (ObjectUtils.isNotEmpty(warehousebillsfees)){
+                                    if (ObjectUtils.isNotEmpty(warehousebillsfees)) {
                                         tWarehousebillsitemsMapper.updateItemStorageFeeDeadlineByPId(warehousebillsfees.getfPid(), warehousebillsfees.getfBillingDeadline());
                                     }
                                 }
@@ -722,6 +722,12 @@ public class AuditPathsServiceImpl implements IAuditPathsService {
                         tWarehouseBills.setfBillstatus(fettle);
                         tWarehouseBillsMapper.updateKaHeOrder(tWarehouseBills);
                         getfBillStatus(auditItems, at, fettle);
+                    }
+                    else if (auditItems.getActId() == 1100) {
+                        TWarehouse warehouseSubmitDTO = new TWarehouse();
+                        warehouseSubmitDTO.setfId(auditItems.getBillId());
+                        warehouseSubmitDTO.setApprovalStatus("审核通过");
+                        tWarehouseMapper.updateTWarehouse(warehouseSubmitDTO);
                     } else if (Objects.equals(auditItems.getActId(), WarehouseActIdEnum.FEE_CHANGES.getActId().longValue())) {
                         // 费用变更审核通过处理
                         if ("T".equals(at.getIffinalItem())) {
@@ -996,7 +1002,12 @@ public class AuditPathsServiceImpl implements IAuditPathsService {
             tWarehouseBills.setfBillstatus(fettle);
             tWarehouseBillsMapper.updateKaHeOrder(tWarehouseBills);
             getfBillStatus(auditItems, auditItems, null);
-        } else if (Objects.equals(auditItems.getActId(), WarehouseActIdEnum.FEE_CHANGES.getActId().longValue())) {
+        } else if (auditItems.getActId() == 1100) {
+            TWarehouse warehouseSubmitDTO = new TWarehouse();
+            warehouseSubmitDTO.setfId(auditItems.getBillId());
+            warehouseSubmitDTO.setApprovalStatus("录入");
+            tWarehouseMapper.updateTWarehouse(warehouseSubmitDTO);
+        }else if (Objects.equals(auditItems.getActId(), WarehouseActIdEnum.FEE_CHANGES.getActId().longValue())) {
             warehousebillsModifyService.additionalFeeInformation(auditItems.getBillId(), WarehouseTypeEnum.DISMISS);
         }
         AuditItems item = new AuditItems();

+ 308 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/domain/TContactsItems.java

@@ -0,0 +1,308 @@
+ package com.ruoyi.basicData.domain;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 联系人明细表
+ * @TableName t_contacts_items
+ */
+public class TContactsItems implements Serializable {
+    /**
+     *
+     */
+    private Integer id;
+
+    /**
+     * 删除状态
+     */
+    private String delFlag;
+
+    /**
+     * 创建者
+     */
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新者
+     */
+    private String updateBy;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 联系人
+     */
+    private String contacts;
+
+    /**
+     * 电话
+     */
+    private String tel;
+
+    /**
+     * 排序
+     */
+    private Integer sort;
+
+    /**
+     * 类型(CK=仓库  KH=客户)
+     */
+    private String type;
+
+    /**
+     * 父id
+     */
+    private Long pid;
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     *
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     *
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 删除状态
+     */
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    /**
+     * 删除状态
+     */
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    /**
+     * 创建者
+     */
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    /**
+     * 创建者
+     */
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    /**
+     * 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 更新者
+     */
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    /**
+     * 更新者
+     */
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    /**
+     * 更新时间
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 更新时间
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    /**
+     * 备注
+     */
+    public String getRemark() {
+        return remark;
+    }
+
+    /**
+     * 备注
+     */
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    /**
+     * 联系人
+     */
+    public String getContacts() {
+        return contacts;
+    }
+
+    /**
+     * 联系人
+     */
+    public void setContacts(String contacts) {
+        this.contacts = contacts;
+    }
+
+    /**
+     * 电话
+     */
+    public String getTel() {
+        return tel;
+    }
+
+    /**
+     * 电话
+     */
+    public void setTel(String tel) {
+        this.tel = tel;
+    }
+
+    /**
+     * 排序
+     */
+    public Integer getSort() {
+        return sort;
+    }
+
+    /**
+     * 排序
+     */
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    /**
+     * 类型(CK=仓库  KH=客户)
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * 类型(CK=仓库  KH=客户)
+     */
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    /**
+     * 父id
+     */
+    public Long getPid() {
+        return pid;
+    }
+
+    /**
+     * 父id
+     */
+    public void setPid(Long pid) {
+        this.pid = pid;
+    }
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        TContactsItems other = (TContactsItems) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()))
+            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
+            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
+            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
+            && (this.getContacts() == null ? other.getContacts() == null : this.getContacts().equals(other.getContacts()))
+            && (this.getTel() == null ? other.getTel() == null : this.getTel().equals(other.getTel()))
+            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
+            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
+            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
+        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
+        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
+        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+        result = prime * result + ((getContacts() == null) ? 0 : getContacts().hashCode());
+        result = prime * result + ((getTel() == null) ? 0 : getTel().hashCode());
+        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
+        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
+        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", delFlag=").append(delFlag);
+        sb.append(", createBy=").append(createBy);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateBy=").append(updateBy);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", remark=").append(remark);
+        sb.append(", contacts=").append(contacts);
+        sb.append(", tel=").append(tel);
+        sb.append(", sort=").append(sort);
+        sb.append(", type=").append(type);
+        sb.append(", pid=").append(pid);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 28 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TContactsItemsMapper.java

@@ -0,0 +1,28 @@
+package com.ruoyi.basicData.mapper;
+
+import com.ruoyi.basicData.domain.TContactsItems;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.ruoyi.basicData.domain.TFees;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+* @author 10599
+* @description 针对表【t_contacts_items(联系人明细表)】的数据库操作Mapper
+* @createDate 2024-09-20 13:55:14
+* @Entity basicData.domain.TContactsItems
+*/
+@Mapper
+public interface TContactsItemsMapper{
+
+
+    List<TContactsItems> selectContactsItemsList(TContactsItems tContactsItems);
+
+    public int insertContactsItems(TContactsItems tContactsItems);
+
+
+    public int updateContactsItems(TContactsItems tContactsItems);
+
+    public int deleteContactsItemsById(Long fId);
+}

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TWarehouseMapper.java

@@ -38,6 +38,8 @@ public interface TWarehouseMapper {
 
     public List<TWarehouse> selectTWarehouseLists(TWarehouse tWarehouse);
 
+    public List<TWarehouse> selectTWarehouseListsV1(TWarehouse tWarehouse);
+
     public List<Map<String, Object>> appGetWarehouseList(@Param("corpId") Long corpId);
 
     /**

+ 1 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/ITCorpsService.java

@@ -53,7 +53,7 @@ public interface ITCorpsService {
      * @param tCorps 客户详情
      * @return 结果
      */
-    public AjaxResult insertTCorps(String tCorps, String tCustomerContacts, String attach, LoginUser loginUser);
+    public AjaxResult insertTCorps(String tCorps, String tCustomerContacts, String attach, LoginUser loginUser,String ctnpriceItemsList);
 
     /**
      * 修改客户详情

+ 4 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/ITWarehouseService.java

@@ -319,4 +319,8 @@ public interface ITWarehouseService {
     List<TWarehouse> nominateTreeselect(TWarehouse tWarehouse);
 
     AjaxResult importTWarehouse(MultipartFile file,Long parentId);
+
+    AjaxResult tWarehouseAgreementSubmit(TWarehouse tWarehouse, LoginUser loginUser);
+
+    AjaxResult revoke(TWarehouse tWarehouse, LoginUser loginUser);
 }

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/ITWarehouseWebcamService.java

@@ -92,4 +92,6 @@ public interface ITWarehouseWebcamService {
      * @return 摄像头流地址集合
      */
     public List<Map<String, Object>> getWebcamUrlList(Long fWarehouseId);
+
+    AjaxResult getWebcamUrl(String deviceSerial, String projectId);
 }

+ 13 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/TContactsItemsService.java

@@ -0,0 +1,13 @@
+package com.ruoyi.basicData.service;
+
+import com.ruoyi.basicData.domain.TContactsItems;
+import com.baomidou.mybatisplus.service.IService;
+
+/**
+* @author 10599
+* @description 针对表【t_contacts_items(联系人明细表)】的数据库操作Service
+* @createDate 2024-09-20 13:55:14
+*/
+public interface TContactsItemsService {
+
+}

+ 17 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TContactsItemsServiceImpl.java

@@ -0,0 +1,17 @@
+package com.ruoyi.basicData.service.impl;
+
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.ruoyi.basicData.domain.TContactsItems;
+import com.ruoyi.basicData.service.TContactsItemsService;
+import com.ruoyi.basicData.mapper.TContactsItemsMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author 10599
+* @description 针对表【t_contacts_items(联系人明细表)】的数据库操作Service实现
+* @createDate 2024-09-20 13:55:14
+*/
+@Service
+public class TContactsItemsServiceImpl implements TContactsItemsService{
+
+}

+ 28 - 2
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TCorpsServiceImpl.java

@@ -2,9 +2,11 @@ package com.ruoyi.basicData.service.impl;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.basicData.domain.TContactsItems;
 import com.ruoyi.basicData.domain.TCorps;
 import com.ruoyi.basicData.domain.TCorpsImport;
 import com.ruoyi.basicData.domain.TCustomerContact;
+import com.ruoyi.basicData.mapper.TContactsItemsMapper;
 import com.ruoyi.basicData.mapper.TCorpsMapper;
 import com.ruoyi.basicData.mapper.TCustomerContactMapper;
 import com.ruoyi.basicData.service.ITCorpsService;
@@ -68,6 +70,9 @@ public class TCorpsServiceImpl implements ITCorpsService {
     @Autowired
     private TWarehouseBillsMapper tWarehouseBillsMapper;
 
+    @Autowired
+    private TContactsItemsMapper contactsItemsMapper;
+
     /**
      * 查询客户详情
      *
@@ -83,11 +88,15 @@ public class TCorpsServiceImpl implements ITCorpsService {
             return AjaxResult.error("未找到信息");
         }
         map.put("corp", tCorps);
-        // List<TCustomerContact> customerContactList = tCustomerContactMapper.selectList(new EntityWrapper<TCustomerContact>().eq("f_pid", fId));
         TCustomerContact tCustomerContact = new TCustomerContact();
         tCustomerContact.setfPid(fId);
         map.put("customerContact", tCustomerContactMapper.selectTCustomerContactList(tCustomerContact));
         map.put("attach", tEnclosureMapper.selectTEnclosureByPId(fId));
+        TContactsItems tContactsItems = new TContactsItems();
+        tContactsItems.setPid(tCorps.getfId());
+        tContactsItems.setType("KH");
+        List<TContactsItems> contactsItemsList = contactsItemsMapper.selectContactsItemsList(tContactsItems);
+        map.put("ctnpriceItemsList", contactsItemsList);
         return map;
     }
 
@@ -160,7 +169,7 @@ public class TCorpsServiceImpl implements ITCorpsService {
      */
     @Override
     @Transactional
-    public AjaxResult insertTCorps(String tCorps, String tCustomerContacts, String attach, LoginUser loginUser) {
+    public AjaxResult insertTCorps(String tCorps, String tCustomerContacts, String attach, LoginUser loginUser, String ctnpriceItemsList) {
         if (StringUtils.isEmpty(tCorps)) {
             return AjaxResult.error("提交失败:客户信息为空");
         }
@@ -300,6 +309,23 @@ public class TCorpsServiceImpl implements ITCorpsService {
                 line++;
             }
         }
+        if (StringUtils.isNotEmpty(ctnpriceItemsList) && !"[]".equals(ctnpriceItemsList)) {
+            JSONArray jsonArray = JSONArray.parseArray(ctnpriceItemsList);
+            List<TContactsItems> ctnpriceItems = JSONObject.parseArray(jsonArray.toJSONString(), TContactsItems.class);
+            for (TContactsItems item : ctnpriceItems) {
+                item.setPid(corps.getfId());
+                item.setType("KH");
+                if (item.getId() == null) {
+                    item.setCreateTime(new Date());
+                    item.setCreateBy(SecurityUtils.getUsername());
+                    contactsItemsMapper.insertContactsItems(item);
+                } else {
+                    item.setUpdateTime(new Date());
+                    item.setUpdateBy(SecurityUtils.getUsername());
+                    contactsItemsMapper.updateContactsItems(item);
+                }
+            }
+        }
         return AjaxResult.success();
     }
 

+ 166 - 13
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TWarehouseServiceImpl.java

@@ -4,13 +4,14 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.ruoyi.approvalFlow.domain.AuditItems;
+import com.ruoyi.approvalFlow.service.impl.AuditItemsAbout;
+import com.ruoyi.approvalFlow.service.impl.AuditItemsServiceImpl;
+import com.ruoyi.basicData.domain.TContactsItems;
 import com.ruoyi.basicData.domain.TCorps;
 import com.ruoyi.basicData.domain.TCustomerContact;
 import com.ruoyi.basicData.domain.TWarehouseArea;
-import com.ruoyi.basicData.mapper.TCorpsMapper;
-import com.ruoyi.basicData.mapper.TCustomerContactMapper;
-import com.ruoyi.basicData.mapper.TWarehouseAreaMapper;
-import com.ruoyi.basicData.mapper.TWarehouseMapper;
+import com.ruoyi.basicData.mapper.*;
 import com.ruoyi.basicData.service.ITWarehouseService;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -25,14 +26,18 @@ import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.SysConfig;
+import com.ruoyi.system.mapper.SysConfigMapper;
 import com.ruoyi.system.mapper.TWarehouseUserMapper;
 import com.ruoyi.system.service.ISysDictDataService;
 import com.ruoyi.warehouseBusiness.domain.TAnnex;
+import com.ruoyi.warehouseBusiness.domain.TEnclosure;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
 import com.ruoyi.warehouseBusiness.domain.dto.WarehouseSubmitDTO;
 import com.ruoyi.warehouseBusiness.domain.enums.AnnexActEnum;
 import com.ruoyi.warehouseBusiness.domain.vo.WarehouseInfoVO;
 import com.ruoyi.warehouseBusiness.mapper.TAnnexMapper;
+import com.ruoyi.warehouseBusiness.mapper.TEnclosureMapper;
 import com.ruoyi.warehouseBusiness.mapper.TWarehouseBillsMapper;
 import com.ruoyi.warehouseBusiness.request.InventoryQueryRequest;
 import com.ruoyi.warehouseBusiness.response.InventoryQueryResponse;
@@ -85,6 +90,18 @@ public class TWarehouseServiceImpl implements ITWarehouseService {
     @Autowired
     private TWarehouseUserMapper tWarehouseUserMapper;
 
+    @Autowired
+    private TContactsItemsMapper contactsItemsMapper;
+
+    @Autowired
+    private TEnclosureMapper tEnclosureMapper;
+
+    @Autowired
+    private SysConfigMapper sysConfigMapper;
+
+    @Autowired
+    private AuditItemsServiceImpl auditItemsService;
+
 
     /**
      * 查询仓库
@@ -103,6 +120,15 @@ public class TWarehouseServiceImpl implements ITWarehouseService {
             annex.setfActid(AnnexActEnum.WAREHOUSE.getType());
             List<TAnnex> annexList = annexMapper.selectTAnnexList(annex);
             warehouseInfoVO.setAnnexList(annexList);
+            TContactsItems tContactsItems = new TContactsItems();
+            tContactsItems.setPid(tWarehouse.getfId());
+            tContactsItems.setType("CK");
+            List<TContactsItems> contactsItemsList = contactsItemsMapper.selectContactsItemsList(tContactsItems);
+            warehouseInfoVO.setCtnpriceItemsList(contactsItemsList);
+            TEnclosure tEnclosure = new TEnclosure();
+            tEnclosure.setfPid(tWarehouse.getfId());
+            List<TEnclosure> tEnclosureList = tEnclosureMapper.selectTEnclosureList(tEnclosure);
+            warehouseInfoVO.setEnclosureList(tEnclosureList);
         }
         return warehouseInfoVO;
     }
@@ -162,21 +188,21 @@ public class TWarehouseServiceImpl implements ITWarehouseService {
         for (TWarehouse tWarehouse1 : list) {
             WarehouseInfoVO warehouseInfoVO = new WarehouseInfoVO();
             BeanUtils.copyProperties(tWarehouse1, warehouseInfoVO);
-            if (!fPropertiesList.isEmpty() && ObjectUtils.isNotNull(tWarehouse1.getfProperties())){
-                List<SysDictData> fProperties = fPropertiesList.stream().filter(e-> tWarehouse1.getfProperties().contains(e.getDictValue())).collect(Collectors.toList());
-                if (!fProperties.isEmpty()){
+            if (!fPropertiesList.isEmpty() && ObjectUtils.isNotNull(tWarehouse1.getfProperties())) {
+                List<SysDictData> fProperties = fPropertiesList.stream().filter(e -> tWarehouse1.getfProperties().contains(e.getDictValue())).collect(Collectors.toList());
+                if (!fProperties.isEmpty()) {
                     warehouseInfoVO.setfProperties(fProperties.stream().map(SysDictData::getDictLabel).collect(Collectors.joining(",")));
                 }
             }
-            if (!fTypeList.isEmpty() && ObjectUtils.isNotNull(tWarehouse1.getfType())){
-                List<SysDictData> fType = fTypeList.stream().filter(e-> tWarehouse1.getfType().contains(e.getDictValue())).collect(Collectors.toList());
-                if (!fType.isEmpty()){
+            if (!fTypeList.isEmpty() && ObjectUtils.isNotNull(tWarehouse1.getfType())) {
+                List<SysDictData> fType = fTypeList.stream().filter(e -> tWarehouse1.getfType().contains(e.getDictValue())).collect(Collectors.toList());
+                if (!fType.isEmpty()) {
                     warehouseInfoVO.setfType(fType.stream().map(SysDictData::getDictLabel).collect(Collectors.joining(",")));
                 }
             }
-            if (!fGoodsTypeList.isEmpty() && ObjectUtils.isNotNull(tWarehouse1.getfGoodsType())){
-                List<SysDictData> fGoodsType = fGoodsTypeList.stream().filter(e-> tWarehouse1.getfGoodsType().contains(e.getDictValue())).collect(Collectors.toList());
-                if (!fGoodsType.isEmpty()){
+            if (!fGoodsTypeList.isEmpty() && ObjectUtils.isNotNull(tWarehouse1.getfGoodsType())) {
+                List<SysDictData> fGoodsType = fGoodsTypeList.stream().filter(e -> tWarehouse1.getfGoodsType().contains(e.getDictValue())).collect(Collectors.toList());
+                if (!fGoodsType.isEmpty()) {
                     warehouseInfoVO.setfGoodsType(fGoodsType.stream().map(SysDictData::getDictLabel).collect(Collectors.joining(",")));
                 }
             }
@@ -488,6 +514,36 @@ public class TWarehouseServiceImpl implements ITWarehouseService {
                 annexMapper.insertTAnnex(li);
             });
         }
+        if (CollectionUtils.isNotEmpty(tWarehouse.getCtnpriceItemsList())) {
+            for (TContactsItems item : tWarehouse.getCtnpriceItemsList()) {
+                item.setPid(tWarehouse.getfId());
+                item.setType("CK");
+                if (item.getId() == null) {
+                    item.setCreateTime(new Date());
+                    item.setCreateBy(username);
+                    contactsItemsMapper.insertContactsItems(item);
+                } else {
+                    item.setUpdateTime(new Date());
+                    item.setUpdateBy(username);
+                    contactsItemsMapper.updateContactsItems(item);
+                }
+            }
+
+        }
+        if (CollectionUtils.isNotEmpty(tWarehouse.getEnclosureList())) {
+            for (TEnclosure item : tWarehouse.getEnclosureList()) {
+                item.setfPid(tWarehouse.getfId());
+                if (item.getfId() == null) {
+                    item.setCreateTime(new Date());
+                    item.setCreateBy(username);
+                    tEnclosureMapper.insertTEnclosure(item);
+                } else {
+                    item.setUpdateTime(new Date());
+                    item.setUpdateBy(username);
+                    tEnclosureMapper.updateTEnclosure(item);
+                }
+            }
+        }
         return AjaxResult.success();
     }
 
@@ -523,6 +579,35 @@ public class TWarehouseServiceImpl implements ITWarehouseService {
                 annexMapper.insertTAnnex(li);
             });
         }
+        if (CollectionUtils.isNotEmpty(tWarehouse.getCtnpriceItemsList())) {
+            for (TContactsItems item : tWarehouse.getCtnpriceItemsList()) {
+                item.setPid(tWarehouse.getfId());
+                item.setType("CK");
+                if (item.getId() == null) {
+                    item.setCreateTime(new Date());
+                    item.setCreateBy(username);
+                    contactsItemsMapper.insertContactsItems(item);
+                } else {
+                    item.setUpdateTime(new Date());
+                    item.setUpdateBy(username);
+                    contactsItemsMapper.updateContactsItems(item);
+                }
+            }
+        }
+        if (CollectionUtils.isNotEmpty(tWarehouse.getEnclosureList())) {
+            for (TEnclosure item : tWarehouse.getEnclosureList()) {
+                item.setfPid(tWarehouse.getfId());
+                if (item.getfId() == null) {
+                    item.setCreateTime(new Date());
+                    item.setCreateBy(username);
+                    tEnclosureMapper.insertTEnclosure(item);
+                } else {
+                    item.setUpdateTime(new Date());
+                    item.setUpdateBy(username);
+                    tEnclosureMapper.updateTEnclosure(item);
+                }
+            }
+        }
         return AjaxResult.success();
     }
 
@@ -839,6 +924,74 @@ public class TWarehouseServiceImpl implements ITWarehouseService {
     }
 
     @Override
+    public AjaxResult tWarehouseAgreementSubmit(TWarehouse tWarehouse, LoginUser loginUser) {
+        // 这里加个判断取系统参数来确定是否需要启用审批流
+        boolean isApprove = false;
+        long actId = 1100L;
+        String key = "warehouse.approval";
+        SysConfig sysConfig = sysConfigMapper.checkConfigKeyUnique(key);
+        if (StringUtils.isNull(sysConfig)) {
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return AjaxResult.error("系统参数异常,未找到开启审批流参数");
+        }
+        if ("1".equals(sysConfig.getConfigValue())) {
+            isApprove = true;
+        }
+        if (isApprove) {
+            AuditItems auditItems = new AuditItems();
+            auditItems.setLevelId(0L);
+            auditItems.setBillId(tWarehouse.getfId());
+            auditItems.setActId(actId);
+            auditItems.setFidStatus("approval_status");
+            auditItems.setTimes(1L);
+            auditItems.setIffinalItem("F");
+            auditItems.setBillNo(tWarehouse.getfCname());
+            auditItems.setRefno1(tWarehouse.getfCname());
+            auditItems.setRefno2("CKSP");
+            auditItems.setSendUserId(loginUser.getUser().getUserId());
+            auditItems.setSendName(loginUser.getUsername());
+            auditItems.setSendTime(new Date());
+            auditItems.setAuditUserId(loginUser.getUser().getUserId());
+            auditItems.setAuditItem(new Date());
+            auditItems.setAuditOpTime(new Date());
+            auditItems.setAuditMsg("提交");
+            auditItems.setAuditStatus("O");
+            List<String> fsrcBillno = new ArrayList<>();
+            if (StringUtils.isNotNull(tWarehouse.getfCname())) {
+                fsrcBillno.add(tWarehouse.getfCname());
+            }
+            auditItems.setfSrcBillnos(fsrcBillno);// 装载业务编号
+            TWarehouse warehouseSubmitDTO = new TWarehouse();
+            warehouseSubmitDTO.setfId(tWarehouse.getfId());
+            warehouseSubmitDTO.setApprovalStatus("审核提交");
+            tWarehouseMapper.updateTWarehouse(warehouseSubmitDTO);
+            AjaxResult approvalFlow = auditItemsService.createApprovalFlow(auditItems);
+            Long code = Long.valueOf(String.valueOf(approvalFlow.get("code"))).longValue();
+            if (code.equals(500L)) {
+                throw new RuntimeException("请核失败");
+            }
+            return approvalFlow;
+        } else {
+            TWarehouse warehouseSubmitDTO = new TWarehouse();
+            warehouseSubmitDTO.setfId(tWarehouse.getfId());
+            warehouseSubmitDTO.setApprovalStatus("审核通过");
+            tWarehouseMapper.updateTWarehouse(warehouseSubmitDTO);
+            return AjaxResult.success();
+        }
+    }
+
+    @Override
+    public AjaxResult revoke(TWarehouse tWarehouse, LoginUser loginUser) {
+        // 根据业务 id (仓储费 id) 删除对应审批流数据
+        AuditItemsAbout.deleteAuditItemsData(tWarehouse.getfId());
+        TWarehouse warehouseSubmitDTO = new TWarehouse();
+        warehouseSubmitDTO.setfId(tWarehouse.getfId());
+        warehouseSubmitDTO.setApprovalStatus("录入");
+        tWarehouseMapper.updateTWarehouse(warehouseSubmitDTO);
+        return AjaxResult.success();
+    }
+
+    @Override
     public String checkUFNoUnique(TWarehouse tWarehouse) {
         TWarehouse tWarehouse1 = tWarehouseMapper.checkFNoUnique(tWarehouse.getfNo());
         if (StringUtils.isNotNull(tWarehouse1) && !tWarehouse1.getfId().equals(tWarehouse.getfId())) {

+ 79 - 4
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TWarehouseWebcamServiceImpl.java

@@ -3,25 +3,30 @@ package com.ruoyi.basicData.service.impl;
 import cn.hutool.http.HttpRequest;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.ruoyi.basicData.domain.TWarehouseWebcam;
 import com.ruoyi.basicData.mapper.TWarehouseWebcamMapper;
 import com.ruoyi.basicData.service.ITWarehouseWebcamService;
+import com.ruoyi.common.constant.LiveBroadcast;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.exception.BaseException;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.JsonUtil;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.SysConfig;
 import com.ruoyi.system.mapper.SysConfigMapper;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.io.IOException;
+import java.util.*;
 
 /**
  * 仓库摄像头Service业务层处理
@@ -192,6 +197,76 @@ public class TWarehouseWebcamServiceImpl implements ITWarehouseWebcamService {
         return data;
     }
 
+    @Override
+    public AjaxResult getWebcamUrl(String deviceSerial, String projectId) {
+        String body = "client_id=" + LiveBroadcast.APP_KEY + "&client_secret=" + LiveBroadcast.SECRET_KEY + "";
+        OkHttpClient okHttpClient = new OkHttpClient();
+        Request request = new Request.Builder()
+                .addHeader("User-Agent", "Apipost client Runtime/+https://www.apipost.cn/")
+                .addHeader("Content-Type", "application/x-www-form-urlencoded")
+                .url(LiveBroadcast.GET_ACCESS_TOKEN)
+                .method("post", RequestBody.create(okhttp3.MediaType.parse("application/x-www-form-urlencoded"), body))
+                .post(RequestBody.create(okhttp3.MediaType.parse("application/x-www-form-urlencoded"), body))
+                .build();
+
+        String videoWeb = "";
+        try {
+            String tokenR = Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
+            JSONObject result = JSON.parseObject(tokenR);
+            if (ObjectUtils.isNotNull(result.get("access_token").toString())) {
+                Map<String, Object> rsp = new HashMap<>();
+                rsp.put("productCode", "1640070936703286");
+                Request request1 = new Request.Builder()
+                        .addHeader("access_token", result.get("access_token").toString())
+                        .url(LiveBroadcast.TOKEN_JWT)
+                        .method("post", RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), JsonUtil.toJson(rsp)))
+                        .post(RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), JsonUtil.toJson(rsp)))
+                        .build();
+
+                System.out.println("请求数据=   " + JsonUtil.toJson(rsp));
+                try {
+                    String authorization = Objects.requireNonNull(okHttpClient.newCall(request1).execute().body()).string();
+                    JSONObject authorizationR = JSON.parseObject(authorization);
+                    if ("200".equals(authorizationR.get("code"))) {
+                        String json = authorizationR.get("data").toString();
+                        JSONObject authorizationData = JSON.parseObject(json);
+                        Map<String, Object> rsp1 = new HashMap<>();
+                        rsp1.put("deviceSerial", deviceSerial);
+                        rsp1.put("projectId", projectId);
+                        rsp1.put("channelNo", 1);
+                        rsp1.put("videoLevel", "");
+                        rsp1.put("recordType", "");
+                        Request request2 = new Request.Builder()
+                                .addHeader("access_token", result.get("access_token").toString())
+                                .addHeader("Authorization", authorizationData.get("Authorization").toString())
+                                .url(LiveBroadcast.VIDEO_WEB)
+                                .method("post", RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), JsonUtil.toJson(rsp1)))
+                                .post(RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), JsonUtil.toJson(rsp1)))
+                                .build();
+                        System.out.println("请求数据=   " + JsonUtil.toJson(rsp1));
+                        try {
+                            videoWeb = Objects.requireNonNull(okHttpClient.newCall(request2).execute().body()).string();
+                        } catch (IOException e) {
+                            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                        }
+                    }
+                } catch (IOException e) {
+                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                }
+            }
+        } catch (IOException e) {
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+        }
+        JSONObject result = JSON.parseObject(videoWeb);
+        String url = "";
+        if ("200".equals(result.get("code"))) {
+            String json = result.get("data").toString();
+            JSONObject urlJson = JSON.parseObject(json);
+            url = urlJson.get("previewUrl").toString();
+        }
+        return AjaxResult.success(url);
+    }
+
     private String getConfigValue(String key) {
         SysConfig sysConfig = sysConfigMapper.checkConfigKeyUnique(key);
         if (StringUtils.isNull(sysConfig)) {

+ 28 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/domain/TWareHouseItemsExcel.java

@@ -100,6 +100,18 @@ public class TWareHouseItemsExcel {
     private BigDecimal fNetweight;
 
     /**
+     * 溢短装(kg)
+     */
+    @Excel(name = "溢短装(kg)")
+    private BigDecimal fActualWeight;
+
+    /**
+     * 溢短重
+     */
+    @Excel(name = "溢短装(件数)")
+    private BigDecimal fActualNumber;
+
+    /**
      * 司机
      */
     @Excel(name = "司机")
@@ -117,6 +129,22 @@ public class TWareHouseItemsExcel {
     @Excel(name = "司机身份证")
     private String fDriverIdCar;
 
+    public BigDecimal getfActualWeight() {
+        return fActualWeight;
+    }
+
+    public void setfActualWeight(BigDecimal fActualWeight) {
+        this.fActualWeight = fActualWeight;
+    }
+
+    public BigDecimal getfActualNumber() {
+        return fActualNumber;
+    }
+
+    public void setfActualNumber(BigDecimal fActualNumber) {
+        this.fActualNumber = fActualNumber;
+    }
+
     public String getfSealno() {
         return fSealno;
     }

+ 55 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TEnclosure.java

@@ -5,6 +5,8 @@ import com.ruoyi.common.core.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
+import java.util.Date;
+
 /**
  * 附件对象 t_enclosure
  *
@@ -72,6 +74,59 @@ public class TEnclosure extends BaseEntity {
      */
     private String delFlag;
 
+    /**
+     * 合同名称/协议名称
+     */
+    private String cname;
+
+    /**
+     * 协议属性
+     */
+    private String protocolAttributes;
+
+    /**
+     * 有效期起
+     */
+    private Date effectiveDateStare;
+
+    /**
+     * 有效期止
+     */
+    private Date effectiveDateEnd;
+
+
+    public String getCname() {
+        return cname;
+    }
+
+    public void setCname(String cname) {
+        this.cname = cname;
+    }
+
+    public String getProtocolAttributes() {
+        return protocolAttributes;
+    }
+
+    public void setProtocolAttributes(String protocolAttributes) {
+        this.protocolAttributes = protocolAttributes;
+    }
+
+    public Date getEffectiveDateStare() {
+        return effectiveDateStare;
+    }
+
+    public void setEffectiveDateStare(Date effectiveDateStare) {
+        this.effectiveDateStare = effectiveDateStare;
+    }
+
+    public Date getEffectiveDateEnd() {
+        return effectiveDateEnd;
+    }
+
+    public void setEffectiveDateEnd(Date effectiveDateEnd) {
+        this.effectiveDateEnd = effectiveDateEnd;
+    }
+
     public void setfId(Long fId) {
         this.fId = fId;
     }

+ 28 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehouseBills.java

@@ -657,6 +657,34 @@ public class TWarehouseBills extends BaseEntity {
     @Excel
     private String financialBillType;
 
+    /**
+     * 溢短装(kg)
+     */
+    @Excel(name = "溢短装(kg)")
+    private BigDecimal fActualWeight = BigDecimal.ZERO;
+
+    /**
+     * 溢短重
+     */
+    @Excel(name = "溢短装(件数)")
+    private BigDecimal fActualNumber = BigDecimal.ZERO;
+
+    public BigDecimal getfActualWeight() {
+        return fActualWeight;
+    }
+
+    public void setfActualWeight(BigDecimal fActualWeight) {
+        this.fActualWeight = fActualWeight;
+    }
+
+    public BigDecimal getfActualNumber() {
+        return fActualNumber;
+    }
+
+    public void setfActualNumber(BigDecimal fActualNumber) {
+        this.fActualNumber = fActualNumber;
+    }
+
     @Override
     public String getRemark() {
         return remark;

+ 142 - 40
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitems.java

@@ -29,11 +29,15 @@ public class TWarehousebillsitems extends BaseEntity {
     @Excel(name = "PID,对应主表id")
     private Long fPid;
 
-    /** 来源id */
+    /**
+     * 来源id
+     */
     @Excel(name = "来源id")
     private Long fSrcid;
 
-    /** 来源日期 */
+    /**
+     * 来源日期
+     */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "来源日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date fSrcBsdate;
@@ -74,7 +78,9 @@ public class TWarehousebillsitems extends BaseEntity {
     @Excel(name = "入库库区,存储库区ID,显示仓库 库位 库区,t_warehouse_area中的f_id")
     private Long fWarehouselocid;
 
-    /** 调拨库区 */
+    /**
+     * 调拨库区
+     */
     @Excel(name = "调拨库区")
     private Long fTransferWarehouselocid;
 
@@ -223,12 +229,6 @@ public class TWarehousebillsitems extends BaseEntity {
     private String fMarks;
 
     /**
-     * 溢短重
-     */
-    @Excel(name = "溢短重")
-    private BigDecimal  fActualWeight = BigDecimal.ZERO;
-
-    /**
      * 库存天数(出库日期-仓储费计费日期)
      */
     @Excel(name = "库存天数(出库日期-仓储费计费日期)")
@@ -240,7 +240,9 @@ public class TWarehousebillsitems extends BaseEntity {
     @Excel(name = "金额")
     private BigDecimal fAmt;
 
-    /** 仓储费截至日期 */
+    /**
+     * 仓储费截至日期
+     */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "仓储费截至日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date fStorageFeeDeadline;
@@ -300,54 +302,80 @@ public class TWarehousebillsitems extends BaseEntity {
     @Excel(name = "仓储费计费截至日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date fBillingDeadline;
 
-    /** 业务类型(存汉字的,用来选择 产地 规格 品牌) */
+    /**
+     * 业务类型(存汉字的,用来选择 产地 规格 品牌)
+     */
     @Excel(name = "业务类型(存汉字的,用来选择 产地 规格 品牌)")
     private Long fBusinessType;
 
-    /** 是否入库0入总帐;1不计入总账(用于入库时候选择场地直装) */
+    /**
+     * 是否入库0入总帐;1不计入总账(用于入库时候选择场地直装)
+     */
     @Excel(name = "是否入库")
     private Long fIsInventory;
 
-    /** 仓库/库区/库位 */
+    /**
+     * 仓库/库区/库位
+     */
     @Excel(name = "仓库/库区/库位")
     private String fWarehouseInformation;
 
-    /** 原始仓库/库区/库位 */
+    /**
+     * 原始仓库/库区/库位
+     */
     @Excel(name = "仓库/库区/库位")
     private String fOrgwarehouseInformation;
 
-    /** 劳务公司 */
+    /**
+     * 劳务公司
+     */
     @Excel(name = "劳务公司")
     private Long fLabour;
 
-    /** 车队 */
+    /**
+     * 车队
+     */
     @Excel(name = "车队")
     private Long fFleet;
 
-    /** 装卸工 */
+    /**
+     * 装卸工
+     */
     @Excel(name = "装卸工")
     private String fStevedore;
 
-    /** 装卸方式LNTYPE(人工 机械) */
+    /**
+     * 装卸方式LNTYPE(人工 机械)
+     */
     @Excel(name = "装卸方式LNTYPE(人工 机械)")
     private Long fLntype;
 
-    /** 叉车工 */
+    /**
+     * 叉车工
+     */
     @Excel(name = "叉车工")
     private String fForkliftman;
 
-    /** 库内箱号 */
+    /**
+     * 库内箱号
+     */
     @Excel(name = "库内箱号")
     private String fLocalcntrno;
 
-    /** 封号 */
+    /**
+     * 封号
+     */
     @Excel(name = "封号")
     private String fSealno;
 
-    /** 明细审批状态 */
+    /**
+     * 明细审批状态
+     */
     @Excel(name = "明细审批状态")
     private Long fItemstatus;
-    /** 现箱号 */
+    /**
+     * 现箱号
+     */
     @Excel(name = "现箱号")
     private String fNowCarton;
 
@@ -355,7 +383,9 @@ public class TWarehousebillsitems extends BaseEntity {
      * 备注
      */
     private String remark;
-    /** 车辆类型 */
+    /**
+     * 车辆类型
+     */
     @Excel(name = "车辆类型")
     private Long fCartypeId;
     private String timeStartBsdate;
@@ -369,7 +399,9 @@ public class TWarehousebillsitems extends BaseEntity {
     //修改日期
     private Date bsdate;
 
-    /** 是否计算仓储费(应对出库单是否计算过仓储费) */
+    /**
+     * 是否计算仓储费(应对出库单是否计算过仓储费)
+     */
     @Excel(name = "是否计算仓储费(应对出库单是否计算过仓储费)")
     private String isCalculateStorageFees;
 
@@ -390,6 +422,89 @@ public class TWarehousebillsitems extends BaseEntity {
      */
     private String type;
 
+    private String cargoBelong;
+
+    private String warehouseNo;
+
+    private String shelvesNo;
+    /**
+     * 场地直装,D:入库明细 C 出库明细
+     */
+    private String fDc;
+
+    /**
+     * 溢短装(kg)
+     */
+    @Excel(name = "溢短装(kg)")
+    private BigDecimal fActualWeight = BigDecimal.ZERO;
+
+    /**
+     * 溢短重
+     */
+    @Excel(name = "溢短装(件数)")
+    private BigDecimal fActualNumber = BigDecimal.ZERO;
+
+    /**
+     * 溢短装(kg)比例
+     */
+    @Excel(name = "溢短装(kg)比例")
+    private BigDecimal fActualWeightProportion = BigDecimal.ZERO;
+
+    /**
+     * 溢短装(件数)比例
+     */
+    @Excel(name = "溢短装(件数)比例")
+    private BigDecimal fActualNumberProportion = BigDecimal.ZERO;
+
+    /**
+     * 保管凭证号
+     */
+    private String takeVoucher;
+    /**
+     * 仓单编号
+     */
+    private String wrNumber;
+
+    public String getTakeVoucher() {
+        return takeVoucher;
+    }
+
+    public void setTakeVoucher(String takeVoucher) {
+        this.takeVoucher = takeVoucher;
+    }
+
+    public String getWrNumber() {
+        return wrNumber;
+    }
+
+    public void setWrNumber(String wrNumber) {
+        this.wrNumber = wrNumber;
+    }
+
+    public BigDecimal getfActualNumber() {
+        return fActualNumber;
+    }
+
+    public void setfActualNumber(BigDecimal fActualNumber) {
+        this.fActualNumber = fActualNumber;
+    }
+
+    public BigDecimal getfActualWeightProportion() {
+        return fActualWeightProportion;
+    }
+
+    public void setfActualWeightProportion(BigDecimal fActualWeightProportion) {
+        this.fActualWeightProportion = fActualWeightProportion;
+    }
+
+    public BigDecimal getfActualNumberProportion() {
+        return fActualNumberProportion;
+    }
+
+    public void setfActualNumberProportion(BigDecimal fActualNumberProportion) {
+        this.fActualNumberProportion = fActualNumberProportion;
+    }
+
     public String getChecklists() {
         return checklists;
     }
@@ -406,12 +521,6 @@ public class TWarehousebillsitems extends BaseEntity {
         this.cargoName = cargoName;
     }
 
-    private String cargoBelong;
-
-    private String warehouseNo;
-
-    private String shelvesNo;
-
     public String getType() {
         return type;
     }
@@ -428,13 +537,11 @@ public class TWarehousebillsitems extends BaseEntity {
         this.fElabel = fElabel;
     }
 
-    public void setfSrcBsdate(Date fSrcBsdate)
-    {
+    public void setfSrcBsdate(Date fSrcBsdate) {
         this.fSrcBsdate = fSrcBsdate;
     }
 
-    public Date getfSrcBsdate()
-    {
+    public Date getfSrcBsdate() {
         return fSrcBsdate;
     }
 
@@ -462,11 +569,6 @@ public class TWarehousebillsitems extends BaseEntity {
         this.bsdate = bsdate;
     }
 
-    /**
-     * 场地直装,D:入库明细 C 出库明细
-     */
-    private String fDc;
-
     public BigDecimal getfActualWeight() {
         return fActualWeight;
     }

+ 6 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/dto/WarehouseSubmitDTO.java

@@ -1,7 +1,9 @@
 package com.ruoyi.warehouseBusiness.domain.dto;
 
+import com.ruoyi.basicData.domain.TContactsItems;
 import com.ruoyi.common.core.domain.entity.TWarehouse;
 import com.ruoyi.warehouseBusiness.domain.TAnnex;
+import com.ruoyi.warehouseBusiness.domain.TEnclosure;
 import lombok.Data;
 
 import java.util.ArrayList;
@@ -19,4 +21,8 @@ public class WarehouseSubmitDTO extends TWarehouse {
     // 附件信息
     private List<TAnnex> annexList = new ArrayList<>();
 
+    private List<TContactsItems> ctnpriceItemsList;
+
+    private List<TEnclosure> enclosureList;
+
 }

+ 6 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/vo/WarehouseInfoVO.java

@@ -1,7 +1,9 @@
 package com.ruoyi.warehouseBusiness.domain.vo;
 
+import com.ruoyi.basicData.domain.TContactsItems;
 import com.ruoyi.common.core.domain.entity.TWarehouse;
 import com.ruoyi.warehouseBusiness.domain.TAnnex;
+import com.ruoyi.warehouseBusiness.domain.TEnclosure;
 import lombok.Data;
 
 import java.util.ArrayList;
@@ -19,4 +21,8 @@ public class WarehouseInfoVO extends TWarehouse {
     // 附件信息
     private List<TAnnex> annexList = new ArrayList<>();
 
+    private List<TContactsItems> ctnpriceItemsList;
+
+    private List<TEnclosure> enclosureList;
+
 }

+ 24 - 4
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseAgreementServiceImpl.java

@@ -31,10 +31,7 @@ import com.ruoyi.warehouseBusiness.domain.dto.StorageFeeRangeDTO;
 import com.ruoyi.warehouseBusiness.domain.enums.AnnexActEnum;
 import com.ruoyi.warehouseBusiness.domain.enums.WarehouseTypeEnum;
 import com.ruoyi.warehouseBusiness.domain.vo.StorageFeeCalculationResultVO;
-import com.ruoyi.warehouseBusiness.mapper.BillnoDelMapper;
-import com.ruoyi.warehouseBusiness.mapper.TAnnexMapper;
-import com.ruoyi.warehouseBusiness.mapper.TWarehouseAgreementMapper;
-import com.ruoyi.warehouseBusiness.mapper.TWarehouseAgreementitemsMapper;
+import com.ruoyi.warehouseBusiness.mapper.*;
 import com.ruoyi.warehouseBusiness.service.ITWarehouseAgreementService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -83,6 +80,9 @@ public class TWarehouseAgreementServiceImpl implements ITWarehouseAgreementServi
     @Autowired
     private AuditItemsServiceImpl auditItemsService;
 
+    @Autowired
+    private TEnclosureMapper tEnclosureMapper;
+
 
     /**
      * 查询仓储费
@@ -335,6 +335,26 @@ public class TWarehouseAgreementServiceImpl implements ITWarehouseAgreementServi
             tWarehouseAgreementitemsMapper.deleteByFPid(fPid);
             annexMapper.deleteByPid(fPid, type);
         }
+        SysConfig sysConfigStatus = sysConfigMapper.checkConfigKeyUnique("agreement");
+        if (sysConfigStatus != null && "1".equals(sysConfigStatus.getConfigValue())){
+            TEnclosure tEnclosure = new TEnclosure();
+            tEnclosure.setfPid(tWarehouseAgreement.getfCorpid());
+            tEnclosure.setfType("合同");
+            List<TEnclosure> tEnclosureList = tEnclosureMapper.selectTEnclosureList(tEnclosure);
+            if (tEnclosureList.isEmpty()){
+                throw new RuntimeException("客户缺少合同信息,请补充后再请核");
+            }
+            String[] arr = tWarehouseAgreement.getfWarehouseid().split(",");
+            for (String item :arr){
+                TEnclosure tEnclosure1 = new TEnclosure();
+                tEnclosure1.setfPid(Long.parseLong(item));
+                tEnclosure1.setfType("协议");
+                List<TEnclosure> tEnclosureList1 = tEnclosureMapper.selectTEnclosureList(tEnclosure1);
+                if (tEnclosureList1.isEmpty()){
+                    throw new RuntimeException("仓库缺少协议信息,请补充后再请核");
+                }
+            }
+        }
         // 处理业务编号
         List<String> fsrcBillno = new ArrayList<>();
         if (StringUtils.isNotNull(tWarehouseAgreement.getfBillno())) {

+ 68 - 19
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -95,6 +95,7 @@ import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
 import java.security.KeyFactory;
 import java.security.PrivateKey;
+import java.security.Signature;
 import java.security.spec.PKCS8EncodedKeySpec;
 import java.text.DateFormat;
 import java.text.ParseException;
@@ -913,6 +914,10 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                     }
                 }
                 mixDate = minDate;
+                warehouseBills.setfActualNumber(warehousebillsitemsList.stream().map(TWarehousebillsitems::getfActualNumber)
+                        .filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+                warehouseBills.setfActualWeight(warehousebillsitemsList.stream().map(TWarehousebillsitems::getfActualWeight)
+                        .filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
             }
             for (TWarehousebillsitems wbItem : warehousebillsitemsList) {
                 boolean warehouseStatus = "SJRK".equals(billsType) || "SJCK".equals(billsType) || WarehouseTypeEnum.CKDB.getType().equals(billsType) ||
@@ -951,12 +956,12 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                     wbItem.setfMblno(warehouseBills.getfMblno());// 入库更新库存前执行update更新明细的提单号等于主表的提单号
                 }
                 if (WarehouseTypeEnum.CKDB.getType().equals(billsType) || WarehouseTypeEnum.HWTG.getType().equals(billsType)) {
-                    if (ObjectUtils.isNotNull(wbItem.getfTransferWarehouselocid())){
+                    if (ObjectUtils.isNotNull(wbItem.getfTransferWarehouselocid())) {
                         TWarehouse tWarehouse1 = tWarehouseMapper.selectTWarehouseById(wbItem.getfTransferWarehouselocid());
                         wbItem.setfWarehouseInformation(tWarehouse.getfName() + "/" + tWarehouse1.getfName());
                     }
                 } else {
-                    if (ObjectUtils.isNotNull(wbItem.getfWarehouselocid())){
+                    if (ObjectUtils.isNotNull(wbItem.getfWarehouselocid())) {
                         TWarehouse tWarehouse1 = tWarehouseMapper.selectTWarehouseById(wbItem.getfWarehouselocid());
                         wbItem.setfWarehouseInformation(tWarehouse.getfName() + "/" + tWarehouse1.getfName());
                     }
@@ -3861,10 +3866,10 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             TWarehouseBills tWarehouseBills = tWarehouseBillsMapper.selectTWarehousebillsById(fPid);
             map.put("warehouseBills", tWarehouseBills);
             // 查询附件
-            if (tWarehouseBills != null){
+            if (tWarehouseBills != null) {
                 List<TEnclosure> tEnclosures = tEnclosureMapper.selectTEnclosureListByPId(tWarehouseBills.getfId());
                 tEnclosures.addAll(tEnclosureMapper.selectTEnclosureListBySrcId(fId));
-            }else{
+            } else {
                 map.put("enclosure", new ArrayList<>());
             }
 
@@ -4740,12 +4745,20 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         if (Objects.equals(tWarehouseBills.getfTrademodeid(), tWarehouseBills.getfNewTrademodeid())) {
             throw new WarehouseException("贸易方式不得与原贸易方式一致");
         }
-        Long fCharg = 0L;
+        Long fChargC = 0L;
+        Long fChargR = 0L;
         if (ObjectUtils.isNotNull(tWarehouseBills.getfInwarehouseid())) {
             //todo
             TWarehouse tWarehouse = tWarehouseMapper.selectTWarehouseById(tWarehouseBills.getfInwarehouseid());
             if (ObjectUtils.isNotNull(tWarehouse)) {
-                fCharg = tWarehouse.getfCharg();
+                fChargC = tWarehouse.getfCharg();
+            }
+        }
+        if (ObjectUtils.isNotNull(tWarehouseBills.getfWarehouseid())) {
+            //todo
+            TWarehouse tWarehouse = tWarehouseMapper.selectTWarehouseById(tWarehouseBills.getfWarehouseid());
+            if (ObjectUtils.isNotNull(tWarehouse)) {
+                fChargR = tWarehouse.getfCharg();
             }
         }
 
@@ -4832,10 +4845,6 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             } else if (WarehouseTypeEnum.CKDB.getType().equals(billsType) || WarehouseTypeEnum.HWTG.getType().equals(billsType)) { // 调拨查询
                 //校验计费日期是等于库存总帐计费日,如果不相等则报错
                 checkWhgenleg(wbItem, tWhgenle);
-                if (fCharg != 0) {
-                    wbItem.setfChargedate(wbItem.getfBsdate());
-                    wbItem.setfSrcBsdate(wbItem.getfOriginalbilldate());
-                }
                 if (!Objects.equals(wbItem.getfWarehouselocid(), wbItem.getfTransferWarehouselocid())) {
                     //  1、  库存 <  调拨件数  提示库存不足
                     judgeItemQty(tWhgenle, wbItem, i);
@@ -4843,11 +4852,24 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                     updateTWhgenlegData(wbItem, tWhgenle.getfId(), WarehouseTypeEnum.SJCK.getType());
                     // 3、 进行入库操作 查询是否存在库存
                     TWhgenleg tWhgenle1 = queryWhgenlegService.secondStockWhgenleg(tWarehouseBills, wbItem, goods.getIfCntrno(), WarehouseTypeEnum.NOT_JUDGE_BOX.getType());
+                    Long tWhgenlegId = null;
                     if (StringUtils.isNull(tWhgenle1)) {   // 5、 不存在 进行新增库存
-                        instalTWhgenleg(tWarehouseBills, wbItem);
+                        tWhgenlegId = instalTWhgenleg(tWarehouseBills, wbItem);
                     } else { // 4、 存在 进行跟新库存
+                        tWhgenlegId = tWhgenle1.getfId();
                         updateTWhgenlegData(wbItem, tWhgenle1.getfId(), WarehouseTypeEnum.SJRK.getType());
                     }
+                    if (ObjectUtils.isNotNull(tWhgenlegId)) {
+                        TWhgenleg tWhgenleg = new TWhgenleg();
+                        tWhgenleg.setfId(tWhgenlegId);
+                        if (fChargC != 0 && fChargR == 0) {//出计费,入不计费
+                            tWhgenleg.setfChargedate(wbItem.getfBsdate());
+                            tWhgenlegMapper.updateTWhgenleg(tWhgenleg);
+                        } else if (fChargC == 0 && fChargR != 0) {//出不计费,入计费
+                            tWhgenleg.setfChargedate(wbItem.getfBsdate());
+                            tWhgenlegMapper.updateTWhgenleg(tWhgenleg);
+                        }
+                    }
                 }
                 wbItem.setfBillstatus(40L);
             } else if (WarehouseTypeEnum.HQZY.getType().equals(billsType)) { // 货转
@@ -5312,6 +5334,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         List<SysDictData> taxRate = sysDictDataMapper.selectDictDataByType("tax_rate");
 
         List<String> fMblnoMsgList = new ArrayList<>();
+        SimpleDateFormat formatYYYY = new SimpleDateFormat("YYYY/MM/dd");
         for (CalculateStorageFeesInfoVO item : feesInfoVOList) {
             // 交以计算明细计费方式必填
             if (StringUtils.isNull(item.getFBillingway())) {
@@ -5327,7 +5350,11 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 goodsTypeids = "\"" + goodsTypeids + "\"";
             }
             storageFeesDto.setfGoodsid(goodsTypeids);
-
+            String fChargedate = formatYYYY.format(item.getFChargedate());
+            String fSrcBsdate = formatYYYY.format(item.getFSrcBsdate());
+            String fOriginalbilldate = formatYYYY.format(item.getFOriginalbilldate());
+            String fBsdate = formatYYYY.format(item.getFBsdate());
+            String fBillingDeadline = formatYYYY.format(warehouseBills.getfBillingDeadline());
             long fId = item.getFId();
             // 累计计费天数 如果计费日期与原始入库日期一直代表没有计算过
             if (Objects.equals(item.getFChargedate().getTime(), item.getFSrcBsdate().getTime())) {
@@ -5356,10 +5383,17 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             } else {
                 // 库存总帐在库天数:计费截止日期-原始入库日期
                 // 库存总帐计费天数:计费截止日期-计费日期
-                fInventoryDays = DateUtils.getDateDay(warehouseBills.getfBillingDeadline(), item.getFOriginalbilldate());
-                fBillingDays = DateUtils.getDateDay(warehouseBills.getfBillingDeadline(), item.getFChargedate());
-                storageFeesDto.setStartTime(item.getFChargedate());
-                storageFeesDto.setEndTime(warehouseBills.getfBillingDeadline());
+                if (item.getFOriginalbilldate().compareTo(warehouseBills.getfBillingDeadline()) < 0) {
+                    fInventoryDays = DateUtils.getDateDay(item.getFBsdate(), item.getFOriginalbilldate());
+                    fBillingDays = DateUtils.getDateDay(item.getFOriginalbilldate(), item.getFChargedate());
+                    storageFeesDto.setStartTime(item.getFChargedate());
+                    storageFeesDto.setEndTime(item.getFOriginalbilldate());
+                } else {
+                    fInventoryDays = DateUtils.getDateDay(warehouseBills.getfBillingDeadline(), item.getFOriginalbilldate());
+                    fBillingDays = DateUtils.getDateDay(warehouseBills.getfBillingDeadline(), item.getFChargedate());
+                    storageFeesDto.setStartTime(item.getFChargedate());
+                    storageFeesDto.setEndTime(warehouseBills.getfBillingDeadline());
+                }
             }
             if (fBillingDays <= 0) {
                 continue;
@@ -7553,7 +7587,22 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         //tWarehousebillsCntrMapper.deleteTWarehousebillsCntrfPid(tWarehousebills.getfId());
         JSONArray warehouseJSON = JSONArray.parseArray(warehousebillsitems);
         List<TWarehousebillsitems> warehousebillsitemsList = JSONObject.parseArray(warehouseJSON.toJSONString(), TWarehousebillsitems.class);
-
+        Long fChargC = 0L;
+        Long fChargR = 0L;
+        if (ObjectUtils.isNotNull(tWarehousebills.getfInwarehouseid())) {
+            //todo
+            TWarehouse tWarehouse = tWarehouseMapper.selectTWarehouseById(tWarehousebills.getfInwarehouseid());
+            if (ObjectUtils.isNotNull(tWarehouse)) {
+                fChargC = tWarehouse.getfCharg();
+            }
+        }
+        if (ObjectUtils.isNotNull(tWarehousebills.getfWarehouseid())) {
+            //todo
+            TWarehouse tWarehouse = tWarehouseMapper.selectTWarehouseById(tWarehousebills.getfWarehouseid());
+            if (ObjectUtils.isNotNull(tWarehouse)) {
+                fChargR = tWarehouse.getfCharg();
+            }
+        }
         if (StringUtils.isNotEmpty(warehousebillsitemsList)) {
             int i = 1;
             for (TWarehousebillsitems wb : warehousebillsitemsList) {
@@ -7786,7 +7835,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 
 
     public static List<String> delRepeat(List<String> list) {
-        return list.stream().distinct().collect(Collectors.toList());
+        return list.stream().distinct().collect(toList());
     }
 
     /**
@@ -10923,7 +10972,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             PKCS8EncodedKeySpec priPKCS8 = new PKCS8EncodedKeySpec(Base64.getMimeDecoder().decode(privateKey));
             KeyFactory keyf = KeyFactory.getInstance("RSA");
             PrivateKey priKey = keyf.generatePrivate(priPKCS8);
-            java.security.Signature signature = java.security.Signature.getInstance(SIGN_ALGORITHMS);
+            Signature signature = Signature.getInstance(SIGN_ALGORITHMS);
             signature.initSign(priKey);
             signature.update(content.getBytes(encode));
             byte[] signed = signature.sign();

+ 90 - 0
ruoyi-warehouse/src/main/resources/mapper/basicData/TContactsItemsMapper.xml

@@ -0,0 +1,90 @@
+<?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.basicData.mapper.TContactsItemsMapper">
+
+    <resultMap id="BaseResultMap" type="com.ruoyi.basicData.domain.TContactsItems">
+            <id property="id" column="id" jdbcType="INTEGER"/>
+            <result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
+            <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
+            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+            <result property="remark" column="remark" jdbcType="VARCHAR"/>
+            <result property="contacts" column="contacts" jdbcType="VARCHAR"/>
+            <result property="tel" column="tel" jdbcType="VARCHAR"/>
+            <result property="sort" column="sort" jdbcType="INTEGER"/>
+            <result property="type" column="type" jdbcType="VARCHAR"/>
+            <result property="pid" column="pid" jdbcType="INTEGER"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,del_flag,create_by,
+        create_time,update_by,update_time,
+        remark,contacts,tel,
+        sort,type,pid
+    </sql>
+    <select id="selectContactsItemsList" resultType="com.ruoyi.basicData.domain.TContactsItems">
+        select * from t_contacts_items where del_flag = '0'
+        <if test="pid != null">
+            AND pid = #{pid}
+        </if>
+        <if test="type != null and type != ''">
+            AND type = #{type}
+        </if>
+    </select>
+    <insert id="insertContactsItems" parameterType="TContactsItems" useGeneratedKeys="true" keyProperty="id">
+        insert into t_contacts_items
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="pid != null">pid,</if>
+            <if test="type != null and type != ''">type,</if>
+            <if test="sort != null">sort,</if>
+            <if test="tel != null and tel != ''">tel,</if>
+            <if test="contacts != null and contacts != ''">contacts,</if>
+            <if test="delFlag != null">del_flag,</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="pid != null ">#{pid},</if>
+            <if test="type != null ">#{type},</if>
+            <if test="sort != null ">#{sort},</if>
+            <if test="tel != null and tel != ''">#{tel},</if>
+            <if test="contacts != null and contacts != ''">#{contacts},</if>
+            <if test="delFlag != null">#{delFlag},</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="updateContactsItems" parameterType="TContactsItems">
+        update t_contacts_items
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="pid != null ">pid = #{pid},</if>
+            <if test="type != null ">type = #{type},</if>
+            <if test="sort != null">sort = #{sort},</if>
+            <if test="tel != null and tel != ''">tel = #{tel},</if>
+            <if test="contacts != null and contacts != ''">contacts = #{contacts},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</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 id = #{id}
+    </update>
+
+    <delete id="deleteContactsItemsById" parameterType="Long">
+        delete
+        from t_contacts_items
+        where id = #{id}
+    </delete>
+</mapper>

+ 13 - 3
ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseMapper.xml

@@ -33,6 +33,8 @@
         <result property="fType" column="f_type"/>
         <result property="fGoodsType" column="f_goods_type"/>
         <result property="fCoverArea" column="f_cover_area"/>
+        <result property="landNature" column="land_nature"/>
+        <result property="approvalStatus" column="approval_status"/>
     </resultMap>
 
     <sql id="selectTWarehouseVo">
@@ -62,7 +64,9 @@
                f_properties,
                f_type,
                f_goods_type,
-               f_cover_area
+               f_cover_area,
+               land_nature,
+               approval_status
         from t_warehouse
     </sql>
 
@@ -81,6 +85,7 @@
             <if test="fTel != null  and fTel != ''">and f_tel = #{fTel}</if>
             <if test="fCharg != null ">and f_charg = #{fCharg}</if>
             <if test="fStatus != null  and fStatus != ''">and f_status = #{fStatus}</if>
+            <if test="landNature != null  and landNature != ''">and land_nature = #{landNature}</if>
             <if test="supervise != null and supervise != ''">and supervise = #{supervise}</if>
             <if test="fProperties != null and fProperties != ''">and f_properties like concat('%', #{fProperties},
                 '%')
@@ -101,7 +106,7 @@
         ware.f_id, ware.parent_id, ware.ancestors, ware.order_num, ware.f_no, ware.f_name, ware.f_cname,
         ware.f_totalgross, ware.f_location,
         ware.f_addr, ware.f_contacts, ware.f_tel, ware.f_charg, ware.f_is_bonded, ware.remark, ware.supervise,
-        ware.f_status,
+        ware.f_status,ware.land_nature,
         ware.f_properties, ware.f_type, ware.f_goods_type, ware.f_cover_area,
         (
         SELECT
@@ -140,7 +145,6 @@
             parent_id = 100
         </where>
     </select>
-
     <select id="appGetWarehouseList" resultType="map">
         SELECT
         f_id AS fId,
@@ -187,6 +191,8 @@
             <if test="fType != null">f_type,</if>
             <if test="fGoodsType != null">f_goods_type,</if>
             <if test="fCoverArea != null">f_cover_area,</if>
+            <if test="landNature != null">land_nature,</if>
+            <if test="approvalStatus != null">approval_status,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="parentId != null and parentId != 0">#{parentId},</if>
@@ -215,6 +221,8 @@
             <if test="fType != null">#{fType},</if>
             <if test="fGoodsType != null">#{fGoodsType},</if>
             <if test="fCoverArea != null">#{fCoverArea},</if>
+            <if test="landNature != null">#{landNature},</if>
+            <if test="approvalStatus != null">#{approvalStatus},</if>
         </trim>
     </insert>
 
@@ -247,6 +255,8 @@
             <if test="fType != null">f_type = #{fType},</if>
             <if test="fGoodsType != null">f_goods_type = #{fGoodsType},</if>
             <if test="fCoverArea != null">f_cover_area = #{fCoverArea},</if>
+            <if test="landNature != null">land_nature = #{landNature},</if>
+            <if test="approvalStatus != null">approval_status = #{approvalStatus},</if>
         </trim>
         where f_id = #{fId}
     </update>

+ 3 - 2
ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml

@@ -206,7 +206,8 @@
         where f_id = #{fId} and del_flag = '0'
     </select>
 
-    <insert id="insertTWhgenleg" parameterType="TWhgenleg">
+    <insert id="insertTWhgenleg" parameterType="TWhgenleg" useGeneratedKeys="true"
+            keyProperty="fId">
         insert into t_whgenleg
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="fAccyear != null">f_accyear,</if>
@@ -677,7 +678,7 @@
             wh.f_id,
             wh.f_originalbillno AS f_billno,
             wh.f_goodsid,
-            wh.f_originalbilldate AS f_bsdate,
+            wh.f_bsdate AS f_bsdate,
             wh.f_billingway,
             wh.f_mblno,
             wh.f_chargedate,

+ 18 - 1
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TEnclosureMapper.xml

@@ -20,10 +20,15 @@
         <result property="updateBy" column="update_by"/>
         <result property="updateTime" column="update_time"/>
         <result property="remark" column="remark"/>
+        <result property="cname" column="cname"/>
+        <result property="protocolAttributes" column="protocol_attributes"/>
+        <result property="effectiveDateStare" column="effective_date_stare"/>
+        <result property="effectiveDateEnd" column="effective_date_end"/>
     </resultMap>
 
     <sql id="selectTEnclosureVo">
-        select f_id, f_pid, src_id, f_lineno, f_name, f_desc, f_url, f_type, f_status, del_flag, create_by, create_time, update_by, update_time, remark from t_enclosure
+        select f_id, f_pid, src_id, f_lineno, f_name, f_desc, f_url, f_type, f_status, del_flag, create_by, create_time, update_by, update_time, remark,
+               cname,protocol_attributes,effective_date_stare,effective_date_end from t_enclosure
     </sql>
 
     <select id="selectTEnclosureList" parameterType="TEnclosure" resultMap="TEnclosureResult">
@@ -75,6 +80,10 @@
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
+            <if test="cname != null">cname,</if>
+            <if test="protocolAttributes != null">protocol_attributes,</if>
+            <if test="effectiveDateStare != null">effective_date_stare,</if>
+            <if test="effectiveDateEnd != null">effective_date_end,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fPid != null">#{fPid},</if>
@@ -91,6 +100,10 @@
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
+            <if test="cname != null">#{cname},</if>
+            <if test="protocolAttributes != null">#{protocolAttributes},</if>
+            <if test="effectiveDateStare != null">#{effectiveDateStare},</if>
+            <if test="effectiveDateEnd != null">#{effectiveDateEnd},</if>
         </trim>
     </insert>
 
@@ -111,6 +124,10 @@
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remark != null">remark = #{remark},</if>
+            <if test="cname != null">cname = #{cname},</if>
+            <if test="protocolAttributes != null">protocol_attributes = #{protocolAttributes},</if>
+            <if test="effectiveDateStare != null">effective_date_stare = #{effectiveDateStare},</if>
+            <if test="effectiveDateEnd != null">effective_date_end = #{effectiveDateEnd},</if>
         </trim>
         where f_id = #{fId}
     </update>

+ 20 - 3
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -160,6 +160,8 @@
         <result property="operationType" column="operation_type"   />
         <result property="receiptCode" column="receipt_code"   />
         <result property="whetherBonded" column="whether_bonded"   />
+        <result property="fActualWeight" column="f_actual_weight"   />
+        <result property="fActualNumber" column="f_actual_number"   />
     </resultMap>
 
     <resultMap type="WarehouseBillsVO" id="WarehousebillsVOResult">
@@ -188,7 +190,7 @@
         document_summary,financial_bill_type,checklists, business_code, serial_number, receipt_apply_code, operation_type,
                storage_name, storage_contract_code, storage_contract_start, storage_contract_end, storage_rate, storage_pay_time,
                insurance_code, insurance_amount, insurance_start_time, insurance_end_time, insurer, inventory, operator,
-               auditor, receipt_code,whether_bonded from t_warehousebills
+               auditor, receipt_code,whether_bonded,f_actual_weight,f_actual_number from t_warehousebills
     </sql>
 
     <select id="selectTWarehousebillsList" parameterType="TWarehousebills" resultMap="TWarehousebillsResult">
@@ -391,7 +393,9 @@
             bill.is_pledge AS isPledge,
             bill.document_summary AS documentSummary,
             bill.financial_bill_type AS financialBillType,
-            bill.checklists AS checklists
+            bill.checklists AS checklists,
+        bill.f_actual_weight AS fActualWeight,
+        bill.f_actual_number AS fActualNumber
         FROM
             t_warehousebills bill
             LEFT JOIN t_goods g ON g.f_id = bill.f_goodsid
@@ -945,6 +949,8 @@
         leg.f_shipper AS fShipper,
         it.f_bsdate AS fBsdate,
         leg.f_mblno AS fMblno,
+        leg.f_actual_weight AS fActualWeight,
+        leg.f_actual_number AS fActualNumber,
         it.f_business_type AS fBusinessType,
         dict.dict_label AS fBusinessTypes,
         it.f_marks AS fMarks ,
@@ -1016,6 +1022,8 @@
             leg.f_shipper AS fShipper,
             it.f_bsdate AS fBsdate,
             leg.f_mblno AS fMblno,
+        leg.f_actual_weight AS fActualWeight,
+        leg.f_actual_number AS fActualNumber,
             it.f_business_type AS fBusinessType,
             dict.dict_label AS fBusinessTypes,
             it.f_marks AS fMarks ,
@@ -1095,6 +1103,8 @@
         co.f_name AS fCorpid,
         leg.f_shipper AS fShipper,
         it.f_bsdate AS fBsdate,
+        leg.f_actual_weight AS fActualWeight,
+        leg.f_actual_number AS fActualNumber,
         leg.f_mblno AS fMblno,
         CASE
         leg.f_billtype
@@ -1315,6 +1325,8 @@
             <if test="documentSummary != null and documentSummary != ''">document_summary,</if>
             <if test="financialBillType != null and financialBillType != ''">financial_bill_type,</if>
             <if test="checklists != null and checklists != ''">checklists,</if>
+            <if test="fActualWeight != null">f_actual_weight,</if>
+            <if test="fActualNumber != null">f_actual_number,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="businessCode != null">#{businessCode},</if>
@@ -1453,6 +1465,8 @@
             <if test="documentSummary != null and documentSummary != ''">#{documentSummary},</if>
             <if test="financialBillType != null and financialBillType != ''">#{financialBillType},</if>
             <if test="checklists != null and checklists != ''">#{checklists},</if>
+            <if test="fActualWeight != null">#{fActualWeight},</if>
+            <if test="fActualNumber != null">#{fActualNumber},</if>
         </trim>
     </insert>
 
@@ -1592,6 +1606,8 @@
             <if test="documentSummary != null and documentSummary != ''">document_summary = #{documentSummary},</if>
             <if test="financialBillType != null and financialBillType != ''">financial_bill_type = #{financialBillType},</if>
             <if test="checklists != null and checklists != ''">checklists = #{checklists},</if>
+            <if test="fActualWeight != null">f_actual_weight = #{fActualWeight},</if>
+            <if test="fActualNumber != null">f_actual_number = #{fActualNumber},</if>
         </trim>
         where f_id = #{fId}
     </update>
@@ -3646,7 +3662,8 @@
     <select id="selecStorageFeeList" resultType="Map">
         SELECT DISTINCT w.f_id AS fId, w.f_billno AS fBillno, corp.f_name AS fCorpid, w.f_billing_deadline AS fBillingDeadline, w.remark,
                         w.f_billstatus AS fBillstatus, w.create_by AS createBy, w.create_time AS createTime, w.f_fee_status fFeeStatus,
-                        w.f_trademodeid AS fTrademodeid,dict.dict_label AS fTrademodeName ,w.checklists AS checklists
+                        w.f_trademodeid AS fTrademodeid,dict.dict_label AS fTrademodeName ,w.checklists AS checklists,
+                        w.f_actual_weight AS fActualWeight,w.f_actual_number AS fActualNumber
         FROM t_warehousebills w LEFT JOIN t_warehousebillsitems item ON item.f_pid = w.f_id  and item.del_flag = '0'
             LEFT JOIN t_corps corp ON corp.f_id = w.f_corpid
             left join sys_user u on w.create_by = u.user_name

+ 18 - 2
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

@@ -74,6 +74,9 @@
         <result property="fDc"    column="f_dc"    />
         <result property="fTocorpid"    column="f_tocorpid"    />
         <result property="isCalculateStorageFees"    column="is_calculate_storage_fees"    />
+        <result property="fActualNumber"    column="f_actual_number"    />
+        <result property="fActualWeightProportion"    column="f_actual_weight_proportion"    />
+        <result property="fActualNumberProportion"    column="f_actual_number_proportion"    />
     </resultMap>
 
     <resultMap type="WarehouseTimeIntervalVO" id="WarehouseTimeIntervalResult">
@@ -113,7 +116,8 @@
            del_flag, create_by, create_time, update_by, update_time, remark, f_inventory_days, f_storage_fee_deadline, f_amt, f_billing_days,
             f_driver_name, f_driver_tel, f_driver_id_car, f_serial_number, f_is_pass, f_billtype, f_billing_qty, f_billing_deadline, f_business_type,
              f_is_inventory, f_warehouse_information, f_orgwarehouse_information, f_labour, f_fleet, f_stevedore, f_lntype, f_forkliftman,
-              f_localcntrno, f_sealno,f_now_carton,f_itemstatus,f_cartype_id,f_dc,is_calculate_storage_fees from t_warehousebillsitems
+              f_localcntrno, f_sealno,f_now_carton,f_itemstatus,f_cartype_id,f_dc,is_calculate_storage_fees,f_actual_number,
+            f_actual_weight_proportion,f_actual_number_proportion from t_warehousebillsitems
     </sql>
 
     <select id="selectTWarehousebillsitemsList" parameterType="TWarehousebillsitems"
@@ -248,7 +252,10 @@
             item.f_now_carton AS fNowCarton,
             item.f_cartype_id AS fCartypeId,
             item.f_dc AS fDc,
-            item.create_time AS createTime
+            item.create_time AS createTime,
+            item.f_actual_number AS fActualNumber,
+            item.f_actual_weight_proportion AS fActualWeightProportion,
+            item.f_actual_number_proportion AS fActualNumberProportion
         FROM
             t_warehousebills w
             LEFT JOIN t_warehousebillsitems item ON item.f_pid = w.f_id
@@ -339,6 +346,9 @@
             <if test="fCartypeId != null">f_cartype_id,</if>
             <if test="fDc != null">f_dc,</if>
             <if test="isCalculateStorageFees != null">is_calculate_storage_fees,</if>
+            <if test="fActualNumber != null">f_actual_number,</if>
+            <if test="fActualWeightProportion != null">f_actual_weight_proportion,</if>
+            <if test="fActualNumberProportion != null">f_actual_number_proportion,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fId != null">#{fId},</if>
@@ -409,6 +419,9 @@
             <if test="fCartypeId != null">#{fCartypeId},</if>
             <if test="fDc != null">#{fDc},</if>
             <if test="isCalculateStorageFees != null">#{isCalculateStorageFees},</if>
+            <if test="fActualNumber != null">#{fActualNumber},</if>
+            <if test="fActualWeightProportion != null">#{fActualWeightProportion},</if>
+            <if test="fActualNumberProportion != null">#{fActualNumberProportion},</if>
         </trim>
     </insert>
 
@@ -482,6 +495,9 @@
             <if test="fCartypeId != null">f_cartype_id = #{fCartypeId},</if>
             <if test="fDc != null">f_dc = #{fDc},</if>
             <if test="isCalculateStorageFees != null">is_calculate_storage_fees = #{isCalculateStorageFees},</if>
+            <if test="fActualNumber != null">f_actual_number = #{fActualNumber},</if>
+            <if test="fActualWeightProportion != null">f_actual_weight_proportion = #{fActualWeightProportion},</if>
+            <if test="fActualNumberProportion != null">f_actual_number_proportion = #{fActualNumberProportion},</if>
         </trim>
         where f_id = #{fId}
     </update>