|  |  |  | 
|---|
|  |  |  | import com.fzzy.api.Constant; | 
|---|
|  |  |  | import com.fzzy.api.entity.*; | 
|---|
|  |  |  | import com.fzzy.api.service.ApiCommonService; | 
|---|
|  |  |  | import com.fzzy.api.service.ApiTriggerService; | 
|---|
|  |  |  | import com.fzzy.api.utils.ContextUtil; | 
|---|
|  |  |  | import com.fzzy.api.view.repository.Api1404Rep; | 
|---|
|  |  |  | import com.fzzy.api.view.repository.ApiLogRep; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ApiCommonService commonService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ApiTriggerService apiTriggerService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private Api1404Rep api1404Rep; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ApiLogRep apiLogRep; | 
|---|
|  |  |  | 
|---|
|  |  |  | apiLog.setStatus(99); | 
|---|
|  |  |  | apiLog.setId(ContextUtil.getUUID()); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | List<Fz35Plan> list = fzzy35Sync1403Rep.findDate("3", start, end); | 
|---|
|  |  |  | List<Fz35Plan> list = fzzy35Sync1403Rep.findDateByTime(start, end); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (null == list || list.isEmpty()) { | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | 
|---|
|  |  |  | api1404 = new Api1404(); | 
|---|
|  |  |  | api1404.setLhjhdh(kqdm.substring(0, 18) + fz35PlanDetail.getPlanId().split("_")[1] + fz35PlanDetail.getPlanId().split("_")[2]); | 
|---|
|  |  |  | api1404.setJhmxdh(api1404.getLhjhdh() + kqdm + String.valueOf(index).substring(1)); | 
|---|
|  |  |  | api1404.setLspzdm(fz35PlanDetail.getFoodVariety()); | 
|---|
|  |  |  | String mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSPZ, fz35PlanDetail.getFoodVariety().substring(0,3)); | 
|---|
|  |  |  | api1404.setLspzdm(mappingCode); | 
|---|
|  |  |  | api1404.setLsdjdm(fz35PlanDetail.getFoodLevel()); | 
|---|
|  |  |  | api1404.setLsxzdm(fz35PlanDetail.getFoodType()); | 
|---|
|  |  |  | mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSXZ, fz35PlanDetail.getFoodType()); | 
|---|
|  |  |  | api1404.setLsxzdm(mappingCode); | 
|---|
|  |  |  | api1404.setShnd(StringUtils.isEmpty(fz35PlanDetail.getYear())?fz35Plan.getYear():fz35PlanDetail.getYear()); | 
|---|
|  |  |  | api1404.setLhhwdm(fz35PlanDetail.getDepotId()); | 
|---|
|  |  |  | api1404.setLhhwdm(api1105.getHwdm()); | 
|---|
|  |  |  | api1404.setLhsl(fz35PlanDetail.getPlanNum()); | 
|---|
|  |  |  | api1404.setLhlx(fz35PlanDetail.getType()); | 
|---|
|  |  |  | api1404.setZhgxsj(new Date()); | 
|---|