提交修改
This commit is contained in:
parent
7b122dc5eb
commit
2bd3bb4262
@ -51,6 +51,7 @@ public class ShiroConfig {
|
|||||||
|
|
||||||
Map<String, String> filterMap = new LinkedHashMap<>();
|
Map<String, String> filterMap = new LinkedHashMap<>();
|
||||||
filterMap.put("/webjars/**", "anon");
|
filterMap.put("/webjars/**", "anon");
|
||||||
|
filterMap.put("/test/**", "anon");
|
||||||
filterMap.put("/druid/**", "anon");
|
filterMap.put("/druid/**", "anon");
|
||||||
filterMap.put("/app/**", "anon");
|
filterMap.put("/app/**", "anon");
|
||||||
filterMap.put("/sys/login", "anon");
|
filterMap.put("/sys/login", "anon");
|
||||||
|
|||||||
@ -15,7 +15,7 @@ public class TestController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ResultRecordService resultRecordService;
|
private ResultRecordService resultRecordService;
|
||||||
|
|
||||||
@RequestMapping("/test")
|
@RequestMapping("/test/xx")
|
||||||
public void test(){
|
public void test(){
|
||||||
ResultRecord resultRecord = new ResultRecord();
|
ResultRecord resultRecord = new ResultRecord();
|
||||||
resultRecord.setAllScore(new BigDecimal(10));
|
resultRecord.setAllScore(new BigDecimal(10));
|
||||||
|
|||||||
@ -44,4 +44,6 @@ public interface DepartmentsStaffRelateDao extends BaseMapper<DepartmentsStaffRe
|
|||||||
String getRelateByStaffIdAndDepartmentId(@Param("staffId") Long staffId, @Param("departmentId") String departmentId);
|
String getRelateByStaffIdAndDepartmentId(@Param("staffId") Long staffId, @Param("departmentId") String departmentId);
|
||||||
|
|
||||||
List<DepartmentsStaffRelateEntity> selectByDepartmentIds(@Param("departmentIds") List<String> departmentIds);
|
List<DepartmentsStaffRelateEntity> selectByDepartmentIds(@Param("departmentIds") List<String> departmentIds);
|
||||||
|
|
||||||
|
List<DepartmentsStaffRelateEntity> selectByStaffIds(@Param("staffIds") List<Long> staffIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,4 +46,6 @@ public interface StaffDao extends BaseMapper<StaffEntity> {
|
|||||||
List<GraphicsStatisticalDto> getEducationData(@Param("departmentId") String departmentId, @Param("beginDate") String beginDate, @Param("endDate") String endDate);
|
List<GraphicsStatisticalDto> getEducationData(@Param("departmentId") String departmentId, @Param("beginDate") String beginDate, @Param("endDate") String endDate);
|
||||||
|
|
||||||
List<StaffEntity> selectByName(@Param("name") String name);
|
List<StaffEntity> selectByName(@Param("name") String name);
|
||||||
|
|
||||||
|
List<StaffEntity> selectByIds(@Param("staffIds") List<Long> staffIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,6 +28,12 @@ public class ResultRecordResp {
|
|||||||
|
|
||||||
private String statusStr;
|
private String statusStr;
|
||||||
|
|
||||||
|
private Long staffId;
|
||||||
|
|
||||||
|
private String staffName;
|
||||||
|
|
||||||
|
private String departmentName;
|
||||||
|
|
||||||
public String getStatusStr() {
|
public String getStatusStr() {
|
||||||
if (this.status == 0) {
|
if (this.status == 0) {
|
||||||
return "新建";
|
return "新建";
|
||||||
|
|||||||
@ -50,5 +50,7 @@ public interface StaffService extends IService<StaffEntity> {
|
|||||||
void enterDatabase(List<Map<String, String>> sheet12List, List<Map<String, String>> sheet3List, List<Map<String, String>> sheet4List);
|
void enterDatabase(List<Map<String, String>> sheet12List, List<Map<String, String>> sheet3List, List<Map<String, String>> sheet4List);
|
||||||
|
|
||||||
List<StaffEntity> selectByName(String name);
|
List<StaffEntity> selectByName(String name);
|
||||||
|
|
||||||
|
List<StaffEntity> selectByIds(List<Long> staffIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -275,6 +275,12 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
|
|||||||
return staffDao.selectByName(name);
|
return staffDao.selectByName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StaffEntity> selectByIds(List<Long> staffIds) {
|
||||||
|
|
||||||
|
return staffDao.selectByIds(staffIds);
|
||||||
|
}
|
||||||
|
|
||||||
private void createDepartmentInfo(StaffEntity staffEntity, String departmentName) {
|
private void createDepartmentInfo(StaffEntity staffEntity, String departmentName) {
|
||||||
DepartmentsEntity departmentsEntity = departmentsService.getOne(new QueryWrapper<DepartmentsEntity>().eq("department_name", departmentName));
|
DepartmentsEntity departmentsEntity = departmentsService.getOne(new QueryWrapper<DepartmentsEntity>().eq("department_name", departmentName));
|
||||||
if (departmentsEntity != null) {
|
if (departmentsEntity != null) {
|
||||||
|
|||||||
@ -6,15 +6,13 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 菜单权限表
|
* 菜单权限表
|
||||||
* </p>*业绩记录表
|
* </p>*业绩记录表
|
||||||
*
|
* @author quyixiao
|
||||||
* @author quyixiao
|
* @since 2020-08-12
|
||||||
* @since 2020-08-10
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@TableName("lz_result_record")
|
@TableName("lz_result_record")
|
||||||
@ -38,15 +36,17 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
private BigDecimal allScore;
|
private BigDecimal allScore;
|
||||||
//备注
|
//备注
|
||||||
private String remark;
|
private String remark;
|
||||||
|
//员工id
|
||||||
|
private Long staffId;
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
* @param id
|
* @param id
|
||||||
*/
|
*/
|
||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
@ -54,17 +54,14 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否删除状态,1:删除,0:有效
|
* 是否删除状态,1:删除,0:有效
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Integer getIsDelete() {
|
public Integer getIsDelete() {
|
||||||
return isDelete;
|
return isDelete;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否删除状态,1:删除,0:有效
|
* 是否删除状态,1:删除,0:有效
|
||||||
*
|
|
||||||
* @param isDelete
|
* @param isDelete
|
||||||
*/
|
*/
|
||||||
public void setIsDelete(Integer isDelete) {
|
public void setIsDelete(Integer isDelete) {
|
||||||
@ -72,17 +69,14 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Date getGmtCreate() {
|
public Date getGmtCreate() {
|
||||||
return gmtCreate;
|
return gmtCreate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*
|
|
||||||
* @param gmtCreate
|
* @param gmtCreate
|
||||||
*/
|
*/
|
||||||
public void setGmtCreate(Date gmtCreate) {
|
public void setGmtCreate(Date gmtCreate) {
|
||||||
@ -90,17 +84,14 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最后修改时间
|
* 最后修改时间
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Date getGmtModified() {
|
public Date getGmtModified() {
|
||||||
return gmtModified;
|
return gmtModified;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最后修改时间
|
* 最后修改时间
|
||||||
*
|
|
||||||
* @param gmtModified
|
* @param gmtModified
|
||||||
*/
|
*/
|
||||||
public void setGmtModified(Date gmtModified) {
|
public void setGmtModified(Date gmtModified) {
|
||||||
@ -108,17 +99,14 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 月份
|
* 月份
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Date getMonthTime() {
|
public Date getMonthTime() {
|
||||||
return monthTime;
|
return monthTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 月份
|
* 月份
|
||||||
*
|
|
||||||
* @param monthTime
|
* @param monthTime
|
||||||
*/
|
*/
|
||||||
public void setMonthTime(Date monthTime) {
|
public void setMonthTime(Date monthTime) {
|
||||||
@ -126,17 +114,14 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0.新建,1 提交审批中,2 拒绝
|
* 0.新建,1 提交审批中,2 拒绝
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Integer getStatus() {
|
public Integer getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0.新建,1 提交审批中,2 拒绝
|
* 0.新建,1 提交审批中,2 拒绝
|
||||||
*
|
|
||||||
* @param status
|
* @param status
|
||||||
*/
|
*/
|
||||||
public void setStatus(Integer status) {
|
public void setStatus(Integer status) {
|
||||||
@ -144,17 +129,14 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最后得分
|
* 最后得分
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public BigDecimal getLastScore() {
|
public BigDecimal getLastScore() {
|
||||||
return lastScore;
|
return lastScore;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最后得分
|
* 最后得分
|
||||||
*
|
|
||||||
* @param lastScore
|
* @param lastScore
|
||||||
*/
|
*/
|
||||||
public void setLastScore(BigDecimal lastScore) {
|
public void setLastScore(BigDecimal lastScore) {
|
||||||
@ -162,17 +144,14 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总分
|
* 总分
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public BigDecimal getAllScore() {
|
public BigDecimal getAllScore() {
|
||||||
return allScore;
|
return allScore;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总分
|
* 总分
|
||||||
*
|
|
||||||
* @param allScore
|
* @param allScore
|
||||||
*/
|
*/
|
||||||
public void setAllScore(BigDecimal allScore) {
|
public void setAllScore(BigDecimal allScore) {
|
||||||
@ -180,23 +159,35 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getRemark() {
|
public String getRemark() {
|
||||||
return remark;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*
|
|
||||||
* @param remark
|
* @param remark
|
||||||
*/
|
*/
|
||||||
public void setRemark(String remark) {
|
public void setRemark(String remark) {
|
||||||
this.remark = remark;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getStaffId() {
|
||||||
|
return staffId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 员工id
|
||||||
|
* @param staffId
|
||||||
|
*/
|
||||||
|
public void setStaffId(Long staffId) {
|
||||||
|
this.staffId = staffId;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ResultRecord{" +
|
return "ResultRecord{" +
|
||||||
@ -209,6 +200,7 @@ public class ResultRecord implements java.io.Serializable {
|
|||||||
",lastScore=" + lastScore +
|
",lastScore=" + lastScore +
|
||||||
",allScore=" + allScore +
|
",allScore=" + allScore +
|
||||||
",remark=" + remark +
|
",remark=" + remark +
|
||||||
|
",staffId=" + staffId +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -93,22 +94,12 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
List<Long> departmentStaffIds = new ArrayList<>();
|
List<Long> departmentStaffIds = new ArrayList<>();
|
||||||
List<Long> staffIds = new ArrayList<>();
|
List<Long> staffIds = new ArrayList<>();
|
||||||
List<String> departmentIds = new ArrayList<>();
|
List<String> departmentIds = new ArrayList<>();
|
||||||
if (StringUtil.isNotBlank(params.getDepartment1())
|
List<DepartmentsEntity> tDepartments = departmentsDao.selectAll();
|
||||||
|| StringUtil.isNotBlank(params.getDepartment2())
|
if (StringUtil.isNotBlank(params.getDepartment1()) || StringUtil.isNotBlank(params.getDepartment2())
|
||||||
|| StringUtil.isNotBlank(params.getDepartment3())) {
|
|| StringUtil.isNotBlank(params.getDepartment3())) {
|
||||||
Map<String,List<DepartmentsEntity>> departmentMap = null;
|
Map<String,List<DepartmentsEntity>> departmentMap = null;
|
||||||
if(employeesDto == null || employeesDto.getExpire() < new Date().getTime()){
|
if(employeesDto == null || employeesDto.getExpire() < new Date().getTime()){
|
||||||
List<DepartmentsEntity> tDepartments = departmentsDao.selectAll();
|
departmentMap = getStringListMap(tDepartments);
|
||||||
departmentMap = new HashMap<>();
|
|
||||||
for(DepartmentsEntity department : tDepartments) {
|
|
||||||
List<DepartmentsEntity> list = new ArrayList<>();
|
|
||||||
for(DepartmentsEntity child : tDepartments) {
|
|
||||||
if(child.getDepartmentId().equals(department.getDepartmentParentId())){
|
|
||||||
list.add(child);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
departmentMap.put(department.getDepartmentId(), list);
|
|
||||||
}
|
|
||||||
Date expire = DateUtils.addMinute(new Date(),30);
|
Date expire = DateUtils.addMinute(new Date(),30);
|
||||||
EmployeesDto newDto = new EmployeesDto(expire.getTime(),departmentMap);
|
EmployeesDto newDto = new EmployeesDto(expire.getTime(),departmentMap);
|
||||||
employeesDto = newDto;
|
employeesDto = newDto;
|
||||||
@ -125,47 +116,68 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
getChildIds(departmentIds, params.getDepartment1(), departmentMap);
|
getChildIds(departmentIds, params.getDepartment1(), departmentMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (departmentIds != null && departmentIds.size() > 0) {
|
if (departmentIds != null && departmentIds.size() > 0) {
|
||||||
List<DepartmentsStaffRelateEntity > departmentsStaffRelateEntities = departmentsStaffRelateDao.selectByDepartmentIds(departmentIds);
|
List<DepartmentsStaffRelateEntity> departmentsStaffRelateEntities = departmentsStaffRelateDao.selectByDepartmentIds(departmentIds);
|
||||||
if(CollectionUtils.isNotEmpty(departmentsStaffRelateEntities)){
|
if(CollectionUtils.isNotEmpty(departmentsStaffRelateEntities)){
|
||||||
for(DepartmentsStaffRelateEntity departmentsStaffRelateEntity:departmentsStaffRelateEntities){
|
Set<Long> setStaffId = departmentsStaffRelateEntities.stream().map(p->p.getStaffId()).collect(Collectors.toSet());
|
||||||
departmentStaffIds.add(departmentsStaffRelateEntity.getStaffId());
|
departmentStaffIds = new ArrayList<>(setStaffId);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtil.isNotBlank(params.getName())){
|
if(StringUtil.isNotBlank(params.getName())){
|
||||||
List<StaffEntity> staffEntities = staffService.selectByName(params.getName());
|
List<StaffEntity> staffEntities = staffService.selectByName(params.getName());
|
||||||
if(CollectionUtils.isNotEmpty(staffEntities)){
|
if(CollectionUtils.isNotEmpty(staffEntities)){
|
||||||
for(StaffEntity staffEntity:staffEntities){
|
staffIds = staffEntities.stream().map(p->p.getId()).collect(Collectors.toList());
|
||||||
staffIds.add(staffEntity.getId());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
params.setDepartmentStaffIds(departmentStaffIds);
|
params.setDepartmentStaffIds(departmentStaffIds);
|
||||||
params.setStaffIds(staffIds);
|
params.setStaffIds(staffIds);
|
||||||
PageUtils pageUtils = PageUtils.startPage(params.getPage(), params.getLimit() ).doSelect(new ISelect() {
|
|
||||||
@Override
|
PageUtils pageUtils = PageUtils.startPage(params.getPage(), params.getLimit() ).doSelect(
|
||||||
public List doSelect(IPage page) {
|
page -> resultRecordMapper.selectByCondition(page, params)
|
||||||
return resultRecordMapper.selectByCondition(page, params);
|
);
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
List<ResultRecord> resultRecords = pageUtils.getList();
|
List<ResultRecord> resultRecords = pageUtils.getList();
|
||||||
List<ResultRecordResp> list = new ArrayList<>();
|
List<ResultRecordResp> list = new ArrayList<>();
|
||||||
|
|
||||||
|
Set<Long> viewStaffIdSet = resultRecords.stream().map(p->p.getStaffId()).collect(Collectors.toSet());
|
||||||
|
List<Long> viewStaffId = new ArrayList<>(viewStaffIdSet);
|
||||||
|
|
||||||
|
List<StaffEntity> staffEntities = staffService.selectByIds(viewStaffId);
|
||||||
|
List<DepartmentsStaffRelateEntity> staffRelateEntities = departmentsStaffRelateDao.selectByStaffIds(viewStaffId);
|
||||||
|
|
||||||
|
Map<Long ,StaffEntity> staffEntityMap = staffEntities.stream().collect(Collectors.toMap(StaffEntity::getId, p -> p));
|
||||||
|
Map<String, DepartmentsEntity> departmentsEntityMap = tDepartments.stream().collect(Collectors.toMap(p -> p.getDepartmentId(), p -> p));
|
||||||
|
|
||||||
|
Map<Long, DepartmentsStaffRelateEntity> staffRelateEntityMap = staffRelateEntities.stream().collect(Collectors.toMap(p -> p.getStaffId(), p -> p));
|
||||||
|
|
||||||
for (ResultRecord resultRecord : resultRecords) {
|
for (ResultRecord resultRecord : resultRecords) {
|
||||||
ResultRecordResp resp = new ResultRecordResp();
|
ResultRecordResp resp = new ResultRecordResp();
|
||||||
BeanUtils.copyProperties(resultRecord, resp);
|
BeanUtils.copyProperties(resultRecord, resp);
|
||||||
|
resp.setStaffName(staffEntityMap.get(resp.getStaffId()) != null ? staffEntityMap.get(resp.getStaffId()).getName() : "");
|
||||||
|
DepartmentsStaffRelateEntity relate = staffRelateEntityMap.get(resp.getStaffId());
|
||||||
|
resp.setDepartmentName(relate != null && departmentsEntityMap.get(relate.getDepartmentId()) != null ?
|
||||||
|
departmentsEntityMap.get(relate.getDepartmentId()).getDepartmentName() : "");
|
||||||
list.add(resp);
|
list.add(resp);
|
||||||
}
|
}
|
||||||
pageUtils.setList(list);
|
pageUtils.setList(list);
|
||||||
return pageUtils;
|
return pageUtils;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private Map<String, List<DepartmentsEntity>> getStringListMap(List<DepartmentsEntity> tDepartments) {
|
||||||
public void deleteBatchIds(List<Long> asList) {
|
Map<String, List<DepartmentsEntity>> departmentMap = new HashMap<>();
|
||||||
|
for(DepartmentsEntity department : tDepartments) {
|
||||||
|
List<DepartmentsEntity> list = new ArrayList<>();
|
||||||
|
for(DepartmentsEntity child : tDepartments) {
|
||||||
|
if(child.getDepartmentId().equals(department.getDepartmentParentId())){
|
||||||
|
list.add(child);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
departmentMap.put(department.getDepartmentId(), list);
|
||||||
|
}
|
||||||
|
return departmentMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getChildIds(List<String> childDepartIds ,String parentId,Map<String,List<DepartmentsEntity>> departmentMap ){
|
public void getChildIds(List<String> childDepartIds ,String parentId,Map<String,List<DepartmentsEntity>> departmentMap ){
|
||||||
@ -176,6 +188,11 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
getChildIds(childDepartIds,tDepartment.getDepartmentId(),departmentMap);
|
getChildIds(childDepartIds,tDepartment.getDepartmentId(),departmentMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteBatchIds(List<Long> asList) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,48 +13,51 @@
|
|||||||
<result column="last_score" property="lastScore"/>
|
<result column="last_score" property="lastScore"/>
|
||||||
<result column="all_score" property="allScore"/>
|
<result column="all_score" property="allScore"/>
|
||||||
<result column="remark" property="remark"/>
|
<result column="remark" property="remark"/>
|
||||||
|
<result column="staff_id" property="staffId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, month_time AS monthTime, status AS status, last_score AS lastScore, all_score AS allScore, remark AS remark
|
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, month_time AS monthTime, status AS status, last_score AS lastScore, all_score AS allScore, remark AS remark, staff_id AS staffId
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectResultRecordById" resultType="ResultRecord" >
|
<select id="selectResultRecordById" resultType="ResultRecord" >
|
||||||
select * from lz_result_record where id=#{id} and is_delete = 0 limit 1
|
select * from lz_result_record where id=#{id} and is_delete = 0 limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertResultRecord" parameterType="ResultRecord" useGeneratedKeys="true" keyProperty="id" >
|
<insert id="insertResultRecord" parameterType="ResultRecord" useGeneratedKeys="true" keyProperty="id" >
|
||||||
insert into lz_result_record(
|
insert into lz_result_record(
|
||||||
<if test="monthTime != null">month_time, </if>
|
<if test="monthTime != null">month_time, </if>
|
||||||
<if test="status != null">status, </if>
|
<if test="status != null">status, </if>
|
||||||
<if test="lastScore != null">last_score, </if>
|
<if test="lastScore != null">last_score, </if>
|
||||||
<if test="allScore != null">all_score, </if>
|
<if test="allScore != null">all_score, </if>
|
||||||
<if test="remark != null">remark, </if>
|
<if test="remark != null">remark, </if>
|
||||||
is_delete,
|
<if test="staffId != null">staff_id, </if>
|
||||||
gmt_create,
|
is_delete,
|
||||||
gmt_modified
|
gmt_create,
|
||||||
|
gmt_modified
|
||||||
)values(
|
)values(
|
||||||
<if test="monthTime != null">#{ monthTime}, </if>
|
<if test="monthTime != null">#{ monthTime}, </if>
|
||||||
<if test="status != null">#{ status}, </if>
|
<if test="status != null">#{ status}, </if>
|
||||||
<if test="lastScore != null">#{ lastScore}, </if>
|
<if test="lastScore != null">#{ lastScore}, </if>
|
||||||
<if test="allScore != null">#{ allScore}, </if>
|
<if test="allScore != null">#{ allScore}, </if>
|
||||||
<if test="remark != null">#{ remark}, </if>
|
<if test="remark != null">#{ remark}, </if>
|
||||||
0,
|
<if test="staffId != null">#{ staffId}, </if>
|
||||||
now(),
|
0,
|
||||||
now()
|
now(),
|
||||||
|
now()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
<update id="updateResultRecordById" parameterType="ResultRecord" >
|
<update id="updateResultRecordById" parameterType="ResultRecord" >
|
||||||
update
|
update
|
||||||
lz_result_record
|
lz_result_record
|
||||||
<trim prefix="set" suffixOverrides=",">
|
<trim prefix="set" suffixOverrides=",">
|
||||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||||
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
||||||
@ -62,7 +65,8 @@
|
|||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
<if test="lastScore != null">last_score = #{lastScore},</if>
|
<if test="lastScore != null">last_score = #{lastScore},</if>
|
||||||
<if test="allScore != null">all_score = #{allScore},</if>
|
<if test="allScore != null">all_score = #{allScore},</if>
|
||||||
<if test="remark != null">remark = #{remark}</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="staffId != null">staff_id = #{staffId}</if>
|
||||||
</trim>
|
</trim>
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@ -71,15 +75,16 @@
|
|||||||
|
|
||||||
<update id="updateCoverResultRecordById" parameterType="ResultRecord" >
|
<update id="updateCoverResultRecordById" parameterType="ResultRecord" >
|
||||||
update
|
update
|
||||||
lz_result_record
|
lz_result_record
|
||||||
set
|
set
|
||||||
is_delete = #{isDelete},
|
is_delete = #{isDelete},
|
||||||
gmt_create = #{gmtCreate},
|
gmt_create = #{gmtCreate},
|
||||||
month_time = #{monthTime},
|
month_time = #{monthTime},
|
||||||
status = #{status},
|
status = #{status},
|
||||||
last_score = #{lastScore},
|
last_score = #{lastScore},
|
||||||
all_score = #{allScore},
|
all_score = #{allScore},
|
||||||
remark = #{remark}
|
remark = #{remark},
|
||||||
|
staff_id = #{staffId}
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
@ -89,20 +94,38 @@
|
|||||||
update lz_result_record set is_delete = 1 where id=#{id} limit 1
|
update lz_result_record set is_delete = 1 where id=#{id} limit 1
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectByCondition" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
<select id="selectByCondition" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
||||||
select * from lz_result_record where is_delete = 0
|
select * from lz_result_record where is_delete = 0
|
||||||
<if test="req.monthBeginDate != null and req.monthBeginDate != '' ">
|
<if test="req.monthBeginDate != null and req.monthBeginDate != '' ">
|
||||||
AND DATE_FORMAT(month_time, '%Y-%m-%d %H:%i:%S') <![CDATA[ >= ]]> DATE_FORMAT(#{req.monthBeginDate}, '%Y-%m-%d %H:%i:%S')
|
AND DATE_FORMAT(month_time, '%Y-%m-%d %H:%i:%S') <![CDATA[ >= ]]> DATE_FORMAT(#{req.monthBeginDate}, '%Y-%m-%d %H:%i:%S')
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="req.monthEndDate != null and req.monthEndDate != '' ">
|
<if test="req.monthEndDate != null and req.monthEndDate != '' ">
|
||||||
AND DATE_FORMAT(month_time, '%Y-%m-%d %H:%i:%S') <![CDATA[ >= ]]> DATE_FORMAT(#{req.monthEndDate}, '%Y-%m-%d %H:%i:%S')
|
AND DATE_FORMAT(month_time, '%Y-%m-%d %H:%i:%S') <![CDATA[ >= ]]> DATE_FORMAT(#{req.monthEndDate}, '%Y-%m-%d %H:%i:%S')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="req.status != null">
|
||||||
|
and status = #{req.status}
|
||||||
|
</if>
|
||||||
|
<if test="req.remark != null and req.remark !='' ">
|
||||||
|
AND remark LIKE CONCAT('%',#{req.remark},'%')
|
||||||
|
</if>
|
||||||
|
<if test="req.departmentStaffIds != null and req.departmentStaffIds.size() > 0 ">
|
||||||
|
and staff_id in
|
||||||
|
<foreach collection="req.departmentStaffIds" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="req.staffIds != null and req.staffIds.size() > 0 ">
|
||||||
|
and staff_id in
|
||||||
|
<foreach collection="req.staffIds" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
order by id desc
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectByConditionTest" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
<select id="selectByConditionTest" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
||||||
select * from lz_result_record where is_delete = 0
|
select * from lz_result_record where is_delete = 0
|
||||||
<if test="monthBeginDate != null and monthBeginDate != '' ">
|
<if test="monthBeginDate != null and monthBeginDate != '' ">
|
||||||
|
|||||||
@ -39,11 +39,19 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectByDepartmentIds" resultType="com.lz.modules.app.entity.DepartmentsStaffRelateEntity">
|
<select id="selectByDepartmentIds" resultType="com.lz.modules.app.entity.DepartmentsStaffRelateEntity">
|
||||||
select * from lz_departments_staff_relate where department_id in
|
select * from lz_departments_staff_relate where is_delete=0 and department_id in
|
||||||
<foreach collection="departmentIds" item="item" index="index" separator="," open="(" close=")">
|
<foreach collection="departmentIds" item="item" index="index" separator="," open="(" close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByStaffIds" resultType="com.lz.modules.app.entity.DepartmentsStaffRelateEntity">
|
||||||
|
select * from lz_departments_staff_relate where is_delete=0 and staff_id in
|
||||||
|
<foreach collection="staffIds" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
group by staff_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -273,5 +273,12 @@
|
|||||||
select * from lz_staff where is_delete=0 AND name LIKE CONCAT('%',#{name},'%')
|
select * from lz_staff where is_delete=0 AND name LIKE CONCAT('%',#{name},'%')
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByIds" resultType="com.lz.modules.app.entity.StaffEntity">
|
||||||
|
select * from lz_staff where is_delete=0 and id in
|
||||||
|
<foreach collection="staffIds" item="item" index="index" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -43,7 +43,6 @@ public class MysqlMain {
|
|||||||
public static String mysql_username = "ldd_biz";
|
public static String mysql_username = "ldd_biz";
|
||||||
public static String mysql_password = "Hello1234";
|
public static String mysql_password = "Hello1234";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param args
|
* @param args
|
||||||
*/
|
*/
|
||||||
@ -61,8 +60,6 @@ public class MysqlMain {
|
|||||||
file.mkdirs();
|
file.mkdirs();
|
||||||
}
|
}
|
||||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||||
list.add(new TablesBean("lz_result_comment"));
|
|
||||||
list.add(new TablesBean("lz_result_detail"));
|
|
||||||
list.add(new TablesBean("lz_result_record"));
|
list.add(new TablesBean("lz_result_record"));
|
||||||
|
|
||||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user