Browse Source

抓取数据时添加数据到集中仓库中

master
fkf 2 years ago
parent
commit
7f57f0f887
  1. 29
      yxt-supervise-gf-api/src/main/java/com/yxt/supervise/gf/api/prodstock/ProdStock.java
  2. 9
      yxt-supervise-gf-biz/pom.xml
  3. 2
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/YxtSuperviseGfApplication.java
  4. 72
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/inventory/InventoryService.java
  5. 25
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/enterpriseinformation/EnterpriseInformationFeign.java
  6. 43
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/enterpriseinformation/EnterpriseInformationQuery.java
  7. 43
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/enterpriseinformation/EnterpriseInformationVo.java
  8. 19
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/wh/ShStorehouseFeign.java
  9. 99
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/wh/ShStorehouseQuery.java
  10. 103
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/wh/ShStorehouseVo.java
  11. 4
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/timedtask/ShanHaiTimedTask.java

29
yxt-supervise-gf-api/src/main/java/com/yxt/supervise/gf/api/prodstock/ProdStock.java

@ -0,0 +1,29 @@
package com.yxt.supervise.gf.api.prodstock;
import lombok.Data;
/**
* @author feikefei
* @create 2023-08-04-9:22
*/
@Data
public class ProdStock {
private String proName;
private String proSid;
private String proModel;
private String manufacturer;
private String num;
private String weight;
private String confirmedPrice;
private String calculatedValue;
private String locationNumber;
private String custerName;
private String proUnit;
private String custerSid;
private String storeHouseSid;
private String storeHouseName;
private String brandInfoName;
private String brandInfoKey;
private String productTypeName;
private String productTypeKey;
}

9
yxt-supervise-gf-biz/pom.xml

@ -111,6 +111,15 @@
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
</dependencies>
<build>

2
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/YxtSuperviseGfApplication.java

@ -3,6 +3,7 @@ package com.yxt.supervise.gf;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
@ -15,6 +16,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
})
// 启用自带定时任务
@EnableScheduling
@EnableFeignClients(basePackages = {})
public class YxtSuperviseGfApplication {
public static void main(String[] args) {
SpringApplication.run(YxtSuperviseGfApplication.class, args);

72
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/inventory/InventoryService.java

@ -1,6 +1,10 @@
package com.yxt.supervise.gf.biz.inventory;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -11,8 +15,15 @@ import com.yxt.common.core.vo.PagerVo;
import com.yxt.supervise.gf.api.inventory.Inventory;
import com.yxt.supervise.gf.api.inventory.InventoryQuery;
import com.yxt.supervise.gf.api.inventory.InventoryVo;
import com.yxt.supervise.gf.api.prodstock.ProdStock;
import com.yxt.supervise.gf.api.pushinventorydata.PushInventoryData;
import com.yxt.supervise.gf.biz.pushinventorydata.PushInventoryDataService;
import com.yxt.supervise.gf.feign.enterpriseinformation.EnterpriseInformationFeign;
import com.yxt.supervise.gf.feign.enterpriseinformation.EnterpriseInformationQuery;
import com.yxt.supervise.gf.feign.enterpriseinformation.EnterpriseInformationVo;
import com.yxt.supervise.gf.feign.wh.ShStorehouseFeign;
import com.yxt.supervise.gf.feign.wh.ShStorehouseQuery;
import com.yxt.supervise.gf.feign.wh.ShStorehouseVo;
import com.yxt.supervise.gf.shanhai.ShRequester;
import com.yxt.supervise.gf.shanhai.req.InventoryIndex;
import com.yxt.supervise.gf.shanhai.resp.BaseResponse;
@ -24,6 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileOutputStream;
@ -45,13 +57,20 @@ public class InventoryService extends ServiceImpl<InventoryMapper, Inventory> {
private String filePath;
@Autowired
private PushInventoryDataService pushInventoryDataService;
@Resource
private ShStorehouseFeign shStorehouseFeign;
@Resource
private EnterpriseInformationFeign enterpriseInformationFeign;
public ResultBean save(InventoryIndex inventoryIndex){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
DecimalFormat df = new DecimalFormat("#0.0000");
Date date = new Date();
ResultBean rb = ResultBean.fireFail();
BaseResponse<BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.Inventory>> api$system$inventory$index = ShRequester.getApi$system$inventory$index(inventoryIndex);
List<com.yxt.supervise.gf.shanhai.resp.Inventory> list = api$system$inventory$index.getData().getList();
baseMapper.delete(new QueryWrapper<Inventory>().eq("time",sdf.format(date)));
pushInventoryDataService.remove(new QueryWrapper<PushInventoryData>().eq("time",sdf.format(date)));
for (com.yxt.supervise.gf.shanhai.resp.Inventory inventory : list) {
Inventory inventory1 = new Inventory();
BeanUtil.copyProperties(inventory,inventory1);
@ -61,11 +80,13 @@ public class InventoryService extends ServiceImpl<InventoryMapper, Inventory> {
//进行过滤并保存到本地推送库(监管数据)中
Map<String, List<com.yxt.supervise.gf.shanhai.resp.Inventory>> listMap = list.stream().collect(Collectors.groupingBy(it -> it.getStorehouse_name()));
Map<String, List<com.yxt.supervise.gf.shanhai.resp.Inventory>> map = new HashMap<>();
List<ProdStock> prodStockList = new ArrayList<>();
Map<String, List<ProdStock>> prodStockMap = new HashMap<>();
for (Map.Entry<String, List<com.yxt.supervise.gf.shanhai.resp.Inventory>> stringListEntry : listMap.entrySet()) {
String key = stringListEntry.getKey();
List<com.yxt.supervise.gf.shanhai.resp.Inventory> filterValue = null;
if (key.equals("江西余干库") || key.equals("庄河荣名库") || key.equals("安阳荣名库") || key.equals("藁城荣名库") || key.equals("曲阜荣名库")) {
List<com.yxt.supervise.gf.shanhai.resp.Inventory> value = stringListEntry.getValue();
List<com.yxt.supervise.gf.shanhai.resp.Inventory> filterValue = null;
filterValue = value.stream().filter(t -> t.getMateriel_group_text().equals("组件") || t.getMateriel_group_text().equals("逆变器")).collect(Collectors.toList());
if (filterValue.size() != 0){
map.put(stringListEntry.getKey(),filterValue);
@ -77,12 +98,51 @@ public class InventoryService extends ServiceImpl<InventoryMapper, Inventory> {
}
}
}
//汇总数据添加仓库sid 用作传输数据到仓库中
if (filterValue != null){
PagerQuery<ShStorehouseQuery> sq = new PagerQuery<>();
ShStorehouseQuery shStorehouseQuery = new ShStorehouseQuery();
shStorehouseQuery.setName(key);
sq.setParams(shStorehouseQuery);
ResultBean resultBean = shStorehouseFeign.listPage(sq);
LinkedHashMap<String, Object> records = (LinkedHashMap<String, Object>)resultBean.getData();
List<LinkedHashMap<String, Object>> data = (ArrayList<LinkedHashMap<String, Object>>)records.get("records");
//查询该企业信息
PagerQuery<EnterpriseInformationQuery> sw = new PagerQuery<>();
EnterpriseInformationQuery enterpriseInformationQuery = new EnterpriseInformationQuery();
enterpriseInformationQuery.setEnterpriseName(data.get(0).get("custerName").toString());
sw.setParams(enterpriseInformationQuery);
ResultBean<PagerVo<EnterpriseInformationVo>> pagerVoResultBean = enterpriseInformationFeign.listPage(sw);
List<EnterpriseInformationVo> records1 = pagerVoResultBean.getData().getRecords();
for (com.yxt.supervise.gf.shanhai.resp.Inventory inventory : filterValue) {
ProdStock prodStock = new ProdStock();
prodStock.setProName(inventory.getMateriel_name());
prodStock.setNum(inventory.getNum());
prodStock.setConfirmedPrice(inventory.getPrice().toString());
Double v = Double.parseDouble(inventory.getNum()) * inventory.getPrice();
prodStock.setCalculatedValue(df.format(v));
prodStock.setStoreHouseSid(data.get(0).get("sid").toString());
prodStock.setStoreHouseName(key);
prodStock.setBrandInfoName(inventory.getBrand_name());
prodStock.setProductTypeName(inventory.getMateriel_group_text());
prodStock.setProSid(inventory.getMateriel_id());
prodStock.setCusterName(data.get(0).get("custerName").toString());
prodStock.setCusterSid(records1.get(0).getSid());
prodStockList.add(prodStock);
}
}
}
try {
exportExcel(map);
}catch (Exception e){
e.printStackTrace();
}
prodStockMap.put("list", prodStockList);
String s = JSON.toJSONString(prodStockMap);
HttpRequest.post("http://jianguan.yyundong.com/warehouseapi/stock/importStock").body(s).execute();
//导出报表
ThreadUtil.execute(() -> {
try {
exportExcel(map);
}catch (Exception e){
e.printStackTrace();
}
});
return rb.success().setMsg("添加成功");
}

25
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/enterpriseinformation/EnterpriseInformationFeign.java

@ -0,0 +1,25 @@
package com.yxt.supervise.gf.feign.enterpriseinformation;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* @author wangpengfei
* @date 2023/4/12 11:44
*/
@Api(tags = "企业信息")
@FeignClient(
contextId = "supervise-crm-enterpriseInformation",
name = "supervise-crm",
path = "v1/enterpriseinformation")
public interface EnterpriseInformationFeign {
@PostMapping("/listPage")
ResultBean<PagerVo<EnterpriseInformationVo>> listPage(@RequestBody PagerQuery<EnterpriseInformationQuery> pq);
}

43
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/enterpriseinformation/EnterpriseInformationQuery.java

@ -0,0 +1,43 @@
package com.yxt.supervise.gf.feign.enterpriseinformation;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author wangpengfei
* @date 2023/4/12 11:44
*/
@ApiModel(value = "企业信息 查询条件", description = "企业信息 查询条件")
@Data
public class EnterpriseInformationQuery implements Query {
private String id;
private String sid;
@ApiModelProperty("企业名称")
private String enterpriseName;
@ApiModelProperty("企业简称")
private String enterpriseAbbreviation;
@ApiModelProperty("银行账户")
private String bankAccount;
@ApiModelProperty("账号")
private String accountNumber;
@ApiModelProperty("开户行")
private String openingBankName;
@ApiModelProperty("法人")
private String juridicalPerson;
@ApiModelProperty("营业执照号")
private String businessLicenseNumber;
@ApiModelProperty("地址")
private String address;
@ApiModelProperty("省")
private String province;
@ApiModelProperty("市")
private String city;
@ApiModelProperty("区")
private String county;
@ApiModelProperty("联系人")
private String contacts;
@ApiModelProperty("电话")
private String telephone;
}

43
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/enterpriseinformation/EnterpriseInformationVo.java

@ -0,0 +1,43 @@
package com.yxt.supervise.gf.feign.enterpriseinformation;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author wangpengfei
* @date 2023/4/12 11:44
*/
@ApiModel(value = "企业信息 视图数据对象", description = "企业信息 视图数据对象")
@Data
public class EnterpriseInformationVo implements Vo {
private String id;
private String sid;
@ApiModelProperty("企业名称")
private String enterpriseName;
@ApiModelProperty("企业简称")
private String enterpriseAbbreviation;
@ApiModelProperty("银行账户")
private String bankAccount;
@ApiModelProperty("账号")
private String accountNumber;
@ApiModelProperty("开户行")
private String openingBankName;
@ApiModelProperty("法人")
private String juridicalPerson;
@ApiModelProperty("营业执照号")
private String businessLicenseNumber;
@ApiModelProperty("地址")
private String address;
@ApiModelProperty("省")
private String province;
@ApiModelProperty("市")
private String city;
@ApiModelProperty("区")
private String county;
@ApiModelProperty("联系人")
private String contacts;
@ApiModelProperty("电话")
private String telephone;
}

19
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/wh/ShStorehouseFeign.java

@ -0,0 +1,19 @@
package com.yxt.supervise.gf.feign.wh;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
/**
* @author wangpengfei
* @date 2023/7/19 13:55
*/
@FeignClient(
contextId = "supervise-wm-shstorehouse",
name = "supervise-wm",
path = "v1/shstorehouse")
public interface ShStorehouseFeign {
@PostMapping("/listPage")
ResultBean listPage(@RequestBody PagerQuery<ShStorehouseQuery> pq);
}

99
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/wh/ShStorehouseQuery.java

@ -0,0 +1,99 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.gf.feign.wh;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: yxt_supervise(宇信通监管) <br/>
* File: ShStorehouseQuery.java <br/>
* Class: com.wh.api.shstorehouse.ShStorehouseQuery <br/>
* Description: 库房信息表 查询条件. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023-06-14 23:18:54 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "库房信息表 查询条件", description = "库房信息表 查询条件")
public class ShStorehouseQuery implements Query {
@ApiModelProperty("客户Sid(企业)")
private String custerSid; // 客户Sid(企业)
@ApiModelProperty("客户名称(企业)")
private String custerName; // 客户名称(企业)
@ApiModelProperty("仓库名称")
private String name; // 仓库名称
@ApiModelProperty("仓库简称")
private String simpleName; // 仓库简称
@ApiModelProperty("仓库编码")
private String code; // 仓库编码
@ApiModelProperty("所属省份编码")
private String provinceCode; // 所属省份编码
@ApiModelProperty("所属省份名称")
private String provinceName; // 所属省份名称
@ApiModelProperty("所属城市编码")
private String cityCode; // 所属城市编码
@ApiModelProperty("所属城市名称")
private String cityName; // 所属城市名称
@ApiModelProperty("所属区县编码")
private String countyCode; // 所属区县编码
@ApiModelProperty("所属区县名称")
private String countyName; // 所属区县名称
@ApiModelProperty("区域名称,不同级用逗号(,)分隔,如河北省,石家庄市,长安区")
private String regionName; // 区域名称,不同级用逗号(,)分隔,如河北省,石家庄市,长安区
@ApiModelProperty("详细地址")
private String address; // 详细地址
@ApiModelProperty("库房面积")
private String acreage; // 库房面积
@ApiModelProperty("库房面积")
private String storeyHeight; // 库房面积
@ApiModelProperty("月租金")
private String monthlyPrice; // 月租金
@ApiModelProperty("库房性质编码组,多个性质以逗号(,)分隔")
private String attributeCodes; // 库房性质编码组,多个性质以逗号(,)分隔
@ApiModelProperty("库房性质名称组,多个性质以逗号(,)分隔,如:电商仓库,物流仓储,厂房")
private String attributeNames; // 库房性质名称组,多个性质以逗号(,)分隔,如:电商仓库,物流仓储,厂房
@ApiModelProperty("房源")
private String housingResource; // 房源
@ApiModelProperty("联系人姓名")
private String linkerName; // 联系人姓名
@ApiModelProperty("联系人电话")
private String linkerPhone; // 联系人电话
@ApiModelProperty("图片访问url")
private String picUrl; // 图片访问url
@ApiModelProperty("精度")
private String lon;
@ApiModelProperty("维度")
private String lat;
}

103
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/wh/ShStorehouseVo.java

@ -0,0 +1,103 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.gf.feign.wh;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: yxt_supervise(宇信通监管) <br/>
* File: ShStorehouseVo.java <br/>
* Class: com.wh.api.shstorehouse.ShStorehouseVo <br/>
* Description: 库房信息表 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023-06-14 23:18:54 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "库房信息表 视图数据对象", description = "库房信息表 视图数据对象")
public class ShStorehouseVo implements Vo {
private String sid; // sid
@ApiModelProperty("客户Sid(企业)")
private String custerSid; // 客户Sid(企业)
@ApiModelProperty("客户名称(企业)")
private String custerName; // 客户名称(企业)
@ApiModelProperty("仓库名称")
private String name; // 仓库名称
@ApiModelProperty("仓库简称")
private String simpleName; // 仓库简称
@ApiModelProperty("仓库编码")
private String code; // 仓库编码
@ApiModelProperty("所属省份编码")
private String provinceCode; // 所属省份编码
@ApiModelProperty("所属省份名称")
private String provinceName; // 所属省份名称
@ApiModelProperty("所属城市编码")
private String cityCode; // 所属城市编码
@ApiModelProperty("所属城市名称")
private String cityName; // 所属城市名称
@ApiModelProperty("所属区县编码")
private String countyCode; // 所属区县编码
@ApiModelProperty("所属区县名称")
private String countyName; // 所属区县名称
@ApiModelProperty("区域名称,不同级用逗号(,)分隔,如河北省,石家庄市,长安区")
private String regionName; // 区域名称,不同级用逗号(,)分隔,如河北省,石家庄市,长安区
@ApiModelProperty("详细地址")
private String address; // 详细地址
@ApiModelProperty("库房面积")
private String acreage; // 库房面积
@ApiModelProperty("库房面积")
private String storeyHeight; // 库房面积
@ApiModelProperty("月租金")
private String monthlyPrice; // 月租金
@ApiModelProperty("库房性质编码组,多个性质以逗号(,)分隔")
private String attributeCodes; // 库房性质编码组,多个性质以逗号(,)分隔
@ApiModelProperty("库房性质名称组,多个性质以逗号(,)分隔,如:电商仓库,物流仓储,厂房")
private String attributeNames; // 库房性质名称组,多个性质以逗号(,)分隔,如:电商仓库,物流仓储,厂房
@ApiModelProperty("房源")
private String housingResource; // 房源
@ApiModelProperty("联系人姓名")
private String linkerName; // 联系人姓名
@ApiModelProperty("联系人电话")
private String linkerPhone; // 联系人电话
@ApiModelProperty("图片访问url")
private String picUrl; // 图片访问url
@ApiModelProperty("精度")
private String lon;
@ApiModelProperty("维度")
private String lat;
private String shSid;//仓库sid
private String projectSid;//项目sid
}

4
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/timedtask/ShanHaiTimedTask.java

@ -1,5 +1,6 @@
package com.yxt.supervise.gf.shanhai.timedtask;
import cn.hutool.core.thread.ThreadUtil;
import com.yxt.common.core.result.ResultBean;
import com.yxt.supervise.gf.biz.instock.InStockService;
import com.yxt.supervise.gf.biz.inventory.InventoryService;
@ -34,8 +35,7 @@ public class ShanHaiTimedTask {
**/
// @Scheduled(cron = "0 0 3 * * ?")
public void inventoryTimedTask(){
InventoryIndex inventoryIndex = new InventoryIndex();
inventoryService.save(inventoryIndex);
ThreadUtil.execute(() -> inventoryService.save(new InventoryIndex()));
}
/**

Loading…
Cancel
Save