Merge branch 'yyhouc'
This commit is contained in:
commit
e700b9e004
|
@ -20,6 +20,7 @@ import io.swagger.annotations.ApiParam;
|
|||
import lombok.RequiredArgsConstructor;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.secure.BladeUser;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
|
@ -333,7 +334,7 @@ public class DisasterInfoController {
|
|||
return R.data(callForHelp);
|
||||
}
|
||||
|
||||
|
||||
private final AdministratorService administratorService;
|
||||
@PostMapping("review")
|
||||
public R<Boolean> review(@RequestBody DisasterInfo disasterInfo) {
|
||||
//审批通过 响应状态,0未审批,1审批未通过。2审批通过并正在响应,3审批通过并且响应完成
|
||||
|
@ -349,16 +350,21 @@ public class DisasterInfoController {
|
|||
@ApiOperation(value = "提交", notes = "传入Tool")
|
||||
@PostMapping("/submit")
|
||||
public R submit(@ApiParam(value = "Tool对象", required = true) @RequestBody DisasterInfo disasterInfo) {
|
||||
Long chiefId = disasterInfo.getChiefId();
|
||||
//判断是否是分配
|
||||
String Allocation = disasterInfo.getAllocation();
|
||||
LambdaQueryWrapper<GuestManageDisasterRef> qw = new LambdaQueryWrapper<>();
|
||||
qw.eq(GuestManageDisasterRef::getDisasterId,disasterInfo.getId());
|
||||
GuestManageDisasterRef one = guestManageDisasterRefService.getOne(qw);
|
||||
one.setStatus(1);
|
||||
one.setManagerId(disasterInfo.getChiefId());
|
||||
one.setManagerId(chiefId);
|
||||
guestManageDisasterRefService.updateById(one);
|
||||
//判断是否是分配
|
||||
String Allocation = disasterInfo.getAllocation();
|
||||
//获得disasterInfo
|
||||
disasterInfo = disasterInfoService.getById(disasterInfo.getId());
|
||||
|
||||
|
||||
if(!StringUtil.isEmpty(Allocation)){
|
||||
GuestInfo user = guestInfoService.getById(disasterInfo.getChiefId());
|
||||
Administrator user = administratorService.getById(chiefId);
|
||||
//发送邮件
|
||||
Email email = new Email();
|
||||
email.setSubject("You have a new pending disaster");
|
||||
|
|
Loading…
Reference in New Issue