|
@@ -17,6 +17,7 @@ import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.constant.Mat
|
|
|
import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.entity.LikuDetail;
|
|
|
import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.entity.MaterialReportDetails;
|
|
|
import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.mapper.MaterialReportDetailsMapper;
|
|
|
+import com.jeeplus.modules.sg.balancedlibrary.reportPerson.entity.ReportPerson;
|
|
|
import com.jeeplus.modules.sg.balancedlibrary.reportPerson.mapper.ReportPersonMapper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -415,8 +416,13 @@ public class MaterialReportDetailsService extends CrudService<MaterialReportDeta
|
|
|
m.setReportPerson(m.getReportPerson());
|
|
|
if (m.getReportDepartment().equals("")) {
|
|
|
//根据提报人找到提报部门
|
|
|
- String department = personMapper.getDepartmentByPerson(m.getReportPerson());
|
|
|
- m.setReportDepartment(department);
|
|
|
+ List<ReportPerson> departmentByPerson = personMapper.getDepartmentByPerson();
|
|
|
+ departmentByPerson.forEach(de->{
|
|
|
+ if (de.getReportPerson().equals(m.getReportPerson())){
|
|
|
+ m.setReportDepartment(de.getReportDepartment());
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
}else {
|
|
|
m.setReportDepartment(m.getReportDepartment());
|
|
|
}
|