
17 changed files with 668 additions and 21 deletions
Binary file not shown.
Binary file not shown.
@ -0,0 +1,59 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.supervise.portal.api.storeout; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* Project: yxt_supervise <br/> |
|||
* File: StoreOut.java <br/> |
|||
* Class: com.yxt.supervise.portal.api.StoreOut <br/> |
|||
* Description: <描述类的功能>. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022/11/24 0:40 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "出库单", description = "出库单") |
|||
@TableName("storeout") |
|||
public class StoreOut extends BaseEntity { |
|||
|
|||
private String orgCode; // 企业组织机构代码证
|
|||
private String storeCode; // 仓库/门店编号
|
|||
private String storeName; // 仓库/门店名称
|
|||
private Date outTime; //出库时间
|
|||
private String billNo; // 单据号
|
|||
private String billType; // 单据类型
|
|||
} |
@ -0,0 +1,50 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.supervise.portal.api.storeout; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: yxt_supervise <br/> |
|||
* File: StoreOutAndItemDto.java <br/> |
|||
* Class: com.yxt.supervise.portal.api.storeout.StoreOutAndItemDto <br/> |
|||
* Description: <描述类的功能>. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022/11/24 1:01 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
public class StoreOutAndItemDto { |
|||
private StoreOut storeOut; |
|||
private List<StoreOutItem> itemList = new ArrayList<>(); |
|||
} |
@ -0,0 +1,73 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.supervise.portal.api.storeout; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* Project: yxt_supervise <br/> |
|||
* File: StoreOutItem.java <br/> |
|||
* Class: com.yxt.supervise.portal.api.storeout.StoreOutItem <br/> |
|||
* Description: <描述类的功能>. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022/11/24 0:52 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "出库明细", description = "出库明细") |
|||
@TableName("storeout_item") |
|||
public class StoreOutItem extends BaseEntity { |
|||
|
|||
private String storeoutSid; // '出库单SID'
|
|||
private String billNo; // 单据号
|
|||
private String supplierSid; // 供应商SID
|
|||
private String supplierCode; // 供应商代码
|
|||
private String supplierName; // 供应商名称
|
|||
private String productCode; // 货号
|
|||
private String productName; // 商品名称
|
|||
private Date productDate; // 商品生产日期
|
|||
private Integer productQualityGuaranteePeriod; //商品保质期(天)
|
|||
private String productSpecifications; // 商品规格
|
|||
private String categoryKey; // 类别编号
|
|||
private String category; // 类别名称
|
|||
private String categoryOne; // 一级类别名称
|
|||
private String categoryTwo; // 二级类别名称
|
|||
private Double outPrice; // '出库金额'
|
|||
private Integer outNumber; // '出库数量'
|
|||
private Double costPrice; // 成本金额
|
|||
private Double costTaxPrice; // 成本税额
|
|||
private Double notTaxPrice; // 不含税成本
|
|||
private Integer inputTaxRate; // 进项税率
|
|||
} |
@ -0,0 +1,48 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.supervise.portal.biz.storeout; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.supervise.portal.api.storein.StoreInItem; |
|||
import com.yxt.supervise.portal.api.storeout.StoreOutItem; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* Project: yxt_supervise <br/> |
|||
* File: StoreOutItemMapper.java <br/> |
|||
* Class: com.yxt.supervise.portal.biz.storeout.StoreOutItemMapper <br/> |
|||
* Description: <描述类的功能>. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022/11/24 1:05 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface StoreOutItemMapper extends BaseMapper<StoreOutItem> { |
|||
} |
@ -0,0 +1,47 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.supervise.portal.biz.storeout; |
|||
|
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.supervise.portal.api.storeout.StoreOutItem; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* Project: yxt_supervise <br/> |
|||
* File: StoreOutItemService.java <br/> |
|||
* Class: com.yxt.supervise.portal.biz.storeout.StoreOutItemService <br/> |
|||
* Description: <描述类的功能>. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022/11/24 1:06 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class StoreOutItemService extends MybatisBaseService<StoreOutItemMapper, StoreOutItem> { |
|||
} |
@ -0,0 +1,47 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.supervise.portal.biz.storeout; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.supervise.portal.api.storeout.StoreOut; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* Project: yxt_supervise <br/> |
|||
* File: StoreOutMapper.java <br/> |
|||
* Class: com.yxt.supervise.portal.biz.storeout.StoreOutMapper <br/> |
|||
* Description: <描述类的功能>. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022/11/24 1:09 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface StoreOutMapper extends BaseMapper<StoreOut> { |
|||
} |
@ -0,0 +1,63 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.supervise.portal.biz.storeout; |
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.supervise.portal.api.storeout.StoreOut; |
|||
import com.yxt.supervise.portal.biz.storein.StoreInService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* Project: yxt_supervise <br/> |
|||
* File: StoreOutRest.java <br/> |
|||
* Class: com.yxt.supervise.portal.biz.storeout.StoreOutRest <br/> |
|||
* Description: <描述类的功能>. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022/11/24 1:03 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@RestController("com.yxt.supervise.portal.biz.storeout.StoreOutRest") |
|||
@RequestMapping("/storeout") |
|||
public class StoreOutRest { |
|||
|
|||
@Autowired |
|||
private StoreOutService storeOutService; |
|||
|
|||
@GetMapping("/testimport") |
|||
public ResultBean testimport(){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
|
|||
storeOutService.importXlsFromFilePath("D:/works/projects/javaee/yxtgit/supervise/docs/demofiles/汇融银行_出库明细表.xls"); |
|||
return rb.success(); |
|||
} |
|||
} |
@ -0,0 +1,163 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.supervise.portal.biz.storeout; |
|||
|
|||
import cn.hutool.core.io.FileUtil; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.supervise.portal.api.storein.StoreInItem; |
|||
import com.yxt.supervise.portal.api.storein.StoreInWithItemDto; |
|||
import com.yxt.supervise.portal.api.storeout.StoreOut; |
|||
import com.yxt.supervise.portal.api.storeout.StoreOutAndItemDto; |
|||
import com.yxt.supervise.portal.api.storeout.StoreOutItem; |
|||
import com.yxt.supervise.portal.utils.ExcelUtil; |
|||
import org.apache.poi.hssf.usermodel.HSSFRow; |
|||
import org.apache.poi.hssf.usermodel.HSSFSheet; |
|||
import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.io.BufferedInputStream; |
|||
import java.io.IOException; |
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* Project: yxt_supervise <br/> |
|||
* File: StoreOutService.java <br/> |
|||
* Class: com.yxt.supervise.portal.biz.storeout.StoreOutService <br/> |
|||
* Description: <描述类的功能>. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022/11/24 1:10 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class StoreOutService extends MybatisBaseService<StoreOutMapper, StoreOut> { |
|||
|
|||
@Autowired |
|||
private StoreOutItemService storeOutItemService; |
|||
|
|||
public ResultBean importXlsFromFilePath(String xlsFilePath) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
|
|||
HSSFWorkbook hssfWorkbook = null; |
|||
try { |
|||
BufferedInputStream is = FileUtil.getInputStream(xlsFilePath); |
|||
hssfWorkbook = new HSSFWorkbook(is); |
|||
} catch (IOException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
|
|||
HSSFSheet sheet = hssfWorkbook.getSheetAt(0); |
|||
|
|||
Map<String, StoreOutAndItemDto> map = new HashMap<>(); |
|||
|
|||
for (int rowNum = 1; rowNum <= sheet.getLastRowNum(); rowNum++) { |
|||
HSSFRow row = sheet.getRow(rowNum); |
|||
String c_f = ExcelUtil.readStringFromHSSFRow(row, 5); // 单据号
|
|||
StoreOutAndItemDto dto = map.get(c_f); |
|||
if (dto == null) { |
|||
dto = new StoreOutAndItemDto(); |
|||
StoreOut si = createStoreOutFromRow(row); |
|||
dto.setStoreOut(si); |
|||
map.put(c_f, dto); |
|||
} |
|||
StoreOutItem item = createStoreOutItemFromRow(row); |
|||
dto.getItemList().add(item); |
|||
} |
|||
|
|||
for (String key : map.keySet()) { |
|||
StoreOutAndItemDto dto = map.get(key); |
|||
baseMapper.insert(dto.getStoreOut()); |
|||
storeOutItemService.saveBatch(dto.getItemList()); |
|||
} |
|||
return rb.success(); |
|||
} |
|||
|
|||
private StoreOut createStoreOutFromRow(HSSFRow row) { |
|||
// `orgCode` VARCHAR(100) NULL DEFAULT NULL COMMENT '企业组织机构代码证',
|
|||
// `storeCode` VARCHAR(100) NULL DEFAULT NULL COMMENT '仓库/门店编号',
|
|||
// `storeName` VARCHAR(100) NULL DEFAULT NULL COMMENT '仓库/门店名称',
|
|||
// `receiptTime` DATETIME NULL DEFAULT NULL COMMENT '收货时间',
|
|||
// `billNo` VARCHAR(100) NULL DEFAULT NULL COMMENT '单据号',
|
|||
// `billType` VARCHAR(100) NULL DEFAULT NULL COMMENT '单据类型',
|
|||
StoreOut si = new StoreOut(); |
|||
si.setOrgCode(ExcelUtil.readStringFromHSSFRow(row, 0)); |
|||
si.setStoreCode(ExcelUtil.readStringFromHSSFRow(row, 1)); |
|||
si.setStoreName(ExcelUtil.readStringFromHSSFRow(row, 2)); |
|||
si.setOutTime(ExcelUtil.readDateTimeFromHSSFRow(row, 3)); |
|||
si.setBillNo(ExcelUtil.readStringFromHSSFRow(row, 5)); |
|||
si.setBillType(ExcelUtil.readStringFromHSSFRow(row, 6)); |
|||
|
|||
return si; |
|||
} |
|||
|
|||
private StoreOutItem createStoreOutItemFromRow(HSSFRow row) { |
|||
// `storeinSid` VARCHAR(64) NULL DEFAULT NULL COMMENT '入库单SID',
|
|||
// `billNo` VARCHAR(100) NULL DEFAULT NULL COMMENT '单据号',
|
|||
// `supplierSid` VARCHAR(64) NULL DEFAULT NULL COMMENT '供应商SID',
|
|||
// `storeinCode` VARCHAR(64) NULL DEFAULT NULL COMMENT '供应商代码',
|
|||
// `supplierName` VARCHAR(100) NULL DEFAULT NULL COMMENT '供应商名称',
|
|||
// `productCode` VARCHAR(100) NULL DEFAULT NULL COMMENT '货号',
|
|||
// `productName` VARCHAR(100) NULL DEFAULT NULL COMMENT '商品名称',
|
|||
// `productDate` DATE NULL DEFAULT NULL COMMENT '商品生产日期',
|
|||
// `productQualityGuaranteePeriod` int(11) NULL DEFAULT NULL COMMENT '商品保质期(天)',
|
|||
// `productSpecifications` VARCHAR(100) NULL DEFAULT NULL COMMENT '商品规格',
|
|||
// `categoryKey` VARCHAR(100) NULL DEFAULT NULL COMMENT '类别编号',
|
|||
// `category` VARCHAR(100) NULL DEFAULT NULL COMMENT '类别名称',
|
|||
// `categoryOne` VARCHAR(100) NULL DEFAULT NULL COMMENT '一级类别名称',
|
|||
// `categoryTwo` VARCHAR(100) NULL DEFAULT NULL COMMENT '二级类别名称',
|
|||
// `inPrice` double(10,2) NULL DEFAULT NULL COMMENT '入库金额',
|
|||
// `inNumber` int(11) NULL DEFAULT NULL COMMENT '入库数量',
|
|||
// `costPrice` double(10,2) NULL DEFAULT NULL COMMENT '成本金额',
|
|||
// `costTaxPrice` double(10,2) NULL DEFAULT NULL COMMENT '成本税额',
|
|||
// `notTaxPrice` double(10,2) NULL DEFAULT NULL COMMENT '不含税成本',
|
|||
// `inputTaxRate` int(11) NULL DEFAULT NULL COMMENT '进项税率',
|
|||
StoreOutItem item = new StoreOutItem(); |
|||
item.setBillNo(ExcelUtil.readStringFromHSSFRow(row, 5)); |
|||
item.setSupplierName(ExcelUtil.readStringFromHSSFRow(row, 4)); |
|||
item.setProductCode(ExcelUtil.readStringFromHSSFRow(row, 7)); |
|||
item.setProductName(ExcelUtil.readStringFromHSSFRow(row, 8)); |
|||
item.setProductDate(ExcelUtil.readDateFromHSSFRow(row, 9)); |
|||
item.setProductQualityGuaranteePeriod(ExcelUtil.readIntFromHSSFRow(row, 10)); |
|||
item.setProductSpecifications(ExcelUtil.readStringFromHSSFRow(row, 11)); |
|||
item.setCategoryKey(ExcelUtil.readStringFromHSSFRow(row, 12)); |
|||
item.setCategory(ExcelUtil.readStringFromHSSFRow(row, 13)); |
|||
item.setCategoryOne(ExcelUtil.readStringFromHSSFRow(row, 14)); |
|||
item.setCategoryTwo(ExcelUtil.readStringFromHSSFRow(row, 15)); |
|||
item.setOutPrice(ExcelUtil.readDoubleFromHSSFRow(row, 16)); |
|||
item.setOutNumber(ExcelUtil.readIntFromHSSFRow(row, 17)); |
|||
item.setCostPrice(ExcelUtil.readDoubleFromHSSFRow(row, 18)); |
|||
item.setCostTaxPrice(ExcelUtil.readDoubleFromHSSFRow(row, 19)); |
|||
item.setNotTaxPrice(ExcelUtil.readDoubleFromHSSFRow(row, 20)); |
|||
item.setInputTaxRate(ExcelUtil.readIntFromHSSFRow(row, 21)); |
|||
return item; |
|||
} |
|||
} |
Loading…
Reference in new issue