三江bug修改,安全资料bug修改
This commit is contained in:
parent
03d7cfe1ac
commit
efae873723
@ -1,14 +1,24 @@
|
|||||||
package com.zhgd.exception;
|
package com.zhgd.exception;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
|
import com.zhgd.jeecg.common.constant.CommonConstant;
|
||||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.validation.BindingResult;
|
||||||
|
import org.springframework.validation.FieldError;
|
||||||
|
import org.springframework.web.bind.MethodArgumentNotValidException;
|
||||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @program: itbgpproject
|
* @program: itbgpproject
|
||||||
@ -43,4 +53,28 @@ public class ExceptionHandlerAdvice {
|
|||||||
log.error("errr:", ex);
|
log.error("errr:", ex);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bean校验友好返回信息
|
||||||
|
*
|
||||||
|
* @param e
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ExceptionHandler(value = MethodArgumentNotValidException.class)
|
||||||
|
@ResponseBody
|
||||||
|
public Result handleVaildException(MethodArgumentNotValidException e) {
|
||||||
|
log.error("数据校验出现问题{},异常类型:{}", e.getMessage(), e.getClass());
|
||||||
|
BindingResult bindingResult = e.getBindingResult();
|
||||||
|
|
||||||
|
Map<String, String> errorMap = new HashMap<>();
|
||||||
|
bindingResult.getFieldErrors().forEach((fieldError) -> {
|
||||||
|
errorMap.put(fieldError.getField(), fieldError.getDefaultMessage());
|
||||||
|
});
|
||||||
|
List<String> messageList = bindingResult.getFieldErrors().stream().map(FieldError::getDefaultMessage).collect(Collectors.toList());
|
||||||
|
Result<Object> r = new Result<>();
|
||||||
|
r.setCode(CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
|
||||||
|
r.setMessage(StrUtil.format("请输入合理的数据:{}", StringUtils.join(messageList)));
|
||||||
|
r.setResult(errorMap);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -83,7 +83,14 @@ public class QueryGenerator {
|
|||||||
return initQueryWrapper(searchObj, parameterMap, excludeFields, null, false);
|
return initQueryWrapper(searchObj, parameterMap, excludeFields, null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param searchObj
|
||||||
|
* @param parameterMap
|
||||||
|
* @param excludeFields
|
||||||
|
* @param likeFields like属性(eg:ReflectionUtil.getFieldNameList)
|
||||||
|
* @param <T>
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static <T> QueryWrapper<T> initQueryWrapper(T searchObj, Map<String, String[]> parameterMap, List<String> excludeFields, List<String> likeFields) {
|
public static <T> QueryWrapper<T> initQueryWrapper(T searchObj, Map<String, String[]> parameterMap, List<String> excludeFields, List<String> likeFields) {
|
||||||
return initQueryWrapper(searchObj, parameterMap, excludeFields, likeFields, false, null);
|
return initQueryWrapper(searchObj, parameterMap, excludeFields, likeFields, false, null);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
|||||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||||
import com.zhgd.xmgl.modules.gt.entity.GtMaterialAcceptanceCheck;
|
import com.zhgd.xmgl.modules.gt.entity.GtMaterialAcceptanceCheck;
|
||||||
import com.zhgd.xmgl.modules.gt.service.IGtMaterialAcceptanceCheckService;
|
import com.zhgd.xmgl.modules.gt.service.IGtMaterialAcceptanceCheckService;
|
||||||
|
import com.zhgd.xmgl.util.ReflectionUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -66,7 +67,8 @@ public class GtMaterialAcceptanceCheckController {
|
|||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
Result<IPage<GtMaterialAcceptanceCheck>> result = new Result<IPage<GtMaterialAcceptanceCheck>>();
|
Result<IPage<GtMaterialAcceptanceCheck>> result = new Result<IPage<GtMaterialAcceptanceCheck>>();
|
||||||
QueryWrapper<GtMaterialAcceptanceCheck> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialAcceptanceCheck, req.getParameterMap());
|
QueryWrapper<GtMaterialAcceptanceCheck> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialAcceptanceCheck, req.getParameterMap(), null,
|
||||||
|
ReflectionUtil.getFieldNameList(GtMaterialAcceptanceCheck::getItemName));
|
||||||
Page<GtMaterialAcceptanceCheck> page = new Page<GtMaterialAcceptanceCheck>(pageNo, pageSize);
|
Page<GtMaterialAcceptanceCheck> page = new Page<GtMaterialAcceptanceCheck>(pageNo, pageSize);
|
||||||
IPage<GtMaterialAcceptanceCheck> pageList = gtMaterialAcceptanceCheckService.page(page, queryWrapper);
|
IPage<GtMaterialAcceptanceCheck> pageList = gtMaterialAcceptanceCheckService.page(page, queryWrapper);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
|||||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||||
import com.zhgd.xmgl.modules.gt.entity.GtMaterialArticle;
|
import com.zhgd.xmgl.modules.gt.entity.GtMaterialArticle;
|
||||||
import com.zhgd.xmgl.modules.gt.service.IGtMaterialArticleService;
|
import com.zhgd.xmgl.modules.gt.service.IGtMaterialArticleService;
|
||||||
|
import com.zhgd.xmgl.util.ReflectionUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -85,7 +86,8 @@ public class GtMaterialArticleController {
|
|||||||
public Result<List<GtMaterialArticle>> queryList(GtMaterialArticle gtMaterialArticle,
|
public Result<List<GtMaterialArticle>> queryList(GtMaterialArticle gtMaterialArticle,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
|
|
||||||
QueryWrapper<GtMaterialArticle> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialArticle, req.getParameterMap());
|
QueryWrapper<GtMaterialArticle> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialArticle, req.getParameterMap(), null,
|
||||||
|
ReflectionUtil.getFieldNameList(GtMaterialArticle::getArticleTitle));
|
||||||
return Result.success(gtMaterialArticleService.list(queryWrapper));
|
return Result.success(gtMaterialArticleService.list(queryWrapper));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
|||||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||||
import com.zhgd.xmgl.modules.gt.entity.GtMaterialPartyBuildingActivity;
|
import com.zhgd.xmgl.modules.gt.entity.GtMaterialPartyBuildingActivity;
|
||||||
import com.zhgd.xmgl.modules.gt.service.IGtMaterialPartyBuildingActivityService;
|
import com.zhgd.xmgl.modules.gt.service.IGtMaterialPartyBuildingActivityService;
|
||||||
|
import com.zhgd.xmgl.util.ReflectionUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -66,7 +67,8 @@ public class GtMaterialPartyBuildingActivityController {
|
|||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
Result<IPage<GtMaterialPartyBuildingActivity>> result = new Result<IPage<GtMaterialPartyBuildingActivity>>();
|
Result<IPage<GtMaterialPartyBuildingActivity>> result = new Result<IPage<GtMaterialPartyBuildingActivity>>();
|
||||||
QueryWrapper<GtMaterialPartyBuildingActivity> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialPartyBuildingActivity, req.getParameterMap());
|
QueryWrapper<GtMaterialPartyBuildingActivity> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialPartyBuildingActivity, req.getParameterMap(), null,
|
||||||
|
ReflectionUtil.getFieldNameList(GtMaterialPartyBuildingActivity::getActivityTheme));
|
||||||
Page<GtMaterialPartyBuildingActivity> page = new Page<GtMaterialPartyBuildingActivity>(pageNo, pageSize);
|
Page<GtMaterialPartyBuildingActivity> page = new Page<GtMaterialPartyBuildingActivity>(pageNo, pageSize);
|
||||||
IPage<GtMaterialPartyBuildingActivity> pageList = gtMaterialPartyBuildingActivityService.page(page, queryWrapper);
|
IPage<GtMaterialPartyBuildingActivity> pageList = gtMaterialPartyBuildingActivityService.page(page, queryWrapper);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
|||||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||||
import com.zhgd.xmgl.modules.gt.entity.GtMaterialPartyMember;
|
import com.zhgd.xmgl.modules.gt.entity.GtMaterialPartyMember;
|
||||||
import com.zhgd.xmgl.modules.gt.service.IGtMaterialPartyMemberService;
|
import com.zhgd.xmgl.modules.gt.service.IGtMaterialPartyMemberService;
|
||||||
|
import com.zhgd.xmgl.util.ReflectionUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -65,7 +66,8 @@ public class GtMaterialPartyMemberController {
|
|||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
Result<IPage<GtMaterialPartyMember>> result = new Result<IPage<GtMaterialPartyMember>>();
|
Result<IPage<GtMaterialPartyMember>> result = new Result<IPage<GtMaterialPartyMember>>();
|
||||||
QueryWrapper<GtMaterialPartyMember> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialPartyMember, req.getParameterMap());
|
QueryWrapper<GtMaterialPartyMember> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialPartyMember, req.getParameterMap(), null,
|
||||||
|
ReflectionUtil.getFieldNameList(GtMaterialPartyMember::getUnitName));
|
||||||
Page<GtMaterialPartyMember> page = new Page<GtMaterialPartyMember>(pageNo, pageSize);
|
Page<GtMaterialPartyMember> page = new Page<GtMaterialPartyMember>(pageNo, pageSize);
|
||||||
IPage<GtMaterialPartyMember> pageList = gtMaterialPartyMemberService.page(page, queryWrapper);
|
IPage<GtMaterialPartyMember> pageList = gtMaterialPartyMemberService.page(page, queryWrapper);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
|||||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||||
import com.zhgd.xmgl.modules.gt.entity.GtMaterialSampleTest;
|
import com.zhgd.xmgl.modules.gt.entity.GtMaterialSampleTest;
|
||||||
import com.zhgd.xmgl.modules.gt.service.IGtMaterialSampleTestService;
|
import com.zhgd.xmgl.modules.gt.service.IGtMaterialSampleTestService;
|
||||||
|
import com.zhgd.xmgl.util.ReflectionUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -66,7 +67,8 @@ public class GtMaterialSampleTestController {
|
|||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
Result<IPage<GtMaterialSampleTest>> result = new Result<IPage<GtMaterialSampleTest>>();
|
Result<IPage<GtMaterialSampleTest>> result = new Result<IPage<GtMaterialSampleTest>>();
|
||||||
QueryWrapper<GtMaterialSampleTest> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialSampleTest, req.getParameterMap());
|
QueryWrapper<GtMaterialSampleTest> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialSampleTest, req.getParameterMap(), null,
|
||||||
|
ReflectionUtil.getFieldNameList(GtMaterialSampleTest::getProjectName, GtMaterialSampleTest::getSampleName));
|
||||||
Page<GtMaterialSampleTest> page = new Page<GtMaterialSampleTest>(pageNo, pageSize);
|
Page<GtMaterialSampleTest> page = new Page<GtMaterialSampleTest>(pageNo, pageSize);
|
||||||
IPage<GtMaterialSampleTest> pageList = gtMaterialSampleTestService.page(page, queryWrapper);
|
IPage<GtMaterialSampleTest> pageList = gtMaterialSampleTestService.page(page, queryWrapper);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
|||||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||||
import com.zhgd.xmgl.modules.gt.entity.GtMaterialSendReceiveSample;
|
import com.zhgd.xmgl.modules.gt.entity.GtMaterialSendReceiveSample;
|
||||||
import com.zhgd.xmgl.modules.gt.service.IGtMaterialSendReceiveSampleService;
|
import com.zhgd.xmgl.modules.gt.service.IGtMaterialSendReceiveSampleService;
|
||||||
|
import com.zhgd.xmgl.util.ReflectionUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -66,7 +67,8 @@ public class GtMaterialSendReceiveSampleController {
|
|||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
Result<IPage<GtMaterialSendReceiveSample>> result = new Result<IPage<GtMaterialSendReceiveSample>>();
|
Result<IPage<GtMaterialSendReceiveSample>> result = new Result<IPage<GtMaterialSendReceiveSample>>();
|
||||||
QueryWrapper<GtMaterialSendReceiveSample> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialSendReceiveSample, req.getParameterMap());
|
QueryWrapper<GtMaterialSendReceiveSample> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialSendReceiveSample, req.getParameterMap(), null,
|
||||||
|
ReflectionUtil.getFieldNameList(GtMaterialSendReceiveSample::getProjectName, GtMaterialSendReceiveSample::getSampleName));
|
||||||
Page<GtMaterialSendReceiveSample> page = new Page<GtMaterialSendReceiveSample>(pageNo, pageSize);
|
Page<GtMaterialSendReceiveSample> page = new Page<GtMaterialSendReceiveSample>(pageNo, pageSize);
|
||||||
IPage<GtMaterialSendReceiveSample> pageList = gtMaterialSendReceiveSampleService.page(page, queryWrapper);
|
IPage<GtMaterialSendReceiveSample> pageList = gtMaterialSendReceiveSampleService.page(page, queryWrapper);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
|||||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||||
import com.zhgd.xmgl.modules.gt.entity.GtMaterialTestingInstitution;
|
import com.zhgd.xmgl.modules.gt.entity.GtMaterialTestingInstitution;
|
||||||
import com.zhgd.xmgl.modules.gt.service.IGtMaterialTestingInstitutionService;
|
import com.zhgd.xmgl.modules.gt.service.IGtMaterialTestingInstitutionService;
|
||||||
|
import com.zhgd.xmgl.util.ReflectionUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -66,7 +67,8 @@ public class GtMaterialTestingInstitutionController {
|
|||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
Result<IPage<GtMaterialTestingInstitution>> result = new Result<IPage<GtMaterialTestingInstitution>>();
|
Result<IPage<GtMaterialTestingInstitution>> result = new Result<IPage<GtMaterialTestingInstitution>>();
|
||||||
QueryWrapper<GtMaterialTestingInstitution> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialTestingInstitution, req.getParameterMap());
|
QueryWrapper<GtMaterialTestingInstitution> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialTestingInstitution, req.getParameterMap(), null,
|
||||||
|
ReflectionUtil.getFieldNameList(GtMaterialTestingInstitution::getInstitutionName));
|
||||||
Page<GtMaterialTestingInstitution> page = new Page<GtMaterialTestingInstitution>(pageNo, pageSize);
|
Page<GtMaterialTestingInstitution> page = new Page<GtMaterialTestingInstitution>(pageNo, pageSize);
|
||||||
IPage<GtMaterialTestingInstitution> pageList = gtMaterialTestingInstitutionService.page(page, queryWrapper);
|
IPage<GtMaterialTestingInstitution> pageList = gtMaterialTestingInstitutionService.page(page, queryWrapper);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
|||||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||||
import com.zhgd.xmgl.modules.gt.entity.GtMaterialWitnessSample;
|
import com.zhgd.xmgl.modules.gt.entity.GtMaterialWitnessSample;
|
||||||
import com.zhgd.xmgl.modules.gt.service.IGtMaterialWitnessSampleService;
|
import com.zhgd.xmgl.modules.gt.service.IGtMaterialWitnessSampleService;
|
||||||
|
import com.zhgd.xmgl.util.ReflectionUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -66,7 +67,8 @@ public class GtMaterialWitnessSampleController {
|
|||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
Result<IPage<GtMaterialWitnessSample>> result = new Result<IPage<GtMaterialWitnessSample>>();
|
Result<IPage<GtMaterialWitnessSample>> result = new Result<IPage<GtMaterialWitnessSample>>();
|
||||||
QueryWrapper<GtMaterialWitnessSample> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialWitnessSample, req.getParameterMap());
|
QueryWrapper<GtMaterialWitnessSample> queryWrapper = QueryGenerator.initQueryWrapper(gtMaterialWitnessSample, req.getParameterMap(), null,
|
||||||
|
ReflectionUtil.getFieldNameList(GtMaterialWitnessSample::getProjectName, GtMaterialWitnessSample::getSampleName));
|
||||||
Page<GtMaterialWitnessSample> page = new Page<GtMaterialWitnessSample>(pageNo, pageSize);
|
Page<GtMaterialWitnessSample> page = new Page<GtMaterialWitnessSample>(pageNo, pageSize);
|
||||||
IPage<GtMaterialWitnessSample> pageList = gtMaterialWitnessSampleService.page(page, queryWrapper);
|
IPage<GtMaterialWitnessSample> pageList = gtMaterialWitnessSampleService.page(page, queryWrapper);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
|
|||||||
@ -79,6 +79,9 @@ public class SjSafeEnvironmentFile implements Serializable {
|
|||||||
@ApiModelProperty(value = "三江安全环保资料中心文件类型id")
|
@ApiModelProperty(value = "三江安全环保资料中心文件类型id")
|
||||||
private Long sjSafeEnvironmentFileTypeId;
|
private Long sjSafeEnvironmentFileTypeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "每次上传文件唯一值")
|
||||||
|
private String uploadStamp;
|
||||||
|
|
||||||
@ApiModelProperty(value = "项目SN或企业sn")
|
@ApiModelProperty(value = "项目SN或企业sn")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private java.lang.String sn;
|
private java.lang.String sn;
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 三江安全环保资料中心
|
* @Description: 三江安全环保资料中心
|
||||||
@ -25,4 +26,6 @@ public interface SjSafeEnvironmentFileMapper extends BaseMapper<SjSafeEnvironmen
|
|||||||
void updateFilepathByFilepathAndProjectSnList(@Param("oldfilePath") String oldfilePath, @Param("newfilePath") String newfilePath, @Param("list") List<String> projectSnList);
|
void updateFilepathByFilepathAndProjectSnList(@Param("oldfilePath") String oldfilePath, @Param("newfilePath") String newfilePath, @Param("list") List<String> projectSnList);
|
||||||
|
|
||||||
void updateFilepathByPathAndName(SjSafeEnvironmentFile sjSafeEnvironmentFile);
|
void updateFilepathByPathAndName(SjSafeEnvironmentFile sjSafeEnvironmentFile);
|
||||||
|
|
||||||
|
List<SjSafeEnvironmentFile> getFileList(Map<String, Object> map);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,4 +33,29 @@
|
|||||||
UPDATE sj_safe_environment_file SET file_path=#{filePath}
|
UPDATE sj_safe_environment_file SET file_path=#{filePath}
|
||||||
WHERE file_id=#{fileId}
|
WHERE file_id=#{fileId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="getFileList" resultType="com.zhgd.xmgl.modules.sanjiang.entity.SjSafeEnvironmentFile">
|
||||||
|
<!--目录合并同名的,文件合并同个url的(每次上传确定的url)-->
|
||||||
|
SELECT * FROM `sj_safe_environment_file`
|
||||||
|
where is_dir = 1
|
||||||
|
and project_sn in
|
||||||
|
<foreach item="item" index="index" collection="projectSnList"
|
||||||
|
open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
and sj_safe_environment_file_type_id = #{sjSafeEnvironmentFileTypeId}
|
||||||
|
and file_path = #{filePath}
|
||||||
|
GROUP BY CONCAT(file_path,file_name)
|
||||||
|
UNION ALL
|
||||||
|
SELECT * FROM `sj_safe_environment_file`
|
||||||
|
where is_dir = 0
|
||||||
|
and project_sn in
|
||||||
|
<foreach item="item" index="index" collection="projectSnList"
|
||||||
|
open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
and sj_safe_environment_file_type_id = #{sjSafeEnvironmentFileTypeId}
|
||||||
|
and file_path = #{filePath}
|
||||||
|
GROUP BY file_url
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -98,8 +98,8 @@ public class SjSafeEnvironmentFileServiceImpl extends ServiceImpl<SjSafeEnvironm
|
|||||||
newSjSafeEnvironmentFile.setFileName(sjSafeEnvironmentFile.getFileName());
|
newSjSafeEnvironmentFile.setFileName(sjSafeEnvironmentFile.getFileName());
|
||||||
sjSafeEnvironmentFileMapper.update(newSjSafeEnvironmentFile, new LambdaQueryWrapper<SjSafeEnvironmentFile>()
|
sjSafeEnvironmentFileMapper.update(newSjSafeEnvironmentFile, new LambdaQueryWrapper<SjSafeEnvironmentFile>()
|
||||||
.in(SjSafeEnvironmentFile::getProjectSn, projectSnList)
|
.in(SjSafeEnvironmentFile::getProjectSn, projectSnList)
|
||||||
.eq(SjSafeEnvironmentFile::getFilePath, sjSafeEnvironmentFile.getFilePath())
|
.eq(SjSafeEnvironmentFile::getFilePath, oldSjSafeEnvironmentFile.getFilePath())
|
||||||
.eq(SjSafeEnvironmentFile::getFileName, sjSafeEnvironmentFile.getFileName())
|
.eq(SjSafeEnvironmentFile::getFileName, oldSjSafeEnvironmentFile.getFileName())
|
||||||
);
|
);
|
||||||
sjSafeEnvironmentFileMapper.replaceProjectFilePathAndProjectSnList(oldSjSafeEnvironmentFile.getFilePath() + sjSafeEnvironmentFile.getFileName() + "/",
|
sjSafeEnvironmentFileMapper.replaceProjectFilePathAndProjectSnList(oldSjSafeEnvironmentFile.getFilePath() + sjSafeEnvironmentFile.getFileName() + "/",
|
||||||
oldSjSafeEnvironmentFile.getFilePath() + oldSjSafeEnvironmentFile.getFileName() + "/", projectSnList);
|
oldSjSafeEnvironmentFile.getFilePath() + oldSjSafeEnvironmentFile.getFileName() + "/", projectSnList);
|
||||||
@ -138,10 +138,14 @@ public class SjSafeEnvironmentFileServiceImpl extends ServiceImpl<SjSafeEnvironm
|
|||||||
SjSafeEnvironmentFile oldSjSafeEnvironmentFile = sjSafeEnvironmentFileMapper.selectById(sjSafeEnvironmentFile.getFileId());
|
SjSafeEnvironmentFile oldSjSafeEnvironmentFile = sjSafeEnvironmentFileMapper.selectById(sjSafeEnvironmentFile.getFileId());
|
||||||
if (1 == oldSjSafeEnvironmentFile.getIsDir()) {
|
if (1 == oldSjSafeEnvironmentFile.getIsDir()) {
|
||||||
String filePath = oldSjSafeEnvironmentFile.getFilePath() + oldSjSafeEnvironmentFile.getFileName() + "/";
|
String filePath = oldSjSafeEnvironmentFile.getFilePath() + oldSjSafeEnvironmentFile.getFileName() + "/";
|
||||||
QueryWrapper<SjSafeEnvironmentFile> queryWrapper = new QueryWrapper<>();
|
//删除下级
|
||||||
queryWrapper.lambda().in(SjSafeEnvironmentFile::getProjectSn, projectSnList)
|
sjSafeEnvironmentFileMapper.delete(new LambdaQueryWrapper<SjSafeEnvironmentFile>().in(SjSafeEnvironmentFile::getProjectSn, projectSnList)
|
||||||
.likeRight(SjSafeEnvironmentFile::getFilePath, filePath);
|
.likeRight(SjSafeEnvironmentFile::getFilePath, filePath));
|
||||||
sjSafeEnvironmentFileMapper.delete(queryWrapper);
|
//删除自己这个目录
|
||||||
|
sjSafeEnvironmentFileMapper.delete(new LambdaQueryWrapper<SjSafeEnvironmentFile>().in(SjSafeEnvironmentFile::getProjectSn, projectSnList)
|
||||||
|
.eq(SjSafeEnvironmentFile::getFilePath, oldSjSafeEnvironmentFile.getFilePath())
|
||||||
|
.eq(SjSafeEnvironmentFile::getFileName, oldSjSafeEnvironmentFile.getFileName())
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
sjSafeEnvironmentFileMapper.delete(new LambdaQueryWrapper<SjSafeEnvironmentFile>().in(SjSafeEnvironmentFile::getProjectSn, projectSnList)
|
sjSafeEnvironmentFileMapper.delete(new LambdaQueryWrapper<SjSafeEnvironmentFile>().in(SjSafeEnvironmentFile::getProjectSn, projectSnList)
|
||||||
.eq(SjSafeEnvironmentFile::getFileUrl, oldSjSafeEnvironmentFile.getFileUrl()));
|
.eq(SjSafeEnvironmentFile::getFileUrl, oldSjSafeEnvironmentFile.getFileUrl()));
|
||||||
@ -202,13 +206,8 @@ public class SjSafeEnvironmentFileServiceImpl extends ServiceImpl<SjSafeEnvironm
|
|||||||
if (CollectionUtil.isEmpty(projectSnList)) {
|
if (CollectionUtil.isEmpty(projectSnList)) {
|
||||||
return Result.error("查询不到项目sn");
|
return Result.error("查询不到项目sn");
|
||||||
}
|
}
|
||||||
QueryWrapper<SjSafeEnvironmentFile> queryWrapper = new QueryWrapper<>();
|
map.put("projectSnList", projectSnList);
|
||||||
queryWrapper.lambda()
|
List<SjSafeEnvironmentFile> list = sjSafeEnvironmentFileMapper.getFileList(map);
|
||||||
.in(SjSafeEnvironmentFile::getProjectSn, projectSnList)
|
|
||||||
.eq(SjSafeEnvironmentFile::getSjSafeEnvironmentFileTypeId, MapUtils.getLong(map, "sjSafeEnvironmentFileTypeId"))
|
|
||||||
.eq(SjSafeEnvironmentFile::getFilePath, MapUtils.getString(map, "filePath"));
|
|
||||||
queryWrapper.orderByAsc("is_dir");
|
|
||||||
List<SjSafeEnvironmentFile> list = list(queryWrapper);
|
|
||||||
return Result.success(list);
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.zhgd.xmgl.modules.weight.entity;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
@ -11,6 +12,9 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 货名
|
* @Description: 货名
|
||||||
* @author: pds
|
* @author: pds
|
||||||
@ -19,7 +23,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@TableName("goods_name")
|
@TableName("goods_name")
|
||||||
@ApiModel(value="GoodsName实体类",description="GoodsName")
|
@ApiModel(value = "GoodsName实体类", description = "GoodsName")
|
||||||
public class GoodsName implements Serializable {
|
public class GoodsName implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ -29,16 +33,20 @@ public class GoodsName implements Serializable {
|
|||||||
private java.lang.Long id ;
|
private java.lang.Long id ;
|
||||||
/**货名*/
|
/**货名*/
|
||||||
@Excel(name = "货名", width = 15)
|
@Excel(name = "货名", width = 15)
|
||||||
@ApiModelProperty(value="货名")
|
@ApiModelProperty(value = "货名")
|
||||||
private java.lang.String goodsName ;
|
private java.lang.String goodsName;
|
||||||
/**单价*/
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
@Excel(name = "单价", width = 15)
|
@Excel(name = "单价", width = 15)
|
||||||
@ApiModelProperty(value="单价")
|
@ApiModelProperty(value = "单价")
|
||||||
private java.math.BigDecimal unitPrice ;
|
private String unitPrice;
|
||||||
/**折方系数*/
|
/**
|
||||||
|
* 折方系数
|
||||||
|
*/
|
||||||
@Excel(name = "折方系数", width = 15)
|
@Excel(name = "折方系数", width = 15)
|
||||||
@ApiModelProperty(value="折方系数")
|
@ApiModelProperty(value = "折方系数")
|
||||||
private java.math.BigDecimal foldSquare ;
|
private java.math.BigDecimal foldSquare;
|
||||||
/**货名扣重*/
|
/**货名扣重*/
|
||||||
@Excel(name = "货名扣重", width = 15)
|
@Excel(name = "货名扣重", width = 15)
|
||||||
@ApiModelProperty(value="货名扣重")
|
@ApiModelProperty(value="货名扣重")
|
||||||
|
|||||||
@ -1,9 +1,6 @@
|
|||||||
package com.zhgd.xmgl.modules.weight.entity;
|
package com.zhgd.xmgl.modules.weight.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -71,7 +68,7 @@ public class WeighBookVehicleInfo implements Serializable {
|
|||||||
* 过磅类型
|
* 过磅类型
|
||||||
*/
|
*/
|
||||||
@Excel(name = "过磅类型", width = 15)
|
@Excel(name = "过磅类型", width = 15)
|
||||||
@ApiModelProperty(value = "过磅类型")
|
@ApiModelProperty(value = "过磅类型(1采购过磅,2销售过磅,3内部过磅,4其他过磅)")
|
||||||
private java.lang.Integer weighingType;
|
private java.lang.Integer weighingType;
|
||||||
/**
|
/**
|
||||||
* 录入时间
|
* 录入时间
|
||||||
@ -103,11 +100,15 @@ public class WeighBookVehicleInfo implements Serializable {
|
|||||||
@Excel(name = "所属项目SN", width = 15)
|
@Excel(name = "所属项目SN", width = 15)
|
||||||
@ApiModelProperty(value = "所属项目SN")
|
@ApiModelProperty(value = "所属项目SN")
|
||||||
private java.lang.String projectSn;
|
private java.lang.String projectSn;
|
||||||
|
|
||||||
|
@TableLogic
|
||||||
|
@ApiModelProperty(value = "0正常1已删除")
|
||||||
|
private Integer deleted;
|
||||||
/**
|
/**
|
||||||
* 现场上次拉取的时间
|
* 现场上次拉取的时间
|
||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String lastAddTime;
|
private String lastPullTime;
|
||||||
/**
|
/**
|
||||||
* 上次查询的id(查询这个id数据之后的数据(不返回这条id数据))
|
* 上次查询的id(查询这个id数据之后的数据(不返回这条id数据))
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,9 +1,13 @@
|
|||||||
package com.zhgd.xmgl.modules.weight.mapper;
|
package com.zhgd.xmgl.modules.weight.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.zhgd.xmgl.modules.weight.entity.WeighBookVehicleInfo;
|
import com.zhgd.xmgl.modules.weight.entity.WeighBookVehicleInfo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 过磅预约车辆信息
|
* @Description: 过磅预约车辆信息
|
||||||
* @author: pds
|
* @author: pds
|
||||||
@ -13,4 +17,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface WeighBookVehicleInfoMapper extends BaseMapper<WeighBookVehicleInfo> {
|
public interface WeighBookVehicleInfoMapper extends BaseMapper<WeighBookVehicleInfo> {
|
||||||
|
|
||||||
|
IPage<WeighBookVehicleInfo> getByLastPullTime(HashMap<String, String> map, Page<WeighBookVehicleInfo> page);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.zhgd.xmgl.modules.weight.mapper.WeighBookVehicleInfoMapper">
|
<mapper namespace="com.zhgd.xmgl.modules.weight.mapper.WeighBookVehicleInfoMapper">
|
||||||
|
<select id="getByLastPullTime" resultType="com.zhgd.xmgl.modules.weight.entity.WeighBookVehicleInfo">
|
||||||
|
select *
|
||||||
|
from weigh_book_vehicle_info vi
|
||||||
|
where vi.project_sn = #{projectSn}
|
||||||
|
and vi.update_time <![CDATA[>=]]> #{lastPullTime}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -11,9 +11,11 @@ import com.zhgd.xmgl.modules.weight.entity.WeighBookVehicleInfo;
|
|||||||
import com.zhgd.xmgl.modules.weight.mapper.WeighBookVehicleInfoMapper;
|
import com.zhgd.xmgl.modules.weight.mapper.WeighBookVehicleInfoMapper;
|
||||||
import com.zhgd.xmgl.modules.weight.service.IWeighBookVehicleInfoService;
|
import com.zhgd.xmgl.modules.weight.service.IWeighBookVehicleInfoService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 过磅预约车辆信息
|
* @Description: 过磅预约车辆信息
|
||||||
@ -23,27 +25,36 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class WeighBookVehicleInfoServiceImpl extends ServiceImpl<WeighBookVehicleInfoMapper, WeighBookVehicleInfo> implements IWeighBookVehicleInfoService {
|
public class WeighBookVehicleInfoServiceImpl extends ServiceImpl<WeighBookVehicleInfoMapper, WeighBookVehicleInfo> implements IWeighBookVehicleInfoService {
|
||||||
|
@Autowired
|
||||||
|
WeighBookVehicleInfoMapper weighBookVehicleInfoMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result queryPageList(WeighBookVehicleInfo weighBookVehicleInfo, Integer pageNo, Integer pageSize, HttpServletRequest req) {
|
public Result queryPageList(WeighBookVehicleInfo weighBookVehicleInfo, Integer pageNo, Integer pageSize, HttpServletRequest req) {
|
||||||
if (StringUtils.isBlank(weighBookVehicleInfo.getProjectSn())) {
|
String projectSn = weighBookVehicleInfo.getProjectSn();
|
||||||
|
if (StringUtils.isBlank(projectSn)) {
|
||||||
return Result.error("projectSn不能为空");
|
return Result.error("projectSn不能为空");
|
||||||
}
|
}
|
||||||
String lastAdddatetime = weighBookVehicleInfo.getLastAddTime();
|
String lastPullTime = weighBookVehicleInfo.getLastPullTime();
|
||||||
Long lastQueryId = weighBookVehicleInfo.getLastQueryId();
|
Long lastQueryId = weighBookVehicleInfo.getLastQueryId();
|
||||||
Result<IPage<WeighBookVehicleInfo>> result = new Result<IPage<WeighBookVehicleInfo>>();
|
Result<IPage<WeighBookVehicleInfo>> result = new Result<IPage<WeighBookVehicleInfo>>();
|
||||||
LambdaQueryWrapper<WeighBookVehicleInfo> queryWrapper = new LambdaQueryWrapper<WeighBookVehicleInfo>()
|
LambdaQueryWrapper<WeighBookVehicleInfo> queryWrapper = new LambdaQueryWrapper<WeighBookVehicleInfo>()
|
||||||
.eq(StringUtils.isNotBlank(weighBookVehicleInfo.getProjectSn()), WeighBookVehicleInfo::getProjectSn, weighBookVehicleInfo.getProjectSn())
|
.eq(StringUtils.isNotBlank(projectSn), WeighBookVehicleInfo::getProjectSn, projectSn)
|
||||||
.like(StringUtils.isNotBlank(weighBookVehicleInfo.getSpecifications()), WeighBookVehicleInfo::getSpecifications, weighBookVehicleInfo.getSpecifications())
|
.like(StringUtils.isNotBlank(weighBookVehicleInfo.getSpecifications()), WeighBookVehicleInfo::getSpecifications, weighBookVehicleInfo.getSpecifications())
|
||||||
.like(StringUtils.isNotBlank(weighBookVehicleInfo.getGoodsName()), WeighBookVehicleInfo::getGoodsName, weighBookVehicleInfo.getGoodsName())
|
.like(StringUtils.isNotBlank(weighBookVehicleInfo.getGoodsName()), WeighBookVehicleInfo::getGoodsName, weighBookVehicleInfo.getGoodsName())
|
||||||
.like(StringUtils.isNotBlank(weighBookVehicleInfo.getLicensePlate()), WeighBookVehicleInfo::getLicensePlate, weighBookVehicleInfo.getLicensePlate())
|
.like(StringUtils.isNotBlank(weighBookVehicleInfo.getLicensePlate()), WeighBookVehicleInfo::getLicensePlate, weighBookVehicleInfo.getLicensePlate())
|
||||||
.gt(lastQueryId != null, WeighBookVehicleInfo::getId, lastQueryId);
|
.gt(lastQueryId != null, WeighBookVehicleInfo::getId, lastQueryId);
|
||||||
if (StringUtils.isNotBlank(lastAdddatetime)) {
|
IPage<WeighBookVehicleInfo> pageList;
|
||||||
DateTime dateTime = DateUtil.parse(lastAdddatetime);
|
|
||||||
queryWrapper.ge(WeighBookVehicleInfo::getAddDateTime, dateTime);
|
|
||||||
}
|
|
||||||
Page<WeighBookVehicleInfo> page = new Page<WeighBookVehicleInfo>(pageNo, pageSize);
|
Page<WeighBookVehicleInfo> page = new Page<WeighBookVehicleInfo>(pageNo, pageSize);
|
||||||
IPage<WeighBookVehicleInfo> pageList = page(page, queryWrapper);
|
if (StringUtils.isNotBlank(lastPullTime)) {
|
||||||
|
DateTime dateTime = DateUtil.parse(lastPullTime);
|
||||||
|
queryWrapper.ge(WeighBookVehicleInfo::getAddDateTime, dateTime);
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("projectSn", projectSn);
|
||||||
|
map.put("lastPullTime", lastPullTime);
|
||||||
|
pageList = weighBookVehicleInfoMapper.getByLastPullTime(map, page);
|
||||||
|
} else {
|
||||||
|
pageList = page(page, queryWrapper);
|
||||||
|
}
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
result.setResult(pageList);
|
result.setResult(pageList);
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@ -13,10 +13,16 @@
|
|||||||
GROUP BY department_id
|
GROUP BY department_id
|
||||||
) b ON a.id=b.department_id
|
) b ON a.id=b.department_id
|
||||||
WHERE a.project_sn=#{projectSn}
|
WHERE a.project_sn=#{projectSn}
|
||||||
<if test="enterpriseId!=null and enterpriseId!=''">
|
<if test="belongingSection != null and belongingSection != ''">
|
||||||
|
and a.belonging_section like CONCAT('%',#{belongingSection},'%')
|
||||||
|
</if>
|
||||||
|
<if test="chargePersonName != null and chargePersonName != ''">
|
||||||
|
and a.charge_person_name like CONCAT('%',#{chargePersonName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="enterpriseId != null and enterpriseId != ''">
|
||||||
and a.enterprise_id=#{enterpriseId}
|
and a.enterprise_id=#{enterpriseId}
|
||||||
</if>
|
</if>
|
||||||
<if test="userEnterpriseId!=null and userEnterpriseId!=''">
|
<if test="userEnterpriseId != null and userEnterpriseId != ''">
|
||||||
and FIND_IN_SET(a.enterprise_id,#{userEnterpriseId})
|
and FIND_IN_SET(a.enterprise_id,#{userEnterpriseId})
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
71
src/main/resources/application-other-env-show.properties
Normal file
71
src/main/resources/application-other-env-show.properties
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
http.port=30260
|
||||||
|
#http.port=6023
|
||||||
|
#spring.datasource.url=jdbc:mysql://183.60.227.61:20246/wisdomsite?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&serverTimezone=UTC
|
||||||
|
spring.datasource.url=jdbc:mysql://139.9.66.234:33306/wisdomsite_other_env_show?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true
|
||||||
|
#spring.datasource.url=jdbc:mysql://127.0.0.1:20246/wisdomsite?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true
|
||||||
|
spring.datasource.username=ENC(XR4C/hvTYCUqudS49Wh/jA==)
|
||||||
|
spring.datasource.password=ENC(hHkiHEc6vSWjqfOtg2/2Uiihs0vX3l7V)
|
||||||
|
server.port=12643
|
||||||
|
#server.port=30246
|
||||||
|
basePath=F:/zhgd/itbgpImage/
|
||||||
|
server.tomcat.basedir=F:/zhgd/tempImage/
|
||||||
|
arcsoft.dllPath=F:/zhgd/dll
|
||||||
|
#basePath=F:/zhgd/itbgpImage/
|
||||||
|
#server.tomcat.basedir=F:/zhgd/tempImage/
|
||||||
|
#arcsoft.dllPath=F:/zhgd/dll
|
||||||
|
security.enable=true
|
||||||
|
isGetStandardData=false
|
||||||
|
isGetEnvironmentData=false
|
||||||
|
isGetFaceFeatureDate=false
|
||||||
|
#海康视频报警图片IP端口替换
|
||||||
|
video.alarm.newUrl=223.82.100.80:6040
|
||||||
|
wx-appid=
|
||||||
|
wx-AppSecret=
|
||||||
|
mqtt-scope=devTopic
|
||||||
|
serverUrl=http://124.71.178.44:30249
|
||||||
|
#serverUrl=http://127.0.0.1:6023
|
||||||
|
#视频分析url
|
||||||
|
video-analysis-url=
|
||||||
|
#客户端 License相关配置
|
||||||
|
license.licensePath=E:/license/license.lic
|
||||||
|
license.publicKeysStorePath=E:/license/publicCerts.keystore
|
||||||
|
#文件上传
|
||||||
|
zhgd.file-storage.type=local
|
||||||
|
#文件存储配置
|
||||||
|
#默认使用的存储平台
|
||||||
|
spring.file-storage.default-platform=local
|
||||||
|
#".min.jpg" #缩略图后缀,例如【.min.jpg】【.png】
|
||||||
|
spring.file-storage.thumbnail-suffix=.jpg
|
||||||
|
# 本地存储,不使用的情况下可以不写
|
||||||
|
# 存储平台标识
|
||||||
|
spring.file-storage.local[0].platform=local
|
||||||
|
#启用存储
|
||||||
|
spring.file-storage.local[0].enable-storage=true
|
||||||
|
#启用访问(线上请使用 Nginx 配置,效率更高)
|
||||||
|
spring.file-storage.local[0].enable-access=false
|
||||||
|
# 访问域名,例如:“http://127.0.0.1:6023/image/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名
|
||||||
|
spring.file-storage.local[0].domain=
|
||||||
|
# 存储地址
|
||||||
|
spring.file-storage.local[0].base-path=F:/zhgd/itbgpImage/
|
||||||
|
# 访问路径,开启 enable-access 后,通过此路径可以访问到上传的文件
|
||||||
|
spring.file-storage.local[0].path-patterns=
|
||||||
|
server.ssl.enabled=false
|
||||||
|
#\u9ED8\u8BA4\u653F\u52A1\u521B\u5EFA\u9879\u76EE\u6240\u5C5E\u4F01\u4E1A
|
||||||
|
defaultZwComapnySn=
|
||||||
|
spring.file-storage.aliyun-oss[0].platform=aliyun-oss
|
||||||
|
spring.file-storage.aliyun-oss[0].enable-storage=false
|
||||||
|
spring.file-storage.aliyun-oss[0].access-key=
|
||||||
|
spring.file-storage.aliyun-oss[0].secret-key=
|
||||||
|
spring.file-storage.aliyun-oss[0].end-point=
|
||||||
|
spring.file-storage.aliyun-oss[0].bucket-name=
|
||||||
|
# \u8BBF\u95EE\u57DF\u540D\uFF0C\u6CE8\u610F\u201C/\u201D\u7ED3\u5C3E\uFF0C\u4F8B\u5982\uFF1Ahttps://abc.oss-cn-shanghai.aliyuncs.com/
|
||||||
|
spring.file-storage.aliyun-oss[0].domain=
|
||||||
|
spring.file-storage.aliyun-oss[0].base-path=
|
||||||
|
# admin\u4E2D\u5BF9\u5E94\u7684\u5730\u5740\u53CA\u5B9E\u4F8B\u540D
|
||||||
|
spring.boot.admin.client.instance.service-url=http://localhost:18070
|
||||||
|
spring.boot.admin.client.instance.name=zjsj
|
||||||
|
# \u6C34\u7535\u6570\u636E\u63A8\u9001\u5730\u5740
|
||||||
|
double-carbon.water-data-url=http://test.cesms.net
|
||||||
|
double-carbon.ammeter-data-url=http://test.cesms.net
|
||||||
|
#\u9AD8\u652F\u6A21\u7684tcp\u670D\u52A1\u7AEF\u7684\u7AEF\u53E3\u53F7
|
||||||
|
high_formwork.netty.port=15333
|
||||||
@ -50,6 +50,10 @@ spring.jackson.defaultPropertyInclusion=ALWAYS
|
|||||||
# mybatis \u914D\u7F6E
|
# mybatis \u914D\u7F6E
|
||||||
mybatis-plus.mapper-locations=classpath*:com/zhgd/xmgl/**/*.xml,classpath*:com/zhwl/zw/**/*.xml
|
mybatis-plus.mapper-locations=classpath*:com/zhgd/xmgl/**/*.xml,classpath*:com/zhwl/zw/**/*.xml
|
||||||
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
|
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
|
# 全局逻辑删除的实体字段名(since 3.3.0,配置后可以忽略不配置步骤2)
|
||||||
|
#mybatis-plus.global-config.db-config.logic-delete-field=flag
|
||||||
|
mybatis-plus.global-config.db-config.logic-delete-value=1
|
||||||
|
mybatis-plus.global-config.db-config.logic-not-delete-value=0
|
||||||
# mvc \u89C6\u56FE\u5BF9\u8C61\u914D\u7F6E
|
# mvc \u89C6\u56FE\u5BF9\u8C61\u914D\u7F6E
|
||||||
spring.mvc.view.prefix=/
|
spring.mvc.view.prefix=/
|
||||||
spring.mvc.view.suffix=.html
|
spring.mvc.view.suffix=.html
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user