Browse Source

时间格式

laoyao 3 years ago
parent
commit
8735985af9

+ 7 - 6
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/impl/RobotNodeServiceImpl.java

@@ -91,7 +91,6 @@ public class RobotNodeServiceImpl implements NodeOperationService {
         map.put("bizType", bizType);
 
 
-
         ResourceAutoCode resourceAutoCode = taskNode.getAutoNode();
         String functionName = resourceAutoCode.getCommand();
         String moduleName = dataMap.get("moduleName") == null ? "" : dataMap.get("moduleName").toString();
@@ -126,12 +125,12 @@ public class RobotNodeServiceImpl implements NodeOperationService {
             }
             //
             map.put("result", (CollectionUtil.isNotEmpty(jqrList)));
-        }else if("拿1".equals(moduleName)){
-            int count = dataMap.get(taskNode.getId().toString()+"count")==null?0:Integer.parseInt(dataMap.get(taskNode.getId().toString()+"count").toString());
+        } else if ("拿1".equals(moduleName)) {
+            int count = dataMap.get(taskNode.getId().toString() + "count") == null ? 0 : Integer.parseInt(dataMap.get(taskNode.getId().toString() + "count").toString());
             //执行到第几步
-            map.put(taskNode.getId().toString()+"count",count);
+            map.put(taskNode.getId().toString() + "count", count);
             map.put(DemoLineConstant.DEMOLINE_RXJQR_FLAG, "1");
-            map.put("zkIp",ZK_ip_rxx);
+            map.put("zkIp", ZK_ip_rxx);
 
 //            if(count==0){//第一步的时候锁定资源
 //                //判断机器人是否为空
@@ -171,8 +170,10 @@ public class RobotNodeServiceImpl implements NodeOperationService {
 //                map.put("result", true);
 //            }
 //        }
-                return map;
+
         }
+        return map;
+    }
 
 
 

+ 7 - 4
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/operationManagementCenter/entity/Order.java

@@ -30,6 +30,7 @@ import lombok.experimental.Accessors;
 import com.github.zuihou.common.constant.DictionaryType;
 import org.springframework.format.annotation.DateTimeFormat;
 
+import static com.github.zuihou.utils.DateUtils.DEFAULT_DATE_FORMAT;
 import static com.github.zuihou.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
 
 import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
@@ -133,7 +134,9 @@ public class Order extends Entity<Long> {
      */
     @ApiModelProperty(value = "下单时间")
     @TableField("order_time")
-    @Excel(name = "下单时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
+    @Excel(name = "下单时间", format = DEFAULT_DATE_FORMAT, width = 20)
+    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
     private Date orderTime;
 
     /**
@@ -141,9 +144,9 @@ public class Order extends Entity<Long> {
      */
     @ApiModelProperty(value = "交货时间")
     @TableField("delivery_time")
-    @Excel(name = "交货时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
-    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "交货时间", format = DEFAULT_DATE_FORMAT, width = 20)
+    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
     private Date deliveryTime;
 
     /**

+ 7 - 1
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/operationManagementCenter/entity/OrderProduct.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
 import java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.github.zuihou.base.entity.Entity;
 import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
@@ -25,6 +26,9 @@ import lombok.NoArgsConstructor;
 import lombok.ToString;
 import lombok.experimental.Accessors;
 import com.github.zuihou.common.constant.DictionaryType;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import static com.github.zuihou.utils.DateUtils.DEFAULT_DATE_FORMAT;
 import static com.github.zuihou.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
 
 import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
@@ -93,7 +97,9 @@ public class OrderProduct extends Entity<Long> {
      */
     @ApiModelProperty(value = "交货时间")
     @TableField("delivery_time")
-    @Excel(name = "交货时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
+    @Excel(name = "交货时间", format = DEFAULT_DATE_FORMAT, width = 20)
+    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
     private Date deliveryTime;
 
     /**

+ 4 - 4
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/operationManagementCenter/entity/Plan.java

@@ -228,16 +228,16 @@ public class Plan extends Entity<Long> {
     @ApiModelProperty(value = "交货时间")
     @TableField(exist = false)
     @Excel(name = "交货时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
-    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
     private Date deliveryTime;
 
 
     @ApiModelProperty(value = "零件交货时间")
     @TableField(exist = false)
     @Excel(name = "零件交货时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
-    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
     private Date pdeliveryTime;