CZT
2023-10-20 3631219246be48aec1e745e94e5b28ff4e8799c8
igds-api-inte/src/main/java/com/ld/igds/sh/service/ApiShServiceImpl1106.java
@@ -11,9 +11,11 @@
import com.ld.igds.sh.param.ApiRequest;
import com.ld.igds.sh.service.impl.HApiShServiceImpl;
import com.ld.igds.sh.util.ApiShConst;
import com.ld.igds.sh.util.ApiShUtil;
import com.ld.igds.sh.util.RespCodeEnum;
import com.ld.igds.sh.util.RespUtil;
import com.ld.igds.util.ContextUtil;
import com.ld.igds.util.NumberUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
@@ -71,9 +73,9 @@
                continue;
            }
            dto = new Dto1106();
            dto.setAjdh(depot.getId());
            dto.setAjdh(ApiShUtil.getGbDepotId(depot.getId()));
            dto.setAjmc(depot.getName());
            dto.setCfbh(depot.getId().substring(0, 25));
            dto.setCfbh(ApiShUtil.getGbDepotId(depot.getId()).substring(0, 25));
            building = hApiShServiceImpl.getBuilding(companyId, depot.getBuildingId());
            if (null != building) {
@@ -81,17 +83,21 @@
                dto.setAjkd(building.getWidth() == null ? "0.0" : building.getWidth() + "");
                dto.setAjgd(building.getHeight() == null ? "0.0" : building.getHeight() + "");
            }
            dto.setSjcr(depot.getStorageMax() == null ? "0.0" : depot.getStorageMax() + "");
            dto.setSjcr(depot.getStorageMax() == null ? "0.0" : NumberUtil.keepPrecision(depot.getStorageMax()/1000, 1) + "");
            dto.setQyrq(DateFormatUtils.format((depot.getStoreDate() == null ? new Date() : depot.getStoreDate()), "yyyy-MM-dd"));
            dto.setAjzt("1"); //玩好
            if(DepotStatus.STATUS_9.getCode().equals(depot.getDepotStatus())){
                dto.setAjzt("3"); //需大修
            }else {
                dto.setAjzt("1"); //玩好
            }
            dto.setZhgxsj(DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
            //查询日志状态表,设置操作标志
            log = inteStatusLogService.getLogByBizId(companyId, ApiShConst.API_SH_1106 + "_" + depot.getId());
            log = inteStatusLogService.getLogByBizId(companyId, ApiShConst.API_SH_1106 + "_" + ApiShUtil.getGbDepotId(depot.getId()));
            if(null == log){
                addLog = new InteStatusLog();
                addLog.setBizId(ApiShConst.API_SH_1106 + "_" + depot.getId());
                addLog.setBizId(ApiShConst.API_SH_1106 + "_" + ApiShUtil.getGbDepotId(depot.getId()));
                addLog.setCompanyId(companyId);
                addLog.setBizType(ApiShConst.API_SH_TYPE_BASIC);
                addLog.setInterfaceId(ApiShConst.API_SH_1106);