Browse Source

库存数据增加商品类型4个字段,增加烟草入库表、加盟商入库表

master
lzh 2 years ago
parent
commit
f65bd2a691
  1. 0
      base-ui/src/api/kucun/hzsjxz.js
  2. 53
      base-ui/src/views/kucun/hzsjxz/index.vue
  3. 224
      base-ui/src/views/kucun/pfsjgl/index.vue
  4. 53
      base-ui/src/views/kucun/xssjgl/index.vue
  5. 73
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageJmd.java
  6. 50
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageJmdMapper.java
  7. 50
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageJmdService.java
  8. 48
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageService.java
  9. 73
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageYc.java
  10. 50
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageYcMapper.java
  11. 49
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageYcService.java
  12. 7
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventory.java
  13. 4
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryOk.java
  14. 15
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryRest.java
  15. 46
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryService.java
  16. 4
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryYc.java
  17. 26
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/storeindex/StoreIndexService.java
  18. 2
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/storeinfo/StoreInfoService.java
  19. 28
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/supplierindex/SupplierIndexService.java

0
base-ui/src/api/kucun/hzsjxz.js

53
base-ui/src/views/kucun/hzsjxz/index.vue

@ -0,0 +1,53 @@
<template>
<div class="app-container">
<el-card class="box-card">
<div slot="header" class="clearfix"><span>下载汇总数据</span></div>
<div>
<el-button>在途数据下载</el-button>
<el-button>销售数据下载</el-button>
</div>
</el-card>
</div>
</template>
<script>
export default {
name: 'KucunHzsjxzIndex',
// components: { },
data() {
return {
name: '汇总数据下载'
}
},
created() {
//
this.init()
//
// this.getList()
},
methods: {
init() {},
getList() {},
//
handleReturn() {
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.wenjiantit {
font-size: 16px;
font-weight: bold;
margin: 25px 0 10px 0;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
</style>

224
base-ui/src/views/kucun/pfsjgl/index.vue

@ -0,0 +1,224 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="批发数据上传记录" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="queryParams" :inline="true" :model="queryParams" class="tab-header">
<el-form-item label="审核状态"><el-input v-model="queryParams.params.createSid" placeholder="" clearable /></el-form-item>
<el-form-item label="订单编号"><el-input v-model="queryParams.params.modifySid" placeholder="" clearable /></el-form-item>
<el-form-item label="填单人"><el-input v-model="queryParams.params.buyerName" placeholder="" clearable /></el-form-item>
<el-form-item label="填单日期">
<el-date-picker v-model="queryParams.params.applyStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期" />
<span style="padding: 0 8px"></span>
<el-date-picker v-model="queryParams.params.applyStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期" />
</el-form-item>
<el-form-item label="供应商名称"><el-input v-model="queryParams.params.contacts" placeholder="" clearable /></el-form-item>
<el-form-item label="要货单位"><el-input v-model="queryParams.params.telephone" placeholder="" clearable /></el-form-item>
<el-form-item label="到货日期">
<el-date-picker v-model="queryParams.params.applyStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期" />
<span style="padding: 0 8px"></span>
<el-date-picker v-model="queryParams.params.applyStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期" />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</div>
</div>
</div>
<!-- Start 项目列表头部 -->
<div class="listtop">
<div class="tit">采购订单列表</div>
<pageye
v-show="dataList.length > 0"
:total="queryParams.total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
class="pagination"
@pagination="loadList"
/>
</div>
<!-- End 项目列表头部 -->
<!-- Start 项目列表 -->
<div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column fixed width="50" type="selection" align="center" />
<el-table-column fixed width="180" label="操作" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toEdit(scope.row)">办理</el-button>
<el-button type="primary" size="mini">撤回</el-button>
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column prop="createSid" label="状态" align="center" width="120" />
<el-table-column prop="code" label="订单编号" align="center" width="150" />
<el-table-column prop="buyerName" label="填单人" align="center" width="120" />
<el-table-column label="填单日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.purchaseDate.substring(0, scope.row.purchaseDate.length - 9) }}</span>
</template>
</el-table-column>
<el-table-column prop="supplierName" label="供应商单位" header-align="center" align="left" />
<el-table-column prop="packageTotalPrice" label="订单金额(元)" align="center" />
<el-table-column prop="purchasingDeptName" label="要货单位" align="center" />
<el-table-column prop="arrivalDate" label="到货日期" align="center" width="120" />
<el-table-column prop="completionStatus" label="完成状态" align="center" width="120" />
</el-table>
</div>
<!-- End 项目列表 -->
<div class="pages">
<div class="tit" />
<!-- 翻页 -->
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" @pagination="loadList" />
</div>
</div>
</div>
</div>
</template>
<script>
import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
export default {
name: 'KucunPfsjglIndex',
components: {
ButtonBar,
Pagination,
pageye
},
data() {
return {
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: false,
searchxianshitit: '显示查询条件',
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
tableLoading: false,
dataList: [],
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
code: '',
buyerName: '',
purchaseStartDate: '',
purchaseEndDate: '',
supplierName: '',
purchasingDeptName: '',
arrivalStartDate: '',
arrivalEndDate: '',
completionStatusKey: ''
}
},
name: '批发数据管理'
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
// this.loadList()
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doDel':
this.doDel()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
handleSelectionChange(row) {
},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
code: '',
buyerName: '',
purchaseDateStart: '',
purchaseDateEnd: '',
supplierName: '',
purchasingDeptName: '',
arrivalDateStart: '',
arrivalDateEnd: '',
completionStatusKey: ''
}
}
this.loadList()
},
loadList() {},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.wenjiantit {
font-size: 16px;
font-weight: bold;
margin: 25px 0 10px 0;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
</style>

53
base-ui/src/views/kucun/xssjgl/index.vue

@ -0,0 +1,53 @@
<template>
<div class="app-container">
<el-card class="box-card">
<div slot="header" class="clearfix"><span>下载汇总数据</span></div>
<div>
<el-button>在途数据下载</el-button>
<el-button>销售数据下载</el-button>
</div>
</el-card>
</div>
</template>
<script>
export default {
name: 'KucunXssjglIndex',
// components: { },
data() {
return {
name: '销售数据管理'
}
},
created() {
//
this.init()
//
// this.getList()
},
methods: {
init() {},
getList() {},
//
handleReturn() {
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.wenjiantit {
font-size: 16px;
font-weight: bold;
margin: 25px 0 10px 0;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
</style>

73
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageJmd.java

@ -0,0 +1,73 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdinstorage;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.common.core.domain.EntityWithId;
import lombok.Data;
/**
* Project: yxt_supervise <br/>
* File: GdInstorageJmd.java <br/>
* Class: com.yxt.supervise.portal.biz.gdinstorage.GdInstorageJmd <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/5 10:45 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@TableName("gd_instorage_jmd")
public class GdInstorageJmd extends EntityWithId {
private String cola0; // 企业组织机构代码证
private String colb1; // 仓库/门店编号
private String colc2; // 仓库/门店名称
private String cold3; // 入库时间
private String colex; // 供应商编号
private String cole4; // 供应商名称
private String colf5; // 单据号
private String colg6; // 单据类型
private String colh7; // 货号
private String coli8; // 商品名称
private String colj9; // 商品生产日期
private String colk10; // 商品保质期
private String coll11; // 商品规格
private String colm12; // 类别编号
private String coln13; // 类别名称
private String colo14; // 一级类别名称
private String colp15; // 二级类别名称
private String colq16; // 入库金额
private String colr17; // 入库数量
private String cols18; // 成本金额
private String colt19; // 成本税额
private String colu20; // 不含税成本
private String colv21; // 进项税率
private String orderDate; // 单据日期
private String supplierCodeUnified; // 供货商编码统一
}

50
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageJmdMapper.java

@ -0,0 +1,50 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdinstorage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* Project: yxt_supervise <br/>
* File: GdInstorageJmdMapper.java <br/>
* Class: com.yxt.supervise.portal.biz.gdinstorage.GdInstorageJmdMapper <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/5 10:46 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface GdInstorageJmdMapper extends BaseMapper<GdInstorageJmd> {
@Delete("delete from gd_instorage_jmd where orderDate=#{orderDate} ")
void clearByOrderDate(@Param("orderDate") String orderDate);
}

50
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageJmdService.java

@ -0,0 +1,50 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdinstorage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* Project: yxt_supervise <br/>
* File: GdInstorageJmdService.java <br/>
* Class: com.yxt.supervise.portal.biz.gdinstorage.GdInstorageJmdService <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/5 10:46 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class GdInstorageJmdService extends ServiceImpl<GdInstorageJmdMapper, GdInstorageJmd> {
public void clearByOrderDate(String orderDate) {
baseMapper.clearByOrderDate(orderDate);
}
}

48
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageService.java

@ -46,7 +46,10 @@ import com.yxt.supervise.portal.api.kfpurchaserequisition.KfPurchaseRequisitionV
import com.yxt.supervise.portal.biz.gdinventory.GdInventoryLog;
import com.yxt.supervise.portal.biz.gdinventory.GdInventoryLogErr;
import com.yxt.supervise.portal.biz.gdinventory.GdInventoryOk;
import com.yxt.supervise.portal.biz.gdinventory.GdRescategoryProdService;
import com.yxt.supervise.portal.biz.gdoutstorage.GdOutstorageGd;
import com.yxt.supervise.portal.biz.storeindex.StoreIndexService;
import com.yxt.supervise.portal.biz.storeinfo.StoreInfoService;
import com.yxt.supervise.portal.biz.supplierindex.SupplierIndexService;
import org.apache.poi.ss.usermodel.CellStyle;
import org.springframework.beans.factory.annotation.Autowired;
@ -84,6 +87,16 @@ public class GdInstorageService extends ServiceImpl<GdInstorageMapper, GdInstora
private GdInstorageLogErrService gdInstorageLogErrService;
@Autowired
private SupplierIndexService supplierIndexService;
@Autowired
private GdInstorageYcService gdInstorageYcService;
@Autowired
private GdInstorageJmdService gdInstorageJmdService;
@Autowired
private StoreInfoService storeInfoService;
@Autowired
private StoreIndexService storeIndexService;
@Autowired
private GdRescategoryProdService gdRescategoryProdService;
public void doimp(String filePath) {
long millis = System.currentTimeMillis();
@ -159,6 +172,8 @@ public class GdInstorageService extends ServiceImpl<GdInstorageMapper, GdInstora
return new RowHandler() {
private List<GdInstorageGd> toInsertListGd = new ArrayList<>();
private List<GdInstorageYc> toInsertListYc = new ArrayList<>();
private List<GdInstorageJmd> toInsertListJmd = new ArrayList<>();
private List<GdInstorage> toInsertList = new ArrayList<>();
private List<GdInstorageLogErr> errList = new ArrayList<>();
private int x = 0, y = 0, errnum = 0;
@ -171,6 +186,15 @@ public class GdInstorageService extends ServiceImpl<GdInstorageMapper, GdInstora
}
private boolean checkYcProd(String typeCode) {
if (StrUtil.isBlank(typeCode))
return false;
if (typeCode.length() < 4)
return false;
String subCode = typeCode.substring(0, 4);
return "0811".equals(subCode) || "0813".equals(subCode) || "0815".equals(subCode);
}
@Override
public void handle(int sheetIndex, long rowIndex, List<Object> r) {
if (rowIndex > 0) {
@ -214,6 +238,19 @@ public class GdInstorageService extends ServiceImpl<GdInstorageMapper, GdInstora
toInsertList.add(gi);
y++;
}
if (checkYcProd(gd.getColm12()) && storeInfoService.containsCodeOfYc(warehouseCode)) {
GdInstorageYc gyc = new GdInstorageYc();
BeanUtil.copyProperties(gd, gyc);
toInsertListYc.add(gyc);
}
if (gdRescategoryProdService.containsCode(gd.getColh7()) && storeIndexService.containsCodeJmd(warehouseCode)) {
GdInstorageJmd gjmd = new GdInstorageJmd();
BeanUtil.copyProperties(gd, gjmd);
toInsertListJmd.add(gjmd);
}
x++;
}
}
@ -230,6 +267,16 @@ public class GdInstorageService extends ServiceImpl<GdInstorageMapper, GdInstora
GdInstorageService.this.clearByOrderDate(gdInstorage.getOrderDate());
GdInstorageService.this.saveBatch(toInsertList);
}
if (toInsertListYc != null && !toInsertListYc.isEmpty()) {
GdInstorageYc gdInstorage = toInsertListYc.get(0);
gdInstorageYcService.clearByOrderDate(gdInstorage.getOrderDate());
gdInstorageYcService.saveBatch(toInsertListYc);
}
if (toInsertListJmd != null && !toInsertListJmd.isEmpty()) {
GdInstorageJmd gdInstorage = toInsertListJmd.get(0);
gdInstorageJmdService.clearByOrderDate(gdInstorage.getOrderDate());
gdInstorageJmdService.saveBatch(toInsertListJmd);
}
if (errList != null && !errList.isEmpty()) {
gdInstorageLogErrService.saveBatch(errList);
}
@ -252,6 +299,7 @@ public class GdInstorageService extends ServiceImpl<GdInstorageMapper, GdInstora
PagerVo<GdInstorage> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public void clearByOrderDate(String orderDate) {
baseMapper.clearByOrderDate(orderDate);
}

73
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageYc.java

@ -0,0 +1,73 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdinstorage;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.common.core.domain.EntityWithId;
import lombok.Data;
/**
* Project: yxt_supervise <br/>
* File: GdInstorageYc.java <br/>
* Class: com.yxt.supervise.portal.biz.gdinstorage.GdInstorageYc <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/5 10:34 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@TableName("gd_instorage_yc")
public class GdInstorageYc extends EntityWithId {
private String cola0; // 企业组织机构代码证
private String colb1; // 仓库/门店编号
private String colc2; // 仓库/门店名称
private String cold3; // 入库时间
private String colex; // 供应商编号
private String cole4; // 供应商名称
private String colf5; // 单据号
private String colg6; // 单据类型
private String colh7; // 货号
private String coli8; // 商品名称
private String colj9; // 商品生产日期
private String colk10; // 商品保质期
private String coll11; // 商品规格
private String colm12; // 类别编号
private String coln13; // 类别名称
private String colo14; // 一级类别名称
private String colp15; // 二级类别名称
private String colq16; // 入库金额
private String colr17; // 入库数量
private String cols18; // 成本金额
private String colt19; // 成本税额
private String colu20; // 不含税成本
private String colv21; // 进项税率
private String orderDate; // 单据日期
private String supplierCodeUnified; // 供货商编码统一
}

50
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageYcMapper.java

@ -0,0 +1,50 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdinstorage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* Project: yxt_supervise <br/>
* File: GdInstorageYcMapper.java <br/>
* Class: com.yxt.supervise.portal.biz.gdinstorage.GdInstorageYcMapper <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/5 10:36 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface GdInstorageYcMapper extends BaseMapper<GdInstorageYc> {
@Delete("delete from gd_instorage_yc where orderDate=#{orderDate} ")
void clearByOrderDate(@Param("orderDate") String orderDate);
}

49
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageYcService.java

@ -0,0 +1,49 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.gdinstorage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* Project: yxt_supervise <br/>
* File: GdInstorageYcService.java <br/>
* Class: com.yxt.supervise.portal.biz.gdinstorage.GdInstorageYcService <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/5 10:36 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class GdInstorageYcService extends ServiceImpl<GdInstorageYcMapper, GdInstorageYc> {
public void clearByOrderDate(String orderDate) {
baseMapper.clearByOrderDate(orderDate);
}
}

7
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventory.java

@ -45,7 +45,7 @@ import lombok.Data;
@Data
@TableName("gd_inventory")
public class GdInventory extends EntityWithId {
private String orgCode; // 企业组织机构代码证
private String orgCode; // 企业组织机构代码证
private String warehouseCode; // 仓库/门店编号
private String warehouseName; // 仓库/门店名称
private String prodCode; // 商品编码
@ -56,4 +56,9 @@ public class GdInventory extends EntityWithId {
private double prodValue; // 商品货值
private String suppliderName; // 供应商
private String datadate; // 数据日期
private String typeCode; // 类别编号
private String typeName; // 类别名称
private String typeOne; // 一级类别名称
private String typeTwo; // 二级类别名称
}

4
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryOk.java

@ -56,4 +56,8 @@ public class GdInventoryOk extends EntityWithId {
private double prodValue; // 商品货值
private String suppliderName; // 供应商
private String datadate; // 数据日期
private String typeCode; // 类别编号
private String typeName; // 类别名称
private String typeOne; // 一级类别名称
private String typeTwo; // 二级类别名称
}

15
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryRest.java

@ -30,6 +30,9 @@ import cn.hutool.core.io.IoUtil;
import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter;
import com.yxt.common.core.result.ResultBean;
import com.yxt.supervise.portal.biz.storeindex.StoreIndexService;
import com.yxt.supervise.portal.biz.storeinfo.StoreInfoService;
import com.yxt.supervise.portal.biz.supplierindex.SupplierIndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -88,6 +91,18 @@ public class GdInventoryRest {
return gdInventoryYcService.kchzyc();
}
@GetMapping("/resetAllCache")
public ResultBean resetAllCache() {
ResultBean rb = ResultBean.fireFail();
GdRescategoryProdService.resetCache();
StoreInfoService.clearCacheCodeListOfYc();
StoreIndexService.clearCache();
SupplierIndexService.clearCache();
return rb.success();
}
@GetMapping("/downloadhz")
public void downloadhz(HttpServletResponse response, @RequestParam("filepath") String filepath) throws IOException {
System.out.println("XXXX: " + filepath);

46
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryService.java

@ -305,14 +305,21 @@ public class GdInventoryService extends ServiceImpl<GdInventoryMapper, GdInvento
map.put("orgCode", r.get(0));// 企业组织机构代码证
map.put("warehouseCode", "" + r.get(1));// 仓库/门店编号
map.put("warehouseName", r.get(2)); // 仓库/门店名称
map.put("prodCode", "" + r.get(3)); // 商品编码
map.put("prodBarCode", r.get(4));// 商品条码
map.put("prodName", r.get(5)); // 商品名称
map.put("warehouseType", r.get(6)); // 仓库类型
map.put("prodNum", r.get(7)); // 商品数量
map.put("prodValue", r.get(8)); // 商品货值
map.put("suppliderName", r.get(9)); // 供应商
map.put("datadate", r.get(10)); // 数据日期
map.put("prodCode", "" + r.get(7)); // 商品编码
map.put("prodBarCode", r.get(8));// 商品条码
map.put("prodName", r.get(9)); // 商品名称
map.put("warehouseType", r.get(10)); // 仓库类型
map.put("prodNum", r.get(11)); // 商品数量
map.put("prodValue", r.get(12)); // 商品货值
map.put("suppliderName", r.get(13)); // 供应商
map.put("datadate", r.get(14)); // 数据日期
map.put("typeCode", r.get(3)); // 类别编号
map.put("typeName", r.get(4)); // 类别名称
map.put("typeOne", r.get(5)); // 一级类别名称
map.put("typeTwo", r.get(6)); // 二级类别名称
return map;
}
@ -322,33 +329,34 @@ public class GdInventoryService extends ServiceImpl<GdInventoryMapper, GdInvento
gile.setErrInfo(errInfo);
gile.setFileFullPath(gdlog.getFileFullPath());
gile.setRowContent(JSONUtil.toJsonStr(r));
gile.setProdCode("" + r.get(3));
gile.setProdName("" + r.get(5));
gile.setProdNum("" + r.get(7));
gile.setProdValue("" + r.get(8));
gile.setProdCode("" + r.get(7));
gile.setProdName("" + r.get(9));
gile.setProdNum("" + r.get(11));
gile.setProdValue("" + r.get(12));
gile.setSupplierCode("");
gile.setSupplierName("" + r.get(9));
gile.setSupplierName("" + r.get(13));
gile.setOrderDate(odate);
return gile;
}
private boolean checkYcProd(String prodCode) {
if (StrUtil.isBlank(prodCode))
private boolean checkYcProd(String typeCode) {
if (StrUtil.isBlank(typeCode))
return false;
if (prodCode.length() < 4)
if (typeCode.length() < 4)
return false;
String subCode = prodCode.substring(0, 4);
String subCode = typeCode.substring(0, 4);
return "0811".equals(subCode) || "0813".equals(subCode) || "0815".equals(subCode);
}
@Override
public void handle(int sheetIndex, long rowIndex, List<Object> r) {
if (rowIndex > 0) {
String prodCode = "" + r.get(3);
String typeCode = "" + r.get(3);
String prodCode = "" + r.get(7);
String warehouseCode = "" + r.get(1);
if (StrUtil.isBlank(odate)) {
odate = "" + r.get(10);
odate = "" + r.get(14);
gdlog.setOrderDate(odate);
}

4
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryYc.java

@ -56,4 +56,8 @@ public class GdInventoryYc extends EntityWithId {
private double prodValue; // 商品货值
private String suppliderName; // 供应商
private String datadate; // 数据日期
private String typeCode; // 类别编号
private String typeName; // 类别名称
private String typeOne; // 一级类别名称
private String typeTwo; // 二级类别名称
}

26
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/storeindex/StoreIndexService.java

@ -66,6 +66,7 @@ public class StoreIndexService extends ServiceImpl<StoreIndexMapper, StoreIndex>
private static List<String> codeList = null;
private static List<String> codeNoJmdList = null;
private static List<String> codeJmdList = null;
private static Map<String, String> nameMap = null;
private static Map<String, String> typeMap = null;
@ -92,6 +93,15 @@ public class StoreIndexService extends ServiceImpl<StoreIndexMapper, StoreIndex>
return res;
}
public List<String> listCodeJmd() {
List<String> res = new ArrayList<>();
QueryWrapper<StoreIndex> qw = new QueryWrapper<>();
qw.eq("type", "连锁外加盟(销配结算)");
List<StoreIndex> list = super.list(qw);
list.forEach(entity -> res.add(entity.getCode().trim()));
return res;
}
public boolean containsCode(String code) {
if (StringUtils.isBlank(code))
return false;
@ -107,6 +117,14 @@ public class StoreIndexService extends ServiceImpl<StoreIndexMapper, StoreIndex>
return oneCodeList.contains(code.trim());
}
public boolean containsCodeJmd(String code) {
if (StringUtils.isBlank(code))
return false;
if (codeJmdList == null)
codeJmdList = listCodeJmd();
return codeJmdList.contains(code.trim());
}
public boolean containsCodeWithOneNoJmd(String code) {
if (StringUtils.isBlank(code))
return false;
@ -152,4 +170,12 @@ public class StoreIndexService extends ServiceImpl<StoreIndexMapper, StoreIndex>
list.forEach(entity -> res.put(entity.getCode().trim(), entity.getType().trim()));
return res;
}
public static void clearCache() {
codeList = null;
codeNoJmdList = null;
codeJmdList = null;
nameMap = null;
typeMap = null;
}
}

2
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/storeinfo/StoreInfoService.java

@ -276,7 +276,7 @@ public class StoreInfoService extends MybatisBaseService<StoreInfoMapper, StoreI
private static List<String> cacheCodeListOfYc = null; //烟草门店的门店编号列表
public void clearCacheCodeListOfYc() {
public static void clearCacheCodeListOfYc() {
cacheCodeListOfYc = null;
}

28
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/supplierindex/SupplierIndexService.java

@ -19,7 +19,6 @@ import java.util.Map;
@Service
public class SupplierIndexService extends MybatisBaseService<SupplierIndexMapper, SupplierIndex> {
private static List<SupplierIndex> cacheList = null;
private static Map<String, String> cacheCodeMap = null;
public String unifiedCode(String code) {
@ -30,13 +29,12 @@ public class SupplierIndexService extends MybatisBaseService<SupplierIndexMapper
private Map<String, String> initCacheCodeMap() {
Map<String, String> map = new HashMap<>();
if (cacheList == null)
cacheList = this.list();
cacheList.forEach(entity -> map.put(entity.getCode(), entity.getCodeUnified()));
List<SupplierIndex> allList = this.list();
allList.forEach(entity -> map.put(entity.getCode(), entity.getCodeUnified()));
return map;
}
public SupplierIndexDetailsVo fetchDetailsVoBySid(String sid){
public SupplierIndexDetailsVo fetchDetailsVoBySid(String sid) {
SupplierIndex entity = fetchBySid(sid);
SupplierIndexDetailsVo vo = new SupplierIndexDetailsVo();
BeanUtil.copyProperties(entity, vo);
@ -44,14 +42,14 @@ public class SupplierIndexService extends MybatisBaseService<SupplierIndexMapper
}
public List<SupplierIndexDetailsVo> fetchDetailsVosBycodeUnified(String codeUnified) {
return baseMapper.fetchDetailsVosBycodeUnified(codeUnified);
return baseMapper.fetchDetailsVosBycodeUnified(codeUnified);
}
public SupplierIndex selectByCode(String code) {
return baseMapper.selectByCode(code);
}
private QueryWrapper<SupplierIndex> createQueryWrapper(SupplierIndexQuery query) {
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
@ -68,25 +66,25 @@ public class SupplierIndexService extends MybatisBaseService<SupplierIndexMapper
return p;
}
public void saveOrUpdateDto(SupplierIndexDto dto){
public void saveOrUpdateDto(SupplierIndexDto dto) {
String dtoSid = dto.getSid();
List<SupplierIndexDto> supplierIndexDto = dto.getList();
baseMapper.deleteSupplierIndexByCodeUnified(dto.getCodeUnified());
supplierIndexDto.forEach(s->{
supplierIndexDto.forEach(s -> {
s.setPSid(dtoSid);
});
if(supplierIndexDto.size()>0){
if (supplierIndexDto.size() > 0) {
baseMapper.batchSupplierIndexs(supplierIndexDto);
}
}
public void insertByDto(SupplierIndexDto dto){
public void insertByDto(SupplierIndexDto dto) {
SupplierIndex entity = new SupplierIndex();
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity);
}
public void updateByDto(SupplierIndexDto dto){
public void updateByDto(SupplierIndexDto dto) {
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
return;
@ -101,6 +99,10 @@ public class SupplierIndexService extends MybatisBaseService<SupplierIndexMapper
}
public List<SupplierIndex> selectByCodeAndName(String code, String name) {
return baseMapper.selectByCodeAndName(code,name);
return baseMapper.selectByCodeAndName(code, name);
}
public static void clearCache() {
cacheCodeMap = null;
}
}

Loading…
Cancel
Save