update 调整请假查询 修改流程定义查看xml

This commit is contained in:
gssong 2023-12-10 11:18:34 +08:00
parent 8bc5478819
commit 1d78b97732
3 changed files with 14 additions and 4 deletions

View File

@ -4,7 +4,6 @@ import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotEmpty;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R; import org.dromara.common.core.domain.R;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.log.annotation.Log; import org.dromara.common.log.annotation.Log;
import org.dromara.common.log.enums.BusinessType; import org.dromara.common.log.enums.BusinessType;
import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -16,6 +15,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -73,7 +73,7 @@ public class ActProcessDefinitionController extends BaseController {
public R<Map<String, Object>> getXml(@NotBlank(message = "流程定义id不能为空") @PathVariable String processDefinitionId) { public R<Map<String, Object>> getXml(@NotBlank(message = "流程定义id不能为空") @PathVariable String processDefinitionId) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
String xmlStr = actProcessDefinitionService.processDefinitionXml(processDefinitionId); String xmlStr = actProcessDefinitionService.processDefinitionXml(processDefinitionId);
map.put("xml", StringUtils.splitList("\n")); map.put("xml", Arrays.asList(xmlStr.split("\n")));
map.put("xmlStr", xmlStr); map.put("xmlStr", xmlStr);
return R.ok(map); return R.ok(map);
} }

View File

@ -56,6 +56,16 @@ public class TestLeaveBo extends BaseEntity {
@NotNull(message = "请假天数不能为空", groups = {AddGroup.class, EditGroup.class}) @NotNull(message = "请假天数不能为空", groups = {AddGroup.class, EditGroup.class})
private Integer leaveDays; private Integer leaveDays;
/**
* 开始时间
*/
private Integer startLeaveDays;
/**
* 结束时间
*/
private Integer endLeaveDays;
/** /**
* 请假原因 * 请假原因
*/ */

View File

@ -71,10 +71,10 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
} }
private LambdaQueryWrapper<TestLeave> buildQueryWrapper(TestLeaveBo bo) { private LambdaQueryWrapper<TestLeave> buildQueryWrapper(TestLeaveBo bo) {
Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<TestLeave> lqw = Wrappers.lambdaQuery(); LambdaQueryWrapper<TestLeave> lqw = Wrappers.lambdaQuery();
lqw.eq(StringUtils.isNotBlank(bo.getLeaveType()), TestLeave::getLeaveType, bo.getLeaveType()); lqw.eq(StringUtils.isNotBlank(bo.getLeaveType()), TestLeave::getLeaveType, bo.getLeaveType());
lqw.eq(bo.getLeaveDays() != null, TestLeave::getLeaveDays, bo.getLeaveDays()); lqw.ge(bo.getStartLeaveDays() != null,TestLeave::getLeaveDays, bo.getStartLeaveDays());
lqw.le(bo.getEndLeaveDays() != null,TestLeave::getLeaveDays, bo.getEndLeaveDays());
return lqw; return lqw;
} }