From 3ec94f84870daa6428ff6fa6b8b717715de32ea8 Mon Sep 17 00:00:00 2001 From: cuizhibin Date: Thu, 7 Aug 2025 15:40:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4convertsImpl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dite/znpt/converts/Impl/ConvertsImpl.java | 1351 ----------------- 1 file changed, 1351 deletions(-) delete mode 100644 core/src/main/java/com/dite/znpt/converts/Impl/ConvertsImpl.java diff --git a/core/src/main/java/com/dite/znpt/converts/Impl/ConvertsImpl.java b/core/src/main/java/com/dite/znpt/converts/Impl/ConvertsImpl.java deleted file mode 100644 index 842511e..0000000 --- a/core/src/main/java/com/dite/znpt/converts/Impl/ConvertsImpl.java +++ /dev/null @@ -1,1351 +0,0 @@ -package com.dite.znpt.converts.Impl; - -import com.dite.znpt.converts.Converts; -import com.dite.znpt.domain.entity.AttachInfoEntity; -import com.dite.znpt.domain.entity.AttendanceRecordEntity; -import com.dite.znpt.domain.entity.CertificationEntity; -import com.dite.znpt.domain.entity.CheckSchemeEntity; -import com.dite.znpt.domain.entity.DefectEntity; -import com.dite.znpt.domain.entity.DeptEntity; -import com.dite.znpt.domain.entity.EquipmentEntity; -import com.dite.znpt.domain.entity.EquipmentUseRecordEntity; -import com.dite.znpt.domain.entity.ImageCollectEntity; -import com.dite.znpt.domain.entity.ImageEntity; -import com.dite.znpt.domain.entity.InspectionReportEntity; -import com.dite.znpt.domain.entity.InsuranceCompanyEntity; -import com.dite.znpt.domain.entity.InsuranceInfoEntity; -import com.dite.znpt.domain.entity.InsuranceTypeEntity; -import com.dite.znpt.domain.entity.MaintainSuggestionEntity; -import com.dite.znpt.domain.entity.MenuEntity; -import com.dite.znpt.domain.entity.PartEntity; -import com.dite.znpt.domain.entity.PostEntity; -import com.dite.znpt.domain.entity.ProjectEntity; -import com.dite.znpt.domain.entity.RoleEntity; -import com.dite.znpt.domain.entity.TurbineEntity; -import com.dite.znpt.domain.entity.UserEntity; -import com.dite.znpt.domain.entity.WorkShiftEntity; -import com.dite.znpt.domain.vo.AttachInfoResp; -import com.dite.znpt.domain.vo.AttendanceRecordReq; -import com.dite.znpt.domain.vo.AttendanceRecordResp; -import com.dite.znpt.domain.vo.CertificationReq; -import com.dite.znpt.domain.vo.CertificationResp; -import com.dite.znpt.domain.vo.CheckSchemeReq; -import com.dite.znpt.domain.vo.CheckSchemeResp; -import com.dite.znpt.domain.vo.DefectReq; -import com.dite.znpt.domain.vo.DefectResp; -import com.dite.znpt.domain.vo.DeptReq; -import com.dite.znpt.domain.vo.DeptResp; -import com.dite.znpt.domain.vo.EquipmentReq; -import com.dite.znpt.domain.vo.EquipmentUseRecordReq; -import com.dite.znpt.domain.vo.ImageCollectReq; -import com.dite.znpt.domain.vo.ImageReq; -import com.dite.znpt.domain.vo.ImageSimpleReq; -import com.dite.znpt.domain.vo.InspectionReportCheckInfo; -import com.dite.znpt.domain.vo.InspectionReportReportInfo; -import com.dite.znpt.domain.vo.InspectionReportReq; -import com.dite.znpt.domain.vo.InspectionReportSchemeInfo; -import com.dite.znpt.domain.vo.InsuranceAttachResp; -import com.dite.znpt.domain.vo.InsuranceCompanyReq; -import com.dite.znpt.domain.vo.InsuranceCompanyResp; -import com.dite.znpt.domain.vo.InsuranceInfoReq; -import com.dite.znpt.domain.vo.InsuranceInfoResp; -import com.dite.znpt.domain.vo.InsuranceTypeReq; -import com.dite.znpt.domain.vo.InsuranceTypeResp; -import com.dite.znpt.domain.vo.MaintainSuggestionReq; -import com.dite.znpt.domain.vo.MaintainSuggestionResp; -import com.dite.znpt.domain.vo.MenuReq; -import com.dite.znpt.domain.vo.MenuResp; -import com.dite.znpt.domain.vo.OutWorkDefectReq; -import com.dite.znpt.domain.vo.PartReq; -import com.dite.znpt.domain.vo.PartResp; -import com.dite.znpt.domain.vo.PostReq; -import com.dite.znpt.domain.vo.PostResp; -import com.dite.znpt.domain.vo.ProjectReq; -import com.dite.znpt.domain.vo.ProjectResp; -import com.dite.znpt.domain.vo.RoleReq; -import com.dite.znpt.domain.vo.RoleResp; -import com.dite.znpt.domain.vo.TurbineReq; -import com.dite.znpt.domain.vo.TurbineResp; -import com.dite.znpt.domain.vo.UserListResp; -import com.dite.znpt.domain.vo.UserReq; -import com.dite.znpt.domain.vo.UserResp; -import com.dite.znpt.domain.vo.WorkShiftListResp; -import com.dite.znpt.domain.vo.WorkShiftReq; -import com.dite.znpt.domain.vo.WorkShiftResp; -import java.time.Duration; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; -import javax.annotation.processing.Generated; -import javax.xml.datatype.DatatypeConfigurationException; -import javax.xml.datatype.DatatypeConstants; -import javax.xml.datatype.DatatypeFactory; -import javax.xml.datatype.XMLGregorianCalendar; - -public class ConvertsImpl implements Converts { - - private final DatatypeFactory datatypeFactory; - - public ConvertsImpl() { - try { - datatypeFactory = DatatypeFactory.newInstance(); - } - catch ( DatatypeConfigurationException ex ) { - throw new RuntimeException( ex ); - } - } - - @Override - public List toImageEntity(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( ImageReq imageReq : list ) { - list1.add( imageReqToImageEntity( imageReq ) ); - } - - return list1; - } - - @Override - public List toImageSimpleReq(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( OutWorkDefectReq outWorkDefectReq : list ) { - list1.add( outWorkDefectReqToImageSimpleReq( outWorkDefectReq ) ); - } - - return list1; - } - - @Override - public ImageCollectEntity toImageCollectEntity(ImageCollectReq req) { - if ( req == null ) { - return null; - } - - ImageCollectEntity imageCollectEntity = new ImageCollectEntity(); - - imageCollectEntity.setShootingTimeBegin( req.getShootingTimeBegin() ); - imageCollectEntity.setShootingTimeEnd( req.getShootingTimeEnd() ); - imageCollectEntity.setWeather( req.getWeather() ); - imageCollectEntity.setHumidness( req.getHumidness() ); - imageCollectEntity.setTemperatureMin( req.getTemperatureMin() ); - imageCollectEntity.setTemperatureMax( req.getTemperatureMax() ); - imageCollectEntity.setWindLevel( req.getWindLevel() ); - imageCollectEntity.setShootingMethod( req.getShootingMethod() ); - imageCollectEntity.setShootingDistance( req.getShootingDistance() ); - imageCollectEntity.setCollectorId( req.getCollectorId() ); - imageCollectEntity.setCollectorName( req.getCollectorName() ); - imageCollectEntity.setImageSource( req.getImageSource() ); - - return imageCollectEntity; - } - - @Override - public DefectEntity toDefectEntity(DefectReq req) { - if ( req == null ) { - return null; - } - - DefectEntity defectEntity = new DefectEntity(); - - defectEntity.setDefectCode( req.getDefectCode() ); - defectEntity.setDefectName( req.getDefectName() ); - defectEntity.setDefectPosition( req.getDefectPosition() ); - defectEntity.setDefectType( req.getDefectType() ); - defectEntity.setDefectLevel( req.getDefectLevel() ); - defectEntity.setRepairStatus( req.getRepairStatus() ); - defectEntity.setSource( req.getSource() ); - if ( req.getChordwise() != null ) { - defectEntity.setChordwise( String.valueOf( req.getChordwise() ) ); - } - if ( req.getAxial() != null ) { - defectEntity.setAxial( String.valueOf( req.getAxial() ) ); - } - defectEntity.setLabelInfo( req.getLabelInfo() ); - defectEntity.setDescription( req.getDescription() ); - defectEntity.setRepairIdea( req.getRepairIdea() ); - - return defectEntity; - } - - @Override - public DefectResp toDefectResp(DefectEntity entity) { - if ( entity == null ) { - return null; - } - - DefectResp defectResp = new DefectResp(); - - defectResp.setDefectCode( entity.getDefectCode() ); - defectResp.setDefectName( entity.getDefectName() ); - defectResp.setDefectPosition( entity.getDefectPosition() ); - defectResp.setDefectType( entity.getDefectType() ); - defectResp.setDefectLevel( entity.getDefectLevel() ); - defectResp.setRepairStatus( entity.getRepairStatus() ); - defectResp.setSource( entity.getSource() ); - if ( entity.getChordwise() != null ) { - defectResp.setChordwise( Integer.parseInt( entity.getChordwise() ) ); - } - if ( entity.getAxial() != null ) { - defectResp.setAxial( Integer.parseInt( entity.getAxial() ) ); - } - defectResp.setLabelInfo( entity.getLabelInfo() ); - defectResp.setDescription( entity.getDescription() ); - defectResp.setRepairIdea( entity.getRepairIdea() ); - defectResp.setDefectId( entity.getDefectId() ); - defectResp.setImageId( entity.getImageId() ); - - return defectResp; - } - - @Override - public ProjectResp toProjectResp(ProjectEntity entity) { - if ( entity == null ) { - return null; - } - - ProjectResp projectResp = new ProjectResp(); - - projectResp.setProjectId( entity.getProjectId() ); - projectResp.setProjectName( entity.getProjectName() ); - projectResp.setCoverUrl( entity.getCoverUrl() ); - projectResp.setFarmName( entity.getFarmName() ); - projectResp.setFarmAddress( entity.getFarmAddress() ); - projectResp.setClient( entity.getClient() ); - projectResp.setClientContact( entity.getClientContact() ); - projectResp.setClientPhone( entity.getClientPhone() ); - projectResp.setInspectionUnit( entity.getInspectionUnit() ); - projectResp.setInspectionContact( entity.getInspectionContact() ); - projectResp.setInspectionPhone( entity.getInspectionPhone() ); - projectResp.setScale( entity.getScale() ); - projectResp.setDuration( entity.getDuration() ); - projectResp.setTurbineModel( entity.getTurbineModel() ); - projectResp.setConstructorIds( entity.getConstructorIds() ); - projectResp.setAuditorId( entity.getAuditorId() ); - projectResp.setQualityOfficerId( entity.getQualityOfficerId() ); - projectResp.setProjectManagerId( entity.getProjectManagerId() ); - projectResp.setProjectOrigin( entity.getProjectOrigin() ); - projectResp.setProjectBudget( entity.getProjectBudget() ); - - if ( entity.getStatus() != null ) { - projectResp.setStatus( entity.getStatus() ); - } - projectResp.setStartDate( entity.getStartDate() ); - projectResp.setEndDate( entity.getEndDate() ); - - return projectResp; - } - - @Override - public ProjectEntity toProjectEntity(ProjectReq req) { - if ( req == null ) { - return null; - } - - ProjectEntity projectEntity = new ProjectEntity(); - - projectEntity.setProjectId( req.getProjectId() ); - projectEntity.setProjectName( req.getProjectName() ); - projectEntity.setCoverUrl( req.getCoverUrl() ); - projectEntity.setFarmName( req.getFarmName() ); - projectEntity.setFarmAddress( req.getFarmAddress() ); - projectEntity.setClient( req.getClient() ); - projectEntity.setClientContact( req.getClientContact() ); - projectEntity.setClientPhone( req.getClientPhone() ); - projectEntity.setInspectionUnit( req.getInspectionUnit() ); - projectEntity.setInspectionContact( req.getInspectionContact() ); - projectEntity.setInspectionPhone( req.getInspectionPhone() ); - projectEntity.setScale( req.getScale() ); - projectEntity.setDuration( req.getDuration() ); - projectEntity.setTurbineModel( req.getTurbineModel() ); - projectEntity.setConstructorIds( req.getConstructorIds() ); - projectEntity.setAuditorId( req.getAuditorId() ); - projectEntity.setQualityOfficerId( req.getQualityOfficerId() ); - projectEntity.setProjectManagerId( req.getProjectManagerId() ); - projectEntity.setStatus( req.getStatus() ); - projectEntity.setStartDate( req.getStartDate() ); - projectEntity.setEndDate( req.getEndDate() ); - projectEntity.setProjectOrigin( req.getProjectOrigin() ); - projectEntity.setProjectBudget( req.getProjectBudget() ); - double budget = req.getLaborCost() - + req.getBonusProvision() - + req.getTransAccomMeals() - + req.getOthersCost() - + req.getEquipmentAmortization(); - projectEntity.setProjectBudget((int) budget); - return projectEntity; - } - - @Override - public TurbineEntity toTurbineEntity(TurbineReq req) { - if ( req == null ) { - return null; - } - - TurbineEntity turbineEntity = new TurbineEntity(); - - turbineEntity.setProjectId( req.getProjectId() ); - turbineEntity.setTurbineName( req.getTurbineName() ); - turbineEntity.setTurbineCode( req.getTurbineCode() ); - turbineEntity.setTurbineDesc( req.getTurbineDesc() ); - turbineEntity.setTurbineManufacturer( req.getTurbineManufacturer() ); - turbineEntity.setTurbineModel( req.getTurbineModel() ); - turbineEntity.setTurbineCoverUrl( req.getTurbineCoverUrl() ); - - return turbineEntity; - } - - @Override - public TurbineResp toTurbineResp(TurbineEntity entity) { - if ( entity == null ) { - return null; - } - - TurbineResp turbineResp = new TurbineResp(); - - turbineResp.setTurbineId( entity.getTurbineId() ); - turbineResp.setProjectId( entity.getProjectId() ); - turbineResp.setTurbineName( entity.getTurbineName() ); - turbineResp.setTurbineCode( entity.getTurbineCode() ); - turbineResp.setTurbineDesc( entity.getTurbineDesc() ); - turbineResp.setTurbineManufacturer( entity.getTurbineManufacturer() ); - turbineResp.setTurbineModel( entity.getTurbineModel() ); - turbineResp.setTurbineCoverUrl( entity.getTurbineCoverUrl() ); - - return turbineResp; - } - - @Override - public PartEntity toPartEntity(PartReq req) { - if ( req == null ) { - return null; - } - - PartEntity partEntity = new PartEntity(); - - partEntity.setTurbineId( req.getTurbineId() ); - partEntity.setPartName( req.getPartName() ); - partEntity.setPartCode( req.getPartCode() ); - partEntity.setPartType( req.getPartType() ); - partEntity.setPartDesc( req.getPartDesc() ); - partEntity.setPartManufacturer( req.getPartManufacturer() ); - partEntity.setPartModel( req.getPartModel() ); - - return partEntity; - } - - @Override - public PartResp toPartResp(PartEntity entity) { - if ( entity == null ) { - return null; - } - - PartResp partResp = new PartResp(); - - partResp.setPartId( entity.getPartId() ); - partResp.setTurbineId( entity.getTurbineId() ); - partResp.setPartName( entity.getPartName() ); - partResp.setPartCode( entity.getPartCode() ); - partResp.setPartType( entity.getPartType() ); - partResp.setPartDesc( entity.getPartDesc() ); - partResp.setPartManufacturer( entity.getPartManufacturer() ); - partResp.setPartModel( entity.getPartModel() ); - - return partResp; - } - - @Override - public UserResp toUserResp(UserEntity entity) { - if ( entity == null ) { - return null; - } - - UserResp userResp = new UserResp(); - - userResp.setAccount( entity.getAccount() ); - userResp.setAvatar( entity.getAvatar() ); - userResp.setStatus( entity.getStatus() ); - userResp.setName( entity.getName() ); - userResp.setUserType( entity.getUserType() ); - userResp.setUserStatus( entity.getUserStatus() ); - userResp.setDeptId( entity.getDeptId() ); - userResp.setIdentityCard( entity.getIdentityCard() ); - userResp.setGender( entity.getGender() ); - userResp.setMobile( entity.getMobile() ); - userResp.setEmail( entity.getEmail() ); - userResp.setHiredate( entity.getHiredate() ); - userResp.setBirthdate( entity.getBirthdate() ); - userResp.setEducation( entity.getEducation() ); - userResp.setMajorField( entity.getMajorField() ); - userResp.setWorkField( entity.getWorkField() ); - userResp.setUserId( entity.getUserId() ); - - return userResp; - } - - @Override - public UserListResp toUserListResp(UserEntity entity) { - if ( entity == null ) { - return null; - } - - UserListResp userListResp = new UserListResp(); - - userListResp.setUserId( entity.getUserId() ); - userListResp.setAccount( entity.getAccount() ); - userListResp.setStatus( entity.getStatus() ); - userListResp.setName( entity.getName() ); - userListResp.setUserCode( entity.getUserCode() ); - userListResp.setUserType( entity.getUserType() ); - userListResp.setUserStatus( entity.getUserStatus() ); - userListResp.setMobile( entity.getMobile() ); - userListResp.setCreateTime( entity.getCreateTime() ); - - return userListResp; - } - - @Override - public UserEntity toUserEntity(UserReq req) { - if ( req == null ) { - return null; - } - - UserEntity userEntity = new UserEntity(); - - userEntity.setAccount( req.getAccount() ); - userEntity.setAvatar( req.getAvatar() ); - userEntity.setStatus( req.getStatus() ); - userEntity.setName( req.getName() ); - userEntity.setUserType( req.getUserType() ); - userEntity.setUserStatus( req.getUserStatus() ); - userEntity.setDeptId( req.getDeptId() ); - userEntity.setIdentityCard( req.getIdentityCard() ); - userEntity.setGender( req.getGender() ); - userEntity.setMobile( req.getMobile() ); - userEntity.setEmail( req.getEmail() ); - userEntity.setHiredate( req.getHiredate() ); - userEntity.setBirthdate( req.getBirthdate() ); - userEntity.setEducation( req.getEducation() ); - userEntity.setMajorField( req.getMajorField() ); - userEntity.setWorkField( req.getWorkField() ); - - return userEntity; - } - - @Override - public DeptEntity toDeptEntity(DeptReq req) { - if ( req == null ) { - return null; - } - - DeptEntity deptEntity = new DeptEntity(); - - deptEntity.setParentId( req.getParentId() ); - deptEntity.setDeptName( req.getDeptName() ); - deptEntity.setOrderNum( req.getOrderNum() ); - deptEntity.setLeaderId( req.getLeaderId() ); - deptEntity.setStatus( req.getStatus() ); - - return deptEntity; - } - - @Override - public DeptResp toDeptResp(DeptEntity entity) { - if ( entity == null ) { - return null; - } - - DeptResp deptResp = new DeptResp(); - - deptResp.setDeptId( entity.getDeptId() ); - deptResp.setDeptName( entity.getDeptName() ); - deptResp.setParentId( entity.getParentId() ); - deptResp.setOrderNum( entity.getOrderNum() ); - deptResp.setLeaderId( entity.getLeaderId() ); - if ( entity.getStatus() != null ) { - deptResp.setStatus( String.valueOf( entity.getStatus() ) ); - } - - return deptResp; - } - - @Override - public PostEntity toPostEntity(PostReq req) { - if ( req == null ) { - return null; - } - - PostEntity postEntity = new PostEntity(); - - postEntity.setPostName( req.getPostName() ); - postEntity.setPostSort( req.getPostSort() ); - postEntity.setStatus( req.getStatus() ); - postEntity.setRemark( req.getRemark() ); - postEntity.setStatement( req.getStatement() ); - postEntity.setResponsibilitiesTask( req.getResponsibilitiesTask() ); - postEntity.setQualifications( req.getQualifications() ); - postEntity.setWorkingConditions( req.getWorkingConditions() ); - postEntity.setSalary( req.getSalary() ); - - return postEntity; - } - - @Override - public List toPostResp(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( PostEntity postEntity : list ) { - list1.add( toPostResp( postEntity ) ); - } - - return list1; - } - - @Override - public PostResp toPostResp(PostEntity entity) { - if ( entity == null ) { - return null; - } - - PostResp postResp = new PostResp(); - - postResp.setPostId( entity.getPostId() ); - postResp.setPostName( entity.getPostName() ); - postResp.setPostSort( entity.getPostSort() ); - postResp.setCreateTime( entity.getCreateTime() ); - postResp.setUpdateTime( entity.getUpdateTime() ); - postResp.setStatement( entity.getStatement() ); - postResp.setResponsibilitiesTask( entity.getResponsibilitiesTask() ); - postResp.setQualifications( entity.getQualifications() ); - postResp.setWorkingConditions( entity.getWorkingConditions() ); - postResp.setSalary( entity.getSalary() ); - - if ( entity.getStatus() != null ) { - postResp.setStatus( String.valueOf( entity.getStatus() ) ); - } - postResp.setRemark( entity.getRemark() ); - - return postResp; - } - - @Override - public RoleResp toRoleResp(RoleEntity entity) { - if ( entity == null ) { - return null; - } - - RoleResp roleResp = new RoleResp(); - - roleResp.setRoleId( entity.getRoleId() ); - roleResp.setRoleName( entity.getRoleName() ); - roleResp.setRoleCode( entity.getRoleCode() ); - roleResp.setRoleKey( entity.getRoleKey() ); - if ( entity.getStatus() != null ) { - roleResp.setStatus( String.valueOf( entity.getStatus() ) ); - } - roleResp.setRemark( entity.getRemark() ); - - return roleResp; - } - - @Override - public List toRoleResp(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( RoleEntity roleEntity : list ) { - list1.add( toRoleResp( roleEntity ) ); - } - - return list1; - } - - @Override - public List toUserResp(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( UserEntity userEntity : list ) { - list1.add( toUserResp( userEntity ) ); - } - - return list1; - } - - @Override - public RoleEntity toRoleEntity(RoleReq req) { - if ( req == null ) { - return null; - } - - RoleEntity roleEntity = new RoleEntity(); - - roleEntity.setRoleName( req.getRoleName() ); - roleEntity.setRoleCode( req.getRoleCode() ); - roleEntity.setRoleKey( req.getRoleKey() ); - roleEntity.setStatus( req.getStatus() ); - roleEntity.setRemark( req.getRemark() ); - - return roleEntity; - } - - @Override - public MenuEntity toMenuEntity(MenuReq req) { - if ( req == null ) { - return null; - } - - MenuEntity menuEntity = new MenuEntity(); - - menuEntity.setMenuName( req.getMenuName() ); - menuEntity.setParentId( req.getParentId() ); - menuEntity.setOrderNum( req.getOrderNum() ); - menuEntity.setComponent( req.getComponent() ); - menuEntity.setPath( req.getPath() ); - menuEntity.setMenuType( req.getMenuType() ); - menuEntity.setVisible( req.getVisible() ); - menuEntity.setPerms( req.getPerms() ); - menuEntity.setTerminalType( req.getTerminalType() ); - - return menuEntity; - } - - @Override - public MenuResp toMenuResp(MenuEntity entity) { - if ( entity == null ) { - return null; - } - - MenuResp menuResp = new MenuResp(); - - menuResp.setMenuId( entity.getMenuId() ); - menuResp.setMenuName( entity.getMenuName() ); - menuResp.setParentId( entity.getParentId() ); - if ( entity.getOrderNum() != null ) { - menuResp.setOrderNum( String.valueOf( entity.getOrderNum() ) ); - } - menuResp.setPath( entity.getPath() ); - menuResp.setComponent( entity.getComponent() ); - menuResp.setMenuType( entity.getMenuType() ); - menuResp.setVisible( entity.getVisible() ); - menuResp.setPerms( entity.getPerms() ); - - return menuResp; - } - - @Override - public CertificationEntity toCertificationEntity(CertificationReq req) { - if ( req == null ) { - return null; - } - - CertificationEntity certificationEntity = new CertificationEntity(); - - certificationEntity.setUserId( req.getUserId() ); - certificationEntity.setCertificationCode( req.getCertificationCode() ); - certificationEntity.setCertificationName( req.getCertificationName() ); - certificationEntity.setCertificationType( req.getCertificationType() ); - certificationEntity.setValidityDateBegin( req.getValidityDateBegin() ); - certificationEntity.setValidityDateEnd( req.getValidityDateEnd() ); - certificationEntity.setCertificationImage( req.getCertificationImage() ); - - return certificationEntity; - } - - @Override - public CertificationResp toCertificationResp(CertificationEntity entity) { - if ( entity == null ) { - return null; - } - - CertificationResp certificationResp = new CertificationResp(); - - certificationResp.setCertificationId( entity.getCertificationId() ); - certificationResp.setUserId( entity.getUserId() ); - certificationResp.setCertificationCode( entity.getCertificationCode() ); - certificationResp.setCertificationName( entity.getCertificationName() ); - certificationResp.setCertificationType( entity.getCertificationType() ); - certificationResp.setValidityDateBegin( entity.getValidityDateBegin() ); - certificationResp.setValidityDateEnd( entity.getValidityDateEnd() ); - certificationResp.setCertificationImage( entity.getCertificationImage() ); - - return certificationResp; - } - - @Override - public List toCertificationResp(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( CertificationEntity certificationEntity : list ) { - list1.add( toCertificationResp( certificationEntity ) ); - } - - return list1; - } - - @Override - public List toInsuranceTypeResp(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( InsuranceTypeEntity insuranceTypeEntity : list ) { - list1.add( toInsuranceTypeResp( insuranceTypeEntity ) ); - } - - return list1; - } - - @Override - public InsuranceTypeResp toInsuranceTypeResp(InsuranceTypeEntity entity) { - if ( entity == null ) { - return null; - } - - InsuranceTypeResp insuranceTypeResp = new InsuranceTypeResp(); - - insuranceTypeResp.setInsuranceTypeId( entity.getInsuranceTypeId() ); - insuranceTypeResp.setInsuranceTypeName( entity.getInsuranceTypeName() ); - insuranceTypeResp.setDescription( entity.getDescription() ); - - return insuranceTypeResp; - } - - @Override - public InsuranceTypeEntity toInsuranceTypeEntity(InsuranceTypeReq req) { - if ( req == null ) { - return null; - } - - InsuranceTypeEntity insuranceTypeEntity = new InsuranceTypeEntity(); - - insuranceTypeEntity.setInsuranceTypeName( req.getInsuranceTypeName() ); - insuranceTypeEntity.setDescription( req.getDescription() ); - - return insuranceTypeEntity; - } - - @Override - public List toInsuranceCompanyResp(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( InsuranceCompanyEntity insuranceCompanyEntity : list ) { - list1.add( toInsuranceCompanyResp( insuranceCompanyEntity ) ); - } - - return list1; - } - - @Override - public InsuranceCompanyResp toInsuranceCompanyResp(InsuranceCompanyEntity entity) { - if ( entity == null ) { - return null; - } - - InsuranceCompanyResp insuranceCompanyResp = new InsuranceCompanyResp(); - - insuranceCompanyResp.setInsuranceCompanyId( entity.getInsuranceCompanyId() ); - insuranceCompanyResp.setInsuranceCompanyName( entity.getInsuranceCompanyName() ); - insuranceCompanyResp.setContact( entity.getContact() ); - insuranceCompanyResp.setContactPhone( entity.getContactPhone() ); - insuranceCompanyResp.setStatus( entity.getStatus() ); - - return insuranceCompanyResp; - } - - @Override - public InsuranceCompanyEntity toInsuranceCompanyEntity(InsuranceCompanyReq req) { - if ( req == null ) { - return null; - } - - InsuranceCompanyEntity insuranceCompanyEntity = new InsuranceCompanyEntity(); - - insuranceCompanyEntity.setInsuranceCompanyName( req.getInsuranceCompanyName() ); - insuranceCompanyEntity.setContact( req.getContact() ); - insuranceCompanyEntity.setContactPhone( req.getContactPhone() ); - insuranceCompanyEntity.setStatus( req.getStatus() ); - - return insuranceCompanyEntity; - } - - @Override - public List toInsuranceInfoResp(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( InsuranceInfoEntity insuranceInfoEntity : list ) { - list1.add( toInsuranceInfoResp( insuranceInfoEntity ) ); - } - - return list1; - } - - @Override - public List toInsuranceAttachResp(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( InsuranceInfoEntity insuranceInfoEntity : list ) { - list1.add( insuranceInfoEntityToInsuranceAttachResp( insuranceInfoEntity ) ); - } - - return list1; - } - - @Override - public InsuranceInfoResp toInsuranceInfoResp(InsuranceInfoEntity entity) { - if ( entity == null ) { - return null; - } - - InsuranceInfoResp insuranceInfoResp = new InsuranceInfoResp(); - - insuranceInfoResp.setInsuranceInfoId( entity.getInsuranceInfoId() ); - insuranceInfoResp.setUserId( entity.getUserId() ); - insuranceInfoResp.setName( entity.getName() ); - insuranceInfoResp.setUserCode( entity.getUserCode() ); - insuranceInfoResp.setInsuranceTypeId( entity.getInsuranceTypeId() ); - insuranceInfoResp.setInsuranceTypeName( entity.getInsuranceTypeName() ); - insuranceInfoResp.setInsuranceCompanyId( entity.getInsuranceCompanyId() ); - insuranceInfoResp.setInsuranceCompanyName( entity.getInsuranceCompanyName() ); - insuranceInfoResp.setInsuranceBillCode( entity.getInsuranceBillCode() ); - insuranceInfoResp.setAttachInfoId( entity.getAttachInfoId() ); - insuranceInfoResp.setEffectiveDate( entity.getEffectiveDate() ); - insuranceInfoResp.setExpireDate( entity.getExpireDate() ); - insuranceInfoResp.setInsuranceAmount( entity.getInsuranceAmount() ); - insuranceInfoResp.setInsurancePremium( entity.getInsurancePremium() ); - - return insuranceInfoResp; - } - - @Override - public InsuranceInfoEntity toInsuranceInfoEntity(InsuranceInfoReq req) { - if ( req == null ) { - return null; - } - - InsuranceInfoEntity insuranceInfoEntity = new InsuranceInfoEntity(); - - insuranceInfoEntity.setUserId( req.getUserId() ); - insuranceInfoEntity.setInsuranceCompanyId( req.getInsuranceCompanyId() ); - insuranceInfoEntity.setInsuranceTypeId( req.getInsuranceTypeId() ); - insuranceInfoEntity.setInsuranceBillCode( req.getInsuranceBillCode() ); - insuranceInfoEntity.setAttachInfoId( req.getAttachInfoId() ); - insuranceInfoEntity.setEffectiveDate( req.getEffectiveDate() ); - insuranceInfoEntity.setExpireDate( req.getExpireDate() ); - insuranceInfoEntity.setInsurancePremium( req.getInsurancePremium() ); - insuranceInfoEntity.setInsuranceAmount( req.getInsuranceAmount() ); - insuranceInfoEntity.setRemark( req.getRemark() ); - - return insuranceInfoEntity; - } - - @Override - public AttachInfoResp toAttacheInfoResp(AttachInfoEntity entity) { - if ( entity == null ) { - return null; - } - - AttachInfoResp attachInfoResp = new AttachInfoResp(); - - attachInfoResp.setAttachId( entity.getAttachId() ); - attachInfoResp.setBusinessId( entity.getBusinessId() ); - attachInfoResp.setAttachPath( entity.getAttachPath() ); - attachInfoResp.setFileType( entity.getFileType() ); - attachInfoResp.setRemark( entity.getRemark() ); - attachInfoResp.setCreateTime( entity.getCreateTime() ); - - return attachInfoResp; - } - - @Override - public List toWorkShiftListResp(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( WorkShiftEntity workShiftEntity : list ) { - list1.add( workShiftEntityToWorkShiftListResp( workShiftEntity ) ); - } - - return list1; - } - - @Override - public WorkShiftResp toWorkShiftResp(WorkShiftEntity entity) { - if ( entity == null ) { - return null; - } - - WorkShiftResp workShiftResp = new WorkShiftResp(); - - workShiftResp.setWorkShiftId( entity.getWorkShiftId() ); - workShiftResp.setWorkShiftName( entity.getWorkShiftName() ); - workShiftResp.setWorkTimeStart( entity.getWorkTimeStart() ); - workShiftResp.setLateTimeOffset( entity.getLateTimeOffset() ); - workShiftResp.setLateTimeLimit( entity.getLateTimeLimit() ); - workShiftResp.setWorkTimeEnd( entity.getWorkTimeEnd() ); - workShiftResp.setEarlyTimeOffset( entity.getEarlyTimeOffset() ); - workShiftResp.setEarlyTimeLimit( entity.getEarlyTimeLimit() ); - workShiftResp.setRestTimeStart( entity.getRestTimeStart() ); - workShiftResp.setRestTimeEnd( entity.getRestTimeEnd() ); - workShiftResp.setWorkTime( entity.getWorkTime() ); - workShiftResp.setStatus( entity.getStatus() ); - - return workShiftResp; - } - - @Override - public WorkShiftEntity toWorkShiftEntity(WorkShiftReq req) { - if ( req == null ) { - return null; - } - - WorkShiftEntity workShiftEntity = new WorkShiftEntity(); - - workShiftEntity.setWorkShiftName( req.getWorkShiftName() ); - workShiftEntity.setWorkTimeStart( req.getWorkTimeStart() ); - workShiftEntity.setLateTimeOffset( req.getLateTimeOffset() ); - workShiftEntity.setLateTimeLimit( req.getLateTimeLimit() ); - workShiftEntity.setWorkTimeEnd( req.getWorkTimeEnd() ); - workShiftEntity.setEarlyTimeOffset( req.getEarlyTimeOffset() ); - workShiftEntity.setEarlyTimeLimit( req.getEarlyTimeLimit() ); - workShiftEntity.setRestTimeStart( req.getRestTimeStart() ); - workShiftEntity.setRestTimeEnd( req.getRestTimeEnd() ); - - return workShiftEntity; - } - - @Override - public List toMaintainSuggestionResp(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( MaintainSuggestionEntity maintainSuggestionEntity : list ) { - list1.add( toMaintainSuggestionResp( maintainSuggestionEntity ) ); - } - - return list1; - } - - @Override - public MaintainSuggestionResp toMaintainSuggestionResp(MaintainSuggestionEntity entity) { - if ( entity == null ) { - return null; - } - - MaintainSuggestionResp maintainSuggestionResp = new MaintainSuggestionResp(); - - maintainSuggestionResp.setSuggestionId( entity.getSuggestionId() ); - maintainSuggestionResp.setSuggestionContent( entity.getSuggestionContent() ); - maintainSuggestionResp.setDefectType( entity.getDefectType() ); - maintainSuggestionResp.setDefectLevel( entity.getDefectLevel() ); - - return maintainSuggestionResp; - } - - @Override - public MaintainSuggestionEntity toMaintainSuggestionEntity(MaintainSuggestionReq req) { - if ( req == null ) { - return null; - } - - MaintainSuggestionEntity maintainSuggestionEntity = new MaintainSuggestionEntity(); - - maintainSuggestionEntity.setSuggestionContent( req.getSuggestionContent() ); - maintainSuggestionEntity.setDefectLevel( req.getDefectLevel() ); - maintainSuggestionEntity.setDefectType( req.getDefectType() ); - - return maintainSuggestionEntity; - } - - @Override - public List toCheckSchemeResp(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( CheckSchemeEntity checkSchemeEntity : list ) { - list1.add( toCheckSchemeResp( checkSchemeEntity ) ); - } - - return list1; - } - - @Override - public CheckSchemeResp toCheckSchemeResp(CheckSchemeEntity entity) { - if ( entity == null ) { - return null; - } - - CheckSchemeResp checkSchemeResp = new CheckSchemeResp(); - - checkSchemeResp.setSchemeId( entity.getSchemeId() ); - checkSchemeResp.setWorkContent( entity.getWorkContent() ); - checkSchemeResp.setStaffConfig( entity.getStaffConfig() ); - checkSchemeResp.setDeviceConfig( entity.getDeviceConfig() ); - checkSchemeResp.setConstructionScheme( entity.getConstructionScheme() ); - checkSchemeResp.setCheckMethod( entity.getCheckMethod() ); - checkSchemeResp.setRemark( entity.getRemark() ); - - return checkSchemeResp; - } - - @Override - public CheckSchemeEntity toCheckSchemeEntity(CheckSchemeReq req) { - if ( req == null ) { - return null; - } - - CheckSchemeEntity checkSchemeEntity = new CheckSchemeEntity(); - - checkSchemeEntity.setWorkContent( req.getWorkContent() ); - checkSchemeEntity.setStaffConfig( req.getStaffConfig() ); - checkSchemeEntity.setDeviceConfig( req.getDeviceConfig() ); - checkSchemeEntity.setConstructionScheme( req.getConstructionScheme() ); - checkSchemeEntity.setCheckMethod( req.getCheckMethod() ); - checkSchemeEntity.setRemark( req.getRemark() ); - - return checkSchemeEntity; - } - - @Override - public InspectionReportEntity toInspectionReportEntity(InspectionReportReq req) { - if ( req == null ) { - return null; - } - - InspectionReportEntity inspectionReportEntity = new InspectionReportEntity(); - - inspectionReportEntity.setTitle( req.getTitle() ); - inspectionReportEntity.setSubTitle( req.getSubTitle() ); - inspectionReportEntity.setCoverImage( req.getCoverImage() ); - inspectionReportEntity.setProjectId( req.getProjectId() ); - inspectionReportEntity.setTurbineId( req.getTurbineId() ); - inspectionReportEntity.setCheckDate( req.getCheckDate() ); - inspectionReportEntity.setCheckContent( req.getCheckContent() ); - inspectionReportEntity.setCheckMethod( req.getCheckMethod() ); - inspectionReportEntity.setCheckUserId( req.getCheckUserId() ); - inspectionReportEntity.setReportWriter( req.getReportWriter() ); - inspectionReportEntity.setReportWriteTime( xmlGregorianCalendarToLocalDateTime( localDateToXmlGregorianCalendar( req.getReportWriteTime() ) ) ); - inspectionReportEntity.setReportReviewer( req.getReportReviewer() ); - inspectionReportEntity.setReportReviewTime( xmlGregorianCalendarToLocalDateTime( localDateToXmlGregorianCalendar( req.getReportReviewTime() ) ) ); - inspectionReportEntity.setReportAuditor( req.getReportAuditor() ); - inspectionReportEntity.setReportAuditTime( xmlGregorianCalendarToLocalDateTime( localDateToXmlGregorianCalendar( req.getReportAuditTime() ) ) ); - inspectionReportEntity.setReportStatus( req.getReportStatus() ); - - return inspectionReportEntity; - } - - @Override - public InspectionReportCheckInfo toInspectionReportCheckInfo(InspectionReportEntity entity) { - if ( entity == null ) { - return null; - } - - InspectionReportCheckInfo inspectionReportCheckInfo = new InspectionReportCheckInfo(); - - inspectionReportCheckInfo.setCheckDate( entity.getCheckDate() ); - inspectionReportCheckInfo.setCheckContent( entity.getCheckContent() ); - inspectionReportCheckInfo.setCheckMethod( entity.getCheckMethod() ); - inspectionReportCheckInfo.setCheckUserId( entity.getCheckUserId() ); - - return inspectionReportCheckInfo; - } - - @Override - public InspectionReportReportInfo toInspectionReportReportInfo(InspectionReportEntity entity) { - if ( entity == null ) { - return null; - } - - InspectionReportReportInfo inspectionReportReportInfo = new InspectionReportReportInfo(); - - inspectionReportReportInfo.setReportId( entity.getReportId() ); - inspectionReportReportInfo.setTitle( entity.getTitle() ); - inspectionReportReportInfo.setSubTitle( entity.getSubTitle() ); - inspectionReportReportInfo.setCoverImage( entity.getCoverImage() ); - inspectionReportReportInfo.setReportWriter( entity.getReportWriter() ); - inspectionReportReportInfo.setReportWriteTime( entity.getReportWriteTime() ); - inspectionReportReportInfo.setReportReviewer( entity.getReportReviewer() ); - inspectionReportReportInfo.setReportReviewTime( entity.getReportReviewTime() ); - inspectionReportReportInfo.setReportAuditor( entity.getReportAuditor() ); - inspectionReportReportInfo.setReportAuditTime( entity.getReportAuditTime() ); - - return inspectionReportReportInfo; - } - - @Override - public List toInspectionReportSchemeInfo(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( CheckSchemeEntity checkSchemeEntity : list ) { - list1.add( checkSchemeEntityToInspectionReportSchemeInfo( checkSchemeEntity ) ); - } - - return list1; - } - - @Override - public AttendanceRecordEntity toAttendanceRecordEntity(AttendanceRecordReq req) { - if ( req == null ) { - return null; - } - - AttendanceRecordEntity attendanceRecordEntity = new AttendanceRecordEntity(); - - attendanceRecordEntity.setRecordImage( req.getRecordImage() ); - attendanceRecordEntity.setRecordPosition( req.getRecordPosition() ); - attendanceRecordEntity.setRecordPositionLabel( req.getRecordPositionLabel() ); - - return attendanceRecordEntity; - } - - @Override - public List toAttendanceRecordResp(List list) { - if ( list == null ) { - return null; - } - - List list1 = new ArrayList( list.size() ); - for ( AttendanceRecordEntity attendanceRecordEntity : list ) { - list1.add( attendanceRecordEntityToAttendanceRecordResp( attendanceRecordEntity ) ); - } - - return list1; - } - - @Override - public EquipmentEntity toEquipmentUseRecordEntity(EquipmentReq req) { - if ( req == null ) { - return null; - } - - EquipmentEntity equipmentEntity = new EquipmentEntity(); - - equipmentEntity.setEquipmentName( req.getEquipmentName() ); - equipmentEntity.setEquipmentModel( req.getEquipmentModel() ); - equipmentEntity.setEquipmentType( req.getEquipmentType() ); - equipmentEntity.setEquipmentSn( req.getEquipmentSn() ); - - return equipmentEntity; - } - - @Override - public EquipmentUseRecordEntity toEquipmentUseRecordEntity(EquipmentUseRecordReq req) { - if ( req == null ) { - return null; - } - - EquipmentUseRecordEntity equipmentUseRecordEntity = new EquipmentUseRecordEntity(); - - equipmentUseRecordEntity.setUserId( req.getUserId() ); - equipmentUseRecordEntity.setProjectId( req.getProjectId() ); - equipmentUseRecordEntity.setRemark( req.getRemark() ); - - return equipmentUseRecordEntity; - } - - private static LocalDateTime xmlGregorianCalendarToLocalDateTime( XMLGregorianCalendar xcal ) { - if ( xcal == null ) { - return null; - } - - if ( xcal.getYear() != DatatypeConstants.FIELD_UNDEFINED - && xcal.getMonth() != DatatypeConstants.FIELD_UNDEFINED - && xcal.getDay() != DatatypeConstants.FIELD_UNDEFINED - && xcal.getHour() != DatatypeConstants.FIELD_UNDEFINED - && xcal.getMinute() != DatatypeConstants.FIELD_UNDEFINED - ) { - if ( xcal.getSecond() != DatatypeConstants.FIELD_UNDEFINED - && xcal.getMillisecond() != DatatypeConstants.FIELD_UNDEFINED ) { - return LocalDateTime.of( - xcal.getYear(), - xcal.getMonth(), - xcal.getDay(), - xcal.getHour(), - xcal.getMinute(), - xcal.getSecond(), - Duration.ofMillis( xcal.getMillisecond() ).getNano() - ); - } - else if ( xcal.getSecond() != DatatypeConstants.FIELD_UNDEFINED ) { - return LocalDateTime.of( - xcal.getYear(), - xcal.getMonth(), - xcal.getDay(), - xcal.getHour(), - xcal.getMinute(), - xcal.getSecond() - ); - } - else { - return LocalDateTime.of( - xcal.getYear(), - xcal.getMonth(), - xcal.getDay(), - xcal.getHour(), - xcal.getMinute() - ); - } - } - return null; - } - - private XMLGregorianCalendar localDateToXmlGregorianCalendar( LocalDate localDate ) { - if ( localDate == null ) { - return null; - } - - return datatypeFactory.newXMLGregorianCalendarDate( - localDate.getYear(), - localDate.getMonthValue(), - localDate.getDayOfMonth(), - DatatypeConstants.FIELD_UNDEFINED ); - } - - protected ImageEntity imageReqToImageEntity(ImageReq imageReq) { - if ( imageReq == null ) { - return null; - } - - ImageEntity imageEntity = new ImageEntity(); - - imageEntity.setImageId( imageReq.getImageId() ); - imageEntity.setImageName( imageReq.getImageName() ); - imageEntity.setImageSize( imageReq.getImageSize() ); - imageEntity.setImageWidth( imageReq.getImageWidth() ); - imageEntity.setImageHeight( imageReq.getImageHeight() ); - imageEntity.setImageResolution( imageReq.getImageResolution() ); - imageEntity.setXResolution( imageReq.getXResolution() ); - imageEntity.setYResolution( imageReq.getYResolution() ); - imageEntity.setResolutionUnits( imageReq.getResolutionUnits() ); - imageEntity.setFocalDistance( imageReq.getFocalDistance() ); - imageEntity.setFocalDistance35( imageReq.getFocalDistance35() ); - imageEntity.setShootingTime( imageReq.getShootingTime() ); - imageEntity.setCameraManufacturer( imageReq.getCameraManufacturer() ); - imageEntity.setCameraModel( imageReq.getCameraModel() ); - imageEntity.setLongitude( imageReq.getLongitude() ); - imageEntity.setLatitude( imageReq.getLatitude() ); - imageEntity.setAltitude( imageReq.getAltitude() ); - imageEntity.setGPS( imageReq.getGPS() ); - imageEntity.setImagePath( imageReq.getImagePath() ); - - return imageEntity; - } - - protected ImageSimpleReq outWorkDefectReqToImageSimpleReq(OutWorkDefectReq outWorkDefectReq) { - if ( outWorkDefectReq == null ) { - return null; - } - - ImageSimpleReq imageSimpleReq = new ImageSimpleReq(); - - imageSimpleReq.setPartId( outWorkDefectReq.getPartId() ); - imageSimpleReq.setImagePath( outWorkDefectReq.getImagePath() ); - - return imageSimpleReq; - } - - protected InsuranceAttachResp insuranceInfoEntityToInsuranceAttachResp(InsuranceInfoEntity insuranceInfoEntity) { - if ( insuranceInfoEntity == null ) { - return null; - } - - InsuranceAttachResp insuranceAttachResp = new InsuranceAttachResp(); - - insuranceAttachResp.setInsuranceInfoId( insuranceInfoEntity.getInsuranceInfoId() ); - insuranceAttachResp.setUserId( insuranceInfoEntity.getUserId() ); - insuranceAttachResp.setName( insuranceInfoEntity.getName() ); - insuranceAttachResp.setUserCode( insuranceInfoEntity.getUserCode() ); - insuranceAttachResp.setAttachInfoId( insuranceInfoEntity.getAttachInfoId() ); - insuranceAttachResp.setRemark( insuranceInfoEntity.getRemark() ); - insuranceAttachResp.setCreateTime( insuranceInfoEntity.getCreateTime() ); - - return insuranceAttachResp; - } - - protected WorkShiftListResp workShiftEntityToWorkShiftListResp(WorkShiftEntity workShiftEntity) { - if ( workShiftEntity == null ) { - return null; - } - - WorkShiftListResp workShiftListResp = new WorkShiftListResp(); - - workShiftListResp.setWorkShiftId( workShiftEntity.getWorkShiftId() ); - workShiftListResp.setWorkShiftName( workShiftEntity.getWorkShiftName() ); - workShiftListResp.setWorkTimeStart( workShiftEntity.getWorkTimeStart() ); - workShiftListResp.setWorkTimeEnd( workShiftEntity.getWorkTimeEnd() ); - workShiftListResp.setStatus( workShiftEntity.getStatus() ); - workShiftListResp.setCreateBy( workShiftEntity.getCreateBy() ); - workShiftListResp.setUpdateTime( workShiftEntity.getUpdateTime() ); - - return workShiftListResp; - } - - protected InspectionReportSchemeInfo checkSchemeEntityToInspectionReportSchemeInfo(CheckSchemeEntity checkSchemeEntity) { - if ( checkSchemeEntity == null ) { - return null; - } - - InspectionReportSchemeInfo inspectionReportSchemeInfo = new InspectionReportSchemeInfo(); - - inspectionReportSchemeInfo.setCheckMethod( checkSchemeEntity.getCheckMethod() ); - - return inspectionReportSchemeInfo; - } - - protected AttendanceRecordResp attendanceRecordEntityToAttendanceRecordResp(AttendanceRecordEntity attendanceRecordEntity) { - if ( attendanceRecordEntity == null ) { - return null; - } - - AttendanceRecordResp attendanceRecordResp = new AttendanceRecordResp(); - - attendanceRecordResp.setRecordId( attendanceRecordEntity.getRecordId() ); - attendanceRecordResp.setUserId( attendanceRecordEntity.getUserId() ); - attendanceRecordResp.setRecordType( attendanceRecordEntity.getRecordType() ); - attendanceRecordResp.setAttendanceDate( attendanceRecordEntity.getAttendanceDate() ); - attendanceRecordResp.setRecordTime( attendanceRecordEntity.getRecordTime() ); - attendanceRecordResp.setRecordImage( attendanceRecordEntity.getRecordImage() ); - attendanceRecordResp.setRecordPosition( attendanceRecordEntity.getRecordPosition() ); - attendanceRecordResp.setRecordPositionLabel( attendanceRecordEntity.getRecordPositionLabel() ); - - return attendanceRecordResp; - } -} -