|
@@ -249,15 +249,16 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
|
|
|
// 删除创建的新文件
|
|
|
// this.deleteFile(newFile);
|
|
|
}
|
|
|
-
|
|
|
- public List<ErpJudge> getCheck1(List<ErpCredit> erpCredits){
|
|
|
- List<ErpJudge> erpJudges = new ArrayList<>();
|
|
|
+ //判断条件
|
|
|
+ public List<ErpJudge> getCheck(List<ErpCredit> erpCredits){
|
|
|
+ List<ErpJudge> erpJudges = new ArrayList<ErpJudge>();
|
|
|
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<Information> informationList = informationService.findNoFinishList(strings);
|
|
|
List<String> maintainDataList = dataMaintenanceService.getJudge(strings);
|
|
|
if (null!=informationList&&informationList.size()>0){
|
|
@@ -266,14 +267,14 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
|
|
|
erpJudge.setItemId(information.getProjectId());
|
|
|
erpJudge.setMainFlag("有");
|
|
|
erpJudge.setInfoFlag("否");
|
|
|
+ erpJudges.add(erpJudge);
|
|
|
}
|
|
|
- erpJudges.add(erpJudge);
|
|
|
}
|
|
|
if (null!=maintainDataList&&maintainDataList.size()>0){
|
|
|
Boolean flag = true;
|
|
|
for (String maintain:maintainDataList){
|
|
|
flag=true;
|
|
|
- if (null!=informationList&&informationList.size()>0){
|
|
|
+ if (null!=erpCredits&&erpCredits.size()>0){
|
|
|
for (ErpJudge erpJudge1:erpJudges){
|
|
|
if (erpJudge1.getItemId().equals(maintain)){
|
|
|
erpJudge1.setMainFlag("无");
|
|
@@ -293,92 +294,4 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
|
|
|
}
|
|
|
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;
|
|
|
- }
|
|
|
}
|