update sys添加打印信息优化

master
yinq 2 weeks ago
parent 3d5ba72004
commit 8cc0e64734

@ -30,7 +30,7 @@ public class SysPrintTemplateInfo extends TenantEntity {
/**
* ID
*/
private String templateListId;
private Long templateListId;
/**
*

@ -25,7 +25,7 @@ public class SysPrintTemplateInfoBo extends BaseEntity {
/**
* ID
*/
private String templateListId;
private Long templateListId;
/**
*

@ -38,7 +38,7 @@ public class SysPrintTemplateInfoVo implements Serializable {
* ID
*/
@ExcelProperty(value = "模板列表ID")
private String templateListId;
private Long templateListId;
/**
*

@ -9,6 +9,7 @@ import com.github.yulichang.toolkit.JoinWrappers;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import org.dromara.system.domain.SysPrintTemplateList;
import org.springframework.stereotype.Service;
import org.dromara.system.domain.bo.SysPrintTemplateInfoBo;
import org.dromara.system.domain.vo.SysPrintTemplateInfoVo;
@ -73,8 +74,10 @@ public class SysPrintTemplateInfoServiceImpl implements ISysPrintTemplateInfoSer
Map<String, Object> params = bo.getParams();
MPJLambdaWrapper<SysPrintTemplateInfo> lqw = JoinWrappers.lambda(SysPrintTemplateInfo.class)
.selectAll(SysPrintTemplateInfo.class)
.select(SysPrintTemplateList::getTemplateName)
.leftJoin(SysPrintTemplateList.class, SysPrintTemplateList::getTemplateListId, SysPrintTemplateInfo::getTemplateListId)
.eq(bo.getTemplateInfoId() != null, SysPrintTemplateInfo::getTemplateInfoId, bo.getTemplateInfoId())
.eq(StringUtils.isNotBlank(bo.getTemplateListId()), SysPrintTemplateInfo::getTemplateListId, bo.getTemplateListId())
.eq(StringUtils.isNotNull(bo.getTemplateListId()), SysPrintTemplateInfo::getTemplateListId, bo.getTemplateListId())
.eq(StringUtils.isNotBlank(bo.getPaperType()), SysPrintTemplateInfo::getPaperType, bo.getPaperType())
.eq(StringUtils.isNotBlank(bo.getWidth()), SysPrintTemplateInfo::getWidth, bo.getWidth())
.eq(StringUtils.isNotBlank(bo.getHeight()), SysPrintTemplateInfo::getHeight, bo.getHeight())

@ -10,6 +10,8 @@ import com.github.yulichang.toolkit.JoinWrappers;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.RequiredArgsConstructor;
import org.dromara.system.domain.SysPrintTemplateInfo;
import org.dromara.system.domain.SysPrintTemplateList;
import org.springframework.stereotype.Service;
import org.dromara.system.domain.bo.SysPrintTemplateNodeBo;
import org.dromara.system.domain.vo.SysPrintTemplateNodeVo;
@ -75,6 +77,9 @@ public class SysPrintTemplateNodeServiceImpl implements ISysPrintTemplateNodeSer
Map<String, Object> params = bo.getParams();
MPJLambdaWrapper<SysPrintTemplateNode> lqw = JoinWrappers.lambda(SysPrintTemplateNode.class)
.selectAll(SysPrintTemplateNode.class)
.select(SysPrintTemplateList::getTemplateName)
.leftJoin(SysPrintTemplateInfo.class, SysPrintTemplateInfo::getTemplateInfoId, SysPrintTemplateNode::getTemplateInfoId)
.leftJoin(SysPrintTemplateList.class, SysPrintTemplateList::getTemplateListId, SysPrintTemplateInfo::getTemplateListId)
.eq(bo.getTemplateNodeId() != null, SysPrintTemplateNode::getTemplateNodeId, bo.getTemplateNodeId())
.eq(StringUtils.isNotBlank(bo.getTemplateInfoId()), SysPrintTemplateNode::getTemplateInfoId, bo.getTemplateInfoId())
.like(StringUtils.isNotBlank(bo.getName()), SysPrintTemplateNode::getName, bo.getName())

Loading…
Cancel
Save