Merge remote-tracking branch 'origin/develop_master' into develop_master

This commit is contained in:
yuezhihang
2022-01-26 20:38:02 +08:00
16 changed files with 2008 additions and 18 deletions
@@ -110,8 +110,8 @@ public class WebMvcConfig implements WebMvcConfigurer {
addInterceptor.excludePathPatterns("/api/lawss/activiti/loginMobile");
// //测试接口使用
addInterceptor.excludePathPatterns("/api/**");
//// //测试接口使用
// addInterceptor.excludePathPatterns("/api/**");
@@ -22,6 +22,8 @@ import java.util.List;
@Repository
public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
List<SarBussionessStand> queryByBussStateSync(SarBussionessStand sarBussionessStand);
SarBussionessStand getStandInfoByReviseStatus(String reviseStatus);
SarBussionessStand selectByPrimaryKey(String standId);
@@ -219,6 +219,17 @@ public class SarBussionessStand extends BaseEntity {
@TableField(exist = false)
private List<SarStandAttrDetailsEO> attrInfoList = new ArrayList<>();
/**
* 新增条件字段
* @return
*/
@TableField(exist = false)
private String reviewTime;
@TableField(exist = false)
private String issueTimeStart;
@TableField(exist = false)
private String issueTimeEnd;
public static long getSerialVersionUID() {
return serialVersionUID;
}
@@ -5,7 +5,9 @@ import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -30,7 +32,7 @@ public class SarBussionessStandState extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键/企业标准信息主键")
@TableField("ID")
@TableId(value = "ID", type = IdType.UUID)
private String id;
@ApiModelProperty(value = "企标ID")
@@ -47,11 +49,13 @@ public class SarBussionessStandState extends BaseEntity {
@ApiModelProperty(value = "复审时间")
@TableField("REVIEW_TIME")
private Date reviewTime;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
private String reviewTime;
@ApiModelProperty(value = "发布日期")
@TableField("ISSUE_TIME")
private Date issueTime;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
private String issueTime;
@ApiModelProperty(value = "复审结果 1 修订、2 废止、3 继续有效")
@TableField("REVIEW_RESULTS")
@@ -63,11 +67,13 @@ public class SarBussionessStandState extends BaseEntity {
@ApiModelProperty(value = "创建日期")
@TableField("CREATION_TIME")
private Date creationTime;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private String creationTime;
@ApiModelProperty(value = "更新日期")
@TableField("MODIFY_TIME")
private Date modifyTime;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private String modifyTime;
@TableField("VALID_FLAG")
private Integer validFlag;
@@ -0,0 +1,257 @@
package com.adc.da.slrs.sarBussionessStandState.sync;
import com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao;
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
import com.adc.da.slrs.sarBussionessStandState.entity.SarBussionessStandState;
import com.adc.da.slrs.sarBussionessStandState.service.ISarBussionessStandStateService;
import com.adc.da.util.DateUtils;
import com.adc.da.utils.util.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.*;
import java.util.stream.Collectors;
/**
* @Description: TODO
* @author: super_liu
* @date: 2022年01月25日 3:34
*/
@EnableScheduling
@Component
@Slf4j
public class StateSync {
Logger logger = LoggerFactory.getLogger(StateSync.class);
@Autowired
private SarBussionessStandDao sarBussionessStandDao;
@Autowired
private ISarBussionessStandStateService bussionessStandStateService;
/**
* 根据配置文件设置是否开启定时器
*/
@Value("${isNotScheduled}")
private boolean isNotScheduled; //是否开启定时器
// 月初
@Scheduled(cron="0 0 1 1 * ?")
// @Scheduled(cron="*/5 * * * * ?")
@Async
public void StandScheduledJobMonthBegin(){
if(isNotScheduled){
try{
Thread.sleep(2000);
logger.info("月初:"+Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---START-01");
String nowFirst = DateUtil.firstOneDay(DateUtil.printDate(new Date()));
String nowFin = DateUtil.finOneDay(DateUtil.printDate(new Date()));
String nowFinByQuery = DateUtil.addDay(DateUtil.finOneDay(DateUtil.printDate(new Date())),1);
System.out.println("当前月第一日:"+nowFirst);
System.out.println("当前月最后一日:"+nowFin);
SarBussionessStand stand = new SarBussionessStand();
stand.setIssueTimeStart(nowFirst);
stand.setIssueTimeEnd(nowFin);
List<SarBussionessStand> standList = sarBussionessStandDao.queryByBussStateSync(stand);
if(!standList.isEmpty()){
List<SarBussionessStandState> filterList = new ArrayList<>();
standList.forEach(sarBussionessStand -> {
SarBussionessStandState state = new SarBussionessStandState();
state.setStandId(sarBussionessStand.getId());
state.setStandCode(sarBussionessStand.getStandCode());
state.setStandName(sarBussionessStand.getStandName());
if(DateUtil.printToDate(sarBussionessStand.getIssueTime()) != null){
state.setIssueTime(sarBussionessStand.getIssueTime());
}
if(DateUtil.printToDate(sarBussionessStand.getReviewTime()) != null){
state.setReviewTime(sarBussionessStand.getReviewTime());
}
state.setCreationTime(DateUtil.printDateAll(new Date()));
state.setModifyTime(DateUtil.printDateAll(new Date()));
filterList.add(state);
});
List<SarBussionessStandState> insList = new ArrayList<>();
List<SarBussionessStandState> updList = new ArrayList<>();
QueryWrapper wrapper = new QueryWrapper();
wrapper.isNull("REVIEW_RESULTS");
wrapper.between("REVIEW_TIME",nowFirst,nowFinByQuery);
List<SarBussionessStandState> stateList = bussionessStandStateService.list(wrapper);
if(!stateList.isEmpty()){
// 差集 (list1 - list2) 新增复审表
List<SarBussionessStandState> distinctByUniqueList = filterList.stream()
.filter(item -> !stateList.stream()
.map(SarBussionessStandState::getStandId)
.collect(Collectors.toList())
.contains(item.getStandId()))
.collect(Collectors.toList());
insList.addAll(distinctByUniqueList);
// 交集 更新复审表
List<SarBussionessStandState> intersection = filterList.stream()
.filter(item -> stateList.stream()
.map(SarBussionessStandState::getStandId)
.collect(Collectors.toList())
.contains(item.getStandId()))
.collect(Collectors.toList());
// jdk8 stream 更新集合批量赋值ID
List<SarBussionessStandState> updSetList = intersection.stream()
.map(upObj -> stateList.stream()
.filter(stateQueryObj -> upObj.getStandId().equals(stateQueryObj.getStandId()))
.findFirst()
.map(stateQueryObj -> {
upObj.setId(stateQueryObj.getId());
upObj.setModifyTime(DateUtil.printDateAll(new Date()));
return upObj;
}).orElse(null))
.collect(Collectors.toList());
updList.addAll(updSetList);
}else {
// 新增复审表
insList.addAll(filterList);
}
// 复审表操作逻辑 新增
if(!insList.isEmpty()){
bussionessStandStateService.saveBatch(insList);
}
// 复审表操作逻辑 更新
if(!updList.isEmpty()){
// List<SarBussionessStandState> updListResult = updList.stream().peek(p -> p.setModifyTime(DateUtil.printDateAll(new Date()))).collect(Collectors.toList());
bussionessStandStateService.updateBatchById(updList);
}
}
logger.info("月初:"+Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---End-01");
}catch(Exception e){
logger.info(e.getMessage());
}
}
}
// 月末
@Scheduled(cron="0 0 1 28-31 * ?")
// @Scheduled(cron="*/5 * * * * ?")
@Async
public void StandScheduledJobMonthEnd(){
if(isNotScheduled){
try{
Thread.sleep(2000);
// 判断当前日期是否为月末
Date date = new Date();
if(isLastDayOfMonth(date)){
logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"---START-01");
String nextFirst = DateUtil.printDate(DateUtil.nextMonthFirstDate());
String nextFin = DateUtil.finOneDay(DateUtil.printDate(DateUtil.nextMonthFirstDate()));
String nextFinByQuery = DateUtil.addDay(DateUtil.finOneDay(DateUtil.printDate(DateUtil.nextMonthFirstDate())),1);
System.out.println("下个月第一日:"+ nextFirst);
System.out.println("下个月最后一日:"+nextFin);
SarBussionessStand stand = new SarBussionessStand();
stand.setIssueTimeStart(nextFirst);
stand.setIssueTimeEnd(nextFin);
List<SarBussionessStand> standList = sarBussionessStandDao.queryByBussStateSync(stand);
if(!standList.isEmpty()){
List<SarBussionessStandState> filterList = new ArrayList<>();
standList.forEach(sarBussionessStand -> {
SarBussionessStandState state = new SarBussionessStandState();
state.setStandId(sarBussionessStand.getId());
state.setStandCode(sarBussionessStand.getStandCode());
state.setStandName(sarBussionessStand.getStandName());
if(DateUtil.printToDate(sarBussionessStand.getIssueTime()) != null){
state.setIssueTime(sarBussionessStand.getIssueTime());
}
if(DateUtil.printToDate(sarBussionessStand.getReviewTime()) != null){
state.setReviewTime(sarBussionessStand.getReviewTime());
}
state.setCreationTime(DateUtil.printDateAll(new Date()));
state.setModifyTime(DateUtil.printDateAll(new Date()));
filterList.add(state);
});
List<SarBussionessStandState> insList = new ArrayList<>();
List<SarBussionessStandState> updList = new ArrayList<>();
QueryWrapper wrapper = new QueryWrapper();
wrapper.isNull("REVIEW_RESULTS");
wrapper.between("REVIEW_TIME",nextFirst,nextFinByQuery);
List<SarBussionessStandState> stateList = bussionessStandStateService.list(wrapper);
if(!stateList.isEmpty()){
// 差集 (list1 - list2) 新增复审表
List<SarBussionessStandState> distinctByUniqueList = filterList.stream()
.filter(item -> !stateList.stream()
.map(SarBussionessStandState::getStandId)
.collect(Collectors.toList())
.contains(item.getStandId()))
.collect(Collectors.toList());
insList.addAll(distinctByUniqueList);
// 交集 更新复审表
List<SarBussionessStandState> intersection = filterList.stream()
.filter(item -> stateList.stream()
.map(SarBussionessStandState::getStandId)
.collect(Collectors.toList())
.contains(item.getStandId()))
.collect(Collectors.toList());
// jdk8 stream 更新集合批量赋值ID
List<SarBussionessStandState> updSetList = intersection.stream()
.map(upObj -> stateList.stream()
.filter(stateQueryObj -> upObj.getStandId().equals(stateQueryObj.getStandId()))
.findFirst()
.map(stateQueryObj -> {
upObj.setId(stateQueryObj.getId());
upObj.setModifyTime(DateUtil.printDateAll(new Date()));
return upObj;
}).orElse(null))
.collect(Collectors.toList());
updList.addAll(updSetList);
}else {
// 新增复审表
insList.addAll(filterList);
}
// 复审表操作逻辑 新增
if(!insList.isEmpty()){
bussionessStandStateService.saveBatch(insList);
}
// 复审表操作逻辑 更新
if(!updList.isEmpty()){
// List<SarBussionessStandState> updListResult = updList.stream().peek(p -> p.setModifyTime(DateUtil.printDateAll(new Date()))).collect(Collectors.toList());
bussionessStandStateService.updateBatchById(updList);
}
}
logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"---End-01");
}else {
logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"当前日期不是最后一日---End-01");
}
}catch(Exception e){
logger.info(e.getMessage());
}
}
}
/** * 判断给定日期是否为月末的一天 * * @param date * @return true:是|false:不是 */
public static boolean isLastDayOfMonth(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.set(Calendar.DATE, (calendar.get(Calendar.DATE) + 1));
if (calendar.get(Calendar.DAY_OF_MONTH) == 1){
return true;
}
return false;
}
}
@@ -269,7 +269,7 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
List<Map<String, String>> arr = dicTypeList.stream()
.map(item -> {
Map<String, String> map = new HashMap<>();
map.put("lable", item.getLabel());
map.put("label", item.getLabel());
map.put("value", item.getValue());
return map;
}).collect(Collectors.toList());
@@ -44,6 +44,19 @@ public class SarModelTreeController extends BaseController<SarModelTree> {
return Result.success(tsResources);
}
@ApiOperation("查询父所有资源")
@GetMapping("/listByType")
public ResponseMessage<List<SarModelTree>> getAllByType(String type){
// List<SarModuleTree> tsResources = iSarModuleTreeService.getAll(null);
SarModelTree rootData = new SarModelTree();
rootData.setModelType(type);
rootData.setDelFlag("1");
List<SarModelTree> tsResources = iSarModelTreeService.getAll(rootData);
return Result.success(tsResources);
}
@ApiOperation("根据父ID查询子所有资源")
@GetMapping("/childByList")
public ResponseMessage<List<SarModelTree>> childByList(SarModelTree parentTree){
@@ -73,5 +73,25 @@ public class SarModelTree extends BaseEntity {
@TableField(exist = false)
private boolean leaf;
/**
* 模块类型
* TRUCK 卡车类
* CAR 乘用车类
*/
@TableField("MODEL_TYPE")
private String modelType;
/**
* 模块层级父级ID
* 为兼容之前的树结构逻辑,此处单独新增父级ID关联关系
*/
@TableField("MODEL_PID")
private String modelPid;
/**
* 模块数据层级关系
*/
@TableField("MODEL_LEVEL")
private int modelLevel;
}
@@ -5,6 +5,7 @@ import com.adc.da.slrs.sarModelTree.dao.SarModelTreeDao;
import com.adc.da.slrs.sarModelTree.service.ISarModelTreeService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import java.util.List;
@@ -30,6 +31,10 @@ public class SarModelTreeServiceImpl extends ServiceImpl<SarModelTreeDao, SarMod
public List<SarModelTree> getAll(SarModelTree sarModelTree) {
QueryWrapper<SarModelTree> tsResourceQueryWrapper=new QueryWrapper<>();
tsResourceQueryWrapper.isNull("PID");
if(sarModelTree!=null && StringUtils.isNotBlank(sarModelTree.getModelType())){
tsResourceQueryWrapper.eq("MODEL_TYPE",sarModelTree.getModelType());
}
tsResourceQueryWrapper.eq("DEL_FLAG","1");
List<SarModelTree> list = this.baseMapper.selectList(tsResourceQueryWrapper);
// for(SarModelTree tree:list){
// tree.setChildren(recursionGetChildren((tree)));
@@ -59,6 +64,10 @@ public class SarModelTreeServiceImpl extends ServiceImpl<SarModelTreeDao, SarMod
sarMenuQueryWrapper.orderByAsc("SORT");
// sarMenuQueryWrapper.in("PID",parent.getId());
sarMenuQueryWrapper.eq("PID",parent.getId());
if(parent!=null && StringUtils.isNotBlank(parent.getModelType())){
sarMenuQueryWrapper.eq("MODEL_TYPE",parent.getModelType());
}
sarMenuQueryWrapper.eq("DEL_FLAG","1");
List<SarModelTree> children=this.baseMapper.selectList(sarMenuQueryWrapper);
// for(SarModelTree sarMenu:children){
// sarMenu.setChildren(recursionGetChildren((sarMenu)));
@@ -20,7 +20,7 @@ import java.util.List;
/**
* <p>
*
*
* </p>
*
* @author zyl
@@ -65,7 +65,7 @@ public class TsResource extends BaseEntity {
@ApiModelProperty(value = "排序序号")
@TableField("DISPLAY_SEQ")
private Integer displaySeq;
@ApiModelProperty(value = "是否有效")
@TableField("VALID_FLAG")
@@ -100,4 +100,7 @@ public class TsResource extends BaseEntity {
@TableField(exist=false)
private String userId;
@TableField(exist = false)
private String isFlow;
}
@@ -224,6 +224,15 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
TsResourceQueryWrapper.like("PARENT_IDS",resource.getId());
TsResourceQueryWrapper.orderByAsc("DISPLAY_SEQ");
List<TsResource> children=dao.selectList(TsResourceQueryWrapper);
/**
* 入库流程去除我的收藏 flow
*/
if ( tsResource.getIsFlow()!=null && "flow".equals(tsResource.getIsFlow())){
children=children.stream()
.filter(item->!"我的收藏".equals(item.getMenuName()))
.collect(Collectors.toList());
}
resource.setChildren(recursionGetListChildrenStand((resource),(children)));
}
@@ -11,6 +11,93 @@ import java.util.*;
*/
public class DateUtil {
public static String addDay(String date, Integer dayInt) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date today = null;
try {
today = sdf.parse(date);
} catch (ParseException e) {
}
String endDate = sdf.format(today);//当前日期
Calendar theCa = Calendar.getInstance();
theCa.setTime(today);
theCa.add(theCa.DATE, +dayInt);//最后一个数字30可改,30天的意思
Date start = theCa.getTime();
String startDate = sdf.format(start);//三十天之前日期
return startDate;
}
public static Date nextMonthFirstDate() {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.add(Calendar.MONTH, 1);
return calendar.getTime();
}
public static Date printToDate(String date) {
Date date1 = null;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
try {
date1 = sdf.parse(date);
}catch (Exception e){
e.getMessage();
}
return date1;
}
public static String printDateAll(Date date) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(date);
}
public static String printDate(Date date) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(date);
}
public static String firstOneDay(String date) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date today = null;
String startDate = "";
try {
today = sdf.parse(date);
String endDate = sdf.format(today);//当前日期
Calendar theCa = Calendar.getInstance();
theCa.setTime(today);
theCa.add(Calendar.MONTH, 0);
theCa.set(Calendar.DAY_OF_MONTH, 1);
Date start = theCa.getTime();
startDate = sdf.format(start);
} catch (ParseException e) {
}
return startDate;
}
public static String finOneDay(String date) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date today = null;
String startDate = "";
try {
today = sdf.parse(date);
String endDate = sdf.format(today);//当前日期
Calendar theCa = Calendar.getInstance();
theCa.setTime(today);
theCa.set(Calendar.DAY_OF_MONTH, 1);
theCa.set(Calendar.DATE, theCa.getActualMaximum(Calendar.DATE));
Date start = theCa.getTime();
startDate = sdf.format(start);
} catch (ParseException e) {
}
return startDate;
}
/**
* 取起始时间到结束时间 所有的时间
* @param startTime
@@ -115,6 +202,12 @@ public class DateUtil {
public static void main(String[] args) {
System.out.println(printDate(new Date()));
System.out.println(firstOneDay(printDate(new Date())));
System.out.println(finOneDay(printDate(new Date())));
System.out.println(addDay(finOneDay(printDate(new Date())),2));
System.out.println(printDate(nextMonthFirstDate()));
System.out.println(finOneDay(printDate(nextMonthFirstDate())));
String utcTime = "2021-04-15T01:43:54.296Z";
String time = formatStrUTCToDateStr("2021-04-15T01:43:54.296Z");
System.out.println("utcTime 转换前:" + utcTime);
@@ -367,6 +367,27 @@
</if>
</select>
<select id="queryByBussStateSync" resultMap="BaseResultMap"
parameterType="com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand">
SELECT
<include refid="Base_Column_List"/>,
DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 5 YEAR),INTERVAL 1 MONTH) AS reviewTime
FROM sar_bussioness_stand
WHERE stand_sort = 'Q/QCBFC'
AND ISSUE_TIME IS NOT NULL
AND DATE_FORMAT(DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 5 YEAR),INTERVAL 1 MONTH),'%Y-%m-%d')
BETWEEN DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_ADD(DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d'),INTERVAL 1 DAY)
UNION
SELECT
<include refid="Base_Column_List"/>,
DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 3 YEAR),INTERVAL 1 MONTH) AS reviewTime
FROM sar_bussioness_stand
WHERE stand_sort != 'Q/QCBFC'
AND ISSUE_TIME IS NOT NULL
AND DATE_FORMAT(DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 3 YEAR),INTERVAL 1 MONTH),'%Y-%m-%d')
BETWEEN DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_ADD(DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d'),INTERVAL 1 DAY)
</select>
<!-- 分页查询条件 -->
<sql id="standSort_in">
@@ -32,19 +32,19 @@
and DATE_FORMAT(REVIEW_TIME, '%Y-%m-%d') between DATE_FORMAT(#{reviewTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{reviewTimeEnd}, '%Y-%m-%d')
</if>
<if test="reviewTimeStart != null and reviewTimeStart != '' and reviewTimeEnd == null and reviewTimeEnd == ''">
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%D') &gt;= DATE_FORMAT(#{reviewTimeStart}, '%Y-%m-%d')
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') &gt;= DATE_FORMAT(#{reviewTimeStart}, '%Y-%m-%d')
</if>
<if test="reviewTimeStart == null and reviewTimeStart == '' and reviewTimeEnd != null and reviewTimeEnd != ''">
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%D') &lt;= DATE_FORMAT(#{reviewTimeEnd}, '%Y-%m-%d')
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') &lt;= DATE_FORMAT(#{reviewTimeEnd}, '%Y-%m-%d')
</if>
<if test="issueTimeStart != null and issueTimeStart != '' and issueTimeEnd != null and issueTimeEnd != ''">
and DATE_FORMAT(REVIEW_TIME, '%Y-%m-%d') between DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
</if>
<if test="issueTimeStart != null and issueTimeStart != '' and issueTimeEnd == null and issueTimeEnd == ''">
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%D') &gt;= DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d')
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') &gt;= DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d')
</if>
<if test="issueTimeStart == null and issueTimeStart == '' and issueTimeEnd != null and issueTimeEnd != ''">
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%D') &lt;= DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') &lt;= DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
</if>
</trim>
</sql>
@@ -58,19 +58,19 @@
and DATE_FORMAT(REVIEW_TIME, '%Y-%m-%d') between DATE_FORMAT(#{reviewTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{reviewTimeEnd}, '%Y-%m-%d')
</if>
<if test="reviewTimeStart != null and reviewTimeStart != '' and reviewTimeEnd == null and reviewTimeEnd == ''">
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%D') &gt;= DATE_FORMAT(#{reviewTimeStart}, '%Y-%m-%d')
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') &gt;= DATE_FORMAT(#{reviewTimeStart}, '%Y-%m-%d')
</if>
<if test="reviewTimeStart == null and reviewTimeStart == '' and reviewTimeEnd != null and reviewTimeEnd != ''">
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%D') &lt;= DATE_FORMAT(#{reviewTimeEnd}, '%Y-%m-%d')
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') &lt;= DATE_FORMAT(#{reviewTimeEnd}, '%Y-%m-%d')
</if>
<if test="issueTimeStart != null and issueTimeStart != '' and issueTimeEnd != null and issueTimeEnd != ''">
and DATE_FORMAT(REVIEW_TIME, '%Y-%m-%d') between DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
</if>
<if test="issueTimeStart != null and issueTimeStart != '' and issueTimeEnd == null and issueTimeEnd == ''">
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%D') &gt;= DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d')
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') &gt;= DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d')
</if>
<if test="issueTimeStart == null and issueTimeStart == '' and issueTimeEnd != null and issueTimeEnd != ''">
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%D') &lt;= DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
and DATE_FORMAT(REVIEW_TIME,'%Y-%m-%d') &lt;= DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d')
</if>
</trim>
</sql>
@@ -0,0 +1,4 @@
ALTER TABLE `sar_model_tree`
ADD COLUMN `MODEL_TYPE` varchar(20) NULL COMMENT '模块数据类型(CAR:乘用车;TRUCK:卡车)' AFTER `HAS_CHILDREN`,
ADD COLUMN `MODEL_PID` varchar(100) NULL COMMENT '模块父级ID' AFTER `MODEL_TYPE`,
ADD COLUMN `MODEL_LEVEL` int(2) NULL COMMENT '模块层级' AFTER `MODEL_PID`;;
File diff suppressed because it is too large Load Diff