| | |
| | | import com.fzzy.api.utils.ContextUtil; |
| | | import com.fzzy.api.view.repository.Api1209Rep; |
| | | import com.fzzy.api.view.repository.ApiLogRep; |
| | | import com.fzzy.async.fzzy35.entity.MLossOver; |
| | | import com.fzzy.async.fzzy35.entity.Fz35MLossOver; |
| | | import com.fzzy.async.fzzy35.repository.Fzzy35Sync1209Rep; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.time.DateFormatUtils; |
| | |
| | | apiLog.setStatus(99); |
| | | apiLog.setId(ContextUtil.getUUID()); |
| | | try { |
| | | List<MLossOver> list = fzzySync1209Rep.listMLossOver(deptId, start, end); |
| | | List<Fz35MLossOver> list = fzzySync1209Rep.listMLossOver(deptId, start, end); |
| | | |
| | | if (null == list || list.isEmpty()) { |
| | | |
| | |
| | | |
| | | Api1209 apiData; |
| | | Api1105 api1105; |
| | | for (MLossOver sysData : list) { |
| | | List<Api1209> api1209List; |
| | | for (Fz35MLossOver sysData : list) { |
| | | |
| | | //获取货位信息 |
| | | api1105 = commonService.getApi1105Cache(sysData.getDepotId()); |
| | |
| | | apiData.setSysfzc("0"); |
| | | |
| | | //操作标志及最后更新时间 |
| | | apiData.setCzbz(Constant.CZBZ_I); |
| | | apiData.setZhgxsj(new Date()); |
| | | |
| | | //业务id、库区编码、同步时间 |
| | |
| | | apiData.setKqdm(kqdm); |
| | | apiData.setSyncTime(new Date()); |
| | | |
| | | api1209List = api1209Rep.getDataBySydh(apiData.getSydh()); |
| | | if(null == api1209List || api1209List.isEmpty()){ |
| | | apiData.setCzbz(Constant.CZBZ_I); |
| | | }else { |
| | | apiData.setCzbz(api1209List.get(0).getCzbz()); |
| | | } |
| | | |
| | | //保存数据 |
| | | api1209Rep.save(apiData); |
| | | } |