|
|
|
@ -29,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
@ -198,6 +199,21 @@ public class CarCheckRecordServiceImpl extends ServiceImpl<CarCheckRecordMapper,
|
|
|
|
|
public void exportCarCheckRecordData(Long id, HttpServletResponse response) { |
|
|
|
|
CarCheckRecordDetailVO carCheckRecordDetailVO = this.getCarCheckRecord(id); |
|
|
|
|
// 数据处理
|
|
|
|
|
// 检查项
|
|
|
|
|
List<CarCheckItemEntity> checkList = carCheckRecordDetailVO.getCheckItemList(); |
|
|
|
|
List<CarCheckItemEntity> res = new ArrayList<>(); |
|
|
|
|
checkList.forEach(item -> { |
|
|
|
|
String[] checkContent = item.getCheckContent().split(","); |
|
|
|
|
String[] checkResult = item.getCheckResult().split(","); |
|
|
|
|
for (int i = 0; i < checkContent.length; i++) { |
|
|
|
|
CarCheckItemEntity carCheckItemEntity = new CarCheckItemEntity(); |
|
|
|
|
carCheckItemEntity.setCheckItem(item.getCheckItem()); |
|
|
|
|
carCheckItemEntity.setCheckContent(checkContent[i]); |
|
|
|
|
carCheckItemEntity.setCheckResult(checkResult[i]); |
|
|
|
|
res.add(carCheckItemEntity); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
carCheckRecordDetailVO.setCheckItemList(res); |
|
|
|
|
// 表头年月
|
|
|
|
|
String code = carCheckRecordDetailVO.getCode(); |
|
|
|
|
carCheckRecordDetailVO.setYear(code.substring(4, 8)); |
|
|
|
|