| | |
| | | /** |
| | | * 质检同步 |
| | | * |
| | | * @author chen |
| | | * @author czt |
| | | * @date 2023-05-14 19:51 |
| | | */ |
| | | @Slf4j |
| | |
| | | Api1105 api1105; |
| | | List<Fz35CheckItem> fz35CheckItems; |
| | | List<GbCheckItem> gbCheckList; |
| | | String jyxm; |
| | | String jyxmz; |
| | | StringBuilder jyxm; |
| | | StringBuilder jyxmz; |
| | | List<Api1310> api1310List; |
| | | for (Fz35Quality fz35Quality : list) { |
| | | api1105 = commonService.getApi1105Cache(fz35Quality.getDepotId()); |
| | | if (null == api1105) { |
| | |
| | | api1310.setJyyj(fz35Quality.getStandard()); |
| | | api1310.setZblb("2"); |
| | | //检测项,检测值 |
| | | jyxm = ""; |
| | | jyxmz = ""; |
| | | fz35CheckItems = fzzySync1203Rep.listInoutCheckItem(fz35Quality.getId()); |
| | | jyxm = new StringBuilder(); |
| | | jyxmz = new StringBuilder(); |
| | | fz35CheckItems = fzzySync1203Rep.listInoutCheckItem(fz35Quality.getId(), deptId.substring(0, 4)); |
| | | if (null != fz35CheckItems && fz35CheckItems.size() > 0) { |
| | | |
| | | for (Fz35CheckItem fz35CheckItem : fz35CheckItems) { |
| | |
| | | if (gbCheckList == null || gbCheckList.isEmpty()) { |
| | | continue; |
| | | } |
| | | jyxm += gbCheckList.get(0).getCode() + ","; |
| | | jyxmz += fz35CheckItem.getValue() + ","; |
| | | jyxm.append(gbCheckList.get(0).getCode()).append(","); |
| | | jyxmz.append(fz35CheckItem.getValue()).append(","); |
| | | } |
| | | } |
| | | api1310.setJyxm(jyxm); |
| | | api1310.setJyxmz(jyxmz); |
| | | api1310.setJyxm(jyxm.toString()); |
| | | api1310.setJyxmz(jyxmz.toString()); |
| | | |
| | | api1310.setZbjgpd(fz35Quality.getResult()); |
| | | api1310.setQfrq(fz35Quality.getTime()); |
| | |
| | | api1310.setYpdj(StringUtils.isEmpty(fz35Quality.getCheckLevel())?"0": fz35Quality.getCheckLevel()); |
| | | api1310.setSfzcccnx(StringUtils.isEmpty(fz35Quality.getNormalYear())?"0": fz35Quality.getNormalYear()); |
| | | api1310.setBz(fz35Quality.getRemark()); |
| | | api1310.setCzbz(Constant.CZBZ_I); |
| | | api1310.setZhgxsj(new Date()); |
| | | |
| | | api1310List = api1310Rep.getDataByZjbgdh(api1310.getZjbgdh()); |
| | | if(null == api1310List || api1310List.isEmpty()){ |
| | | api1310.setCzbz(Constant.CZBZ_I); |
| | | }else { |
| | | api1310.setCzbz(api1310List.get(0).getCzbz()); |
| | | } |
| | | |
| | | api1310Rep.save(api1310); |
| | | } |
| | | } catch (Exception e) { |