Merge remote-tracking branch 'origin/master'
| | |
| | | import com.ld.igds.sh.dto.ApiResponse; |
| | | import com.ld.igds.sh.param.ApiRequest; |
| | | |
| | | import java.text.ParseException; |
| | | |
| | | /** |
| | | * 对外接口业务 |
| | | * @author chen |
| | |
| | | import org.apache.commons.lang3.time.DateFormatUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | 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; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | dto.setFdjg(building.getRoof()); |
| | | dto.setFjjg(building.getRoofTruss()); |
| | | dto.setDmjg(building.getGround()); |
| | | dto.setSjcr("0"); |
| | | dto.setSjcr(building.getStorage() == null ? "0" : NumberUtil.keepPrecision(building.getStorage()/1000,1) + ""); |
| | | dto.setCwc(building.getLength() == null ? "0" : building.getLength() + ""); |
| | | dto.setCwk(building.getWidth() == null ? "0" : building.getWidth() + ""); |
| | | dto.setCwyg(building.getHeight() == null ? "0" : building.getHeight() + ""); |
| | |
| | | package com.ld.igds.sh.service; |
| | | |
| | | import com.ld.igds.constant.DepotStatus; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.Depot; |
| | | import com.ld.igds.models.InteStatusLog; |
| | |
| | | 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; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | InteStatusLog addLog; |
| | | for (Depot depot : depotList) { |
| | | dto = new Dto1104(); |
| | | dto.setHwbm(depot.getId()); |
| | | dto.setHwbm(ApiShUtil.getGbDepotId(depot.getId()) + "01"); |
| | | dto.setHwmc(depot.getName()); |
| | | dto.setHwqyrq(DateFormatUtils.format((depot.getStoreDate()==null?new Date():depot.getStoreDate()),"yyyy-MM-dd")); |
| | | dto.setHwrl(depot.getStorageReal()==null?"0.0":depot.getStorageReal() + ""); |
| | | dto.setCfbh(depot.getId().substring(0,25)); |
| | | dto.setHwzt(DepotStatus.getGBCode(depot.getDepotStatus())); |
| | | dto.setHwrl(depot.getStorageMax()==null?"0.0": NumberUtil.keepPrecision(depot.getStorageMax()/1000,1) + ""); |
| | | dto.setCfbh(ApiShUtil.getGbDepotId(depot.getId()).substring(0,25)); |
| | | dto.setHwzt(apiShUtil.getDepotStatus(depot.getDepotStatus())); |
| | | dto.setClfs(depot.getStoreType()); |
| | | dto.setBgy(depot.getStoreKeeper()); |
| | | dto.setBgyxm(depot.getStoreKeeperName()); |
| | | |
| | | dto.setZhgxsj(DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss")); |
| | | //查询日志状态表,设置操作标志 |
| | | log = inteStatusLogService.getLogByBizId(companyId, ApiShConst.API_SH_1104 + "_" + depot.getId()); |
| | | log = inteStatusLogService.getLogByBizId(companyId, ApiShConst.API_SH_1104 + "_" + ApiShUtil.getGbDepotId(depot.getId())); |
| | | if(null == log){ |
| | | addLog = new InteStatusLog(); |
| | | addLog.setBizId(ApiShConst.API_SH_1104 + "_" + depot.getId()); |
| | | addLog.setBizId(ApiShConst.API_SH_1104 + "_" + ApiShUtil.getGbDepotId(depot.getId())); |
| | | addLog.setCompanyId(companyId); |
| | | addLog.setBizType(ApiShConst.API_SH_TYPE_BASIC); |
| | | addLog.setInterfaceId(ApiShConst.API_SH_1104); |
| | |
| | | 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; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | continue; |
| | | } |
| | | dto = new Dto1105(); |
| | | dto.setYgdm(depot.getId()); |
| | | dto.setYgdm(ApiShUtil.getGbDepotId(depot.getId()).substring(0, 25)); |
| | | dto.setYgmc(depot.getName()); |
| | | dto.setKqdm(depot.getId().substring(0, 24)); |
| | | dto.setGr(depot.getStorageMax() == null?"0.0":depot.getStorageMax() + ""); |
| | | dto.setKqdm(ApiShUtil.getGbDepotId(depot.getId()).substring(0, 21)); |
| | | dto.setGr(depot.getStorageMax() == null?"0.0": NumberUtil.keepPrecision(depot.getStorageMax()/1000,1) + ""); |
| | | dto.setJzsj(DateFormatUtils.format((depot.getStoreDate()==null?new Date():depot.getStoreDate()),"yyyy-MM-dd")); |
| | | |
| | | building = hApiShServiceImpl.getBuilding(companyId, depot.getBuildingId()); |
| | |
| | | |
| | | dto.setZhgxsj(DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss")); |
| | | //查询日志状态表,设置操作标志 |
| | | log = inteStatusLogService.getLogByBizId(companyId, ApiShConst.API_SH_1105 + "_" + depot.getId()); |
| | | log = inteStatusLogService.getLogByBizId(companyId, ApiShConst.API_SH_1105 + "_" + ApiShUtil.getGbDepotId(depot.getId())); |
| | | if(null == log){ |
| | | addLog = new InteStatusLog(); |
| | | addLog.setBizId(ApiShConst.API_SH_1105 + "_" + depot.getId()); |
| | | addLog.setBizId(ApiShConst.API_SH_1105 + "_" + ApiShUtil.getGbDepotId(depot.getId())); |
| | | addLog.setCompanyId(companyId); |
| | | addLog.setBizType(ApiShConst.API_SH_TYPE_BASIC); |
| | | addLog.setInterfaceId(ApiShConst.API_SH_1105); |
| | |
| | | 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")); |
| | | |
| | | 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); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.bstek.bdf2.core.model.DefaultDept; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.file.CoreFileService; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.FileInfo; |
| | |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | //获取单位信息 |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | List<FileInfo> listFiles = hApiShServiceImpl.listFiles(companyId, startTime, param.getEndTime()); |
| | | List<FileInfo> listFiles = hApiShServiceImpl.listFiles(companyId, param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (listFiles == null || listFiles.isEmpty()) { |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.CheckType; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.CheckItem; |
| | | import com.ld.igds.models.InteStatusLog; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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; |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1201); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询数据 |
| | | List<MQuality> dataList = hApiShServiceImpl.listQuality(companyId, param.getDepotId(), startTime, param.getEndTime()); |
| | | List<MQuality> dataList = hApiShServiceImpl.listQuality(companyId, param.getDepotId(), param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (dataList == null || dataList.isEmpty()) { |
| | |
| | | for (MQuality data : dataList) { |
| | | dto = new Dto1201(); |
| | | dto.setZjbgdbh(data.getId()); |
| | | dto.setHwbm(data.getDepotId()); |
| | | dto.setHwbm(ApiShUtil.getGbDepotId(data.getDepotId()) + "01"); |
| | | dto.setPznm(StringUtils.isEmpty(data.getFoodVariety())?"0":data.getFoodVariety()); |
| | | dto.setZznm(data.getDepotId().substring(0, 21)); |
| | | dto.setZznm(ApiShUtil.getGbDepotId(data.getDepotId()).substring(0, 21)); |
| | | dto.setSkdjbm(StringUtils.isEmpty(data.getFoodLevel())?"0":data.getFoodLevel()); |
| | | dto.setQysj(DateFormatUtils.format((data.getCheckTime() == null ? new Date() : data.getCheckTime()), "yyyy-MM-dd")); |
| | | dto.setRkrq(DateFormatUtils.format((data.getCheckTime() == null ? new Date() : data.getCheckTime()), "yyyy-MM-dd")); |
| | |
| | | dto.setShrxm(StringUtils.isEmpty(data.getUser())?"0":data.getUser()); |
| | | dto.setQyqy(StringUtils.isEmpty(data.getCheckArea())?"0":data.getCheckArea()); |
| | | dto.setQyrxm(StringUtils.isEmpty(data.getCheckUser())?"0":data.getCheckUser()); |
| | | // TODO |
| | | // dto.setYpsl(data.getCheckNum()==null?"0.0":(data.getCheckNum() + "")); |
| | | // dto.setDbsl(StringUtils.isEmpty(data.getCheckRepresent())?"0":data.getCheckRepresent()); |
| | | // dto.setYpdj(StringUtils.isEmpty(data.getCheckLevel())?"0":data.getCheckLevel()); |
| | | dto.setYpsl(data.getYpsl()==null?"0.0":(data.getYpsl() + "")); |
| | | dto.setDbsl(data.getDbsl() == null?"0.0":data.getDbsl() + ""); |
| | | dto.setYpdj(StringUtils.isEmpty(data.getYpdj())?"0":data.getYpdj()); |
| | | dto.setSfzcccnx(StringUtils.isEmpty(data.getNormalYear())?"0":data.getNormalYear()); |
| | | dto.setLsxz(StringUtils.isEmpty(data.getFoodLevel())?"0":data.getFoodLevel()); |
| | | dto.setBgbh(data.getId()); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.bstek.bdf2.core.model.DefaultDept; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.CheckItem; |
| | | import com.ld.igds.models.InteStatusLog; |
| | |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 质检数据明细信息接口 |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1202); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询质检数据 |
| | | List<MQuality> dataList = hApiShServiceImpl.listQuality(companyId, param.getDepotId(), startTime, param.getEndTime()); |
| | | List<MQuality> dataList = hApiShServiceImpl.listQuality(companyId, param.getDepotId(), param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (dataList == null || dataList.isEmpty()) { |
| | |
| | | dto.setZjbgdnm(data.getCheckId() + data.getCompanyId() + data.getStandardId()); |
| | | dto.setZjbgmxnm(data.getCheckId() + data.getCompanyId() + data.getStandardId()); |
| | | dto.setJyxmnm(data.getStandardId()); |
| | | // dto.setJybz(data.getStandardValue()); TODO |
| | | if(data.getUpperLimit() == null){ |
| | | data.setUpperLimit(0.0); |
| | | } |
| | | dto.setJybz(data.getUpperLimit() + " ~ " + data.getUpperLimit()); |
| | | dto.setJyjl(StringUtils.isEmpty(data.getRemarks())?"0":data.getRemarks()); |
| | | dto.setBz(StringUtils.isEmpty(data.getRemarks())?"0":data.getRemarks()); |
| | | |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.FoodVariety; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.Building; |
| | | import com.ld.igds.models.InoutNoticeOut; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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 org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 粮食出库通知单数据接口 |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1301); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询数据 |
| | | List<InoutNoticeOut> noticeOutList = hApiShServiceImpl.listNoticeOut(companyId, param.getDepotId(), startTime, param.getEndTime()); |
| | | List<InoutNoticeOut> noticeOutList = hApiShServiceImpl.listNoticeOut(companyId, param.getDepotId(), param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (noticeOutList == null || noticeOutList.isEmpty()) { |
| | |
| | | //封装数据信息 |
| | | for (InoutNoticeOut noticeOut : noticeOutList) { |
| | | dto = new Dto1301(); |
| | | dto.setZznm(noticeOut.getDepotId().substring(0, 21)); |
| | | dto.setZznm(ApiShUtil.getGbDepotId(noticeOut.getDepotId()).substring(0, 21)); |
| | | dto.setTzdbh(noticeOut.getId()); |
| | | dto.setTzdnm(noticeOut.getId()); |
| | | dto.setKhmc(StringUtils.isEmpty(noticeOut.getCustomerName())?"0":noticeOut.getCustomerName()); |
| | | dto.setKhnm(StringUtils.isEmpty(noticeOut.getCustomerId())?"0":noticeOut.getCustomerId()); |
| | | dto.setWlnm(StringUtils.isEmpty(noticeOut.getFoodVariety())?"0":noticeOut.getFoodVariety()); |
| | | dto.setWlmc(StringUtils.isEmpty(noticeOut.getFoodVariety())?"0":FoodVariety.getMsg(noticeOut.getFoodVariety())); |
| | | dto.setWlmc(StringUtils.isEmpty(noticeOut.getFoodVariety())?"0": FoodVariety.getMsg(noticeOut.getFoodVariety())); |
| | | dto.setWlbh(StringUtils.isEmpty(noticeOut.getFoodVariety())?"0":noticeOut.getFoodVariety()); |
| | | // dto.setWldjnm(StringUtils.isEmpty(noticeOut.getFoodLevel())?"0":noticeOut.getFoodLevel()); TODO |
| | | building = hApiShServiceImpl.getBuilding(companyId, noticeOut.getDepotId().substring(0, 25)); |
| | | // dto.setWldjnm(StringUtils.isEmpty(noticeOut.getFoodLevel())?"0":noticeOut.getFoodLevel()); |
| | | building = hApiShServiceImpl.getBuilding(companyId, noticeOut.getDepotId()); |
| | | if (null != building) { |
| | | dto.setCfbh(building.getId()); |
| | | dto.setCfnm(building.getId()); |
| | |
| | | dto.setCfbh("0"); |
| | | dto.setCfnm("0"); |
| | | } |
| | | dto.setHwbh(noticeOut.getDepotId()); |
| | | dto.setHwnm(noticeOut.getDepotId()); |
| | | dto.setHwbh(ApiShUtil.getGbDepotId(noticeOut.getDepotId()) + "01"); |
| | | dto.setHwnm(ApiShUtil.getGbDepotId(noticeOut.getDepotId()) + "01"); |
| | | dto.setTzdsl(String.valueOf(noticeOut.getTargetNumber())); |
| | | dto.setYwrq(DateFormatUtils.format(noticeOut.getCreateTime(), "yyyy-MM-dd HH:mm:ss")); |
| | | if("NONE".equals(noticeOut.getCompleteStatus())){ |
| | |
| | | package com.ld.igds.sh.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.inout.InoutConstant; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.InoutNoticeIn; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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 org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 粮食入库信息数据接口 |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1302); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询数据 |
| | | List<InoutRecord> inoutRecords = hApiShServiceImpl.listInoutRecord(companyId, param.getDepotId(), startTime, param.getEndTime(), InoutConstant.TYPE_IN); |
| | | List<InoutRecord> inoutRecords = hApiShServiceImpl.listInoutRecord(companyId, param.getDepotId(), param.getStartTime(), param.getEndTime(), InoutConstant.TYPE_IN); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (inoutRecords == null || inoutRecords.isEmpty()) { |
| | |
| | | for (InoutRecord inoutRecord : inoutRecords) { |
| | | dto = new Dto1302(); |
| | | dto.setYwdh("14" + inoutRecord.getId().substring(4, 14)); |
| | | dto.setHwbm(inoutRecord.getDepotId()); |
| | | dto.setHwbm(ApiShUtil.getGbDepotId(inoutRecord.getDepotId()) + "01"); |
| | | dto.setYwrq(DateFormatUtils.format(inoutRecord.getCompleteTime(),"yyyy-MM-dd HH:mm:ss")); |
| | | |
| | | dto.setCyr(StringUtils.isEmpty(inoutRecord.getUserName())?"0":inoutRecord.getUserName()); |
| | |
| | | dto.setMzjlsj(DateFormatUtils.format(inoutRecord.getFullWeightTime(),"yyyy-MM-dd HH:mm:ss")); |
| | | dto.setPz(inoutRecord.getEmptyWeight() + ""); |
| | | dto.setPzjlsj(DateFormatUtils.format(inoutRecord.getEmptyWeightTime(),"yyyy-MM-dd HH:mm:ss")); |
| | | // dto.setZjkl(inoutRecord.getDeSum() + ""); TODO |
| | | dto.setZjkl(inoutRecord.getDeCheck() + ""); |
| | | dto.setJz(inoutRecord.getSettleWeight() + ""); |
| | | dto.setCmsj(DateFormatUtils.format(inoutRecord.getCompleteTime(),"yyyy-MM-dd HH:mm:ss")); |
| | | dto.setCmqrmgryxm(StringUtils.isEmpty(inoutRecord.getCompleteUser())?"0":inoutRecord.getCompleteUser()); |
| | |
| | | } |
| | | dto.setDjmgryxm(StringUtils.isEmpty(inoutRecord.getRegisterUser())?"0":inoutRecord.getRegisterUser()); |
| | | dto.setRkdnm(StringUtils.isEmpty(inoutRecord.getNoticeId())?"0":inoutRecord.getNoticeId()); |
| | | dto.setZznm(inoutRecord.getDepotId().substring(0, 21)); |
| | | dto.setZznm(ApiShUtil.getGbDepotId(inoutRecord.getDepotId()).substring(0, 21)); |
| | | dto.setSxh(inoutRecord.getId().substring(10)); |
| | | if(InoutConstant.RECORD_STATUS_DEL.equals(inoutRecord.getRecordStatus())){ |
| | | if(InoutConstant.RECORD_STATUS_DEL.equals(inoutRecord.getRecordStatus()) || |
| | | "ERROR".equals(inoutRecord.getRecordStatus())){ |
| | | dto.setDjzt("4"); //已作废 |
| | | }else { |
| | | dto.setDjzt("2"); //入库完成 |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.CheckType; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.inout.InoutConstant; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.CheckItem; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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 org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 粮食入库检验信息数据接口 |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1303); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询入库数据 |
| | | List<InoutRecord> inoutRecords = hApiShServiceImpl.listInoutRecord(companyId, |
| | | param.getDepotId(), startTime, param.getEndTime(), InoutConstant.TYPE_IN); |
| | | param.getDepotId(), param.getStartTime(), param.getEndTime(), InoutConstant.TYPE_IN); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (inoutRecords == null || inoutRecords.isEmpty()) { |
| | |
| | | for (InoutRecord inoutRecord : inoutRecords) { |
| | | dto = new Dto1303(); |
| | | dto.setQydbh("14" + inoutRecord.getCheckId().substring(2)); |
| | | dto.setHwbm(inoutRecord.getDepotId()); |
| | | dto.setHwbm(ApiShUtil.getGbDepotId(inoutRecord.getDepotId()) + "01"); |
| | | dto.setYpbm("14" + inoutRecord.getCheckId().substring(2)); |
| | | dto.setQysj(DateFormatUtils.format(inoutRecord.getEmptyWeightTime(),"yyyy-MM-dd HH:mm:ss")); |
| | | dto.setQyrxm(StringUtils.isEmpty(inoutRecord.getCheckUser())?"0":inoutRecord.getCheckUser()); |
| | |
| | | package com.ld.igds.sh.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.inout.InoutConstant; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.InoutNoticeIn; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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 org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 粮食比如库结算信息数据接口 |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1304); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询数据 |
| | | List<InoutSettle> settleList = hApiShServiceImpl.listInoutSettle(companyId, param.getDepotId(), startTime, param.getEndTime(), InoutConstant.TYPE_IN); |
| | | List<InoutSettle> settleList = hApiShServiceImpl.listInoutSettle(companyId, param.getDepotId(), param.getStartTime(), param.getEndTime(), InoutConstant.TYPE_IN); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (settleList == null || settleList.isEmpty()) { |
| | |
| | | dto.setJsdbm(settle.getId()); |
| | | inoutRecord = hApiShServiceImpl.getInoutRecord(companyId, settle.getId()); |
| | | if(null != inoutRecord){ |
| | | dto.setHwbm(inoutRecord.getDepotId()); |
| | | dto.setZznm(inoutRecord.getDepotId().substring(0, 21)); |
| | | dto.setHwbm(ApiShUtil.getGbDepotId(inoutRecord.getDepotId()) + "01"); |
| | | dto.setZznm(ApiShUtil.getGbDepotId(inoutRecord.getDepotId()).substring(0, 21)); |
| | | }else { |
| | | dto.setHwbm("0"); |
| | | dto.setZznm("0"); |
| | |
| | | dto.setJsje(String.valueOf(settle.getPayMoney())); |
| | | dto.setJssj(DateFormatUtils.format(settle.getPayTime()==null?new Date():settle.getPayTime(),"yyyy-MM-dd HH:mm:ss")); |
| | | dto.setJsfs(StringUtils.isEmpty(settle.getPayType())?"0":settle.getPayType()); |
| | | // dto.setSkr(StringUtils.isEmpty(settle.getCustomerName())?"0":settle.getCustomerName()); TODO |
| | | dto.setSkr(StringUtils.isEmpty(settle.getPayee())?"0":settle.getPayee()); |
| | | dto.setYhkh(StringUtils.isEmpty(settle.getBankNum())?"0":settle.getBankNum()); |
| | | |
| | | dto.setSgjsdnm(settle.getId()); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.FoodVariety; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.inout.InoutConstant; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.InoutNoticeOut; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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 org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 粮食出库信息数据接口 |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1306); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询数据 |
| | | List<InoutRecord> inoutRecords = hApiShServiceImpl.listInoutRecord(companyId, param.getDepotId(), startTime, param.getEndTime(), InoutConstant.TYPE_OUT); |
| | | List<InoutRecord> inoutRecords = hApiShServiceImpl.listInoutRecord(companyId, param.getDepotId(), param.getStartTime(), param.getEndTime(), InoutConstant.TYPE_OUT); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (inoutRecords == null || inoutRecords.isEmpty()) { |
| | |
| | | for (InoutRecord inoutRecord : inoutRecords) { |
| | | dto = new Dto1306(); |
| | | dto.setYwdh("14" + inoutRecord.getId().substring(4, 14)); |
| | | dto.setHwbm(inoutRecord.getDepotId()); |
| | | dto.setHwbm(ApiShUtil.getGbDepotId(inoutRecord.getDepotId()) + "01"); |
| | | dto.setCktzdh(inoutRecord.getNoticeId()); |
| | | dto.setYwlx("1"); |
| | | dto.setYwrq(DateFormatUtils.format(inoutRecord.getCompleteTime(),"yyyy-MM-dd HH:mm:ss")); |
| | |
| | | dto.setDjmgryxm(StringUtils.isEmpty(inoutRecord.getFoodVariety())?"0":inoutRecord.getRegisterUser()); |
| | | dto.setCmqrmgryxm(StringUtils.isEmpty(inoutRecord.getCompleteUser())?"0":inoutRecord.getCompleteUser()); |
| | | dto.setNm(inoutRecord.getId()); |
| | | dto.setZznm(inoutRecord.getDepotId().substring(0, 21)); |
| | | dto.setZznm(ApiShUtil.getGbDepotId(inoutRecord.getDepotId()).substring(0, 21)); |
| | | dto.setDjbh(inoutRecord.getId()); |
| | | dto.setSxh(inoutRecord.getId().substring(10)); |
| | | if(InoutConstant.RECORD_STATUS_DEL.equals(inoutRecord.getRecordStatus()) ){ |
| | | if(InoutConstant.RECORD_STATUS_DEL.equals(inoutRecord.getRecordStatus()) || |
| | | "ERROR".equals(inoutRecord.getRecordStatus())){ |
| | | dto.setDjzt("4"); //已作废 |
| | | }else { |
| | | dto.setDjzt("2"); //出库完成 |
| | |
| | | dto.setLrfs("0"); |
| | | dto.setTzdbh(StringUtils.isEmpty(inoutRecord.getNoticeId())?"0":inoutRecord.getNoticeId()); |
| | | dto.setTzdnm(StringUtils.isEmpty(inoutRecord.getNoticeId())?"0":inoutRecord.getNoticeId()); |
| | | dto.setWlmc(StringUtils.isEmpty(inoutRecord.getFoodVariety())?"0":FoodVariety.getMsg(inoutRecord.getFoodVariety())); |
| | | dto.setWlmc(StringUtils.isEmpty(inoutRecord.getFoodVariety())?"0": FoodVariety.getMsg(inoutRecord.getFoodVariety())); |
| | | dto.setWlnm(StringUtils.isEmpty(inoutRecord.getFoodVariety())?"0":inoutRecord.getFoodVariety()); |
| | | dto.setWlbh(StringUtils.isEmpty(inoutRecord.getFoodVariety())?"0":inoutRecord.getFoodVariety()); |
| | | dto.setDz(StringUtils.isEmpty(inoutRecord.getUserAddress())?"0":inoutRecord.getUserAddress()); |
| | |
| | | dto.setJzqj(DateFormatUtils.format(inoutRecord.getCompleteTime(),"yyyy-MM-dd HH:mm:ss")); |
| | | dto.setNx(StringUtils.isEmpty(inoutRecord.getFoodYear())?"0":inoutRecord.getFoodYear()); |
| | | dto.setKcxznm(StringUtils.isEmpty(inoutRecord.getFoodType())?"0":inoutRecord.getFoodType()); |
| | | dto.setApclcf(inoutRecord.getDepotId()); |
| | | dto.setApclhw(inoutRecord.getDepotId()); |
| | | dto.setSjclcf(inoutRecord.getDepotId()); |
| | | dto.setSjclcfnm(inoutRecord.getDepotId()); |
| | | dto.setSjclhw(inoutRecord.getDepotId()); |
| | | dto.setSjclhwnm(inoutRecord.getDepotId()); |
| | | dto.setApclcf(ApiShUtil.getGbDepotId(inoutRecord.getDepotId())); |
| | | dto.setApclhw(ApiShUtil.getGbDepotId(inoutRecord.getDepotId())); |
| | | dto.setSjclcf(ApiShUtil.getGbDepotId(inoutRecord.getDepotId())); |
| | | dto.setSjclcfnm(ApiShUtil.getGbDepotId(inoutRecord.getDepotId())); |
| | | dto.setSjclhw(ApiShUtil.getGbDepotId(inoutRecord.getDepotId())); |
| | | dto.setSjclhwnm(ApiShUtil.getGbDepotId(inoutRecord.getDepotId())); |
| | | dto.setBgy(StringUtils.isEmpty(inoutRecord.getHandleUser())?"0":inoutRecord.getHandleUser()); |
| | | dto.setQtkl(inoutRecord.getDeOther() + ""); |
| | | dto.setLhnd(StringUtils.isEmpty(inoutRecord.getFoodYear())?"0":inoutRecord.getFoodYear()); |
| | |
| | | package com.ld.igds.sh.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.inout.InoutConstant; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.InoutNoticeOut; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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 org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 粮食出库结算信息数据接口 |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1308); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询数据 |
| | | List<InoutSettle> settleList = hApiShServiceImpl.listInoutSettle(companyId, param.getDepotId(), startTime, param.getEndTime(), InoutConstant.TYPE_OUT); |
| | | List<InoutSettle> settleList = hApiShServiceImpl.listInoutSettle(companyId, param.getDepotId(), param.getStartTime(), param.getEndTime(), InoutConstant.TYPE_OUT); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (settleList == null || settleList.isEmpty()) { |
| | |
| | | dto.setFkr(settle.getPayUser()); |
| | | inoutRecord = hApiShServiceImpl.getInoutRecord(companyId, settle.getId()); |
| | | if(null != inoutRecord){ |
| | | dto.setZznm(inoutRecord.getDepotId().substring(0, 21)); |
| | | dto.setZznm(ApiShUtil.getGbDepotId(inoutRecord.getDepotId()).substring(0, 21)); |
| | | }else { |
| | | dto.setZznm("0"); |
| | | } |
| | |
| | | dto.setJsyxm(StringUtils.isEmpty(settle.getPayUser())?"0":settle.getPayUser()); |
| | | dto.setShrxm(StringUtils.isEmpty(settle.getPayUser())?"0":settle.getPayUser()); |
| | | dto.setShsj(DateFormatUtils.format(settle.getPayTime(),"yyyy-MM-dd HH:mm:ss")); |
| | | // dto.setKhmc(StringUtils.isEmpty(settle.getCustomerName())?"0":settle.getCustomerName()); TODO |
| | | dto.setKhmc(StringUtils.isEmpty(settle.getPayee())?"0":settle.getPayee()); |
| | | dto.setZdrxm(StringUtils.isEmpty(settle.getPayUser())?"0":settle.getPayUser()); |
| | | dto.setZdsj(DateFormatUtils.format(settle.getPayTime(),"yyyy-MM-dd HH:mm:ss")); |
| | | dto.setJsfsmc(StringUtils.isEmpty(settle.getPayType())?"0":settle.getPayType()); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.bstek.bdf2.core.model.DefaultDept; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.models.InoutStockChange; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.sh.dto.ApiResponse; |
| | | import com.ld.igds.sh.dto.Dto1309; |
| | | import com.ld.igds.sh.param.ApiRequest; |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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.sys.service.SysDeptService; |
| | |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1309); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询数据 |
| | | List<InoutStockChange> dataList = hApiShServiceImpl.listStockChange(companyId, param.getDepotId(), startTime, param.getEndTime()); |
| | | List<InoutStockChange> dataList = hApiShServiceImpl.listStockChange(companyId, param.getDepotId(), param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (dataList == null || dataList.isEmpty()) { |
| | |
| | | dto.setDcdw(dept.getName()); |
| | | } |
| | | dto.setPzbm(StringUtils.isEmpty(data.getPlanCode())?"0":data.getFoodVariety()); |
| | | dto.setDchwbm(StringUtils.isEmpty(data.getDepotIdOut())?"0":data.getDepotIdOut()); |
| | | dto.setDrhwbm(StringUtils.isEmpty(data.getDepotIdIn())?"0":data.getDepotIdIn()); |
| | | dto.setDchwbm(StringUtils.isEmpty(data.getDepotIdOut())?"0": ApiShUtil.getGbDepotId(data.getDepotIdOut()) + "01"); |
| | | dto.setDrhwbm(StringUtils.isEmpty(data.getDepotIdIn())?"0":ApiShUtil.getGbDepotId(data.getDepotIdIn()) + "01"); |
| | | dto.setDcrq(DateFormatUtils.format((data.getChangeDate()==null?new Date():data.getChangeDate()),"yyyy-MM-dd")); |
| | | dto.setDcsl(data.getNumber()==null?"0.0":data.getNumber() + ""); |
| | | |
| | |
| | | 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 org.apache.commons.lang3.time.DateFormatUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 粮食库存数据接口 |
| | |
| | | DicArea dicArea; |
| | | for (Depot depot : depotList) { |
| | | dto = new Dto1310(); |
| | | dto.setHwbm(depot.getId()); |
| | | dto.setHwbm(ApiShUtil.getGbDepotId(depot.getId()) + "01"); |
| | | dto.setLspzbm(StringUtils.isEmpty(depot.getFoodVariety())?"0":depot.getFoodVariety()); |
| | | dto.setLsxzbm(StringUtils.isEmpty(depot.getFoodType())?"0":depot.getFoodType()); |
| | | dto.setDjbm(StringUtils.isEmpty(depot.getFoodLevel())?"0":depot.getFoodLevel()); |
| | |
| | | dicArea = areaService.listDicAreaByName(depot.getFoodLocation()); |
| | | dto.setCd(dicArea == null ? "310114": dicArea.getCode()); |
| | | dto.setGoodscode(dicArea == null ? "310114": dicArea.getCode()); |
| | | dto.setLqgsdwbm(depot.getId().substring(0,18)); |
| | | dto.setLqgsdwbm(ApiShUtil.getGbDepotId(depot.getId()).substring(0,18)); |
| | | dto.setGlfs("01"); |
| | | dto.setScdd("1"); |
| | | dto.setClfs(StringUtils.isEmpty(depot.getStoreType())?"1":depot.getStoreType()); |
| | |
| | | dto.setSjsl(depot.getStorageReal()==null?"0.0":depot.getStorageReal() + ""); |
| | | dto.setJjsl(depot.getStorageReal()==null?"0.0":depot.getStorageReal() + ""); |
| | | |
| | | dto.setNm(depot.getId().substring(0, 21)); |
| | | dto.setZznm(depot.getId().substring(0, 21)); |
| | | dto.setPzmc(StringUtils.isEmpty(depot.getFoodVariety())?"0":FoodVariety.getMsg(depot.getFoodVariety())); |
| | | dto.setNm(ApiShUtil.getGbDepotId(depot.getId()).substring(0, 21)); |
| | | dto.setZznm(ApiShUtil.getGbDepotId(depot.getId()).substring(0, 21)); |
| | | dto.setPzmc(StringUtils.isEmpty(depot.getFoodVariety())?"0": FoodVariety.getMsg(depot.getFoodVariety())); |
| | | dto.setPznm(StringUtils.isEmpty(depot.getFoodVariety())?"0":depot.getFoodVariety()); |
| | | building = hApiShServiceImpl.getBuilding(companyId, depot.getId()); |
| | | if(building != null){ |
| | |
| | | |
| | | dto.setZhgxsj(DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss")); |
| | | //查询日志状态表,设置操作标志 |
| | | log = inteStatusLogService.getLogByBizId(companyId, ApiShConst.API_SH_1310 + "_" + depot.getId()); |
| | | log = inteStatusLogService.getLogByBizId(companyId, ApiShConst.API_SH_1310 + "_" + ApiShUtil.getGbDepotId(depot.getId())); |
| | | if(null == log){ |
| | | addLog = new InteStatusLog(); |
| | | addLog.setBizId(ApiShConst.API_SH_1310 + "_" + depot.getId()); |
| | | addLog.setBizId(ApiShConst.API_SH_1310 + "_" + ApiShUtil.getGbDepotId(depot.getId())); |
| | | addLog.setCompanyId(companyId); |
| | | addLog.setBizType(ApiShConst.API_SH_TYPE_INOUT); |
| | | addLog.setInterfaceId(ApiShConst.API_SH_1310); |
| | |
| | | package com.ld.igds.sh.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.models.InoutLossOver; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.sh.dto.ApiResponse; |
| | | import com.ld.igds.sh.dto.Dto1311; |
| | | import com.ld.igds.sh.param.ApiRequest; |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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 org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 损溢单数据接口 |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1311); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询数据 |
| | | List<InoutLossOver> dataList = hApiShServiceImpl.listLossOver(companyId, |
| | | param.getDepotId(), startTime, param.getEndTime()); |
| | | param.getDepotId(), param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (dataList == null || dataList.isEmpty()) { |
| | |
| | | for (InoutLossOver data : dataList) { |
| | | dto1311 = new Dto1311(); |
| | | dto1311.setSydbh(data.getId()); |
| | | dto1311.setHwbm(data.getDepotId()); |
| | | dto1311.setHwbm(ApiShUtil.getGbDepotId(data.getDepotId()) + "01"); |
| | | dto1311.setYwrq(DateFormatUtils.format((data.getSubmitTime() == null ? new Date() : data.getSubmitTime()), "yyyy-MM-dd")); |
| | | dto1311.setSylx("3"); |
| | | if ("LOSS".equals(data.getType())) { |
| | |
| | | dto1311.setRksj(DateFormatUtils.format((data.getSubmitTime() == null ? new Date() : data.getSubmitTime()), "yyyy-MM-dd HH:mm:ss")); |
| | | |
| | | dto1311.setSyyy(StringUtils.isEmpty(data.getRemark()) ? "0" : data.getRemark()); |
| | | dto1311.setNm(data.getDepotId().substring(0, 21)); |
| | | dto1311.setZznm(data.getDepotId().substring(0, 21)); |
| | | dto1311.setNm(ApiShUtil.getGbDepotId(data.getDepotId()).substring(0, 21)); |
| | | dto1311.setZznm(ApiShUtil.getGbDepotId(data.getDepotId()).substring(0, 21)); |
| | | dto1311.setSydjdbh(data.getId()); |
| | | // dto1311.setWlbh(StringUtils.isEmpty(data.getFoodVariety()) ? "0" : data.getFoodVariety()); TODO |
| | | // dto1311.setWlbh(StringUtils.isEmpty(data.getFoodVariety()) ? "0" : data.getFoodVariety()); |
| | | dto1311.setRknx(DateFormatUtils.format((data.getSubmitTime() == null ? new Date() : data.getSubmitTime()), "yyyy")); |
| | | dto1311.setNx(DateFormatUtils.format((data.getSubmitTime() == null ? new Date() : data.getSubmitTime()), "yyyy")); |
| | | dto1311.setLrsj(DateFormatUtils.format((data.getSubmitTime() == null ? new Date() : data.getSubmitTime()), "yyyy-MM-dd HH:mm:ss")); |
| | |
| | | package com.ld.igds.sh.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.InoutVarietyChange; |
| | | import com.ld.igds.models.InteStatusLog; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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.RedisUtil; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.commons.lang3.time.DateFormatUtils; |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 粮食性质转变数据接口 |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1312); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询温湿度信息,即粮情信息 |
| | | List<InoutVarietyChange> dataList = hApiShServiceImpl.listFoodVarietyChange(companyId, |
| | | param.getDepotId(), startTime, param.getEndTime()); |
| | | param.getDepotId(), param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (dataList == null || dataList.isEmpty()) { |
| | |
| | | for (InoutVarietyChange variety : dataList) { |
| | | dto1312 = new Dto1312(); |
| | | dto1312.setXzzbdbh(variety.getId()); |
| | | dto1312.setHwbm(variety.getDepotId()); |
| | | dto1312.setHwbm(ApiShUtil.getGbDepotId(variety.getDepotId()) + "01"); |
| | | dto1312.setLssl(String.valueOf(variety.getNumber())); |
| | | dto1312.setHzsl(String.valueOf(variety.getChangeNumber())); |
| | | dto1312.setBzwh(StringUtils.isEmpty(variety.getApprovalId())?"0":variety.getApprovalId()); |
| | |
| | | package com.ld.igds.sh.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.Grain; |
| | | import com.ld.igds.models.InteStatusLog; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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.DateUtil; |
| | | import com.ld.igds.util.RedisUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 温湿度检测接口 |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1401); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询温湿度信息,即粮情信息 |
| | | List<Grain> dataList = hApiShServiceImpl.listGrain(companyId, |
| | | param.getDepotId(), startTime, param.getEndTime()); |
| | | param.getDepotId(), param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (dataList == null || dataList.isEmpty()) { |
| | |
| | | //封装数据信息 |
| | | for (Grain grain : dataList) { |
| | | dto1401 = new Dto1401(); |
| | | dto1401.setLqjcbm(grain.getDepotId() + grain.getBatchId()); |
| | | dto1401.setLqjcbm(ApiShUtil.getGbDepotId(grain.getDepotId()) + grain.getBatchId()); |
| | | dto1401.setJcsj(DateFormatUtils.format(grain.getReceiveDate(), "yyyy-MM-dd HH:mm:ss")); |
| | | |
| | | dto1401.setHwbm(grain.getDepotId()); |
| | | dto1401.setHwbm(ApiShUtil.getGbDepotId(grain.getDepotId()) + "01"); |
| | | dto1401.setCfww(String.valueOf(grain.getTempOut())); |
| | | dto1401.setCfws(String.valueOf(grain.getHumidityOut())); |
| | | dto1401.setCfnw(String.valueOf(grain.getTempIn())); |
| | |
| | | } else { |
| | | dto1401.setLswdzjh(getPointList2(grain.getPoints(), grain.getCable(), grain.getCableCir())); |
| | | } |
| | | dto1401.setNm(grain.getDepotId().substring(0, 21)); |
| | | dto1401.setZznm(grain.getDepotId().substring(0, 21)); |
| | | dto1401.setCfnm(grain.getDepotId().substring(0, 21)); |
| | | dto1401.setNm(ApiShUtil.getGbDepotId(grain.getDepotId()).substring(0, 21)); |
| | | dto1401.setZznm(ApiShUtil.getGbDepotId(grain.getDepotId()).substring(0, 21)); |
| | | dto1401.setCfnm(ApiShUtil.getGbDepotId(grain.getDepotId()).substring(0, 25)); |
| | | dto1401.setDqwd(String.valueOf(grain.getTempOut())); |
| | | dto1401.setDqsd(String.valueOf(grain.getHumidityOut())); |
| | | dto1401.setCnwd(String.valueOf(grain.getTempIn())); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.Building; |
| | | import com.ld.igds.models.DepotConf; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.sh.dto.ApiResponse; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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 org.apache.commons.lang3.time.DateFormatUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | //封装数据信息 |
| | | for (DepotConf depotConf : dataList) { |
| | | dto1402 = new Dto1402(); |
| | | dto1402.setNm(depotConf.getDepotId().substring(0, 21)); |
| | | dto1402.setZznm(depotConf.getDepotId().substring(0, 21)); |
| | | dto1402.setCfnm(depotConf.getDepotId()); |
| | | dto1402.setCfbh(depotConf.getDepotId()); |
| | | dto1402.setNm(ApiShUtil.getGbDepotId(depotConf.getDepotId()).substring(0, 21)); |
| | | dto1402.setZznm(ApiShUtil.getGbDepotId(depotConf.getDepotId()).substring(0, 21)); |
| | | dto1402.setCfnm(ApiShUtil.getGbDepotId(depotConf.getDepotId()).substring(0, 25)); |
| | | dto1402.setCfbh(ApiShUtil.getGbDepotId(depotConf.getDepotId())); |
| | | String cableRule = depotConf.getCableRule(); |
| | | String[] split = cableRule.split("-"); |
| | | dto1402.setDlcs(split[0]); |
| | |
| | | log = inteStatusLogService.getLogByBizId(companyId, ApiShConst.API_SH_1402 + "_" + depotConf.getCompanyId() + depotConf.getDepotId()); |
| | | if(null == log){ |
| | | addLog = new InteStatusLog(); |
| | | addLog.setBizId(ApiShConst.API_SH_1402 + "_" + depotConf.getCompanyId() + depotConf.getDepotId()); |
| | | addLog.setBizId(ApiShConst.API_SH_1402 + "_" + depotConf.getCompanyId() + ApiShUtil.getGbDepotId(depotConf.getDepotId())); |
| | | addLog.setCompanyId(companyId); |
| | | addLog.setBizType(ApiShConst.API_SH_TYPE_TASK); |
| | | addLog.setInterfaceId(ApiShConst.API_SH_1402); |
| | |
| | | package com.ld.igds.sh.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.Building; |
| | | import com.ld.igds.models.InteStatusLog; |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1403); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询通风信息 |
| | | List<MAreationData> dataList = hApiShServiceImpl.listAreationData(companyId, |
| | | param.getDepotId(), startTime, param.getEndTime()); |
| | | param.getDepotId(), param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (dataList == null || dataList.isEmpty()) { |
| | |
| | | package com.ld.igds.sh.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.DrugLog; |
| | | import com.ld.igds.models.InteStatusLog; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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; |
| | |
| | | private InteStatusLogService inteStatusLogService; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | @Override |
| | | public String getInterfaceId() { |
| | | return ApiShConst.API_SH_1404; |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1404); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if (null == startTime) { |
| | | startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询熏蒸作业信息 |
| | | List<DrugLog> dataList = hApiShServiceImpl.listDrugLog(companyId, |
| | | param.getDepotId(), startTime, param.getEndTime()); |
| | | param.getDepotId(), param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (dataList == null || dataList.isEmpty()) { |
| | |
| | | //封装数据信息 |
| | | for (DrugLog data : dataList) { |
| | | dto = new Dto1404(); |
| | | dto.setXzzybm(data.getDepotId().substring(0, 25) + data.getId()); |
| | | dto.setCfdm(data.getDepotId().substring(0, 25)); |
| | | dto.setXzkssj(DateFormatUtils.format(data.getStart() == null ? (new Date()) : data.getStart(), "yyyy-MM-dd")); |
| | | dto.setXzjssj(DateFormatUtils.format(data.getEnd() == null ? (new Date()) : data.getEnd(), "yyyy-MM-dd")); |
| | | dto.setHcjcdh(StringUtils.isEmpty(data.getPestBatchId()) ? "0" : data.getPestBatchId()); |
| | | dto.setDjcxz(data.getNum() == null ? "0" : data.getNum() + ""); |
| | | dto.setCgxzfs(StringUtils.isEmpty(data.getMode()) ? "0" : data.getMode()); |
| | | dto.setHlxzfs(StringUtils.isEmpty(data.getRecirMode()) ? "0" : data.getRecirMode()); |
| | | dto.setYjmc(StringUtils.isEmpty(data.getDrugName()) ? "0" : data.getDrugName()); |
| | | dto.setNd(data.getConcentration() == null ? "0" : data.getConcentration() + ""); |
| | | dto.setLddwyyl(data.getGrainDose() == null ? "0" : data.getGrainDose() + ""); |
| | | dto.setKjdwyyl(data.getSpaceDose() == null ? "0" : data.getSpaceDose() + ""); |
| | | dto.setZyyl(data.getDose() == null ? "0" : data.getDose() + ""); |
| | | dto.setSqrq(DateFormatUtils.format(data.getVentilateTime() == null ? (new Date()) : data.getVentilateTime(), "yyyy-MM-dd")); |
| | | dto.setSqff(StringUtils.isEmpty(data.getVentilateMethod()) ? "0" : data.getVentilateMethod()); |
| | | dto.setSqjsslhqnd(data.getAfterPh3() == null ? "0.0" : data.getAfterPh3() + ""); |
| | | dto.setXzxgpj(StringUtils.isEmpty(data.getEvaluate()) ? "0" : data.getEvaluate()); |
| | | dto.setCzsjff(StringUtils.isEmpty(data.getCzsjff()) ? "0" : data.getCzsjff()); |
| | | dto.setCzclcs(StringUtils.isEmpty(data.getCzclcs()) ? "0" : data.getCzclcs()); |
| | | // dto.setXzzyry(StringUtils.isEmpty(data.getUser())?"0":data.getUser()); |
| | | dto.setXzzybm(ApiShUtil.getGbDepotId(data.getDepotId()).substring(0, 25) + data.getId()); |
| | | dto.setCfdm(ApiShUtil.getGbDepotId(data.getDepotId()).substring(0, 25)); |
| | | dto.setXzkssj(DateFormatUtils.format(data.getStart()==null?(new Date()):data.getStart(),"yyyy-MM-dd")); |
| | | dto.setXzjssj(DateFormatUtils.format(data.getEnd()==null?(new Date()):data.getEnd(),"yyyy-MM-dd")); |
| | | dto.setHcjcdh(StringUtils.isEmpty(data.getPestBatchId())?"0":data.getPestBatchId()); |
| | | dto.setDjcxz(data.getNum()==null?"0":data.getNum() + ""); |
| | | dto.setCgxzfs(StringUtils.isEmpty(data.getMode())?"0":data.getMode()); |
| | | dto.setHlxzfs(StringUtils.isEmpty(data.getRecirMode())?"0":data.getRecirMode()); |
| | | dto.setYjmc(StringUtils.isEmpty(data.getDrugName())?"0":data.getDrugName()); |
| | | dto.setNd(data.getConcentration()==null?"0":data.getConcentration() + ""); |
| | | dto.setLddwyyl(data.getGrainDose()==null?"0":data.getGrainDose()+""); |
| | | dto.setKjdwyyl(data.getSpaceDose()==null?"0":data.getSpaceDose()+""); |
| | | dto.setZyyl(data.getDose()==null?"0":data.getDose()+""); |
| | | dto.setSqrq(DateFormatUtils.format(data.getVentilateTime()==null?(new Date()):data.getVentilateTime(),"yyyy-MM-dd")); |
| | | dto.setSqff(StringUtils.isEmpty(data.getVentilateMethod())?"0":data.getVentilateMethod()); |
| | | dto.setSqjsslhqnd(data.getAfterPh3()==null?"0.0":data.getAfterPh3() + ""); |
| | | dto.setXzxgpj(StringUtils.isEmpty(data.getEvaluate())?"0":data.getEvaluate()); |
| | | dto.setCzsjff(StringUtils.isEmpty(data.getCzsjff())?"0":data.getCzsjff()); |
| | | dto.setCzclcs(StringUtils.isEmpty(data.getCzclcs())?"0":data.getCzclcs()); |
| | | dto.setXzzyry(StringUtils.isEmpty(data.getUser())?"0":data.getUser()); |
| | | |
| | | dto.setZhgxsj(DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss")); |
| | | //查询日志状态表,设置操作标志 |
| | | log = inteStatusLogService.getLogByBizId(companyId, ApiShConst.API_SH_1404 + "_" + data.getId()); |
| | | if (null == log) { |
| | | if(null == log){ |
| | | addLog = new InteStatusLog(); |
| | | addLog.setBizId(ApiShConst.API_SH_1404 + "_" + data.getId()); |
| | | addLog.setCompanyId(companyId); |
| | |
| | | addLog.setStatus(ApiShConst.API_SH_STATUS_SUCCESS); |
| | | |
| | | inteStatusLogService.addInteStatusLog(addLog); |
| | | } else { |
| | | }else { |
| | | dto.setCzbz(ApiShConst.API_SH_U); |
| | | } |
| | | list.add(dto); |
| | |
| | | package com.ld.igds.sh.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.models.Pest; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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 org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1405); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -100); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询虫害检测信息 |
| | | List<Pest> dataList = hApiShServiceImpl.listPest(companyId, |
| | | param.getDepotId(), startTime, param.getEndTime()); |
| | | param.getDepotId(), param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (dataList == null || dataList.isEmpty()) { |
| | |
| | | dto = new Dto1405(); |
| | | dto.setHcjcdh(data.getBatchId()); |
| | | dto.setJcsj(DateFormatUtils.format(data.getReceiveDate(),"yyyy-MM-dd HH:mm:ss")); |
| | | dto.setHwdm(data.getDepotId()); |
| | | dto.setHwdm(ApiShUtil.getGbDepotId(data.getDepotId()) + "01"); |
| | | dto.setJchcff(StringUtils.isEmpty(data.getMethod())?"0":data.getMethod()); |
| | | dto.setFsbw(StringUtils.isEmpty(data.getPosition())?"0":data.getPosition()); |
| | | dto.setHczl(StringUtils.isEmpty(data.getPestType())?"0":data.getPestType()); |
| | |
| | | package com.ld.igds.sh.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.Gas; |
| | | import com.ld.igds.models.InteStatusLog; |
| | |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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 org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1408); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -100); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询气体信息 |
| | | List<Gas> dataList = hApiShServiceImpl.listGas(companyId, |
| | | param.getDepotId(), startTime, param.getEndTime()); |
| | | param.getDepotId(), param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if (dataList == null || dataList.isEmpty()) { |
| | |
| | | dto = new Dto1408(); |
| | | dto.setQtndjcdh(data.getBatchId()); |
| | | dto.setJcsj(DateFormatUtils.format(data.getReceiveDate(), "yyyy-MM-dd HH:mm:ss")); |
| | | dto.setHwdm(data.getDepotId()); |
| | | dto.setHwdm(ApiShUtil.getGbDepotId(data.getDepotId()) + "01"); |
| | | dto.setYqhlzjh(getPointByType(data.getPoints(), 2)); |
| | | dto.setLhqndzjh(getPointByType(data.getPoints(), 3)); |
| | | |
| | |
| | | package com.ld.igds.sh.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.m.InoutManageUtil; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.models.InoutPlan; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.sh.dto.ApiResponse; |
| | | import com.ld.igds.sh.dto.Dto1501; |
| | | import com.ld.igds.sh.param.ApiRequest; |
| | |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 轮换计划信息数据接口 |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1501); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -100); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询计划信息 |
| | | List<InoutPlan> dataList = hApiShServiceImpl.listPlan(companyId, |
| | | InoutManageUtil.PLAN_TYPE_3, startTime, param.getEndTime()); |
| | | InoutManageUtil.PLAN_TYPE_3, param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if(dataList == null || dataList.isEmpty()){ |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.bstek.bdf2.core.model.DefaultDept; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.m.InoutManageUtil; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.models.InoutPlan; |
| | | import com.ld.igds.models.InoutPlanDetail; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.sh.dto.ApiResponse; |
| | | import com.ld.igds.sh.dto.Dto1502; |
| | | import com.ld.igds.sh.param.ApiRequest; |
| | | import com.ld.igds.sh.param.BaseParam; |
| | | 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 com.ld.igds.util.RedisUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 轮换计划明细信息数据接口 |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1502); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -100); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询轮换计划信息 |
| | | List<InoutPlan> planList = hApiShServiceImpl.listPlan(companyId, |
| | | InoutManageUtil.PLAN_TYPE_3, startTime, param.getEndTime()); |
| | | InoutManageUtil.PLAN_TYPE_3, param.getStartTime(), param.getEndTime()); |
| | | if (planList == null || planList.isEmpty()) { |
| | | return RespUtil.error(RespCodeEnum.CODE_2000.getCode(), request); |
| | | } |
| | |
| | | dto1502.setDjbm(StringUtils.isEmpty(planDetail.getFoodLevel())?"0":planDetail.getFoodLevel()); |
| | | dto1502.setLsxzbm(StringUtils.isEmpty(planDetail.getFoodType())?"0":planDetail.getFoodType()); |
| | | dto1502.setShnd(StringUtils.isEmpty(planDetail.getYear())?"0":planDetail.getYear()); |
| | | dto1502.setLhhwdm(StringUtils.isEmpty(planDetail.getDepotId())?"0":planDetail.getDepotId()); |
| | | dto1502.setLhsl(planDetail.getPlanNum()==null?"0.0":planDetail.getPlanNum()+""); |
| | | dto1502.setLhhwdm(StringUtils.isEmpty(ApiShUtil.getGbDepotId(planDetail.getDepotId()))?"0":ApiShUtil.getGbDepotId(planDetail.getDepotId())); |
| | | dto1502.setLhsl(planDetail.getPlanNum()==null?"0.0": NumberUtil.keepPrecision(planDetail.getPlanNum(),1)+""); |
| | | dto1502.setLhlx(StringUtils.isEmpty(planDetail.getType())?"0":planDetail.getType()); |
| | | dto1502.setJhkq(dept.getCode()); |
| | | if("1".equals(planDetail.getType())){ |
| | | dto1502.setLcsl(planDetail.getPlanNum() + ""); |
| | | dto1502.setLcsl(NumberUtil.keepPrecision(planDetail.getPlanNum(),1) + ""); |
| | | } |
| | | if("2".equals(planDetail.getType())){ |
| | | dto1502.setLrsl(planDetail.getPlanNum() + ""); |
| | | dto1502.setLrsl(NumberUtil.keepPrecision(planDetail.getPlanNum(),1) + ""); |
| | | } |
| | | dto1502.setZznm(dept.getCode()); |
| | | |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.bstek.bdf2.core.model.DefaultDept; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.models.InoutContract; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.sh.dto.ApiResponse; |
| | | import com.ld.igds.sh.dto.Dto1503; |
| | | import com.ld.igds.sh.param.ApiRequest; |
| | |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 合同信息数据接口 |
| | |
| | | private HApiShServiceImpl hApiShServiceImpl; |
| | | @Autowired |
| | | private InteStatusLogService inteStatusLogService; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | @Override |
| | | public String getInterfaceId() { |
| | | return ApiShConst.API_SH_1503; |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1503); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -100); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询合同信息 |
| | | List<InoutContract> dataList = hApiShServiceImpl.listContract(companyId, |
| | | startTime, param.getEndTime()); |
| | | param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if(dataList == null || dataList.isEmpty()){ |
| | |
| | | |
| | | dto1503.setQddd(StringUtils.isEmpty(contract.getSignAddress())?"0":contract.getSignAddress()); |
| | | if(contract.getPrice() != null){ |
| | | dto1503.setHtdj(String.valueOf(contract.getPrice())); |
| | | dto1503.setHtdj(String.valueOf(contract.getPrice()*1000)); |
| | | } |
| | | if(contract.getMoney() != null){ |
| | | dto1503.setHtzje(String.valueOf(contract.getMoney())); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.bstek.bdf2.core.model.DefaultDept; |
| | | import com.ld.igds.constant.RedisConst; |
| | | import com.ld.igds.log.service.InteStatusLogService; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.models.InoutContract; |
| | | import com.ld.igds.models.InteStatusLog; |
| | | import com.ld.igds.sh.dto.ApiResponse; |
| | | import com.ld.igds.sh.dto.Dto1504; |
| | | import com.ld.igds.sh.param.ApiRequest; |
| | |
| | | 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.RedisUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | private HApiShServiceImpl hApiShServiceImpl; |
| | | @Autowired |
| | | private InteStatusLogService inteStatusLogService; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | @Override |
| | | public String getInterfaceId() { |
| | | return ApiShConst.API_SH_1504; |
| | |
| | | |
| | | String companyId = ContextUtil.getDefaultCompanyId(); |
| | | |
| | | String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1504); |
| | | Date startTime = (Date) redisUtil.get(key); |
| | | if(null == startTime){ |
| | | startTime = DateUtils.addDays(param.getEndTime(), -100); |
| | | // String key = RedisConst.buildKey(companyId, ApiShConst.API_SH_1112); |
| | | // Date startTime = (Date) redisUtil.get(key); |
| | | // if(null == startTime){ |
| | | // startTime = DateUtils.addDays(param.getEndTime(), -30); |
| | | // } |
| | | // redisUtil.set(key, param.getEndTime()); |
| | | if(null == param.getStartTime()){ |
| | | param.setStartTime(DateUtils.addDays(param.getEndTime(), -1)); |
| | | } |
| | | redisUtil.set(key, param.getEndTime()); |
| | | |
| | | //查询合同信息 |
| | | List<InoutContract> dataList = hApiShServiceImpl.listContract(companyId, |
| | | startTime, param.getEndTime()); |
| | | param.getStartTime(), param.getEndTime()); |
| | | |
| | | //响应数据为空则直接返回响应码2000 |
| | | if(dataList == null || dataList.isEmpty()){ |
| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.hibernate.Session; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | args.put("companyId", companyId); |
| | | args.put("progress", InoutConstant.PROGRESS_RECORD); |
| | | args.put("recordStatus1", InoutConstant.RECORD_STATUS_DEL); |
| | | args.put("recordStatus2", "ERROR"); |
| | | |
| | | if(StringUtils.isNotEmpty(depotId)){ |
| | | hql += " and depotId =:depotId"; |
| | |
| | | args.put("companyId", companyId); |
| | | args.put("progress", InoutConstant.PROGRESS_RECORD); |
| | | args.put("recordStatus1", InoutConstant.RECORD_STATUS_DEL); |
| | | args.put("recordStatus2", "ERROR"); |
| | | |
| | | if(null != startTime){ |
| | | hql += " and registerTime >:startTime"; |
| | |
| | | @Component |
| | | public class ApiShUtil { |
| | | |
| | | /** |
| | | * 仓库状态转为货位状态 |
| | | * @param depotStatus |
| | | * @return |
| | | */ |
| | | public String getDepotStatus(String depotStatus){ |
| | | if(DepotStatus.STATUS_1.getCode().equals(depotStatus)){ |
| | | return "1"; |
| | | } |
| | | if(DepotStatus.STATUS_3.getCode().equals(depotStatus)){ |
| | | return "3"; |
| | | } |
| | | if(DepotStatus.STATUS_2.getCode().equals(depotStatus)){ |
| | | return "2"; |
| | | } |
| | | if(DepotStatus.STATUS_4.getCode().equals(depotStatus)){ |
| | | return "4"; |
| | | } |
| | | return "9"; |
| | | } |
| | | |
| | | public static String getGbDepotId(String depotId){ |
| | | switch (depotId) { |
| | | case "0P01": |
| | | return "91310114703439394M0020001001"; |
| | | case "0P02": |
| | | return "91310114703439394M0020002001"; |
| | | case "0P03": |
| | | return "91310114703439394M0020003001"; |
| | | case "0P04": |
| | | return "91310114703439394M0020004001"; |
| | | case "0P05": |
| | | return "91310114703439394M0020005001"; |
| | | case "0P06": |
| | | return "91310114703439394M0020006001"; |
| | | case "0P07": |
| | | return "91310114703439394M0020007001"; |
| | | case "0P08": |
| | | return "91310114703439394M0020005001"; |
| | | case "0P09": |
| | | return "91310114703439394M0020006001"; |
| | | default: |
| | | return depotId; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取图片的二进制流 |
| | |
| | | package com.ld.igds.io; |
| | | |
| | | |
| | | import com.ld.igds.data.ConfigData; |
| | | import com.ld.igds.io.fzzy.server.BhznQuantityServerEngine; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.CommandLineRunner; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | /** |
| | | * 可以根据配置文件灵活调整 |
| | |
| | | @Override |
| | | public void run(String... strings) throws Exception { |
| | | |
| | | // if (configData.getActive().equals("dev")) { |
| | | // serverEngine.start(BhznQuantityServerEngine.PORT); |
| | | // return; |
| | | // } |
| | | // |
| | | // //风正致远默认部署服务当前应用使用9000端口 |
| | | // if (configData.getActive().indexOf("pro") >= 0) { |
| | | // serverEngine.start(BhznQuantityServerEngine.PORT); |
| | | // return; |
| | | // } |
| | | if (configData.getActive().equals("dev")) { |
| | | serverEngine.start(BhznQuantityServerEngine.PORT); |
| | | return; |
| | | } |
| | | |
| | | if (configData.getActive().indexOf("pro") >= 0) { |
| | | serverEngine.start(BhznQuantityServerEngine.PORT); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | |
| | | <PropertyDef name="objective"> |
| | | <Property></Property> |
| | | <Property name="label">通风目的</Property> |
| | | <Property name="mapping"> |
| | | <Property name="mapValues"> |
| | | <Collection> |
| | | <Entity> |
| | | <Property name="key">1</Property> |
| | | <Property name="value">降温通风</Property> |
| | | </Entity> |
| | | <Entity> |
| | | <Property name="key">2</Property> |
| | | <Property name="value">降水通风</Property> |
| | | </Entity> |
| | | <Entity> |
| | | <Property name="key">3</Property> |
| | | <Property name="value">处理发热粮通风</Property> |
| | | </Entity> |
| | | <Entity> |
| | | <Property name="key">4</Property> |
| | | <Property name="value">均衡粮温通风</Property> |
| | | </Entity> |
| | | <Entity> |
| | | <Property name="key">5</Property> |
| | | <Property name="value">其他目的通风</Property> |
| | | </Entity> |
| | | </Collection> |
| | | </Property> |
| | | <Property name="keyProperty">key</Property> |
| | | <Property name="valueProperty">value</Property> |
| | | </Property> |
| | | </PropertyDef> |
| | | <PropertyDef name="type"> |
| | | <Property></Property> |
| | |
| | | html += '<div class="status-succ">正常</div>'; |
| | | html += '<div class="num-tit"><div class="t">' + (depot.name == null ? "":depot.name) + '</div></div>'; |
| | | |
| | | html += '<div class="basic-info"><div class="bifo-field"><span class="t">粮食性质</span>'; |
| | | html += '<div class="basic-info"><div class="bifo-field"><span class="t">粮油性质</span>'; |
| | | html += '<span class="val">' + (depot.foodTypeName == null ? "--" : depot.foodTypeName) + '</span></div>'; |
| | | |
| | | html += '<div class="bifo-field"><span class="t">粮食品种</span>'; |
| | | html += '<div class="bifo-field"><span class="t">粮油品种</span>'; |
| | | html += '<span class="val">' + (depot.foodVarietyName == null ? "--" : depot.foodVarietyName) + '</span></div>'; |
| | | |
| | | html += '<div class="bifo-field"><span class="t">粮食等级</span>'; |
| | | html += '<div class="bifo-field"><span class="t">粮油等级</span>'; |
| | | html += '<span class="val">' + (depot.foodLevelName == null ? "--" : depot.foodLevelName) + '</span></div></div>'; |
| | | |
| | | html += '<div class="basic-info-sub"><div class="basic-info"><div class="bifo-field">'; |
| | |
| | | html += '<div class="status-succ">正常</div>'; |
| | | html += '<div class="num-tit"><div class="t">暂无仓库信息</div></div>'; |
| | | |
| | | html += '<div class="basic-info"><div class="bifo-field"><span class="t">粮食性质</span>'; |
| | | html += '<div class="basic-info"><div class="bifo-field"><span class="t">粮油性质</span>'; |
| | | html += '<span class="val">--</span></div>'; |
| | | |
| | | html += '<div class="bifo-field"><span class="t">粮食品种</span>'; |
| | | html += '<div class="bifo-field"><span class="t">粮油品种</span>'; |
| | | html += '<span class="val">--</span></div>'; |
| | | |
| | | html += '<div class="bifo-field"><span class="t">粮食等级</span>'; |
| | | html += '<div class="bifo-field"><span class="t">粮油等级</span>'; |
| | | html += '<span class="val">--</span></div></div>'; |
| | | |
| | | html += '<div class="basic-info-sub"><div class="basic-info"><div class="bifo-field">'; |
| | |
| | | // 配置仓库卡片信息 |
| | | var depotData = quantityData.depotData; |
| | | $("#depotTypeName").text(depotData.depotTypeName); |
| | | $("#storeKeeperName").text(depotData.storeKeeperName == null ? "保管员":item.storeKeeperName); |
| | | $("#storeKeeperName").text(depotData.storeKeeperName == null ? "保管员":depotData.storeKeeperName); |
| | | $("#storageReal").text(depotData.storageReal); |
| | | $("#foodVarietyName").text(depotData.foodVarietyName); |
| | | $("#foodLevelName").text(depotData.foodLevelName); |