Commit f7b0d9d5 by 邓实川
parents e435759f 59ffc686
...@@ -48,36 +48,54 @@ public class KqglAssoDkmx extends Model<KqglAssoDkmx> { ...@@ -48,36 +48,54 @@ public class KqglAssoDkmx extends Model<KqglAssoDkmx> {
@ApiModelProperty(value = "上班1打卡结果 上班1打卡结果", example = "101") @ApiModelProperty(value = "上班1打卡结果 上班1打卡结果", example = "101")
private Integer sbdk1jg; private Integer sbdk1jg;
@ApiModelProperty(value = "打卡途径(1:补卡;2:管理员更改)", example = "0")
private Integer dktj1;
@ApiModelProperty(value = "下班1打卡时间 下班1打卡时间", example = "101") @ApiModelProperty(value = "下班1打卡时间 下班1打卡时间", example = "101")
private Long xbdk1; private Long xbdk1;
@ApiModelProperty(value = "下班1打卡结果 下班1打卡结果", example = "101") @ApiModelProperty(value = "下班1打卡结果 下班1打卡结果", example = "101")
private Integer xbdk1jg; private Integer xbdk1jg;
@ApiModelProperty(value = "打卡途径(1:补卡;2:管理员更改)", example = "0")
private Integer dktj2;
@ApiModelProperty(value = "上班2打卡时间 上班2打卡时间", example = "101") @ApiModelProperty(value = "上班2打卡时间 上班2打卡时间", example = "101")
private Long sbdk2; private Long sbdk2;
@ApiModelProperty(value = "上班2打卡结果 上班2打卡结果", example = "101") @ApiModelProperty(value = "上班2打卡结果 上班2打卡结果", example = "101")
private Integer sbdk2jg; private Integer sbdk2jg;
@ApiModelProperty(value = "打卡途径(1:补卡;2:管理员更改)", example = "0")
private Integer dktj3;
@ApiModelProperty(value = "下班2打卡时间 下班2打卡时间", example = "101") @ApiModelProperty(value = "下班2打卡时间 下班2打卡时间", example = "101")
private Long xbdk2; private Long xbdk2;
@ApiModelProperty(value = "下班2打卡结果 下班2打卡结果", example = "101") @ApiModelProperty(value = "下班2打卡结果 下班2打卡结果", example = "101")
private Integer xbdk2jg; private Integer xbdk2jg;
@ApiModelProperty(value = "打卡途径(1:补卡;2:管理员更改)", example = "0")
private Integer dktj4;
@ApiModelProperty(value = "上班3打卡时间 上班3打卡时间", example = "101") @ApiModelProperty(value = "上班3打卡时间 上班3打卡时间", example = "101")
private Long sbdk3; private Long sbdk3;
@ApiModelProperty(value = "上班3打卡结果 上班3打卡结果", example = "101") @ApiModelProperty(value = "上班3打卡结果 上班3打卡结果", example = "101")
private Integer sbdk3jg; private Integer sbdk3jg;
@ApiModelProperty(value = "打卡途径(1:补卡;2:管理员更改)", example = "0")
private Integer dktj5;
@ApiModelProperty(value = "下班3打卡时间 下班3打卡时间", example = "101") @ApiModelProperty(value = "下班3打卡时间 下班3打卡时间", example = "101")
private Long xbdk3; private Long xbdk3;
@ApiModelProperty(value = "下班3打卡结果 下班3打卡结果", example = "101") @ApiModelProperty(value = "下班3打卡结果 下班3打卡结果", example = "101")
private Integer xbdk3jg; private Integer xbdk3jg;
@ApiModelProperty(value = "打卡途径(1:补卡;2:管理员更改)", example = "0")
private Integer dktj6;
@ApiModelProperty(value = "应打卡次数 应打卡次数", example = "101") @ApiModelProperty(value = "应打卡次数 应打卡次数", example = "101")
private Integer ydkcs; private Integer ydkcs;
......
...@@ -584,6 +584,7 @@ public class LoginController { ...@@ -584,6 +584,7 @@ public class LoginController {
System.out.println("重复初始化数据!"); System.out.println("重复初始化数据!");
} }
// 绩效设置初始化
JxglBasicSetting bS = jxglService.selectAT(qyId); JxglBasicSetting bS = jxglService.selectAT(qyId);
if (bS == null) { if (bS == null) {
boolean res = jxglService.initJxglBasicSetting(qyId); boolean res = jxglService.initJxglBasicSetting(qyId);
......
...@@ -623,8 +623,8 @@ public class JxglController { ...@@ -623,8 +623,8 @@ public class JxglController {
* 修改-绩效管理状态 * 修改-绩效管理状态
*/ */
@PostMapping(value = "/update_performance_appraisal_sts") @PostMapping(value = "/update_performance_appraisal_sts")
@ApiOperation(value = "8.修改-绩效管理状态", httpMethod = "POST", notes = "修改-绩效管理状态") @ApiOperation(value = "9.修改-绩效管理状态", httpMethod = "POST", notes = "修改-绩效管理状态")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 9)
public Result<Object> updatePAS(@CurrentUser UserBean userBean, public Result<Object> updatePAS(@CurrentUser UserBean userBean,
@Validated @RequestBody AppraisalUpdateSts appraisalUpdateSts) { @Validated @RequestBody AppraisalUpdateSts appraisalUpdateSts) {
...@@ -644,7 +644,7 @@ public class JxglController { ...@@ -644,7 +644,7 @@ public class JxglController {
.id(appraisalUpdateSts.getId()) .id(appraisalUpdateSts.getId())
.sts(PerformanceAppraisalSts.PERFORMANCE_ARCHIVE.getType()) .sts(PerformanceAppraisalSts.PERFORMANCE_ARCHIVE.getType())
.build()); .build());
return ResultUtil.success(""); return ResultUtil.success();
} }
Integer sts = null; Integer sts = null;
...@@ -746,6 +746,34 @@ public class JxglController { ...@@ -746,6 +746,34 @@ public class JxglController {
} }
} }
break; break;
case 3:
// 修改 考核状态
jxglAppraisalMapper.update(
JxglAppraisal.builder().performanceAppraisalId(id).sts(AppraisalSts.PERFORMANCE_ARCHIVE.getType()).build(),
new UpdateWrapper<JxglAppraisal>().lambda()
.eq(JxglAppraisal::getPerformanceAppraisalId, id)
);
List<JxglAppraisal> listAppraisal = jxglAppraisalMapper.selectList(new QueryWrapper<JxglAppraisal>().lambda()
.select(JxglAppraisal::getId)
.eq(JxglAppraisal::getPerformanceAppraisalId, performanceAppraisal.getId()));
if (CollectionUtil.isNotEmpty(listAppraisal)) {
List<Integer> aIds2 = listAppraisal.stream().map(JxglAppraisal::getId).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(aIds2)) {
JxglAppraisalLog appraisalLog = JxglAppraisalLog.builder().build();
aIds2.forEach(aId -> {
appraisalLog.setId(null);
appraisalLog.setAppraisalId(aId);
appraisalLog.setExecutorId(userBean.getEmpNum());
appraisalLog.setExecutorName(userBean.getUserInfo().getName());
appraisalLog.setType(AppraisalLogType.PERFORMANCE_ARCHIVE.getType());
appraisalLog.insert();
});
}
}
break;
default: default:
break; break;
} }
...@@ -761,8 +789,8 @@ public class JxglController { ...@@ -761,8 +789,8 @@ public class JxglController {
* 终止-绩效考核 * 终止-绩效考核
*/ */
@PutMapping(value = "/termination_performance_appraisal") @PutMapping(value = "/termination_performance_appraisal")
@ApiOperation(value = "8.终止-绩效考核", httpMethod = "PUT", notes = "终止-绩效考核") @ApiOperation(value = "10.终止-绩效考核", httpMethod = "PUT", notes = "终止-绩效考核")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 10)
@Role @Role
@Log(title = "终止-绩效考核") @Log(title = "终止-绩效考核")
public Result<Object> terminationPA(@CurrentUser UserBean userBean,@NotNull @RequestParam Integer id) { public Result<Object> terminationPA(@CurrentUser UserBean userBean,@NotNull @RequestParam Integer id) {
...@@ -797,8 +825,9 @@ public class JxglController { ...@@ -797,8 +825,9 @@ public class JxglController {
List<Integer> aIds = listAppraisal.stream().map(JxglAppraisal::getId).collect(Collectors.toList()); List<Integer> aIds = listAppraisal.stream().map(JxglAppraisal::getId).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(aIds)) { if (CollectionUtil.isNotEmpty(aIds)) {
JxglAppraisalLog appraisalLog = JxglAppraisalLog.builder().build();
aIds.forEach(aId -> { aIds.forEach(aId -> {
JxglAppraisalLog appraisalLog = JxglAppraisalLog.builder().build(); appraisalLog.setId(null);
appraisalLog.setAppraisalId(aId); appraisalLog.setAppraisalId(aId);
appraisalLog.setExecutorId(userBean.getEmpNum()); appraisalLog.setExecutorId(userBean.getEmpNum());
appraisalLog.setExecutorName(userBean.getUserInfo().getName()); appraisalLog.setExecutorName(userBean.getUserInfo().getName());
...@@ -808,8 +837,6 @@ public class JxglController { ...@@ -808,8 +837,6 @@ public class JxglController {
} }
} }
return ResultUtil.success(); return ResultUtil.success();
} }
...@@ -838,8 +865,8 @@ public class JxglController { ...@@ -838,8 +865,8 @@ public class JxglController {
* 查询-绩效考核-列表-归档 * 查询-绩效考核-列表-归档
*/ */
@PostMapping(value = "/selects_performance_appraisal_archive") @PostMapping(value = "/selects_performance_appraisal_archive")
@ApiOperation(value = "8.查询-绩效考核-列表-归档", httpMethod = "POST", notes = "查询-绩效考核-列表-归档") @ApiOperation(value = "11.查询-绩效考核-列表-归档", httpMethod = "POST", notes = "查询-绩效考核-列表-归档")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 11)
@Role @Role
public Result<Object> selectsPAArchive(@CurrentUser UserBean userBean, public Result<Object> selectsPAArchive(@CurrentUser UserBean userBean,
@RequestBody PerformanceAppraisalQuery query) { @RequestBody PerformanceAppraisalQuery query) {
...@@ -859,8 +886,8 @@ public class JxglController { ...@@ -859,8 +886,8 @@ public class JxglController {
* 查询-绩效考核-列表-非归档 * 查询-绩效考核-列表-非归档
*/ */
@PostMapping(value = "/selects_performance_appraisal") @PostMapping(value = "/selects_performance_appraisal")
@ApiOperation(value = "9.查询-绩效考核-列表-非归档", httpMethod = "POST", notes = "查询-绩效考核-列表-非归档") @ApiOperation(value = "12.查询-绩效考核-列表-非归档", httpMethod = "POST", notes = "查询-绩效考核-列表-非归档")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 12)
@Role @Role
public Result<Object> selectsPA(@CurrentUser UserBean userBean, @RequestBody PerformanceAppraisalQuery query) { public Result<Object> selectsPA(@CurrentUser UserBean userBean, @RequestBody PerformanceAppraisalQuery query) {
...@@ -879,8 +906,8 @@ public class JxglController { ...@@ -879,8 +906,8 @@ public class JxglController {
* 查询-考核-列表 * 查询-考核-列表
*/ */
@PostMapping(value = "/selects_appraisal") @PostMapping(value = "/selects_appraisal")
@ApiOperation(value = "10.查询-考核-列表", httpMethod = "POST", notes = "查询-考核-列表") @ApiOperation(value = "13.查询-考核-列表", httpMethod = "POST", notes = "查询-考核-列表")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 13)
@Role @Role
public Result<Object> selectsA(@CurrentUser UserBean userBean, @RequestBody AppraisalQuery query) { public Result<Object> selectsA(@CurrentUser UserBean userBean, @RequestBody AppraisalQuery query) {
...@@ -916,8 +943,8 @@ public class JxglController { ...@@ -916,8 +943,8 @@ public class JxglController {
* 查询-考核-详情 * 查询-考核-详情
*/ */
@GetMapping(value = "/select_appraisal/{id}") @GetMapping(value = "/select_appraisal/{id}")
@ApiOperation(value = "11.查询-考核-详情", httpMethod = "GET", notes = "查询-考核-详情") @ApiOperation(value = "14.查询-考核-详情", httpMethod = "GET", notes = "查询-考核-详情")
@ApiOperationSupport(order = 11) @ApiOperationSupport(order = 14)
public Result<Object> selectA(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Object> selectA(@CurrentUser UserBean userBean, @PathVariable Integer id) {
AppraisalDetail aD = jxglAppraisalMapper.selectDetailById(userBean.getOrgCode(), id); AppraisalDetail aD = jxglAppraisalMapper.selectDetailById(userBean.getOrgCode(), id);
...@@ -949,8 +976,8 @@ public class JxglController { ...@@ -949,8 +976,8 @@ public class JxglController {
* 修改-流程执行人-转派 * 修改-流程执行人-转派
*/ */
@PutMapping(value = "/update_process_node") @PutMapping(value = "/update_process_node")
@ApiOperation(value = "12.修改-流程执行人-转派", httpMethod = "PUT", notes = "修改-流程执行人-转派") @ApiOperation(value = "15.修改-流程执行人-转派", httpMethod = "PUT", notes = "修改-流程执行人-转派")
@ApiOperationSupport(order = 12) @ApiOperationSupport(order = 15)
@Role @Role
public Result<Object> updatePN(@CurrentUser UserBean userBean, public Result<Object> updatePN(@CurrentUser UserBean userBean,
@Validated @RequestBody ProcessNodeUpdate processNodeUpdate) { @Validated @RequestBody ProcessNodeUpdate processNodeUpdate) {
...@@ -991,8 +1018,8 @@ public class JxglController { ...@@ -991,8 +1018,8 @@ public class JxglController {
* 终止-考核 * 终止-考核
*/ */
@PutMapping(value = "/termination_assessment") @PutMapping(value = "/termination_assessment")
@ApiOperation(value = "13.终止-考核", httpMethod = "PUT", notes = "终止-考核") @ApiOperation(value = "16.终止-考核", httpMethod = "PUT", notes = "终止-考核")
@ApiOperationSupport(order = 13) @ApiOperationSupport(order = 16)
@Role @Role
@Log(title = "终止-考核") @Log(title = "终止-考核")
public Result<Object> terminationAssessment(@CurrentUser UserBean userBean, @NotNull @RequestParam Integer id) { public Result<Object> terminationAssessment(@CurrentUser UserBean userBean, @NotNull @RequestParam Integer id) {
...@@ -1024,8 +1051,8 @@ public class JxglController { ...@@ -1024,8 +1051,8 @@ public class JxglController {
* 查询-绩效管理-员工绩效-汇总 * 查询-绩效管理-员工绩效-汇总
*/ */
@PostMapping(value = "/selects_emp_performance") @PostMapping(value = "/selects_emp_performance")
@ApiOperation(value = "14.查询-绩效管理-员工绩效-汇总", httpMethod = "POST", notes = " 查询-绩效管理-员工绩效-汇总") @ApiOperation(value = "17.查询-绩效管理-员工绩效-汇总", httpMethod = "POST", notes = " 查询-绩效管理-员工绩效-汇总")
@ApiOperationSupport(order = 14) @ApiOperationSupport(order = 17)
@Role @Role
public Result<Object> selectsEP(@CurrentUser UserBean userBean, @RequestBody EmpPerformanceQuery query) { public Result<Object> selectsEP(@CurrentUser UserBean userBean, @RequestBody EmpPerformanceQuery query) {
...@@ -1061,8 +1088,8 @@ public class JxglController { ...@@ -1061,8 +1088,8 @@ public class JxglController {
* 查询-某员工考核-列表 * 查询-某员工考核-列表
*/ */
@PostMapping(value = "/selects_emp_appraisal") @PostMapping(value = "/selects_emp_appraisal")
@ApiOperation(value = "15.查询-某员工考核-列表", httpMethod = "POST", notes = "查询-某员工考核-列表") @ApiOperation(value = "18.查询-某员工考核-列表", httpMethod = "POST", notes = "查询-某员工考核-列表")
@ApiOperationSupport(order = 15) @ApiOperationSupport(order = 18)
@Role @Role
public Result<Object> selectsEA(@CurrentUser UserBean userBean,@Validated @RequestBody EmpAppraisalQuery query) { public Result<Object> selectsEA(@CurrentUser UserBean userBean,@Validated @RequestBody EmpAppraisalQuery query) {
...@@ -1082,8 +1109,8 @@ public class JxglController { ...@@ -1082,8 +1109,8 @@ public class JxglController {
* 查询-我的绩效-考核我的-列表 * 查询-我的绩效-考核我的-列表
*/ */
@PostMapping(value = "/selects_my_appraisal") @PostMapping(value = "/selects_my_appraisal")
@ApiOperation(value = "15.查询-我的绩效-考核我的-列表", httpMethod = "POST", notes = "查询-我的绩效-考核我的-列表") @ApiOperation(value = "19.查询-我的绩效-考核我的-列表", httpMethod = "POST", notes = "查询-我的绩效-考核我的-列表")
@ApiOperationSupport(order = 15) @ApiOperationSupport(order = 19)
public Result<Object> selectsMA(@CurrentUser UserBean userBean,@Validated @RequestBody EmpAppraisalQuery query) { public Result<Object> selectsMA(@CurrentUser UserBean userBean,@Validated @RequestBody EmpAppraisalQuery query) {
IPage<JxglPerformanceAppraisal> page = new Page<JxglPerformanceAppraisal>(query.getCurrentPage(), IPage<JxglPerformanceAppraisal> page = new Page<JxglPerformanceAppraisal>(query.getCurrentPage(),
...@@ -1103,8 +1130,8 @@ public class JxglController { ...@@ -1103,8 +1130,8 @@ public class JxglController {
* 查询-绩效考核-方案 * 查询-绩效考核-方案
*/ */
@GetMapping(value = "/selects_performance_appraisal/{id}") @GetMapping(value = "/selects_performance_appraisal/{id}")
@ApiOperation(value = "16.查询-绩效考核-方案", httpMethod = "GET", notes = "查询-绩效考核-方案") @ApiOperation(value = "20.查询-绩效考核-方案", httpMethod = "GET", notes = "查询-绩效考核-方案")
@ApiOperationSupport(order = 16) @ApiOperationSupport(order = 20)
@Role @Role
public Result<Object> selectPA(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Object> selectPA(@CurrentUser UserBean userBean, @PathVariable Integer id) {
...@@ -1132,8 +1159,8 @@ public class JxglController { ...@@ -1132,8 +1159,8 @@ public class JxglController {
* 查询-目标待填写/目标待确认/评分/结果待确认-列表 * 查询-目标待填写/目标待确认/评分/结果待确认-列表
*/ */
@PostMapping(value = "/selects_my_performance") @PostMapping(value = "/selects_my_performance")
@ApiOperation(value = "17.查询-目标待填写/目标待确认/评分/结果待确认-列表", httpMethod = "POST", notes = "查询") @ApiOperation(value = "21.查询-目标待填写/目标待确认/评分/结果待确认-列表", httpMethod = "POST", notes = "查询")
@ApiOperationSupport(order = 17) @ApiOperationSupport(order = 21)
public Result<Object> selects(@CurrentUser UserBean userBean,@Validated @RequestBody MyPerformance query) { public Result<Object> selects(@CurrentUser UserBean userBean,@Validated @RequestBody MyPerformance query) {
IPage<JxglPerformanceAppraisal> page = new Page<JxglPerformanceAppraisal>(query.getCurrentPage(),query.getTotalPage()); IPage<JxglPerformanceAppraisal> page = new Page<JxglPerformanceAppraisal>(query.getCurrentPage(),query.getTotalPage());
...@@ -1157,12 +1184,10 @@ public class JxglController { ...@@ -1157,12 +1184,10 @@ public class JxglController {
* 查询-我的绩效-已处理-列表 * 查询-我的绩效-已处理-列表
*/ */
@PostMapping(value = "/selects_my_performance_processed") @PostMapping(value = "/selects_my_performance_processed")
@ApiOperation(value = "18.查询-我的绩效-已处理-列表", httpMethod = "POST", notes = "查询") @ApiOperation(value = "22.查询-我的绩效-已处理-列表", httpMethod = "POST", notes = "查询")
@ApiOperationSupport(order = 18) @ApiOperationSupport(order = 22)
public Result<Object> selectsP(@CurrentUser UserBean userBean) { public Result<Object> selectsP(@CurrentUser UserBean userBean, @Validated @RequestBody MyPerformance query) {
MyPerformance query = MyPerformance.builder().build();
IPage<JxglPerformanceAppraisal> page = new Page<JxglPerformanceAppraisal>(query.getCurrentPage(),query.getTotalPage()); IPage<JxglPerformanceAppraisal> page = new Page<JxglPerformanceAppraisal>(query.getCurrentPage(),query.getTotalPage());
query.setOrgCode(userBean.getOrgCode()); query.setOrgCode(userBean.getOrgCode());
query.setId(userBean.getEmpNum()); query.setId(userBean.getEmpNum());
...@@ -1179,8 +1204,8 @@ public class JxglController { ...@@ -1179,8 +1204,8 @@ public class JxglController {
* 目标填写-保存 * 目标填写-保存
*/ */
@PostMapping(value = "/save_target_fill") @PostMapping(value = "/save_target_fill")
@ApiOperation(value = "17.目标填写-保存", httpMethod = "POST", notes = "目标填写-保存") @ApiOperation(value = "23.目标填写-保存", httpMethod = "POST", notes = "目标填写-保存")
@ApiOperationSupport(order = 17) @ApiOperationSupport(order = 23)
public Result<Object> saveTF(@CurrentUser UserBean userBean, @RequestBody AppraisalUpdate appraisalUpdate) public Result<Object> saveTF(@CurrentUser UserBean userBean, @RequestBody AppraisalUpdate appraisalUpdate)
throws Exception { throws Exception {
...@@ -1271,8 +1296,8 @@ public class JxglController { ...@@ -1271,8 +1296,8 @@ public class JxglController {
* 目标填写-提交 * 目标填写-提交
*/ */
@PostMapping(value = "/submit_target_fill") @PostMapping(value = "/submit_target_fill")
@ApiOperation(value = "17.目标填写-提交", httpMethod = "POST", notes = "目标填写-提交") @ApiOperation(value = "24.目标填写-提交", httpMethod = "POST", notes = "目标填写-提交")
@ApiOperationSupport(order = 17) @ApiOperationSupport(order = 24)
public Result<Object> submitTF(@CurrentUser UserBean userBean, @RequestParam Integer id) { public Result<Object> submitTF(@CurrentUser UserBean userBean, @RequestParam Integer id) {
Integer count2 = jxglAppraisalMapper.selectCount(new QueryWrapper<JxglAppraisal>().lambda() Integer count2 = jxglAppraisalMapper.selectCount(new QueryWrapper<JxglAppraisal>().lambda()
...@@ -1354,8 +1379,8 @@ public class JxglController { ...@@ -1354,8 +1379,8 @@ public class JxglController {
* 目标确认-同意 * 目标确认-同意
*/ */
@PostMapping(value = "/update_target_confirmed") @PostMapping(value = "/update_target_confirmed")
@ApiOperation(value = "18.目标确认-同意", httpMethod = "POST", notes = "目标确认-同意") @ApiOperation(value = "25.目标确认-同意", httpMethod = "POST", notes = "目标确认-同意")
@ApiOperationSupport(order = 18) @ApiOperationSupport(order = 25)
public Result<Object> updateTC(@CurrentUser UserBean userBean, @RequestParam Integer id) { public Result<Object> updateTC(@CurrentUser UserBean userBean, @RequestParam Integer id) {
Integer count2 = jxglAppraisalMapper.selectCount(new QueryWrapper<JxglAppraisal>().lambda() Integer count2 = jxglAppraisalMapper.selectCount(new QueryWrapper<JxglAppraisal>().lambda()
...@@ -1422,8 +1447,8 @@ public class JxglController { ...@@ -1422,8 +1447,8 @@ public class JxglController {
* 目标确认-驳回目标 * 目标确认-驳回目标
*/ */
@PostMapping(value = "/update_target_confirmed_reject") @PostMapping(value = "/update_target_confirmed_reject")
@ApiOperation(value = "18.目标确认-驳回目标", httpMethod = "POST", notes = "目标确认-驳回目标") @ApiOperation(value = "26.目标确认-驳回目标", httpMethod = "POST", notes = "目标确认-驳回目标")
@ApiOperationSupport(order = 18) @ApiOperationSupport(order = 26)
public Result<Object> updateTCR(@CurrentUser UserBean userBean, @RequestBody AppraisalReject appraisalReject) { public Result<Object> updateTCR(@CurrentUser UserBean userBean, @RequestBody AppraisalReject appraisalReject) {
Integer count2 = jxglAppraisalMapper.selectCount( Integer count2 = jxglAppraisalMapper.selectCount(
...@@ -1490,8 +1515,8 @@ public class JxglController { ...@@ -1490,8 +1515,8 @@ public class JxglController {
* 评价 -驳回目标 * 评价 -驳回目标
*/ */
@PostMapping(value = "/update_superior_score_reject") @PostMapping(value = "/update_superior_score_reject")
@ApiOperation(value = "19.评价 -驳回目标", httpMethod = "POST", notes = "评价 -驳回目标") @ApiOperation(value = "27.评价 -驳回目标", httpMethod = "POST", notes = "评价 -驳回目标")
@ApiOperationSupport(order = 19) @ApiOperationSupport(order = 27)
public Result<Object> updateSSR(@CurrentUser UserBean userBean, @RequestBody AppraisalReject appraisalReject) { public Result<Object> updateSSR(@CurrentUser UserBean userBean, @RequestBody AppraisalReject appraisalReject) {
Integer count2 = jxglAppraisalMapper.selectCount( Integer count2 = jxglAppraisalMapper.selectCount(
...@@ -1570,8 +1595,8 @@ public class JxglController { ...@@ -1570,8 +1595,8 @@ public class JxglController {
* 上级评价 -驳回评分 * 上级评价 -驳回评分
*/ */
@PostMapping(value = "/update_superior_reject_score") @PostMapping(value = "/update_superior_reject_score")
@ApiOperation(value = "20.上级评价 -驳回评分", httpMethod = "POST", notes = "上级评价 -驳回评分") @ApiOperation(value = "28.上级评价 -驳回评分", httpMethod = "POST", notes = "上级评价 -驳回评分")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 28)
public Result<Object> updateSRS(@CurrentUser UserBean userBean,@Validated @RequestBody AppraisalReject appraisalReject) { public Result<Object> updateSRS(@CurrentUser UserBean userBean,@Validated @RequestBody AppraisalReject appraisalReject) {
Integer count2 = jxglAppraisalMapper.selectCount( Integer count2 = jxglAppraisalMapper.selectCount(
...@@ -1654,8 +1679,8 @@ public class JxglController { ...@@ -1654,8 +1679,8 @@ public class JxglController {
* 评分提交 * 评分提交
*/ */
@PostMapping(value = "/save_score") @PostMapping(value = "/save_score")
@ApiOperation(value = "22.评分提交", httpMethod = "POST", notes = "评分提交") @ApiOperation(value = "29.评分提交", httpMethod = "POST", notes = "评分提交")
@ApiOperationSupport(order = 22) @ApiOperationSupport(order = 29)
@Log(title = "评分提交") @Log(title = "评分提交")
public Result<Object> saveScore(@CurrentUser UserBean userBean, public Result<Object> saveScore(@CurrentUser UserBean userBean,
@Validated @RequestBody ValidList<AppraisalAssessment> appraisalAssessments) throws Exception{ @Validated @RequestBody ValidList<AppraisalAssessment> appraisalAssessments) throws Exception{
...@@ -1861,8 +1886,8 @@ public class JxglController { ...@@ -1861,8 +1886,8 @@ public class JxglController {
* 结果确认-确认 * 结果确认-确认
*/ */
@PostMapping(value = "/result_verification") @PostMapping(value = "/result_verification")
@ApiOperation(value = "23.结果确认-确认", httpMethod = "POST", notes = "结果确认-确认") @ApiOperation(value = "30.结果确认-确认", httpMethod = "POST", notes = "结果确认-确认")
@ApiOperationSupport(order = 23) @ApiOperationSupport(order = 30)
public Result<Object> resultVerification(@CurrentUser UserBean userBean, @RequestParam Integer id) { public Result<Object> resultVerification(@CurrentUser UserBean userBean, @RequestParam Integer id) {
Integer count = jxglAppraisalMapper.selectCount(new QueryWrapper<JxglAppraisal>().lambda() Integer count = jxglAppraisalMapper.selectCount(new QueryWrapper<JxglAppraisal>().lambda()
...@@ -1919,8 +1944,8 @@ public class JxglController { ...@@ -1919,8 +1944,8 @@ public class JxglController {
* 结果确认-改分 * 结果确认-改分
*/ */
@PostMapping(value = "/change_score") @PostMapping(value = "/change_score")
@ApiOperation(value = "24.结果确认-改分", httpMethod = "POST", notes = "结果确认-改分") @ApiOperation(value = "31.结果确认-改分", httpMethod = "POST", notes = "结果确认-改分")
@ApiOperationSupport(order = 24) @ApiOperationSupport(order = 31)
@Log(title = "绩效管理-结果确认-改分", businessType = BusinessType.UPDATE) @Log(title = "绩效管理-结果确认-改分", businessType = BusinessType.UPDATE)
public Result<Object> changeScore(@CurrentUser UserBean userBean, public Result<Object> changeScore(@CurrentUser UserBean userBean,
@Validated @RequestBody AppraisalAssessment appraisalAssessment) { @Validated @RequestBody AppraisalAssessment appraisalAssessment) {
...@@ -1984,8 +2009,8 @@ public class JxglController { ...@@ -1984,8 +2009,8 @@ public class JxglController {
* 查询-我的绩效-员工绩效 * 查询-我的绩效-员工绩效
*/ */
@PostMapping(value = "/selects_my_emp_performance") @PostMapping(value = "/selects_my_emp_performance")
@ApiOperation(value = "25.查询-我的绩效-员工绩效", httpMethod = "POST", notes = "查询-我的绩效-员工绩效") @ApiOperation(value = "32.查询-我的绩效-员工绩效", httpMethod = "POST", notes = "查询-我的绩效-员工绩效")
@ApiOperationSupport(order = 25) @ApiOperationSupport(order = 32)
@Log(title = "绩效管理-查询-我的绩效-员工绩效") @Log(title = "绩效管理-查询-我的绩效-员工绩效")
public Result<Object> selectsMEP(@CurrentUser UserBean userBean, @RequestBody EmpPerformanceQuery query) { public Result<Object> selectsMEP(@CurrentUser UserBean userBean, @RequestBody EmpPerformanceQuery query) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
......
...@@ -40,6 +40,7 @@ public class JxglServiceImpl implements JxglService { ...@@ -40,6 +40,7 @@ public class JxglServiceImpl implements JxglService {
res = !performanceRating.insert() && res ? false : res; res = !performanceRating.insert() && res ? false : res;
performanceRating.setId(null);
performanceRating.setBasicSettingId(bC.getId()); performanceRating.setBasicSettingId(bC.getId());
performanceRating.setName("B"); performanceRating.setName("B");
performanceRating.setSectionMinScore(60); performanceRating.setSectionMinScore(60);
...@@ -47,6 +48,7 @@ public class JxglServiceImpl implements JxglService { ...@@ -47,6 +48,7 @@ public class JxglServiceImpl implements JxglService {
performanceRating.setRanks(0); performanceRating.setRanks(0);
res = !performanceRating.insert() && res ? false : res; res = !performanceRating.insert() && res ? false : res;
performanceRating.setId(null);
performanceRating.setBasicSettingId(bC.getId()); performanceRating.setBasicSettingId(bC.getId());
performanceRating.setName("A"); performanceRating.setName("A");
performanceRating.setSectionMinScore(80); performanceRating.setSectionMinScore(80);
......
...@@ -2215,6 +2215,10 @@ public class TimeCardController { ...@@ -2215,6 +2215,10 @@ public class TimeCardController {
@ApiOperation(value = "更改打卡结果", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "更改打卡结果", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> ChangePunchResults(@CurrentUser UserBean userBean,@RequestBody ChangePunchResultsDto chpunchr) throws ParseException { public Result<Object> ChangePunchResults(@CurrentUser UserBean userBean,@RequestBody ChangePunchResultsDto chpunchr) throws ParseException {
String data = chpunchr.getData();//应更改时间yyyy-MMM-dd String data = chpunchr.getData();//应更改时间yyyy-MMM-dd
Long startDate = DateUtil.getStartTime(0,DateUtil.getStringTime(data,"yyyy-MM-dd")).getTime();
String attdate_ = new SimpleDateFormat("yy-MM-dd").format(Double.valueOf(startDate));//转换打卡时间格式
String minutes = chpunchr.getMinutes();//更改分钟数 String minutes = chpunchr.getMinutes();//更改分钟数
KqglAssoBcsz dkbc = kqglassobcszmapper.selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, chpunchr.getBcszid())); KqglAssoBcsz dkbc = kqglassobcszmapper.selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, chpunchr.getBcszid()));
...@@ -2251,61 +2255,112 @@ public class TimeCardController { ...@@ -2251,61 +2255,112 @@ public class TimeCardController {
long sbdk1 = 0,xbdk1 = 0,sbdk2 = 0,xbdk2 = 0,sbdk3 = 0,xbdk3 = 0; long sbdk1 = 0,xbdk1 = 0,sbdk2 = 0,xbdk2 = 0,sbdk3 = 0,xbdk3 = 0;
int sbdk1jg = 0,xbdk1jg = 0,sbdk2jg = 0,xbdk2jg = 0,sbdk3jg = 0,xbdk3jg = 0; int sbdk1jg = 0,xbdk1jg = 0,sbdk2jg = 0,xbdk2jg = 0,sbdk3jg = 0,xbdk3jg = 0;
int dkmxid = 0;
//kqgl_asso_dkmx 打卡明细是否存在打卡记录 //kqgl_asso_dkmx 打卡明细是否存在打卡记录
KqglAssoDkmx dkmx = kqglassodkmxmapper.selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getData, chpunchr.getData()).eq(KqglAssoDkmx::getUserid, chpunchr.getNum()).eq(KqglAssoDkmx::getQyid, userBean.getOrgCode())); KqglAssoDkmx dkmx = kqglassodkmxmapper.selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getData, chpunchr.getData()).eq(KqglAssoDkmx::getUserid, chpunchr.getNum()).eq(KqglAssoDkmx::getQyid, userBean.getOrgCode()));
if(dkmx != null) { if(dkmx != null) {
dkmxid = dkmx.getId();
if(chpunchr.getClocktype() == 1) {
sbdk1 = changed_time;
sbdk1jg = results;
KqglAssoDkmx.builder().id(dkmx.getId()).sbdk1(sbdk1).sbdk1jg(sbdk1jg).dktj1(2).build().updateById();
}else if(chpunchr.getClocktype() == 2) {
xbdk1 = changed_time;
xbdk1jg = results;
KqglAssoDkmx.builder().id(dkmx.getId()).xbdk1(xbdk1).xbdk1jg(xbdk1jg).dktj2(2).build().updateById();
}else if(chpunchr.getClocktype() == 3) {
sbdk2 = changed_time;
sbdk2jg = results;
KqglAssoDkmx.builder().id(dkmx.getId()).sbdk2(sbdk2).sbdk2jg(sbdk2jg).dktj3(2).build().updateById();
}else if(chpunchr.getClocktype() == 4) {
xbdk2 = changed_time;
xbdk2jg = results;
KqglAssoDkmx.builder().id(dkmx.getId()).xbdk2(xbdk2).xbdk2jg(xbdk2jg).dktj4(2).build().updateById();
}else if(chpunchr.getClocktype() == 5) {
sbdk3 = changed_time;
sbdk3jg = results;
KqglAssoDkmx.builder().id(dkmx.getId()).sbdk3(sbdk3).sbdk3jg(sbdk3jg).dktj5(2).build().updateById();
}else {
xbdk3 = changed_time;
xbdk3jg = results;
KqglAssoDkmx.builder().id(dkmx.getId()).xbdk3(xbdk3).xbdk3jg(xbdk3jg).dktj6(2).build().updateById();
}
}else {
KqglAssoDkmx pcd = KqglAssoDkmx.builder().userid(chpunchr.getNum()).data(data).qyid(userBean.getOrgCode()).dksj(startDate).ydkcs(dkbc.getSxbcs()*2)
.gzsc(0d).build();
if(chpunchr.getClocktype() == 1) { if(chpunchr.getClocktype() == 1) {
sbdk1 = changed_time; sbdk1 = changed_time;
sbdk1jg = results; sbdk1jg = results;
if(results == 0) {
sbdk1jg = -1;
}
KqglAssoDkmx.builder().id(dkmx.getId()).sbdk1(sbdk1).sbdk1jg(sbdk1jg).build().updateById(); pcd.setSbdk1(sbdk1);
pcd.setSbdk1jg(sbdk1jg);
pcd.setDktj1(2);
if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1");
}
}else if(chpunchr.getClocktype() == 2) { }else if(chpunchr.getClocktype() == 2) {
xbdk1 = changed_time; xbdk1 = changed_time;
xbdk1jg = results; xbdk1jg = results;
if(results == 0) {
xbdk1jg = -1;
}
KqglAssoDkmx.builder().id(dkmx.getId()).xbdk1(xbdk1).xbdk1jg(xbdk1jg).build().updateById(); pcd.setXbdk1(xbdk1);
pcd.setXbdk1jg(xbdk1jg);
pcd.setDktj2(2);
if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1");
}
}else if(chpunchr.getClocktype() == 3) { }else if(chpunchr.getClocktype() == 3) {
sbdk2 = changed_time; sbdk2 = changed_time;
sbdk2jg = results; sbdk2jg = results;
if(results == 0) {
sbdk2jg = -1; pcd.setSbdk2(sbdk2);
} pcd.setSbdk2jg(sbdk2jg);
KqglAssoDkmx.builder().id(dkmx.getId()).sbdk2(sbdk2).sbdk2jg(sbdk2jg).build().updateById(); pcd.setDktj3(2);
if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1");
}
}else if(chpunchr.getClocktype() == 4) { }else if(chpunchr.getClocktype() == 4) {
xbdk2 = changed_time; xbdk2 = changed_time;
xbdk2jg = results; xbdk2jg = results;
if(results == 0) {
xbdk2jg = -1; pcd.setXbdk2(xbdk2);
} pcd.setXbdk2jg(xbdk2jg);
KqglAssoDkmx.builder().id(dkmx.getId()).xbdk2(xbdk2).xbdk2jg(xbdk2jg).build().updateById(); pcd.setDktj4(2);
if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1");
}
}else if(chpunchr.getClocktype() == 5) { }else if(chpunchr.getClocktype() == 5) {
sbdk3 = changed_time; sbdk3 = changed_time;
sbdk3jg = results; sbdk3jg = results;
if(results == 0) {
sbdk3jg = -1; pcd.setSbdk3(sbdk3);
} pcd.setSbdk3jg(sbdk3jg);
KqglAssoDkmx.builder().id(dkmx.getId()).sbdk3(sbdk3).sbdk3jg(sbdk3jg).build().updateById(); pcd.setDktj5(2);
if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1");
}
}else { }else {
xbdk3 = changed_time; xbdk3 = changed_time;
xbdk3jg = results; xbdk3jg = results;
if(results == 0) {
xbdk3jg = -1; pcd.setXbdk3(xbdk3);
} pcd.setXbdk3jg(xbdk3jg);
KqglAssoDkmx.builder().id(dkmx.getId()).xbdk3(xbdk3).xbdk3jg(xbdk3jg).build().updateById(); pcd.setDktj6(2);
if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1");
}
} }
dkmxid = pcd.getId();
} }
//打卡记录表 //打卡记录表
clock_time_ = Long.valueOf(ClockInTool.dateToStamp(clock_time)); clock_time_ = Long.valueOf(ClockInTool.dateToStamp(clock_time));
Long startDate = DateUtil.getStartTime(0,DateUtil.getStringTime(data,"yyyy-MM-dd")).getTime();
String attdate_ = new SimpleDateFormat("yy-MM-dd").format(Double.valueOf(startDate));//转换打卡时间格式
int type = 0; int type = 0;
if((chpunchr.getClocktype())%2 > 0){ if((chpunchr.getClocktype())%2 > 0){
type = 1; type = 1;
...@@ -2314,7 +2369,7 @@ public class TimeCardController { ...@@ -2314,7 +2369,7 @@ public class TimeCardController {
} }
KqglAssoDkjl pre = KqglAssoDkjl.builder().dktime(changed_time).results(results).userId(chpunchr.getNum()).type(type).status(9).sort(chpunchr.getClocktype()) KqglAssoDkjl pre = KqglAssoDkjl.builder().dktime(changed_time).results(results).userId(chpunchr.getNum()).type(type).status(9).sort(chpunchr.getClocktype())
.cardType(3).qyid(userBean.getOrgCode()).attdate(attdate_+" "+ClockInTool.dateToWeek2(data)).attime(clock_time_).dkmxid(dkmx.getId()).bcid(chpunchr.getBcszid()).remarks("管理员改为正常").punchmode(0) .cardType(0).qyid(userBean.getOrgCode()).attdate(attdate_+" "+ClockInTool.dateToWeek2(data)).attime(clock_time_).dkmxid(dkmxid).bcid(chpunchr.getBcszid()).remarks("管理员更改操作").punchmode(0)
.punchequipment("").build(); .punchequipment("").build();
if (!pre.insert()) { if (!pre.insert()) {
throw new CustomException("打卡记录-新增异常"); throw new CustomException("打卡记录-新增异常");
......
...@@ -216,7 +216,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -216,7 +216,7 @@ public class KqglServiceImpl implements KqglService {
isRange = false; isRange = false;
} }
} }
int sbdkjg = -2; int sbdkjg = 0;
if(isRange) { if(isRange) {
Long time = (repaappr.getCardrepltime() - starttime1)/1000/60; Long time = (repaappr.getCardrepltime() - starttime1)/1000/60;
if(time > 0){//上班1打卡结果 if(time > 0){//上班1打卡结果
...@@ -228,7 +228,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -228,7 +228,7 @@ public class KqglServiceImpl implements KqglService {
Long time1 = (repaappr.getCardrepltime() - dkmc.getXbdk1())/1000/60; Long time1 = (repaappr.getCardrepltime() - dkmc.getXbdk1())/1000/60;
gzsctime = Math.abs(Double.valueOf(time1.toString()));//只打一次卡时计算工作时长 gzsctime = Math.abs(Double.valueOf(time1.toString()));//只打一次卡时计算工作时长
} }
KqglAssoDkmx.builder().id(dkmc.getId()).sbdk1(repaappr.getCardrepltime()).sbdk1jg(sbdkjg).gzsc(gzsctime).build().updateById(); KqglAssoDkmx.builder().id(dkmc.getId()).sbdk1(repaappr.getCardrepltime()).sbdk1jg(sbdkjg).dktj1(1).gzsc(gzsctime).build().updateById();
} }
atttype = 1; atttype = 1;
...@@ -245,7 +245,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -245,7 +245,7 @@ public class KqglServiceImpl implements KqglService {
isRange = false; isRange = false;
} }
} }
int xbdk1jg = -2; int xbdk1jg = 0;
if(isRange) { if(isRange) {
Long time = (repaappr.getCardrepltime() - endtime1)/1000/60; Long time = (repaappr.getCardrepltime() - endtime1)/1000/60;
...@@ -257,7 +257,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -257,7 +257,7 @@ public class KqglServiceImpl implements KqglService {
Long time1 = (repaappr.getCardrepltime() - dkmc.getSbdk1())/1000/60; Long time1 = (repaappr.getCardrepltime() - dkmc.getSbdk1())/1000/60;
gzsctime = Math.abs(Double.valueOf(time1.toString())); gzsctime = Math.abs(Double.valueOf(time1.toString()));
} }
KqglAssoDkmx.builder().id(dkmc.getId()).xbdk1(repaappr.getCardrepltime()).xbdk1jg(xbdk1jg).gzsc(gzsctime).build().updateById(); KqglAssoDkmx.builder().id(dkmc.getId()).xbdk1(repaappr.getCardrepltime()).xbdk1jg(xbdk1jg).dktj2(1).gzsc(gzsctime).build().updateById();
} }
atttype = 2; atttype = 2;
...@@ -268,14 +268,14 @@ public class KqglServiceImpl implements KqglService { ...@@ -268,14 +268,14 @@ public class KqglServiceImpl implements KqglService {
if(repaappr.getCardreplperiod() == 1) { if(repaappr.getCardreplperiod() == 1) {
boolean sb1 = verification_range(starttime1ks,starttime1js,repaappr.getCardrepltime()); boolean sb1 = verification_range(starttime1ks,starttime1js,repaappr.getCardrepltime());
if(sb1 && dkmc.getSbdk1() == null) { if(sb1 && dkmc.getSbdk1() == null) {
int sbdkjg = -2; int sbdkjg = 0;
Long time = (repaappr.getCardrepltime() - starttime1)/1000/60; Long time = (repaappr.getCardrepltime() - starttime1)/1000/60;
if(time > 0){//上班1打卡结果 if(time > 0){//上班1打卡结果
sbdkjg = Math.abs(Integer.valueOf(time.toString())); sbdkjg = Math.abs(Integer.valueOf(time.toString()));
} }
Double gzsctime = null;//工作时长 Double gzsctime = null;//工作时长
KqglAssoDkmx.builder().id(dkmc.getId()).sbdk1(repaappr.getCardrepltime()).sbdk1jg(sbdkjg).gzsc(gzsctime).build().updateById(); KqglAssoDkmx.builder().id(dkmc.getId()).sbdk1(repaappr.getCardrepltime()).sbdk1jg(sbdkjg).dktj1(1).gzsc(gzsctime).build().updateById();
atttype = 1; atttype = 1;
results = sbdkjg; results = sbdkjg;
...@@ -284,14 +284,14 @@ public class KqglServiceImpl implements KqglService { ...@@ -284,14 +284,14 @@ public class KqglServiceImpl implements KqglService {
boolean sb2 = verification_range(starttime2ks,starttime2js,repaappr.getCardrepltime()); boolean sb2 = verification_range(starttime2ks,starttime2js,repaappr.getCardrepltime());
if(sb2 && dkmc.getSbdk2() == null) { if(sb2 && dkmc.getSbdk2() == null) {
int sbdkjg = -2; int sbdkjg = 0;
Long time = (repaappr.getCardrepltime() - starttime2)/1000/60; Long time = (repaappr.getCardrepltime() - starttime2)/1000/60;
if(time > 0){//上班1打卡结果 if(time > 0){//上班1打卡结果
sbdkjg = Math.abs(Integer.valueOf(time.toString())); sbdkjg = Math.abs(Integer.valueOf(time.toString()));
} }
Double gzsctime = null;//工作时长 Double gzsctime = null;//工作时长
KqglAssoDkmx.builder().id(dkmc.getId()).sbdk2(repaappr.getCardrepltime()).sbdk2jg(sbdkjg).gzsc(gzsctime).build().updateById(); KqglAssoDkmx.builder().id(dkmc.getId()).sbdk2(repaappr.getCardrepltime()).sbdk2jg(sbdkjg).dktj3(1).gzsc(gzsctime).build().updateById();
atttype = 3; atttype = 3;
results = sbdkjg; results = sbdkjg;
...@@ -301,14 +301,14 @@ public class KqglServiceImpl implements KqglService { ...@@ -301,14 +301,14 @@ public class KqglServiceImpl implements KqglService {
}else if(repaappr.getCardreplperiod() == 2) { }else if(repaappr.getCardreplperiod() == 2) {
boolean xb1 = verification_range(endtime1ks,endtime1js,repaappr.getCardrepltime()); boolean xb1 = verification_range(endtime1ks,endtime1js,repaappr.getCardrepltime());
if(xb1 && dkmc.getXbdk1() == null) { if(xb1 && dkmc.getXbdk1() == null) {
int xbdk1jg = -2; int xbdk1jg = 0;
Long time = (repaappr.getCardrepltime() - endtime1)/1000/60; Long time = (repaappr.getCardrepltime() - endtime1)/1000/60;
if(time > 0){}else{ if(time > 0){}else{
xbdk1jg = Math.abs(Integer.valueOf(time.toString())); xbdk1jg = Math.abs(Integer.valueOf(time.toString()));
} }
Double gzsctime = null;//工作时长 Double gzsctime = null;//工作时长
KqglAssoDkmx.builder().id(dkmc.getId()).xbdk1(repaappr.getCardrepltime()).xbdk1jg(xbdk1jg).gzsc(gzsctime).build().updateById(); KqglAssoDkmx.builder().id(dkmc.getId()).xbdk1(repaappr.getCardrepltime()).xbdk1jg(xbdk1jg).dktj2(1).gzsc(gzsctime).build().updateById();
atttype = 2; atttype = 2;
results = xbdk1jg; results = xbdk1jg;
...@@ -317,14 +317,14 @@ public class KqglServiceImpl implements KqglService { ...@@ -317,14 +317,14 @@ public class KqglServiceImpl implements KqglService {
boolean xb2 = verification_range(endtime2ks,endtime2js,repaappr.getCardrepltime()); boolean xb2 = verification_range(endtime2ks,endtime2js,repaappr.getCardrepltime());
if(xb2 && dkmc.getXbdk2() == null) { if(xb2 && dkmc.getXbdk2() == null) {
int xbdk2jg = -2; int xbdk2jg = 0;
Long time = (repaappr.getCardrepltime() - endtime2)/1000/60; Long time = (repaappr.getCardrepltime() - endtime2)/1000/60;
if(time > 0){}else{ if(time > 0){}else{
xbdk2jg = Math.abs(Integer.valueOf(time.toString())); xbdk2jg = Math.abs(Integer.valueOf(time.toString()));
} }
Double gzsctime = null;//工作时长 Double gzsctime = null;//工作时长
KqglAssoDkmx.builder().id(dkmc.getId()).xbdk2(repaappr.getCardrepltime()).xbdk2jg(xbdk2jg).gzsc(gzsctime).build().updateById(); KqglAssoDkmx.builder().id(dkmc.getId()).xbdk2(repaappr.getCardrepltime()).xbdk2jg(xbdk2jg).dktj4(1).gzsc(gzsctime).build().updateById();
atttype = 4; atttype = 4;
results = xbdk2jg; results = xbdk2jg;
...@@ -336,14 +336,14 @@ public class KqglServiceImpl implements KqglService { ...@@ -336,14 +336,14 @@ public class KqglServiceImpl implements KqglService {
if(repaappr.getCardreplperiod() == 1) { if(repaappr.getCardreplperiod() == 1) {
boolean sb3 = verification_range(starttime3ks,starttime3js,repaappr.getCardrepltime()); boolean sb3 = verification_range(starttime3ks,starttime3js,repaappr.getCardrepltime());
if(sb3 && dkmc.getSbdk3() == null) { if(sb3 && dkmc.getSbdk3() == null) {
int sbdkjg = -2; int sbdkjg = 0;
Long time = (repaappr.getCardrepltime() - starttime3)/1000/60; Long time = (repaappr.getCardrepltime() - starttime3)/1000/60;
if(time > 0){//上班1打卡结果 if(time > 0){//上班1打卡结果
sbdkjg = Math.abs(Integer.valueOf(time.toString())); sbdkjg = Math.abs(Integer.valueOf(time.toString()));
} }
Double gzsctime = null;//工作时长 Double gzsctime = null;//工作时长
KqglAssoDkmx.builder().id(dkmc.getId()).sbdk3(repaappr.getCardrepltime()).sbdk3jg(sbdkjg).gzsc(gzsctime).build().updateById(); KqglAssoDkmx.builder().id(dkmc.getId()).sbdk3(repaappr.getCardrepltime()).sbdk3jg(sbdkjg).dktj5(1).gzsc(gzsctime).build().updateById();
atttype = 5; atttype = 5;
results = sbdkjg; results = sbdkjg;
attime = starttime3; attime = starttime3;
...@@ -352,14 +352,14 @@ public class KqglServiceImpl implements KqglService { ...@@ -352,14 +352,14 @@ public class KqglServiceImpl implements KqglService {
}else if(repaappr.getCardreplperiod() == 2) { }else if(repaappr.getCardreplperiod() == 2) {
boolean xb3 = verification_range(endtime3ks,endtime3js,repaappr.getCardrepltime()); boolean xb3 = verification_range(endtime3ks,endtime3js,repaappr.getCardrepltime());
if(xb3 && dkmc.getXbdk3() == null) { if(xb3 && dkmc.getXbdk3() == null) {
int xbdk3jg = -2; int xbdk3jg = 0;
Long time = (repaappr.getCardrepltime() - endtime3)/1000/60; Long time = (repaappr.getCardrepltime() - endtime3)/1000/60;
if(time > 0){}else{ if(time > 0){}else{
xbdk3jg = Math.abs(Integer.valueOf(time.toString())); xbdk3jg = Math.abs(Integer.valueOf(time.toString()));
} }
Double gzsctime = null;//工作时长 Double gzsctime = null;//工作时长
KqglAssoDkmx.builder().id(dkmc.getId()).xbdk3(repaappr.getCardrepltime()).xbdk3jg(xbdk3jg).gzsc(gzsctime).build().updateById(); KqglAssoDkmx.builder().id(dkmc.getId()).xbdk3(repaappr.getCardrepltime()).xbdk3jg(xbdk3jg).dktj6(1).gzsc(gzsctime).build().updateById();
atttype = 6; atttype = 6;
results = xbdk3jg; results = xbdk3jg;
attime = endtime3; attime = endtime3;
...@@ -388,7 +388,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -388,7 +388,7 @@ public class KqglServiceImpl implements KqglService {
isRange = false; isRange = false;
} }
} }
int sbdkjg = -2; int sbdkjg = 0;
if(isRange) { if(isRange) {
Long time = (repaappr.getCardrepltime() - starttime1)/1000/60; Long time = (repaappr.getCardrepltime() - starttime1)/1000/60;
if(time > 0){//上班1打卡结果 if(time > 0){//上班1打卡结果
...@@ -397,6 +397,8 @@ public class KqglServiceImpl implements KqglService { ...@@ -397,6 +397,8 @@ public class KqglServiceImpl implements KqglService {
pcd.setSbdk1(repaappr.getCardrepltime()); pcd.setSbdk1(repaappr.getCardrepltime());
pcd.setSbdk1jg(sbdkjg); pcd.setSbdk1jg(sbdkjg);
pcd.setDktj1(1);
if (!pcd.insert()) { if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1"); throw new CustomException("打卡明细-新增异常-1");
...@@ -417,7 +419,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -417,7 +419,7 @@ public class KqglServiceImpl implements KqglService {
isRange = false; isRange = false;
} }
} }
int xbdk1jg = -2; int xbdk1jg = 0;
if(isRange) { if(isRange) {
Long time = (repaappr.getCardrepltime() - endtime1)/1000/60; Long time = (repaappr.getCardrepltime() - endtime1)/1000/60;
...@@ -427,6 +429,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -427,6 +429,7 @@ public class KqglServiceImpl implements KqglService {
pcd.setXbdk1(repaappr.getCardrepltime()); pcd.setXbdk1(repaappr.getCardrepltime());
pcd.setXbdk1jg(xbdk1jg); pcd.setXbdk1jg(xbdk1jg);
pcd.setDktj2(1);
if (!pcd.insert()) { if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1"); throw new CustomException("打卡明细-新增异常-1");
...@@ -441,7 +444,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -441,7 +444,7 @@ public class KqglServiceImpl implements KqglService {
if(repaappr.getCardreplperiod() == 1) { if(repaappr.getCardreplperiod() == 1) {
boolean sb1 = verification_range(starttime1ks,starttime1js,repaappr.getCardrepltime()); boolean sb1 = verification_range(starttime1ks,starttime1js,repaappr.getCardrepltime());
if(sb1) { if(sb1) {
int sbdkjg = -2; int sbdkjg = 0;
Long time = (repaappr.getCardrepltime() - starttime1)/1000/60; Long time = (repaappr.getCardrepltime() - starttime1)/1000/60;
if(time > 0){//上班1打卡结果 if(time > 0){//上班1打卡结果
sbdkjg = Math.abs(Integer.valueOf(time.toString())); sbdkjg = Math.abs(Integer.valueOf(time.toString()));
...@@ -449,6 +452,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -449,6 +452,7 @@ public class KqglServiceImpl implements KqglService {
pcd.setSbdk1(repaappr.getCardrepltime()); pcd.setSbdk1(repaappr.getCardrepltime());
pcd.setSbdk1jg(sbdkjg); pcd.setSbdk1jg(sbdkjg);
pcd.setDktj1(1);
if (!pcd.insert()) { if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1"); throw new CustomException("打卡明细-新增异常-1");
...@@ -461,7 +465,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -461,7 +465,7 @@ public class KqglServiceImpl implements KqglService {
boolean sb2 = verification_range(starttime2ks,starttime2js,repaappr.getCardrepltime()); boolean sb2 = verification_range(starttime2ks,starttime2js,repaappr.getCardrepltime());
if(sb2) { if(sb2) {
int sbdkjg = -2; int sbdkjg = 0;
Long time = (repaappr.getCardrepltime() - starttime2)/1000/60; Long time = (repaappr.getCardrepltime() - starttime2)/1000/60;
if(time > 0){//上班1打卡结果 if(time > 0){//上班1打卡结果
sbdkjg = Math.abs(Integer.valueOf(time.toString())); sbdkjg = Math.abs(Integer.valueOf(time.toString()));
...@@ -469,6 +473,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -469,6 +473,7 @@ public class KqglServiceImpl implements KqglService {
pcd.setSbdk2(repaappr.getCardrepltime()); pcd.setSbdk2(repaappr.getCardrepltime());
pcd.setSbdk2jg(sbdkjg); pcd.setSbdk2jg(sbdkjg);
pcd.setDktj3(1);
if (!pcd.insert()) { if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1"); throw new CustomException("打卡明细-新增异常-1");
...@@ -482,7 +487,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -482,7 +487,7 @@ public class KqglServiceImpl implements KqglService {
}else if(repaappr.getCardreplperiod() == 2) { }else if(repaappr.getCardreplperiod() == 2) {
boolean xb1 = verification_range(endtime1ks,endtime1js,repaappr.getCardrepltime()); boolean xb1 = verification_range(endtime1ks,endtime1js,repaappr.getCardrepltime());
if(xb1) { if(xb1) {
int xbdk1jg = -2; int xbdk1jg = 0;
Long time = (repaappr.getCardrepltime() - endtime1)/1000/60; Long time = (repaappr.getCardrepltime() - endtime1)/1000/60;
if(time > 0){}else{ if(time > 0){}else{
xbdk1jg = Math.abs(Integer.valueOf(time.toString())); xbdk1jg = Math.abs(Integer.valueOf(time.toString()));
...@@ -490,6 +495,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -490,6 +495,7 @@ public class KqglServiceImpl implements KqglService {
pcd.setXbdk1(repaappr.getCardrepltime()); pcd.setXbdk1(repaappr.getCardrepltime());
pcd.setXbdk1jg(xbdk1jg); pcd.setXbdk1jg(xbdk1jg);
pcd.setDktj2(1);
if (!pcd.insert()) { if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1"); throw new CustomException("打卡明细-新增异常-1");
...@@ -502,13 +508,14 @@ public class KqglServiceImpl implements KqglService { ...@@ -502,13 +508,14 @@ public class KqglServiceImpl implements KqglService {
boolean xb2 = verification_range(endtime2ks,endtime2js,repaappr.getCardrepltime()); boolean xb2 = verification_range(endtime2ks,endtime2js,repaappr.getCardrepltime());
if(xb2) { if(xb2) {
int xbdk2jg = -2; int xbdk2jg = 0;
Long time = (repaappr.getCardrepltime() - endtime2)/1000/60; Long time = (repaappr.getCardrepltime() - endtime2)/1000/60;
if(time > 0){}else{ if(time > 0){}else{
xbdk2jg = Math.abs(Integer.valueOf(time.toString())); xbdk2jg = Math.abs(Integer.valueOf(time.toString()));
} }
pcd.setXbdk2(repaappr.getCardrepltime()); pcd.setXbdk2(repaappr.getCardrepltime());
pcd.setXbdk2jg(xbdk2jg); pcd.setXbdk2jg(xbdk2jg);
pcd.setDktj4(1);
if (!pcd.insert()) { if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1"); throw new CustomException("打卡明细-新增异常-1");
...@@ -524,7 +531,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -524,7 +531,7 @@ public class KqglServiceImpl implements KqglService {
if(repaappr.getCardreplperiod() == 1) { if(repaappr.getCardreplperiod() == 1) {
boolean sb3 = verification_range(starttime3ks,starttime3js,repaappr.getCardrepltime()); boolean sb3 = verification_range(starttime3ks,starttime3js,repaappr.getCardrepltime());
if(sb3) { if(sb3) {
int sbdkjg = -2; int sbdkjg = 0;
Long time = (repaappr.getCardrepltime() - starttime3)/1000/60; Long time = (repaappr.getCardrepltime() - starttime3)/1000/60;
if(time > 0){//上班1打卡结果 if(time > 0){//上班1打卡结果
sbdkjg = Math.abs(Integer.valueOf(time.toString())); sbdkjg = Math.abs(Integer.valueOf(time.toString()));
...@@ -532,6 +539,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -532,6 +539,7 @@ public class KqglServiceImpl implements KqglService {
pcd.setSbdk3(repaappr.getCardrepltime()); pcd.setSbdk3(repaappr.getCardrepltime());
pcd.setSbdk3jg(sbdkjg); pcd.setSbdk3jg(sbdkjg);
pcd.setDktj5(1);
if (!pcd.insert()) { if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1"); throw new CustomException("打卡明细-新增异常-1");
...@@ -545,7 +553,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -545,7 +553,7 @@ public class KqglServiceImpl implements KqglService {
}else if(repaappr.getCardreplperiod() == 2) { }else if(repaappr.getCardreplperiod() == 2) {
boolean xb3 = verification_range(endtime3ks,endtime3js,repaappr.getCardrepltime()); boolean xb3 = verification_range(endtime3ks,endtime3js,repaappr.getCardrepltime());
if(xb3) { if(xb3) {
int xbdk3jg = -2; int xbdk3jg = 0;
Long time = (repaappr.getCardrepltime() - endtime3)/1000/60; Long time = (repaappr.getCardrepltime() - endtime3)/1000/60;
if(time > 0){}else{ if(time > 0){}else{
xbdk3jg = Math.abs(Integer.valueOf(time.toString())); xbdk3jg = Math.abs(Integer.valueOf(time.toString()));
...@@ -554,6 +562,7 @@ public class KqglServiceImpl implements KqglService { ...@@ -554,6 +562,7 @@ public class KqglServiceImpl implements KqglService {
pcd.setXbdk3(repaappr.getCardrepltime()); pcd.setXbdk3(repaappr.getCardrepltime());
pcd.setXbdk3jg(xbdk3jg); pcd.setXbdk3jg(xbdk3jg);
pcd.setDktj6(1);
if (!pcd.insert()) { if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1"); throw new CustomException("打卡明细-新增异常-1");
......
...@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
...@@ -34,6 +35,7 @@ import cn.hutool.core.util.StrUtil; ...@@ -34,6 +35,7 @@ import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.aspect.lang.annotation.Log; import cn.timer.api.aspect.lang.annotation.Log;
import cn.timer.api.aspect.lang.enums.BusinessType; import cn.timer.api.aspect.lang.enums.BusinessType;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.spmk.SpmkApprovalG; import cn.timer.api.bean.spmk.SpmkApprovalG;
import cn.timer.api.bean.spmk.SpmkApprovalTemplate; import cn.timer.api.bean.spmk.SpmkApprovalTemplate;
import cn.timer.api.bean.spmk.SpmkApprovalTemplateG; import cn.timer.api.bean.spmk.SpmkApprovalTemplateG;
...@@ -52,6 +54,7 @@ import cn.timer.api.config.enuminterface.SpmkEnumInterface; ...@@ -52,6 +54,7 @@ import cn.timer.api.config.enuminterface.SpmkEnumInterface;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ApproveSummarySts; import cn.timer.api.config.enuminterface.SpmkEnumInterface.ApproveSummarySts;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts; import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts;
import cn.timer.api.config.enums.CommonEnum; import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.config.enums.SysRoleType;
import cn.timer.api.config.exception.CustomException; import cn.timer.api.config.exception.CustomException;
import cn.timer.api.config.validation.Insert; import cn.timer.api.config.validation.Insert;
import cn.timer.api.config.validation.Ranks; import cn.timer.api.config.validation.Ranks;
...@@ -60,6 +63,7 @@ import cn.timer.api.config.validation.ValidList; ...@@ -60,6 +63,7 @@ import cn.timer.api.config.validation.ValidList;
import cn.timer.api.controller.spmk.service.SpmkService; import cn.timer.api.controller.spmk.service.SpmkService;
import cn.timer.api.controller.yggl.service.YgglService; import cn.timer.api.controller.yggl.service.YgglService;
import cn.timer.api.controller.zzgl.service.ZzglBmgwMService; import cn.timer.api.controller.zzgl.service.ZzglBmgwMService;
import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper;
import cn.timer.api.dao.spmk.SpmkApprovalGMapper; import cn.timer.api.dao.spmk.SpmkApprovalGMapper;
import cn.timer.api.dao.spmk.SpmkApprovalTemplateGMapper; import cn.timer.api.dao.spmk.SpmkApprovalTemplateGMapper;
import cn.timer.api.dao.spmk.SpmkApprovalTemplateMapper; import cn.timer.api.dao.spmk.SpmkApprovalTemplateMapper;
...@@ -103,6 +107,8 @@ public class SpmkController { ...@@ -103,6 +107,8 @@ public class SpmkController {
private ZzglBmgwMService zzglBmgwMService; private ZzglBmgwMService zzglBmgwMService;
@Autowired @Autowired
private QyzxEmpEntAssoMapper qyzxEmpEntAssoMapper;
@Autowired
private SpmkApprovalTemplateGMapper spmkApprovalTemplateGMapper; private SpmkApprovalTemplateGMapper spmkApprovalTemplateGMapper;
@Autowired @Autowired
private SpmkApprovalTemplateMapper spmkApprovalTemplateMapper; private SpmkApprovalTemplateMapper spmkApprovalTemplateMapper;
...@@ -691,7 +697,17 @@ public class SpmkController { ...@@ -691,7 +697,17 @@ public class SpmkController {
.eq(SpmkExecutor::getId, approvingDto.getExecutorId()) .eq(SpmkExecutor::getId, approvingDto.getExecutorId())
.eq(SpmkExecutor::getEmpNum, userBean.getEmpNum()) .eq(SpmkExecutor::getEmpNum, userBean.getEmpNum())
.eq(SpmkExecutor::getSts, SpmkEnumInterface.ExecutorSts.IN_EXECUTION.ordinal())) == 0) { .eq(SpmkExecutor::getSts, SpmkEnumInterface.ExecutorSts.IN_EXECUTION.ordinal())) == 0) {
return ResultUtil.error("非当前审批人,无法审批!");
Integer adminNum = new LambdaQueryChainWrapper<QyzxEmpEntAsso>(qyzxEmpEntAssoMapper)
.eq(QyzxEmpEntAsso::getEmpNum, userBean.getEmpNum())
.eq(QyzxEmpEntAsso::getOrgCode, userBean.getOrgCode())
.in(QyzxEmpEntAsso::getUserType, SysRoleType.U_TYPE_ADMIN,SysRoleType.U_TYPE_C_ADMIN)
.count();
if (adminNum <= 0) {
return ResultUtil.error("非当前审批人 或 管理员,无法操作!");
}
} }
if (aSummary.getSts() == 0) { if (aSummary.getSts() == 0) {
......
...@@ -1309,8 +1309,7 @@ public class YgglController { ...@@ -1309,8 +1309,7 @@ public class YgglController {
LambdaQueryWrapper<QyzxEmpEntAsso> queryWrapper = new QueryWrapper<QyzxEmpEntAsso>().lambda() LambdaQueryWrapper<QyzxEmpEntAsso> queryWrapper = new QueryWrapper<QyzxEmpEntAsso>().lambda()
.eq(QyzxEmpEntAsso::getEmpNum, empNum) .eq(QyzxEmpEntAsso::getEmpNum, empNum)
.eq(QyzxEmpEntAsso::getOrgCode, userBean.getOrgCode()) .eq(QyzxEmpEntAsso::getOrgCode, userBean.getOrgCode());
;
// 确认离职 删除员工关联表 // 确认离职 删除员工关联表
qyzxEmpEntAssoMapper.delete(queryWrapper); qyzxEmpEntAssoMapper.delete(queryWrapper);
...@@ -1322,7 +1321,8 @@ public class YgglController { ...@@ -1322,7 +1321,8 @@ public class YgglController {
.eq(ZzglBmgwM::getLeader, empNum)); .eq(ZzglBmgwM::getLeader, empNum));
// 更新当前企业 // 更新当前企业
List<QyzxEmpEntAsso> listEEA = qyzxEmpEntAssoMapper.selectList(queryWrapper); List<QyzxEmpEntAsso> listEEA = qyzxEmpEntAssoMapper.selectList(new QueryWrapper<QyzxEmpEntAsso>().lambda()
.eq(QyzxEmpEntAsso::getEmpNum, empNum));
if (listEEA != null && listEEA.size() > 0) { if (listEEA != null && listEEA.size() > 0) {
QyzxEmpLogin.builder().id(empNum).orgId(CollUtil.getFirst(listEEA).getOrgCode()).build().updateById(); QyzxEmpLogin.builder().id(empNum).orgId(CollUtil.getFirst(listEEA).getOrgCode()).build().updateById();
} }
......
...@@ -38,6 +38,13 @@ public class DailyDetailsDto { ...@@ -38,6 +38,13 @@ public class DailyDetailsDto {
private String bcxbdk2; private String bcxbdk2;
private String bcsbdk3; private String bcsbdk3;
private String bcxbdk3; private String bcxbdk3;
private Integer dktj1;
private Integer dktj2;
private Integer dktj3;
private Integer dktj4;
private Integer dktj5;
private Integer dktj6;
private String sbdk1;// 上班1打卡时间 private String sbdk1;// 上班1打卡时间
private Integer sbdk1jg;// 上班1打卡结果 private Integer sbdk1jg;// 上班1打卡结果
......
...@@ -99,6 +99,35 @@ public class DateUtil { ...@@ -99,6 +99,35 @@ public class DateUtil {
return 0; return 0;
} }
/**
* 将String时间转换为时间戳
*
* @param time
* @return
* @throws ParseException
*/
public static Date getFormatDate(String time) throws ParseException {
if (StrUtil.isNotBlank(time)) {
switch (time.length()) {
case 10:
return getStringDate(time, "yyyy-MM-dd");
case 16:
return getStringDate(time, "yyyy-MM-dd HH:mm");
case 19:
return getStringDate(time, "yyyy-MM-dd HH:mm:ss");
default:
break;
}
return null;
}
return null;
}
/** /**
* 将String时间转换为时间戳 * 将String时间转换为时间戳
...@@ -107,6 +136,19 @@ public class DateUtil { ...@@ -107,6 +136,19 @@ public class DateUtil {
* @return * @return
* @throws ParseException * @throws ParseException
*/ */
public static Date getStringDate(String time, String format)
throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
return simpleDateFormat.parse(time);
}
/**
* 将String时间转换为 Date
*
* @param time
* @return
* @throws ParseException
*/
public static long getStringTime(String time, String format) public static long getStringTime(String time, String format)
throws ParseException { throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
......
...@@ -50,8 +50,8 @@ public class GoOutBusiness extends SpmkAssoBusiness { ...@@ -50,8 +50,8 @@ public class GoOutBusiness extends SpmkAssoBusiness {
.orgcode(orgCode) .orgcode(orgCode)
.evectionid(Convert.toInt(approveId)) .evectionid(Convert.toInt(approveId))
.evectiontype(2) .evectiontype(2)
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss")) .starttime(DateUtil.getFormat(startTime))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss")) .endtime(DateUtil.getFormat(endTime))
.duration(Convert.toDouble(longTime)) .duration(Convert.toDouble(longTime))
.build(); .build();
......
...@@ -15,6 +15,7 @@ import cn.timer.api.controller.yggl.service.YgglService; ...@@ -15,6 +15,7 @@ import cn.timer.api.controller.yggl.service.YgglService;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.dto.yggl.YgzzDto; import cn.timer.api.dto.yggl.YgzzDto;
import cn.timer.api.utils.DateFormatUtils; import cn.timer.api.utils.DateFormatUtils;
import cn.timer.api.utils.DateUtil;
import lombok.Builder; import lombok.Builder;
/** /**
...@@ -60,8 +61,8 @@ public class RegularizationBusiness extends SpmkAssoBusiness { ...@@ -60,8 +61,8 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
YgzzDto ygzzDto = YgzzDto.builder() YgzzDto ygzzDto = YgzzDto.builder()
.empNum(id) .empNum(id)
.orgCode(orgCode) .orgCode(orgCode)
.zzTime(DateFormatUtils.getDateByString(confirmationTime)) .zzTime(DateUtil.getFormatDate(confirmationTime))
.sjzzTime(DateFormatUtils.getDateByString(newConfirmationTime)) .sjzzTime(DateUtil.getFormatDate(newConfirmationTime))
.zzRemark(Remarks) .zzRemark(Remarks)
.build(); .build();
System.out.println("转正:"+ygzzDto); System.out.println("转正:"+ygzzDto);
......
...@@ -6,13 +6,13 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -6,13 +6,13 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.controller.yggl.service.YgglService; import cn.timer.api.controller.yggl.service.YgglService;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.dto.yggl.LzygQueryDto; import cn.timer.api.dto.yggl.LzygQueryDto;
import cn.timer.api.utils.DateFormatUtils; import cn.timer.api.utils.DateFormatUtils;
import cn.timer.api.utils.DateUtil;
import lombok.Builder; import lombok.Builder;
/** /**
...@@ -46,7 +46,7 @@ public class ResignationBusiness extends SpmkAssoBusiness { ...@@ -46,7 +46,7 @@ public class ResignationBusiness extends SpmkAssoBusiness {
LzygQueryDto dtO = LzygQueryDto.builder() LzygQueryDto dtO = LzygQueryDto.builder()
.orgCode(orgCode) .orgCode(orgCode)
.empNum(id) .empNum(id)
.lzTime(DateFormatUtils.getDateByString(terminationDate)) .lzTime(DateUtil.getFormatDate(terminationDate))
.lzyy(ReasonForResignation) .lzyy(ReasonForResignation)
.lzbz(Remarks) .lzbz(Remarks)
.build(); .build();
......
...@@ -9,16 +9,27 @@ ...@@ -9,16 +9,27 @@
<result column="data" property="data" /> <result column="data" property="data" />
<result column="sbdk1" property="sbdk1" /> <result column="sbdk1" property="sbdk1" />
<result column="sbdk1jg" property="sbdk1jg" /> <result column="sbdk1jg" property="sbdk1jg" />
<result column="dktj1" property="dktj1" />
<result column="xbdk1" property="xbdk1" /> <result column="xbdk1" property="xbdk1" />
<result column="xbdk1jg" property="xbdk1jg" /> <result column="xbdk1jg" property="xbdk1jg" />
<result column="dktj2" property="dktj2" />
<result column="sbdk2" property="sbdk2" /> <result column="sbdk2" property="sbdk2" />
<result column="sbdk2jg" property="sbdk2jg" /> <result column="sbdk2jg" property="sbdk2jg" />
<result column="dktj3" property="dktj3" />
<result column="xbdk2" property="xbdk2" /> <result column="xbdk2" property="xbdk2" />
<result column="xbdk2jg" property="xbdk2jg" /> <result column="xbdk2jg" property="xbdk2jg" />
<result column="dktj4" property="dktj4" />
<result column="sbdk3" property="sbdk3" /> <result column="sbdk3" property="sbdk3" />
<result column="sbdk3jg" property="sbdk3jg" /> <result column="sbdk3jg" property="sbdk3jg" />
<result column="dktj5" property="dktj5" />
<result column="xbdk3" property="xbdk3" /> <result column="xbdk3" property="xbdk3" />
<result column="xbdk3jg" property="xbdk3jg" /> <result column="xbdk3jg" property="xbdk3jg" />
<result column="dktj6" property="dktj6" />
<result column="ydkcs" property="ydkcs" /> <result column="ydkcs" property="ydkcs" />
<result column="gzsc" property="gzsc" /> <result column="gzsc" property="gzsc" />
<result column="qyid" property="qyid" /> <result column="qyid" property="qyid" />
...@@ -35,55 +46,6 @@ ...@@ -35,55 +46,6 @@
<result column="kgcdfzstotal" property="kgcdfzstotal" /> <result column="kgcdfzstotal" property="kgcdfzstotal" />
</resultMap> </resultMap>
<sql id="Base_Column_List">
id,
userid,
data,
sbdk1,
sbdk1jg,
xbdk1,
xbdk1jg,
sbdk2,
sbdk2jg,
xbdk2,
xbdk2jg,
sbdk3,
sbdk3jg,
xbdk3,
xbdk3jg,
ydkcs,
gzsc,
qyid,
dksj,
yzcdcs,
yzcdsc,
kgcdfzs
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoDkmx_id,
userid KqglAssoDkmx_userid,
data KqglAssoDkmx_data,
sbdk1 KqglAssoDkmx_sbdk1,
sbdk1jg KqglAssoDkmx_sbdk1jg,
xbdk1 KqglAssoDkmx_xbdk1,
xbdk1jg KqglAssoDkmx_xbdk1jg,
sbdk2 KqglAssoDkmx_sbdk2,
sbdk2jg KqglAssoDkmx_sbdk2jg,
xbdk2 KqglAssoDkmx_xbdk2,
xbdk2jg KqglAssoDkmx_xbdk2jg,
sbdk3 KqglAssoDkmx_sbdk3,
sbdk3jg KqglAssoDkmx_sbdk3jg,
xbdk3 KqglAssoDkmx_xbdk3,
xbdk3jg KqglAssoDkmx_xbdk3jg,
ydkcs KqglAssoDkmx_ydkcs,
gzsc KqglAssoDkmx_gzsc,
qyid KqglAssoDkmx_qyid,
dksj KqglAssoDkmx_dksj,
yzcdcs KqglAssoDkmx_yzcdcs,
yzcdsc KqglAssoDkmx_yzcdsc,
kgcdfzs KqglAssoDkmx_kgcdfzs
</sql>
<select id="subsidiary" resultMap="AttSubsidiary"> <select id="subsidiary" resultMap="AttSubsidiary">
select SUM(dk.gzsc) as gzsctotalgzsc, select SUM(dk.gzsc) as gzsctotalgzsc,
...@@ -124,165 +86,5 @@ ...@@ -124,165 +86,5 @@
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkmx">
INSERT INTO kqgl_asso_dkmx
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != userid'>
userid,
</if>
<if test ='null != data'>
data,
</if>
<if test ='null != sbdk1'>
sbdk1,
</if>
<if test ='null != sbdk1jg'>
sbdk1jg,
</if>
<if test ='null != xbdk1'>
xbdk1,
</if>
<if test ='null != xbdk1jg'>
xbdk1jg,
</if>
<if test ='null != sbdk2'>
sbdk2,
</if>
<if test ='null != sbdk2jg'>
sbdk2jg,
</if>
<if test ='null != xbdk2'>
xbdk2,
</if>
<if test ='null != xbdk2jg'>
xbdk2jg,
</if>
<if test ='null != sbdk3'>
sbdk3,
</if>
<if test ='null != sbdk3jg'>
sbdk3jg,
</if>
<if test ='null != xbdk3'>
xbdk3,
</if>
<if test ='null != xbdk3jg'>
xbdk3jg,
</if>
<if test ='null != ydkcs'>
ydkcs,
</if>
<if test ='null != gzsc'>
gzsc,
</if>
<if test ='null != qyid'>
qyid,
</if>
<if test ='null != dksj'>
dksj,
</if>
<if test ='null != yzcdcs'>
yzcdcs,
</if>
<if test ='null != yzcdsc'>
yzcdsc,
</if>
<if test ='null != kgcdfzs'>
kgcdfzs
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != userid'>
#{userid},
</if>
<if test ='null != data'>
#{data},
</if>
<if test ='null != sbdk1'>
#{sbdk1},
</if>
<if test ='null != sbdk1jg'>
#{sbdk1jg},
</if>
<if test ='null != xbdk1'>
#{xbdk1},
</if>
<if test ='null != xbdk1jg'>
#{xbdk1jg},
</if>
<if test ='null != sbdk2'>
#{sbdk2},
</if>
<if test ='null != sbdk2jg'>
#{sbdk2jg},
</if>
<if test ='null != xbdk2'>
#{xbdk2},
</if>
<if test ='null != xbdk2jg'>
#{xbdk2jg},
</if>
<if test ='null != sbdk3'>
#{sbdk3},
</if>
<if test ='null != sbdk3jg'>
#{sbdk3jg},
</if>
<if test ='null != xbdk3'>
#{xbdk3},
</if>
<if test ='null != xbdk3jg'>
#{xbdk3jg},
</if>
<if test ='null != ydkcs'>
#{ydkcs},
</if>
<if test ='null != gzsc'>
#{gzsc},
</if>
<if test ='null != qyid'>
#{qyid},
</if>
<if test ='null != dksj'>
#{dksj},
</if>
<if test ='null != yzcdcs'>
#{yzcdcs},
</if>
<if test ='null != yzcdsc'>
#{yzcdsc},
</if>
<if test ='null != kgcdfzs'>
#{kgcdfzs}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_dkmx
WHERE id = #{id}
</delete>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_dkmx
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_dkmx
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_dkmx
</select>
-->
</mapper> </mapper>
\ No newline at end of file
...@@ -165,6 +165,13 @@ ...@@ -165,6 +165,13 @@
<result column="bcxbdk2" property="bcxbdk2" /> <result column="bcxbdk2" property="bcxbdk2" />
<result column="bcsbdk3" property="bcsbdk3" /> <result column="bcsbdk3" property="bcsbdk3" />
<result column="bcxbdk3" property="bcxbdk3" /> <result column="bcxbdk3" property="bcxbdk3" />
<result column="dktj1" property="dktj1" />
<result column="dktj2" property="dktj2" />
<result column="dktj3" property="dktj3" />
<result column="dktj4" property="dktj4" />
<result column="dktj5" property="dktj5" />
<result column="dktj6" property="dktj6" />
<result column="attname" property="attname" /> <result column="attname" property="attname" />
<result column="attpbfs" property="attpbfs" /> <result column="attpbfs" property="attpbfs" />
...@@ -463,6 +470,14 @@ ...@@ -463,6 +470,14 @@
IFNULL(rtj.sbdk3jg ,'') sbdk3jg, IFNULL(rtj.sbdk3jg ,'') sbdk3jg,
IFNULL(rtj.xbdk3,'') xbdk3, IFNULL(rtj.xbdk3,'') xbdk3,
IFNULL(rtj.xbdk3jg ,'') xbdk3jg, IFNULL(rtj.xbdk3jg ,'') xbdk3jg,
IFNULL(rtj.dktj1,'') dktj1,
IFNULL(rtj.dktj2,'') dktj2,
IFNULL(rtj.dktj3,'') dktj3,
IFNULL(rtj.dktj4,'') dktj4,
IFNULL(rtj.dktj5,'') dktj5,
IFNULL(rtj.dktj6,'') dktj6,
IFNULL(rtj.gzsc ,'') gzsc, IFNULL(rtj.gzsc ,'') gzsc,
IFNULL(rtj.qyid,'') qyid, IFNULL(rtj.qyid,'') qyid,
IFNULL(rtj.dksj ,'') dksj, IFNULL(rtj.dksj ,'') dksj,
...@@ -489,7 +504,7 @@ ...@@ -489,7 +504,7 @@
bcsz.`name` as bcname,bcsz.sbdk1 as bcsbdk1,bcsz.xbdk1 as bcxbdk1,bcsz.sbdk2 as bcsbdk2,bcsz.xbdk2 as bcxbdk2,bcsz.sbdk3 as bcsbdk3,bcsz.xbdk3 as bcxbdk3, bcsz.`name` as bcname,bcsz.sbdk1 as bcsbdk1,bcsz.xbdk1 as bcxbdk1,bcsz.sbdk2 as bcsbdk2,bcsz.xbdk2 as bcxbdk2,bcsz.sbdk3 as bcsbdk3,bcsz.xbdk3 as bcxbdk3,
dkmx.`userid`,dkmx.`data` ,dkmx.`sbdk1`,dkmx.`sbdk1jg`,dkmx.`xbdk1` ,dkmx.`xbdk1jg`,dkmx.`sbdk2` ,dkmx.`sbdk2jg` ,dkmx.`xbdk2` , dkmx.`userid`,dkmx.`data` ,dkmx.`sbdk1`,dkmx.`sbdk1jg`,dkmx.`xbdk1` ,dkmx.`xbdk1jg`,dkmx.`sbdk2` ,dkmx.`sbdk2jg` ,dkmx.`xbdk2` ,
dkmx.`xbdk2jg`,dkmx.`sbdk3` ,dkmx.`sbdk3jg` ,dkmx.`xbdk3`,dkmx.`xbdk3jg` ,dkmx.`ydkcs` ,dkmx.`gzsc` ,dkmx.`qyid`,dkmx.`dksj` , dkmx.`xbdk2jg`,dkmx.`sbdk3` ,dkmx.`sbdk3jg` ,dkmx.`xbdk3`,dkmx.`xbdk3jg` ,dkmx.`ydkcs` ,dkmx.`gzsc` ,dkmx.`qyid`,dkmx.`dksj` ,
dkmx.`yzcdcs` ,dkmx.`yzcdsc` ,dkmx.`kgcdfzs` dkmx.`yzcdcs` ,dkmx.`yzcdsc` ,dkmx.`kgcdfzs`,dkmx.dktj1,dkmx.dktj2,dkmx.dktj3,dkmx.dktj4,dkmx.dktj5,dkmx.dktj6
from kqgl_asso_dkmx dkmx from kqgl_asso_dkmx dkmx
LEFT JOIN yggl_main_emp as info on info.emp_num = dkmx.userid and info.org_code = #{param.orgCode} LEFT JOIN yggl_main_emp as info on info.emp_num = dkmx.userid and info.org_code = #{param.orgCode}
LEFT JOIN kqgl_asso_dkjl as dkjl on dkjl.dkmxid = dkmx.id LEFT JOIN kqgl_asso_dkjl as dkjl on dkjl.dkmxid = dkmx.id
......
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