This commit is contained in:
zt
2025-04-24 14:18:04 +08:00
parent a2e8712808
commit 2c15d26bcc
16 changed files with 182 additions and 13 deletions

View File

@ -7,6 +7,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.*;
import com.ruoyi.common.core.domain.model.BgtLoginBody;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.domain.Company;
import com.ruoyi.common.service.ICompanyService;
import com.ruoyi.common.util.DataUtil;
import com.ruoyi.common.utils.SecurityUtils;
@ -114,12 +115,20 @@ public class AppLoginController
break;
case Constants.FBS:
FbsUser fbsUser = fbsUserService.selectUserByPhone(user.getPhonenumber());
fbsUser.setCompanyName(companyService.getCompanyNameById(fbsUser.getCompanyId()));
Company fbsCompany = companyService.getById(fbsUser.getCompanyId());
if(fbsCompany != null){
fbsUser.setCompanyName(fbsCompany.getCompanyName());
fbsUser.setCreditCode(fbsCompany.getCreditCode());
}
ajax.put("user", fbsUser);
break;
case Constants.ZBF:
ZbfUser zbfUser = zbfUserService.selectUserByPhone(user.getPhonenumber());
zbfUser.setCompanyName(companyService.getCompanyNameById(zbfUser.getCompanyId()));
Company zbfCompany = companyService.getById(zbfUser.getCompanyId());
if(zbfCompany != null){
zbfUser.setCompanyName(zbfCompany.getCompanyName());
zbfUser.setCreditCode(zbfCompany.getCreditCode());
}
ajax.put("user", zbfUser);
break;
default:

View File

@ -1,11 +1,13 @@
package com.ruoyi.web.controller.zbf;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.annotation.RepeatSubmit;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.enums.ProjectStatus;
import com.ruoyi.fbs.domain.FbsWageApplication;
import com.ruoyi.fbs.service.IFbsWageApplicationService;
import com.ruoyi.wgz.service.IWgzAttendanceService;
@ -153,4 +155,29 @@ public class AppZbfProjectController extends BaseController {
return AjaxResult.success(attendanceService.zbfHistogram(dto));
}
@ApiOperation("总包方完成项目前检查")
@GetMapping("/checkBeforeComplete/{projectId}")
public AjaxResult<Boolean> checkBeforeComplete(@NotNull(message = "主键不能为空")
@PathVariable("projectId") Long projectId) {
return AjaxResult.success(iZbfProjectService.checkBeforeComplete(projectId));
}
@ApiOperation("总包方完成项目提醒消息")
@PostMapping("/sendRemindMessage/{projectId}")
public AjaxResult<Boolean> sendRemindMessage(@NotNull(message = "主键不能为空")
@PathVariable("projectId") Long projectId) {
return AjaxResult.success(iZbfProjectService.sendRemindMessage(projectId));
}
@ApiOperation("总包方完成项目")
@PutMapping("/complete/{projectId}")
public AjaxResult<Boolean> complete(@NotNull(message = "主键不能为空")
@PathVariable("projectId") Long projectId) {
boolean update = iZbfProjectService.update(Wrappers.<ZbfProject>lambdaUpdate()
.eq(ZbfProject::getId, projectId)
.set(ZbfProject::getProjectStatus, ProjectStatus.COMPLETE.getCode())
);
return AjaxResult.success(update);
}
}

View File

@ -37,9 +37,9 @@ public class AppZbfProjectSubcontractingApplyController extends BaseController {
@Log(title = "总包方选择分包商", businessType = BusinessType.UPDATE)
@RepeatSubmit
@PutMapping("/{id}")
public AjaxResult<Void> choose(@NotNull(message = "主键不能为空")
public AjaxResult<Boolean> choose(@NotNull(message = "主键不能为空")
@PathVariable("id") Long id) {
return toAjax(iZbfProjectSubcontractingApplyService.choose(id));
return AjaxResult.success(iZbfProjectSubcontractingApplyService.choose(id));
}
@ApiOperation("总包方项目分包详情-分包商申请列表")
@ -48,6 +48,13 @@ public class AppZbfProjectSubcontractingApplyController extends BaseController {
return iZbfProjectSubcontractingApplyService.getFbsList(dto);
}
@ApiOperation("总包方项目分包详情-分包商申请人数")
@GetMapping("/applyNum/{subId}")
public AjaxResult<Integer> getApplyNum(@NotNull(message = "主键不能为空")
@PathVariable("subId") Long subId) {
return AjaxResult.success(iZbfProjectSubcontractingApplyService.getApplyNum(subId));
}
@ApiOperation("总包方消息-分包商申请列表")
@GetMapping("/message/fbsList")
public TableDataInfo<ZbfProjectSubcontractingApplyListVO> getFbsListByApplyId(ZbfProjectSubApplyListDTO dto) {