|
@@ -8,7 +8,10 @@ import com.jeeplus.core.persistence.Page;
|
|
|
import com.jeeplus.core.service.CrudService;
|
|
|
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.entity.ErpCredit;
|
|
|
+import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCreditEquipment;
|
|
|
+import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpCreditMaterial;
|
|
|
+import com.jeeplus.modules.sg.financial.erpcredit.entity.ErpJudge;
|
|
|
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;
|
|
@@ -246,8 +249,26 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
|
|
|
// 删除创建的新文件
|
|
|
// this.deleteFile(newFile);
|
|
|
}
|
|
|
+ public List<ErpJudge> getMainTainList(List<ErpCredit> erpCredits,List<String> strings,List<String> maintainDataList){
|
|
|
+ ErpJudge erpJudge = null;
|
|
|
+ for (String s:maintainDataList){
|
|
|
+ System.out.println("qweqwe="+s);
|
|
|
+ }
|
|
|
+ List<ErpJudge> erpJudges = new ArrayList<ErpJudge>();
|
|
|
+ if (maintainDataList.isEmpty()){
|
|
|
+ for (ErpCredit erpCredit1:erpCredits){
|
|
|
+ erpJudge = new ErpJudge();
|
|
|
+ erpJudge.setItemId(erpCredit1.getItemId());
|
|
|
+ erpJudge.setMainFlag("是");
|
|
|
+ erpJudge.setInfoFlag("否");
|
|
|
+ erpJudges.add(erpJudge);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return erpJudges;
|
|
|
+ }
|
|
|
//判断条件
|
|
|
public List<ErpJudge> getCheck(List<ErpCredit> erpCredits){
|
|
|
+
|
|
|
List<ErpJudge> erpJudges = new ArrayList<ErpJudge>();
|
|
|
ErpJudge erpJudge = null;
|
|
|
Map<String,List> map = new HashMap<String,List>();
|
|
@@ -255,9 +276,13 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
|
|
|
for (ErpCredit erpCredit:erpCredits){
|
|
|
strings.add(erpCredit.getItemId());
|
|
|
}
|
|
|
- //得到物料是为完成数据
|
|
|
+// //得到物料是为完成数据
|
|
|
List<Information> informationList = informationService.findNoFinishList(strings);
|
|
|
- List<String> maintainDataList = dataMaintenanceService.getJudge(strings);
|
|
|
+ List<String> maintainData = dataMaintenanceService.getJudge(strings);
|
|
|
+ List<String> maintainDataList = new ArrayList<String>();
|
|
|
+ for (int i = 0; i < maintainData.size()-1; i++) {
|
|
|
+ maintainDataList.add(maintainData.get(i));
|
|
|
+ }
|
|
|
if (null!=informationList&&informationList.size()>0){
|
|
|
for (Information information:informationList){
|
|
|
erpJudge=new ErpJudge();
|
|
@@ -289,6 +314,15 @@ public class ErpCreditService extends CrudService<ErpCreditMapper,ErpCredit> {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (maintainData.get(maintainData.size()-1).equals("1")){
|
|
|
+ for (ErpCredit erpCredit1:erpCredits){
|
|
|
+ erpJudge=new ErpJudge();
|
|
|
+ erpJudge.setItemId(erpCredit1.getItemId());
|
|
|
+ erpJudge.setMainFlag("无");
|
|
|
+ erpJudge.setInfoFlag("是");
|
|
|
+ erpJudges.add(erpJudge);
|
|
|
+ }
|
|
|
+ }
|
|
|
return erpJudges;
|
|
|
}
|
|
|
}
|