|  |  |  | 
|---|
|  |  |  | import com.fzzy.api.utils.ContextUtil; | 
|---|
|  |  |  | import com.fzzy.api.view.repository.Api1204Rep; | 
|---|
|  |  |  | import com.fzzy.api.view.repository.ApiLogRep; | 
|---|
|  |  |  | import com.fzzy.async.fzzy35.entity.InoutRecord; | 
|---|
|  |  |  | import com.fzzy.async.fzzy35.entity.InoutSettle; | 
|---|
|  |  |  | import com.fzzy.async.fzzy35.entity.Fz35InoutRecord; | 
|---|
|  |  |  | import com.fzzy.async.fzzy35.entity.Fz35InoutSettle; | 
|---|
|  |  |  | import com.fzzy.async.fzzy35.repository.Fzzy35Sync1202Rep; | 
|---|
|  |  |  | import com.fzzy.async.fzzy35.repository.Fzzy35Sync1204Rep; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | 
|---|
|  |  |  | apiLog.setId(ContextUtil.getUUID()); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | //获取粮食入库结算信息 | 
|---|
|  |  |  | List<InoutSettle> list = fzzySync1204Rep.listInoutSettle(INOUT_TYPE_IN, start, end); | 
|---|
|  |  |  | List<Fz35InoutSettle> list = fzzySync1204Rep.listInoutSettle(INOUT_TYPE_IN, start, end); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (null == list || list.isEmpty()) { | 
|---|
|  |  |  | log.info("-------------没有获取到粮食入库结算信息------------------"); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Api1204 apiData; | 
|---|
|  |  |  | Api1105 api1105; | 
|---|
|  |  |  | List<InoutRecord> inoutRecords; | 
|---|
|  |  |  | InoutRecord inoutRecord; | 
|---|
|  |  |  | for (InoutSettle sysData : list) { | 
|---|
|  |  |  | List<Fz35InoutRecord> fz35InoutRecords; | 
|---|
|  |  |  | Fz35InoutRecord fz35InoutRecord; | 
|---|
|  |  |  | for (Fz35InoutSettle sysData : list) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //获取粮食入库信息 | 
|---|
|  |  |  | inoutRecords = fzzySync1202Rep.listInoutRecordById(sysData.getId()); | 
|---|
|  |  |  | if (null == inoutRecords || inoutRecords.isEmpty()) { | 
|---|
|  |  |  | fz35InoutRecords = fzzySync1202Rep.listInoutRecordById(sysData.getId()); | 
|---|
|  |  |  | if (null == fz35InoutRecords || fz35InoutRecords.isEmpty()) { | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | inoutRecord = inoutRecords.get(0); | 
|---|
|  |  |  | if (!deptId.equals(inoutRecord.getDeptId())) { | 
|---|
|  |  |  | fz35InoutRecord = fz35InoutRecords.get(0); | 
|---|
|  |  |  | if (!deptId.equals(fz35InoutRecord.getDeptId())) { | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //获取货位信息 | 
|---|
|  |  |  | api1105 = commonService.getApi1105Cache(inoutRecord.getDepotId()); | 
|---|
|  |  |  | api1105 = commonService.getApi1105Cache(fz35InoutRecord.getDepotId()); | 
|---|
|  |  |  | if (null == api1105) { | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|