优化
This commit is contained in:
parent
515aa14e26
commit
e4b9074cc9
@ -2,8 +2,8 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<property name="log.path" value="./logs"/>
|
<property name="log.path" value="./logs"/>
|
||||||
<property name="console.log.pattern"
|
<property name="console.log.pattern"
|
||||||
value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
|
value="%red(%d) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/>
|
||||||
<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"/>
|
<property name="log.pattern" value="%d [%thread] %-5level %logger{36} - %msg%n"/>
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
<!-- 控制台输出 -->
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
@ -48,8 +48,8 @@ public class HtmlToPdfUtils {
|
|||||||
FontProgram gb2312 = FontProgramFactory.createFont(System.getProperty("user.dir") + "/doc/gb2312.ttf");
|
FontProgram gb2312 = FontProgramFactory.createFont(System.getProperty("user.dir") + "/doc/gb2312.ttf");
|
||||||
fontProvider.addFont(gb2312);
|
fontProvider.addFont(gb2312);
|
||||||
|
|
||||||
FontProgram Deng = FontProgramFactory.createFont(System.getProperty("user.dir") + "/doc/Deng.ttf");
|
// FontProgram Deng = FontProgramFactory.createFont(System.getProperty("user.dir") + "/doc/Deng.ttf");
|
||||||
fontProvider.addFont(Deng);
|
// fontProvider.addFont(Deng);
|
||||||
|
|
||||||
FontProgram Dengb = FontProgramFactory.createFont(System.getProperty("user.dir") + "/doc/Dengb.ttf");
|
FontProgram Dengb = FontProgramFactory.createFont(System.getProperty("user.dir") + "/doc/Dengb.ttf");
|
||||||
fontProvider.addFont(Dengb);
|
fontProvider.addFont(Dengb);
|
||||||
@ -58,6 +58,7 @@ public class HtmlToPdfUtils {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
properties.setFontProvider(fontProvider);
|
properties.setFontProvider(fontProvider);
|
||||||
|
|
||||||
HtmlConverter.convertToPdf(inputStream, pdfDocument, properties);
|
HtmlConverter.convertToPdf(inputStream, pdfDocument, properties);
|
||||||
|
|
||||||
pdfWriter.close();
|
pdfWriter.close();
|
||||||
|
@ -45,7 +45,7 @@ public class PageEventHandler implements IEventHandler {
|
|||||||
PdfFont pdfFont = null;
|
PdfFont pdfFont = null;
|
||||||
try {
|
try {
|
||||||
// pdfFont = PdfFontFactory.createFont();//"STSongStd-Light", "UniGB-UCS2-H", false
|
// pdfFont = PdfFontFactory.createFont();//"STSongStd-Light", "UniGB-UCS2-H", false
|
||||||
pdfFont = PdfFontFactory.createFont("STSongStd-Light", "UniGB-UCS2-H", false);
|
pdfFont = PdfFontFactory.createFont("STSongStd-Light", "UniGB-UCS2-H", true, true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("", e);
|
logger.error("", e);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.pusong.common.json;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class TranslationThreadLocal {
|
||||||
|
Map<String, String> cache = new HashMap<>();
|
||||||
|
|
||||||
|
/*把线程相关的部分内聚到 类里面 相当于map 每个类是对应key*/
|
||||||
|
private static ThreadLocal<TranslationThreadLocal> t = new ThreadLocal<TranslationThreadLocal>();
|
||||||
|
private TranslationThreadLocal(){
|
||||||
|
}
|
||||||
|
//拿到当前线程的FunctionThreadLocal类的对象-即可以使用waitInsert/waitUpdate/waitDelete
|
||||||
|
public static TranslationThreadLocal getThreadInstance(){
|
||||||
|
TranslationThreadLocal threadLocal = t.get();
|
||||||
|
if(null == threadLocal){//当前线程无绑定的对象时,直接绑定一个新的对象
|
||||||
|
threadLocal = new TranslationThreadLocal();
|
||||||
|
t.set(threadLocal);
|
||||||
|
}
|
||||||
|
return threadLocal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clean(){
|
||||||
|
cache.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String get(String key1, String key2) {
|
||||||
|
return cache.get(key1 + "_" + key2);
|
||||||
|
}
|
||||||
|
public String set(String key1, String key2, String val) {
|
||||||
|
return cache.put(key1 + "_" + key2, val);
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,8 @@
|
|||||||
package com.pusong.common.redis.manager;
|
package com.pusong.common.redis.manager;
|
||||||
|
|
||||||
import com.pusong.common.core.utils.SpringUtils;
|
import com.pusong.common.core.utils.SpringUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.cache.Cache;
|
import org.springframework.cache.Cache;
|
||||||
|
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
@ -12,6 +14,7 @@ import java.util.concurrent.Callable;
|
|||||||
*/
|
*/
|
||||||
public class CaffeineCacheDecorator implements Cache {
|
public class CaffeineCacheDecorator implements Cache {
|
||||||
|
|
||||||
|
Logger logger = LoggerFactory.getLogger(CaffeineCacheDecorator.class);
|
||||||
private static final com.github.benmanes.caffeine.cache.Cache<Object, Object>
|
private static final com.github.benmanes.caffeine.cache.Cache<Object, Object>
|
||||||
CAFFEINE = SpringUtils.getBean("caffeine");
|
CAFFEINE = SpringUtils.getBean("caffeine");
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@ import org.redisson.api.RMap;
|
|||||||
import org.redisson.api.RMapCache;
|
import org.redisson.api.RMapCache;
|
||||||
import org.redisson.spring.cache.CacheConfig;
|
import org.redisson.spring.cache.CacheConfig;
|
||||||
import org.redisson.spring.cache.RedissonCache;
|
import org.redisson.spring.cache.RedissonCache;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.boot.convert.DurationStyle;
|
import org.springframework.boot.convert.DurationStyle;
|
||||||
import org.springframework.cache.Cache;
|
import org.springframework.cache.Cache;
|
||||||
import org.springframework.cache.CacheManager;
|
import org.springframework.cache.CacheManager;
|
||||||
@ -44,7 +46,7 @@ import java.util.concurrent.ConcurrentMap;
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public class PlusSpringCacheManager implements CacheManager {
|
public class PlusSpringCacheManager implements CacheManager {
|
||||||
|
Logger logger = LoggerFactory.getLogger(CaffeineCacheDecorator.class);
|
||||||
private boolean dynamic = true;
|
private boolean dynamic = true;
|
||||||
|
|
||||||
private boolean allowNullValues = true;
|
private boolean allowNullValues = true;
|
||||||
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.databind.SerializerProvider;
|
|||||||
import com.fasterxml.jackson.databind.ser.ContextualSerializer;
|
import com.fasterxml.jackson.databind.ser.ContextualSerializer;
|
||||||
import com.pusong.common.core.utils.StringUtils;
|
import com.pusong.common.core.utils.StringUtils;
|
||||||
import com.pusong.common.core.utils.reflect.ReflectUtils;
|
import com.pusong.common.core.utils.reflect.ReflectUtils;
|
||||||
|
import com.pusong.common.json.TranslationThreadLocal;
|
||||||
import com.pusong.common.translation.annotation.Translation;
|
import com.pusong.common.translation.annotation.Translation;
|
||||||
import com.pusong.common.translation.core.TranslationInterface;
|
import com.pusong.common.translation.core.TranslationInterface;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -33,6 +34,7 @@ public class TranslationHandler extends JsonSerializer<Object> implements Contex
|
|||||||
|
|
||||||
private Translation translation;
|
private Translation translation;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
|
public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
|
||||||
TranslationInterface<?> trans = TRANSLATION_MAPPER.get(translation.type());
|
TranslationInterface<?> trans = TRANSLATION_MAPPER.get(translation.type());
|
||||||
@ -46,7 +48,11 @@ public class TranslationHandler extends JsonSerializer<Object> implements Contex
|
|||||||
gen.writeNull();
|
gen.writeNull();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Object result = trans.translation(value, translation.other());
|
Object result = TranslationThreadLocal.getThreadInstance().get(value.toString(), translation.other());
|
||||||
|
if (result == null){
|
||||||
|
result = trans.translation(value, translation.other());
|
||||||
|
TranslationThreadLocal.getThreadInstance().set(value.toString(), translation.other(), result.toString());
|
||||||
|
}
|
||||||
gen.writeObject(result);
|
gen.writeObject(result);
|
||||||
} else {
|
} else {
|
||||||
gen.writeObject(value);
|
gen.writeObject(value);
|
||||||
|
@ -5,6 +5,8 @@ import com.pusong.common.translation.annotation.TranslationType;
|
|||||||
import com.pusong.common.translation.constant.TransConstant;
|
import com.pusong.common.translation.constant.TransConstant;
|
||||||
import com.pusong.common.translation.core.TranslationInterface;
|
import com.pusong.common.translation.core.TranslationInterface;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门翻译实现
|
* 部门翻译实现
|
||||||
@ -14,11 +16,13 @@ import lombok.AllArgsConstructor;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@TranslationType(type = TransConstant.DEPT_ID_TO_NAME)
|
@TranslationType(type = TransConstant.DEPT_ID_TO_NAME)
|
||||||
public class DeptNameTranslationImpl implements TranslationInterface<String> {
|
public class DeptNameTranslationImpl implements TranslationInterface<String> {
|
||||||
|
private final static Logger logger = LoggerFactory.getLogger(DictTypeTranslationImpl.class);
|
||||||
|
|
||||||
private final DeptService deptService;
|
private final DeptService deptService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String translation(Object key, String other) {
|
public String translation(Object key, String other) {
|
||||||
|
// logger.info("key = {}, other = {}", key, other);
|
||||||
if (key instanceof String ids) {
|
if (key instanceof String ids) {
|
||||||
return deptService.selectDeptNameByIds(ids);
|
return deptService.selectDeptNameByIds(ids);
|
||||||
} else if (key instanceof Long id) {
|
} else if (key instanceof Long id) {
|
||||||
|
@ -5,6 +5,8 @@ import com.pusong.common.core.service.UserService;
|
|||||||
import com.pusong.common.translation.annotation.TranslationType;
|
import com.pusong.common.translation.annotation.TranslationType;
|
||||||
import com.pusong.common.translation.constant.TransConstant;
|
import com.pusong.common.translation.constant.TransConstant;
|
||||||
import com.pusong.common.translation.core.TranslationInterface;
|
import com.pusong.common.translation.core.TranslationInterface;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户名称翻译实现
|
* 用户名称翻译实现
|
||||||
@ -14,11 +16,13 @@ import com.pusong.common.translation.core.TranslationInterface;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@TranslationType(type = TransConstant.USER_ID_TO_NICKNAME)
|
@TranslationType(type = TransConstant.USER_ID_TO_NICKNAME)
|
||||||
public class NicknameTranslationImpl implements TranslationInterface<String> {
|
public class NicknameTranslationImpl implements TranslationInterface<String> {
|
||||||
|
private final static Logger logger = LoggerFactory.getLogger(DictTypeTranslationImpl.class);
|
||||||
|
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String translation(Object key, String other) {
|
public String translation(Object key, String other) {
|
||||||
|
// logger.info("key = {}, other = {}", key, other);
|
||||||
if (key instanceof Long id) {
|
if (key instanceof Long id) {
|
||||||
return userService.selectNicknameByIds(id.toString());
|
return userService.selectNicknameByIds(id.toString());
|
||||||
} else if (key instanceof String ids) {
|
} else if (key instanceof String ids) {
|
||||||
|
@ -5,6 +5,8 @@ import com.pusong.common.translation.annotation.TranslationType;
|
|||||||
import com.pusong.common.translation.constant.TransConstant;
|
import com.pusong.common.translation.constant.TransConstant;
|
||||||
import com.pusong.common.translation.core.TranslationInterface;
|
import com.pusong.common.translation.core.TranslationInterface;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OSS翻译实现
|
* OSS翻译实现
|
||||||
@ -14,11 +16,13 @@ import lombok.AllArgsConstructor;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@TranslationType(type = TransConstant.OSS_ID_TO_URL)
|
@TranslationType(type = TransConstant.OSS_ID_TO_URL)
|
||||||
public class OssUrlTranslationImpl implements TranslationInterface<String> {
|
public class OssUrlTranslationImpl implements TranslationInterface<String> {
|
||||||
|
private final static Logger logger = LoggerFactory.getLogger(DictTypeTranslationImpl.class);
|
||||||
|
|
||||||
private final OssService ossService;
|
private final OssService ossService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String translation(Object key, String other) {
|
public String translation(Object key, String other) {
|
||||||
|
// logger.info("key = {}, other = {}", key, other);
|
||||||
if (key instanceof String ids) {
|
if (key instanceof String ids) {
|
||||||
return ossService.selectUrlByIds(ids);
|
return ossService.selectUrlByIds(ids);
|
||||||
} else if (key instanceof Long id) {
|
} else if (key instanceof Long id) {
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package com.pusong.common.translation.core.impl;
|
package com.pusong.common.translation.core.impl;
|
||||||
|
|
||||||
import com.pusong.common.core.service.DeptService;
|
|
||||||
import com.pusong.common.core.service.PostService;
|
import com.pusong.common.core.service.PostService;
|
||||||
import com.pusong.common.translation.annotation.TranslationType;
|
import com.pusong.common.translation.annotation.TranslationType;
|
||||||
import com.pusong.common.translation.constant.TransConstant;
|
import com.pusong.common.translation.constant.TransConstant;
|
||||||
import com.pusong.common.translation.core.TranslationInterface;
|
import com.pusong.common.translation.core.TranslationInterface;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位翻译实现
|
* 岗位翻译实现
|
||||||
@ -15,11 +16,13 @@ import lombok.AllArgsConstructor;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@TranslationType(type = TransConstant.POST_ID_TO_NAME)
|
@TranslationType(type = TransConstant.POST_ID_TO_NAME)
|
||||||
public class PostNameTranslationImpl implements TranslationInterface<String> {
|
public class PostNameTranslationImpl implements TranslationInterface<String> {
|
||||||
|
private final static Logger logger = LoggerFactory.getLogger(DictTypeTranslationImpl.class);
|
||||||
|
|
||||||
private final PostService postService;
|
private final PostService postService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String translation(Object key, String other) {
|
public String translation(Object key, String other) {
|
||||||
|
// logger.info("key = {}, other = {}", key, other);
|
||||||
if (key instanceof String ids) {
|
if (key instanceof String ids) {
|
||||||
return postService.selectPostNameByIds(ids);
|
return postService.selectPostNameByIds(ids);
|
||||||
} else if (key instanceof Long id) {
|
} else if (key instanceof Long id) {
|
||||||
|
@ -5,6 +5,8 @@ import com.pusong.common.translation.annotation.TranslationType;
|
|||||||
import com.pusong.common.translation.constant.TransConstant;
|
import com.pusong.common.translation.constant.TransConstant;
|
||||||
import com.pusong.common.translation.core.TranslationInterface;
|
import com.pusong.common.translation.core.TranslationInterface;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户名翻译实现
|
* 用户名翻译实现
|
||||||
@ -14,11 +16,13 @@ import lombok.AllArgsConstructor;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@TranslationType(type = TransConstant.USER_ID_TO_NAME)
|
@TranslationType(type = TransConstant.USER_ID_TO_NAME)
|
||||||
public class UserNameTranslationImpl implements TranslationInterface<String> {
|
public class UserNameTranslationImpl implements TranslationInterface<String> {
|
||||||
|
private final static Logger logger = LoggerFactory.getLogger(DictTypeTranslationImpl.class);
|
||||||
|
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String translation(Object key, String other) {
|
public String translation(Object key, String other) {
|
||||||
|
// logger.info("key = {}, other = {}", key, other);
|
||||||
if (key instanceof Long id) {
|
if (key instanceof Long id) {
|
||||||
return userService.selectUserNameById(id);
|
return userService.selectUserNameById(id);
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
package com.pusong.common.web.filter;
|
package com.pusong.common.web.filter;
|
||||||
|
|
||||||
import com.pusong.common.core.utils.StringUtils;
|
import com.pusong.common.core.utils.StringUtils;
|
||||||
import org.springframework.http.MediaType;
|
import com.pusong.common.json.TranslationThreadLocal;
|
||||||
|
|
||||||
import jakarta.servlet.*;
|
import jakarta.servlet.*;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,11 +27,13 @@ public class RepeatableFilter implements Filter {
|
|||||||
&& StringUtils.startsWithIgnoreCase(request.getContentType(), MediaType.APPLICATION_JSON_VALUE)) {
|
&& StringUtils.startsWithIgnoreCase(request.getContentType(), MediaType.APPLICATION_JSON_VALUE)) {
|
||||||
requestWrapper = new RepeatedlyRequestWrapper((HttpServletRequest) request, response);
|
requestWrapper = new RepeatedlyRequestWrapper((HttpServletRequest) request, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null == requestWrapper) {
|
if (null == requestWrapper) {
|
||||||
chain.doFilter(request, response);
|
chain.doFilter(request, response);
|
||||||
} else {
|
} else {
|
||||||
chain.doFilter(requestWrapper, response);
|
chain.doFilter(requestWrapper, response);
|
||||||
}
|
}
|
||||||
|
TranslationThreadLocal.getThreadInstance().clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -200,6 +200,10 @@ public class PsCompanyInfo extends TenantEntity {
|
|||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 服务状态0终止1正常
|
||||||
|
*/
|
||||||
|
private Integer serviceStatus;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -245,6 +245,7 @@ public class PsCompanyInfoServiceImpl implements IPsCompanyInfoService {
|
|||||||
@Override
|
@Override
|
||||||
public int update(PsCompanyInfoBo bo) {
|
public int update(PsCompanyInfoBo bo) {
|
||||||
PsCompanyInfo add = MapstructUtils.convert(bo, PsCompanyInfo.class);
|
PsCompanyInfo add = MapstructUtils.convert(bo, PsCompanyInfo.class);
|
||||||
|
add.setServiceStatus(bo.getServiceStatus());
|
||||||
return baseMapper.updateById(add);
|
return baseMapper.updateById(add);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -702,7 +702,7 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
|
|||||||
//删除原合同
|
//删除原合同
|
||||||
if(add.getPdfId() != null)
|
if(add.getPdfId() != null)
|
||||||
ossService.deleteWithValidByIds(List.of(add.getPdfId()),false);
|
ossService.deleteWithValidByIds(List.of(add.getPdfId()),false);
|
||||||
Optional<Long> a = Optional.ofNullable(add.getPdfId());
|
// Optional<Long> a = Optional.ofNullable(add.getPdfId());
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
log.error("生成pdf失败",e);
|
log.error("生成pdf失败",e);
|
||||||
@ -911,7 +911,13 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
|
|||||||
qw.like( StringUtils.isNotBlank(bo.getCustomName()),"cus.custom_name", bo.getCustomName());
|
qw.like( StringUtils.isNotBlank(bo.getCustomName()),"cus.custom_name", bo.getCustomName());
|
||||||
qw.like( StringUtils.isNotBlank(bo.getCustomMobile()),"cus.custom_mobile", bo.getCustomMobile());
|
qw.like( StringUtils.isNotBlank(bo.getCustomMobile()),"cus.custom_mobile", bo.getCustomMobile());
|
||||||
//公司表条件
|
//公司表条件
|
||||||
qw.like( StringUtils.isNotBlank(bo.getCompanyName()),"com.company_name", bo.getCompanyName());
|
// qw.like(StringUtils.isNotBlank(bo.getCompanyName()),"com.company_name", bo.getCompanyName());
|
||||||
|
|
||||||
|
qw.and(StringUtils.isNotBlank(bo.getCompanyName()), wrapper -> wrapper
|
||||||
|
.like("info.contact_person_name",bo.getCompanyName())
|
||||||
|
.or()
|
||||||
|
.like("com.company_name",bo.getCompanyName()));
|
||||||
|
|
||||||
//用户表条件
|
//用户表条件
|
||||||
qw.like( StringUtils.isNotBlank(bo.getCustomManagerName()),"us.nick_name", bo.getCustomManagerName());
|
qw.like( StringUtils.isNotBlank(bo.getCustomManagerName()),"us.nick_name", bo.getCustomManagerName());
|
||||||
|
|
||||||
|
@ -164,6 +164,7 @@ public class PsTaskServiceImpl implements IPsTaskService {
|
|||||||
String ex = bo.getExecutor();
|
String ex = bo.getExecutor();
|
||||||
bo.setExecutor(null);
|
bo.setExecutor(null);
|
||||||
QueryWrapper<PsTaskMain> lqw = buildQueryWrapper(bo);
|
QueryWrapper<PsTaskMain> lqw = buildQueryWrapper(bo);
|
||||||
|
lqw.eq("appo.del_flag","0");
|
||||||
lqw.ne(StringUtils.isBlank(bo.getTaskStatus()), "main.task_status", TaskStatusEnum.CANCEL.getCode());
|
lqw.ne(StringUtils.isBlank(bo.getTaskStatus()), "main.task_status", TaskStatusEnum.CANCEL.getCode());
|
||||||
lqw.exists(StringUtils.isNotBlank(ex), "select 1 from sys_user su where appo.executor = su.user_id and su.nick_name like '%" + ex + "%'");
|
lqw.exists(StringUtils.isNotBlank(ex), "select 1 from sys_user su where appo.executor = su.user_id and su.nick_name like '%" + ex + "%'");
|
||||||
lqw.eq("appo.appoint_type",bo.getAppointType());
|
lqw.eq("appo.appoint_type",bo.getAppointType());
|
||||||
@ -516,7 +517,6 @@ public class PsTaskServiceImpl implements IPsTaskService {
|
|||||||
QueryWrapper<PsTaskMain> lqw = new QueryWrapper<PsTaskMain>();
|
QueryWrapper<PsTaskMain> lqw = new QueryWrapper<PsTaskMain>();
|
||||||
lqw.eq("main.del_flag","0");
|
lqw.eq("main.del_flag","0");
|
||||||
|
|
||||||
|
|
||||||
// lqw.ne(StringUtils.isBlank(bo.getTaskStatus()), "main.task_status", TaskStatusEnum.CANCEL.getCode());
|
// lqw.ne(StringUtils.isBlank(bo.getTaskStatus()), "main.task_status", TaskStatusEnum.CANCEL.getCode());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getTaskStatus()),"main.task_status", bo.getTaskStatus());
|
lqw.eq(StringUtils.isNotBlank(bo.getTaskStatus()),"main.task_status", bo.getTaskStatus());
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
(select IFNULL(sum(money),0) from ps_contract_pay cpay where cpay.business_type =2 and cpay.contract_code = main.contract_code )
|
(select IFNULL(sum(money),0) from ps_contract_pay cpay where cpay.business_type =2 and cpay.contract_code = main.contract_code )
|
||||||
) > 0 THEN '半款' ELSE '全款' END) as pay_stauts_desc,
|
) > 0 THEN '半款' ELSE '全款' END) as pay_stauts_desc,
|
||||||
|
|
||||||
(select GROUP_CONCAT(business.business_type SEPARATOR ',') from ps_contract_business business where business.contract_code = con.contract_code and business.del_flag = '0') as business_type_name
|
(select GROUP_CONCAT(business.business_type SEPARATOR ',') from ps_contract_business business where business.contract_code = con.contract_code and business.company_id = main.service_company_id and business.del_flag = '0') as business_type_name
|
||||||
-- ,
|
-- ,
|
||||||
-- appoint.executor appoint_executor,
|
-- appoint.executor appoint_executor,
|
||||||
-- appoint.task_desc appoint_task_desc,
|
-- appoint.task_desc appoint_task_desc,
|
||||||
|
Loading…
Reference in New Issue
Block a user