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