更新检测相关功能

This commit is contained in:
许允枞 2024-11-04 09:50:41 +08:00
parent 327bc236c5
commit 91dfdba9e6
3 changed files with 34 additions and 2 deletions

View File

@ -72,7 +72,7 @@ public class DlInspectionProjectController {
@GetMapping("/page")
@Operation(summary = "获得检测项目分页")
@PreAuthorize("@ss.hasPermission('inspection:dl-inspection-project:query')")
// @PreAuthorize("@ss.hasPermission('inspection:dl-inspection-project:query')")
public CommonResult<IPage<DlInspectionProjectRespVO>> getDlInspectionProjectPage(@Valid DlInspectionProjectPageReqVO pageReqVO,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {

View File

@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.inspection.entity.InspectionInfo;
import cn.iocoder.yudao.module.inspection.entity.InspectionWorkNode;
import cn.iocoder.yudao.module.inspection.service.IInspectionInfoService;
import cn.iocoder.yudao.module.inspection.service.IInspectionWorkNodeService;
import cn.iocoder.yudao.util.ExcelUtil;
@ -133,4 +134,13 @@ public class InspectionInfoController extends BaseController {
inspectionWorkNodeService.updateInspectionWorkNode(inspectionId, workNodeId);
return success("接单成功");
}
/**
* 项目操作退办理重审项目完成
* @param inspectionWorkNode
*/
@PostMapping("controls")
public void controls(InspectionWorkNode inspectionWorkNode){
inspectionWorkNodeService.updateImageAndStep(inspectionWorkNode);
}
}

View File

@ -16,6 +16,7 @@ import cn.iocoder.yudao.module.inspection.service.InspectionStepInfoService;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -88,7 +89,8 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
return;
case 2:
//选择重审
break;
retrial(inspectionWorkNode);
return;
case 3:
//项目完成
break;
@ -174,6 +176,13 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
info.setEndTime(DateUtil.date());
info.setStatus("1");
inspectionInfoService.updateById(info);
//插入步骤信息
InspectionStepInfo stepInfo = new InspectionStepInfo();
stepInfo.setInspectionInfoId(Integer.parseInt(inspectionWorkNode.getInspectionInfoId().toString()));
stepInfo.setTitle("退办理");
stepInfo.setContent("退办理");
inspectionStepService.save(stepInfo);
}
/**
@ -187,5 +196,18 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
InspectionInfo info = inspectionInfoService.getById(inspectionWorkNode.getInspectionInfoId());
info.setIsRetrial("1");
info.setNowOrderNum(workNode.getOrderNum());
// 将选择的重审项目之后的所有项目设置为待开始
this.update(new UpdateWrapper<InspectionWorkNode>()
.set("status", "0")
.eq("inspection_info_id", inspectionWorkNode.getInspectionInfoId())
.ge("order_num", workNode.getOrderNum()));
// 添加步骤信息表
InspectionStepInfo stepInfo = new InspectionStepInfo();
stepInfo.setInspectionInfoId(Integer.parseInt(inspectionWorkNode.getInspectionInfoId().toString()));
stepInfo.setTitle("重审");
stepInfo.setContent("重审");
inspectionStepService.save(stepInfo);
}
}