| | |
| | | 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; |
| | |
| | | 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) { |
| | |
| | | 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")); |
| | | |
| | | 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); |