Commit c525acbe authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents 1e72d6a8 5159ed88
......@@ -34,6 +34,7 @@ spec: # 资源规范字段
#dapr.io/sidecar-cpu-request: 1 #Dapr sidecar要求的 CPU 数量
#dapr.io/sidecar-memory-request #Dapr sidecar 请求的内存数量
dapr.io/http-max-request-size: "100" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "16" #Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a Too big request header
dapr.io/sidecar-listen-addresses: "0.0.0.0"
# 更多dapr配置请参考 https://www.bookstack.cn/read/dapr-1.5-zh/cc77b74e2cc2f4d4.md
......
......@@ -133,7 +133,7 @@ public class TEmployeeProjectController {
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('archives_temployeeproject_del')" )
public R removeById(@PathVariable String id) {
return R.ok(tEmployeeProjectService.removeById(id));
return R.ok(tEmployeeProjectService.removeProjectInfo(id));
}
/**
......
......@@ -50,6 +50,8 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
R updateProject(TEmployeeProject tEmployeeProject);
R removeProjectInfo(String id);
/**
* @param tEmployeeProject
* @Description: 减项
......
......@@ -190,6 +190,35 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return R.ok(flag);
}
@Override
public R removeProjectInfo(String id) {
TEmployeeProject tEmployeeProject = this.getById(id);
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, tEmployeeProject.getEmpIdcard())
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
//删除项目档案
this.removeById(id);
//从剩下的项目档案中查找员工类型
List<TEmployeeProject> list = this.list(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, tEmployeeProject.getEmpIdcard())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(list)) {
for (TEmployeeProject t :list) {
if (CommonConstants.ZERO_STRING.equals(t.getEmpNatrue())) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
break;
}
if (CommonConstants.ONE_STRING.equals(t.getEmpNatrue()) && !CommonConstants.ONE_STRING.equals(tEmployeeInfo.getEmpNatrue())) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
break;
}
}
tEmployeeInfoMapper.updateById(tEmployeeInfo);
}
return R.ok();
}
@Override
public R reEmpInfo(JSONObject jsonObject) {
if (Common.isNotNull(jsonObject)) {
......@@ -236,17 +265,23 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (count == CommonConstants.ONE_INT) {
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoMapper.selectById(tEmployeeProject.getEmpId());
TEmployeeProject tEmployeeProjectOld = this.getById(tEmployeeProject.getId());
String code = "";
if (Common.isNotNull(tEmployeeProject)) {
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectById(tEmployeeProject.getEmpId());
if (tEmployeeProject.getIsLeaveEmployee() == CommonConstants.dingleDigitIntArray[1]) {
tEmployeeInfo.setFileStatus(CommonConstants.dingleDigitIntArray[1]);
tEmployeeInfoMapper.updateById(tEmployeeInfo);
code = CommonConstants.ONE_STRING;
}
tEmployeeProject.setProjectStatus(CommonConstants.dingleDigitIntArray[1]);
this.updateById(tEmployeeProject);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(), "", tEmployeeProjectOld, tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProject.getId(), tEmployeeInfoOld, tEmployeeProject);
return R.ok();
if (CommonConstants.ONE_STRING.equals(code)) {
return R.ok(null,"减项减档成功");
} else {
return R.ok(null,"减项成功,项目状态已更新为“已减项”");
}
}
}
return R.failed("人员在该项目下存在进行中/未完结的服务");
......
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