Browse Source

feat:[试验管理][预填表单审核]

master
15881625488@163.com 1 week ago
parent
commit
cf32d02427
3 changed files with 48 additions and 4 deletions
  1. +39
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java
  2. +8
    -3
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java
  3. +1
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPreMapper.xml

+ 39
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java View File

@ -0,0 +1,39 @@
package com.hxhq.business.controller;
import com.hxhq.business.domain.Template;
import com.hxhq.business.service.ITemplateService;
import com.hxhq.common.core.web.controller.BaseController;
import com.hxhq.common.core.web.domain.AjaxResult;
import com.hxhq.common.core.web.page.TableDataInfo;
import com.hxhq.common.security.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 公共Controller
*
* @author hxhq
* @date 2025-12-23
*/
@RestController
@RequestMapping("/business/public")
public class PublicController extends BaseController
{
@Autowired
private ITemplateService templateService;
/**
* 查询模板列表
*/
@GetMapping("/templateList")
public TableDataInfo list(Template template)
{
startPage();
List<Template> list = templateService.queryList(template);
return getDataTable(list);
}
}

+ 8
- 3
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java View File

@ -74,11 +74,16 @@ public class StudyFormPreServiceImpl extends ServiceImpl
if(studyFormPreOld==null){ if(studyFormPreOld==null){
throw new SecurityException("信息不存在或已删除"); throw new SecurityException("信息不存在或已删除");
} }
if(SecurityUtils.getUserId().equals(studyFormPreOld.getUserId())){
if(!SecurityUtils.getUserId().equals(studyFormPreOld.getUserId())){
throw new SecurityException("只能操作自己的表单"); throw new SecurityException("只能操作自己的表单");
} }
this.updateById(studyFormPre);
studyFormPreOld.setBdmc(studyFormPre.getBdmc());
studyFormPreOld.setTemplateMc(studyFormPre.getTemplateMc());
studyFormPreOld.setTemplateId(studyFormPre.getTemplateId());
studyFormPreOld.setBdnr(studyFormPre.getBdnr());
this.updateById(studyFormPreOld);
}else{ }else{
studyFormPre.setBdbh("todo");
studyFormPre.setUserId(SecurityUtils.getUserId()); studyFormPre.setUserId(SecurityUtils.getUserId());
studyFormPre.setUserMc(SecurityUtils.getLoginUser().getSysUser().getNickName()); studyFormPre.setUserMc(SecurityUtils.getLoginUser().getSysUser().getNickName());
studyFormPre.setBdzt(StudyFormPreBdztEnum.tbz.getValue()); studyFormPre.setBdzt(StudyFormPreBdztEnum.tbz.getValue());
@ -98,7 +103,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
if(studyFormPreOld==null){ if(studyFormPreOld==null){
throw new SecurityException("信息不存在或已删除"); throw new SecurityException("信息不存在或已删除");
} }
if(SecurityUtils.getUserId().equals(studyFormPreOld.getUserId())){
if(!SecurityUtils.getUserId().equals(studyFormPreOld.getUserId())){
throw new SecurityException("只能操作自己的表单"); throw new SecurityException("只能操作自己的表单");
} }
studyFormPre.setBdzt(StudyFormPreBdztEnum.ytj.getValue()); studyFormPre.setBdzt(StudyFormPreBdztEnum.ytj.getValue());

+ 1
- 1
hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPreMapper.xml View File

@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hxhq.business.mapper.StudyFormPreMapper"> <mapper namespace="com.hxhq.business.mapper.StudyFormPreMapper">
<select id="queryList" resultType="com.hxhq.business.dto.study.StudyFormPreListDto"> <select id="queryList" resultType="com.hxhq.business.dto.study.StudyFormPreListDto">
select t.id,t.bdbh,t.bdmc,t.template_mc,t.create_time,t.user_mc,t.bdzt
select t.id,t.bdbh,t.bdmc,t.template_mc,t.create_time,t.user_mc,t.bdzt,t.bdzt
FROM `t_study_form_pre` t FROM `t_study_form_pre` t
<if test="ew.sqlSegment != '' and ew.sqlSegment != null"> <if test="ew.sqlSegment != '' and ew.sqlSegment != null">
<where> <where>

Loading…
Cancel
Save