Compare commits

..

No commits in common. "abb83cdf7e543cb3cfe9023c4226481f3389c25b" and "c319747b03cdf71afb96f2ed1f7d111abd2dd3a6" have entirely different histories.

6 changed files with 154 additions and 290 deletions

View File

@ -26,7 +26,7 @@ public class batchInsert extends JFrame {
/*stmt = conn.prepareStatement( /*stmt = conn.prepareStatement(
"insert into [dbo].[sapcontract_test](uid,bh,type,custom,salesman,project,htje,startdate,enddate,remark,htzt) values (?,?,?,?,?,?,?,?,?,?,?)");*/ "insert into [dbo].[sapcontract_test](uid,bh,type,custom,salesman,project,htje,startdate,enddate,remark,htzt) values (?,?,?,?,?,?,?,?,?,?,?)");*/
stmt = conn.prepareStatement( stmt = conn.prepareStatement(
"insert into c_material(material_id, material_xingh, material_guig, material_diany, material_dw,material_type_id) values (?,?,?,?,?,?)"); "insert into c_material(material_id, material_xingh, material_guig, material_diany, material_dw) values (?,?,?,?,?)");
int count = 0; int count = 0;
System.err.println("Start"); System.err.println("Start");
for (material pay : list) { for (material pay : list) {
@ -36,7 +36,6 @@ public class batchInsert extends JFrame {
stmt.setString(3, pay.getMaterial_guig()); stmt.setString(3, pay.getMaterial_guig());
stmt.setString(4, pay.getMaterial_diany()); stmt.setString(4, pay.getMaterial_diany());
stmt.setString(5, pay.getMaterial_dw()); stmt.setString(5, pay.getMaterial_dw());
stmt.setString(6, pay.getMaterial_type_id());
stmt.addBatch(); stmt.addBatch();
if (count % 5000 == 0) {// 当增加了500个批处理的时候再提交 if (count % 5000 == 0) {// 当增加了500个批处理的时候再提交

View File

@ -328,6 +328,8 @@ public class SysUserController extends BaseController
List<List<temp>> averageAssign = ListUtils.partition(templist, 5000); List<List<temp>> averageAssign = ListUtils.partition(templist, 5000);
*//*List<temp> list = averageAssign.get(0);*//*
int num = 1; int num = 1;
int num2 = 1; int num2 = 1;
for(List<temp> list:averageAssign){ for(List<temp> list:averageAssign){
@ -338,10 +340,13 @@ public class SysUserController extends BaseController
m.setMaterial_guig(t.getSpec_1()); m.setMaterial_guig(t.getSpec_1());
m.setMaterial_diany(t.getVoltage_1()); m.setMaterial_diany(t.getVoltage_1());
m.setMaterial_dw(t.getUnit_0()); m.setMaterial_dw(t.getUnit_0());
m.setMaterial_type_id(t.getType_no());
materials.add(m); materials.add(m);
num++; num++;
*//*
for(int i=1;i<63;i++){
*//*
if("M001".equals(t.getM_id_M001())){ if("M001".equals(t.getM_id_M001())){
c = new cost(); c = new cost();
c.setCost_id(num2); c.setCost_id(num2);
@ -381,7 +386,6 @@ public class SysUserController extends BaseController
c.setCost_material_id(m.getMaterial_id()); c.setCost_material_id(m.getMaterial_id());
c.setCost_cl_id(t.getM_id_M005()); c.setCost_cl_id(t.getM_id_M005());
c.setCost_cl_qty(t.getName_qty_M005()); c.setCost_cl_qty(t.getName_qty_M005());
c.setCost_cl_qty_2(t.getName_qty_M005_1());
costs.add(c);num2++; costs.add(c);num2++;
} }
if("M006".equals(t.getM_id_M006())){ if("M006".equals(t.getM_id_M006())){
@ -844,45 +848,19 @@ public class SysUserController extends BaseController
c.setCost_cl_qty(t.getName_qty_M064()); c.setCost_cl_qty(t.getName_qty_M064());
costs.add(c);num2++; costs.add(c);num2++;
} }
if("M065".equals(t.getM_id_M065())){
c = new cost(); *//* }*//*
c.setCost_id(num2);
c.setCost_material_id(m.getMaterial_id());
c.setCost_cl_id(t.getM_id_M065());
c.setCost_cl_qty(t.getName_qty_M065());
costs.add(c);num2++;
}
if("M066".equals(t.getM_id_M066())){
c = new cost();
c.setCost_id(num2);
c.setCost_material_id(m.getMaterial_id());
c.setCost_cl_id(t.getM_id_M066());
c.setCost_cl_qty(t.getName_qty_M066());
costs.add(c);num2++;
}
if("M067".equals(t.getM_id_M067())){
c = new cost();
c.setCost_id(num2);
c.setCost_material_id(m.getMaterial_id());
c.setCost_cl_id(t.getM_id_M067());
c.setCost_cl_qty(t.getName_qty_M067());
costs.add(c);num2++;
}
if("M068".equals(t.getM_id_M068())){
c = new cost();
c.setCost_id(num2);
c.setCost_material_id(m.getMaterial_id());
c.setCost_cl_id(t.getM_id_M068());
c.setCost_cl_qty(t.getName_qty_M068());
costs.add(c);num2++;
}
} }
} }
System.out.println("materials===================="+materials.size()); System.out.println("materials===================="+materials.size());
System.out.println("costs======================="+costs.size()); System.out.println("costs======================="+costs.size());
*//*insertMaterialBatch(materials);
insertCostBatch(costs);*//*
batchInsert.insertMaterialBatch(materials); batchInsert.insertMaterialBatch(materials);
batchInsert.insertCostBatch(costs); batchInsert.insertCostBatch(costs);
}*/ }*/

View File

@ -6,7 +6,6 @@ public class material {
private String material_guig; private String material_guig;
private String material_diany; private String material_diany;
private String material_dw; private String material_dw;
private String material_type_id;
public String getMaterial_xingh() { public String getMaterial_xingh() {
return material_xingh; return material_xingh;
@ -47,12 +46,4 @@ public class material {
public void setMaterial_id(Integer material_id) { public void setMaterial_id(Integer material_id) {
this.material_id = material_id; this.material_id = material_id;
} }
public String getMaterial_type_id() {
return material_type_id;
}
public void setMaterial_type_id(String material_type_id) {
this.material_type_id = material_type_id;
}
} }

View File

@ -1,7 +1,6 @@
package com.ruoyi.system.domain; package com.ruoyi.system.domain;
public class temp { public class temp {
private String type_no;
private String model_0; private String model_0;
private String model_1; private String model_1;
private String spec_0; private String spec_0;
@ -21,7 +20,6 @@ public class temp {
private String name_qty_M004_1; private String name_qty_M004_1;
private String m_id_M005; private String m_id_M005;
private String name_qty_M005; private String name_qty_M005;
private String name_qty_M005_1;
private String m_id_M006; private String m_id_M006;
private String name_qty_M006; private String name_qty_M006;
private String m_id_M007; private String m_id_M007;
@ -150,26 +148,6 @@ public class temp {
private String m_id_M064; private String m_id_M064;
private String name_qty_M064; private String name_qty_M064;
private String m_id_M065;
private String name_qty_M065;
private String m_id_M066;
private String name_qty_M066;
private String m_id_M067;
private String name_qty_M067;
private String m_id_M068;
private String name_qty_M068;
public String getType_no() {
return type_no;
}
public void setType_no(String type_no) {
this.type_no = type_no;
}
public String getModel_0() { public String getModel_0() {
return model_0; return model_0;
} }
@ -314,14 +292,6 @@ public class temp {
this.name_qty_M005 = name_qty_M005; this.name_qty_M005 = name_qty_M005;
} }
public String getName_qty_M005_1() {
return name_qty_M005_1;
}
public void setName_qty_M005_1(String name_qty_M005_1) {
this.name_qty_M005_1 = name_qty_M005_1;
}
public String getM_id_M006() { public String getM_id_M006() {
return m_id_M006; return m_id_M006;
} }
@ -1329,68 +1299,4 @@ public class temp {
public void setName_qty_M048_1(String name_qty_M048_1) { public void setName_qty_M048_1(String name_qty_M048_1) {
this.name_qty_M048_1 = name_qty_M048_1; this.name_qty_M048_1 = name_qty_M048_1;
} }
public String getM_id_M065() {
return m_id_M065;
}
public void setM_id_M065(String m_id_M065) {
this.m_id_M065 = m_id_M065;
}
public String getName_qty_M065() {
return name_qty_M065;
}
public void setName_qty_M065(String name_qty_M065) {
this.name_qty_M065 = name_qty_M065;
}
public String getM_id_M066() {
return m_id_M066;
}
public void setM_id_M066(String m_id_M066) {
this.m_id_M066 = m_id_M066;
}
public String getName_qty_M066() {
return name_qty_M066;
}
public void setName_qty_M066(String name_qty_M066) {
this.name_qty_M066 = name_qty_M066;
}
public String getM_id_M067() {
return m_id_M067;
}
public void setM_id_M067(String m_id_M067) {
this.m_id_M067 = m_id_M067;
}
public String getName_qty_M067() {
return name_qty_M067;
}
public void setName_qty_M067(String name_qty_M067) {
this.name_qty_M067 = name_qty_M067;
}
public String getM_id_M068() {
return m_id_M068;
}
public void setM_id_M068(String m_id_M068) {
this.m_id_M068 = m_id_M068;
}
public String getName_qty_M068() {
return name_qty_M068;
}
public void setName_qty_M068(String name_qty_M068) {
this.name_qty_M068 = name_qty_M068;
}
} }

View File

@ -6,7 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTemp" resultType="com.ruoyi.system.domain.temp"> <select id="selectTemp" resultType="com.ruoyi.system.domain.temp">
select b.type_no,[uid_0] SELECT [id_0]
,[model_0] ,[model_0]
,[model_1] ,[model_1]
,[spec_0] ,[spec_0]
@ -14,154 +14,144 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
,[voltage_0] ,[voltage_0]
,[voltage_1] ,[voltage_1]
,[unit_0] ,[unit_0]
,RTRIM([m_id_M001]) m_id_M001 ,[m_id_M001]
,RTRIM([name_qty_M001]) name_qty_M001 ,[name_qty_M001]
,RTRIM([m_id_M002]) m_id_M002 ,[m_id_M002]
,RTRIM([name_qty_M002]) name_qty_M002 ,[name_qty_M002]
,RTRIM([m_id_M003]) m_id_M003 ,[m_id_M003]
,RTRIM([name_qty_M003]) name_qty_M003 ,[name_qty_M003]
,RTRIM([name_qty_M003_1]) name_qty_M003_1 ,[name_qty_M003_1]
,RTRIM([m_id_M004]) m_id_M004 ,[m_id_M004]
,RTRIM([name_qty_M004]) name_qty_M004 ,[name_qty_M004]
,RTRIM([name_qty_M004_1]) name_qty_M004_1 ,[name_qty_M004_1]
,RTRIM([m_id_M005]) m_id_M005 ,[m_id_M005]
,RTRIM([name_qty_M005]) name_qty_M005 ,[name_qty_M005]
,RTRIM([name_qty_M005_1]) name_qty_M005_1 ,[m_id_M006]
,RTRIM([m_id_M006]) m_id_M006 ,[name_qty_M006]
,RTRIM([name_qty_M006]) name_qty_M006 ,[m_id_M007]
,RTRIM([m_id_M007]) m_id_M007 ,[name_qty_M007]
,RTRIM([name_qty_M007]) name_qty_M007 ,[m_id_M008]
,RTRIM([m_id_M008]) m_id_M008 ,[name_qty_M008]
,RTRIM([name_qty_M008]) name_qty_M008 ,[m_id_M009]
,RTRIM([m_id_M009]) m_id_M009 ,[name_qty_M009]
,RTRIM([name_qty_M009]) name_qty_M009 ,[m_id_M010]
,RTRIM([m_id_M010]) m_id_M010 ,[name_qty_M010]
,RTRIM([name_qty_M010]) name_qty_M010 ,[name_qty_M010_1]
,RTRIM([name_qty_M010_1]) name_qty_M010_1 ,[m_id_M011]
,RTRIM([m_id_M011]) m_id_M011 ,[name_qty_M011]
,RTRIM([name_qty_M011]) name_qty_M011 ,[m_id_M012]
,RTRIM([m_id_M012]) m_id_M012 ,[name_qty_M012]
,RTRIM([name_qty_M012]) name_qty_M012 ,[m_id_M013]
,RTRIM([m_id_M013]) m_id_M013 ,[name_qty_M013]
,RTRIM([name_qty_M013]) name_qty_M013 ,[m_id_M014]
,RTRIM([m_id_M014]) m_id_M014 ,[name_qty_M014]
,RTRIM([name_qty_M014]) name_qty_M014 ,[m_id_M015]
,RTRIM([m_id_M015]) m_id_M015 ,[name_qty_M015]
,RTRIM([name_qty_M015]) name_qty_M015 ,[m_id_M016]
,RTRIM([m_id_M016]) m_id_M016 ,[name_qty_M016]
,RTRIM([name_qty_M016]) name_qty_M016 ,[m_id_M017]
,RTRIM([m_id_M017]) m_id_M017 ,[name_qty_M017]
,RTRIM([name_qty_M017]) name_qty_M017 ,[m_id_M018]
,RTRIM([m_id_M018]) m_id_M018 ,[name_qty_M018]
,RTRIM([name_qty_M018]) name_qty_M018 ,[m_id_M019]
,RTRIM([m_id_M019]) m_id_M019 ,[name_qty_M019]
,RTRIM([name_qty_M019]) name_qty_M019 ,[name_qty_M019_1]
,RTRIM([name_qty_M019_1]) name_qty_M019_1 ,[m_id_M020]
,RTRIM([m_id_M020]) m_id_M020 ,[name_qty_M020]
,RTRIM([name_qty_M020]) name_qty_M020 ,[m_id_M021]
,RTRIM([m_id_M021]) m_id_M021 ,[name_qty_M021]
,RTRIM([name_qty_M021]) name_qty_M021 ,[name_qty_M021_1]
,RTRIM([name_qty_M021_1]) name_qty_M021_1 ,[m_id_M022]
,RTRIM([m_id_M022]) m_id_M022 ,[name_qty_M022]
,RTRIM([name_qty_M022]) name_qty_M022 ,[m_id_M023]
,RTRIM([m_id_M023]) m_id_M023 ,[name_qty_M023]
,RTRIM([name_qty_M023]) name_qty_M023 ,[m_id_M024]
,RTRIM([m_id_M024]) m_id_M024 ,[name_qty_M024]
,RTRIM([name_qty_M024]) name_qty_M024 ,[m_id_M025]
,RTRIM([m_id_M025]) m_id_M025 ,[name_qty_M025]
,RTRIM([name_qty_M025]) name_qty_M025 ,[m_id_M026]
,RTRIM([m_id_M026]) m_id_M026 ,[name_qty_M026]
,RTRIM([name_qty_M026]) name_qty_M026 ,[m_id_M027]
,RTRIM([m_id_M027]) m_id_M027 ,[name_qty_M027]
,RTRIM([name_qty_M027]) name_qty_M027 ,[m_id_M028]
,RTRIM([m_id_M028]) m_id_M028 ,[name_qty_M028]
,RTRIM([name_qty_M028]) name_qty_M028 ,[m_id_M029]
,RTRIM([m_id_M029]) m_id_M029 ,[name_qty_M029]
,RTRIM([name_qty_M029]) name_qty_M029 ,[m_id_M030]
,RTRIM([m_id_M030]) m_id_M030 ,[name_qty_M030]
,RTRIM([name_qty_M030]) name_qty_M030 ,[m_id_M031]
,RTRIM([m_id_M031]) m_id_M031 ,[name_qty_M031]
,RTRIM([name_qty_M031]) name_qty_M031 ,[m_id_M032]
,RTRIM([m_id_M032]) m_id_M032 ,[name_qty_M032]
,RTRIM([name_qty_M032]) name_qty_M032 ,[m_id_M033]
,RTRIM([m_id_M033]) m_id_M033 ,[name_qty_M033]
,RTRIM([name_qty_M033]) name_qty_M033 ,[m_id_M034]
,RTRIM([m_id_M034]) m_id_M034 ,[name_qty_M034]
,RTRIM([name_qty_M034]) name_qty_M034 ,[m_id_M035]
,RTRIM([m_id_M035]) m_id_M035 ,[name_qty_M035]
,RTRIM([name_qty_M035]) name_qty_M035 ,[m_id_M036]
,RTRIM([m_id_M036]) m_id_M036 ,[name_qty_M036]
,RTRIM([name_qty_M036]) name_qty_M036 ,[m_id_M037]
,RTRIM([m_id_M037]) m_id_M037 ,[name_qty_M037]
,RTRIM([name_qty_M037]) name_qty_M037 ,[name_qty_M037_1]
,RTRIM([name_qty_M037_1]) name_qty_M037_1 ,[m_id_M038]
,RTRIM([m_id_M038]) m_id_M038 ,[name_qty_M038]
,RTRIM([name_qty_M038]) name_qty_M038 ,[m_id_M039]
,RTRIM([m_id_M039]) m_id_M039 ,[name_qty_M039]
,RTRIM([name_qty_M039]) name_qty_M039 ,[name_qty_M039_1]
,RTRIM([name_qty_M039_1]) name_qty_M039_1 ,[m_id_M040]
,RTRIM([m_id_M040]) m_id_M040 ,[name_qty_M040]
,RTRIM([name_qty_M040]) name_qty_M040 ,[m_id_M041]
,RTRIM([m_id_M041]) m_id_M041 ,[name_qty_M041]
,RTRIM([name_qty_M041]) name_qty_M041 ,[m_id_M042]
,RTRIM([m_id_M042]) m_id_M042 ,[name_qty_M042]
,RTRIM([name_qty_M042]) name_qty_M042 ,[name_qty_M042_1]
,RTRIM([name_qty_M042_1]) name_qty_M042_1 ,[m_id_M043]
,RTRIM([m_id_M043]) m_id_M043 ,[name_qty_M043]
,RTRIM([name_qty_M043]) name_qty_M043 ,[m_id_M044]
,RTRIM([m_id_M044]) m_id_M044 ,[name_qty_M044]
,RTRIM([name_qty_M044]) name_qty_M044 ,[m_id_M045]
,RTRIM([m_id_M045]) m_id_M045 ,[name_qty_M045]
,RTRIM([name_qty_M045]) name_qty_M045 ,[m_id_M046]
,RTRIM([m_id_M046]) m_id_M046 ,[name_qty_M046]
,RTRIM([name_qty_M046]) name_qty_M046 ,[m_id_M047]
,RTRIM([m_id_M047]) m_id_M047 ,[name_qty_M047]
,RTRIM([name_qty_M047]) name_qty_M047 ,[m_id_M048]
,RTRIM([m_id_M048]) m_id_M048 ,[name_qty_M048]
,RTRIM([name_qty_M048]) name_qty_M048 ,[name_qty_M048_1]
,RTRIM([name_qty_M048_1]) name_qty_M048_1 ,[m_id_M049]
,RTRIM([m_id_M049]) m_id_M049 ,[name_qty_M049]
,RTRIM([name_qty_M049]) name_qty_M049 ,[m_id_M050]
,RTRIM([m_id_M050]) m_id_M050 ,[name_qty_M050]
,RTRIM([name_qty_M050]) name_qty_M050 ,[m_id_M051]
,RTRIM([m_id_M051]) m_id_M051 ,[name_qty_M051]
,RTRIM([name_qty_M051]) name_qty_M051 ,[m_id_M052]
,RTRIM([m_id_M052]) m_id_M052 ,[name_qty_M052]
,RTRIM([name_qty_M052]) name_qty_M052 ,[m_id_M053]
,RTRIM([m_id_M053]) m_id_M053 ,[name_qty_M053]
,RTRIM([name_qty_M053]) name_qty_M053 ,[m_id_M054]
,RTRIM([m_id_M054]) m_id_M054 ,[name_qty_M054]
,RTRIM([name_qty_M054]) name_qty_M054 ,[m_id_M055]
,RTRIM([m_id_M055]) m_id_M055 ,[name_qty_M055]
,RTRIM([name_qty_M055]) name_qty_M055 ,[m_id_M056]
,RTRIM([m_id_M056]) m_id_M056 ,[name_qty_M056]
,RTRIM([name_qty_M056]) name_qty_M056 ,[m_id_M057]
,RTRIM([m_id_M057]) m_id_M057 ,[name_qty_M057]
,RTRIM([name_qty_M057]) name_qty_M057 ,[m_id_M058]
,RTRIM([m_id_M058]) m_id_M058 ,[name_qty_M058]
,RTRIM([name_qty_M058]) name_qty_M058 ,[m_id_M059]
,RTRIM([m_id_M059]) m_id_M059 ,[name_qty_M059]
,RTRIM([name_qty_M059]) name_qty_M059 ,[m_id_M060]
,RTRIM([m_id_M060]) m_id_M060 ,[name_qty_M060]
,RTRIM([name_qty_M060]) name_qty_M060 ,[m_id_M061]
,RTRIM([m_id_M061]) m_id_M061 ,[name_qty_M061]
,RTRIM([name_qty_M061]) name_qty_M061 ,[m_id_M062]
,RTRIM([m_id_M062]) m_id_M062 ,[name_qty_M062]
,RTRIM([name_qty_M062]) name_qty_M062 ,[m_id_M063]
,RTRIM([m_id_M063]) m_id_M063 ,[name_qty_M063]
,RTRIM([name_qty_M063]) name_qty_M063 ,[m_id_M064]
,RTRIM([m_id_M064]) m_id_M064 ,[name_qty_M064]
,RTRIM([name_qty_M064]) name_qty_M064 FROM [dbo].[temp_2]
,RTRIM([m_id_M065]) m_id_M065
,RTRIM([name_qty_M065]) name_qty_M065
,RTRIM([m_id_M066]) m_id_M066
,RTRIM([name_qty_M066]) name_qty_M066
,RTRIM([m_id_M067]) m_id_M067
,RTRIM([name_qty_M067]) name_qty_M067
,RTRIM([m_id_M068]) m_id_M068
,RTRIM([name_qty_M068]) name_qty_M068
from temp_3 a left join c_material_type b on a.desp_0 = b.type_name
</select> </select>
<insert id="insertMaterialBatch"> <insert id="insertMaterialBatch">

View File

@ -280,10 +280,10 @@ export default {
{ required: true, message: "类别不能为空", trigger: "blur" } { required: true, message: "类别不能为空", trigger: "blur" }
], ],
costClQty: [ costClQty: [
{ pattern: /^(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,5})?$/, message: '格式有误',trigger: "blur"} { pattern: /^(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,3})?$/, message: '格式有误',trigger: "blur"}
], ],
costClQty2: [ costClQty2: [
{ pattern: /^(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,5})?$/, message: '格式有误',trigger: "blur"} { pattern: /^(([1-9]{1}\d{0,9})|(0{1}))(\.\d{1,3})?$/, message: '格式有误',trigger: "blur"}
], ],
} }
}; };