联系单等各个单据的数据录入2

This commit is contained in:
xiaozhou
2025-07-03 20:49:08 +08:00
parent a4ed96f448
commit 3997e21d6c
5 changed files with 24 additions and 3 deletions

View File

@ -29,6 +29,11 @@ public class BusContactformtemplate extends BaseEntity {
@TableId(value = "id")
private Long id;
/**
* 项目ID
*/
private String projectId;
/**
* 模板名称
*/

View File

@ -23,6 +23,10 @@ import org.springframework.web.multipart.MultipartFile;
@AutoMapper(target = BusContactformtemplate.class, reverseConvertGenerate = false)
public class BusContactformtemplateBo extends BaseEntity {
/**
* 项目ID
*/
private String projectId;
/**
* 模板名称

View File

@ -1,5 +1,6 @@
package org.dromara.cory.domain.bo;
import org.dromara.common.core.validate.QueryGroup;
import org.dromara.cory.domain.BusContactnotice;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
@ -9,6 +10,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.List;
/**
* 联系单业务对象 bus_contactnotice
*
@ -38,5 +41,9 @@ public class BusContactnoticeBo extends BaseEntity {
@NotBlank(message = "文档内容不能为空", groups = { AddGroup.class, EditGroup.class })
private String detail;
/**
* 根据模板id获取对应模板的所有数据
*/
@NotNull(message = "模板类型不能为空", groups = { QueryGroup.class })
private List<Long> types;
}

View File

@ -36,6 +36,12 @@ public class BusContactformtemplateVo implements Serializable {
@ExcelProperty(value = "自增ID")
private Long id;
/**
* 项目ID
*/
@ExcelProperty(value = "项目ID")
private String projectId;
/**
* 模板名称
*/

View File

@ -73,8 +73,7 @@ public class BusContactnoticeServiceImpl implements IBusContactnoticeService {
LambdaQueryWrapper<BusContactnotice> lqw = Wrappers.lambdaQuery();
lqw.orderByAsc(BusContactnotice::getId);
lqw.eq(bo.getProjectId() != null, BusContactnotice::getProjectId, bo.getProjectId());
lqw.eq(bo.getType() != null, BusContactnotice::getType, bo.getType());
lqw.eq(StringUtils.isNotBlank(bo.getDetail()), BusContactnotice::getDetail, bo.getDetail());
lqw.in(bo.getTypes() != null, BusContactnotice::getType, bo.getTypes());
return lqw;
}