|
|
@ -7,7 +7,6 @@ import com.hnac.hzims.operational.access.entity.OperConstructionEntity; |
|
|
|
import com.hnac.hzims.operational.access.mapper.ConstructionMapper; |
|
|
|
import com.hnac.hzims.operational.access.mapper.ConstructionMapper; |
|
|
|
import com.hnac.hzims.operational.access.service.ConstructionService; |
|
|
|
import com.hnac.hzims.operational.access.service.ConstructionService; |
|
|
|
import com.hnac.hzims.operational.access.vo.ConstructionVo; |
|
|
|
import com.hnac.hzims.operational.access.vo.ConstructionVo; |
|
|
|
import com.hnac.hzims.operational.access.wrapper.ConstructionWrapper; |
|
|
|
|
|
|
|
import com.hnac.hzims.operational.util.ExcelUtil; |
|
|
|
import com.hnac.hzims.operational.util.ExcelUtil; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
@ -15,7 +14,6 @@ import org.apache.poi.ss.usermodel.Workbook; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
|
|
|
|
import org.springblade.core.tool.utils.ObjectUtil; |
|
|
|
import org.springblade.core.tool.utils.ObjectUtil; |
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
@ -57,9 +55,7 @@ public class ConstructionServiceImpl extends BaseServiceImpl<ConstructionMapper, |
|
|
|
if(StringUtil.isNotBlank(construction.getEndTime())){ |
|
|
|
if(StringUtil.isNotBlank(construction.getEndTime())){ |
|
|
|
wrapper.le("CREATE_TIME",construction.getEndTime()); |
|
|
|
wrapper.le("CREATE_TIME",construction.getEndTime()); |
|
|
|
} |
|
|
|
} |
|
|
|
IPage pages = super.page(page, wrapper); |
|
|
|
return super.page(page, wrapper); |
|
|
|
pages.setRecords(ConstructionWrapper.build().listVO(pages.getRecords())); |
|
|
|
|
|
|
|
return pages; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -71,7 +67,7 @@ public class ConstructionServiceImpl extends BaseServiceImpl<ConstructionMapper, |
|
|
|
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); |
|
|
|
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); |
|
|
|
HttpServletResponse response = servletRequestAttributes.getResponse(); |
|
|
|
HttpServletResponse response = servletRequestAttributes.getResponse(); |
|
|
|
//准备数据
|
|
|
|
//准备数据
|
|
|
|
ConstructionVo construction = this.record(id); |
|
|
|
OperConstructionEntity construction = this.record(id); |
|
|
|
Map<String,Object> params = new HashMap<>(); |
|
|
|
Map<String,Object> params = new HashMap<>(); |
|
|
|
/*try { |
|
|
|
/*try { |
|
|
|
params = PdfUtils.objectToMap(construction); |
|
|
|
params = PdfUtils.objectToMap(construction); |
|
|
@ -106,11 +102,11 @@ public class ConstructionServiceImpl extends BaseServiceImpl<ConstructionMapper, |
|
|
|
* @param id |
|
|
|
* @param id |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private ConstructionVo record(Long id) { |
|
|
|
private OperConstructionEntity record(Long id) { |
|
|
|
OperConstructionEntity entity = this.getById(id); |
|
|
|
OperConstructionEntity entity = this.getById(id); |
|
|
|
if(ObjectUtil.isEmpty(entity)){ |
|
|
|
if(ObjectUtil.isEmpty(entity)){ |
|
|
|
throw new ServiceException("施工日志记录不存在!"); |
|
|
|
throw new ServiceException("施工日志记录不存在!"); |
|
|
|
} |
|
|
|
} |
|
|
|
return ConstructionWrapper.build().entityVO(entity); |
|
|
|
return entity; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |