|
@@ -97,18 +97,13 @@ public class TPssrLockController extends BaseController {
|
|
|
long approveStatus = 0;
|
|
|
Date date = null;
|
|
|
if (tPssrLock.getTaskType() == 4) {
|
|
|
- //拆锁确认
|
|
|
+ //上锁确认
|
|
|
queryStatus = 1;
|
|
|
approveStatus = 3;
|
|
|
date = new Date();
|
|
|
} else if (tPssrLock.getTaskType() == 5) {
|
|
|
- //上锁确认
|
|
|
- queryStatus = 3;
|
|
|
- approveStatus = 4;
|
|
|
- date = new Date();
|
|
|
- } else if (tPssrLock.getTaskType() == 6) {
|
|
|
//确认人确认
|
|
|
- queryStatus = 4;
|
|
|
+ queryStatus = 3;
|
|
|
approveStatus = 2;
|
|
|
date = new Date();
|
|
|
}
|
|
@@ -117,11 +112,7 @@ public class TPssrLockController extends BaseController {
|
|
|
for (Long id : tPssrLock.getIds()) {
|
|
|
TPssrLock item = tPssrLockService.selectTPssrLockById(id);
|
|
|
item.setApproveStatus(approveStatus);
|
|
|
- if (item.getUnlockDate()==null) {
|
|
|
- item.setUnlockDate(date);
|
|
|
- } else if (item.getLockedDate()==null) {
|
|
|
- item.setLockedDate(date);
|
|
|
- } else if (item.getConfirmationDate()==null) {
|
|
|
+ if (item.getConfirmationDate() == null && approveStatus == 2) {
|
|
|
item.setConfirmationDate(date);
|
|
|
}
|
|
|
tPssrLockService.updateTPssrLock(item);
|
|
@@ -131,11 +122,7 @@ public class TPssrLockController extends BaseController {
|
|
|
lock.setSubId(tPssrLock.getSubId());
|
|
|
lock.setApproveStatus(queryStatus);
|
|
|
for (TPssrLock item : tPssrLockService.selectTPssrLockList(lock)) {
|
|
|
- if (item.getUnlockDate()==null) {
|
|
|
- item.setUnlockDate(date);
|
|
|
- } else if (item.getLockedDate()==null) {
|
|
|
- item.setLockedDate(date);
|
|
|
- } else if (item.getConfirmationDate()==null) {
|
|
|
+ if (item.getConfirmationDate() == null && approveStatus == 2) {
|
|
|
item.setConfirmationDate(date);
|
|
|
}
|
|
|
item.setApproveStatus(approveStatus);
|
|
@@ -148,14 +135,10 @@ public class TPssrLockController extends BaseController {
|
|
|
entity.setApproveStatus(queryStatus);
|
|
|
for (TPssrLock item : tPssrLockService.selectTPssrLockList(entity)) {
|
|
|
if (tPssrLock.getTaskType() == 4) {
|
|
|
- if (item.getUnlocker().equals(getUserId().toString())) {
|
|
|
- return AjaxResult.success();
|
|
|
- }
|
|
|
- } else if (tPssrLock.getTaskType() == 5) {
|
|
|
if (item.getLockeder().equals(getUserId().toString())) {
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
- } else if (tPssrLock.getTaskType() == 6) {
|
|
|
+ } else if (tPssrLock.getTaskType() == 5) {
|
|
|
if (item.getConfirm().equals(getUserId().toString())) {
|
|
|
return AjaxResult.success();
|
|
|
}
|