Commit 79f85504 authored by dqq's avatar dqq

安装告知申请和企业管理具有表单的可实现代码

parent 9ba6eb53
package com.yeejoin.amos.boot.module.ugp.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.xml.soap.Text;
/**
* 安装告知表
*
* @author system_generator
* @date 2022-09-22
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="InstallNoticePageDto", description="安装告知表")
public class InstallNoticePageDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "项目名称")
private String name;
@ApiModelProperty(value = "项目安装区域")
private String installRegion;
@ApiModelProperty(value = "建设单位")
private String constructionUnit;
@ApiModelProperty(value = "建设单位负责人")
private String chargePerson;
@ApiModelProperty(value = "安装单位")
private String installationUnit;
@ApiModelProperty(value = "安装负责人")
private String installPri;
@ApiModelProperty(value = "监察部门")
private String superviseDeptId;
@ApiModelProperty(value = "监察负责人")
private String chargerPersonId;
@ApiModelProperty(value = "监检机构")
private String inspectionOrgId;
@ApiModelProperty(value = "附件查看")
private Text info;
@ApiModelProperty(value = "告知申请状态")
private String noticeStatus;
@ApiModelProperty(value = "告知申请提交日期")
private String noticeDate;
}
......@@ -71,6 +71,12 @@ public class InstallNotice extends BaseEntity {
private String contractAttch;
/**
* 安装负责人
*/
@TableField("install_pri")
private String installPri;
/**
* 许可证文件
*/
@TableField("license_attch")
......
package com.yeejoin.amos.boot.module.ugp.api.mapper;
import com.yeejoin.amos.boot.module.ugp.api.entity.Company;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.ugp.api.entity.Company;
/**
* 企业信息表 Mapper 接口
......@@ -10,5 +10,4 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2022-09-22
*/
public interface CompanyMapper extends BaseMapper<Company> {
}
package com.yeejoin.amos.boot.module.ugp.api.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* 安装告知表 Mapper 接口
......@@ -10,5 +20,17 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2022-09-22
*/
public interface InstallNoticeMapper extends BaseMapper<InstallNotice> {
//安装告知申请页面列表
List<InstallNoticePageDto> installNoticeList();
//筛选sequenceNbr查询安装告知申请页面数据
List<InstallNoticePageDto> selectByName(@Param("name") String name , @Param("unit") String unit);
//根据
InstallNoticePageDto selectById(@Param("sequenceNbr")Long sequenceNbr);
//安装告知申请页面分页列表
Page<InstallNoticePageDto> installNoticePage(IPage<InstallNoticePageDto> page);
//根据sequenceNbr查询告知申请详情
InstallNoticeDto selectoneById(@RequestParam("sequenceNbr")Long sequenceNbr );
}
package com.yeejoin.amos.boot.module.ugp.api.service;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 安装告知表接口类
*
......@@ -8,5 +12,12 @@ package com.yeejoin.amos.boot.module.ugp.api.service;
* @date 2022-09-22
*/
public interface IInstallNoticeService {
//安装告知页面列表
List<InstallNoticePageDto> installNoticeList();
//安装告知页面分页查询
List<InstallNoticePageDto> selectByName(@Param("name") String name ,@Param("unit") String unit);
//根据sequenceNbr查询列表数据
InstallNoticePageDto selectById(@Param("sequenceNbr")Long sequenceNbr);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper">
<!-- 查询安装告知申请列表-->
<select id="installNoticeList" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto">
SELECT tz_ugp_project.name,install_region,start_date,construction_unit,install_pri,charge_person,installation_unit,charge_person_id,
notice_status,notice_date ,supervise_dept_id,info
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_attachment
WHERE tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr AND tz_ugp_supervise_rule.admin_region_code= tz_ugp_project.install_region_code
AND tz_ugp_attachment.source_id=tz_ugp_project.sequence_nbr
</select>
<!-- 安装告知申请列表按name,unit筛选-->
<select id="selectByName" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto">
SELECT tz_ugp_project.name,install_region,start_date,construction_unit,install_pri,charge_person,installation_unit,charge_person_id,
notice_status,notice_date ,supervise_dept_id,info
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_attachment
WHERE tz_ugp_project.name = #{name} and construction_unit = #{unit}
and tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr AND tz_ugp_supervise_rule.admin_region_code= tz_ugp_project.install_region_code
AND tz_ugp_attachment.source_id=tz_ugp_project.sequence_nbr
</select>
<!-- 通过id查询页面数据-->
<select id="selectById" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto">
SELECT tz_ugp_project.name,install_region,start_date,construction_unit,install_pri,charge_person,installation_unit,charge_person_id,
notice_status,notice_date ,supervise_dept_id,info
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_attachment
WHERE tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr AND tz_ugp_supervise_rule.admin_region_code= tz_ugp_project.install_region_code
AND tz_ugp_attachment.source_id=tz_ugp_project.sequence_nbr
AND tz_ugp_project.sequence_nbr=#{sequenceNbr}
</select>
<!-- 查询安装告知申请页面-->
<select id="installNoticePage" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto">
SELECT tz_ugp_project.sequence_nbr,tz_ugp_project.name,install_region,start_date,construction_unit,install_pri,charge_person,installation_unit,charge_person_id,
notice_status,notice_date ,supervise_dept_id,info
FROM tz_ugp_install_notice, tz_ugp_project ,tz_ugp_supervise_rule ,tz_ugp_attachment
WHERE tz_ugp_install_notice.project_id=tz_ugp_project.sequence_nbr AND tz_ugp_supervise_rule.admin_region_code= tz_ugp_project.install_region_code
AND tz_ugp_attachment.source_id=tz_ugp_project.sequence_nbr
</select>
<!-- selectoneById-->
<select id="selectoneById" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto">
SELECT*
FROM tz_ugp_install_notice
WHERE sequence_nbr=#{sequenceNbr};
</select>
</mapper>
......@@ -39,7 +39,7 @@ public class CompanyController extends BaseController {
@Autowired
CompanyServiceImpl companyServiceImpl;
@Autowired
@Autowired(required = false)
CompanyMapper companyMapper;
/**
......@@ -47,7 +47,7 @@ public class CompanyController extends BaseController {
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增企业信息表", notes = "新增企业信息表")
public ResponseModel<CompanyDto> save(@RequestBody CompanyDto model) {
......@@ -61,7 +61,7 @@ public class CompanyController extends BaseController {
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新企业信息表", notes = "根据sequenceNbr更新企业信息表")
public ResponseModel<CompanyDto> updateBySequenceNbrCompany(@RequestBody CompanyDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
......@@ -75,7 +75,7 @@ public class CompanyController extends BaseController {
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除企业信息表", notes = "根据sequenceNbr删除企业信息表")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
......@@ -88,7 +88,7 @@ public class CompanyController extends BaseController {
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个企业信息表", notes = "根据sequenceNbr查询单个企业信息表")
public ResponseModel<CompanyDto> selectOne(@PathVariable Long sequenceNbr) {
......@@ -102,7 +102,7 @@ public class CompanyController extends BaseController {
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "企业信息表分页查询", notes = "企业信息表分页查询")
public ResponseModel<Page<CompanyDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
......@@ -162,7 +162,6 @@ public class CompanyController extends BaseController {
return ResponseHelper.buildResponse(companyMapper.selectById(companyList));
}
}
package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice;
import com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeService;
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.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.sql.Wrapper;
import java.util.List;
/**
......@@ -16,7 +23,10 @@ import java.util.List;
* @date 2022-09-22
*/
@Service
public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,InstallNotice,InstallNoticeMapper> implements IInstallNoticeService {
public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,InstallNotice,InstallNoticeMapper> implements IInstallNoticeService{
@Autowired
InstallNoticeMapper installNoticeMapper;
/**
* 分页查询
*/
......@@ -30,4 +40,44 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
public List<InstallNoticeDto> queryForInstallNoticeList() {
return this.queryForList("" , false);
}
/**
* 安装告知申请分页查询
*/
public Page<InstallNoticePageDto> installNoticePage(Page<InstallNoticePageDto> page) {
return installNoticeMapper.installNoticePage(page);
}
/**
* 安装告知申请列表查询
*/
@Override
public List<InstallNoticePageDto> installNoticeList() {
return installNoticeMapper.installNoticeList();
}
/**
* 安装告知申请列表按name,unit筛选
*/
@Override
public List<InstallNoticePageDto> selectByName(String name, String unit) {
return installNoticeMapper.selectByName(name,unit);
}
/**
*通过sequenceNbr查列表数据
*/
@Override
public InstallNoticePageDto selectById(Long sequenceNbr) {
return installNoticeMapper.selectById(sequenceNbr);
}
/**
* 根据sequenceNbr查询告知申请详情
* @param sequenceNbr
* @return
*/
public InstallNoticeDto selectOneById(Long sequenceNbr){
return installNoticeMapper.selectoneById(sequenceNbr);
}
}
\ No newline at end of file
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