Browse Source

万里牛订单同步逻辑修改

24282 1 year ago
parent
commit
ea4ab2d895

+ 0 - 549
sd-business/src/main/java/com/sd/business/a-json/ArtworkLibraryApi.json

@@ -1,549 +0,0 @@
-{
-  "openapi": "3.0.1",
-  "tags": [
-    {
-      "name": "图稿库"
-    }
-  ],
-  "paths": {
-    "/artworkLibrary/list": {
-      "post": {
-        "summary": "列表",
-        "tags": [
-          "图稿库"
-        ],
-        "requestBody": {
-          "content": {
-            "application/json": {
-              "schema": {
-                "type": null,
-                "required": null,
-                "title": null,
-                "properties": null,
-                "items": null
-              }
-            }
-          }
-        },
-        "responses": {
-          "200": {
-            "description": "成功",
-            "content": {
-              "application/json": {
-                "schema": {
-                  "type": "object",
-                  "required": [
-                    "code",
-                    "success",
-                    "msg",
-                    "data"
-                  ],
-                  "title": null,
-                  "properties": {
-                    "code": {
-                      "type": "Integer",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "success": {
-                      "type": "boolean",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "msg": {
-                      "type": "string",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "data": {
-                      "type": "array",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": {
-                        "type": "object",
-                        "required": null,
-                        "title": null,
-                        "properties": {
-                          "id": {
-                            "type": "integer",
-                            "required": null,
-                            "title": "id",
-                            "properties": null,
-                            "items": null
-                          },
-                          "artworkName": {
-                            "type": "string",
-                            "required": null,
-                            "title": "图稿名称",
-                            "properties": null,
-                            "items": null
-                          },
-                          "artworkUploadUrl": {
-                            "type": "string",
-                            "required": null,
-                            "title": "图稿上传地址",
-                            "properties": null,
-                            "items": null
-                          },
-                          "artworkTepy": {
-                            "type": "integer",
-                            "required": null,
-                            "title": "地址类型(0图片  1文件)",
-                            "properties": null,
-                            "items": null
-                          }
-                        },
-                        "items": null
-                      }
-                    }
-                  },
-                  "items": null
-                }
-              }
-            }
-          }
-        }
-      }
-    },
-    "/artworkLibrary/page": {
-      "post": {
-        "summary": "分页",
-        "tags": [
-          "图稿库"
-        ],
-        "requestBody": {
-          "content": {
-            "application/json": {
-              "schema": {
-                "type": "object",
-                "required": [
-                  "pageNum",
-                  "pageSize"
-                ],
-                "title": null,
-                "properties": {
-                  "pageNum": {
-                    "type": "integer",
-                    "required": null,
-                    "title": "页数",
-                    "properties": null,
-                    "items": null
-                  },
-                  "pageSize": {
-                    "type": "integer",
-                    "required": null,
-                    "title": "每页大小",
-                    "properties": null,
-                    "items": null
-                  }
-                },
-                "items": null
-              }
-            }
-          }
-        },
-        "responses": {
-          "200": {
-            "description": "成功",
-            "content": {
-              "application/json": {
-                "schema": {
-                  "type": "object",
-                  "required": [
-                    "code",
-                    "success",
-                    "msg",
-                    "data"
-                  ],
-                  "title": null,
-                  "properties": {
-                    "code": {
-                      "type": "Integer",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "success": {
-                      "type": "boolean",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "msg": {
-                      "type": "string",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "data": {
-                      "type": "object",
-                      "required": [
-                        "rows",
-                        "total"
-                      ],
-                      "title": null,
-                      "properties": {
-                        "rows": {
-                          "type": "array",
-                          "required": null,
-                          "title": "分页数据",
-                          "properties": null,
-                          "items": {
-                            "type": "object",
-                            "required": null,
-                            "title": null,
-                            "properties": {
-                              "id": {
-                                "type": "integer",
-                                "required": null,
-                                "title": "id",
-                                "properties": null,
-                                "items": null
-                              },
-                              "artworkName": {
-                                "type": "string",
-                                "required": null,
-                                "title": "图稿名称",
-                                "properties": null,
-                                "items": null
-                              },
-                              "artworkUploadUrl": {
-                                "type": "string",
-                                "required": null,
-                                "title": "图稿上传地址",
-                                "properties": null,
-                                "items": null
-                              },
-                              "artworkTepy": {
-                                "type": "integer",
-                                "required": null,
-                                "title": "地址类型(0图片  1文件)",
-                                "properties": null,
-                                "items": null
-                              }
-                            },
-                            "items": null
-                          }
-                        },
-                        "total": {
-                          "type": "integer",
-                          "required": null,
-                          "title": "总条数",
-                          "properties": null,
-                          "items": null
-                        }
-                      },
-                      "items": null
-                    }
-                  },
-                  "items": null
-                }
-              }
-            }
-          }
-        }
-      }
-    },
-    "/artworkLibrary/detail": {
-      "post": {
-        "summary": "明细",
-        "tags": [
-          "图稿库"
-        ],
-        "requestBody": {
-          "content": {
-            "application/json": {
-              "schema": {
-                "type": "object",
-                "required": [
-                  "id"
-                ],
-                "title": null,
-                "properties": {
-                  "id": {
-                    "type": "integer",
-                    "required": null,
-                    "title": "图稿库id",
-                    "properties": null,
-                    "items": null
-                  }
-                },
-                "items": null
-              }
-            }
-          }
-        },
-        "responses": {
-          "200": {
-            "description": "成功",
-            "content": {
-              "application/json": {
-                "schema": {
-                  "type": "object",
-                  "required": [
-                    "code",
-                    "success",
-                    "msg",
-                    "data"
-                  ],
-                  "title": null,
-                  "properties": {
-                    "code": {
-                      "type": "Integer",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "success": {
-                      "type": "boolean",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "msg": {
-                      "type": "string",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "data": {
-                      "type": "object",
-                      "required": null,
-                      "title": null,
-                      "properties": {
-                        "id": {
-                          "type": "integer",
-                          "required": null,
-                          "title": "id",
-                          "properties": null,
-                          "items": null
-                        },
-                        "artworkName": {
-                          "type": "string",
-                          "required": null,
-                          "title": "图稿名称",
-                          "properties": null,
-                          "items": null
-                        },
-                        "artworkUploadUrl": {
-                          "type": "string",
-                          "required": null,
-                          "title": "图稿上传地址",
-                          "properties": null,
-                          "items": null
-                        },
-                        "artworkTepy": {
-                          "type": "integer",
-                          "required": null,
-                          "title": "地址类型(0图片  1文件)",
-                          "properties": null,
-                          "items": null
-                        }
-                      },
-                      "items": null
-                    }
-                  },
-                  "items": null
-                }
-              }
-            }
-          }
-        }
-      }
-    },
-    "/artworkLibrary/edit": {
-      "post": {
-        "summary": "编辑",
-        "tags": [
-          "图稿库"
-        ],
-        "requestBody": {
-          "content": {
-            "application/json": {
-              "schema": {
-                "type": "object",
-                "required": null,
-                "title": null,
-                "properties": {
-                  "id": {
-                    "type": "integer",
-                    "required": null,
-                    "title": "id",
-                    "properties": null,
-                    "items": null
-                  },
-                  "artworkName": {
-                    "type": "string",
-                    "required": null,
-                    "title": "图稿名称",
-                    "properties": null,
-                    "items": null
-                  },
-                  "artworkUploadUrl": {
-                    "type": "string",
-                    "required": null,
-                    "title": "图稿上传地址",
-                    "properties": null,
-                    "items": null
-                  },
-                  "artworkTepy": {
-                    "type": "integer",
-                    "required": null,
-                    "title": "地址类型(0图片  1文件)",
-                    "properties": null,
-                    "items": null
-                  }
-                },
-                "items": null
-              }
-            }
-          }
-        },
-        "responses": {
-          "200": {
-            "description": "成功",
-            "content": {
-              "application/json": {
-                "schema": {
-                  "type": "object",
-                  "required": [
-                    "code",
-                    "success",
-                    "msg",
-                    "data"
-                  ],
-                  "title": null,
-                  "properties": {
-                    "code": {
-                      "type": "Integer",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "success": {
-                      "type": "boolean",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "msg": {
-                      "type": "string",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "data": {
-                      "type": null,
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    }
-                  },
-                  "items": null
-                }
-              }
-            }
-          }
-        }
-      }
-    },
-    "/artworkLibrary/delete": {
-      "post": {
-        "summary": "删除",
-        "tags": [
-          "图稿库"
-        ],
-        "requestBody": {
-          "content": {
-            "application/json": {
-              "schema": {
-                "type": "object",
-                "required": [
-                  "id"
-                ],
-                "title": null,
-                "properties": {
-                  "id": {
-                    "type": "integer",
-                    "required": null,
-                    "title": "图稿库id",
-                    "properties": null,
-                    "items": null
-                  }
-                },
-                "items": null
-              }
-            }
-          }
-        },
-        "responses": {
-          "200": {
-            "description": "成功",
-            "content": {
-              "application/json": {
-                "schema": {
-                  "type": "object",
-                  "required": [
-                    "code",
-                    "success",
-                    "msg",
-                    "data"
-                  ],
-                  "title": null,
-                  "properties": {
-                    "code": {
-                      "type": "Integer",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "success": {
-                      "type": "boolean",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "msg": {
-                      "type": "string",
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    },
-                    "data": {
-                      "type": null,
-                      "required": null,
-                      "title": null,
-                      "properties": null,
-                      "items": null
-                    }
-                  },
-                  "items": null
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-}

+ 9 - 0
sd-business/src/main/java/com/sd/business/controller/statement/StatementOfAccountController.java

@@ -5,6 +5,7 @@ import com.ruoyi.common.core.domain.BaseSelectDto;
 import com.sd.business.entity.statement.dto.FileUploadDto;
 import com.sd.business.entity.statement.dto.StatementOfAccountDto;
 import com.sd.business.entity.statement.dto.StatementOfAccountSelectDto;
+import com.sd.business.entity.statement.vo.DocumentBySkuVo;
 import com.sd.business.entity.statement.vo.ReconciliationDetailVo;
 import com.sd.business.entity.statement.vo.StatementOfAccountVo;
 import com.sd.business.service.statement.StatementOfAccountService;
@@ -89,4 +90,12 @@ public class StatementOfAccountController {
         statementOfAccountService.delete(dto.getId());
     }
 
+    /**
+     * sku对账
+     */
+    @PostMapping("/getDocumentBySku")
+    public List<DocumentBySkuVo> getDocumentBySku(@RequestBody BaseSelectDto dto) {
+        return statementOfAccountService.getDocumentBySku(dto.getId());
+    }
+
 }

+ 6 - 1
sd-business/src/main/java/com/sd/business/entity/order/po/OrderInfo.java

@@ -85,9 +85,14 @@ public class OrderInfo extends BasePo {
     private Date deliveryTime;
 
     /**
+     * 万里牛同步时间
+     */
+    private Date wlnModifyTime;
+
+    /**
      * 万里牛同步时间戳
      */
-    private Long modifyTime;
+    private Long wlnModifyTimestamp;
 
     /**
      * 快递单号

+ 6 - 0
sd-business/src/main/java/com/sd/business/entity/order/po/OrderSku.java

@@ -40,6 +40,12 @@ public class OrderSku extends BasePo {
     private Long skuSpecId;
 
     /**
+     * sku规格id
+     */
+    @NotNull(message = "bom规格Id不能为空")
+    private Long bomSpecId;
+
+    /**
      * 万里牛sys_goods_uid
      */
     private String wlnSkuId;

+ 11 - 0
sd-business/src/main/java/com/sd/business/entity/statement/vo/DocumentBySkuVo.java

@@ -0,0 +1,11 @@
+package com.sd.business.entity.statement.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class DocumentBySkuVo {
+
+
+}

+ 6 - 0
sd-business/src/main/java/com/sd/business/service/statement/StatementOfAccountService.java

@@ -6,6 +6,7 @@ import com.sd.business.entity.statement.dto.FileUploadDto;
 import com.sd.business.entity.statement.dto.StatementOfAccountDto;
 import com.sd.business.entity.statement.dto.StatementOfAccountSelectDto;
 import com.sd.business.entity.statement.po.StatementOfAccount;
+import com.sd.business.entity.statement.vo.DocumentBySkuVo;
 import com.sd.business.entity.statement.vo.ReconciliationDetailVo;
 import com.sd.business.entity.statement.vo.StatementOfAccountVo;
 
@@ -52,4 +53,9 @@ public interface StatementOfAccountService extends BaseService<StatementOfAccoun
      */
     void editFile(FileUploadDto dto, int type);
 
+    /**
+     * sku对账
+     */
+    List<DocumentBySkuVo> getDocumentBySku(Long id);
+
 }

+ 12 - 0
sd-business/src/main/java/com/sd/business/service/statement/impl/StatementOfAccountServiceImpl.java

@@ -15,6 +15,7 @@ import com.sd.business.entity.statement.dto.FileUploadDto;
 import com.sd.business.entity.statement.dto.StatementOfAccountDto;
 import com.sd.business.entity.statement.dto.StatementOfAccountSelectDto;
 import com.sd.business.entity.statement.po.StatementOfAccount;
+import com.sd.business.entity.statement.vo.DocumentBySkuVo;
 import com.sd.business.entity.statement.vo.ReconciliationDetailVo;
 import com.sd.business.entity.statement.vo.StatementOfAccountVo;
 import com.sd.business.mapper.statement.StatementOfAccountMapper;
@@ -22,6 +23,7 @@ import com.sd.business.service.department.DepartmentService;
 import com.sd.business.service.order.OrderService;
 import com.sd.business.service.statement.StatementOfAccountService;
 import com.sd.business.util.CodeEnum;
+import com.sd.framework.util.Assert;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -179,4 +181,14 @@ public class StatementOfAccountServiceImpl extends ServiceImpl<StatementOfAccoun
         ObsFileUtil.editFile(dto.getFileList(), dto.getId(), type);
     }
 
+    @Override
+    public List<DocumentBySkuVo> getDocumentBySku(Long id) {
+        Assert.notNull(id, "对账单id不能为空");
+        StatementOfAccount statementOfAccount = getById(id);
+        Assert.notNull(statementOfAccount, "没有找到对账单");
+
+
+        return null;
+    }
+
 }

+ 5 - 3
sd-wln/src/main/java/com/sd/wln/service/impl/WlnOrderServiceImpl.java

@@ -132,7 +132,7 @@ public class WlnOrderServiceImpl implements WlnOrderService {
             OrderInfo oldOrderInfo = orderMap.get(orderInfo.getWlnUid());
             if (oldOrderInfo != null) {
                 if (ObjectUtil.notEqual(oldOrderInfo.getWlnStatus(), orderInfo.getWlnStatus())
-                        || ObjectUtil.notEqual(oldOrderInfo.getModifyTime(), orderInfo.getModifyTime())
+                        || ObjectUtil.notEqual(oldOrderInfo.getWlnModifyTimestamp(), orderInfo.getWlnModifyTimestamp())
                         || ObjectUtil.notEqual(DateUtil.formatDateTime(oldOrderInfo.getWlnApproveTime()), DateUtil.formatDateTime(orderInfo.getWlnApproveTime()))
                         || ObjectUtil.notEqual(DateUtil.formatDateTime(oldOrderInfo.getWlnPrintTime()), DateUtil.formatDateTime(orderInfo.getWlnPrintTime()))
                         || ObjectUtil.notEqual(oldOrderInfo.getWlnStorageCode(), orderInfo.getWlnStorageCode())
@@ -140,7 +140,8 @@ public class WlnOrderServiceImpl implements WlnOrderService {
                     OrderInfo updateOrder = new OrderInfo();
                     updateOrder.setId(oldOrderInfo.getId());
                     updateOrder.setWlnStatus(orderInfo.getWlnStatus());
-                    updateOrder.setModifyTime(orderInfo.getModifyTime());
+                    updateOrder.setWlnModifyTime(orderInfo.getWlnModifyTime());
+                    updateOrder.setWlnModifyTimestamp(orderInfo.getWlnModifyTimestamp());
                     updateOrder.setWlnApproveTime(orderInfo.getWlnApproveTime());
                     updateOrder.setWlnPrintTime(orderInfo.getWlnPrintTime());
                     updateOrder.setWlnStorageCode(orderInfo.getWlnStorageCode());
@@ -293,7 +294,8 @@ public class WlnOrderServiceImpl implements WlnOrderService {
         orderInfo.setWlnCode(wlnOrder.getString("trade_no"));
         orderInfo.setWlnStatus(wlnOrder.getInteger("process_status"));
         orderInfo.setWlnUid(wlnOrder.getString("uid"));
-        orderInfo.setModifyTime(wlnOrder.getLong("modify_time"));
+        orderInfo.setWlnModifyTime(wlnOrder.getDate("modify_time"));
+        orderInfo.setWlnModifyTimestamp(wlnOrder.getLong("modify_time"));
         orderInfo.setWlnCreateTime(wlnOrder.getDate("create_time"));
         orderInfo.setWlnApproveTime(wlnOrder.getDate("approve_time"));
         orderInfo.setWlnPrintTime(wlnOrder.getDate("print_time"));