Commit 282c68b0 authored by 罗贤顺's avatar 罗贤顺

字段回显问题修复

parent 1717d728
......@@ -49,6 +49,8 @@
a.y,
a.z,
a.StepHeight
a.DrillingDate
a.DesignDate
FROM T_Processes_BlastDesign_Hole a
where 1=1
<if test="params.designDate != null and params.designDate != ''">
......
......@@ -9,6 +9,7 @@ import cn.wise.sc.acquisition.business.model.query.TSampleListQuery;
import cn.wise.sc.acquisition.business.service.ITProcessesBlastdesignHoleService;
import cn.wise.sc.acquisition.business.service.ITSampleLaboratorysheetService;
import cn.wise.sc.acquisition.business.service.ITSampleListService;
import cn.wise.sc.acquisition.business.util.DateUtil;
import cn.wise.sc.acquisition.business.util.ImageUtil;
import cn.wise.sc.acquisition.business.wrapper.page.Query;
import com.alibaba.fastjson.JSON;
......@@ -62,12 +63,17 @@ public class TSampleListServiceImpl extends ServiceImpl<TSampleListMapper, TSamp
ProjectEnum.TSampleListType.SYR.getLabel(),
ProjectEnum.TSampleListType.SYRQ.getLabel()
);
String startDate = tSampleListQuery.getSearch() + "00:00:00";
String endDate = tSampleListQuery.getSearch() + "23:59:59";
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(ProjectEnum.TableAlias.A.getLabel()).append(ProjectEnum.TSampleListType.SYRQ.getLabel());
queryWrapper
.like(StringUtils.isNotBlank(tSampleListQuery.getSearch()), ProjectEnum.TSampleListType.YH.getLabel(), tSampleListQuery.getSearch())
.or()
.like(StringUtils.isNotBlank(tSampleListQuery.getSearch()), ProjectEnum.TSampleListType.HOLES_ID.getLabel(), tSampleListQuery.getSearch())
.or()
.like(StringUtils.isNotBlank(tSampleListQuery.getSearch()), ProjectEnum.TSampleListType.SYRQ.getLabel(), tSampleListQuery.getSearch());
.ge(stringBuilder.toString(), DateUtil.getBeginTimeStr(DateUtil.strToTime(startDate)))
.le(stringBuilder.toString(), DateUtil.getEndTimeStr(DateUtil.strToTime(endDate)));
//查询
Page<TSampleList> tSampleListPage = baseMapper.selectPage(page, queryWrapper);
return R.ok(tSampleListPage);
......
......@@ -15,7 +15,8 @@
<if test="params.endDate != null and params.endDate != ''">
and Convert(varchar(10),tw.Rq,120) <![CDATA[ <= ]]> #{params.endDate}
</if>
<if test="params.startDate == null and params.endDate == null">
<if test="(params.startDate == null or params.startDate == '')
and (params.endDate == null or params.endDate == '')">
and datediff(week, tw.Rq,getdate())=0
</if>
group by Convert(varchar(10),tw.Rq,120)
......@@ -36,17 +37,12 @@
<if test="params.endDate != null and params.endDate != ''">
and Convert(varchar(10),tw.Rq,120) <![CDATA[ <= ]]> #{params.endDate}
</if>
<if test="params.startDate == null and params.endDate == null">
<if test="(params.startDate == null or params.startDate == '')
and (params.endDate == null or params.endDate == '')">
and datediff(week, tw.Rq,getdate())=0
</if>
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment