Commit d1053cc8 authored by huyuchen's avatar huyuchen

Merge branch 'develop' of http://git.yifucenter.com/fangxinjiang/yifu into develop

parents 75dd5b31 324515f8
...@@ -60,7 +60,7 @@ public class TEmployeeLogController { ...@@ -60,7 +60,7 @@ public class TEmployeeLogController {
@GetMapping("/page") @GetMapping("/page")
@PreAuthorize("@pms.hasPermission('demo_temployeelog_get')") @PreAuthorize("@pms.hasPermission('demo_temployeelog_get')")
public R<IPage<TEmployeeLog>> getTEmployeeLogPage(Page<TEmployeeLog> page, TEmployeeLog tEmployeeLog) { public R<IPage<TEmployeeLog>> getTEmployeeLogPage(Page<TEmployeeLog> page, TEmployeeLog tEmployeeLog) {
return R.ok(tEmployeeLogService.page(page, Wrappers.query(tEmployeeLog))); return R.ok(tEmployeeLogService.page(page, Wrappers.query(tEmployeeLog).orderByDesc(CommonConstants.CREATE_TIME)));
} }
...@@ -129,7 +129,7 @@ public class TEmployeeLogController { ...@@ -129,7 +129,7 @@ public class TEmployeeLogController {
@GetMapping("/getByEmpId") @GetMapping("/getByEmpId")
public R<List<TEmployeeLog>> getByEmpId(@RequestParam String empId) { public R<List<TEmployeeLog>> getByEmpId(@RequestParam String empId) {
return R.ok(tEmployeeLogService.list(Wrappers.<TEmployeeLog>query().eq("EMP_ID", empId) return R.ok(tEmployeeLogService.list(Wrappers.<TEmployeeLog>query().eq("EMP_ID", empId)
.eq("TYPE", CommonConstants.ZERO_INT))); .eq("TYPE", CommonConstants.ZERO_INT).orderByDesc(CommonConstants.CREATE_TIME)));
} }
/** /**
...@@ -142,7 +142,7 @@ public class TEmployeeLogController { ...@@ -142,7 +142,7 @@ public class TEmployeeLogController {
@GetMapping("/getByProjectId") @GetMapping("/getByProjectId")
public R<List<TEmployeeLog>> getByProjectId(@RequestParam String projectId) { public R<List<TEmployeeLog>> getByProjectId(@RequestParam String projectId) {
return R.ok(tEmployeeLogService.list(Wrappers.<TEmployeeLog>query().eq("PROJECT_ID", projectId) return R.ok(tEmployeeLogService.list(Wrappers.<TEmployeeLog>query().eq("PROJECT_ID", projectId)
.eq("TYPE", CommonConstants.ONE_INT))); .eq("TYPE", CommonConstants.ONE_INT).orderByDesc(CommonConstants.CREATE_TIME)));
} }
} }
...@@ -650,17 +650,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -650,17 +650,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
@Transactional @Transactional
public void importContract(List<EmployeeContractVO> excelVOList, List<ErrorMessage> errorMessageList) { public void importContract(List<EmployeeContractVO> excelVOList, List<ErrorMessage> errorMessageList) {
/// 个性化校验逻辑 /// 个性化校验逻辑
List<TEmployeeContractInfo> list = this.list();
ErrorMessage errorMsg; ErrorMessage errorMsg;
EmployeeContractVO excel; EmployeeContractVO excel;
// 执行数据插入操作 组装 // 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
excel = excelVOList.get(i); excel = excelVOList.get(i);
errorMsg = checkRes(excel, list);
if (Common.isNotNull(errorMsg)) {
errorMessageList.add(errorMsg);
continue;
}
// 存储 // 存储
insertExcel(excel, errorMessageList); insertExcel(excel, errorMessageList);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS));
......
...@@ -258,7 +258,7 @@ public interface CommonConstants { ...@@ -258,7 +258,7 @@ public interface CommonConstants {
public static final String ZIP_TYPE = "zip"; public static final String ZIP_TYPE = "zip";
int BATCH_COUNT = 100; int BATCH_COUNT = 100;
String IMPORT_DATA_ANALYSIS_ERROR = "数据导入解析异常,请检查表数据格式"; String IMPORT_DATA_ANALYSIS_ERROR = "数据导入解析异常,请检查表数据格式";
String CREATE_TIME = "create_time"; String CREATE_TIME = "CREATE_TIME";
String ID = "ID"; String ID = "ID";
String PARAM_IS_NOT_ERROR = "传参异常,请检查参数"; String PARAM_IS_NOT_ERROR = "传参异常,请检查参数";
int EXCEL_EXPORT_LIMIT = 60000; int EXCEL_EXPORT_LIMIT = 60000;
......
...@@ -33,7 +33,7 @@ public class ExcelAttributeConstants { ...@@ -33,7 +33,7 @@ public class ExcelAttributeConstants {
//员工合同类型 //员工合同类型
public static final String EMPLOYEE_CONTRACT_TYPE = "contract_type" ; public static final String EMPLOYEE_CONTRACT_TYPE = "employee_contract_type" ;
//员工合同工时制 1标准工时 2 综合工时 3不定时工时制 //员工合同工时制 1标准工时 2 综合工时 3不定时工时制
public static final String WORKING_HOURS = "working_hours"; public static final String WORKING_HOURS = "working_hours";
......
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