Commit 98547f8a authored by 赵啸非's avatar 赵啸非

修改考勤汇总

parent 2b120bf7
...@@ -10,6 +10,7 @@ import com.mortals.xhx.module.dept.service.DeptService; ...@@ -10,6 +10,7 @@ import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.workman.model.WorkmanEntity; import com.mortals.xhx.module.workman.model.WorkmanEntity;
import com.mortals.xhx.module.workman.service.WorkmanService; import com.mortals.xhx.module.workman.service.WorkmanService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -58,8 +59,11 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman ...@@ -58,8 +59,11 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
@Override @Override
protected void saveBefore(WorkmanEntity entity, Map<String, Object> model, Context context) throws AppException { protected void saveBefore(WorkmanEntity entity, Map<String, Object> model, Context context) throws AppException {
DeptEntity deptEntity = deptService.selectOne(new DeptQuery().id(entity.getDeptId()));
entity.setDeptName(deptEntity.getDeptName()); if(ObjectUtils.isEmpty(entity.getDeptId())){
DeptEntity deptEntity = deptService.get(entity.getDeptId(), context);
entity.setDeptName(deptEntity==null?"":deptEntity.getDeptName());
}
super.saveBefore(entity, model, context); super.saveBefore(entity, model, context);
} }
} }
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<plugin interceptor="com.mortals.framework.thirty.mybatis.LogInterceptor"> <plugin interceptor="com.mortals.framework.thirty.mybatis.LogInterceptor">
<property name="enableExecutorTime" value="true" /> <property name="enableExecutorTime" value="true" />
<property name="showSql" value="true" /> <property name="showSql" value="false" />
</plugin> </plugin>
</plugins> </plugins>
</configuration> </configuration>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment