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.controller;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.InstallNoticeServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -36,7 +43,7 @@ public class InstallNoticeController extends BaseController {
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增安装告知表", notes = "新增安装告知表")
public ResponseModel<InstallNoticeDto> save(@RequestBody InstallNoticeDto model) {
......@@ -45,16 +52,17 @@ public class InstallNoticeController extends BaseController {
}
/**
* 根据sequenceNbr更新
* 根据sequenceNbr更新提交申请
*
* @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<InstallNoticeDto> updateBySequenceNbrInstallNotice(@RequestBody InstallNoticeDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新提交申请", notes = "根据sequenceNbr更新提交申请")
public ResponseModel<InstallNoticeDto> updateBySequenceNbrInstallNotice(@RequestBody InstallNoticeDto model, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
model.setNoticeStatus("已提交");
return ResponseHelper.buildResponse(installNoticeServiceImpl.updateWithModel(model));
}
......@@ -64,10 +72,10 @@ public class InstallNoticeController 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){
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(installNoticeServiceImpl.removeById(sequenceNbr));
}
......@@ -77,13 +85,12 @@ public class InstallNoticeController 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查询单个安装告知表")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个安装告知表", notes = "根据sequenceNbr查询单个安装告知表")
public ResponseModel<InstallNoticeDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(installNoticeServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
......@@ -91,10 +98,10 @@ public class InstallNoticeController 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<InstallNoticeDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
@ApiOperation(httpMethod = "GET", value = "安装告知表分页查询", notes = "安装告知表分页查询")
public ResponseModel<Page<InstallNoticeDto>> queryForPage(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size) {
Page<InstallNoticeDto> page = new Page<InstallNoticeDto>();
page.setCurrent(current);
......@@ -103,14 +110,75 @@ public class InstallNoticeController extends BaseController {
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/installNoticePage")
@ApiOperation(httpMethod = "GET", value = "安装告知表分页查询", notes = "安装告知表分页查询")
public ResponseModel<Page<InstallNoticePageDto>> queryForPage1(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size) {
Page<InstallNoticePageDto> page = new Page<InstallNoticePageDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(installNoticeServiceImpl.installNoticePage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "安装告知表列表全部数据查询", notes = "安装告知表列表全部数据查询")
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "安装告知表列表全部数据查询", notes = "安装告知表列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<InstallNoticeDto>> selectForList() {
return ResponseHelper.buildResponse(installNoticeServiceImpl.queryForInstallNoticeList());
}
/**
* 查询安装告知申请列表
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/installApplyList")
@ApiOperation(httpMethod = "GET", value = "安装告知表分页查询", notes = "安装告知表分页查询")
public ResponseModel<List<InstallNoticePageDto>> queryForPage1() {
return ResponseHelper.buildResponse(installNoticeServiceImpl.installNoticeList());
}
/**
* 根据项目名称和建设单位查询安装告知申请列表
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/installApplyListByNameUnit")
@ApiOperation(httpMethod = "GET", value = "安装告知申请表筛选", notes = "安装告知申请表筛选")
public ResponseModel<List<InstallNoticePageDto>> queryForPageByName(@RequestParam(value = "name") String name, @RequestParam(value = "unit") String unit) {
return ResponseHelper.buildResponse(installNoticeServiceImpl.selectByName(name, unit));
}
/**
* 根据主键sequenceNbr查询安装告知申请详情
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping ("")
@ApiOperation(httpMethod = "GET", value = "查询安装告知申请详情", notes = "查询安装告知申请详情")
public ResponseModel<InstallNoticeDto> installNoticeinfoById(@RequestParam ("sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(installNoticeServiceImpl.selectOneById(sequenceNbr));
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@PutMapping(value = "/change/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新")
public ResponseModel<InstallNoticeDto> updateInstallNotice(@RequestBody InstallNoticeDto model, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(installNoticeServiceImpl.updateWithModel(model));
}
}
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