Explorar o código

王耀栋--工作台模块代码:修改查询列表bug

wangyaodong %!s(int64=3) %!d(string=hai) anos
pai
achega
1e705498f7

+ 6 - 10
simulation-resource-server/src/main/java/com/css/simulation/resource/project/impl/SimulationProjectServiceImpl.java

@@ -12,6 +12,7 @@ import api.common.pojo.param.system.DictParam;
 import api.common.pojo.po.project.*;
 import api.common.pojo.vo.project.*;
 import api.common.util.JsonUtil;
+import api.common.util.TimeUtil;
 import com.css.simulation.resource.common.utils.AuthUtil;
 import com.css.simulation.resource.common.utils.PageUtil;
 import com.css.simulation.resource.project.constants.ProjectConstants;
@@ -98,7 +99,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
 
         if(!isEmpty(param.getCreateStartDate())){
             String createStartDate = param.getCreateStartDate();
-            Date startDate = getDate(createStartDate + " 00:00:00",1);
+            Date startDate = getDate(createStartDate + " 00:00:00",1);
             if(startDate == null){
                 return new ResponseBodyVO(ResponseBodyVO.Response.CLIENT_FAILURE);
             }
@@ -106,7 +107,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
         }
         if(!isEmpty(param.getCreateEndDate())){
             String createEndDate = param.getCreateEndDate();
-            Date endDate = getDate(createEndDate + " 11:59:59",1);
+            Date endDate = getDate(createEndDate + " 11:59:59",1);
             if(endDate == null){
                 return new ResponseBodyVO(ResponseBodyVO.Response.CLIENT_FAILURE);
             }
@@ -115,7 +116,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
 
         if(!isEmpty(param.getFinishDateStart())){
             String finishDateStart = param.getFinishDateStart();
-            Date startDate = getDate(finishDateStart + " 00:00:00",1);
+            Date startDate = getDate(finishDateStart + " 00:00:00",1);
             if(startDate == null){
                 return new ResponseBodyVO(ResponseBodyVO.Response.CLIENT_FAILURE);
             }
@@ -124,7 +125,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
         }
         if(!isEmpty(param.getFinishDateEnd())){
             String finishDateEnd = param.getFinishDateEnd();
-            Date enddate = getDate(finishDateEnd + " 11:59:59",1);
+            Date enddate = getDate(finishDateEnd + " 11:59:59",1);
             if(enddate == null){
                 return new ResponseBodyVO(ResponseBodyVO.Response.CLIENT_FAILURE);
             }
@@ -732,12 +733,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
     }
 
     private Integer getRq(Date date, int index){
-        SimpleDateFormat sdf = new SimpleDateFormat(dateFmtArr[index]);
-        if(date == null){
-            date = new Date();
-        }
-        return Integer.valueOf(sdf.format(date));
-
+        return  TimeUtil.getRq(date,index);
     }
 
     private String getRqStr(Date date, int index){

+ 2 - 2
simulation-resource-server/src/main/resources/mapper/project/SimulationProjectMapper.xml

@@ -130,10 +130,10 @@
         <where>
             is_deleted = '0'
             <if test="projectId != null and projectId != ''">
-                and project_id like CONCAT('%',#{project_id,jdbcType=VARCHAR},'%')
+                and project_id like CONCAT('%',#{projectId,jdbcType=VARCHAR},'%')
             </if>
             <if test="projectName != null and projectName != ''">
-                and project_name like CONCAT('%',#{project_name,jdbcType=VARCHAR},'%')
+                and project_name like CONCAT('%',#{projectName,jdbcType=VARCHAR},'%')
             </if>
             <if test="nowRunState != null and nowRunState != ''">
                 and now_run_state = #{nowRunState}