commit
This commit is contained in:
+2
-1
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.healthCheckup.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
@@ -112,7 +113,7 @@ public class HealthCheckupCampusController {
|
||||
|
||||
@At
|
||||
@ApiOperation("查询所有院区")
|
||||
@SaCheckPermission("healthCheckup.campus")
|
||||
@SaCheckLogin
|
||||
public Result queryCampus() {
|
||||
try {
|
||||
List<HealthCheckupCampus> campusList = baseService.dao().query(HealthCheckupCampus.class, Cnd.NEW().asc("campusCode"));
|
||||
|
||||
+10
-9
@@ -65,6 +65,7 @@ import org.nutz.mvc.upload.UploadAdaptor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -170,6 +171,9 @@ public class HealthCheckupListController {
|
||||
public Result doAuditUser(String projectId,
|
||||
String unionId,
|
||||
Boolean flag) {
|
||||
if (StrUtil.isBlank(unionId)) {
|
||||
unionId = SecurityUtil.getUnionId();
|
||||
}
|
||||
if (flag) {
|
||||
dao.update(HealthCheckupUnionConfirm.class, Chain.make("isAudit", true)
|
||||
.add("auditTime", DateUtil.date())
|
||||
@@ -281,15 +285,12 @@ public class HealthCheckupListController {
|
||||
@ApiOperation("下载体检参加人员导入模版")
|
||||
@SaCheckPermission("healthCheckup.list.mange")
|
||||
public void downloadTem(HttpServletResponse response) {
|
||||
try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();) {
|
||||
|
||||
EasyExcel.write(byteArrayOutputStream, HealthCheckupImportTemp.class)
|
||||
.sheet("参加人员导入模版")
|
||||
.doWrite(ArrayList::new);
|
||||
CommonDownloadUtil.download("参加人员导入模版.xlsx", byteArrayOutputStream.toByteArray(), response);
|
||||
} catch (Exception e) {
|
||||
log.error("下载参加人员导入模版失败", e);
|
||||
}
|
||||
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||
entities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||
entities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
ExportParams exportParams = new ExportParams();
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList());
|
||||
CommonDownloadUtil.download("参加人员导入模版.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -35,6 +35,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -270,6 +271,7 @@ public class HealthCheckupSingleController {
|
||||
selection.setSelectUserId(v);
|
||||
selection.setCampus(campus);
|
||||
selection.setSubjectId(optionId);
|
||||
selection.setSelectTime(new Date());
|
||||
return selection;
|
||||
}).collect(Collectors.toList());
|
||||
manyAddOrRenewUtil.asyncExecuteFastInsert(selections,null);
|
||||
|
||||
+3
-2
@@ -53,9 +53,10 @@ public class HealthCheckupProjectServiceImpl extends BaseServiceImpl<HealthCheck
|
||||
|
||||
@Override
|
||||
public HealthCheckupProject findOne(String id) {
|
||||
if (Strings.isBlank(id)){
|
||||
return null;
|
||||
}
|
||||
HealthCheckupProject project = fetchLinks(fetch(id), "healthCheckupProjectSubjects", Cnd.NEW().asc("optionSort"));
|
||||
|
||||
|
||||
return project;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user