diff --git a/yxt-supervise-gf-api/src/main/java/com/yxt/supervise/gf/api/prodstock/ProdStock.java b/yxt-supervise-gf-api/src/main/java/com/yxt/supervise/gf/api/prodstock/ProdStock.java new file mode 100644 index 0000000..04c33a9 --- /dev/null +++ b/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; +} diff --git a/yxt-supervise-gf-biz/pom.xml b/yxt-supervise-gf-biz/pom.xml index 38a66c1..504c22b 100644 --- a/yxt-supervise-gf-biz/pom.xml +++ b/yxt-supervise-gf-biz/pom.xml @@ -111,6 +111,15 @@ spring-boot-starter-websocket + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + org.springframework.cloud + spring-cloud-starter-openfeign + diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/YxtSuperviseGfApplication.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/YxtSuperviseGfApplication.java index b0cf5e5..dc5445a 100644 --- a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/YxtSuperviseGfApplication.java +++ b/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); diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/inventory/InventoryService.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/inventory/InventoryService.java index 4ed2fe6..b3c8b31 100644 --- a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/inventory/InventoryService.java +++ b/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 { 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> api$system$inventory$index = ShRequester.getApi$system$inventory$index(inventoryIndex); List list = api$system$inventory$index.getData().getList(); + baseMapper.delete(new QueryWrapper().eq("time",sdf.format(date))); + pushInventoryDataService.remove(new QueryWrapper().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 { //进行过滤并保存到本地推送库(监管数据)中 Map> listMap = list.stream().collect(Collectors.groupingBy(it -> it.getStorehouse_name())); Map> map = new HashMap<>(); + List prodStockList = new ArrayList<>(); + Map> prodStockMap = new HashMap<>(); for (Map.Entry> stringListEntry : listMap.entrySet()) { String key = stringListEntry.getKey(); + List filterValue = null; if (key.equals("江西余干库") || key.equals("庄河荣名库") || key.equals("安阳荣名库") || key.equals("藁城荣名库") || key.equals("曲阜荣名库")) { List value = stringListEntry.getValue(); - List 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 { } } } + //汇总数据添加仓库sid 用作传输数据到仓库中 + if (filterValue != null){ + PagerQuery sq = new PagerQuery<>(); + ShStorehouseQuery shStorehouseQuery = new ShStorehouseQuery(); + shStorehouseQuery.setName(key); + sq.setParams(shStorehouseQuery); + ResultBean resultBean = shStorehouseFeign.listPage(sq); + LinkedHashMap records = (LinkedHashMap)resultBean.getData(); + List> data = (ArrayList>)records.get("records"); + //查询该企业信息 + PagerQuery sw = new PagerQuery<>(); + EnterpriseInformationQuery enterpriseInformationQuery = new EnterpriseInformationQuery(); + enterpriseInformationQuery.setEnterpriseName(data.get(0).get("custerName").toString()); + sw.setParams(enterpriseInformationQuery); + ResultBean> pagerVoResultBean = enterpriseInformationFeign.listPage(sw); + List 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("添加成功"); } diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/enterpriseinformation/EnterpriseInformationFeign.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/enterpriseinformation/EnterpriseInformationFeign.java new file mode 100644 index 0000000..79e3aa0 --- /dev/null +++ b/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> listPage(@RequestBody PagerQuery pq); + +} diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/enterpriseinformation/EnterpriseInformationQuery.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/enterpriseinformation/EnterpriseInformationQuery.java new file mode 100644 index 0000000..adf0f2c --- /dev/null +++ b/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; +} diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/enterpriseinformation/EnterpriseInformationVo.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/enterpriseinformation/EnterpriseInformationVo.java new file mode 100644 index 0000000..4146c6e --- /dev/null +++ b/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; +} diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/wh/ShStorehouseFeign.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/wh/ShStorehouseFeign.java new file mode 100644 index 0000000..c66513f --- /dev/null +++ b/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 pq); +} diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/wh/ShStorehouseQuery.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/wh/ShStorehouseQuery.java new file mode 100644 index 0000000..f319122 --- /dev/null +++ b/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(宇信通监管)
+ * File: ShStorehouseQuery.java
+ * Class: com.wh.api.shstorehouse.ShStorehouseQuery
+ * Description: 库房信息表 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2023-06-14 23:18:54
+ * + * @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; +} diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/wh/ShStorehouseVo.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/feign/wh/ShStorehouseVo.java new file mode 100644 index 0000000..9a7b0e2 --- /dev/null +++ b/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(宇信通监管)
+ * File: ShStorehouseVo.java
+ * Class: com.wh.api.shstorehouse.ShStorehouseVo
+ * Description: 库房信息表 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2023-06-14 23:18:54
+ * + * @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 +} diff --git a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/timedtask/ShanHaiTimedTask.java b/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/timedtask/ShanHaiTimedTask.java index edac1bf..f98e347 100644 --- a/yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/timedtask/ShanHaiTimedTask.java +++ b/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())); } /**