YYC
2023-06-15 a8da7c463224b9a5bc4628197afe4d9f7d05361c
出入库调试
已添加5个文件
已修改10个文件
1343 ■■■■■ 文件已修改
igds-api-phone/src/main/java/com/ld/igds/phone35/dto/Dto5501.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/dto/Phone35InoutDto.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/mapper/Phone35Mapper.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/HPhoneServiceImpl.java 1061 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5203.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5204.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5206.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5207.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5208.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5401.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5501.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5801.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5802.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/util/Phone35Util.java 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/resources/mapper/Phone35Mapper.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;
}
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;
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);
}
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);
    }
    /**
     * æ ¹æ®ç»„织编码、库区编码、流水id查询出入库信息
     * ç”¨äºŽåˆ¤æ–­å½“前数据是否在值仓流程
     *
     * @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";
    /**
     * æ ¹æ®ç»„织编码、库区编码、流水id查询出入库信息
     * ç”¨äºŽåˆ¤æ–­å½“前数据是否在值仓流程
     *
     * @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);
    }
}
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);
        }
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);
        }
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);
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 {
            //值仓结束提交,需更新流程状态、值仓结束时间、值仓人、值仓扣重等
            data.setDeHandle(param.getDeHandle());
            data.setHandleUser(phone35AuthUser.getCname());
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()));
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;
    }
}
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);
    }
}
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;
    }
}
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;
    }
}
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;
    }
}
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>