|
@@ -17,7 +17,17 @@ import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
import com.xjrsoft.module.app.dto.UpdateEnableMarkDto;
|
|
import com.xjrsoft.module.app.dto.UpdateEnableMarkDto;
|
|
import com.xjrsoft.module.form.dto.FormExecuteInfoDto;
|
|
import com.xjrsoft.module.form.dto.FormExecuteInfoDto;
|
|
import com.xjrsoft.module.form.service.IFormExecuteService;
|
|
import com.xjrsoft.module.form.service.IFormExecuteService;
|
|
-import com.xjrsoft.module.material.dto.*;
|
|
|
|
|
|
+import com.xjrsoft.module.material.dto.AddMaterialTaskAssignDto;
|
|
|
|
+import com.xjrsoft.module.material.dto.AddMaterialTaskDto;
|
|
|
|
+import com.xjrsoft.module.material.dto.FormDataExportQueryDto;
|
|
|
|
+import com.xjrsoft.module.material.dto.MaterialTaskAssignAppendixDto;
|
|
|
|
+import com.xjrsoft.module.material.dto.MaterialTaskAssignApprovedDto;
|
|
|
|
+import com.xjrsoft.module.material.dto.MaterialTaskAssignListDto;
|
|
|
|
+import com.xjrsoft.module.material.dto.MaterialTaskAssignPageDto;
|
|
|
|
+import com.xjrsoft.module.material.dto.MaterialTaskPageDto;
|
|
|
|
+import com.xjrsoft.module.material.dto.MaterialTaskWaitPageDto;
|
|
|
|
+import com.xjrsoft.module.material.dto.UpdateMaterialTaskDto;
|
|
|
|
+import com.xjrsoft.module.material.dto.ViewContentDto;
|
|
import com.xjrsoft.module.material.entity.MaterialTask;
|
|
import com.xjrsoft.module.material.entity.MaterialTask;
|
|
import com.xjrsoft.module.material.entity.MaterialTaskAssign;
|
|
import com.xjrsoft.module.material.entity.MaterialTaskAssign;
|
|
import com.xjrsoft.module.material.entity.MaterialType;
|
|
import com.xjrsoft.module.material.entity.MaterialType;
|
|
@@ -183,21 +193,9 @@ public class MaterialTaskController {
|
|
@PostMapping("/export-query")
|
|
@PostMapping("/export-query")
|
|
@ApiOperation(value = "导出")
|
|
@ApiOperation(value = "导出")
|
|
public ResponseEntity<byte[]> exportData(@Valid @RequestBody MaterialTaskAssignListDto dto) {
|
|
public ResponseEntity<byte[]> exportData(@Valid @RequestBody MaterialTaskAssignListDto dto) {
|
|
- MPJLambdaWrapper<MaterialTask> queryWrapper = new MPJLambdaWrapper<>();
|
|
|
|
- queryWrapper
|
|
|
|
- .orderByDesc(MaterialTask::getId)
|
|
|
|
- .eq(MaterialTask::getCreateUserId, StpUtil.getLoginIdAsLong())
|
|
|
|
- .like(StrUtil.isNotBlank(dto.getName()), MaterialTask::getName, dto.getName())
|
|
|
|
- .select(MaterialTask::getId)
|
|
|
|
- .selectAs(MaterialType::getName, MaterialTaskPageVo::getMaterialTypeIdCn)
|
|
|
|
- .selectAs(MaterialType::getCreateDate, MaterialTaskPageVo::getCreateDate)
|
|
|
|
- .select(MaterialTask.class, x -> VoToColumnUtil.fieldsToColumns(MaterialTaskPageVo.class).contains(x.getProperty()))
|
|
|
|
- .leftJoin(MaterialType.class, MaterialType::getId, MaterialTask::getMaterialTypeId);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- List<MaterialTaskPageVo> customerList = materialTaskService.selectJoinList(MaterialTaskPageVo.class, queryWrapper);
|
|
|
|
|
|
+ List<MaterialTaskAssignListVo> customerList = materialTaskService.assignList(dto);
|
|
ByteArrayOutputStream bot = new ByteArrayOutputStream();
|
|
ByteArrayOutputStream bot = new ByteArrayOutputStream();
|
|
- EasyExcel.write(bot, MaterialTaskPageVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);
|
|
|
|
|
|
+ EasyExcel.write(bot, MaterialTaskAssignListVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);
|
|
|
|
|
|
return RT.fileStream(bot.toByteArray(), "MaterialTask" + ExcelTypeEnum.XLSX.getValue());
|
|
return RT.fileStream(bot.toByteArray(), "MaterialTask" + ExcelTypeEnum.XLSX.getValue());
|
|
}
|
|
}
|