| | |
| | | import com.fzzy.async.fzzy35.repository.Fzzy35Sync1403Rep; |
| | | import com.fzzy.async.fzzy35.repository.Fzzy35Sync1404Rep; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import java.util.Date; |
| | |
| | | if (null == fz35PlanDetails || fz35PlanDetails.isEmpty()) { |
| | | continue; |
| | | } |
| | | int index = 10001; |
| | | for (Fz35PlanDetail fz35PlanDetail : fz35PlanDetails) { |
| | | api1105 = commonService.getApi1105Cache(fz35PlanDetail.getDepotId()); |
| | | if (null == api1105) { |
| | | continue; |
| | | } |
| | | api1404 = new Api1404(); |
| | | api1404.setJhmxdh(fz35PlanDetail.getId()); |
| | | api1404.setLhjhdh(fz35PlanDetail.getPlanId()); |
| | | 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()); |
| | | api1404.setLsdjdm(fz35PlanDetail.getFoodLevel()); |
| | | api1404.setLsxzdm(fz35PlanDetail.getFoodType()); |
| | | api1404.setShnd(fz35PlanDetail.getYear()); |
| | | api1404.setShnd(StringUtils.isEmpty(fz35PlanDetail.getYear())?fz35Plan.getYear():fz35PlanDetail.getYear()); |
| | | api1404.setLhhwdm(fz35PlanDetail.getDepotId()); |
| | | api1404.setLhsl(fz35PlanDetail.getPlanNum()); |
| | | api1404.setLhlx(fz35PlanDetail.getType()); |
| | |
| | | api1404.setCzbz(api1404List.get(0).getCzbz()); |
| | | } |
| | | api1404Rep.save(api1404); |
| | | index ++; |
| | | } |
| | | } |
| | | } catch (Exception e) { |