Ver Fonte

Merge remote-tracking branch 'origin/master'

dongke há 1 ano atrás
pai
commit
3ce928012f

+ 3 - 0
src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml

@@ -1120,6 +1120,9 @@
         <if test="whId != null">
             AND tpi.wh_id = #{whId} ::uuid
         </if>
+        <if test="inqtyFlag != null">
+            AND tpi.inv_qty != 0
+        </if>
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
         </if>

+ 8 - 1
src/main/java/com/dk/mdm/service/common/CommonService.java

@@ -18,6 +18,7 @@ import org.postgresql.util.PGobject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.util.*;
 
@@ -1139,7 +1140,13 @@ public class CommonService extends BaseService<Map<String, Object>> {
      */
     public ResponseResultVO<Map<String, Object>> getCurrentDate(Map<String, Object> param) {
         Map<String, Object> res = new HashMap<>();
-        res.put("currentDate", LocalDate.now());
+        if(param.isEmpty()) {
+            res.put("currentDate", LocalDate.now());
+        }else {
+            Date date = new Date();
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat ("yyyy-MM-dd hh:mm:ss");
+            res.put("currentDate", simpleDateFormat.format(date));
+        }
         return ResponseResultUtil.success(res);
     }
 }