|
|
@@ -50,11 +50,14 @@ public class DepartmentServiceImpl extends BaseMybatisDao<WorkingHoursMapper> im
|
|
|
|
|
|
@Override
|
|
|
public boolean checkWorkingHoursType(WorkingHours in) {
|
|
|
+ //如果没有分类,则无法判断数据库,也用于修改
|
|
|
if (in.getType()!=null){
|
|
|
List<WorkingHours> typeCount = workingHoursMapper.getTypeCount(in.getType());
|
|
|
+ //大于1,则一定是重复,等于1,要判断id是否一致
|
|
|
if(typeCount.size()>1) {
|
|
|
return true;
|
|
|
}else {
|
|
|
+ //新增不用判断
|
|
|
if (in.getId()!=null){
|
|
|
for (WorkingHours e : typeCount) {
|
|
|
if (!e.getId().equals(in.getId())){
|