Browse Source

fix 有签章数据的人才签章

river 4 years ago
parent
commit
87fa4ae29d

+ 0 - 15
mec-web/src/main/java/com/ym/mec/web/controller/education/EduFinancialExpenditureController.java

@@ -31,26 +31,11 @@ import java.util.stream.Collectors;
 public class EduFinancialExpenditureController extends BaseController {
     @Autowired
     private FinancialExpenditureService financialExpenditureService;
-    @Autowired
-    private OrganizationDao organizationDao;
-    @Autowired
-    private CooperationOrganDao cooperationOrganDao;
 
     @ApiOperation(value = "批量添加支出记录")
     @PostMapping(value = "/batchAdd")
     public HttpResponseResult<List<FinancialExpenditure>> batchAdd(@RequestBody List<FinancialExpenditure> financialExpenditures) {
-        List<Organization> organs = organizationDao.findAllOrgans();
-        Map<String, Integer> organMap = organs.stream().collect(Collectors.toMap(Organization::getName, Organization::getId));
-        List<CooperationOrgan> cooperationOrgans = cooperationOrganDao.getAllCooperationOrgan();
-        Map<String, Integer> cooperationOrganMap = cooperationOrgans.stream().collect(Collectors.toMap(e -> e.getName() + e.getOrganId(), e -> e.getId()));
         for (FinancialExpenditure financialExpenditure : financialExpenditures) {
-            if (organMap.containsKey(financialExpenditure.getOrganName())) {
-                financialExpenditure.setOrganId(organMap.get(financialExpenditure.getOrganName()));
-            }
-            if (cooperationOrganMap.containsKey(financialExpenditure.getCooperationOrganName() + financialExpenditure.getOrganId())) {
-                Integer cooperationOrganId = cooperationOrganMap.get(financialExpenditure.getCooperationOrganName() + financialExpenditure.getOrganId());
-                financialExpenditure.setCooperationOrganId(cooperationOrganId);
-            }
             for (ExpenditureTypeEnum typeEnum : ExpenditureTypeEnum.values()) {
                 if (typeEnum.getDesc().equals(financialExpenditure.getFeeType())) {
                     financialExpenditure.setType(typeEnum);