重置评分的
This commit is contained in:
parent
7a9419d0a9
commit
9ebba8bc8e
@ -81,8 +81,8 @@ public class WorkerInfoController {
|
||||
@OperLog(operModul = "劳务管理", operType = "编辑劳务人员", operDesc = "编辑劳务人员信息")
|
||||
@ApiOperation(value = "编辑劳务人员信息", notes = "编辑劳务人员信息", httpMethod = "PUT")
|
||||
@RequestMapping(method = {RequestMethod.POST, RequestMethod.PUT}, value = "/updateById")
|
||||
public Result<WorkerInfo> updateById(@RequestBody WorkerInfo workerInfo) {
|
||||
workerInfoService.updateById(workerInfo);
|
||||
public Result edit(@RequestBody WorkerInfo workerInfo) {
|
||||
workerInfoService.edit(workerInfo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
@ -148,4 +148,6 @@ public interface IWorkerInfoService extends IService<WorkerInfo> {
|
||||
* @param map
|
||||
*/
|
||||
void updateScoreSendAuth(HashMap<String, Object> map);
|
||||
|
||||
void edit(WorkerInfo workerInfo);
|
||||
}
|
||||
|
||||
@ -2172,6 +2172,18 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
projectUfaceConfigService.updateWorkerInfo(workerInfo, workerInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(WorkerInfo workerInfo) {
|
||||
WorkerInfo old = baseMapper.selectById(workerInfo.getId());
|
||||
if (old == null) {
|
||||
throw new OpenAlertException("未找到该记录");
|
||||
}
|
||||
updateById(workerInfo);
|
||||
if (NumberUtils.eq(workerInfo.getSafeScore(), 100D)) {
|
||||
projectUfaceConfigService.updateWorkerInfo(workerInfo, workerInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 真正递归的方法
|
||||
*
|
||||
|
||||
@ -83,6 +83,15 @@ public class NumberUtils {
|
||||
return b1 != null && b2 != null && b1 < b2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 等于
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean eq(Double b1, Double b2) {
|
||||
return b1 != null && b2 != null && b1.equals(b2);
|
||||
}
|
||||
|
||||
/**
|
||||
* description: 使用 String.format 格式化数字,实现左侧补 0
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user