| | |
| | | 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.Api1303Rep; |
| | | 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.apache.commons.lang.StringUtils; |
| | | 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; |
| | | |
| | | /** |
| | | * 熏蒸作业数据同步 |
| | | * |
| | | * @author chen |
| | | * @author czt |
| | | * @date 2022-09-08 09:51 |
| | | */ |
| | | @Slf4j |
| | |
| | | private ApiCommonService commonService; |
| | | @Autowired |
| | | private Api1306Rep api1306Rep; |
| | | |
| | | @Autowired |
| | | private Api1303Rep api1303Rep; |
| | | @Autowired |
| | | private ApiLogRep apiLogRep; |
| | | |
| | |
| | | Api1306 api1306; |
| | | Api1105 api1105; |
| | | List<Api1306> api1306List; |
| | | List<Api1303> api1303List; |
| | | for (Fz40DrugLog fz40DrugLog : list) { |
| | | //获取货位信息 |
| | | api1105 = commonService.getApi1105Cache(fz40DrugLog.getDepotId()); |
| | |
| | | api1306.setCfdm(api1105.getHwdm().substring(0,25)); |
| | | api1306.setXzkssj(fz40DrugLog.getStart()); |
| | | api1306.setXzjssj(fz40DrugLog.getEnd()); |
| | | api1306.setHcjcdh(fz40DrugLog.getPestBatchId()); |
| | | //设置虫害检测单号 |
| | | api1306.setHcjcdh(api1105.getHwdm() + fz40DrugLog.getPestBatchId()); |
| | | api1303List = api1303Rep.getDataByHcjcdh(fz40DrugLog.getPestBatchId()); |
| | | if (null != api1303List || api1303List.size() > 0) { |
| | | api1306.setHcjcdh(api1303List.get(0).getHcjcdh()); |
| | | } |
| | | |
| | | api1306.setDjcxz(fz40DrugLog.getNum()); |
| | | api1306.setCgxzfs(fz40DrugLog.getMode()); |
| | | api1306.setHlxzfs(fz40DrugLog.getRecirMode()); |
| | |
| | | api1306.setNd(fz40DrugLog.getConcentration()); |
| | | api1306.setLddwyyl(fz40DrugLog.getGrainDose()); |
| | | api1306.setKjdwyyl(fz40DrugLog.getSpaceDose()); |
| | | api1306.setSyff(StringUtils.isEmpty(fz40DrugLog.getSyff())?"0":fz40DrugLog.getSyff()); |
| | | api1306.setZyyl(fz40DrugLog.getDose()); |
| | | api1306.setSqrq(fz40DrugLog.getVentilateTime()); |
| | | api1306.setSqff(fz40DrugLog.getVentilateMethod()); |
| | | api1306.setSqjsslhqnd(fz40DrugLog.getAfterPh3()); |
| | | api1306.setXzxgpj(fz40DrugLog.getEvaluate()); |
| | | api1306.setZhgxsj(fz40DrugLog.getUpdateTime()); |
| | | api1306.setZhgxsj(new Date()); |
| | | |
| | | api1306.setHwdm(api1105.getHwdm()); |
| | | api1306.setKqdm(kqdm); |