|
@@ -169,6 +169,15 @@ public class JianYanJianChaShenQingService {
|
|
|
}
|
|
|
|
|
|
public ResultVo<List<JcZdClass>> getTemplateGrouping(Integer itemType, Integer templateType) {
|
|
|
+ QueryWrapper<?> qw = templateQueryWrapper(itemType, templateType);
|
|
|
+ return ResultVoUtil.success(dao.getTemplate(qw));
|
|
|
+ }
|
|
|
+
|
|
|
+ public ResultVo<List<Map<String, String>>> getTemplateByCodeAndType(String code, String type) {
|
|
|
+ return ResultVoUtil.success(dao.getTemplateByCodeAndType(code, type));
|
|
|
+ }
|
|
|
+
|
|
|
+ private QueryWrapper<?> templateQueryWrapper(Integer itemType, Integer templateType) {
|
|
|
QueryWrapper<?> qw = new QueryWrapper<>();
|
|
|
qw.eq("c.req_type", itemType);
|
|
|
if (templateType == 2) {
|
|
@@ -177,11 +186,7 @@ public class JianYanJianChaShenQingService {
|
|
|
UserInfo info = realtimeService.getUserInfoByToken();
|
|
|
qw.eq("c.tc_exec", info.getDeptCode());
|
|
|
}
|
|
|
- return ResultVoUtil.success(dao.getTemplate(qw));
|
|
|
- }
|
|
|
-
|
|
|
- public ResultVo<List<Map<String, String>>> getTemplateByCodeAndType(String code, String type) {
|
|
|
- return ResultVoUtil.success(dao.getTemplateByCodeAndType(code, type));
|
|
|
+ return qw;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -191,14 +196,7 @@ public class JianYanJianChaShenQingService {
|
|
|
* @return
|
|
|
*/
|
|
|
public ResultVo<List<JcZdClass>> getTemplate(Integer itemType, Integer templateType) {
|
|
|
- QueryWrapper<?> qw = new QueryWrapper<>();
|
|
|
- qw.eq("c.req_type", itemType);
|
|
|
- if (templateType == 2) {
|
|
|
- qw.eq("c.op_id", TokenUtil.getInstance().getTokenUserId());
|
|
|
- } else {
|
|
|
- UserInfo info = realtimeService.getUserInfoByToken();
|
|
|
- qw.eq("c.tc_exec", info.getDeptCode());
|
|
|
- }
|
|
|
+ QueryWrapper<?> qw = templateQueryWrapper(itemType, templateType);
|
|
|
List<JcZdClass> parentNode = dao.getTemplate(qw);
|
|
|
Map<String, JcZdClass> map = parentNode
|
|
|
.stream()
|
|
@@ -369,7 +367,7 @@ public class JianYanJianChaShenQingService {
|
|
|
* @return 返回有没有
|
|
|
*/
|
|
|
public ResultVo<Boolean> jianChaJianYanMuBanMing(String name, String reqType) {
|
|
|
- return ResultVoUtil.success(dao.huoQuJianChaJianYanChongFuMuBanMing(name, TokenUtil.getInstance().getTokenUserId(), reqType).size() > 0);
|
|
|
+ return ResultVoUtil.success(!dao.huoQuJianChaJianYanChongFuMuBanMing(name, TokenUtil.getInstance().getTokenUserId(), reqType).isEmpty());
|
|
|
}
|
|
|
|
|
|
/**
|