|  |  | 
 |  |  | import com.doumee.core.model.PageData; | 
 |  |  | import com.doumee.core.model.PageWrap; | 
 |  |  | import com.doumee.core.utils.Constants; | 
 |  |  | import com.doumee.core.utils.DateUtil; | 
 |  |  | import com.doumee.core.utils.Utils; | 
 |  |  | import com.doumee.dao.business.YwPatrolPointMapper; | 
 |  |  | import com.doumee.dao.business.model.Category; | 
 |  |  | 
 |  |  |         ywPatrolPointMapper.insert(ywPatrolPoint); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         if(Objects.nonNull(ywPatrolPoint.getMultifile())){ | 
 |  |  |             ywPatrolPoint.getMultifile().setCreator(loginUserInfo.getId()); | 
 |  |  |             ywPatrolPoint.getMultifile().setCreateDate(new Date()); | 
 |  |  |             ywPatrolPoint.getMultifile().setIsdeleted(Constants.ZERO); | 
 |  |  |             ywPatrolPoint.getMultifile().setObjType(Constants.MultiFile.FN_PATROL_POINT_FILE.getKey()); | 
 |  |  |             ywPatrolPoint.getMultifile().setObjId(ywPatrolPoint.getId()); | 
 |  |  |             multifileMapper.insert(ywPatrolPoint.getMultifile()); | 
 |  |  |         if(Objects.nonNull(ywPatrolPoint.getFileUrl())){ | 
 |  |  |             Multifile multifile = new Multifile(); | 
 |  |  |             multifile.setCreator(loginUserInfo.getId()); | 
 |  |  |             multifile.setCreateDate(new Date()); | 
 |  |  |             multifile.setIsdeleted(Constants.ZERO); | 
 |  |  |             multifile.setObjType(Constants.MultiFile.FN_PATROL_POINT_FILE.getKey()); | 
 |  |  |             multifile.setObjId(ywPatrolPoint.getId()); | 
 |  |  |             multifile.setFileurl(ywPatrolPoint.getFileUrl()); | 
 |  |  |             multifileMapper.insert(multifile); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return ywPatrolPoint.getId(); | 
 |  |  | 
 |  |  |     @Override | 
 |  |  |     public void deleteById(Integer id, LoginUserInfo user) { | 
 |  |  |         ywPatrolPointMapper.update(new UpdateWrapper<YwPatrolPoint>().lambda().set(YwPatrolPoint::getIsdeleted,Constants.ONE) | 
 |  |  |                 .set(YwPatrolPoint::getEditDate," now() ") | 
 |  |  |                 .set(YwPatrolPoint::getEditDate, DateUtil.getCurrDateTime()) | 
 |  |  |                 .set(YwPatrolPoint::getEditor,user.getId()) | 
 |  |  |                 .eq(YwPatrolPoint::getId,user.getId()) | 
 |  |  |         ); | 
 |  |  | 
 |  |  |                 .eq(Multifile::getObjType,Constants.MultiFile.FN_PATROL_POINT_FILE.getKey()) | 
 |  |  |         ); | 
 |  |  |  | 
 |  |  |         if(Objects.nonNull(ywPatrolPoint.getMultifile())){ | 
 |  |  |             ywPatrolPoint.getMultifile().setCreator(loginUserInfo.getId()); | 
 |  |  |             ywPatrolPoint.getMultifile().setCreateDate(new Date()); | 
 |  |  |             ywPatrolPoint.getMultifile().setIsdeleted(Constants.ZERO); | 
 |  |  |             ywPatrolPoint.getMultifile().setObjType(Constants.MultiFile.FN_PATROL_POINT_FILE.getKey()); | 
 |  |  |             ywPatrolPoint.getMultifile().setObjId(ywPatrolPoint.getId()); | 
 |  |  |             multifileMapper.insert(ywPatrolPoint.getMultifile()); | 
 |  |  |         if(Objects.nonNull(ywPatrolPoint.getFileUrl())){ | 
 |  |  |             Multifile multifile = new Multifile(); | 
 |  |  |             multifile.setCreator(loginUserInfo.getId()); | 
 |  |  |             multifile.setCreateDate(new Date()); | 
 |  |  |             multifile.setIsdeleted(Constants.ZERO); | 
 |  |  |             multifile.setObjType(Constants.MultiFile.FN_PATROL_POINT_FILE.getKey()); | 
 |  |  |             multifile.setObjId(ywPatrolPoint.getId()); | 
 |  |  |             multifile.setFileurl(ywPatrolPoint.getFileUrl()); | 
 |  |  |             multifileMapper.insert(multifile); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     } | 
 |  |  | 
 |  |  |         if(Objects.nonNull(multifile)){ | 
 |  |  |             String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() | 
 |  |  |                     +systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_PATROL).getCode(); | 
 |  |  |             multifile.setFileurlFull(path + multifile.getFileurl()); | 
 |  |  |             ywPatrolPoint.setMultifile(multifile); | 
 |  |  |             ywPatrolPoint.setFileFullUrl(path + multifile.getFileurl()); | 
 |  |  |         } | 
 |  |  |         return ywPatrolPoint; | 
 |  |  |     } |