| | |
| | | import com.fzzy.api.entity.*; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.utils.ContextUtil; |
| | | import com.fzzy.api.view.repository.Api1305Rep; |
| | | import com.fzzy.api.view.repository.Api1306Rep; |
| | | import com.fzzy.api.view.repository.ApiLogRep; |
| | | import com.fzzy.async.fzzy40.entity.Fz40AreationData; |
| | | import com.fzzy.async.fzzy40.entity.Fz40DrugLog; |
| | | import com.fzzy.async.fzzy40.repository.Fzzy40Sync1305Rep; |
| | | import com.fzzy.async.fzzy40.repository.Fzzy40Sync1306Rep; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | * @param start 起始时间 |
| | | * @param end 截止时间 |
| | | */ |
| | | public void syncData(String deptId, Date start, Date end) { |
| | | public void syncData(String kqdm, String deptId, Date start, Date end) { |
| | | log.info("-------------1306接口数据开始同步------------------"); |
| | | //同步数据,只记录失败的信息 |
| | | ApiLog apiLog = new ApiLog(); |
| | |
| | | api1306 = new Api1306(); |
| | | |
| | | BeanUtils.copyProperties(fz40DrugLog, api1306); |
| | | api1306.setXzzydh(fz40DrugLog.getId()); |
| | | api1306.setCfdm(fz40DrugLog.getDepotId()); |
| | | api1306.setXzzydh(api1105.getHwdm().substring(0,25) + fz40DrugLog.getId()); |
| | | api1306.setCfdm(api1105.getHwdm().substring(0,25)); |
| | | api1306.setXzkssj(fz40DrugLog.getStart()); |
| | | api1306.setXzjssj(fz40DrugLog.getEnd()); |
| | | api1306.setHcjcdh(fz40DrugLog.getPestBatchId()); |
| | |
| | | api1306.setXzxgpj(fz40DrugLog.getEvaluate()); |
| | | api1306.setZhgxsj(fz40DrugLog.getUpdateTime()); |
| | | |
| | | api1306.setHwdm(api1105.getHwdm()); |
| | | api1306.setKqdm(kqdm); |
| | | api1306.setBizId(fz40DrugLog.getId()); |
| | | api1306List = api1306Rep.getDataById(api1306.getXzzydh()); |
| | | if(null == api1306List || api1306List.isEmpty()){ |
| | | if (null == api1306List || api1306List.isEmpty()) { |
| | | api1306.setCzbz(Constant.CZBZ_I); |
| | | }else { |
| | | } else { |
| | | api1306.setCzbz(api1306List.get(0).getCzbz()); |
| | | } |
| | | |