| | |
| | | import com.fzzy.async.fzzy35.repository.Fzzy35Sync1202Rep; |
| | | import com.fzzy.async.fzzy35.repository.Fzzy35Sync1203Rep; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.commons.lang.time.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | String zkl; |
| | | List<Api1203> api1203List; |
| | | for (Fz35InoutRecord sysData : list) { |
| | | if(null == sysData.getRecordWeight() || sysData.getRecordWeight() == 0){ |
| | | sysData.setRecordWeight(sysData.getSettleWeight()); |
| | | } |
| | | //判断净重是否大于0,等于0表示不合格,不进行同步上传 |
| | | if(sysData.getRecordWeight() == 0){ |
| | | if(null == sysData.getRecordWeight() || sysData.getRecordWeight() == 0){ |
| | | continue; |
| | | } |
| | | fz35CheckItems = null; |
| | | //获取入库质检信息 |
| | | fz35CheckItems = fzzySync1203Rep.listInoutCheckItem(sysData.getCheckId()); |
| | | fz35CheckItems = fzzySync1203Rep.listInoutCheckItem(sysData.getCheckId(), deptId.substring(0, 4)); |
| | | if (null == fz35CheckItems || fz35CheckItems.isEmpty()) { |
| | | log.info("-------------没有获取到当前入库质检信息--------------"); |
| | | continue; |
| | |
| | | if (gbCheckList == null || gbCheckList.isEmpty()) { |
| | | continue; |
| | | } |
| | | if (StringUtils.isEmpty(fz35CheckItem.getValue())) { |
| | | continue; |
| | | } |
| | | jyxm += gbCheckList.get(0).getCode() + ","; |
| | | jyz += fz35CheckItem.getValue() + ","; |
| | | zkj += "0.0,"; |
| | | zkl += "0.0,"; |
| | | zkj += ",0.0"; |
| | | zkl += ",0.0"; |
| | | } |
| | | |
| | | apiData.setJyxm(jyxm); |
| | | apiData.setJyz(jyz); |
| | | apiData.setZkj(zkj); |
| | | apiData.setZkl(zkl); |
| | | apiData.setZkj(zkj.substring(1)); |
| | | apiData.setZkl(zkl.substring(1)); |
| | | if("UNPASS".equals(sysData.getCheckStatus())){ |
| | | apiData.setJyjg("0"); |
| | | } |
| | |
| | | api1203List = api1203Rep.getDataById(apiData.getRkjydh()); |
| | | if(null == api1203List || api1203List.isEmpty()){ |
| | | apiData.setCzbz(Constant.CZBZ_I); |
| | | }else { |
| | | apiData.setCzbz(api1203List.get(0).getCzbz()); |
| | | } |
| | | |
| | | //保存数据 |