Commit 4a9f6f64 authored by zhangyingbin's avatar zhangyingbin

安装告知申请分页查询修改

parent ecb0f47e
......@@ -17,7 +17,8 @@
supervise_dept_id,
inspection_unit_id,
notice_status,
notice_date
notice_date,
approved
FROM
tz_ugp_install_notice
LEFT JOIN tz_ugp_project ON tz_ugp_install_notice.project_id = tz_ugp_project.sequence_nbr
......
......@@ -197,12 +197,12 @@ public class InstallNoticeController extends BaseController {
public ResponseModel<InstallNoticeDto> saveInstallNotice(@RequestBody JSONObject object,@RequestParam(required = false) String noticeStatus ) {
InstallNoticeDto installNoticeDto = new InstallNoticeDto();
// final ProjectDto projectDto = projectServiceImpl.queryBySeq(object.getLong("name"));
final ProjectDto projectDto = projectServiceImpl.queryBySeq(object.getLong("name"));
installNoticeDto.setProjectId(object.getLong("name"));
installNoticeDto.setNoticeStatus(noticeStatus);
installNoticeDto.setNoticeDate(new Date());
installNoticeDto.setApproved(false);
// installNoticeDto.setOrganizationCode(orgServiceImpl.getOrgUsr().getBizOrgCode());
installNoticeDto.setOrganizationCode(orgServiceImpl.getOrgUsr().getBizOrgCode());
installNoticeDto.setLicenseNum(object.getString("licenseNum"));
installNoticeDto.setLicenseCompany(object.getString("licenseCompany"));
final JSONArray licenseAttch = object.getJSONArray("licenseAttch");
......@@ -211,7 +211,7 @@ public class InstallNoticeController extends BaseController {
installNoticeDto.setLicenseAttch(JSON.toJSONString(licenseAttch));
installNoticeDto.setContractAttch(JSON.toJSONString(contractAttch));
// projectInitiationServiceImpl.execute(projectDto.getInstanceId(),installNoticeDto,"1");
projectInitiationServiceImpl.execute(projectDto.getInstanceId(),installNoticeDto,"1");
return ResponseHelper.buildResponse(installNoticeServiceImpl.createWithModel(installNoticeDto));
}
......@@ -284,9 +284,15 @@ public class InstallNoticeController extends BaseController {
return null;
}
/**
* 监察部门接受安装告知
* @param sequenceNbr
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@PostMapping(value = "/acceptNotification")
@ApiOperation(httpMethod = "get", value = "接受告知", notes = "接受告知")
@ApiOperation(httpMethod = "get", value = "监察部门接受安装告知", notes = "监察部门接受安装告知")
public ResponseModel<Boolean> acceptNotification(Long sequenceNbr){
InstallNotice installNotice = installNoticeServiceImpl.getById(sequenceNbr);
installNotice.setNoticeStatus(NoticeStatusEnum.已接收.getName());
......@@ -294,4 +300,23 @@ public class InstallNoticeController extends BaseController {
projectInitiationServiceImpl.execute(project.getInstanceId(),installNotice,NoticeStatusEnum.已接收.getStatusId());
return ResponseHelper.buildResponse(installNoticeServiceImpl.updateById(installNotice));
}
/**
* 监检部门审查(通过/退回)安装告知
* @param sequenceNbr
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@PostMapping(value = "/inspectNotification")
@ApiOperation(httpMethod = "get", value = "监检部门审查(通过/退回)安装告知", notes = "监检部门审查(通过/退回)安装告知")
public ResponseModel<Boolean> inspectNotification(Long sequenceNbr,String option){
InstallNotice installNotice = installNoticeServiceImpl.getById(sequenceNbr);
installNotice.setApproved(true);
if(NoticeStatusEnum.已退回.equals(option)){
installNotice.setApproved(false);
}
Project project = projectServiceImpl.getById(installNotice.getProjectId());
projectInitiationServiceImpl.execute(project.getInstanceId(),installNotice,option);
return ResponseHelper.buildResponse(installNoticeServiceImpl.updateById(installNotice));
}
}
......@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestParam;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -45,7 +46,18 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
* 安装告知申请分页查询
*/
public Page<InstallNoticePageDto> installNoticePage(Page<InstallNoticePageDto> page,String name,String constructionUnit) {
return installNoticeMapper.installNoticePage(page,name,constructionUnit);
Page<InstallNoticePageDto> installNoticePage = installNoticeMapper.installNoticePage(page,name,constructionUnit);
List<InstallNoticePageDto> installNoticePageDtos = installNoticePage.getRecords();
for(InstallNoticePageDto installNoticePageDto:installNoticePageDtos){
if(!ValidationUtil.isEmpty(installNoticePageDto.getApproved())){
if(installNoticePageDto.getApproved()){
installNoticePageDto.setApprovedName("通过");
}else{
installNoticePageDto.setApprovedName("不通过");
}
}
}
return installNoticePage;
}
/**
......
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