Prechádzať zdrojové kódy

解决仓储费不开启审批流更新异常问题

caifc 3 rokov pred
rodič
commit
c0a5cd4ccd

+ 3 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseStockTransferController.java

@@ -44,11 +44,11 @@ public class TWarehouseStockTransferController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo list(TWarehouseBills tWarehouseBills) {
         startPage();
-        /*if(tWarehouseBills.getType().equals("1")){
+        if(tWarehouseBills.getType().equals("1")){
             tWarehouseBills.setfBilltype("CKDB");
         }else{
-        }*/
-        tWarehouseBills.setfBilltype("HWTG");
+            tWarehouseBills.setfBilltype("HWTG");
+        }
         List<Map<String, Object>> list = itWarehouseBillsService.selectWarehouseBusinessList(tWarehouseBills);
         return getDataTable(list);
     }

+ 125 - 121
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/service/impl/TWhgenlegServiceImpl.java

@@ -3,7 +3,6 @@ package com.ruoyi.reportManagement.service.impl;
 
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.ruoyi.basicData.domain.TCustomerContact;
-import com.ruoyi.basicData.mapper.TCorpsMapper;
 import com.ruoyi.basicData.mapper.TCustomerContactMapper;
 import com.ruoyi.basicData.mapper.TWarehouseMapper;
 import com.ruoyi.common.core.domain.entity.TWarehouse;
@@ -18,7 +17,6 @@ import com.ruoyi.reportManagement.excel.Whgenleg;
 import com.ruoyi.reportManagement.mapper.TWhgenlegMapper;
 import com.ruoyi.reportManagement.service.ITWhgenlegService;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
-import com.ruoyi.warehouseBusiness.excel.ListMapToBeanUtils;
 import com.ruoyi.warehouseBusiness.mapper.TWarehouseBillsMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -42,7 +40,7 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
     private TWarehouseBillsMapper tWarehouseBillsMapper;
 
     @Autowired
-    private TWarehouseMapper  tWarehouseMapper;
+    private TWarehouseMapper tWarehouseMapper;
     @Autowired
     private TCustomerContactMapper customerContactMapper;
 
@@ -80,16 +78,16 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
      * 出库、调拨、货转查询库存总账列表
      *
      * @param tWhgenleg 库存总账
-     *      * @return 库存总账集合
+     *                  * @return 库存总账集合
      */
     @Override
     public List<Map<String, Object>> selectInventoryList(TWhgenleg tWhgenleg) {
-        if(StringUtils.isNotNull(tWhgenleg.getfWarehouseLocationid())){
+        if (StringUtils.isNotNull(tWhgenleg.getfWarehouseLocationid())) {
             // 获取仓库信息
-            TWarehouse tWarehouse =  tWarehouseMapper.selectTWarehouseById(tWhgenleg.getfWarehouseLocationid());
-            if(tWarehouse.getfLocation()==1){
+            TWarehouse tWarehouse = tWarehouseMapper.selectTWarehouseById(tWhgenleg.getfWarehouseLocationid());
+            if (tWarehouse.getfLocation() == 1) {
                 tWhgenleg.setfLocation(1L);
-            }else {
+            } else {
                 tWhgenleg.setfLocation(0L);
             }
         }
@@ -104,12 +102,12 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
      */
     @Override
     public List<Map<String, Object>> selectInventoryMapList(TWhgenleg tWhgenleg) {
-        if(StringUtils.isNotNull(tWhgenleg.getfWarehouseLocationid())){
+        if (StringUtils.isNotNull(tWhgenleg.getfWarehouseLocationid())) {
             // 获取仓库信息
-            TWarehouse tWarehouse =  tWarehouseMapper.selectTWarehouseById(tWhgenleg.getfWarehouseLocationid());
-            if(tWarehouse.getfLocation()==1){
+            TWarehouse tWarehouse = tWarehouseMapper.selectTWarehouseById(tWhgenleg.getfWarehouseLocationid());
+            if (tWarehouse.getfLocation() == 1) {
                 tWhgenleg.setfLocation(1L);
-            }else {
+            } else {
                 tWhgenleg.setfLocation(0L);
             }
         }
@@ -118,12 +116,12 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
 
     @Override
     public List<Map<String, Object>> selectWhgenlegList(TWhgenleg tWhgenleg) {
-        if(StringUtils.isNotNull(tWhgenleg.getfWarehouseLocationid())){
+        if (StringUtils.isNotNull(tWhgenleg.getfWarehouseLocationid())) {
             // 获取仓库信息
-            TWarehouse tWarehouse =  tWarehouseMapper.selectTWarehouseById(tWhgenleg.getfWarehouseLocationid());
-            if(tWarehouse.getfLocation()==1){
+            TWarehouse tWarehouse = tWarehouseMapper.selectTWarehouseById(tWhgenleg.getfWarehouseLocationid());
+            if (tWarehouse.getfLocation() == 1) {
                 tWhgenleg.setfLocation(1L);
-            }else {
+            } else {
                 tWhgenleg.setfLocation(0L);
             }
         }
@@ -182,61 +180,61 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
         Map<String, Object> map = new HashMap<>();
         // 查询仓库
         List<Map<String, Object>> whouseList;
-        if(null!= fId &&  fId!=0){
-            whouseList= tWhgenlegMapper.selectWareHouseListWhouse(fId);
-        }else {
-            whouseList= tWhgenlegMapper.selectWareHouseList();
+        if (null != fId && fId != 0) {
+            whouseList = tWhgenlegMapper.selectWareHouseListWhouse(fId);
+        } else {
+            whouseList = tWhgenlegMapper.selectWareHouseList();
         }
-        if(null!=whouseList && whouseList.size()>0){
+        if (null != whouseList && whouseList.size() > 0) {
             String fid = null; //获取 第一个 仓库ID
-            for(Map<String, Object> m : whouseList){
+            for (Map<String, Object> m : whouseList) {
                 String fGrossweightblc = null;
-                for (String k : m.keySet()){
-                    if(k.equals("fWarehouseid")){
-                        fid= m.get(k).toString();
+                for (String k : m.keySet()) {
+                    if (k.equals("fWarehouseid")) {
+                        fid = m.get(k).toString();
                     }
-                    if(k.equals("fGrossweightD")){
-                        fGrossweightblc=  m.get(k).toString();
+                    if (k.equals("fGrossweightD")) {
+                        fGrossweightblc = m.get(k).toString();
                     }
                 }
-                m.put("fGrossweightD",calculation2(fGrossweightblc,"1000"));
+                m.put("fGrossweightD", calculation2(fGrossweightblc, "1000"));
                 break;
             }
             //通过ID 查询仓库下 所有的 商品
-            List<Map<String, Object>> goodslistWhouse=tWhgenlegMapper.selectGoodsListWhouse(Long.parseLong(fid));
-            for (Map<String, Object> m : goodslistWhouse){
-                String  fTotalgross = null;
+            List<Map<String, Object>> goodslistWhouse = tWhgenlegMapper.selectGoodsListWhouse(Long.parseLong(fid));
+            for (Map<String, Object> m : goodslistWhouse) {
+                String fTotalgross = null;
                 String fGrossweightblc = null;
-                for (String k : m.keySet()){
+                for (String k : m.keySet()) {
                     // 获取毛重库容
-                    if(k.equals("fTotalgross")){
-                        fTotalgross= m.get(k).toString();
+                    if (k.equals("fTotalgross")) {
+                        fTotalgross = m.get(k).toString();
                     }
-                    if(k.equals("fGrossweightD")){
-                        fGrossweightblc=  m.get(k).toString();
+                    if (k.equals("fGrossweightD")) {
+                        fGrossweightblc = m.get(k).toString();
                     }
                 }
-                m.put("balance",calculation1(fTotalgross,fGrossweightblc));
-                m.put("fGrossweightD",calculation2(fGrossweightblc,"1000"));
+                m.put("balance", calculation1(fTotalgross, fGrossweightblc));
+                m.put("fGrossweightD", calculation2(fGrossweightblc, "1000"));
             }
             map.put("goodslistWhouse", goodslistWhouse);
             // 查询仓库下 所有的 客户
-            List<Map<String, Object>> corpsListWhouse=tWhgenlegMapper.selectCorpsListWhouse(Long.parseLong(fid));
+            List<Map<String, Object>> corpsListWhouse = tWhgenlegMapper.selectCorpsListWhouse(Long.parseLong(fid));
             // 计算库容 总剩余
-            for (Map<String, Object> m : corpsListWhouse){
-                String  fTotalgross = null;
+            for (Map<String, Object> m : corpsListWhouse) {
+                String fTotalgross = null;
                 String fGrossweightblc = null;
-                for (String k : m.keySet()){
+                for (String k : m.keySet()) {
                     // 获取毛重库容
-                    if(k.equals("fTotalgross")){
-                        fTotalgross= m.get(k).toString();
+                    if (k.equals("fTotalgross")) {
+                        fTotalgross = m.get(k).toString();
                     }
-                    if(k.equals("fGrossweightD")){
-                        fGrossweightblc=  m.get(k).toString();
+                    if (k.equals("fGrossweightD")) {
+                        fGrossweightblc = m.get(k).toString();
                     }
                 }
-                m.put("balance",calculation1(fTotalgross,fGrossweightblc));
-                m.put("fGrossweightD",calculation2(fGrossweightblc,"1000"));
+                m.put("balance", calculation1(fTotalgross, fGrossweightblc));
+                m.put("fGrossweightD", calculation2(fGrossweightblc, "1000"));
             }
             map.put("corpsListWhouse", corpsListWhouse);
         } else {
@@ -260,24 +258,24 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
     public List<Map<String, Object>> selectWareHouseList() {
         List<Map<String, Object>> list = new ArrayList<>();
         list = tWhgenlegMapper.selectWareHouseList();
-        if(list!=null && list.size()>0){
-            for (Map<String, Object> m : list){
-                String  fTotalgross = null;
+        if (list != null && list.size() > 0) {
+            for (Map<String, Object> m : list) {
+                String fTotalgross = null;
                 String fGrossweightblc = null;
-                for (String k : m.keySet()){
+                for (String k : m.keySet()) {
                     // 获取毛重库容
-                    if(k.equals("fTotalgross")){
-                        fTotalgross= m.get(k).toString();
+                    if (k.equals("fTotalgross")) {
+                        fTotalgross = m.get(k).toString();
                     }
-                    if(k.equals("fGrossweightD")){
-                        fGrossweightblc=  m.get(k).toString();
+                    if (k.equals("fGrossweightD")) {
+                        fGrossweightblc = m.get(k).toString();
                     }
                 }
-                m.put("percentage",calculation(fGrossweightblc,fTotalgross));
-                m.put("fGrossweightD",calculation2(fGrossweightblc,"1000"));
+                m.put("percentage", calculation(fGrossweightblc, fTotalgross));
+                m.put("fGrossweightD", calculation2(fGrossweightblc, "1000"));
             }
         } else {
-            List<TWarehouse> tWarehouses= tWarehouseMapper.selectTWarehouseList(new TWarehouse());
+            List<TWarehouse> tWarehouses = tWarehouseMapper.selectTWarehouseList(new TWarehouse());
             for (TWarehouse tWarehouse : tWarehouses) {
                 Map<String, Object> maps = new HashMap<>();
                 maps.put("fName", tWarehouse.getfName());
@@ -294,7 +292,7 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
     @Override
     public List<Map<String, Object>> selectWareHouseLists() {
         List<Map<String, Object>> list = new ArrayList<>();
-        List<TWarehouse> tWarehouses= tWarehouseMapper.selectTWarehouseLists(new TWarehouse());
+        List<TWarehouse> tWarehouses = tWarehouseMapper.selectTWarehouseLists(new TWarehouse());
         for (TWarehouse tWarehouse : tWarehouses) {
             Map<String, Object> maps = new HashMap<>();
             maps.put("fName", tWarehouse.getfName());
@@ -311,37 +309,37 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
     public Map<String, Object> selectCorpsList(Long fId) {
         Map<String, Object> map = new HashMap<>();
         // 查询所有 客户
-        List<Map<String, Object>> corpsList=tWhgenlegMapper.selectCorpsList();
+        List<Map<String, Object>> corpsList = tWhgenlegMapper.selectCorpsList();
         map.put("corpsList", corpsList);
-        if(corpsList!=null){
+        if (corpsList != null) {
             Long fid = null;
-            for(Map<String, Object> m : corpsList){
-                for (String k : m.keySet()){
-                    if(k.equals("fCorpid")){
-                        fid= (Long) m.get(k);
+            for (Map<String, Object> m : corpsList) {
+                for (String k : m.keySet()) {
+                    if (k.equals("fCorpid")) {
+                        fid = (Long) m.get(k);
                     }
                     break;
                 }
             }
             List<Map<String, Object>> corpsListWhouse;
-            if(null!= fId ){
-                corpsListWhouse=tWhgenlegMapper.selectCorpsListWhouse(fId);
-            }else{
-                corpsListWhouse=tWhgenlegMapper.selectCorpsListWhouse(fid);
+            if (null != fId) {
+                corpsListWhouse = tWhgenlegMapper.selectCorpsListWhouse(fId);
+            } else {
+                corpsListWhouse = tWhgenlegMapper.selectCorpsListWhouse(fid);
             }
-            for (Map<String, Object> m : corpsListWhouse){
-                String  fTotalgross = null;
+            for (Map<String, Object> m : corpsListWhouse) {
+                String fTotalgross = null;
                 String fGrossweightblc = null;
-                for (String k : m.keySet()){
+                for (String k : m.keySet()) {
                     // 获取毛重库容
-                    if(k.equals("fTotalgross")){
-                        fTotalgross= m.get(k).toString();
+                    if (k.equals("fTotalgross")) {
+                        fTotalgross = m.get(k).toString();
                     }
-                    if(k.equals("fGrossweightD")){
-                        fGrossweightblc=  m.get(k).toString();
+                    if (k.equals("fGrossweightD")) {
+                        fGrossweightblc = m.get(k).toString();
                     }
                 }
-                m.put("percentage",calculation(fGrossweightblc,fTotalgross));
+                m.put("percentage", calculation(fGrossweightblc, fTotalgross));
             }
             map.put("corpsListWhouse", corpsListWhouse);
         }
@@ -353,41 +351,41 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
         // 当天往前推 一周
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd ");
         Calendar c = Calendar.getInstance();
-        c.add(Calendar.DATE, - 8);
+        c.add(Calendar.DATE, -8);
         String frontday = format.format(c.getTime());
         // 当前日期
-        String nowadays=DateUtils.getDate();
+        String nowadays = DateUtils.getDate();
         Map<String, Object> map = new HashMap<>();
         map.put("frontday", frontday);
         map.put("nowadays", nowadays);
 
-        List<Map<String, Object>>  list= tWhgenlegMapper.selectDateFQtyblcListList(map);
+        List<Map<String, Object>> list = tWhgenlegMapper.selectDateFQtyblcListList(map);
         // 对比 日期 为空入库赋值0
-        ArrayList<String> pastDaysList=dayList(8);
-        for(String day:pastDaysList){
-            if(!day.equals(nowadays)){
+        ArrayList<String> pastDaysList = dayList(8);
+        for (String day : pastDaysList) {
+            if (!day.equals(nowadays)) {
                 Map<String, Object> map1 = new HashMap<String, Object>();
-                map1.put("fOriginalbilldate",day);
-                map1.put("fQtyblc",0);
+                map1.put("fOriginalbilldate", day);
+                map1.put("fQtyblc", 0);
                 list.add(map1);
             }
         }
-        List<Map<String,Object>> countList = combineMap("fOriginalbilldate", list);
+        List<Map<String, Object>> countList = combineMap("fOriginalbilldate", list);
         return countList;
     }
 
     @Override
     public List<Whgenleg> whgenlegExport(TWhgenleg tWhgenleg) throws Exception {
-        if(StringUtils.isNotNull(tWhgenleg.getfWarehouseLocationid())){
+        if (StringUtils.isNotNull(tWhgenleg.getfWarehouseLocationid())) {
             // 获取仓库信息
-            TWarehouse tWarehouse =  tWarehouseMapper.selectTWarehouseById(tWhgenleg.getfWarehouseLocationid());
-            if(tWarehouse.getfLocation()==1){
+            TWarehouse tWarehouse = tWarehouseMapper.selectTWarehouseById(tWhgenleg.getfWarehouseLocationid());
+            if (tWarehouse.getfLocation() == 1) {
                 tWhgenleg.setfLocation(1L);
-            }else {
+            } else {
                 tWhgenleg.setfLocation(0L);
             }
         }
-        List<Whgenleg> list =  tWhgenlegMapper.selectWhgenlegMessage(tWhgenleg);
+        List<Whgenleg> list = tWhgenlegMapper.selectWhgenlegMessage(tWhgenleg);
         //List<Whgenleg> list1 = ListMapToBeanUtils.castMapToBean(list,Whgenleg.class);
         return list;
     }
@@ -400,9 +398,10 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
     }
 
     /**
-     *  查询单票分析信息
+     * 查询单票分析信息
+     *
      * @param singleAnalysisExcel 查询条件
-     * @return  结果
+     * @return 结果
      */
     @Override
     public List<SingleAnalysisExcel> selectSingleAnalysis(SingleAnalysisExcel singleAnalysisExcel) {
@@ -410,7 +409,8 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
     }
 
     /**
-     *  查询单票分析费用信息
+     * 查询单票分析费用信息
+     *
      * @param singleAnalysisExcel
      * @return
      */
@@ -426,38 +426,37 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
 
     @Override
     public List<Map<String, Object>> appWhGenLegList(TWhgenleg tWhgenleg) {
-        List<Map<String,Object>> list = new ArrayList<>();
+        List<Map<String, Object>> list = new ArrayList<>();
         TCustomerContact customerContact = new TCustomerContact();
         customerContact.setfTel(SecurityUtils.getLoginUser().getUser().getPhonenumber());
         List<TCustomerContact> tCustomerContacts = customerContactMapper.selectTCustomerContactList(customerContact);
-        if (CollectionUtils.isNotEmpty(tCustomerContacts)){
+        if (CollectionUtils.isNotEmpty(tCustomerContacts)) {
             tWhgenleg.setfCorpid(tCustomerContacts.get(0).getfPid());
-            if(StringUtils.isNotNull(tWhgenleg.getfWarehouseLocationid())){
+            if (StringUtils.isNotNull(tWhgenleg.getfWarehouseLocationid())) {
                 // 获取仓库信息
-                TWarehouse tWarehouse =  tWarehouseMapper.selectTWarehouseById(tWhgenleg.getfWarehouseLocationid());
-                if(tWarehouse.getfLocation()==1){
+                TWarehouse tWarehouse = tWarehouseMapper.selectTWarehouseById(tWhgenleg.getfWarehouseLocationid());
+                if (tWarehouse.getfLocation() == 1) {
                     tWhgenleg.setfLocation(1L);
-                }else {
+                } else {
                     tWhgenleg.setfLocation(0L);
                 }
             }
             list = tWhgenlegMapper.selectInventoryMapList(tWhgenleg);
         }
-        if (SecurityUtils.getUsername().equals("admin")){
+        if (SecurityUtils.getUsername().equals("admin")) {
             list = tWhgenlegMapper.selectInventoryMapList(tWhgenleg);
         }
         return list;
     }
 
     /**
-     *
      * @param fOriginalbilldate 根据该字段进行合并
-     * @param dataList 原始数据
+     * @param dataList          原始数据
      * @return
      */
-    public static List<Map<String, Object>> combineMap(String fOriginalbilldate, List<Map<String, Object>> dataList){
+    public static List<Map<String, Object>> combineMap(String fOriginalbilldate, List<Map<String, Object>> dataList) {
         //用于存放最后的结果
-        List<Map<String, Object>> countList = new ArrayList<Map<String,Object>>();
+        List<Map<String, Object>> countList = new ArrayList<Map<String, Object>>();
         for (int i = 0; i < dataList.size(); i++) {
             String oldCombineField = String.valueOf(dataList.get(i).get(fOriginalbilldate));
 
@@ -482,16 +481,18 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
 
     /**
      * 获取过去 任意天内的日期数组
-     * @param intervals      intervals天内
-     * @return              日期数组
+     *
+     * @param intervals intervals天内
+     * @return 日期数组
      */
-    public static ArrayList<String> dayList(int intervals ) {
+    public static ArrayList<String> dayList(int intervals) {
         ArrayList<String> pastDaysList = new ArrayList<>();
-        for (int i = 0; i <intervals; i++) {
+        for (int i = 0; i < intervals; i++) {
             pastDaysList.add(getPastDate(i));
         }
         return pastDaysList;
     }
+
     /**
      * 获取过去第几天的日期
      *
@@ -508,44 +509,47 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService {
     }
 
     /**
-     *    返回百分比
+     * 返回百分比
+     *
      * @param fTotalgross
      * @param fGrossweightblc
      * @return
      */
-    public static String  calculation(String  fTotalgross, String fGrossweightblc){
+    public static String calculation(String fTotalgross, String fGrossweightblc) {
         BigDecimal num1 = new BigDecimal(fTotalgross);
         BigDecimal num2 = new BigDecimal(fGrossweightblc);
-        BigDecimal result = num1.divide(num2,2,BigDecimal.ROUND_HALF_UP);
-        int i = new Double(result.doubleValue()*100).intValue();
-        String str = i +  "%";
+        BigDecimal result = num1.divide(num2, 2, BigDecimal.ROUND_HALF_UP);
+        int i = new Double(result.doubleValue() * 100).intValue();
+        String str = i + "%";
         return str;
     }
 
     /**
-     *   结余数/1000
+     * 结余数/1000
+     *
      * @param fTotalgross
      * @param fGrossweightblc
      * @return
      */
-    public static String  calculation2(String  fTotalgross, String fGrossweightblc){
+    public static String calculation2(String fTotalgross, String fGrossweightblc) {
         BigDecimal num1 = new BigDecimal(fTotalgross);
         BigDecimal num2 = new BigDecimal(fGrossweightblc);
-        BigDecimal result = num1.divide(num2,2,BigDecimal.ROUND_HALF_UP);
+        BigDecimal result = num1.divide(num2, 2, BigDecimal.ROUND_HALF_UP);
         return result.toString();
     }
 
     /**
-     *   库容-结余毛重
+     * 库容-结余毛重
+     *
      * @param fTotalgross
      * @param fGrossweightblc
      * @return
      */
-    public static BigDecimal  calculation1(String  fTotalgross, String fGrossweightblc){
+    public static BigDecimal calculation1(String fTotalgross, String fGrossweightblc) {
         BigDecimal num1 = new BigDecimal(fTotalgross);
         BigDecimal num2 = new BigDecimal(fGrossweightblc);
         BigDecimal result = num1.subtract(num2);
-        return result.setScale(2,BigDecimal.ROUND_HALF_UP);
+        return result.setScale(2, BigDecimal.ROUND_HALF_UP);
     }
 
 

+ 4 - 4
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/component/impl/QueryWhgenlegServiceImpl.java

@@ -142,7 +142,7 @@ public class QueryWhgenlegServiceImpl implements QueryWhgenlegService {
         // 贸易方式
         whgenleg.setfTrademodeid(warehouseBills.getfTrademodeid());
         // 业务日期
-        whgenleg.setfBsdate(DateUtils.dateConversionMin(item.getfOriginalbilldate()));
+        whgenleg.setfBsdate(DateUtils.dateConversionMin(item.getfSrcBsdate()));
         // 库区
         whgenleg.setfWarehouseLocationid(item.getfWarehouselocid());
     }
@@ -167,7 +167,7 @@ public class QueryWhgenlegServiceImpl implements QueryWhgenlegService {
         whgenleg.setfTrademodeid(warehouseBills.getfTrademodeid());
         // 业务日期
         if (frequency.equals(FIRST)) {
-            whgenleg.setfBsdate(DateUtils.dateConversionMin(item.getfOriginalbilldate()));
+            whgenleg.setfBsdate(DateUtils.dateConversionMin(item.getfSrcBsdate()));
         } else {
             whgenleg.setfBsdate(DateUtils.dateConversionMin(item.getfBsdate()));
         }
@@ -193,7 +193,7 @@ public class QueryWhgenlegServiceImpl implements QueryWhgenlegService {
         whgenleg.setfMblno(item.getfMblno());
         // 业务日期
         if (frequency.equals(FIRST)) {
-            whgenleg.setfBsdate(DateUtils.dateConversionMin(item.getfOriginalbilldate()));
+            whgenleg.setfBsdate(DateUtils.dateConversionMin(item.getfSrcBsdate()));
         } else {
             whgenleg.setfBsdate(DateUtils.dateConversionMin(item.getfBsdate()));
         }
@@ -227,7 +227,7 @@ public class QueryWhgenlegServiceImpl implements QueryWhgenlegService {
         whgenleg.setfMblno(item.getfMblno());
         // 业务日期
         if (frequency.equals(FIRST)) {
-            whgenleg.setfBsdate(DateUtils.dateConversionMin(item.getfOriginalbilldate()));
+            whgenleg.setfBsdate(DateUtils.dateConversionMin(item.getfSrcBsdate()));
         } else {
             whgenleg.setfBsdate(DateUtils.dateConversionMin(item.getfBsdate()));
         }

+ 10 - 7
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsitems.java

@@ -32,9 +32,10 @@ public class TWarehousebillsitems extends BaseEntity {
     @Excel(name = "来源id")
     private Long fSrcid;
 
-    /** 调入库存总帐id */
-    @Excel(name = "调入库存总帐id")
-    private Long fTransferInventoryid;
+    /** 来源日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "来源日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fSrcBsdate;
 
     /**
      * 行号,针对pid顺序排列,1,2,3,4,
@@ -354,12 +355,14 @@ public class TWarehousebillsitems extends BaseEntity {
     @TableField(exist = false)
     private Long fTocorpid;
 
-    public Long getfTransferInventoryid() {
-        return fTransferInventoryid;
+    public void setfSrcBsdate(Date fSrcBsdate)
+    {
+        this.fSrcBsdate = fSrcBsdate;
     }
 
-    public void setfTransferInventoryid(Long fTransferInventoryid) {
-        this.fTransferInventoryid = fTransferInventoryid;
+    public Date getfSrcBsdate()
+    {
+        return fSrcBsdate;
     }
 
     public Long getfTocorpid() {

+ 4 - 4
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/dto/CalculateStorageFeesDTO.java

@@ -37,16 +37,16 @@ public class CalculateStorageFeesDTO implements Serializable {
     private Date endTime;
 
     // 计费数量
-    private BigDecimal fQty;
+    private BigDecimal fQty = BigDecimal.ZERO;
 
     // 计费毛重
-    private BigDecimal fGrossweight;
+    private BigDecimal fGrossweight = BigDecimal.ZERO;
 
     // 计费净重
-    private BigDecimal fNetweight;
+    private BigDecimal fNetweight = BigDecimal.ZERO;
 
     // 计费其他
-    private BigDecimal fVolumn;
+    private BigDecimal fVolumn = BigDecimal.ZERO;
 
 
     public String getfMblno() {

+ 1 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/vo/CalculateStorageFeesInfoVO.java

@@ -75,7 +75,7 @@ public class CalculateStorageFeesInfoVO implements Serializable {
     private String fTypeid;
 
     //商品名
-    private String fGoodsids;
+    private String goodsName;
 
     //计费天数
     private Long fBillingDays;

+ 24 - 22
ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml

@@ -47,7 +47,6 @@
     </resultMap>
 
     <resultMap type="com.ruoyi.warehouseBusiness.domain.vo.CalculateStorageFeesInfoVO" id="StorageFeesInfoResult">
-        <result property="warehouse" column="f_warehouseid"/>
         <result property="fId" column="f_id"/>
         <result property="warehouse" column="f_warehouseid"/>
         <result property="fBillno" column="f_billno"/>
@@ -63,12 +62,14 @@
         <result property="fBillingDays" column="f_billing_days"/>
         <result property="fIsInventory" column="f_is_inventory"/>
         <result property="fQty" column="f_qty"/>
+        <result property="warehouseLocationid" column="f_warehouse_locationid"/>
         <result property="fOrgwarehouseInformation" column="f_orgwarehouse_information"/>
         <result property="fGrossweight" column="f_grossweight"/>
         <result property="fNetweight" column="f_netweight"/>
         <result property="fBilltype" column="f_billtype"/>
         <result property="fTypeid" column="f_typeid"/>
-        <result property="fGoodsids" column="f_name"/>
+        <result property="ifCntrno" column="f_cntrno"/>
+        <result property="goodsName" column="goods_name"/>
     </resultMap>
 
     <sql id="selectTWhgenlegVo">
@@ -582,26 +583,26 @@
 
     <select id="selectStorageFeeItemList1" resultType="java.util.Map" resultMap="StorageFeesInfoResult">
         SELECT
-            wh.f_id AS fId,
-            wh.f_originalbillno AS fBillno,
-            wh.f_goodsid AS fGoodsid,
-            wh.f_originalbilldate AS fBsdate,
-            wh.f_billingway AS fBillingway,
-            wh.f_mblno AS fMblno,
-            wh.f_chargedate AS fChargedate,
-            wh.f_originalbilldate AS fOriginalbilldate,
-            wh.f_marks AS fMarks,
-            wh.f_cntrno AS fCntrno,
-            wh.f_volumnblc AS fVolumn,
-            wh.f_qtyblc AS fQty,
-            wh.f_grossweightblc AS fGrossweight,
-            wh.f_netweightblc AS fNetweight,
-            wh.f_warehouseid AS warehouse,
-            wh.f_warehouse_locationid AS warehouseLocationid,
-            "KCZZ" AS fBilltype,
-            goods.if_cntrno AS ifCntrno,
-            goods.f_typeid AS fTypeid,
-            goods.f_name AS fGoodsids
+            wh.f_id,
+            wh.f_originalbillno AS f_billno,
+            wh.f_goodsid,
+            wh.f_bsdate,
+            wh.f_billingway,
+            wh.f_mblno,
+            wh.f_chargedate,
+            wh.f_originalbilldate,
+            wh.f_marks,
+            wh.f_cntrno,
+            wh.f_volumnblc AS f_volumn,
+            wh.f_qtyblc AS f_qty,
+            wh.f_grossweightblc AS f_grossweight,
+            wh.f_netweightblc AS f_netweight,
+            wh.f_warehouseid,
+            wh.f_warehouse_locationid,
+            "KCZZ" AS f_billtype,
+            goods.if_cntrno AS if_cntrno,
+            goods.f_typeid AS f_typeid,
+            goods.f_name AS goods_name
         FROM
             t_whgenleg wh
             LEFT JOIN t_goods goods ON goods.f_id = wh.f_goodsid
@@ -621,6 +622,7 @@
             DISTINCT
             leg.f_id AS fId,
             leg.f_corpid AS fCorpIds,
+            leg.f_bsdate AS fBsdate,
             corp.f_name AS fCorpid,
             ware.f_warehouse_information AS fWarehouseids,
             area.f_name AS fWarehouseLocationids,

+ 12 - 11
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

@@ -11,7 +11,7 @@
         <result property="fLineno" column="f_lineno"/>
         <result property="fBillno" column="f_billno"/>
         <result property="fGoodsid" column="f_goodsid"/>
-        <result property="fTransferInventoryid" column="f_transfer_inventoryid"/>
+        <result property="fSrcBsdate" column="f_src_bsdate"/>
         <result property="fMblno" column="f_mblno"/>
         <result property="fOriginalbillno" column="f_originalbillno"/>
         <result property="fTransferWarehouselocid" column="f_transfer_warehouselocid"/>
@@ -85,7 +85,7 @@
         <result property="fChargedate" column="f_chargedate"/>
         <result property="fOriginalbilldate" column="f_originalbilldate"/>
         <result property="fMblno" column="f_mblno"/>
-        <result property="fTransferInventoryid" column="f_transfer_inventoryid"/>
+        <result property="fSrcBsdate" column="f_src_bsdate"/>
         <result property="fVolumn" column="f_volumn"/>
         <result property="fMarks" column="f_marks"/>
         <result property="fBillingDays" column="f_billing_days"/>
@@ -96,11 +96,11 @@
         <result property="fNetweight" column="f_netweight"/>
         <result property="fBilltype" column="f_billtype"/>
         <result property="fTypeid" column="f_typeid"/>
-        <result property="fGoodsids" column="f_name"/>
+        <result property="goodsName" column="f_name"/>
     </resultMap>
 
     <sql id="selectTWarehousebillsitemsVo">
-        select f_id, f_pid, f_srcid, f_lineno, f_billno, f_goodsid, f_mblno, f_transfer_inventoryid, f_originalbillno, f_transfer_warehouselocid, f_warehouselocid,
+        select f_id, f_pid, f_srcid, f_lineno, f_billno, f_goodsid, f_mblno, f_src_bsdate, f_originalbillno, f_transfer_warehouselocid, f_warehouselocid,
          f_originalbilldate, f_bsdate, f_billingway, f_chargedate, f_boxno, f_goodsval, f_cntqty, f_packagespecs, f_cntrtype, f_planvolumn,
           f_planqty, f_plangrossweight, f_plannetweight, f_volumn, f_qty, f_grossweight, f_netweight, f_cntrno, f_truckno, f_marks, f_billstatus,
            del_flag, create_by, create_time, update_by, update_time, remark, f_inventory_days, f_storage_fee_deadline, f_amt, f_billing_days,
@@ -118,7 +118,7 @@
             <if test="fGoodsid != null ">and f_goodsid = #{fGoodsid}</if>
             <if test="fMblno != null  and fMblno != ''">and f_mblno = #{fMblno}</if>
             <if test="fBillno != null  and fBillno != ''">and f_billno = #{fBillno}</if>
-            <if test="fTransferInventoryid != null ">and f_transfer_inventoryid = #{fTransferInventoryid}</if>
+            <if test="fSrcBsdate != null ">and f_src_bsdate = #{fSrcBsdate}</if>
             <if test="fWarehouselocid != null ">and f_warehouselocid = #{fWarehouselocid}</if>
             <if test="fBsdate != null ">and f_bsdate = #{fBsdate}</if>
             <if test="fLabour != null ">and f_labour = #{fLabour}</if>
@@ -179,7 +179,7 @@
             ware.f_name AS fWarehouseids,
             item.f_is_pass AS fIsPass,
             item.f_originalbillno AS fOriginalbillno,
-            item.f_transfer_inventoryid AS fTransferInventoryid,
+            item.f_src_bsdate AS fSrcBsdate,
             item.f_mblno AS fMblno,
             item.f_bsdate AS fBsdate,
             item.f_boxno AS fBoxno,
@@ -225,7 +225,8 @@
             item.f_orgwarehouse_information AS fOrgwarehouseInformation,
             item.f_now_carton AS fNowCarton,
             item.f_cartype_id AS fCartypeId,
-            item.f_dc AS fDc
+            item.f_dc AS fDc,
+            item.create_time AS createTime
         FROM
             t_warehousebills w
             LEFT JOIN t_warehousebillsitems item ON item.f_pid = w.f_id
@@ -255,7 +256,7 @@
             <if test="fBillno != null">f_billno,</if>
             <if test="fGoodsid != null">f_goodsid,</if>
             <if test="fMblno != null">f_mblno,</if>
-            <if test="fTransferInventoryid != null">f_transfer_inventoryid,</if>
+            <if test="fSrcBsdate != null">f_src_bsdate,</if>
             <if test="fOriginalbillno != null">f_originalbillno,</if>
             <if test="fTransferWarehouselocid != null">f_transfer_warehouselocid,</if>
             <if test="fWarehouselocid != null">f_warehouselocid,</if>
@@ -323,7 +324,7 @@
             <if test="fBillno != null">#{fBillno},</if>
             <if test="fGoodsid != null">#{fGoodsid},</if>
             <if test="fMblno != null">#{fMblno},</if>
-            <if test="fTransferInventoryid != null">#{fTransferInventoryid},</if>
+            <if test="fSrcBsdate != null">#{fSrcBsdate},</if>
             <if test="fOriginalbillno != null">#{fOriginalbillno},</if>
             <if test="fTransferWarehouselocid != null">#{fTransferWarehouselocid},</if>
             <if test="fWarehouselocid != null">#{fWarehouselocid},</if>
@@ -394,7 +395,7 @@
             <if test="fBillno != null">f_billno = #{fBillno},</if>
             <if test="fGoodsid != null">f_goodsid = #{fGoodsid},</if>
             <if test="fMblno != null">f_mblno = #{fMblno},</if>
-            <if test="fTransferInventoryid != null">f_transfer_inventoryid = #{fTransferInventoryid},</if>
+            <if test="fSrcBsdate != null">f_src_bsdate = #{fSrcBsdate},</if>
             <if test="fOriginalbillno != null">f_originalbillno = #{fOriginalbillno},</if>
             <if test="fTransferWarehouselocid != null">f_transfer_warehouselocid = #{fTransferWarehouselocid},</if>
             <if test="fWarehouselocid != null">f_warehouselocid = #{fWarehouselocid},</if>
@@ -492,7 +493,7 @@
             item.f_billingway AS fBillingway,
             item.f_chargedate AS fChargedate,
             item.f_originalbilldate AS fOriginalbilldate,
-            item.f_transfer_inventoryid AS fTransferInventoryid,
+            item.f_src_bsdate AS fSrcBsdate,
             item.f_mblno AS fMblno,
             item.f_volumn AS fVolumn,
             item.f_marks AS fMarks,