|
@@ -26,6 +26,11 @@ import nc.ui.pub.report.ReportBaseClass;
|
|
|
import nc.ui.pubapp.uif2app.actions.BodyAddLineAction;
|
|
|
import nc.vo.arap.payable.PayableBillItemVO;
|
|
|
|
|
|
+/**
|
|
|
+ * 导入
|
|
|
+ * @author YY
|
|
|
+ *
|
|
|
+ */
|
|
|
public class ImportBodyAction extends BodyAddLineAction{
|
|
|
private IUAPQueryBS iuap = (IUAPQueryBS) NCLocator.getInstance().lookup(IUAPQueryBS.class.getName());
|
|
|
private final static long serialVersionUID = 3494691988067685023L;
|
|
@@ -110,9 +115,6 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
String type = sqlexecuteQuery("billtypename", "bd_billtype", "pk_billtypeid", cp.getHeadItem("pk_tradetypeid").getValueObject().toString(),null,0);
|
|
|
//应付单号
|
|
|
String billno = cp.getHeadItem("billno").getValueObject().toString();
|
|
|
-// if(!"应付单(非项目)".equals(type) && !"应付单(项目)".equals(type)) {
|
|
|
-// return;
|
|
|
-// }
|
|
|
if(!"应付单(非项目)".equals(type) && !"应付单(项目)".equals(type) && !"预付核销单(非项目)".equals(type) && !"预付核销单(项目)".equals(type)) {
|
|
|
return;
|
|
|
}
|
|
@@ -154,6 +156,7 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
|
|
|
// 获取行数
|
|
|
int rowNum = sheet.getLastRowNum() + 1;
|
|
|
+
|
|
|
rowCount = cp.getRowCount();
|
|
|
|
|
|
//判断必填项
|
|
@@ -197,12 +200,7 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
cp.setBodyValueAt(price,count, "price");
|
|
|
//本币单价
|
|
|
cp.setBodyValueAt(price,count, "local_price");
|
|
|
- Object taxprice = sheet.getRow(i).getCell(10).getCellType() == 1 ? sheet.getRow(i).getCell(10).getStringCellValue() : sheet.getRow(i).getCell(10).getNumericCellValue();
|
|
|
- //含税单价
|
|
|
- cp.setBodyValueAt(taxprice,count, "taxprice");
|
|
|
- //本币含税单价
|
|
|
- cp.setBodyValueAt(taxprice,count, "local_taxprice");
|
|
|
- Object caltaxmny = sheet.getRow(i).getCell(11).getCellType() == 1 ? sheet.getRow(i).getCell(11).getStringCellValue() : sheet.getRow(i).getCell(11).getNumericCellValue();
|
|
|
+ Object caltaxmny = sheet.getRow(i).getCell(10).getCellType() == 1 ? sheet.getRow(i).getCell(10).getStringCellValue() : sheet.getRow(i).getCell(10).getNumericCellValue();
|
|
|
//计税金额
|
|
|
cp.setBodyValueAt(caltaxmny,count, "caltaxmny");
|
|
|
//贷方原币无税金额
|
|
@@ -210,9 +208,9 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
//组织本币无税金额
|
|
|
cp.setBodyValueAt(caltaxmny,count, "local_notax_cr");
|
|
|
//税额
|
|
|
- cp.setBodyValueAt(sheet.getRow(i).getCell(12).getCellType() == 1 ? sheet.getRow(i).getCell(12).getStringCellValue() : sheet.getRow(i).getCell(12).getNumericCellValue(),count, "local_tax_cr");
|
|
|
+ cp.setBodyValueAt(sheet.getRow(i).getCell(11).getCellType() == 1 ? sheet.getRow(i).getCell(11).getStringCellValue() : sheet.getRow(i).getCell(11).getNumericCellValue(),count, "local_tax_cr");
|
|
|
//原币余额
|
|
|
- Object money_bal = sheet.getRow(i).getCell(13).getCellType() == 1 ? sheet.getRow(i).getCell(13).getStringCellValue() : sheet.getRow(i).getCell(13).getNumericCellValue();
|
|
|
+ Object money_bal = sheet.getRow(i).getCell(12).getCellType() == 1 ? sheet.getRow(i).getCell(12).getStringCellValue() : sheet.getRow(i).getCell(12).getNumericCellValue();
|
|
|
cp.setBodyValueAt(money_bal,count, "money_bal");
|
|
|
//组织本币余额
|
|
|
cp.setBodyValueAt(money_bal,count, "local_money_bal");
|
|
@@ -223,21 +221,30 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
//预占用原币余额
|
|
|
cp.setBodyValueAt(money_bal,count, "occupationmny");
|
|
|
//民航发展基金
|
|
|
- cp.setBodyValueAt(dateUnit(sheet,i,14), count, "def29");
|
|
|
+ cp.setBodyValueAt(dateUnit(sheet,i,13), count, "def29");
|
|
|
//汇款附言
|
|
|
- cp.setBodyValueAt(dateUnit(sheet,i,15),count, "def21");
|
|
|
+ cp.setBodyValueAt(dateUnit(sheet,i,14),count, "def21");
|
|
|
//客户
|
|
|
- cp.setBodyValueAt(dateUnit(sheet,i,16) == null ? null : sqlexecuteQueryDoc(sheet.getRow(i).getCell(16).getStringCellValue(), "CUST"),count, "def13");
|
|
|
+ cp.setBodyValueAt(dateUnit(sheet,i,15) == null ? null : sqlexecuteQueryDoc(sheet.getRow(i).getCell(15).getStringCellValue(), "CUST"),count, "def13");
|
|
|
//客户层级
|
|
|
- cp.setBodyValueAt(dateUnit(sheet,i,17),count, "def22");
|
|
|
+ cp.setBodyValueAt(dateUnit(sheet,i,16),count, "def22");
|
|
|
//原发票日期
|
|
|
- cp.setBodyValueAt(dateUnit(sheet,i,18),count, "def17");
|
|
|
+ cp.setBodyValueAt(dateUnit(sheet,i,17),count, "def17");
|
|
|
//备注
|
|
|
- cp.setBodyValueAt(dateUnit(sheet,i,19),count, "def2");
|
|
|
+ cp.setBodyValueAt(dateUnit(sheet,i,18),count, "def2");
|
|
|
//人员
|
|
|
- cp.setBodyValueAt(dateUnit(sheet,i,20),count, "def40");
|
|
|
+ cp.setBodyValueAt(dateUnit(sheet,i,19),count, "def40");
|
|
|
//成本归属部门
|
|
|
- cp.setBodyValueAt(sqlexecuteQuery("pk_dept", "org_dept", "name", sheet.getRow(i).getCell(21).getStringCellValue(), pk_org,2),count, "def23");
|
|
|
+ cp.setBodyValueAt(sqlexecuteQuery("pk_dept", "org_dept", "name", sheet.getRow(i).getCell(20).getStringCellValue(), pk_org,2),count, "def23");
|
|
|
+ String pk_material = sqlexecuteQuery("pk_material", "bd_material", "name", sheet.getRow(i).getCell(21).getStringCellValue(), null, 2);
|
|
|
+ //物料
|
|
|
+ cp.setBodyValueAt(pk_material,count, "material");
|
|
|
+ //原始物料
|
|
|
+ cp.setBodyValueAt(pk_material,count, "material_src");
|
|
|
+ //含税单价
|
|
|
+ cp.setBodyValueAt(PayableBillItemVO.getTaxprice(),count, "taxprice");
|
|
|
+ //本币含税单价
|
|
|
+ cp.setBodyValueAt(PayableBillItemVO.getLocal_taxprice(),count, "local_taxprice");
|
|
|
//资产合同号
|
|
|
cp.setBodyValueAt(PayableBillItemVO.getAssetpactno(),count, "assetpactno");
|
|
|
// 资金计划项目
|
|
@@ -298,10 +305,6 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
cp.setBodyValueAt(PayableBillItemVO.getInnerorderno(),count, "innerorderno");
|
|
|
// 发票号
|
|
|
cp.setBodyValueAt(PayableBillItemVO.getInvoiceno(),count, "invoiceno");
|
|
|
- // 物料
|
|
|
- cp.setBodyValueAt(PayableBillItemVO.getMaterial(),count, "material");
|
|
|
- // 原始物料
|
|
|
- cp.setBodyValueAt(PayableBillItemVO.getMaterial_src(),count, "material_src");
|
|
|
// 不可抵扣税额
|
|
|
cp.setBodyValueAt(PayableBillItemVO.getNosubtax(),count, "nosubtax");
|
|
|
// 不可抵扣税率
|
|
@@ -509,19 +512,14 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
//结算方式
|
|
|
cp.setBodyValueAt(sqlexecuteQuery("pk_balatype", "bd_balatype", "name", sheet.getRow(i).getCell(10).getStringCellValue(), null,2),count, "pk_balatype");
|
|
|
Object price = null;
|
|
|
- if(dateUnit(sheet,i,9) != null) {
|
|
|
- price = sheet.getRow(i).getCell(9).getCellType() == 1 ? sheet.getRow(i).getCell(9).getStringCellValue() : sheet.getRow(i).getCell(9).getNumericCellValue();
|
|
|
+ if(dateUnit(sheet,i,11) != null) {
|
|
|
+ price = sheet.getRow(i).getCell(11).getCellType() == 1 ? sheet.getRow(i).getCell(11).getStringCellValue() : sheet.getRow(i).getCell(11).getNumericCellValue();
|
|
|
}
|
|
|
//单价
|
|
|
cp.setBodyValueAt(price,count, "price");
|
|
|
//本币单价
|
|
|
cp.setBodyValueAt(price,count, "local_price");
|
|
|
- Object taxprice = sheet.getRow(i).getCell(12).getCellType() == 1 ? sheet.getRow(i).getCell(12).getStringCellValue() : sheet.getRow(i).getCell(12).getNumericCellValue();
|
|
|
- //含税单价
|
|
|
- cp.setBodyValueAt(taxprice,count, "taxprice");
|
|
|
- //本币含税单价
|
|
|
- cp.setBodyValueAt(taxprice,count, "local_taxprice");
|
|
|
- Object caltaxmny = sheet.getRow(i).getCell(13).getCellType() == 1 ? sheet.getRow(i).getCell(13).getStringCellValue() : sheet.getRow(i).getCell(13).getNumericCellValue();
|
|
|
+ Object caltaxmny = sheet.getRow(i).getCell(12).getCellType() == 1 ? sheet.getRow(i).getCell(12).getStringCellValue() : sheet.getRow(i).getCell(12).getNumericCellValue();
|
|
|
//计税金额
|
|
|
cp.setBodyValueAt(caltaxmny,count, "caltaxmny");
|
|
|
//贷方原币无税金额
|
|
@@ -529,10 +527,10 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
//组织本币无税金额
|
|
|
cp.setBodyValueAt(caltaxmny,count, "local_notax_cr");
|
|
|
//税额
|
|
|
- cp.setBodyValueAt(sheet.getRow(i).getCell(14).getCellType() == 1 ? sheet.getRow(i).getCell(14).getStringCellValue() : sheet.getRow(i).getCell(14).getNumericCellValue() ,count, "local_tax_cr");
|
|
|
+ cp.setBodyValueAt(sheet.getRow(i).getCell(13).getCellType() == 1 ? sheet.getRow(i).getCell(13).getStringCellValue() : sheet.getRow(i).getCell(13).getNumericCellValue() ,count, "local_tax_cr");
|
|
|
//民航发展基金
|
|
|
- cp.setBodyValueAt(dateUnit(sheet, i, 15),count, "def29");
|
|
|
- Object money_bal = sheet.getRow(i).getCell(16).getCellType() == 1 ? sheet.getRow(i).getCell(16).getStringCellValue() : sheet.getRow(i).getCell(16).getNumericCellValue();
|
|
|
+ cp.setBodyValueAt(dateUnit(sheet, i, 14),count, "def29");
|
|
|
+ Object money_bal = sheet.getRow(i).getCell(15).getCellType() == 1 ? sheet.getRow(i).getCell(15).getStringCellValue() : sheet.getRow(i).getCell(15).getNumericCellValue();
|
|
|
//原币余额
|
|
|
cp.setBodyValueAt(money_bal,count, "money_bal");
|
|
|
//组织本币余额
|
|
@@ -544,15 +542,24 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
//预占用原币余额
|
|
|
cp.setBodyValueAt(money_bal,count, "occupationmny");
|
|
|
//汇款附言
|
|
|
- cp.setBodyValueAt(dateUnit(sheet, i, 17),count, "def21");
|
|
|
+ cp.setBodyValueAt(dateUnit(sheet, i, 16),count, "def21");
|
|
|
//成本归属部门
|
|
|
- cp.setBodyValueAt(sqlexecuteQuery("pk_dept", "org_dept", "name", sheet.getRow(i).getCell(18).getStringCellValue(), pk_org,2),count, "def22");
|
|
|
+ cp.setBodyValueAt(sqlexecuteQuery("pk_dept", "org_dept", "name", sheet.getRow(i).getCell(17).getStringCellValue(), pk_org,2),count, "def22");
|
|
|
//票据号/保理申请编号
|
|
|
- cp.setBodyValueAt(dateUnit(sheet, i, 19), count, "def5");
|
|
|
+ cp.setBodyValueAt(dateUnit(sheet, i, 18), count, "def5");
|
|
|
//备注
|
|
|
- cp.setBodyValueAt(dateUnit(sheet, i, 20), count, "def2");
|
|
|
+ cp.setBodyValueAt(dateUnit(sheet, i, 19), count, "def2");
|
|
|
//预算名称
|
|
|
- cp.setBodyValueAt(sqlexecuteQuery("pk_inoutbusiclass", "bd_inoutbusiclass", "name", sheet.getRow(i).getCell(21).getStringCellValue(), null,2),count, "pk_subjcode");
|
|
|
+ cp.setBodyValueAt(sqlexecuteQuery("pk_inoutbusiclass", "bd_inoutbusiclass", "name", sheet.getRow(i).getCell(20).getStringCellValue(), null,2),count, "pk_subjcode");
|
|
|
+ String pk_material = sqlexecuteQuery("pk_material", "bd_material", "name", sheet.getRow(i).getCell(21).getStringCellValue(), null, 2);
|
|
|
+ //物料
|
|
|
+ cp.setBodyValueAt(pk_material,count, "material");
|
|
|
+ //原始物料
|
|
|
+ cp.setBodyValueAt(pk_material,count, "material_src");
|
|
|
+ //含税单价
|
|
|
+ cp.setBodyValueAt(PayableBillItemVO.getTaxprice(),count, "taxprice");
|
|
|
+ //本币含税单价
|
|
|
+ cp.setBodyValueAt(PayableBillItemVO.getLocal_taxprice(),count, "local_taxprice");
|
|
|
//资产合同号
|
|
|
cp.setBodyValueAt(PayableBillItemVO.getAssetpactno(),count, "assetpactno");
|
|
|
// 资金计划项目
|
|
@@ -613,10 +620,6 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
cp.setBodyValueAt(PayableBillItemVO.getInnerorderno(),count, "innerorderno");
|
|
|
// 发票号
|
|
|
cp.setBodyValueAt(PayableBillItemVO.getInvoiceno(),count, "invoiceno");
|
|
|
- // 物料
|
|
|
- cp.setBodyValueAt(PayableBillItemVO.getMaterial(),count, "material");
|
|
|
- // 原始物料
|
|
|
- cp.setBodyValueAt(PayableBillItemVO.getMaterial_src(),count, "material_src");
|
|
|
// 不可抵扣税额
|
|
|
cp.setBodyValueAt(PayableBillItemVO.getNosubtax(),count, "nosubtax");
|
|
|
// 不可抵扣税率
|
|
@@ -823,12 +826,7 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
cp.setBodyValueAt(price,count, "price");
|
|
|
//本币单价
|
|
|
cp.setBodyValueAt(price,count, "local_price");
|
|
|
- Object taxprice = sheet.getRow(i).getCell(9).getCellType() == 1 ? sheet.getRow(i).getCell(9).getStringCellValue() : sheet.getRow(i).getCell(9).getNumericCellValue();
|
|
|
- //含税单价
|
|
|
- cp.setBodyValueAt(taxprice,count, "taxprice");
|
|
|
- //本币含税单价
|
|
|
- cp.setBodyValueAt(taxprice,count, "local_taxprice");
|
|
|
- Object caltaxmny = sheet.getRow(i).getCell(10).getCellType() == 1 ? sheet.getRow(i).getCell(10).getStringCellValue() : sheet.getRow(i).getCell(10).getNumericCellValue();
|
|
|
+ Object caltaxmny = sheet.getRow(i).getCell(9).getCellType() == 1 ? sheet.getRow(i).getCell(9).getStringCellValue() : sheet.getRow(i).getCell(9).getNumericCellValue();
|
|
|
//计税金额
|
|
|
cp.setBodyValueAt(caltaxmny,count, "caltaxmny");
|
|
|
//贷方原币无税金额
|
|
@@ -836,9 +834,9 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
//组织本币无税金额
|
|
|
cp.setBodyValueAt(caltaxmny,count, "local_notax_cr");
|
|
|
//税额
|
|
|
- cp.setBodyValueAt(sheet.getRow(i).getCell(11).getCellType() == 1 ? sheet.getRow(i).getCell(11).getStringCellValue() : sheet.getRow(i).getCell(11).getNumericCellValue(),count, "local_tax_cr");
|
|
|
+ cp.setBodyValueAt(sheet.getRow(i).getCell(10).getCellType() == 1 ? sheet.getRow(i).getCell(10).getStringCellValue() : sheet.getRow(i).getCell(10).getNumericCellValue(),count, "local_tax_cr");
|
|
|
//原币余额
|
|
|
- Object money_bal = sheet.getRow(i).getCell(12).getCellType() == 1 ? sheet.getRow(i).getCell(12).getStringCellValue() : sheet.getRow(i).getCell(12).getNumericCellValue();
|
|
|
+ Object money_bal = sheet.getRow(i).getCell(11).getCellType() == 1 ? sheet.getRow(i).getCell(11).getStringCellValue() : sheet.getRow(i).getCell(11).getNumericCellValue();
|
|
|
cp.setBodyValueAt(money_bal,count, "money_bal");
|
|
|
//组织本币余额
|
|
|
cp.setBodyValueAt(money_bal,count, "local_money_bal");
|
|
@@ -849,20 +847,24 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
//预占用原币余额
|
|
|
cp.setBodyValueAt(money_bal,count, "occupationmny");
|
|
|
//扣税类别
|
|
|
- cp.setBodyValueAt("应税内含".equals(sheet.getRow(i).getCell(13).getStringCellValue()) ? 0 : 1,count, "taxtype");
|
|
|
+ cp.setBodyValueAt("应税内含".equals(sheet.getRow(i).getCell(12).getStringCellValue()) ? 0 : 1,count, "taxtype");
|
|
|
//成本归属部门
|
|
|
- cp.setBodyValueAt(sqlexecuteQuery("pk_dept", "org_dept", "name", sheet.getRow(i).getCell(14).getStringCellValue(), pk_org,2),count, "def23");
|
|
|
+ cp.setBodyValueAt(sqlexecuteQuery("pk_dept", "org_dept", "name", sheet.getRow(i).getCell(13).getStringCellValue(), pk_org,2),count, "def23");
|
|
|
//往来对象
|
|
|
- Object objtype = dateUnit(sheet,i,15);
|
|
|
+ Object objtype = dateUnit(sheet,i,14);
|
|
|
cp.setBodyValueAt("供应商".equals(objtype) ? 1 : "部门".equals(objtype) ? 2 : 3,count, "objtype");
|
|
|
//备注
|
|
|
- cp.setBodyValueAt(dateUnit(sheet,i,16),count, "def2");
|
|
|
+ cp.setBodyValueAt(dateUnit(sheet,i,15),count, "def2");
|
|
|
//对方单位名称
|
|
|
- cp.setBodyValueAt(sqlexecuteQuery("pk_supplier", "bd_supplier", "name", sheet.getRow(i).getCell(17).getStringCellValue(), null, 2),count,"supplier");
|
|
|
+ cp.setBodyValueAt(sqlexecuteQuery("pk_supplier", "bd_supplier", "name", sheet.getRow(i).getCell(16).getStringCellValue(), null, 2),count,"supplier");
|
|
|
//部门
|
|
|
- cp.setBodyValueAt(sqlexecuteQuery("pk_dept", "org_dept", "name", sheet.getRow(i).getCell(18).getStringCellValue(), pk_org, 2),count, "pk_deptid");
|
|
|
+ cp.setBodyValueAt(sqlexecuteQuery("pk_dept", "org_dept", "name", sheet.getRow(i).getCell(17).getStringCellValue(), pk_org, 2),count, "pk_deptid");
|
|
|
//部 门
|
|
|
- cp.setBodyValueAt(sqlexecuteQuery("pk_vid", "org_dept_v", "name", sheet.getRow(i).getCell(18).getStringCellValue(), pk_org, 2),count, "pk_deptid_v");
|
|
|
+ cp.setBodyValueAt(sqlexecuteQuery("pk_vid", "org_dept_v", "name", sheet.getRow(i).getCell(17).getStringCellValue(), pk_org, 2),count, "pk_deptid_v");
|
|
|
+ //含税单价
|
|
|
+ cp.setBodyValueAt(PayableBillItemVO.getTaxprice(),count, "taxprice");
|
|
|
+ //本币含税单价
|
|
|
+ cp.setBodyValueAt(PayableBillItemVO.getLocal_taxprice(),count, "local_taxprice");
|
|
|
//数量余额
|
|
|
cp.setBodyValueAt(PayableBillItemVO.getQuantity_bal(),count, "quantity_bal");
|
|
|
//贷方数量
|
|
@@ -1136,12 +1138,7 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
cp.setBodyValueAt(price,count, "price");
|
|
|
//本币单价
|
|
|
cp.setBodyValueAt(price,count, "local_price");
|
|
|
- Object taxprice = sheet.getRow(i).getCell(11).getCellType() == 1 ? sheet.getRow(i).getCell(11).getStringCellValue() : sheet.getRow(i).getCell(11).getNumericCellValue();
|
|
|
- //含税单价
|
|
|
- cp.setBodyValueAt(taxprice,count, "taxprice");
|
|
|
- //本币含税单价
|
|
|
- cp.setBodyValueAt(taxprice,count, "local_taxprice");
|
|
|
- Object caltaxmny = sheet.getRow(i).getCell(12).getCellType() == 1 ? sheet.getRow(i).getCell(12).getStringCellValue() : sheet.getRow(i).getCell(12).getNumericCellValue();
|
|
|
+ Object caltaxmny = sheet.getRow(i).getCell(11).getCellType() == 1 ? sheet.getRow(i).getCell(11).getStringCellValue() : sheet.getRow(i).getCell(11).getNumericCellValue();
|
|
|
//计税金额
|
|
|
cp.setBodyValueAt(caltaxmny,count, "caltaxmny");
|
|
|
//贷方原币无税金额
|
|
@@ -1149,8 +1146,8 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
//组织本币无税金额
|
|
|
cp.setBodyValueAt(caltaxmny,count, "local_notax_cr");
|
|
|
//税额
|
|
|
- cp.setBodyValueAt(sheet.getRow(i).getCell(13).getCellType() == 1 ? sheet.getRow(i).getCell(13).getStringCellValue() : sheet.getRow(i).getCell(13).getNumericCellValue() ,count, "local_tax_cr");
|
|
|
- Object money_bal = sheet.getRow(i).getCell(14).getCellType() == 1 ? sheet.getRow(i).getCell(14).getStringCellValue() : sheet.getRow(i).getCell(14).getNumericCellValue();
|
|
|
+ cp.setBodyValueAt(sheet.getRow(i).getCell(12).getCellType() == 1 ? sheet.getRow(i).getCell(12).getStringCellValue() : sheet.getRow(i).getCell(12).getNumericCellValue() ,count, "local_tax_cr");
|
|
|
+ Object money_bal = sheet.getRow(i).getCell(13).getCellType() == 1 ? sheet.getRow(i).getCell(13).getStringCellValue() : sheet.getRow(i).getCell(13).getNumericCellValue();
|
|
|
//原币余额
|
|
|
cp.setBodyValueAt(money_bal,count, "money_bal");
|
|
|
//组织本币余额
|
|
@@ -1162,18 +1159,22 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
//预占用原币余额
|
|
|
cp.setBodyValueAt(money_bal,count, "occupationmny");
|
|
|
//成本归属部门
|
|
|
- cp.setBodyValueAt(sqlexecuteQuery("pk_dept", "org_dept", "name", sheet.getRow(i).getCell(15).getStringCellValue(), pk_org,2),count, "def22");
|
|
|
+ cp.setBodyValueAt(sqlexecuteQuery("pk_dept", "org_dept", "name", sheet.getRow(i).getCell(14).getStringCellValue(), pk_org,2),count, "def22");
|
|
|
//扣税类别
|
|
|
- cp.setBodyValueAt("应税内含".equals(sheet.getRow(i).getCell(16).getStringCellValue()) ? 0 : 1,count, "taxtype");
|
|
|
+ cp.setBodyValueAt("应税内含".equals(sheet.getRow(i).getCell(15).getStringCellValue()) ? 0 : 1,count, "taxtype");
|
|
|
//往来对象
|
|
|
- Object objtype = dateUnit(sheet,i,17);
|
|
|
+ Object objtype = dateUnit(sheet,i,16);
|
|
|
cp.setBodyValueAt("供应商".equals(objtype) ? 1 : "部门".equals(objtype) ? 2 : 3,count, "objtype");
|
|
|
//对方单位名称
|
|
|
- cp.setBodyValueAt(sqlexecuteQuery("pk_supplier", "bd_supplier", "name", sheet.getRow(i).getCell(18).getStringCellValue(), null, 2),count,"supplier");
|
|
|
+ cp.setBodyValueAt(sqlexecuteQuery("pk_supplier", "bd_supplier", "name", sheet.getRow(i).getCell(17).getStringCellValue(), null, 2),count,"supplier");
|
|
|
//备注
|
|
|
- cp.setBodyValueAt(dateUnit(sheet, i, 19), count, "def2");
|
|
|
+ cp.setBodyValueAt(dateUnit(sheet, i, 18), count, "def2");
|
|
|
//预算名称
|
|
|
- cp.setBodyValueAt(sqlexecuteQuery("pk_inoutbusiclass", "bd_inoutbusiclass", "name", sheet.getRow(i).getCell(20).getStringCellValue(), null,2),count, "pk_subjcode");
|
|
|
+ cp.setBodyValueAt(sqlexecuteQuery("pk_inoutbusiclass", "bd_inoutbusiclass", "name", sheet.getRow(i).getCell(19).getStringCellValue(), null,2),count, "pk_subjcode");
|
|
|
+ //含税单价
|
|
|
+ cp.setBodyValueAt(PayableBillItemVO.getTaxprice(),count, "taxprice");
|
|
|
+ //本币含税单价
|
|
|
+ cp.setBodyValueAt(PayableBillItemVO.getLocal_taxprice(),count, "local_taxprice");
|
|
|
//数量余额
|
|
|
cp.setBodyValueAt(PayableBillItemVO.getQuantity_bal(),count, "quantity_bal");
|
|
|
//贷方数量
|
|
@@ -1493,16 +1494,16 @@ public class ImportBodyAction extends BodyAddLineAction{
|
|
|
int[] index = null;
|
|
|
if("应付单(非项目)".equals(type)) {
|
|
|
//需要校验的Excle下标
|
|
|
- index = new int[]{0,1,2,3,4,5,6,7,8,10,11,12,13,21};
|
|
|
+ index = new int[]{0,1,2,3,4,5,6,7,8,10,11,12,20,21};
|
|
|
}else if("应付单(项目)".equals(type)){
|
|
|
//需要校验的Excle下标
|
|
|
- index = new int[]{0,1,2,3,4,5,6,7,8,9,10,12,13,14,16,18,21};
|
|
|
+ index = new int[]{0,1,2,3,4,5,6,7,8,9,10,12,13,15,17,20,21};
|
|
|
}else if("预付核销单(非项目)".equals(type)){
|
|
|
//需要校验的Excle下标
|
|
|
- index = new int[]{0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,17,18,19};
|
|
|
+ index = new int[]{0,1,2,3,4,5,6,7,9,10,11,12,13,14,16,17,18};
|
|
|
}else {
|
|
|
//需要校验的Excle下标
|
|
|
- index = new int[]{0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,20,21};
|
|
|
+ index = new int[]{0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,19,20};
|
|
|
}
|
|
|
for (int j = 0; j < index.length; j++) {
|
|
|
if(sheet.getRow(i).getCell(index[j])!= null) {
|