18 changed files with 702 additions and 4 deletions
@ -0,0 +1,127 @@ |
|||
package com.qs.serve.modules.biz.controller; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.qs.serve.common.model.annotation.SysLog; |
|||
import com.qs.serve.common.model.dto.PageVo; |
|||
import com.qs.serve.common.model.dto.R; |
|||
import com.qs.serve.common.model.enums.BizType; |
|||
import com.qs.serve.common.model.enums.SystemModule; |
|||
import com.qs.serve.common.util.PageUtil; |
|||
import com.qs.serve.common.util.CopierUtil; |
|||
import com.qs.serve.common.util.StringUtils; |
|||
import com.qs.serve.modules.biz.entity.BizVisitForm; |
|||
import com.qs.serve.modules.biz.entity.so.BizSignTypeQuery; |
|||
import com.qs.serve.modules.biz.entity.vo.BizSignTypeVo; |
|||
import com.qs.serve.modules.biz.service.BizVisitFormService; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import com.qs.serve.modules.biz.entity.BizSignType; |
|||
import com.qs.serve.modules.biz.service.BizSignTypeService; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 定位打卡-业务类型 |
|||
* @author YenHex |
|||
* @since 2024-09-04 |
|||
*/ |
|||
@Slf4j |
|||
@AllArgsConstructor |
|||
@RestController |
|||
@RequestMapping("biz/signType") |
|||
public class BizSignTypeController { |
|||
|
|||
private BizSignTypeService bizSignTypeService; |
|||
private BizVisitFormService bizVisitFormService; |
|||
|
|||
/** |
|||
* 列表 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@GetMapping("/list") |
|||
public R<List<BizSignTypeVo>> getList(BizSignTypeQuery param){ |
|||
List<BizSignTypeVo> list = bizSignTypeService.selectSignTypes(param); |
|||
return R.ok(list); |
|||
} |
|||
|
|||
/** |
|||
* 翻页 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@GetMapping("/page") |
|||
public R<PageVo<BizSignTypeVo>> getPage(BizSignTypeQuery param){ |
|||
PageUtil.startPage(); |
|||
List<BizSignTypeVo> list = bizSignTypeService.selectSignTypes(param); |
|||
return R.byPageHelperList(list); |
|||
} |
|||
|
|||
/** |
|||
* ID查询 |
|||
* @param id |
|||
* @return |
|||
*/ |
|||
@GetMapping("/getById/{id}") |
|||
@SysLog(module = SystemModule.BIZ, title = "", biz = BizType.QUERY) |
|||
@PreAuthorize("hasRole('biz:signType:query')") |
|||
public R<BizSignTypeVo> getById(@PathVariable("id") String id){ |
|||
BizSignType bizSignType = bizSignTypeService.getById(id); |
|||
BizSignTypeVo typeVo = CopierUtil.copy(bizSignType, new BizSignTypeVo()); |
|||
BizVisitForm form = bizVisitFormService.getById(bizSignType.getTemplateId()); |
|||
if(form!=null){ |
|||
typeVo.setVersion(form.getVersion()); |
|||
typeVo.setTemplateName(form.getTitle()); |
|||
typeVo.setFormContext(form.getFormContext()); |
|||
} |
|||
return R.ok(typeVo); |
|||
} |
|||
|
|||
|
|||
|
|||
/** |
|||
* 更新 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@PostMapping("/updateById") |
|||
@SysLog(module = SystemModule.BIZ, title = "", biz = BizType.UPDATE) |
|||
//@PreAuthorize("hasRole('biz:signType:update')")
|
|||
public R<?> updateById(@RequestBody @Valid BizSignType param){ |
|||
BizSignType entity = CopierUtil.copy(param,new BizSignType()); |
|||
boolean result = bizSignTypeService.updateById(entity); |
|||
return R.isTrue(result); |
|||
} |
|||
|
|||
/** |
|||
* 新增 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@PostMapping("/save") |
|||
@SysLog(module = SystemModule.BIZ, title = "", biz = BizType.INSERT) |
|||
public R<?> save(@RequestBody @Valid BizSignType param){ |
|||
BizSignType entity = CopierUtil.copy(param,new BizSignType()); |
|||
boolean result = bizSignTypeService.save(entity); |
|||
return R.isTrue(result); |
|||
} |
|||
|
|||
/** |
|||
* 删除 |
|||
* @param ids |
|||
* @return |
|||
*/ |
|||
@DeleteMapping("/deleteById/{ids}") |
|||
@SysLog(module = SystemModule.BIZ, title = "", biz = BizType.DELETE) |
|||
public R<?> deleteById(@PathVariable("ids") String ids){ |
|||
List<Long> idsLong = StringUtils.splitIdLong(ids); |
|||
boolean result = bizSignTypeService.removeByIds(idsLong); |
|||
return R.isTrue(result); |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,121 @@ |
|||
package com.qs.serve.modules.biz.controller; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.qs.serve.common.model.annotation.SysLog; |
|||
import com.qs.serve.common.model.dto.PageVo; |
|||
import com.qs.serve.common.model.dto.R; |
|||
import com.qs.serve.common.model.enums.BizType; |
|||
import com.qs.serve.common.model.enums.SystemModule; |
|||
import com.qs.serve.common.util.PageUtil; |
|||
import com.qs.serve.common.util.CopierUtil; |
|||
import com.qs.serve.common.util.StringUtils; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import com.qs.serve.modules.biz.entity.BizVisitForm; |
|||
import com.qs.serve.modules.biz.service.BizVisitFormService; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 定位打卡-模板表单 |
|||
* @author YenHex |
|||
* @since 2024-09-05 |
|||
*/ |
|||
@Slf4j |
|||
@AllArgsConstructor |
|||
@RestController |
|||
@RequestMapping("biz/visitForm") |
|||
public class BizVisitFormController { |
|||
|
|||
private BizVisitFormService bizVisitFormService; |
|||
|
|||
/** |
|||
* 列表 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@GetMapping("/list") |
|||
//@PreAuthorize("hasRole('biz:visitForm:query')")
|
|||
public R<List<BizVisitForm>> getList(BizVisitForm param){ |
|||
LambdaQueryWrapper<BizVisitForm> lqw = new LambdaQueryWrapper<>(param); |
|||
List<BizVisitForm> list = bizVisitFormService.list(lqw); |
|||
return R.ok(list); |
|||
} |
|||
|
|||
/** |
|||
* 翻页 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@GetMapping("/page") |
|||
//@PreAuthorize("hasRole('biz:visitForm:query')")
|
|||
public R<PageVo<BizVisitForm>> getPage(BizVisitForm param){ |
|||
LambdaQueryWrapper<BizVisitForm> lqw = new LambdaQueryWrapper<>(param); |
|||
PageUtil.startPage(); |
|||
List<BizVisitForm> list = bizVisitFormService.list(lqw); |
|||
return R.byPageHelperList(list); |
|||
} |
|||
|
|||
/** |
|||
* ID查询 |
|||
* @param id |
|||
* @return |
|||
*/ |
|||
@GetMapping("/getById/{id}") |
|||
@SysLog(module = SystemModule.BIZ, title = "科目表单", biz = BizType.QUERY) |
|||
@PreAuthorize("hasRole('biz:visitForm:query')") |
|||
public R<BizVisitForm> getById(@PathVariable("id") String id){ |
|||
BizVisitForm bizVisitForm = bizVisitFormService.getById(id); |
|||
return R.ok(bizVisitForm); |
|||
} |
|||
|
|||
|
|||
|
|||
/** |
|||
* 更新 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@PostMapping("/updateById") |
|||
@SysLog(module = SystemModule.BIZ, title = "科目表单", biz = BizType.UPDATE) |
|||
//@PreAuthorize("hasRole('biz:visitForm:update')")
|
|||
public R<?> updateById(@RequestBody @Valid BizVisitForm param){ |
|||
BizVisitForm entity = CopierUtil.copy(param,new BizVisitForm()); |
|||
boolean result = bizVisitFormService.updateById(entity); |
|||
return R.isTrue(result); |
|||
} |
|||
|
|||
/** |
|||
* 新增 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@PostMapping("/save") |
|||
@SysLog(module = SystemModule.BIZ, title = "科目表单", biz = BizType.INSERT) |
|||
//@PreAuthorize("hasRole('biz:visitForm:insert')")
|
|||
public R<?> save(@RequestBody @Valid BizVisitForm param){ |
|||
BizVisitForm entity = CopierUtil.copy(param,new BizVisitForm()); |
|||
boolean result = bizVisitFormService.save(entity); |
|||
return R.isTrue(result); |
|||
} |
|||
|
|||
/** |
|||
* 删除 |
|||
* @param ids |
|||
* @return |
|||
*/ |
|||
@DeleteMapping("/deleteById/{ids}") |
|||
@SysLog(module = SystemModule.BIZ, title = "科目表单", biz = BizType.DELETE) |
|||
//@PreAuthorize("hasRole('biz:visitForm:delete')")
|
|||
public R<?> deleteById(@PathVariable("ids") String ids){ |
|||
List<Long> idsLong = StringUtils.splitIdLong(ids); |
|||
boolean result = bizVisitFormService.removeByIds(idsLong); |
|||
return R.isTrue(result); |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,94 @@ |
|||
package com.qs.serve.modules.biz.entity; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* 实体类 |
|||
* @author YenHex |
|||
* @since 2024-09-04 |
|||
*/ |
|||
@Data |
|||
@TableName("biz_sign_type") |
|||
public class BizSignType implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** ID */ |
|||
@TableId(type = IdType.AUTO) |
|||
private String id; |
|||
|
|||
/** 签到类型 */ |
|||
@NotBlank(message = "签到类型不能为空") |
|||
@Length(max = 255,message = "签到类型长度不能超过255字") |
|||
private String typeName; |
|||
|
|||
/** 模板ID */ |
|||
@Length(max = 255,message = "模板ID长度不能超过255字") |
|||
private String templateId; |
|||
|
|||
/** 备注 */ |
|||
@Length(max = 255,message = "备注长度不能超过255字") |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** 所属租户 */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String tenantId; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String delFlag; |
|||
|
|||
/** 创建人 */ |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private String updateBy; |
|||
|
|||
|
|||
public static BizSignType toNewObject(BizSignType source){ |
|||
BizSignType signType = new BizSignType(); |
|||
signType.setId(source.getId()); |
|||
signType.setTypeName(source.getTypeName()); |
|||
signType.setTemplateId(source.getTemplateId()); |
|||
signType.setRemark(source.getRemark()); |
|||
signType.setCreateTime(source.getCreateTime()); |
|||
signType.setUpdateTime(source.getUpdateTime()); |
|||
signType.setTenantId(source.getTenantId()); |
|||
signType.setDelFlag(source.getDelFlag()); |
|||
signType.setCreateBy(source.getCreateBy()); |
|||
signType.setUpdateBy(source.getUpdateBy()); |
|||
return signType; |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,108 @@ |
|||
package com.qs.serve.modules.biz.entity; |
|||
|
|||
import java.time.LocalDate; |
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* 科目表单 实体类 |
|||
* @author YenHex |
|||
* @since 2024-09-05 |
|||
*/ |
|||
@Data |
|||
@TableName("biz_visit_form") |
|||
public class BizVisitForm implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
@TableId(type = IdType.AUTO) |
|||
private Long id; |
|||
|
|||
/** 标题 */ |
|||
@NotBlank(message = "标题不能为空") |
|||
@Length(max = 40,message = "标题长度不能超过40字") |
|||
private String title; |
|||
|
|||
/** 子标题 */ |
|||
@Length(max = 255,message = "子标题长度不能超过255字") |
|||
private String subtitle; |
|||
|
|||
/** 描述 */ |
|||
@Length(max = 255,message = "描述长度不能超过255字") |
|||
private String descr; |
|||
|
|||
/** 表单json */ |
|||
@NotBlank(message = "表单json不能为空") |
|||
@Length(max = 0,message = "表单json长度不能超过0字") |
|||
private String formContext; |
|||
|
|||
/** 表单版本 */ |
|||
private Integer version; |
|||
|
|||
/** 表单类型 */ |
|||
private Integer formType; |
|||
|
|||
/** 创建时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 创建人 */ |
|||
@TableField(fill = FieldFill.INSERT) |
|||
private String createBy; |
|||
|
|||
/** 更新时间 */ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private LocalDateTime updateTime; |
|||
|
|||
/** 更新人 */ |
|||
@TableField(fill = FieldFill.UPDATE) |
|||
private String updateBy; |
|||
|
|||
/** 租户id */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private String tenantId; |
|||
|
|||
/** 删除标识 */ |
|||
@JsonIgnore |
|||
@JsonProperty |
|||
private Boolean delFlag; |
|||
|
|||
|
|||
public static BizVisitForm toNewObject(BizVisitForm source){ |
|||
BizVisitForm visitForm = new BizVisitForm(); |
|||
visitForm.setId(source.getId()); |
|||
visitForm.setTitle(source.getTitle()); |
|||
visitForm.setSubtitle(source.getSubtitle()); |
|||
visitForm.setDescr(source.getDescr()); |
|||
visitForm.setFormContext(source.getFormContext()); |
|||
visitForm.setVersion(source.getVersion()); |
|||
visitForm.setFormType(source.getFormType()); |
|||
visitForm.setCreateTime(source.getCreateTime()); |
|||
visitForm.setCreateBy(source.getCreateBy()); |
|||
visitForm.setUpdateTime(source.getUpdateTime()); |
|||
visitForm.setUpdateBy(source.getUpdateBy()); |
|||
visitForm.setTenantId(source.getTenantId()); |
|||
visitForm.setDelFlag(source.getDelFlag()); |
|||
return visitForm; |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,15 @@ |
|||
package com.qs.serve.modules.biz.entity.so; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author YenHex |
|||
* @since 2024/9/5 |
|||
*/ |
|||
@Data |
|||
public class BizSignTypeQuery { |
|||
|
|||
private String typeName; |
|||
private String templateId; |
|||
private String templateName; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.qs.serve.modules.biz.entity.vo; |
|||
|
|||
import com.qs.serve.modules.biz.entity.BizSignType; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author YenHex |
|||
* @since 2024/9/5 |
|||
*/ |
|||
@Data |
|||
public class BizSignTypeVo extends BizSignType { |
|||
|
|||
private String templateName; |
|||
|
|||
/** 表单内容 */ |
|||
private String formContext; |
|||
|
|||
/** 表单版本 */ |
|||
private Integer version; |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.qs.serve.modules.biz.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.qs.serve.modules.biz.entity.BizSignType; |
|||
import com.qs.serve.modules.biz.entity.so.BizSignTypeQuery; |
|||
import com.qs.serve.modules.biz.entity.vo.BizSignTypeVo; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Mapper |
|||
* @author YenHex |
|||
* @date 2024-09-04 |
|||
*/ |
|||
public interface BizSignTypeMapper extends BaseMapper<BizSignType> { |
|||
|
|||
List<BizSignTypeVo> selectBizSignTypeVoList(@Param("query") BizSignTypeQuery query); |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.biz.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.qs.serve.modules.biz.entity.BizVisitForm; |
|||
|
|||
/** |
|||
* 科目表单 Mapper |
|||
* @author YenHex |
|||
* @date 2024-09-05 |
|||
*/ |
|||
public interface BizVisitFormMapper extends BaseMapper<BizVisitForm> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,20 @@ |
|||
package com.qs.serve.modules.biz.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.qs.serve.modules.biz.entity.BizSignType; |
|||
import com.qs.serve.modules.biz.entity.so.BizSignTypeQuery; |
|||
import com.qs.serve.modules.biz.entity.vo.BizSignTypeVo; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 服务接口 |
|||
* @author YenHex |
|||
* @date 2024-09-04 |
|||
*/ |
|||
public interface BizSignTypeService extends IService<BizSignType> { |
|||
|
|||
List<BizSignTypeVo> selectSignTypes(BizSignTypeQuery query); |
|||
|
|||
} |
|||
|
@ -0,0 +1,14 @@ |
|||
package com.qs.serve.modules.biz.service; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.IService; |
|||
import com.qs.serve.modules.biz.entity.BizVisitForm; |
|||
|
|||
/** |
|||
* 科目表单 服务接口 |
|||
* @author YenHex |
|||
* @date 2024-09-05 |
|||
*/ |
|||
public interface BizVisitFormService extends IService<BizVisitForm> { |
|||
|
|||
} |
|||
|
@ -0,0 +1,31 @@ |
|||
package com.qs.serve.modules.biz.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import com.qs.serve.modules.biz.entity.so.BizSignTypeQuery; |
|||
import com.qs.serve.modules.biz.entity.vo.BizSignTypeVo; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import com.qs.serve.modules.biz.entity.BizSignType; |
|||
import com.qs.serve.modules.biz.service.BizSignTypeService; |
|||
import com.qs.serve.modules.biz.mapper.BizSignTypeMapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 服务实现类 |
|||
* @author YenHex |
|||
* @since 2024-09-04 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@AllArgsConstructor |
|||
public class BizSignTypeServiceImpl extends ServiceImpl<BizSignTypeMapper,BizSignType> implements BizSignTypeService { |
|||
|
|||
@Override |
|||
public List<BizSignTypeVo> selectSignTypes(BizSignTypeQuery query) { |
|||
return baseMapper.selectBizSignTypeVoList(query); |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,22 @@ |
|||
package com.qs.serve.modules.biz.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
import com.qs.serve.modules.biz.entity.BizVisitForm; |
|||
import com.qs.serve.modules.biz.service.BizVisitFormService; |
|||
import com.qs.serve.modules.biz.mapper.BizVisitFormMapper; |
|||
|
|||
/** |
|||
* 科目表单 服务实现类 |
|||
* @author YenHex |
|||
* @since 2024-09-05 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@AllArgsConstructor |
|||
public class BizVisitFormServiceImpl extends ServiceImpl<BizVisitFormMapper,BizVisitForm> implements BizVisitFormService { |
|||
|
|||
} |
|||
|
@ -0,0 +1,48 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.qs.serve.modules.biz.mapper.BizSignTypeMapper"> |
|||
|
|||
<resultMap id="bizSignTypeMap" type="com.qs.serve.modules.biz.entity.BizSignType" > |
|||
<result property="id" column="id"/> |
|||
<result property="typeName" column="type_name"/> |
|||
<result property="templateId" column="template_id"/> |
|||
<result property="remark" column="remark"/> |
|||
<result property="createTime" column="create_time"/> |
|||
<result property="updateTime" column="update_time"/> |
|||
<result property="tenantId" column="tenant_id"/> |
|||
<result property="delFlag" column="del_flag"/> |
|||
<result property="createBy" column="create_by"/> |
|||
<result property="updateBy" column="update_by"/> |
|||
</resultMap> |
|||
|
|||
<sql id="bizSignTypeSql"> |
|||
biz_sign_type.`id`, |
|||
biz_sign_type.`type_name`, |
|||
biz_sign_type.`template_id`, |
|||
biz_sign_type.`remark`, |
|||
biz_sign_type.`create_time`, |
|||
biz_sign_type.`update_time`, |
|||
biz_sign_type.`tenant_id`, |
|||
biz_sign_type.`del_flag`, |
|||
biz_sign_type.`create_by`, |
|||
biz_sign_type.`update_by` </sql> |
|||
|
|||
<select id="selectBizSignTypeVoList" resultType="com.qs.serve.modules.biz.entity.vo.BizSignTypeVo"> |
|||
SELECT |
|||
biz_visit_form.title as template_name, |
|||
biz_visit_form.form_context , |
|||
biz_visit_form.version , |
|||
<include refid="bizSignTypeSql"/> |
|||
FROM `biz_sign_type` `biz_sign_type` |
|||
left join biz_visit_form on biz_sign_type.template_id = biz_visit_form.id |
|||
<where> |
|||
and `biz_sign_type`.`del_flag` = 0 |
|||
<if test="query.typeName != null and query.typeName != ''"> and `biz_sign_type`.`type_name` concat('%', #{query.typeName},'%') </if> |
|||
<if test="query.templateId != null and query.templateId != ''"> and `biz_sign_type`.`template_id` = #{query.templateId}</if> |
|||
<if test="query.templateName != null and query.templateName != ''"> and `biz_visit_form`.`title` concat('%',#{query.templateName},'%') </if> |
|||
</where> |
|||
</select> |
|||
|
|||
</mapper> |
Loading…
Reference in new issue