xs vor 5 Jahren
Ursprung
Commit
a427f7b3a7

+ 9 - 0
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/entity/ErpCredit.java

@@ -31,9 +31,18 @@ public class ErpCredit extends DataEntity<ErpCredit>{
     private Double tenKvItsLine;//10kv线路
     private Double tenKvItesFhvFollow;//400v以下
     private String supplierName;//供应商名称
+    private String status;//状态
     private List<ErpCreditEquipment> erpCreditChild1s = new ArrayList<ErpCreditEquipment>();
     private List<ErpCreditMaterial> erpCreditChild2s = new ArrayList<ErpCreditMaterial>();
 
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
     public static long getSerialVersionUID() {
         return serialVersionUID;
     }

+ 31 - 0
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/entity/ErpJudge.java

@@ -0,0 +1,31 @@
+package com.jeeplus.modules.sg.financial.erpcredit.entity;
+
+public class ErpJudge {
+    private String itemId;
+    private String mainFlag;
+    private String infoFlag;
+
+    public String getItemId() {
+        return itemId;
+    }
+
+    public void setItemId(String itemId) {
+        this.itemId = itemId;
+    }
+
+    public String getMainFlag() {
+        return mainFlag;
+    }
+
+    public void setMainFlag(String mainFlag) {
+        this.mainFlag = mainFlag;
+    }
+
+    public String getInfoFlag() {
+        return infoFlag;
+    }
+
+    public void setInfoFlag(String infoFlag) {
+        this.infoFlag = infoFlag;
+    }
+}

+ 10 - 4
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/mapper/xml/ErpCreditMapper.xml

@@ -31,7 +31,8 @@
 		a.tenkv_its_line As "tenKvItsLine",
 		a.tenkv_ites_fhv_follow As "tenKvItesFhvFollow",
 		a.the_input_tax As "theInputTax",
-		a.ten_supplier_name As "supplierName"
+		a.ten_supplier_name As "supplierName",
+		a.status As "status"
 	</sql>
 
 	<select id="get" resultType="ErpCredit" >
@@ -51,6 +52,9 @@
 			<if test="itemId != null and itemId != ''">
 				AND a.item_id = #{itemId}
 			</if>
+			<if test="status!=null and status !=''">
+				AND a.status = #{status}
+			</if>
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -110,7 +114,8 @@
 			tenkv_its_line,
 			tenkv_ites_fhv_follow,
 			the_input_tax,
-			ten_supplier_name
+			ten_supplier_name,
+			status
 		) VALUES (
 			#{id},
 			#{createBy.id},
@@ -140,7 +145,8 @@
     		#{tenKvItsLine},
     		#{tenKvItesFhvFollow},
     		#{theInputTax},
-    		#{supplierName}
+    		#{supplierName},
+    		#{status}
 		)
 	</insert>
 
@@ -200,7 +206,7 @@
 		<include refid="erpColumns"/>
 		FROM js_erp_credit a
 		WHERE a.del_flag = '0'
-		and a.id in
+		and a.item_id in
 		<if test="list !=null">
 			<foreach collection="list" index="index" item="item" open="("
 					 separator="," close=")">

+ 141 - 86
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/service/ErpCreditService.java

@@ -13,10 +13,12 @@ import com.jeeplus.modules.sg.financial.erpcredit.entity.*;
 import com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditEquipmentMapper;
 import com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditMapper;
 import com.jeeplus.modules.sg.financial.erpcredit.mapper.ErpCreditMaterialMapper;
+import com.jeeplus.modules.sg.financial.erpcredit.util.ErpInfo;
 import com.jeeplus.modules.sg.financial.erpcredit.util.ExportTemplate;
 import com.jeeplus.modules.sg.financial.erpcredit.util.ExportUtil2;
 import com.jeeplus.modules.sg.financial.settlement.entity.MaintainData;
 import com.jeeplus.modules.sg.financial.settlement.mapper.DataMaintenanceMapper;
+import com.jeeplus.modules.sg.financial.settlement.service.DataMaintenanceService;
 import org.apache.poi.hssf.usermodel.HSSFFont;
 import org.apache.poi.xssf.usermodel.XSSFFont;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
@@ -45,12 +47,17 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
     private ErpCreditMapper erpCreditMapper;
     @Autowired
     private DataMaintenanceMapper dataMaintenanceMapper;
-
     @Autowired
     private InformationService informationService;
+    @Autowired
+    private DataMaintenanceService dataMaintenanceService;
 
-    public List<ErpCredit> getListErpCredit(List<String> strings){
-        List<ErpCredit> erpCreditList = erpCreditMapper.findErpCreditList(strings);
+    public List<ErpCredit> getListErpCredit(List<String> itemId){
+        List<ErpCredit> erpCreditList = erpCreditMapper.findErpCreditList(itemId);
+        List<String> strings = new ArrayList<String>();
+        for (ErpCredit erpCredit:erpCreditList){
+            strings.add(erpCredit.getId());
+        }
         List<ErpCreditEquipment> erpCreditChild1List = erpCreditEquipmentMapper.findErpCreditChild1List(strings);
         List<ErpCreditMaterial> erpCreditChild2List = erpCreditMaterialMapper.findErpCreditChild2List(strings);
         if (null!=erpCreditList&&erpCreditList.size()>0){
@@ -90,7 +97,8 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
     }
 
     @Transactional(readOnly = false)
-    public void save(ErpCredit erpCredit) {
+    public void save(ErpCredit erpCredit,String string) {
+        erpCredit.setStatus(string);
         super.save(erpCredit);
         for (ErpCreditEquipment erpCreditChild1 : erpCredit.getErpCreditChild1s()){
             if (ErpCreditEquipment.DEL_FLAG_NORMAL.equals(erpCredit.getDelFlag())){
@@ -146,17 +154,21 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
 
     //维护表
     public List<MaintainData> getFindListMain(List<String> strings){
-        return dataMaintenanceMapper.findListMain(strings);
+        return dataMaintenanceMapper.findListMain();
     }
 
     //导出
-    public void getExport(List<String> strings, HttpServletResponse response){
-        List<String> str = new ArrayList<String>();
-        List<ErpCredit> erpCreditList = getListErpCredit(strings);
+    public void getExport(String ids, HttpServletResponse response){
+        String[] strings = ids.split(",");
+        List<String> strs = new ArrayList<String>();
+        for (String str:strings){
+            strs.add(str);
+        }
+        List<ErpCredit> erpCreditList = getListErpCredit(strs);
         for (ErpCredit erpCredit:erpCreditList){
-            str.add(erpCredit.getItemId());
+            System.out.println(erpCredit.getId());
         }
-        List<MaintainData> maintainDatas = getFindListMain(str);
+        List<MaintainData> maintainDatas = getFindListMain(strs);
         ExportTemplate exportTemplate = new ExportTemplate();
         File newFile = exportTemplate.createNewFile();
         // 新文件写入数据,并下载
@@ -235,92 +247,135 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
         // this.deleteFile(newFile);
     }
 
-    /**
-     * 判断
-     * @return
-     */
-    public List getCheck(String ids){
-        List<String> lists = new ArrayList<String>();
-        Map<String,String> map = new HashMap<String, String>();
-        List<String> itemIdList = new ArrayList<String>();
-        List<String> sortList = null;
-        List<String> sortList2=null;
-        boolean flag = false;
-        String[] idArray =ids.split(",");
-        for (String str:idArray){ lists.add(str); }
-        List<ErpCredit> erpCreditList = getListErpCredit(lists);
-        for (ErpCredit erpCredit:erpCreditList){
-            map.put(erpCredit.getId(),erpCredit.getItemId());
-            itemIdList.add(erpCredit.getItemId());
+    public List<ErpJudge> getCheck1(List<ErpCredit> erpCredits){
+        List<ErpJudge> erpJudges = new ArrayList<>();
+        ErpJudge erpJudge = null;
+        Map<String,List> map = new  HashMap<String,List>();
+        List<String> strings = new ArrayList<String>();
+        for (ErpCredit erpCredit:erpCredits){
+            strings.add(erpCredit.getItemId());
         }
-        List<MaintainData> maintainDatas =getFindListMain(itemIdList);//维护数据集合
-        List<Information> informationList = informationService.findNoFinishList(itemIdList);
+        List<Information> informationList = informationService.findNoFinishList(strings);
+        List<String> maintainDataList = dataMaintenanceService.getJudge(strings);
         if (null!=informationList&&informationList.size()>0){
-            sortList = new ArrayList<String>();
-            sortList2=new ArrayList<String>();
-            for (String list2:itemIdList) {
-                for(Information information:informationList){
-                    if (information.getProjectId().equals(list2)){
-                        sortList.add(list2);
-                        break;
-                    }
-                }
-            }
-            for(Map.Entry<String, String> entry : map.entrySet()){
-                String mapKey = entry.getKey();
-                String mapValue = entry.getValue();
-                for (String str : sortList){
-                    if (mapValue.equals(str)){
-                        sortList2.add(mapKey);
-                    }
-                }
-            }
-            for (int i = 0; i < lists.size(); i++) {
-                for (String str2:sortList2){
-                    if (str2.equals(lists.get(i))){
-                        lists.remove(i);
-                        i--;
-                        break;
-                    }
-                }
+            for (Information information:informationList){
+                erpJudge=new ErpJudge();
+                erpJudge.setItemId(information.getProjectId());
+                erpJudge.setMainFlag("有");
+                erpJudge.setInfoFlag("否");
             }
+            erpJudges.add(erpJudge);
         }
-        if (null!=maintainDatas&&maintainDatas.size()>0){
-            sortList = new ArrayList<String>();
-            sortList2 = new ArrayList<String>();
-            for (MaintainData maintainData:maintainDatas){
-               for (String str3:itemIdList){
-                   if (maintainData.getProjectId().equals(str3)){
-                       sortList.add(str3);//有数据
-                       break;
-                   }
-               }
-            }
-            for(Map.Entry<String, String> entry : map.entrySet()){
-                String mapKey1 = entry.getKey();
-                String mapValue1 = entry.getValue();
-                for (String str4: sortList){
-                    if (mapValue1.equals(str4)){
-                        sortList2.add(mapKey1);
-                    }
-                }
-            }
-            for (int i = 0; i < lists.size(); i++) {
-                flag = true;
-                for (String str2:sortList2){
-                    if (str2.equals(lists.get(i))){
-                        flag=false;
-                        break;
+        if (null!=maintainDataList&&maintainDataList.size()>0){
+            Boolean flag = true;
+            for (String maintain:maintainDataList){
+                flag=true;
+                if (null!=informationList&&informationList.size()>0){
+                    for (ErpJudge erpJudge1:erpJudges){
+                       if (erpJudge1.getItemId().equals(maintain)){
+                           erpJudge1.setMainFlag("无");
+                           flag = false;
+                           break;
+                       }
                     }
                 }
                 if (flag){
-                    lists.remove(i);
-                    i--;
+                    erpJudge=new ErpJudge();
+                    erpJudge.setItemId(maintain);
+                    erpJudge.setMainFlag("无");
+                    erpJudge.setInfoFlag("是");
+                    erpJudges.add(erpJudge);
                 }
             }
-        }else {
-            lists=null;
         }
+        return erpJudges;
+    }
+    /**
+     * 判断
+     * @return
+     */
+    public List getCheck(String ids){
+        List<String> lists = new ArrayList<String>();
+//        Map<String,String> map = new HashMap<String, String>();
+//        List<String> itemIdList = new ArrayList<String>();
+//        List<String> sortList = null;
+//        List<String> sortList2=null;
+//        boolean flag = false;
+        String[] idArray =ids.split(",");
+        for (String str:idArray){ lists.add(str); }
+//        List<ErpCredit> erpCreditList = getListErpCredit(lists);
+//        for (ErpCredit erpCredit:erpCreditList){
+//            map.put(erpCredit.getId(),erpCredit.getItemId());
+//            itemIdList.add(erpCredit.getItemId());
+//        }
+//        List<MaintainData> maintainDatas =getFindListMain(itemIdList);//维护数据集合
+//        List<Information> informationList = informationService.findNoFinishList(itemIdList);
+//        if (null!=informationList&&informationList.size()>0){
+//            sortList = new ArrayList<String>();
+//            sortList2=new ArrayList<String>();
+//            for (String list2:itemIdList) {
+//                for(Information information:informationList){
+//                    if (information.getProjectId().equals(list2)){
+//                        sortList.add(list2);
+//                        break;
+//                    }
+//                }
+//            }
+//            for(Map.Entry<String, String> entry : map.entrySet()){
+//                String mapKey = entry.getKey();
+//                String mapValue = entry.getValue();
+//                for (String str : sortList){
+//                    if (mapValue.equals(str)){
+//                        sortList2.add(mapKey);
+//                    }
+//                }
+//            }
+//            for (int i = 0; i < lists.size(); i++) {
+//                for (String str2:sortList2){
+//                    if (str2.equals(lists.get(i))){
+//                        lists.remove(i);
+//                        i--;
+//                        break;
+//                    }
+//                }
+//            }
+//        }
+//        if (null!=maintainDatas&&maintainDatas.size()>0){
+//            sortList = new ArrayList<String>();
+//            sortList2 = new ArrayList<String>();
+//            for (MaintainData maintainData:maintainDatas){
+//               for (String str3:itemIdList){
+//                   if (maintainData.getProjectId().equals(str3)){
+//                       sortList.add(str3);//有数据
+//                       break;
+//                   }
+//               }
+//            }
+//            for(Map.Entry<String, String> entry : map.entrySet()){
+//                String mapKey1 = entry.getKey();
+//                String mapValue1 = entry.getValue();
+//                for (String str4: sortList){
+//                    if (mapValue1.equals(str4)){
+//                        sortList2.add(mapKey1);
+//                    }
+//                }
+//            }
+//            for (int i = 0; i < lists.size(); i++) {
+//                flag = true;
+//                for (String str2:sortList2){
+//                    if (str2.equals(lists.get(i))){
+//                        flag=false;
+//                        break;
+//                    }
+//                }
+//                if (flag){
+//                    lists.remove(i);
+//                    i--;
+//                }
+//            }
+//        }else {
+//            lists=null;
+//        }
         return lists;
     }
 }

+ 9 - 0
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ErpInfo.java

@@ -6,6 +6,7 @@ import org.apache.poi.ss.usermodel.Row;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.UUID;
 
 public  class ErpInfo {
     public final static String CON_PROJECT = "工程成本";
@@ -611,4 +612,12 @@ public  class ErpInfo {
         }
         return creditListChild2;
     }
+    public static String getStatus(){
+        int machineId = 1;
+        int hashCodeV = UUID.randomUUID().toString().hashCode();
+        if (hashCodeV<0){
+            hashCodeV=-hashCodeV;
+        }
+        return  (machineId+String.format("%015d",hashCodeV));
+    }
 }

+ 12 - 11
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ExportUtil1.java

@@ -135,6 +135,7 @@ public class ExportUtil1 {
      * @return
      */
     public static ScheduleOther getScheduleOfOtherExpenses(List<ErpCredit> erpCreditList,List<MaintainData> maintainDataList){
+        DecimalFormat decimalFormat   = new DecimalFormat("#0.00");
         ScheduleOther scheduleOther = new ScheduleOther();
         Double requisitionSite=0.0;//建设场地征用及清理费
         Double  compensationAcquisition=0.0;//土地征用补偿费
@@ -162,8 +163,8 @@ public class ExportUtil1 {
                 cleaningFees+=maintainData.getDamages();//清理费
                 preWorkingFee+=maintainData.getPreliminaryWorkFee();//项目前期工作费
             }
-            scheduleOther.setCleaningFees(String.valueOf(cleaningFees));
-            scheduleOther.setPreWorkingFee(String.valueOf(preparationFee));
+            scheduleOther.setCleaningFees(decimalFormat.format(cleaningFees));
+            scheduleOther.setPreWorkingFee(decimalFormat.format(preparationFee));
         }
         if (null!=erpCreditList&&erpCreditList.size()>0){
             for (ErpCredit erpCredit:erpCreditList){
@@ -197,15 +198,15 @@ public class ExportUtil1 {
         requisitionSite=compensationAcquisition+compensateFee;
         //合计
         totalFee=requisitionSite+managementFee+technicalFee+inspectionFee+preparationFee+basicFee+reserveFee;
-        scheduleOther.setCompensateFee(String.valueOf(compensateFee));//土地征用补偿费
-        scheduleOther.setItemManageFee(String.valueOf(itemManageFee));//项目管理经费
-        scheduleOther.setSupervisionFee(String.valueOf(supervisionFee));//工程监理费
-        scheduleOther.setDesignFee(String.valueOf(designFee));//工程设计费
-        scheduleOther.setReserveFee(String.valueOf(reserveFee));//资本化利息
-        scheduleOther.setTechnicalFee(String.valueOf(technicalFee));//项目设计技术服务费
-        scheduleOther.setManagementFee(String.valueOf(managementFee));//项目建设管理费
-        scheduleOther.setRequisitionSite(String.valueOf(requisitionSite));//建设场地征用费
-        scheduleOther.setTotalFee(String.valueOf(totalFee));//合计
+        scheduleOther.setCompensateFee(decimalFormat.format(compensateFee));//土地征用补偿费
+        scheduleOther.setItemManageFee(decimalFormat.format(itemManageFee));//项目管理经费
+        scheduleOther.setSupervisionFee(decimalFormat.format(supervisionFee));//工程监理费
+        scheduleOther.setDesignFee(decimalFormat.format(designFee));//工程设计费
+        scheduleOther.setReserveFee(decimalFormat.format(reserveFee));//资本化利息
+        scheduleOther.setTechnicalFee(decimalFormat.format(technicalFee));//项目设计技术服务费
+        scheduleOther.setManagementFee(decimalFormat.format(managementFee));//项目建设管理费
+        scheduleOther.setRequisitionSite(decimalFormat.format(requisitionSite));//建设场地征用费
+        scheduleOther.setTotalFee(decimalFormat.format(totalFee));//合计
         return scheduleOther;
     }
 

+ 2 - 5
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/ExportUtil2.java

@@ -24,7 +24,7 @@ public class ExportUtil2 {
             XSSFRow row = (XSSFRow) sheet.getRow(0);
             XSSFCell cell = row.getCell(3);
             List<Schedule> scheduleList = ExportUtil1.getScheduleList(erpCredits, maintainDataList);
-            for (int i = 0; i <scheduleList.size(); i++) {
+            for (int i = 0; i <10; i++) {
                 schedule = scheduleList.get(i);
                 row=(XSSFRow)sheet.getRow(i+6);
                 cell=row.getCell(0);
@@ -297,10 +297,7 @@ public class ExportUtil2 {
             XSSFCell cell = row.getCell(0);
             TransferOfPower2 transferOfPower2 = null;
             List<TransferOfPower2> transferOfPower2s = ExportUtil1.getTransferOfPower2(erpCredits);
-            for (TransferOfPower2 transferOfPower21:transferOfPower2s){
-                System.out.println(transferOfPower21);
-            }
-            for (int i = 0; i < transferOfPower2s.size(); i++) {
+            for (int i = 0; i <transferOfPower2s.size(); i++) {
                 transferOfPower2=transferOfPower2s.get(i);
                 row = (XSSFRow) sheet.getRow((int)i+5);
                 cell=row.getCell(0);

+ 81 - 0
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/Result.java

@@ -0,0 +1,81 @@
+package com.jeeplus.modules.sg.financial.erpcredit.util;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.jeeplus.core.mapper.JsonMapper;
+
+import java.util.LinkedHashMap;
+
+public class Result {
+    private boolean success = true;// 是否成功
+    private String errorCode = "-1";//错误代码
+    private String msg = "操作成功";// 提示信息
+    private String list= "";
+    private boolean flag = false;
+
+    public boolean isFlag() {
+        return flag;
+    }
+
+    public void setFlag(boolean flag) {
+        this.flag = flag;
+    }
+
+    public String getList() {
+        return list;
+    }
+
+    public void setList(String list) {
+        this.list = list;
+    }
+
+    private LinkedHashMap<String, Object> body = new LinkedHashMap<String, Object>();//封装json的map
+
+    public LinkedHashMap<String, Object> getBody() {
+        return body;
+    }
+
+    public void setBody(LinkedHashMap<String, Object> body) {
+        this.body = body;
+    }
+
+    public void put(String key, Object value){//向json中添加属性,在js中访问,请调用data.map.key
+        body.put(key, value);
+    }
+
+    public void remove(String key){
+        body.remove(key);
+    }
+
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {//向json中添加属性,在js中访问,请调用data.msg
+        this.msg = msg;
+    }
+
+
+    public boolean isSuccess() {
+        return success;
+    }
+
+    public void setSuccess(boolean success) {
+        this.success = success;
+    }
+
+    @JsonIgnore//返回对象时忽略此属性
+    public String getJsonStr() {//返回json字符串数组,将访问msg和key的方式统一化,都使用data.key的方式直接访问。
+
+        String json = JsonMapper.getInstance().toJson(this);
+        return json;
+    }
+
+    public void setErrorCode(String errorCode) {
+        this.errorCode = errorCode;
+    }
+
+    public String getErrorCode() {
+        return errorCode;
+    }
+}

+ 13 - 4
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/util/Test.java

@@ -10,11 +10,10 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.net.URLEncoder;
+import java.text.DateFormat;
 import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 public class Test {
     public void getTest() {
@@ -156,4 +155,14 @@ public class Test {
         // 删除创建的新文件
         // this.deleteFile(newFile);
     }
+    @org.junit.Test
+    public void getTest5(){
+         int machineId = 1;
+         int hashCodeV = UUID.randomUUID().toString().hashCode();
+         if (hashCodeV<0){
+             hashCodeV=-hashCodeV;
+          }
+            System.out.println(machineId+String.format("%010d",hashCodeV));
+
+    }
 }

+ 69 - 18
src/main/java/com/jeeplus/modules/sg/financial/erpcredit/web/ErpCreditController.java

@@ -13,18 +13,17 @@ import com.jeeplus.modules.sg.audit.information.entity.Information;
 import com.jeeplus.modules.sg.audit.information.service.InformationService;
 import com.jeeplus.modules.sg.financial.erpcredit.entity.*;
 import com.jeeplus.modules.sg.financial.erpcredit.service.ErpCreditService;
-import com.jeeplus.modules.sg.financial.erpcredit.util.ErpInfo;
-import com.jeeplus.modules.sg.financial.erpcredit.util.ExportTemplate;
-import com.jeeplus.modules.sg.financial.erpcredit.util.ExportUtil2;
-import com.jeeplus.modules.sg.financial.erpcredit.util.ImportUtil;
+import com.jeeplus.modules.sg.financial.erpcredit.util.*;
 import com.jeeplus.modules.sg.financial.settlement.entity.MaintainData;
 import com.jeeplus.modules.sg.financial.settlement.service.DataMaintenanceService;
+import groovy.util.IFileNameFinder;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.apache.poi.xssf.usermodel.XSSFCell;
 import org.apache.poi.xssf.usermodel.XSSFRow;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpRequest;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.ModelAttribute;
@@ -35,10 +34,13 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
 import javax.validation.ConstraintViolationException;
 import java.io.*;
+import java.net.URLDecoder;
 import java.net.URLEncoder;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -81,7 +83,13 @@ public class ErpCreditController extends BaseController {
 //	@RequiresPermissions("sg:financial:erpCredit:list")
 	@RequestMapping(value = "data")
 	public Map<String, Object> data(ErpCredit erpCredit, HttpServletRequest request, HttpServletResponse response, Model model) {
-		Page<ErpCredit> page = erpCreditService.findPage(new Page<ErpCredit>(request, response), erpCredit);
+		HttpSession session = request.getSession();
+		String attribute = (String) session.getAttribute("erpStatus");
+		Page<ErpCredit> page = null;
+		if (attribute!=null){
+			erpCredit.setStatus(attribute);
+			page = erpCreditService.findPage(new Page<ErpCredit>(request, response), erpCredit);
+		}
 		return getBootstrapData(page);
 	}
 
@@ -95,6 +103,34 @@ public class ErpCreditController extends BaseController {
 		return "modules/sg/financial/erp/erpCreditForm";
 	}
 
+	@RequestMapping(value = "tips")
+	public String Tips(String str,Model model, HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException {
+		str = (String)request.getParameter("str");
+		str = URLDecoder.decode(str,"UTF-8");
+		String[] strings2;
+		List<ErpJudge> erpJudges = new ArrayList<ErpJudge>();
+		ErpJudge erpJudge = null;
+		if (str.contains("-")){
+			String[] strings =  str.split("-");
+			for (String str1 :strings){
+				strings2 = str1.split(",");
+				erpJudge = new ErpJudge();
+				erpJudge.setItemId(strings2[0]);
+				erpJudge.setMainFlag(strings2[1]);
+				erpJudge.setInfoFlag(strings2[2]);
+				erpJudges.add(erpJudge);
+			}
+		}else {
+			String[] strings3 = str.split(",");
+			erpJudge = new ErpJudge();
+			erpJudge.setItemId(strings3[0]);
+			erpJudge.setMainFlag(strings3[1]);
+			erpJudge.setInfoFlag(strings3[2]);
+			erpJudges.add(erpJudge);
+		}
+		model.addAttribute("erpList",erpJudges);
+		return "modules/sg/financial/erp/erpCreditTips";
+	}
 	/**
 	 * 保存表单
 	 */
@@ -154,16 +190,11 @@ public class ErpCreditController extends BaseController {
 	@ResponseBody
 //	@RequiresPermissions("sg:financial:erpCredit:export")
 	@RequestMapping(value = "export")
-	public AjaxJson exportFile(String ids, HttpServletRequest request, HttpServletResponse response){
-		AjaxJson j = new AjaxJson();
-		List<String> strings = erpCreditService.getCheck(ids);
-		if (null==strings||strings.size()==0){
-			j.setSuccess(false);
-			j.setMsg("导出失败!失败信息:"+"不符合条件");
-			return j;
-		}
+	public Result exportFile(String ids,HttpServletRequest request, HttpServletResponse response){
+		System.out.println("131231ewqeqwewq"+ids);
+		Result j = new Result();
 		try {
-			erpCreditService.getExport(strings,response);
+			erpCreditService.getExport(ids,response);
 			j.setSuccess(true);
 			j.setMsg("导出成功!");
 		}catch (Exception e){
@@ -183,8 +214,9 @@ public class ErpCreditController extends BaseController {
 	@ResponseBody
 //	@RequiresPermissions("sg:financial:erpCredit:import")
 	@RequestMapping(value = "import")
-	public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request){
-		AjaxJson j = new AjaxJson();
+	public Result importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request,Model model) throws IOException, InvalidFormatException {
+		Result j = new Result();
+		String str = "";
 		try {
 			int successNum = 0;
 			int failureNum = 0;
@@ -192,10 +224,28 @@ public class ErpCreditController extends BaseController {
 			ImportUtil importUtil = new ImportUtil(file, 0, 0);
 			List<ErpAccount> erpAccounts = ErpInfo.getErpAccount(importUtil);//获取表格数据
 			List<ErpCredit> erpCredits = ErpInfo.getAllErpCreditList(erpAccounts);//获取单条数据
+			//判断条件
+			List<ErpJudge> erpJudges  = erpCreditService.getCheck1(erpCredits);
+			if (null!=erpJudges&&erpJudges.size()>0){
+				String judge = "";
+				for (ErpJudge erpJudge:erpJudges){
+					judge = erpJudge.getItemId()+","+erpJudge.getMainFlag()+","+erpJudge.getInfoFlag()+"-";
+				}
+				judge = judge.substring(0,judge.length()-1);
+				j.setList(judge);
+				j.setFlag(true);
+				j.setSuccess(false);
+				return j;
+			}
+			for (ErpCredit erpCredit:erpCredits){
+				str+=erpCredit.getItemId()+",";
+			}
+			str = str.substring(0,str.length()-1);
+			String random = ErpInfo.getStatus();
+			request.getSession().setAttribute("erpStatus",random);
 			for (ErpCredit erpCredit : erpCredits){
-				System.out.println(erpCredit);
 				try{
-					erpCreditService.save(erpCredit);
+					erpCreditService.save(erpCredit,random);
 					successNum++;
 				}catch(ConstraintViolationException ex){
 					failureNum++;
@@ -207,6 +257,7 @@ public class ErpCreditController extends BaseController {
 				failureMsg.insert(0, ",失败 "+failureNum+" 条ERP账户记录。");
 			}
 			j.setMsg( "已成功导入 "+successNum+" 条ERP账户记录"+failureMsg);
+			j.setList(str);
 		} catch (Exception e) {
 			j.setSuccess(false);
 			j.setMsg("导入ERP失败!失败信息:"+e.getMessage());

+ 540 - 0
src/main/java/com/jeeplus/modules/sg/financial/project/Project.java

@@ -0,0 +1,540 @@
+package com.jeeplus.modules.sg.financial.project;
+
+public class Project {
+    private String type;
+    private String demandUnit;//需求提出单位
+    private String bdzName;//变电站名称
+    private String lineName;//线路名称
+    private String requireName;//项目需求名称
+    private String bulidClassificationResons;//建设理由分类
+    private String bulbidResons;//建设理由
+    private String asicEquipment;//设备基本情况
+    private String runTheClass;//运行班
+    private String projectTeam;//项目组
+    private Double costEstimate;//费用估算
+    private String whetherRheUpwind;//是否迎风期度夏项目
+    private String sureDaDate;//确定下达时间
+    private String textRemark;//备注
+    private String powerLine;//停电线路
+    private String itemType;//项目类型
+    private String prowerPagerItem;//是否为停电打包项目
+    private String officeJudgment;//证处初步判断
+    private String includedCivil;//是否含土建
+    private String steelTube;//钢管杆基础类型
+    private String bulidResons;//是否需要规划报批
+    private String equipmentModificationType;//设备改造类型
+    private String changeTheSize;//改造设备尺寸及间隔数
+    private String canBecustomized;//是否可定制设备
+    private String newDeviceName;//是否含新设备命名
+    private String headOperationOf;//是否含变电站新间隔头运
+    private String nonSetElectrical;//是否含非设电电气点电器施工
+    private String automationIncluded;//是否含自动化
+    private String twoOfThree;//二摇或三遥
+    private String phoneStyle;//通信方式
+    private String openCentralizedOr;//柱开集中或就地
+    private String networkCabinet;//环网柜
+    private String rightrOfWayDtu;//站房DTU
+    private String checkHomeWork;//是否需要带带你作业查探
+    private String constructionOfChannel;//施工通道
+    private String canBexpanded;//设备基础是否可以扩容
+    private String fieldEquipmentSize;//现场设备尺寸
+    private String maximumCapacitySize;//最多可狂容尺寸
+    private String programSecurityRisks;//方案安全隐患
+    private String constructionImpact;//是否存在低压或同心县等施工影响
+    private String projectToRepeat;//立项重复
+    private String beenImplemented;//是否已经实施
+    private String transformerNoLoad;//变压器无负荷
+    private String LineConsistency;//线路名称一致性
+    private String quantityConsistent;//工程量是否一致
+    private String dryConsistency;//设备开光干好一致性
+    private String thePlaceType;//证处类型
+    private String precondition;//前置条件
+    private String dtuEmplacement;//DTU安放核查
+    private String dateOfProduction;//核查环网生产日期
+    private String integrationModule;//二次是否集成模块
+    private String ptReplaced;//PT是否需要更换
+    private String overallTransformation;//设备是否有整体改造必要
+
+    @Override
+    public String toString() {
+        return "Project{" +
+                "type='" + type + '\'' +
+                ", demandUnit='" + demandUnit + '\'' +
+                ", bdzName='" + bdzName + '\'' +
+                ", lineName='" + lineName + '\'' +
+                ", requireName='" + requireName + '\'' +
+                ", bulidClassificationResons='" + bulidClassificationResons + '\'' +
+                ", bulbidResons='" + bulbidResons + '\'' +
+                ", asicEquipment='" + asicEquipment + '\'' +
+                ", runTheClass='" + runTheClass + '\'' +
+                ", projectTeam='" + projectTeam + '\'' +
+                ", costEstimate=" + costEstimate +
+                ", whetherRheUpwind='" + whetherRheUpwind + '\'' +
+                ", sureDaDate='" + sureDaDate + '\'' +
+                ", textRemark='" + textRemark + '\'' +
+                ", powerLine='" + powerLine + '\'' +
+                ", itemType='" + itemType + '\'' +
+                ", prowerPagerItem='" + prowerPagerItem + '\'' +
+                ", officeJudgment='" + officeJudgment + '\'' +
+                ", includedCivil='" + includedCivil + '\'' +
+                ", steelTube='" + steelTube + '\'' +
+                ", bulidResons='" + bulidResons + '\'' +
+                ", equipmentModificationType='" + equipmentModificationType + '\'' +
+                ", changeTheSize='" + changeTheSize + '\'' +
+                ", canBecustomized='" + canBecustomized + '\'' +
+                ", newDeviceName='" + newDeviceName + '\'' +
+                ", headOperationOf='" + headOperationOf + '\'' +
+                ", nonSetElectrical='" + nonSetElectrical + '\'' +
+                ", automationIncluded='" + automationIncluded + '\'' +
+                ", twoOfThree='" + twoOfThree + '\'' +
+                ", phoneStyle='" + phoneStyle + '\'' +
+                ", openCentralizedOr='" + openCentralizedOr + '\'' +
+                ", networkCabinet='" + networkCabinet + '\'' +
+                ", rightrOfWayDtu='" + rightrOfWayDtu + '\'' +
+                ", checkHomeWork='" + checkHomeWork + '\'' +
+                ", constructionOfChannel='" + constructionOfChannel + '\'' +
+                ", canBexpanded='" + canBexpanded + '\'' +
+                ", fieldEquipmentSize='" + fieldEquipmentSize + '\'' +
+                ", maximumCapacitySize='" + maximumCapacitySize + '\'' +
+                ", programSecurityRisks='" + programSecurityRisks + '\'' +
+                ", constructionImpact='" + constructionImpact + '\'' +
+                ", projectToRepeat='" + projectToRepeat + '\'' +
+                ", beenImplemented='" + beenImplemented + '\'' +
+                ", transformerNoLoad='" + transformerNoLoad + '\'' +
+                ", LineConsistency='" + LineConsistency + '\'' +
+                ", quantityConsistent='" + quantityConsistent + '\'' +
+                ", dryConsistency='" + dryConsistency + '\'' +
+                ", thePlaceType='" + thePlaceType + '\'' +
+                ", precondition='" + precondition + '\'' +
+                ", dtuEmplacement='" + dtuEmplacement + '\'' +
+                ", dateOfProduction='" + dateOfProduction + '\'' +
+                ", integrationModule='" + integrationModule + '\'' +
+                ", ptReplaced='" + ptReplaced + '\'' +
+                ", overallTransformation='" + overallTransformation + '\'' +
+                '}';
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getDemandUnit() {
+        return demandUnit;
+    }
+
+    public void setDemandUnit(String demandUnit) {
+        this.demandUnit = demandUnit;
+    }
+
+    public String getBdzName() {
+        return bdzName;
+    }
+
+    public void setBdzName(String bdzName) {
+        this.bdzName = bdzName;
+    }
+
+    public String getLineName() {
+        return lineName;
+    }
+
+    public void setLineName(String lineName) {
+        this.lineName = lineName;
+    }
+
+    public String getRequireName() {
+        return requireName;
+    }
+
+    public void setRequireName(String requireName) {
+        this.requireName = requireName;
+    }
+
+    public String getBulidClassificationResons() {
+        return bulidClassificationResons;
+    }
+
+    public void setBulidClassificationResons(String bulidClassificationResons) {
+        this.bulidClassificationResons = bulidClassificationResons;
+    }
+
+    public String getBulbidResons() {
+        return bulbidResons;
+    }
+
+    public void setBulbidResons(String bulbidResons) {
+        this.bulbidResons = bulbidResons;
+    }
+
+    public String getAsicEquipment() {
+        return asicEquipment;
+    }
+
+    public void setAsicEquipment(String asicEquipment) {
+        this.asicEquipment = asicEquipment;
+    }
+
+    public String getRunTheClass() {
+        return runTheClass;
+    }
+
+    public void setRunTheClass(String runTheClass) {
+        this.runTheClass = runTheClass;
+    }
+
+    public String getProjectTeam() {
+        return projectTeam;
+    }
+
+    public void setProjectTeam(String projectTeam) {
+        this.projectTeam = projectTeam;
+    }
+
+    public Double getCostEstimate() {
+        return costEstimate;
+    }
+
+    public void setCostEstimate(Double costEstimate) {
+        this.costEstimate = costEstimate;
+    }
+
+    public String getWhetherRheUpwind() {
+        return whetherRheUpwind;
+    }
+
+    public void setWhetherRheUpwind(String whetherRheUpwind) {
+        this.whetherRheUpwind = whetherRheUpwind;
+    }
+
+    public String getSureDaDate() {
+        return sureDaDate;
+    }
+
+    public void setSureDaDate(String sureDaDate) {
+        this.sureDaDate = sureDaDate;
+    }
+
+    public String getTextRemark() {
+        return textRemark;
+    }
+
+    public void setTextRemark(String textRemark) {
+        this.textRemark = textRemark;
+    }
+
+    public String getPowerLine() {
+        return powerLine;
+    }
+
+    public void setPowerLine(String powerLine) {
+        this.powerLine = powerLine;
+    }
+
+    public String getItemType() {
+        return itemType;
+    }
+
+    public void setItemType(String itemType) {
+        this.itemType = itemType;
+    }
+
+    public String getProwerPagerItem() {
+        return prowerPagerItem;
+    }
+
+    public void setProwerPagerItem(String prowerPagerItem) {
+        this.prowerPagerItem = prowerPagerItem;
+    }
+
+    public String getOfficeJudgment() {
+        return officeJudgment;
+    }
+
+    public void setOfficeJudgment(String officeJudgment) {
+        this.officeJudgment = officeJudgment;
+    }
+
+    public String getIncludedCivil() {
+        return includedCivil;
+    }
+
+    public void setIncludedCivil(String includedCivil) {
+        this.includedCivil = includedCivil;
+    }
+
+    public String getSteelTube() {
+        return steelTube;
+    }
+
+    public void setSteelTube(String steelTube) {
+        this.steelTube = steelTube;
+    }
+
+    public String getBulidResons() {
+        return bulidResons;
+    }
+
+    public void setBulidResons(String bulidResons) {
+        this.bulidResons = bulidResons;
+    }
+
+    public String getEquipmentModificationType() {
+        return equipmentModificationType;
+    }
+
+    public void setEquipmentModificationType(String equipmentModificationType) {
+        this.equipmentModificationType = equipmentModificationType;
+    }
+
+    public String getChangeTheSize() {
+        return changeTheSize;
+    }
+
+    public void setChangeTheSize(String changeTheSize) {
+        this.changeTheSize = changeTheSize;
+    }
+
+    public String getCanBecustomized() {
+        return canBecustomized;
+    }
+
+    public void setCanBecustomized(String canBecustomized) {
+        this.canBecustomized = canBecustomized;
+    }
+
+    public String getNewDeviceName() {
+        return newDeviceName;
+    }
+
+    public void setNewDeviceName(String newDeviceName) {
+        this.newDeviceName = newDeviceName;
+    }
+
+    public String getHeadOperationOf() {
+        return headOperationOf;
+    }
+
+    public void setHeadOperationOf(String headOperationOf) {
+        this.headOperationOf = headOperationOf;
+    }
+
+    public String getNonSetElectrical() {
+        return nonSetElectrical;
+    }
+
+    public void setNonSetElectrical(String nonSetElectrical) {
+        this.nonSetElectrical = nonSetElectrical;
+    }
+
+    public String getAutomationIncluded() {
+        return automationIncluded;
+    }
+
+    public void setAutomationIncluded(String automationIncluded) {
+        this.automationIncluded = automationIncluded;
+    }
+
+    public String getTwoOfThree() {
+        return twoOfThree;
+    }
+
+    public void setTwoOfThree(String twoOfThree) {
+        this.twoOfThree = twoOfThree;
+    }
+
+    public String getPhoneStyle() {
+        return phoneStyle;
+    }
+
+    public void setPhoneStyle(String phoneStyle) {
+        this.phoneStyle = phoneStyle;
+    }
+
+    public String getOpenCentralizedOr() {
+        return openCentralizedOr;
+    }
+
+    public void setOpenCentralizedOr(String openCentralizedOr) {
+        this.openCentralizedOr = openCentralizedOr;
+    }
+
+    public String getNetworkCabinet() {
+        return networkCabinet;
+    }
+
+    public void setNetworkCabinet(String networkCabinet) {
+        this.networkCabinet = networkCabinet;
+    }
+
+    public String getRightrOfWayDtu() {
+        return rightrOfWayDtu;
+    }
+
+    public void setRightrOfWayDtu(String rightrOfWayDtu) {
+        this.rightrOfWayDtu = rightrOfWayDtu;
+    }
+
+    public String getCheckHomeWork() {
+        return checkHomeWork;
+    }
+
+    public void setCheckHomeWork(String checkHomeWork) {
+        this.checkHomeWork = checkHomeWork;
+    }
+
+    public String getConstructionOfChannel() {
+        return constructionOfChannel;
+    }
+
+    public void setConstructionOfChannel(String constructionOfChannel) {
+        this.constructionOfChannel = constructionOfChannel;
+    }
+
+    public String getCanBexpanded() {
+        return canBexpanded;
+    }
+
+    public void setCanBexpanded(String canBexpanded) {
+        this.canBexpanded = canBexpanded;
+    }
+
+    public String getFieldEquipmentSize() {
+        return fieldEquipmentSize;
+    }
+
+    public void setFieldEquipmentSize(String fieldEquipmentSize) {
+        this.fieldEquipmentSize = fieldEquipmentSize;
+    }
+
+    public String getMaximumCapacitySize() {
+        return maximumCapacitySize;
+    }
+
+    public void setMaximumCapacitySize(String maximumCapacitySize) {
+        this.maximumCapacitySize = maximumCapacitySize;
+    }
+
+    public String getProgramSecurityRisks() {
+        return programSecurityRisks;
+    }
+
+    public void setProgramSecurityRisks(String programSecurityRisks) {
+        this.programSecurityRisks = programSecurityRisks;
+    }
+
+    public String getConstructionImpact() {
+        return constructionImpact;
+    }
+
+    public void setConstructionImpact(String constructionImpact) {
+        this.constructionImpact = constructionImpact;
+    }
+
+    public String getProjectToRepeat() {
+        return projectToRepeat;
+    }
+
+    public void setProjectToRepeat(String projectToRepeat) {
+        this.projectToRepeat = projectToRepeat;
+    }
+
+    public String getBeenImplemented() {
+        return beenImplemented;
+    }
+
+    public void setBeenImplemented(String beenImplemented) {
+        this.beenImplemented = beenImplemented;
+    }
+
+    public String getTransformerNoLoad() {
+        return transformerNoLoad;
+    }
+
+    public void setTransformerNoLoad(String transformerNoLoad) {
+        this.transformerNoLoad = transformerNoLoad;
+    }
+
+    public String getLineConsistency() {
+        return LineConsistency;
+    }
+
+    public void setLineConsistency(String lineConsistency) {
+        LineConsistency = lineConsistency;
+    }
+
+    public String getQuantityConsistent() {
+        return quantityConsistent;
+    }
+
+    public void setQuantityConsistent(String quantityConsistent) {
+        this.quantityConsistent = quantityConsistent;
+    }
+
+    public String getDryConsistency() {
+        return dryConsistency;
+    }
+
+    public void setDryConsistency(String dryConsistency) {
+        this.dryConsistency = dryConsistency;
+    }
+
+    public String getThePlaceType() {
+        return thePlaceType;
+    }
+
+    public void setThePlaceType(String thePlaceType) {
+        this.thePlaceType = thePlaceType;
+    }
+
+    public String getPrecondition() {
+        return precondition;
+    }
+
+    public void setPrecondition(String precondition) {
+        this.precondition = precondition;
+    }
+
+    public String getDtuEmplacement() {
+        return dtuEmplacement;
+    }
+
+    public void setDtuEmplacement(String dtuEmplacement) {
+        this.dtuEmplacement = dtuEmplacement;
+    }
+
+    public String getDateOfProduction() {
+        return dateOfProduction;
+    }
+
+    public void setDateOfProduction(String dateOfProduction) {
+        this.dateOfProduction = dateOfProduction;
+    }
+
+    public String getIntegrationModule() {
+        return integrationModule;
+    }
+
+    public void setIntegrationModule(String integrationModule) {
+        this.integrationModule = integrationModule;
+    }
+
+    public String getPtReplaced() {
+        return ptReplaced;
+    }
+
+    public void setPtReplaced(String ptReplaced) {
+        this.ptReplaced = ptReplaced;
+    }
+
+    public String getOverallTransformation() {
+        return overallTransformation;
+    }
+
+    public void setOverallTransformation(String overallTransformation) {
+        this.overallTransformation = overallTransformation;
+    }
+}

+ 1 - 1
src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/DataMaintenanceMapper.java

@@ -15,5 +15,5 @@ import java.util.List;
 public interface DataMaintenanceMapper extends BaseMapper<MaintainData> {
 	int insertList(@Param("list") List<MaintainData> list);
 	void deleteData(String projectId);
-	List<MaintainData> findListMain(List<String> strings);
+	List<MaintainData> findListMain();
 }

+ 0 - 7
src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/xml/DataMaintenanceMapper.xml

@@ -253,12 +253,5 @@
 		<include refid="infoColumns"/>
 		FROM js_maintain_data a
 		WHERE a.del_flag = '0'
-		and a.project_id in
-		<if test="list!=null">
-			<foreach collection="list" index="index" item="item" open="("
-					 separator="," close=")">
-				#{item}
-			</foreach>
-		</if>
 	</select>
 </mapper>

+ 22 - 0
src/main/java/com/jeeplus/modules/sg/financial/settlement/service/DataMaintenanceService.java

@@ -16,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.util.ArrayList;
 import java.util.List;
 
 
@@ -61,6 +62,27 @@ public class DataMaintenanceService extends CrudService<DataMaintenanceMapper, M
         dataMaintenanceMapper.deleteData(projectId);
     }
 
+    //判断erp是否存在
+    public List<String> getJudge(List<String> strings){
+		Boolean flag = false;
+		List<String> list = new ArrayList<>();//定义一个集合
+		List<MaintainData> maintainDatas = dataMaintenanceMapper.findListMain();//得到维护表所有数据
+		if (null!=strings&&strings.size()>0){
+			for (MaintainData maintainData:maintainDatas){
+				flag = true;
+				for (String str:strings){
+					if (maintainData.getProjectId().equals(str)){
+						flag=false;
+						break;
+					}
+				}
+				if (flag){
+					list.add(maintainData.getProjectId());
+				}
+			}
+		}
+		return list;
+	}
 
 	public void export(MaintainData maintainData , HttpServletResponse response){
 		Workbook workbook = null;