| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruili.wcp.data.entity.management.User; |
| | | import com.zbooksoft.gdmis.dao.PhysicalDetailMapper; |
| | | import com.zbooksoft.gdmis.data.entity.CatSwajxx; |
| | | import com.zbooksoft.gdmis.data.entity.CatSwyxxx; |
| | | import com.zbooksoft.gdmis.data.entity.PhysicalDetail; |
| | | import com.zbooksoft.gdmis.data.entity.*; |
| | | import com.zbooksoft.gdmis.data.vo.ParentPhysicalInfo; |
| | | import com.zbooksoft.gdmis.service.CatSwypService; |
| | | import com.zbooksoft.gdmis.service.CatSwyxxxService; |
| | | import com.zbooksoft.gdmis.service.PhysicalDetailService; |
| | | import com.zbooksoft.gdmis.service.ProcessingDetailService; |
| | |
| | | @Autowired |
| | | PhysicalDetailService physicalDetailService; |
| | | |
| | | @Autowired |
| | | CatSwypService catSwypService; |
| | | |
| | | @Override |
| | | public List<ParentPhysicalInfo> selectDistinctParentPhysicalInfo(Long createUserId) { |
| | | return this.baseMapper.selectDistinctParentPhysicalInfo(createUserId); |
| | |
| | | List<CatSwyxxx> catSwyxxxList = catSwyxxxService.list(queryWrapper); |
| | | for (CatSwyxxx catSwyxxx : catSwyxxxList) { |
| | | PhysicalDetail physicalDetail = new PhysicalDetail(); |
| | | // physicalDetail.setFileId(catSwajxx.getAjId()); |
| | | physicalDetail.setFileId(catSwajxx.getAjId()); |
| | | physicalDetail.setItemId(catSwyxxx.getId()); |
| | | physicalDetail.setFileTitle(catSwajxx.getXmmc()); |
| | | physicalDetail.setItemTitle(catSwyxxx.getZkmc()); |
| | | physicalDetail.setItemNumber(catSwyxxx.getZkbh()); |
| | | physicalDetail.setArchivalCode(catSwajxx.getSwzldh()); |
| | | |
| | | physicalDetail.setProjectName(catSwajxx.getXmmc()); |
| | | physicalDetail.setProjectNum(catSwyxxx.getZkmc()); |
| | | physicalDetail.setPosition(catSwyxxx.getZkbh()); |
| | | physicalDetail.setSampleNum(catSwajxx.getSwzldh()); |
| | | physicalDetail.setSampleType(catSwajxx.getSwzldh()); |
| | | physicalDetail.setVesselVoyage(catSwajxx.getSwzldh()); |
| | | physicalDetail.setSurveyedArea(catSwajxx.getSwzldh()); |
| | | physicalDetail.setCreateTime(new Date()); |
| | | physicalDetail.setCreateUserId(user.getUserId()); |
| | | physicalDetail.setCreateUserName(user.getTrueName()); |
| | |
| | | return count; |
| | | } |
| | | |
| | | /** |
| | | * 添加实物信息 |
| | | * |
| | | * @param idList |
| | | */ |
| | | @Override |
| | | public Integer setCgwjxxByIds(List<Long> idList) { |
| | | |
| | | int count = 0; |
| | | Subject currentUser = SecurityUtils.getSubject(); |
| | | Session session = currentUser.getSession(); |
| | | User user = (User) session.getAttribute("user"); |
| | | for (Long id : idList) { |
| | | CatSwyp catSwyp = catSwypService.getById(id); |
| | | PhysicalDetail physicalDetail = new PhysicalDetail(); |
| | | physicalDetail.setFileId(catSwyp.getAjId()); |
| | | physicalDetail.setItemId(catSwyp.getId()); |
| | | |
| | | physicalDetail.setProjectName(catSwyp.getXmmc()); |
| | | physicalDetail.setProjectNum(catSwyp.getXmbh()); |
| | | physicalDetail.setPosition(catSwyp.getZwmc()); |
| | | physicalDetail.setSampleNum(catSwyp.getYpbh()); |
| | | physicalDetail.setSampleType(catSwyp.getYplx()); |
| | | physicalDetail.setVesselVoyage(catSwyp.getDcchc()); |
| | | physicalDetail.setSurveyedArea(catSwyp.getDchy()); |
| | | physicalDetail.setCreateTime(new Date()); |
| | | physicalDetail.setCreateUserId(user.getUserId()); |
| | | physicalDetail.setCreateUserName(user.getTrueName()); |
| | | physicalDetail.setFormId(0L); |
| | | physicalDetail.setSurvey(0); |
| | | physicalDetail.setSampling(0); |
| | | physicalDetailService.saveOrUpdate(physicalDetail); |
| | | count++; |
| | | } |
| | | return count; |
| | | |
| | | } |
| | | } |