| | |
| | | import com.fzzy.async.fzzy40.entity.Fz40DepotStore; |
| | | import com.fzzy.async.fzzy40.repository.Fzzy40Sync1208Rep; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.commons.lang.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | String cd = commonService.getFoodLocationIdFromCache(fz40DepotStore.getFoodLocation()); |
| | | apiData.setCd(cd); |
| | | |
| | | apiData.setBgy(api1105.getBgy()); |
| | | apiData.setBgy(StringUtils.isEmpty(api1105.getBgy()) ? "保管员" : api1105.getBgy()); |
| | | //粮权归属单位 |
| | | apiData.setLqgsdwdm(api1102.getDwdm()); |
| | | //粮权行政区划代码 |
| | | apiData.setLqxzqhdm(api1102.getDwdm().substring(2, 8)); |
| | | apiData.setLqxzqhdm(api1102.getXzqhdm()); |
| | | //管理方式-默认直储 |
| | | apiData.setGlfs("01"); |
| | | //收储地点-默认库内 |
| | |
| | | //入仓时间 |
| | | apiData.setRcsj(fz40DepotStore.getStoreDate()); |
| | | //封仓日期 |
| | | if("3".equals(apiData.getHwzt())){ |
| | | if("3".equals(apiData.getHwzt()) || "4".equals(apiData.getHwzt())){ |
| | | apiData.setFcrq(DateUtils.addDays(fz40DepotStore.getStoreDate(), 10)); |
| | | } |
| | | //出仓完成时间 |
| | | |
| | | if("1".equals(apiData.getHwzt())){ |
| | | //出仓完成时间 |
| | | apiData.setCcwcsj(DateUtils.addDays(fz40DepotStore.getStoreDate(), 5)); |
| | | //清仓时间 |
| | | apiData.setQcsj(DateUtils.addDays(apiData.getCcwcsj(), 1)); |
| | | } |
| | | //国别 |
| | | apiData.setGb("156"); |