From a8da7c463224b9a5bc4628197afe4d9f7d05361c Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期四, 15 六月 2023 19:30:40 +0800
Subject: [PATCH] 出入库调试

---
 igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5208.java |   26 
 igds-api-phone/src/main/java/com/ld/igds/phone35/util/Phone35Util.java                    |   37 +
 igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5207.java |   15 
 igds-api-phone/src/main/java/com/ld/igds/phone35/dto/Phone35InoutDto.java                 |    4 
 igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/HPhoneServiceImpl.java      | 1061 +++++++++++++++++++++++----------------------
 igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5401.java |   26 +
 igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5204.java |    5 
 igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5501.java |   48 ++
 igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5801.java |   23 +
 igds-api-phone/src/main/java/com/ld/igds/phone35/dto/Dto5501.java                         |   24 +
 igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5206.java |   13 
 igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5203.java |    5 
 igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml                                |   20 
 igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5802.java |   23 +
 igds-api-phone/src/main/java/com/ld/igds/phone35/mapper/Phone35Mapper.java                |   13 
 15 files changed, 791 insertions(+), 552 deletions(-)

diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/dto/Dto5501.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/dto/Dto5501.java
new file mode 100644
index 0000000..37b087a
--- /dev/null
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/dto/Dto5501.java
@@ -0,0 +1,24 @@
+package com.ld.igds.phone35.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @Author:YAN
+ */
+@Data
+public class Dto5501 {
+    private String depotId;
+    private String depotType;
+    private String depotName;
+    private Double ua;
+    private Double ub;
+    private Double uc;
+    private Double ia;
+    private Double ib;
+    private Double ic;
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+}
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/dto/Phone35InoutDto.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/dto/Phone35InoutDto.java
index 2867046..f727191 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone35/dto/Phone35InoutDto.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/dto/Phone35InoutDto.java
@@ -9,6 +9,7 @@
 
 /**
  * 鍏ュ簱寰呭�间粨銆佸嚭搴撳緟鍊间粨灏佽
+ *
  * @author chen
  */
 @Data
@@ -39,6 +40,9 @@
     private String progress;
     private String progressName;
 
+    private String storeKeeper;
+    private String storeKeeperName;
+
     private String fileName1;
     private String fileName2;
 
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/mapper/Phone35Mapper.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/mapper/Phone35Mapper.java
index c5b291d..a7393e5 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone35/mapper/Phone35Mapper.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/mapper/Phone35Mapper.java
@@ -1,9 +1,11 @@
 package com.ld.igds.phone35.mapper;
 
 
+import com.ld.igds.phone35.dto.Dto5501;
 import com.ld.igds.phone35.dto.DtoPhoneGas;
 import com.ld.igds.phone35.dto.DtoPhonePest;
 import org.apache.ibatis.annotations.Param;
+
 import java.util.List;
 
 /**
@@ -13,6 +15,7 @@
 
     /**
      * 鑾峰彇浠撳簱姘斾綋妫�娴嬩俊鎭�傞粯璁ゆ瘡涓粨搴撹幏鍙栨渶鏂扮殑涓�鏉�
+     *
      * @param companyId
      * @param deptId
      * @return
@@ -21,9 +24,19 @@
 
     /**
      * 鑾峰彇浠撳簱铏妫�娴嬩俊鎭�傞粯璁ゆ瘡涓粨搴撹幏鍙栨渶鏂扮殑涓�鏉�
+     *
      * @param companyId
      * @param deptId
      * @return
      */
     List<DtoPhonePest> getPestByDepot(@Param("companyId") String companyId, @Param("deptId") String deptId);
+
+    /**
+     * 鑾峰彇 鑳借�楃鐞�-瀹炴椂閰嶇數 淇℃伅
+     *
+     * @param companyId
+     * @param deptId
+     * @return
+     */
+    List<Dto5501> getRealEnergyByDept(@Param("companyId") String companyId, @Param("deptId") String deptId);
 }
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/HPhoneServiceImpl.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/HPhoneServiceImpl.java
index d24927e..3148d51 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/HPhoneServiceImpl.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/HPhoneServiceImpl.java
@@ -9,6 +9,7 @@
 import com.ld.igds.phone35.param.Phone35InoutCommonParam;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Component;
+
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -16,638 +17,660 @@
 
 /**
  * 鏂扮増鎵嬫満3.5锛屾暟鎹煡璇�
+ *
  * @author chen
  */
 @Component
 public class HPhoneServiceImpl extends HibernateDao {
 
-	/**
-	 * 鏌ヨ鐢ㄦ埛
-	 * @param username
-	 * @return
-	 */
-	public DefaultUser getUserByUsername(String username) {
-		String hql = " from " + DefaultUser.class.getName() + " where username =:username";
+    /**
+     * 鏌ヨ鐢ㄦ埛
+     *
+     * @param username
+     * @return
+     */
+    public DefaultUser getUserByUsername(String username) {
+        String hql = " from " + DefaultUser.class.getName() + " where username =:username";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("username", username);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("username", username);
 
-		List<DefaultUser> list = this.query(hql, args);
-		if(list == null || list.isEmpty()){
-			return null;
-		}
-		return list.get(0);
-	}
+        List<DefaultUser> list = this.query(hql, args);
+        if (list == null || list.isEmpty()) {
+            return null;
+        }
+        return list.get(0);
+    }
 
-	/**
-	 * 鑾峰彇搴撳尯鍒楄〃淇℃伅
-	 * @param companyId
-	 * @return
-	 */
-	public List<DefaultDept> listDept(String companyId) {
-		String hql = " from " + DefaultDept.class.getName() + " where companyId =:companyId and val =:val";
+    /**
+     * 鑾峰彇搴撳尯鍒楄〃淇℃伅
+     *
+     * @param companyId
+     * @return
+     */
+    public List<DefaultDept> listDept(String companyId) {
+        String hql = " from " + DefaultDept.class.getName() + " where companyId =:companyId and val =:val";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
-		//搴撳尯鍚敤
-		args.put("val", Constant.YN_Y);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
+        //搴撳尯鍚敤
+        args.put("val", Constant.YN_Y);
 
-		hql += " and parentId is not null";
-		hql += " order by id";
+        hql += " and parentId is not null";
+        hql += " order by id";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鑾峰彇浠撳簱鍒楄〃淇℃伅
-	 * @param companyId
-	 * @param deptId
-	 * @return
-	 */
-	public List<Depot> listDepot(String companyId, String deptId) {
-		String hql = " from " + Depot.class.getName() + " where companyId =:companyId";
+    /**
+     * 鑾峰彇浠撳簱鍒楄〃淇℃伅
+     *
+     * @param companyId
+     * @param deptId
+     * @return
+     */
+    public List<Depot> listDepot(String companyId, String deptId) {
+        String hql = " from " + Depot.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		if(StringUtils.isNotEmpty(deptId)){
-			hql += " and deptId =:deptId";
-			args.put("deptId", deptId);
-		}
-		hql += " order by id";
+        if (StringUtils.isNotEmpty(deptId)) {
+            hql += " and deptId =:deptId";
+            args.put("deptId", deptId);
+        }
+        hql += " order by id";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ鍑哄叆搴撲俊鎭紝鐢ㄤ簬鏌ヨ鍑哄叆搴撹褰曘�佸緟鍊间粨鍒楄〃绛�
-	 * @param param
-	 * @return
-	 */
-	public List<InoutRecord> listInoutRecord(Phone35InoutCommonParam param) {
-		String hql = " from " + InoutRecord.class.getName() + " where companyId =:companyId"
-				+ " and recordStatus <>:recordStatus1 and recordStatus <>:recordStatus2";
+    /**
+     * 鏌ヨ鍑哄叆搴撲俊鎭紝鐢ㄤ簬鏌ヨ鍑哄叆搴撹褰曘�佸緟鍊间粨鍒楄〃绛�
+     *
+     * @param param
+     * @return
+     */
+    public List<InoutRecord> listInoutRecord(Phone35InoutCommonParam param) {
+        String hql = " from " + InoutRecord.class.getName() + " where companyId =:companyId"
+                + " and recordStatus <>:recordStatus1 and recordStatus <>:recordStatus2";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", param.getCompanyId());
-		args.put("recordStatus1", InoutConstant.RECORD_STATUS_DEL);
-		args.put("recordStatus2", InoutConstant.RECORD_STATUS_ERROR);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", param.getCompanyId());
+        args.put("recordStatus1", InoutConstant.RECORD_STATUS_DEL);
+        args.put("recordStatus2", InoutConstant.RECORD_STATUS_ERROR);
 
-		if(StringUtils.isNotEmpty(param.getDeptId())){
-			hql += " and deptId =:deptId";
-			args.put("deptId", param.getDeptId());
-		}
-		if(StringUtils.isNotEmpty(param.getDeptId())){
-			hql += " and progress =:progress";
-			args.put("progress", param.getProgress());
-		}
-		if(StringUtils.isNotEmpty(param.getType())){
-			hql += " and type =:type";
-			args.put("type", param.getType());
-		}
-		if(null != param.getStartTime()){
-			hql += " and completeTime >:startTime";
-			args.put("startTime", param.getStartTime());
-		}
-		if(null != param.getEndTime()){
-			hql += " and completeTime <:endTime";
-			args.put("endTime", param.getEndTime());
-		}
-		if(StringUtils.isNotEmpty(param.getPlateNum())){
-			hql += " and plateNum =:plateNum";
-			args.put("plateNum", "%" + param.getPlateNum() + "%");
-		}
-		if(StringUtils.isNotEmpty(param.getType())){
-			hql += " and intelCard =:intelCard";
-			args.put("intelCard", param.getIntelCard());
-		}
-		hql += " order by registerTime";
+        if (StringUtils.isNotEmpty(param.getDeptId())) {
+            hql += " and deptId =:deptId";
+            args.put("deptId", param.getDeptId());
+        }
+        if (StringUtils.isNotEmpty(param.getProgress())) {
+            hql += " and progress =:progress";
+            args.put("progress", param.getProgress());
+        }
+        if (StringUtils.isNotEmpty(param.getType())) {
+            hql += " and type =:type";
+            args.put("type", param.getType());
+        }
+        if (null != param.getStartTime()) {
+            hql += " and completeTime >:startTime";
+            args.put("startTime", param.getStartTime());
+        }
+        if (null != param.getEndTime()) {
+            hql += " and completeTime <:endTime";
+            args.put("endTime", param.getEndTime());
+        }
+        if (StringUtils.isNotEmpty(param.getPlateNum())) {
+            hql += " and plateNum =:plateNum";
+            args.put("plateNum", "%" + param.getPlateNum() + "%");
+        }
+        if (StringUtils.isNotEmpty(param.getIntelCard())) {
+            hql += " and intelCard =:intelCard";
+            args.put("intelCard", param.getIntelCard());
+        }
+        hql += " order by registerTime";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏍规嵁缁勭粐缂栫爜銆佸簱鍖虹紪鐮併�佹祦姘磇d鏌ヨ鍑哄叆搴撲俊鎭�
-	 * 鐢ㄤ簬鍒ゆ柇褰撳墠鏁版嵁鏄惁鍦ㄥ�间粨娴佺▼
-	 *
-	 * @param companyId
-	 * @param deptId
-	 * @param id
-	 * @return
-	 */
-	public InoutRecord getInoutRecord(String companyId, String deptId, String id, String intelCard) {
-		String hql = " from " + InoutRecord.class.getName() + " where" + " and recordStatus <>:recordStatus1 and recordStatus <>:recordStatus2";
+    /**
+     * 鏍规嵁缁勭粐缂栫爜銆佸簱鍖虹紪鐮併�佹祦姘磇d鏌ヨ鍑哄叆搴撲俊鎭�
+     * 鐢ㄤ簬鍒ゆ柇褰撳墠鏁版嵁鏄惁鍦ㄥ�间粨娴佺▼
+     *
+     * @param companyId
+     * @param deptId
+     * @param id
+     * @return
+     */
+    public InoutRecord getInoutRecord(String companyId, String deptId, String id, String intelCard) {
+        String hql = " from " + InoutRecord.class.getName() + " where" + " recordStatus <>:recordStatus1 and recordStatus <>:recordStatus2";
 
-		Map<String, Object> args = new HashMap<String, Object>();
+        Map<String, Object> args = new HashMap<String, Object>();
 
-		args.put("recordStatus1", InoutConstant.RECORD_STATUS_DEL);
-		args.put("recordStatus2", InoutConstant.RECORD_STATUS_ERROR);
+        args.put("recordStatus1", InoutConstant.RECORD_STATUS_DEL);
+        args.put("recordStatus2", InoutConstant.RECORD_STATUS_ERROR);
 
-		if(StringUtils.isNotEmpty(companyId)){
-			hql += " and companyId =:companyId";
-			args.put("companyId", companyId);
-		}
-		if(StringUtils.isNotEmpty(deptId)){
-			hql += " and deptId =:deptId";
-			args.put("deptId", deptId);
-		}
-		if(StringUtils.isNotEmpty(id)){
-			hql += " and id =:id";
-			args.put("id", id);
-		}
-		if(StringUtils.isNotEmpty(intelCard)){
-			hql += " and intelCard =:intelCard";
-			args.put("intelCard", intelCard);
-		}
-		hql += " order by registerTime";
+        if (StringUtils.isNotEmpty(companyId)) {
+            hql += " and companyId =:companyId";
+            args.put("companyId", companyId);
+        }
+        if (StringUtils.isNotEmpty(deptId)) {
+            hql += " and deptId =:deptId";
+            args.put("deptId", deptId);
+        }
+        if (StringUtils.isNotEmpty(id)) {
+            hql += " and id =:id";
+            args.put("id", id);
+        }
+        if (StringUtils.isNotEmpty(intelCard)) {
+            hql += " and intelCard =:intelCard";
+            args.put("intelCard", intelCard);
+        }
+        hql += " order by registerTime";
 
-		List<InoutRecord> list = this.query(hql, args);
-		if(null == list || list.isEmpty()){
-			return null;
-		}
-		return list.get(0);
-	}
+        List<InoutRecord> list = this.query(hql, args);
+        if (null == list || list.isEmpty()) {
+            return null;
+        }
+        return list.get(0);
+    }
 
-	/**
-	 * 鏌ヨ浠撴埧淇℃伅鏁版嵁----鎺ュ彛1103浣跨敤
-	 * @param companyId
-	 * @param deptId
-	 * @return
-	 */
-	public List<Building> listBuilding(String companyId, String deptId) {
-		String hql = " from " + Building.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ浠撴埧淇℃伅鏁版嵁----鎺ュ彛1103浣跨敤
+     *
+     * @param companyId
+     * @param deptId
+     * @return
+     */
+    public List<Building> listBuilding(String companyId, String deptId) {
+        String hql = " from " + Building.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
-		if(StringUtils.isNotEmpty(deptId)){
-			hql += " and deptId =:deptId";
-			args.put("deptId", deptId);
-		}
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
+        if (StringUtils.isNotEmpty(deptId)) {
+            hql += " and deptId =:deptId";
+            args.put("deptId", deptId);
+        }
 
-		hql += " order by id desc";
+        hql += " order by id desc";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏍规嵁浠撴埧id鑾峰彇浠撴埧淇℃伅
-	 * @param companyId
-	 * @param id
-	 * @return
-	 */
-	public Building getBuilding(String companyId, String id) {
-		if(StringUtils.isEmpty(id)){
-			return null;
-		}
-		String hql = " from " + Building.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏍规嵁浠撴埧id鑾峰彇浠撴埧淇℃伅
+     *
+     * @param companyId
+     * @param id
+     * @return
+     */
+    public Building getBuilding(String companyId, String id) {
+        if (StringUtils.isEmpty(id)) {
+            return null;
+        }
+        String hql = " from " + Building.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		hql += " and id =:id";
-		args.put("id", id);
+        hql += " and id =:id";
+        args.put("id", id);
 
-		hql += " order by id desc";
+        hql += " order by id desc";
 
-		List<Building> buildings = this.query(hql, args);
-		if(buildings == null || buildings.isEmpty()){
-			return null;
-		}
-		return buildings.get(0);
-	}
+        List<Building> buildings = this.query(hql, args);
+        if (buildings == null || buildings.isEmpty()) {
+            return null;
+        }
+        return buildings.get(0);
+    }
 
-	/**
-	 * 鏌ヨ鏂囦欢淇℃伅鏁版嵁----鎺ュ彛1112浣跨敤
-	 * @param companyId
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<FileInfo> listFiles(String companyId, Date startTime, Date endTime) {
-		String hql = " from " + FileInfo.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ鏂囦欢淇℃伅鏁版嵁----鎺ュ彛1112浣跨敤
+     *
+     * @param companyId
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    public List<FileInfo> listFiles(String companyId, Date startTime, Date endTime) {
+        String hql = " from " + FileInfo.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
-		if(null != startTime){
-			hql += " and createTime >:startTime";
-			args.put("startTime", startTime);
-		}
-		if(null != endTime){
-			hql += " and createTime <:endTime";
-			args.put("endTime", endTime);
-		}
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
+        if (null != startTime) {
+            hql += " and createTime >:startTime";
+            args.put("startTime", startTime);
+        }
+        if (null != endTime) {
+            hql += " and createTime <:endTime";
+            args.put("endTime", endTime);
+        }
 
-		hql += " order by createTime desc";
+        hql += " order by createTime desc";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ璐ㄦ鏁版嵁----鎺ュ彛1201浣跨敤
-	 * @param companyId
-	 * @param depotId
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<MQuality> listQuality(String companyId, String depotId, Date startTime, Date endTime) {
-		String hql = " from " + MQuality.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ璐ㄦ鏁版嵁----鎺ュ彛1201浣跨敤
+     *
+     * @param companyId
+     * @param depotId
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    public List<MQuality> listQuality(String companyId, String depotId, Date startTime, Date endTime) {
+        String hql = " from " + MQuality.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		if(StringUtils.isNotEmpty(depotId)){
-			hql += " and depotId =:depotId";
-			args.put("depotId", depotId);
-		}
+        if (StringUtils.isNotEmpty(depotId)) {
+            hql += " and depotId =:depotId";
+            args.put("depotId", depotId);
+        }
 
-		if(null != startTime){
-			hql += " and time >:startTime";
-			args.put("startTime", startTime);
-		}
-		if(null != endTime){
-			hql += " and time <:endTime";
-			args.put("endTime", endTime);
-		}
+        if (null != startTime) {
+            hql += " and time >:startTime";
+            args.put("startTime", startTime);
+        }
+        if (null != endTime) {
+            hql += " and time <:endTime";
+            args.put("endTime", endTime);
+        }
 
-		hql += " order by time desc";
+        hql += " order by time desc";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 璇㈣川妫�鏄庣粏鏁版嵁----鎺ュ彛1202浣跨敤
-	 * @param checkId
-	 * @return
-	 */
-	public List<CheckItem> listQualityDetail(String checkId) {
+    /**
+     * 璇㈣川妫�鏄庣粏鏁版嵁----鎺ュ彛1202浣跨敤
+     *
+     * @param checkId
+     * @return
+     */
+    public List<CheckItem> listQualityDetail(String checkId) {
 
-		String hql = " from " + CheckItem.class.getName() + " where checkId =:checkId";
+        String hql = " from " + CheckItem.class.getName() + " where checkId =:checkId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("checkId", checkId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("checkId", checkId);
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ鍊掍粨淇℃伅鏁版嵁----鎺ュ彛1309浣跨敤
-	 * @param companyId
-	 * @param depotId
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<InoutStockChange> listStockChange(String companyId, String depotId, Date startTime, Date endTime) {
-		String hql = " from " + InoutStockChange.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ鍊掍粨淇℃伅鏁版嵁----鎺ュ彛1309浣跨敤
+     *
+     * @param companyId
+     * @param depotId
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    public List<InoutStockChange> listStockChange(String companyId, String depotId, Date startTime, Date endTime) {
+        String hql = " from " + InoutStockChange.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		if(StringUtils.isNotEmpty(depotId)){
-			hql += " and depotId =:depotId";
-			args.put("depotId", depotId);
-		}
+        if (StringUtils.isNotEmpty(depotId)) {
+            hql += " and depotId =:depotId";
+            args.put("depotId", depotId);
+        }
 
-		if(null != startTime){
-			hql += " and updateTime >:startTime";
-			args.put("startTime", startTime);
-		}
-		if(null != endTime){
-			hql += " and updateTime <:endTime";
-			args.put("endTime", endTime);
-		}
+        if (null != startTime) {
+            hql += " and updateTime >:startTime";
+            args.put("startTime", startTime);
+        }
+        if (null != endTime) {
+            hql += " and updateTime <:endTime";
+            args.put("endTime", endTime);
+        }
 
-		hql += " order by updateTime desc";
+        hql += " order by updateTime desc";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ鎹熸孩鍗曟暟鎹�----鎺ュ彛1311浣跨敤
-	 * @param companyId
-	 * @param depotId
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<InoutLossOver> listLossOver(String companyId, String depotId, Date startTime, Date endTime) {
-		String hql = " from " + InoutLossOver.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ鎹熸孩鍗曟暟鎹�----鎺ュ彛1311浣跨敤
+     *
+     * @param companyId
+     * @param depotId
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    public List<InoutLossOver> listLossOver(String companyId, String depotId, Date startTime, Date endTime) {
+        String hql = " from " + InoutLossOver.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		if(StringUtils.isNotEmpty(depotId)){
-			hql += " and depotId =:depotId";
-			args.put("depotId", depotId);
-		}
+        if (StringUtils.isNotEmpty(depotId)) {
+            hql += " and depotId =:depotId";
+            args.put("depotId", depotId);
+        }
 
-		if(null != startTime){
-			hql += " and submitTime >:startTime";
-			args.put("startTime", startTime);
-		}
-		if(null != endTime){
-			hql += " and submitTime <:endTime";
-			args.put("endTime", endTime);
-		}
+        if (null != startTime) {
+            hql += " and submitTime >:startTime";
+            args.put("startTime", startTime);
+        }
+        if (null != endTime) {
+            hql += " and submitTime <:endTime";
+            args.put("endTime", endTime);
+        }
 
-		hql += " order by submitTime";
+        hql += " order by submitTime";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ绮鎬ц川鍙樻洿淇℃伅----鎺ュ彛1312浣跨敤
-	 * @param companyId
-	 * @param depotId
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<InoutVarietyChange> listFoodVarietyChange(String companyId, String depotId, Date startTime, Date endTime) {
-		String hql = " from " + InoutVarietyChange.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ绮鎬ц川鍙樻洿淇℃伅----鎺ュ彛1312浣跨敤
+     *
+     * @param companyId
+     * @param depotId
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    public List<InoutVarietyChange> listFoodVarietyChange(String companyId, String depotId, Date startTime, Date endTime) {
+        String hql = " from " + InoutVarietyChange.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		if(StringUtils.isNotEmpty(depotId)){
-			hql += " and depotId =:depotId";
-			args.put("depotId", depotId);
-		}
+        if (StringUtils.isNotEmpty(depotId)) {
+            hql += " and depotId =:depotId";
+            args.put("depotId", depotId);
+        }
 
-		if(null != startTime){
-			hql += " and changeTime >:startTime";
-			args.put("startTime", startTime);
-		}
-		if(null != endTime){
-			hql += " and changeTime <:endTime";
-			args.put("endTime", endTime);
-		}
+        if (null != startTime) {
+            hql += " and changeTime >:startTime";
+            args.put("startTime", startTime);
+        }
+        if (null != endTime) {
+            hql += " and changeTime <:endTime";
+            args.put("endTime", endTime);
+        }
 
-		hql += " order by changeTime";
+        hql += " order by changeTime";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ娓╂箍搴︿俊鎭�----鎺ュ彛1401浣跨敤
-	 * @param companyId
-	 * @param depotId
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<Grain> listGrain(String companyId, String depotId, Date startTime, Date endTime) {
-		String hql = " from " + Grain.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ娓╂箍搴︿俊鎭�----鎺ュ彛1401浣跨敤
+     *
+     * @param companyId
+     * @param depotId
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    public List<Grain> listGrain(String companyId, String depotId, Date startTime, Date endTime) {
+        String hql = " from " + Grain.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		if(StringUtils.isNotEmpty(depotId)){
-			hql += " and depotId =:depotId";
-			args.put("depotId", depotId);
-		}
+        if (StringUtils.isNotEmpty(depotId)) {
+            hql += " and depotId =:depotId";
+            args.put("depotId", depotId);
+        }
 
-		if(null != startTime){
-			hql += " and receiveDate >:startTime";
-			args.put("startTime", startTime);
-		}
-		if(null != endTime){
-			hql += " and receiveDate <:endTime";
-			args.put("endTime", endTime);
-		}
+        if (null != startTime) {
+            hql += " and receiveDate >:startTime";
+            args.put("startTime", startTime);
+        }
+        if (null != endTime) {
+            hql += " and receiveDate <:endTime";
+            args.put("endTime", endTime);
+        }
 
-		hql += " order by receiveDate";
+        hql += " order by receiveDate";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ绮儏閰嶇疆淇℃伅----鎺ュ彛1402浣跨敤
-	 * @param companyId
-	 * @param depotId
-	 * @return
-	 */
-	public List<DepotConf> listDepotConf(String companyId, String depotId) {
-		String hql = " from " + DepotConf.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ绮儏閰嶇疆淇℃伅----鎺ュ彛1402浣跨敤
+     *
+     * @param companyId
+     * @param depotId
+     * @return
+     */
+    public List<DepotConf> listDepotConf(String companyId, String depotId) {
+        String hql = " from " + DepotConf.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		if(StringUtils.isNotEmpty(depotId)){
-			hql += " and depotId =:depotId";
-			args.put("depotId", depotId);
-		}
+        if (StringUtils.isNotEmpty(depotId)) {
+            hql += " and depotId =:depotId";
+            args.put("depotId", depotId);
+        }
 
-		hql += " order by depotId";
+        hql += " order by depotId";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ閫氶淇℃伅----鎺ュ彛1403浣跨敤
-	 * @param companyId
-	 * @param depotId
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<MAreationData> listAreationData(String companyId, String depotId, Date startTime, Date endTime) {
-		String hql = " from " + MAreationData.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ閫氶淇℃伅----鎺ュ彛1403浣跨敤
+     *
+     * @param companyId
+     * @param depotId
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    public List<MAreationData> listAreationData(String companyId, String depotId, Date startTime, Date endTime) {
+        String hql = " from " + MAreationData.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		if(StringUtils.isNotEmpty(depotId)){
-			hql += " and depotId =:depotId";
-			args.put("depotId", depotId);
-		}
+        if (StringUtils.isNotEmpty(depotId)) {
+            hql += " and depotId =:depotId";
+            args.put("depotId", depotId);
+        }
 
-		if(null != startTime){
-			hql += " and updateTime >:startTime";
-			args.put("startTime", startTime);
-		}
-		if(null != endTime){
-			hql += " and updateTime <:endTime";
-			args.put("endTime", endTime);
-		}
+        if (null != startTime) {
+            hql += " and updateTime >:startTime";
+            args.put("startTime", startTime);
+        }
+        if (null != endTime) {
+            hql += " and updateTime <:endTime";
+            args.put("endTime", endTime);
+        }
 
-		hql += " order by updateTime";
+        hql += " order by updateTime";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ鐔忚捀淇℃伅----鎺ュ彛1404浣跨敤
-	 * @param companyId
-	 * @param depotId
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<DrugLog> listDrugLog(String companyId, String depotId, Date startTime, Date endTime) {
-		String hql = " from " + DrugLog.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ鐔忚捀淇℃伅----鎺ュ彛1404浣跨敤
+     *
+     * @param companyId
+     * @param depotId
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    public List<DrugLog> listDrugLog(String companyId, String depotId, Date startTime, Date endTime) {
+        String hql = " from " + DrugLog.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		if(StringUtils.isNotEmpty(depotId)){
-			hql += " and depotId =:depotId";
-			args.put("depotId", depotId);
-		}
+        if (StringUtils.isNotEmpty(depotId)) {
+            hql += " and depotId =:depotId";
+            args.put("depotId", depotId);
+        }
 
-		if(null != startTime){
-			hql += " and updateTime >:startTime";
-			args.put("startTime", startTime);
-		}
-		if(null != endTime){
-			hql += " and updateTime <:endTime";
-			args.put("endTime", endTime);
-		}
+        if (null != startTime) {
+            hql += " and updateTime >:startTime";
+            args.put("startTime", startTime);
+        }
+        if (null != endTime) {
+            hql += " and updateTime <:endTime";
+            args.put("endTime", endTime);
+        }
 
-		hql += " order by updateTime";
+        hql += " order by updateTime";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ铏淇℃伅----鎺ュ彛1405浣跨敤
-	 * @param companyId
-	 * @param depotId
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<Pest> listPest(String companyId, String depotId, Date startTime, Date endTime) {
-		String hql = " from " + Pest.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ铏淇℃伅----鎺ュ彛1405浣跨敤
+     *
+     * @param companyId
+     * @param depotId
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    public List<Pest> listPest(String companyId, String depotId, Date startTime, Date endTime) {
+        String hql = " from " + Pest.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		if(StringUtils.isNotEmpty(depotId)){
-			hql += " and depotId =:depotId";
-			args.put("depotId", depotId);
-		}
+        if (StringUtils.isNotEmpty(depotId)) {
+            hql += " and depotId =:depotId";
+            args.put("depotId", depotId);
+        }
 
-		if(null != startTime){
-			hql += " and receiveDate >:startTime";
-			args.put("startTime", startTime);
-		}
-		if(null != endTime){
-			hql += " and receiveDate <:endTime";
-			args.put("endTime", endTime);
-		}
+        if (null != startTime) {
+            hql += " and receiveDate >:startTime";
+            args.put("startTime", startTime);
+        }
+        if (null != endTime) {
+            hql += " and receiveDate <:endTime";
+            args.put("endTime", endTime);
+        }
 
-		hql += " order by receiveDate";
+        hql += " order by receiveDate";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ铏淇℃伅----鎺ュ彛1408浣跨敤
-	 * @param companyId
-	 * @param depotId
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<Gas> listGas(String companyId, String depotId, Date startTime, Date endTime) {
-		String hql = " from " + Gas.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ铏淇℃伅----鎺ュ彛1408浣跨敤
+     *
+     * @param companyId
+     * @param depotId
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    public List<Gas> listGas(String companyId, String depotId, Date startTime, Date endTime) {
+        String hql = " from " + Gas.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		if(StringUtils.isNotEmpty(depotId)){
-			hql += " and depotId =:depotId";
-			args.put("depotId", depotId);
-		}
+        if (StringUtils.isNotEmpty(depotId)) {
+            hql += " and depotId =:depotId";
+            args.put("depotId", depotId);
+        }
 
-		if(null != startTime){
-			hql += " and receiveDate >:startTime";
-			args.put("startTime", startTime);
-		}
-		if(null != endTime){
-			hql += " and receiveDate <:endTime";
-			args.put("endTime", endTime);
-		}
+        if (null != startTime) {
+            hql += " and receiveDate >:startTime";
+            args.put("startTime", startTime);
+        }
+        if (null != endTime) {
+            hql += " and receiveDate <:endTime";
+            args.put("endTime", endTime);
+        }
 
-		hql += " order by receiveDate";
+        hql += " order by receiveDate";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ杞崲璁″垝淇℃伅----鎺ュ彛1501浣跨敤
-	 * @param companyId
-	 * @param type
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<InoutPlan> listPlan(String companyId, String type, Date startTime, Date endTime) {
-		String hql = " from " + InoutPlan.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ杞崲璁″垝淇℃伅----鎺ュ彛1501浣跨敤
+     *
+     * @param companyId
+     * @param type
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    public List<InoutPlan> listPlan(String companyId, String type, Date startTime, Date endTime) {
+        String hql = " from " + InoutPlan.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		if(StringUtils.isNotEmpty(type)){
-			hql += " and type =:type";
-			args.put("type", type);
-		}
+        if (StringUtils.isNotEmpty(type)) {
+            hql += " and type =:type";
+            args.put("type", type);
+        }
 
-		if(null != startTime){
-			hql += " and createTime >:startTime";
-			args.put("startTime", startTime);
-		}
-		if(null != endTime){
-			hql += " and createTime <:endTime";
-			args.put("endTime", endTime);
-		}
+        if (null != startTime) {
+            hql += " and createTime >:startTime";
+            args.put("startTime", startTime);
+        }
+        if (null != endTime) {
+            hql += " and createTime <:endTime";
+            args.put("endTime", endTime);
+        }
 
-		hql += " order by createTime";
+        hql += " order by createTime";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ杞崲鏄庣粏璁″垝淇℃伅----鎺ュ彛1502浣跨敤
-	 * @param planId
-	 * @return
-	 */
-	public List<InoutPlanDetail> getPlanDetail(String planId) {
+    /**
+     * 鏌ヨ杞崲鏄庣粏璁″垝淇℃伅----鎺ュ彛1502浣跨敤
+     *
+     * @param planId
+     * @return
+     */
+    public List<InoutPlanDetail> getPlanDetail(String planId) {
 
-		String hql = " from " + InoutPlanDetail.class.getName() + " where planId =:planId";
+        String hql = " from " + InoutPlanDetail.class.getName() + " where planId =:planId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("planId", planId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("planId", planId);
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 
-	/**
-	 * 鏌ヨ鍚堝悓淇℃伅----鎺ュ彛1503浣跨敤
-	 * @param companyId
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<InoutContract> listContract(String companyId, Date startTime, Date endTime){
-		String hql = " from " + InoutContract.class.getName() + " where companyId =:companyId";
+    /**
+     * 鏌ヨ鍚堝悓淇℃伅----鎺ュ彛1503浣跨敤
+     *
+     * @param companyId
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    public List<InoutContract> listContract(String companyId, Date startTime, Date endTime) {
+        String hql = " from " + InoutContract.class.getName() + " where companyId =:companyId";
 
-		Map<String, Object> args = new HashMap<String, Object>();
-		args.put("companyId", companyId);
+        Map<String, Object> args = new HashMap<String, Object>();
+        args.put("companyId", companyId);
 
-		if(null != startTime){
-			hql += " and createTime >:startTime";
-			args.put("startTime", startTime);
-		}
-		if(null != endTime){
-			hql += " and createTime <:endTime";
-			args.put("endTime", endTime);
-		}
+        if (null != startTime) {
+            hql += " and createTime >:startTime";
+            args.put("startTime", startTime);
+        }
+        if (null != endTime) {
+            hql += " and createTime <:endTime";
+            args.put("endTime", endTime);
+        }
 
-		hql += " order by createTime";
+        hql += " order by createTime";
 
-		return this.query(hql, args);
-	}
+        return this.query(hql, args);
+    }
 }
\ No newline at end of file
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5203.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5203.java
index 6d0e8df..610e022 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5203.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5203.java
@@ -75,7 +75,7 @@
         param.setProgress(InoutConstant.PROGRESS_RECORD);
         List<InoutRecord> list = hPhoneService.listInoutRecord(param);
 
-        if(null == list || list.isEmpty()){
+        if (null == list || list.isEmpty()) {
             return PhoneRespUtil.success(dto, req);
         }
 
@@ -88,6 +88,9 @@
             BeanUtils.copyProperties(record, inoutData);
             inoutData.setDepotName(phone35Util.getDepotName(phone35AuthUser.getCompanyId(), record.getDepotId()));
             inoutData.setFoodVarietyName(FoodVariety.getMsg(record.getFoodVariety()));
+            if (inoutData.getRecordWeight() == null) {
+                inoutData.setRecordWeight(0.0);
+            }
             sum += inoutData.getRecordWeight();
             listDto.add(inoutData);
         }
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5204.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5204.java
index 9d7a64b..5a7fa74 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5204.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5204.java
@@ -75,7 +75,7 @@
         param.setProgress(InoutConstant.PROGRESS_RECORD);
         List<InoutRecord> list = hPhoneService.listInoutRecord(param);
 
-        if(null == list || list.isEmpty()){
+        if (null == list || list.isEmpty()) {
             return PhoneRespUtil.success(dto, req);
         }
 
@@ -88,6 +88,9 @@
             BeanUtils.copyProperties(record, inoutData);
             inoutData.setDepotName(phone35Util.getDepotName(phone35AuthUser.getCompanyId(), record.getDepotId()));
             inoutData.setFoodVarietyName(FoodVariety.getMsg(record.getFoodVariety()));
+            if (inoutData.getRecordWeight() == null) {
+                inoutData.setRecordWeight(0.0);
+            }
             sum += inoutData.getRecordWeight();
             listDto.add(inoutData);
         }
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5206.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5206.java
index 5103577..fd176bb 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5206.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5206.java
@@ -5,6 +5,7 @@
 import com.ld.igds.constant.FoodVariety;
 import com.ld.igds.constant.RespCodeEnum;
 import com.ld.igds.inout.InoutConstant;
+import com.ld.igds.models.Depot;
 import com.ld.igds.models.InoutRecord;
 import com.ld.igds.phone35.constant.Phone35Constant;
 import com.ld.igds.phone35.dto.Phone35AuthUser;
@@ -39,7 +40,7 @@
 
     @Override
     public String getInterfaceId() {
-        return Phone35Constant.API_PHONE_5203;
+        return Phone35Constant.API_PHONE_5206;
     }
 
     @SuppressWarnings("unchecked")
@@ -66,7 +67,7 @@
         param.setProgress(InoutConstant.PROGRESS_HANDLE);
         List<InoutRecord> list = hPhoneService.listInoutRecord(param);
 
-        if(null == list || list.isEmpty()){
+        if (null == list || list.isEmpty()) {
             return PhoneRespUtil.success(null, req);
         }
 
@@ -75,8 +76,12 @@
         for (InoutRecord record : list) {
             inoutData = new Phone35InoutDto();
             BeanUtils.copyProperties(record, inoutData);
-            //璁剧疆浠撳簱銆佺伯椋熷搧绉嶃�佺伯椋熺瓑绾х瓑鍚嶇О
-            inoutData.setDepotName(phone35Util.getDepotName(phone35AuthUser.getCompanyId(), record.getDepotId()));
+            Depot depot = phone35Util.getDepot(phone35AuthUser.getCompanyId(), record.getDepotId());
+
+            //璁剧疆浠撳簱銆佺伯椋熷搧绉嶃�佺伯椋熺瓑绾с�佷繚绠″憳绛夊悕绉�
+            inoutData.setDepotName(depot.getName());
+            inoutData.setStoreKeeper(depot.getStoreKeeper());
+            inoutData.setStoreKeeperName(depot.getStoreKeeperName());
             inoutData.setFoodVarietyName(FoodVariety.getMsg(record.getFoodVariety()));
             inoutData.setFoodLevelName(FoodLevel.getMsg(record.getFoodLevel()));
             listDto.add(inoutData);
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5207.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5207.java
index b7dc42e..7b2cea3 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5207.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5207.java
@@ -20,6 +20,7 @@
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -42,7 +43,7 @@
 
     @Override
     public String getInterfaceId() {
-        return Phone35Constant.API_PHONE_5205;
+        return Phone35Constant.API_PHONE_5207;
     }
 
     @SuppressWarnings("unchecked")
@@ -56,23 +57,23 @@
             return PhoneRespUtil.error(RespCodeEnum.CODE_1111, "鍙傛暟鏈夎锛岃閲嶈瘯锛侊紒");
         }
         //鍙傛暟楠岃瘉
-        if (StringUtils.isEmpty(param.getDeptId())) {
-            return PhoneRespUtil.error(RespCodeEnum.CODE_1111, "鍙傛暟鏈夎锛岃閲嶈瘯锛侊紒");
-        }
+//        if (StringUtils.isEmpty(param.getDeptId())) {
+//            return PhoneRespUtil.error(RespCodeEnum.CODE_1111, "鍙傛暟鏈夎锛岃閲嶈瘯锛侊紒");
+//        }
 
         //鍊间粨鎻愪氦鍓嶏紝鍐嶆纭褰撳墠娴佹按鏄惁涓哄�间粨娴佺▼
         InoutRecord record = hPhoneService.getInoutRecord(phone35AuthUser.getCompanyId(), phone35AuthUser.getDeptId(), param.getId(), null);
-        if(!InoutConstant.PROGRESS_HANDLE.equals(record.getProgress())){
+        if (!InoutConstant.PROGRESS_HANDLE.equals(record.getProgress())) {
             return PhoneRespUtil.error(RespCodeEnum.CODE_1111, "璇ュ崟瀛愪笉鍦ㄥ�间粨鐘舵�侊紝涓嶈兘杩涜鍊间粨鎻愪氦锛�");
         }
 
         InoutData data = new InoutData();
         BeanUtils.copyProperties(record, data);
-        if(param.getType().equals(Phone35Constant.PHONE_INOUT_START)){
+        if (param.getType().equals(Phone35Constant.PHONE_INOUT_START)) {
             //鍊间粨寮�濮嬫彁浜わ紝鍙洿鏂板�间粨寮�濮嬫椂闂�
             String msg = inoutService.updateData(data);
             return PhoneRespUtil.success(null, req, msg);
-        }else{
+        } else {
             //鍊间粨缁撴潫鎻愪氦,闇�鏇存柊娴佺▼鐘舵�併�佸�间粨缁撴潫鏃堕棿銆佸�间粨浜恒�佸�间粨鎵i噸绛�
             data.setDeHandle(param.getDeHandle());
             data.setHandleUser(phone35AuthUser.getCname());
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5208.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5208.java
index fd3a5d9..301c738 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5208.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5208.java
@@ -43,7 +43,7 @@
 
     @Override
     public String getInterfaceId() {
-        return Phone35Constant.API_PHONE_5205;
+        return Phone35Constant.API_PHONE_5208;
     }
 
     @SuppressWarnings("unchecked")
@@ -57,14 +57,14 @@
             return PhoneRespUtil.error(RespCodeEnum.CODE_1111, "鍙傛暟鏈夎锛岃閲嶈瘯锛侊紒");
         }
         //鍙傛暟楠岃瘉
-        if (StringUtils.isEmpty(param.getDeptId())) {
-            return PhoneRespUtil.error(RespCodeEnum.CODE_1111, "鍙傛暟鏈夎锛岃閲嶈瘯锛侊紒");
-        }
+//        if (StringUtils.isEmpty(param.getDeptId())) {
+//            return PhoneRespUtil.error(RespCodeEnum.CODE_1111, "鍙傛暟鏈夎锛岃閲嶈瘯锛侊紒");
+//        }
 
         //鏌ヨ娴佹按鏁版嵁淇℃伅
         InoutRecord inoutData = hPhoneService.getInoutRecord(phone35AuthUser.getCompanyId(), phone35AuthUser.getDeptId(), param.getId(), param.getIntelCard());
-        if(inoutData == null){
-            if(StringUtils.isEmpty(param.getId())){
+        if (inoutData == null) {
+            if (StringUtils.isEmpty(param.getId())) {
                 return PhoneRespUtil.error(RespCodeEnum.CODE_1111, "鏈煡璇㈠埌姝ゅ崱鏁版嵁淇℃伅锛岃閲嶈瘯锛侊紒");
             }
             return PhoneRespUtil.error(RespCodeEnum.CODE_1111, "鏈幏鍙栧埌鎵�閫夋暟鎹俊鎭紝璇烽噸璇曪紒锛�");
@@ -72,28 +72,28 @@
         //灏佽鍝嶅簲鏁版嵁
         Phone35InoutDto inoutHandle = new Phone35InoutDto();
         BeanUtils.copyProperties(inoutData, inoutHandle);
-        inoutHandle.setDepotName(phone35Util.getDepotName(inoutData.getCompanyId(),inoutData.getDepotId()));
+        inoutHandle.setDepotName(phone35Util.getDepotName(inoutData.getCompanyId(), inoutData.getDepotId()));
         inoutHandle.setProgressName(phone35Util.getProgressName(phone35AuthUser.getCompanyId(), inoutData.getProgress()));
         inoutHandle.setFoodVarietyName(FoodVariety.getMsg(inoutData.getFoodVariety()));
         inoutHandle.setFoodLevelName(FoodLevel.getMsg(inoutData.getFoodLevel()));
-//        inoutHandle.setHandleStart(inoutData.getHandleStart()); TODO 
-//        inoutHandle.setHandelEnd(inoutData.getHandleEnd()); TODO 
+//        inoutHandle.setHandleStart(inoutData.getHandleStart());
+//        inoutHandle.setHandelEnd(inoutData.getHandleEnd());
         inoutHandle.setProgress(inoutData.getProgress());
 
         //鏍规嵁娴佹按id銆佺粍缁囩紪鐮佹煡璇㈠浘鐗囦俊鎭�
         List<FileData> files = fileService.listFile(phone35AuthUser.getCompanyId(), inoutData.getId());
-        if(files != null){
+        if (files != null) {
             String bathPath;
             int i = 1;
             for (FileData file : files) {
                 //鍙缃�间粨鐨勫浘鐗�
-                if(file.getBizTag().equals(InoutConstant.PROGRESS_HANDLE)){
-                    if(i==1){
+                if (file.getBizTag().equals(InoutConstant.PROGRESS_HANDLE)) {
+                    if (i == 1) {
                         i++;
                         bathPath = fileService.getInoutFilePath(file.getCreateTime());
                         inoutHandle.setFileName1(file.getFileName());
                         inoutHandle.setBase64Img1(FfmpegUtil.getImgStr(bathPath + file.getFileName()));
-                    }else {
+                    } else {
                         bathPath = fileService.getInoutFilePath(file.getCreateTime());
                         inoutHandle.setFileName2(file.getFileName());
                         inoutHandle.setBase64Img2(FfmpegUtil.getImgStr(bathPath + file.getFileName()));
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5401.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5401.java
new file mode 100644
index 0000000..ef41691
--- /dev/null
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5401.java
@@ -0,0 +1,26 @@
+package com.ld.igds.phone35.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ld.igds.phone35.constant.Phone35Constant;
+import com.ld.igds.phone35.dto.Phone35AuthUser;
+import com.ld.igds.phone35.dto.PhoneResponse;
+import com.ld.igds.phone35.param.Phone35Request;
+import com.ld.igds.phone35.service.Phone35Service;
+
+/**
+ * 璁惧鎺у埗-璁惧鍒楄〃鎺ュ彛瀹炵幇
+ *
+ * @Author:YAN
+ */
+public class Phone35ServiceImpl5401 implements Phone35Service {
+    @Override
+    public String getInterfaceId() {
+        return Phone35Constant.API_PHONE_5401;
+    }
+
+    @Override
+    public PhoneResponse<Object> execute(Phone35Request<JSONObject> req, Phone35AuthUser phone35AuthUser) throws Exception {
+        //todo 璁惧鍒楄〃
+        return null;
+    }
+}
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5501.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5501.java
new file mode 100644
index 0000000..c3139c1
--- /dev/null
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5501.java
@@ -0,0 +1,48 @@
+package com.ld.igds.phone35.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ld.igds.constant.RespCodeEnum;
+import com.ld.igds.phone35.constant.Phone35Constant;
+import com.ld.igds.phone35.dto.Dto5501;
+import com.ld.igds.phone35.dto.Phone35AuthUser;
+import com.ld.igds.phone35.dto.PhoneResponse;
+import com.ld.igds.phone35.mapper.Phone35Mapper;
+import com.ld.igds.phone35.param.Phone35CommonParam;
+import com.ld.igds.phone35.param.Phone35DepotCommonParam;
+import com.ld.igds.phone35.param.Phone35Request;
+import com.ld.igds.phone35.service.Phone35Service;
+import com.ld.igds.phone35.util.PhoneRespUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @Author:YAN
+ */
+@Service
+public class Phone35ServiceImpl5501 implements Phone35Service {
+    @Autowired
+    private Phone35Mapper phone35Mapper;
+
+    @Override
+    public String getInterfaceId() {
+        return Phone35Constant.API_PHONE_5501;
+    }
+
+    @Override
+    public PhoneResponse<Object> execute(Phone35Request<JSONObject> req, Phone35AuthUser phone35AuthUser) throws Exception {
+        //杞寲瀵硅薄
+        Phone35CommonParam param = JSONObject.parseObject(req.getData().toString(), Phone35CommonParam.class);
+        if (null == param) {
+            return PhoneRespUtil.error(RespCodeEnum.CODE_1111, "鍙傛暟鏈夎锛岃閲嶈瘯锛侊紒");
+        }
+        //鍙傛暟楠岃瘉
+        if (StringUtils.isEmpty(param.getDeptId())) {
+            return PhoneRespUtil.error(RespCodeEnum.CODE_1111, "鍙傛暟鏈夎锛岃閲嶈瘯锛侊紒");
+        }
+        List<Dto5501> list = phone35Mapper.getRealEnergyByDept(phone35AuthUser.getCompanyId(), param.getDeptId());
+        return PhoneRespUtil.success(list, req);
+    }
+}
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5801.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5801.java
new file mode 100644
index 0000000..30381db
--- /dev/null
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5801.java
@@ -0,0 +1,23 @@
+package com.ld.igds.phone35.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ld.igds.phone35.constant.Phone35Constant;
+import com.ld.igds.phone35.dto.Phone35AuthUser;
+import com.ld.igds.phone35.dto.PhoneResponse;
+import com.ld.igds.phone35.param.Phone35Request;
+import com.ld.igds.phone35.service.Phone35Service;
+
+/**
+ * @Author:YAN
+ */
+public class Phone35ServiceImpl5801 implements Phone35Service {
+    @Override
+    public String getInterfaceId() {
+        return Phone35Constant.API_PHONE_5801;
+    }
+
+    @Override
+    public PhoneResponse<Object> execute(Phone35Request<JSONObject> req, Phone35AuthUser phone35AuthUser) throws Exception {
+        return null;
+    }
+}
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5802.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5802.java
new file mode 100644
index 0000000..052a4e4
--- /dev/null
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5802.java
@@ -0,0 +1,23 @@
+package com.ld.igds.phone35.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ld.igds.phone35.constant.Phone35Constant;
+import com.ld.igds.phone35.dto.Phone35AuthUser;
+import com.ld.igds.phone35.dto.PhoneResponse;
+import com.ld.igds.phone35.param.Phone35Request;
+import com.ld.igds.phone35.service.Phone35Service;
+
+/**
+ * @Author:YAN
+ */
+public class Phone35ServiceImpl5802 implements Phone35Service {
+    @Override
+    public String getInterfaceId() {
+        return Phone35Constant.API_PHONE_5802;
+    }
+
+    @Override
+    public PhoneResponse<Object> execute(Phone35Request<JSONObject> req, Phone35AuthUser phone35AuthUser) throws Exception {
+        return null;
+    }
+}
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/util/Phone35Util.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/util/Phone35Util.java
index 45c44f1..d4883cf 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone35/util/Phone35Util.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/util/Phone35Util.java
@@ -22,27 +22,30 @@
     private CoreCommonService commonService;
 
     private static final String KEY_API_PHONE_TOKEN = "KEY_API_PHONE_TOKEN";
+
     /**
      * 鍒涘缓缂撳瓨Key
+     *
      * @param token
      * @return
      */
-    public static String createKey(String token){
+    public static String createKey(String token) {
         return Constant.APP_NAME + ":" + KEY_API_PHONE_TOKEN + ":" + token;
     }
 
     /**
      * 鑾峰彇鍑哄叆搴撴祦绋嬪悕绉�
+     *
      * @param companyId
      * @param progress
      * @return
      */
-    public  String getProgressName(String companyId,String progress){
+    public String getProgressName(String companyId, String progress) {
         List<DicTrigger> list = triggerService.getCacheDicByParent(
                 companyId, "PROCESS_STATUS_");
         String progressName = "";
         for (DicTrigger dicTrigger : list) {
-            if(dicTrigger.getCode().equals(progress)){
+            if (dicTrigger.getCode().equals(progress)) {
                 progressName = dicTrigger.getName();
                 break;
             }
@@ -52,16 +55,17 @@
 
     /**
      * 鑾峰彇浠撳簱鍚嶇О
+     *
      * @param companyId
      * @param depotId
      * @return
      */
-    public String getDepotName(String companyId,String depotId){
+    public String getDepotName(String companyId, String depotId) {
         List<Depot> depotList = commonService.getCacheDepotList(companyId);
         String depotName = "";
-        if(depotList != null && depotList.size() > 0){
+        if (depotList != null && depotList.size() > 0) {
             for (Depot depot : depotList) {
-                if(depot.getId().equals(depotId)){
+                if (depot.getId().equals(depotId)) {
                     depotName = depot.getName();
                     break;
                 }
@@ -69,4 +73,25 @@
         }
         return depotName;
     }
+
+    /**
+     * 鑾峰彇鎸囧畾浠撳簱鐨勪俊鎭�
+     *
+     * @param companyId
+     * @param depotId
+     * @return
+     */
+    public Depot getDepot(String companyId, String depotId) {
+        List<Depot> depotList = commonService.getCacheDepotList(companyId);
+        Depot depots = new Depot();
+        if (depotList != null && depotList.size() > 0) {
+            for (Depot depot : depotList) {
+                if (depot.getId().equals(depotId)) {
+                    depots = depot;
+                    break;
+                }
+            }
+        }
+        return depots;
+    }
 }
diff --git a/igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml b/igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml
index a580638..85edbcd 100644
--- a/igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml
+++ b/igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml
@@ -44,5 +44,23 @@
         <if test="deptId != null and deptId != ''">AND d.DEPT_ID_ = #{deptId}</if>
         ORDER BY d.ID_
     </select>
-
+    <!--瀹炴椂閰嶇數-->
+    <select id="getRealEnergyByDept" resultType="com.ld.igds.phone35.dto.Dto5501" parameterType="java.lang.String">
+        SELECT d.ID_ as depotId,
+        d.NAME_ as depotName,
+        d.DEPOT_TYPE_ as depotType,
+        e.UA_ as ua,
+        e.UB_ as ub,
+        e.UC_ as uc,
+        e.IA_ as ia,
+        e.IB_ as ib,
+        e.IC_ as ic,
+        e.UPDATE_TIME_ as updateTime
+        FROM d_depot d
+        LEFT JOIN d_energy e
+        ON d.ID_ = e.DEPOT_ID_
+        WHERE d.COMPANY_ID_ = #{companyId}
+        <if test="deptId != null and deptId != ''">AND d.DEPT_ID_ = #{deptId}</if>
+        ORDER BY d.ID_
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3