| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445 |
- package UIM.WGJ;
- import com.alibaba.excel.context.AnalysisContext;
- import com.alibaba.excel.event.AnalysisEventListener;
- import CoreFS.SA06.CoreReturnObject;
- import QCM.COMMUNAL.OrderSqMapper;
- import QCM.COMMUNAL.VO.ExcelWGJ;
- import QCM.COMMUNAL.VO.ExcelWGJCF;
- import QCM.COMMUNAL.VO.ExcelWGJCXN;
- import QCM.COMMUNAL.VO.ExcelWGJMain;
- import java.text.SimpleDateFormat;
- import java.util.ArrayList;
- import java.util.Date;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- import org.apache.ibatis.session.ExecutorType;
- import org.apache.ibatis.session.SqlSession;
-
- public class ExcelModelListener extends AnalysisEventListener<ExcelWGJ> {
- private String opman;
- public ExcelModelListener(String opman){
- this.opman = opman;
- }
- private static final int BATCH_COUNT = 1000;
- List<ExcelWGJ> list = new ArrayList<ExcelWGJ>();
- List<ExcelWGJMain> list1 = new ArrayList<ExcelWGJMain>();
- List<ExcelWGJCXN> list2 = new ArrayList<ExcelWGJCXN>();
- List<ExcelWGJCF> list3 = new ArrayList<ExcelWGJCF>();
- List<ExcelWGJCF> list4 = new ArrayList<ExcelWGJCF>();
- //Map<String,Integer> map = new HashMap<>();
- private static int count = 1;
- @Override
- public void invoke(ExcelWGJ data, AnalysisContext context) {
- list.add(data);
- count ++;
- if (list.size() >= BATCH_COUNT) {
- saveData();
- list.clear();
- }
- }
-
- @Override
- public void doAfterAllAnalysed(AnalysisContext context) {
- saveData();
- list.clear();
- }
-
- private CoreReturnObject saveData() {
- int i = 0;
- int count=0;
- int index = 0;
- SimpleDateFormat sdf=new SimpleDateFormat("yy");
- String date=sdf.format(new Date());
- CoreReturnObject cro = new CoreReturnObject();
- SqlSession SqlSession = QCM.COMMUNAL.SqlSessionBuilder.openSqlSession();
- OrderSqMapper mapper = SqlSession.getMapper(QCM.COMMUNAL.OrderSqMapper.class);
- try{
- for(ExcelWGJ excelWGJ :list){
- count = Integer.parseInt(mapper.queryMaxXuHao());
- index = Integer.parseInt(excelWGJ.getCoil_no());
- /*if(!("".equals(excelWGJ.getKlqd())||null==excelWGJ.getKlqd())){
- ExcelWGJCXN ewxn = new ExcelWGJCXN();
- ewxn.setSpecimen_no(excelWGJ.getOld_sampl_no());
- ewxn.setPhy_name_s("抗拉强度");
- ewxn.setVal1(excelWGJ.getKlqd());
- //mapper.insertExcelWGJCXN(ewxn);
- list2.add(ewxn);
- }
- if(!("".equals(excelWGJ.getQfqd())||null==excelWGJ.getQfqd())){
- ExcelWGJCXN ewxn = new ExcelWGJCXN();
- ewxn.setSpecimen_no(excelWGJ.getOld_sampl_no());
- ewxn.setPhy_name_s("屈服强度");
- ewxn.setVal1(excelWGJ.getQfqd());
- //mapper.insertExcelWGJCXN(ewxn);
- list2.add(ewxn);
- }
- if(!("".equals(excelWGJ.getDhscl())||null==excelWGJ.getDhscl())){
- ExcelWGJCXN ewxn = new ExcelWGJCXN();
- ewxn.setSpecimen_no(excelWGJ.getOld_sampl_no());
- ewxn.setPhy_name_s("断后伸长率");
- ewxn.setVal1(excelWGJ.getDhscl());
- //mapper.insertExcelWGJCXN(ewxn);
- list2.add(ewxn);
- }*/
- if(excelWGJ.getCoil_no()!=""||excelWGJ.getCoil_no()!=null){
- ExcelWGJCXN ewxn = new ExcelWGJCXN();
- ewxn.setCoil_no("R"+date+String.format("%06d", count+index)+"W010");
- ewxn.setQfqd(excelWGJ.getQfqd());
- ewxn.setKlqd(excelWGJ.getKlqd());
- ewxn.setDhscl(excelWGJ.getDhscl());
- list2.add(ewxn);
- }
- /*if(!("".equals(excelWGJ.getCharge_no())||null==excelWGJ.getCharge_no())
- &&map.containsKey(excelWGJ.getCharge_no())==false){*/
- //if(mapper.haswgjcf("R"+date+String.format("%06d", count+index)+"W")<1){
- if(!("".equals(excelWGJ.getC())||null==excelWGJ.getC())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("C");
- ewcf.setChem_name("C");
- ewcf.setChem_value(excelWGJ.getC());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("C");
- ewcf1.setChem_value(excelWGJ.getC());
- ewcf1.setChem_value(excelWGJ.getC());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getB())||null==excelWGJ.getB())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("B");
- ewcf.setChem_name("B");
- ewcf.setChem_value(excelWGJ.getB());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("B");
- ewcf1.setChem_value(excelWGJ.getB());
- ewcf1.setChem_value(excelWGJ.getB());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getAls())||null==excelWGJ.getAls())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("Als");
- ewcf.setChem_name("Als");
- ewcf.setChem_value(excelWGJ.getAls());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("Als");
- ewcf1.setChem_value(excelWGJ.getAls());
- ewcf1.setChem_value(excelWGJ.getAls());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getAlt())||null==excelWGJ.getAlt())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("Alt");
- ewcf.setChem_name("Alt");
- ewcf.setChem_value(excelWGJ.getAlt());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("Alt");
- ewcf1.setChem_value(excelWGJ.getAlt());
- ewcf1.setChem_value(excelWGJ.getAlt());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getAs())||null==excelWGJ.getAs())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("As");
- ewcf.setChem_name("As");
- ewcf.setChem_value(excelWGJ.getAs());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("As");
- ewcf1.setChem_value(excelWGJ.getAs());
- ewcf1.setChem_value(excelWGJ.getAs());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getMo())||null==excelWGJ.getMo())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("Mo");
- ewcf.setChem_name("Mo");
- ewcf.setChem_value(excelWGJ.getMo());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("Mo");
- ewcf1.setChem_value(excelWGJ.getMo());
- ewcf1.setChem_value(excelWGJ.getMo());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getMn())||null==excelWGJ.getMn())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("Mn");
- ewcf.setChem_name("Mn");
- ewcf.setChem_value(excelWGJ.getMn());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("Mn");
- ewcf1.setChem_value(excelWGJ.getMn());
- ewcf1.setChem_value(excelWGJ.getMn());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getS())||null==excelWGJ.getS())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("S");
- ewcf.setChem_name("S");
- ewcf.setChem_value(excelWGJ.getS());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("S");
- ewcf1.setChem_value(excelWGJ.getS());
- ewcf1.setChem_value(excelWGJ.getS());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getP())||null==excelWGJ.getP())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("P");
- ewcf.setChem_name("P");
- ewcf.setChem_value(excelWGJ.getP());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("P");
- ewcf1.setChem_value(excelWGJ.getP());
- ewcf1.setChem_value(excelWGJ.getP());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getSi())||null==excelWGJ.getSi())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("Si");
- ewcf.setChem_name("Si");
- ewcf.setChem_value(excelWGJ.getSi());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("Si");
- ewcf1.setChem_value(excelWGJ.getSi());
- ewcf1.setChem_value(excelWGJ.getSi());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getCr())||null==excelWGJ.getCr())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("Cr");
- ewcf.setChem_name("Cr");
- ewcf.setChem_value(excelWGJ.getCr());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("Cr");
- ewcf1.setChem_value(excelWGJ.getCr());
- ewcf1.setChem_value(excelWGJ.getCr());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getNi())||null==excelWGJ.getNi())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("Ni");
- ewcf.setChem_name("Ni");
- ewcf.setChem_value(excelWGJ.getNi());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("Ni");
- ewcf1.setChem_value(excelWGJ.getNi());
- ewcf1.setChem_value(excelWGJ.getNi());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getCu())||null==excelWGJ.getCu())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("Cu");
- ewcf.setChem_name("Cu");
- ewcf.setChem_value(excelWGJ.getCu());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("Cu");
- ewcf1.setChem_value(excelWGJ.getCu());
- ewcf1.setChem_value(excelWGJ.getCu());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getV())||null==excelWGJ.getV())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("V");
- ewcf.setChem_name("V");
- ewcf.setChem_value(excelWGJ.getV());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("V");
- ewcf1.setChem_value(excelWGJ.getV());
- ewcf1.setChem_value(excelWGJ.getV());
- list4.add(ewcf1);
- }
- if(!("".equals(excelWGJ.getTi())||null==excelWGJ.getTi())){
- ExcelWGJCF ewcf = new ExcelWGJCF();
- ewcf.setBatch_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setAssay_no("R"+date+String.format("%06d", count+index)+"W"+"CP-2");
- ewcf.setMaterial_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setHeat_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf.setChem_cd("Ti");
- ewcf.setChem_name("Ti");
- ewcf.setChem_value(excelWGJ.getTi());
- ewcf.setCreate_name(opman);
- //mapper.insertExcelWGJCF(ewcf);
- list3.add(ewcf);
- ExcelWGJCF ewcf1 = new ExcelWGJCF();
- ewcf1.setCharge_no("R"+date+String.format("%06d", count+index)+"W");
- ewcf1.setChem_cd("Ti");
- ewcf1.setChem_value(excelWGJ.getTi());
- ewcf1.setChem_value(excelWGJ.getTi());
- list4.add(ewcf1);
- }
- //map.put(excelWGJ.getCharge_no(), 1);
-
- //if("PRC".equals(excelWGJ.getCur_prog_cd())){
- if(mapper.haswgjcoil_no(excelWGJ.getCoil_no())<1){
- ExcelWGJMain ewm = new ExcelWGJMain();
- //count = Integer.parseInt(mapper.queryMaxXuHao());
- //index = Integer.parseInt(excelWGJ.getCoil_no());
- ewm.setSpec_stl_grd(excelWGJ.getSpec_stl_grd());
- ewm.setStl_grd(excelWGJ.getSpec_stl_grd());
- ewm.setSpec_abbsym(excelWGJ.getSpec_abbsym());
- ewm.setSlab_no(excelWGJ.getSlab_no());
- ewm.setOrd_fl(excelWGJ.getOrd_fl());
- ewm.setOld_sampl_no("R"+date+String.format("%06d", count+index)+"W010");
- ewm.setCur_prog_cd(excelWGJ.getCur_prog_cd());
- ewm.setCoil_wth(excelWGJ.getCoil_wth());
- ewm.setCoil_thk(excelWGJ.getCoil_thk());
- //ewm.setCoil_stat(String.valueOf(excelWGJ.getCoil_stat()));
- ewm.setCoil_outdia(excelWGJ.getCoil_outdia());
- ewm.setCoil_no("R"+date+String.format("%06d", count+index)+"W010");
- ewm.setCoil_len(excelWGJ.getCoil_len());
- ewm.setCoil_india(excelWGJ.getCoil_india());
- ewm.setAct_wgt(excelWGJ.getAct_wgt());
- //mapper.insertExcelWGJMain(ewm);
- list1.add(ewm);
- }
-
- i++;
- if(i > 0 && i%30==0){
- if(list1.size()!=0)
- mapper.insertExcelWGJMain(list1);
- if(list3.size()!=0)
- mapper.insertExcelWGJCF(list3);
- mapper.insertExcelWGJCF1(list4);
- if(list2.size()!=0)
- mapper.insertExcelWGJCXN(list2);
- SqlSession.commit();
- list1 = new ArrayList<ExcelWGJMain>();
- list2 = new ArrayList<ExcelWGJCXN>();
- list3 = new ArrayList<ExcelWGJCF>();
- }
- }
- }catch(Exception e){
- e.printStackTrace();
- SqlSession.rollback();
- SqlSession.close();
- }finally{
- if(list1.size()!=0)
- mapper.insertExcelWGJMain(list1);
- if(list3.size()!=0)
- mapper.insertExcelWGJCF(list3);
- mapper.insertExcelWGJCF1(list4);
- if(list2.size()!=0)
- mapper.insertExcelWGJCXN(list2);
- SqlSession.commit();
- }
- SqlSession.close();
- cro.setV_errCode(1);
- return cro;
- }
- }
|