Commit 409990f9 authored by chenzhao's avatar chenzhao

补充注解

parent a2aec721
......@@ -17,13 +17,13 @@ public class AllPowerDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "第三方电站id")
@ApiModelProperty(value = "第三方电站id",example = "1299184320438816565")
private String thirdStationId;
@ApiModelProperty(value = "年")
@ApiModelProperty(value = "年",example = "2024")
private String year;
@ApiModelProperty(value = "平均功率")
@ApiModelProperty(value = "平均功率",example = "5.55")
private Double power;
}
......@@ -20,28 +20,28 @@ public class CommerceInfoDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "统一信用代码")
@ApiModelProperty(value = "统一信用代码",example = "91340100MA2NF88491")
private String creditCode;
@ApiModelProperty(value = "营业执照")
@ApiModelProperty(value = "营业执照",example = "/upload/jxiop/amos_studio/487908BEACF744B7F32D2594A33169.jpg")
private String businessLicensePhoto;
@ApiModelProperty(value = "法人名字")
@ApiModelProperty(value = "法人名字",example = "范友湖")
private String legalPersonName;
@ApiModelProperty(value = "法人身份证号")
@ApiModelProperty(value = "法人身份证号",example = "360121199401064612")
private String legalPersonIdNumber;
@ApiModelProperty(value = "法人身份证照片正面")
@ApiModelProperty(value = "法人身份证照片正面",example = "/upload/jxiop/amos_studio/3F5E55BFAD13E3DFE6B0CA2666A7F66.png")
private String legalPersonCardPhotoFront;
@ApiModelProperty(value = "法人身份证照片反面")
@ApiModelProperty(value = "法人身份证照片反面",example = "/upload/jxiop/amos_studio/3F5E55BFAD13E3DFE6B0CA2666A7F66.png")
private String legalPersonCardPhotoBack;
@ApiModelProperty(value = "法人联系方式")
@ApiModelProperty(value = "法人联系方式",example = "15115722666")
private String legalPersonPhone;
@ApiModelProperty(value = "单位id")
@ApiModelProperty(value = "单位id",example = "1724369413567680513")
private Long unitSeq;
......
//package com.yeejoin.amos.boot.module.hygf.biz.controller;
//
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.github.pagehelper.PageHelper;
//import com.yeejoin.amos.boot.biz.common.controller.BaseController;
//import com.yeejoin.amos.boot.module.hygf.api.config.UserLimits;
//import com.yeejoin.amos.boot.module.hygf.api.dto.AcceptanceDto;
//import com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto;
//import com.yeejoin.amos.boot.module.hygf.api.entity.AcceptanceCheckItem;
//import com.yeejoin.amos.boot.module.hygf.api.mapper.PersonnelBusinessMapper;
//import com.yeejoin.amos.boot.module.hygf.api.service.IAcceptanceService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//import org.typroject.tyboot.core.foundation.enumeration.UserType;
//import org.typroject.tyboot.core.restful.doc.TycloudOperation;
//import org.typroject.tyboot.core.restful.utils.ResponseHelper;
//import org.typroject.tyboot.core.restful.utils.ResponseModel;
//
//import java.util.Map;
//
//@RestController
//@Api(tags = "验收管理")
//@RequestMapping(value = "/acceptance")
//public class AcceptanceController extends BaseController {
//
// @Autowired
// PersonnelBusinessMapper personnelBusinessMapper;
// @Autowired
// private IAcceptanceService acceptanceService;
//
// @PostMapping(value = "/page")
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @ApiOperation(httpMethod = "Get", value = "获取验收单列表", notes = "获取验收单列表")
// @UserLimits
// public ResponseModel<Page<AcceptanceDto>> page(
// @RequestParam(value = "current", required = false, defaultValue = "1") Integer current,
// @RequestParam(value = "size", required = false, defaultValue = "20") Integer size,
// @RequestBody AcceptanceDto param
// ) {
//// UserUnitInformationDto userUnitInformationDto = personnelBusinessMapper.getUserUnitInformationDto(getUserInfo().getUserId());
//// if(userUnitInformationDto!=null){
//// param.setRegionCompanyId(userUnitInformationDto.getRegionalCompaniesSeq());
//// param.setAmosDealerId(userUnitInformationDto.getAmosDealerId());
//// }
//
//
// return ResponseHelper.buildResponse( acceptanceService.page(current, size, param));
// }
//
// @GetMapping("/acceptance-details")
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @ApiOperation(httpMethod = "Get", value = "获取验收单列表", notes = "获取验收单列表")
// public ResponseModel<Map<String, Object>> offlineAcceptanceDetails(@RequestParam("sequenceNbr") Long sequenceNbr) {
// return ResponseHelper.buildResponse(acceptanceService.acceptanceDetails(sequenceNbr));
// }
//
//
//
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @PostMapping(value = "/save")
// @ApiOperation(httpMethod = "POST", value = "检查项新增", notes = "检查项新增")
// public ResponseModel save(@RequestBody AcceptanceCheckItem model, @RequestParam("sequenceNbr") Long sequenceNbr) {
// return ResponseHelper.buildResponse(acceptanceService.saveEntity(model, sequenceNbr));
// }
//
//
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @PostMapping(value = "/checkAccept")
// @ApiOperation(httpMethod = "POST", value = "提交验收", notes = "提交验收")
// public ResponseModel checkAccept(@RequestParam Long basicGridAcceptanceId) {
// acceptanceService.checkAccept(basicGridAcceptanceId,getUserId());
// return ResponseHelper.buildResponse(null);
// }
//}
package com.yeejoin.amos.boot.module.hygf.biz.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.hygf.api.config.UserLimits;
import com.yeejoin.amos.boot.module.hygf.api.dto.AcceptanceDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.AcceptanceCheckItem;
import com.yeejoin.amos.boot.module.hygf.api.mapper.PersonnelBusinessMapper;
import com.yeejoin.amos.boot.module.hygf.api.service.IAcceptanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.Map;
@RestController
@Api(tags = "验收管理")
@RequestMapping(value = "/acceptance")
public class AcceptanceController extends BaseController {
@Autowired
PersonnelBusinessMapper personnelBusinessMapper;
@Autowired
private IAcceptanceService acceptanceService;
@PostMapping(value = "/page")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "Get", value = "获取验收单列表", notes = "获取验收单列表")
@UserLimits
public ResponseModel<Page<AcceptanceDto>> page(
@RequestParam(value = "current", required = false, defaultValue = "1") Integer current,
@RequestParam(value = "size", required = false, defaultValue = "20") Integer size,
@RequestBody AcceptanceDto param
) {
// UserUnitInformationDto userUnitInformationDto = personnelBusinessMapper.getUserUnitInformationDto(getUserInfo().getUserId());
// if(userUnitInformationDto!=null){
// param.setRegionCompanyId(userUnitInformationDto.getRegionalCompaniesSeq());
// param.setAmosDealerId(userUnitInformationDto.getAmosDealerId());
// }
return ResponseHelper.buildResponse( acceptanceService.page(current, size, param));
}
@GetMapping("/acceptance-details")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "Get", value = "获取验收单列表", notes = "获取验收单列表")
public ResponseModel<Map<String, Object>> offlineAcceptanceDetails(@RequestParam("sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(acceptanceService.acceptanceDetails(sequenceNbr));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "检查项新增", notes = "检查项新增")
public ResponseModel save(@RequestBody AcceptanceCheckItem model, @RequestParam("sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(acceptanceService.saveEntity(model, sequenceNbr));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/checkAccept")
@ApiOperation(httpMethod = "POST", value = "提交验收", notes = "提交验收")
public ResponseModel checkAccept(@RequestParam Long basicGridAcceptanceId) {
acceptanceService.checkAccept(basicGridAcceptanceId,getUserId());
return ResponseHelper.buildResponse(null);
}
}
......@@ -33,89 +33,89 @@ public class AcceptanceRectificationOrderController extends BaseController {
@Autowired
AcceptanceRectificationOrderServiceImpl acceptanceRectificationOrderServiceImpl;
/**
* 新增验收整改单
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增验收整改单", notes = "新增验收整改单")
public ResponseModel<AcceptanceRectificationOrderDto> save(@RequestBody AcceptanceRectificationOrderDto model) {
model = acceptanceRectificationOrderServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新验收整改单", notes = "根据sequenceNbr更新验收整改单")
public ResponseModel<AcceptanceRectificationOrderDto> updateBySequenceNbrAcceptanceRectificationOrder(@PathVariable(value = "sequenceNbr") Long sequenceNbr, @RequestBody AcceptanceRectificationOrderDto model) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(acceptanceRectificationOrderServiceImpl.updateAndDriveWorkflow(model,getUserId()));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除验收整改单", notes = "根据sequenceNbr删除验收整改单")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(acceptanceRectificationOrderServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@GetMapping
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个验收整改单", notes = "根据sequenceNbr查询单个验收整改单")
public ResponseModel<AcceptanceRectificationOrderDto> selectOne(@RequestParam(value = "sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(acceptanceRectificationOrderServiceImpl.queryBySequenceNbr(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "验收整改单分页查询", notes = "验收整改单分页查询")
public ResponseModel<Page<AcceptanceRectificationOrderDto>> queryForPage(
@RequestParam(value = "acceptanceSeqNbr") Long acceptanceSeqNbr,
@RequestParam(value = "current", required = false, defaultValue = "1") Integer current,
@RequestParam(value = "size", required = false, defaultValue = "20") Integer size
) {
Page<AcceptanceRectificationOrderDto> page = new Page<>(current, size);
return ResponseHelper.buildResponse(acceptanceRectificationOrderServiceImpl.queryForAcceptanceRectificationOrderPage(page, acceptanceSeqNbr));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "验收整改单列表全部数据查询", notes = "验收整改单列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<AcceptanceRectificationOrderDto>> selectForList() {
return ResponseHelper.buildResponse(acceptanceRectificationOrderServiceImpl.queryForAcceptanceRectificationOrderList());
}
// /**
// * 新增验收整改单
// *
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @PostMapping(value = "/save")
// @ApiOperation(httpMethod = "POST", value = "新增验收整改单", notes = "新增验收整改单")
// public ResponseModel<AcceptanceRectificationOrderDto> save(@RequestBody AcceptanceRectificationOrderDto model) {
// model = acceptanceRectificationOrderServiceImpl.createWithModel(model);
// return ResponseHelper.buildResponse(model);
// }
//
// /**
// * 根据sequenceNbr更新
// *
// * @param sequenceNbr 主键
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @PutMapping(value = "/{sequenceNbr}")
// @ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新验收整改单", notes = "根据sequenceNbr更新验收整改单")
// public ResponseModel<AcceptanceRectificationOrderDto> updateBySequenceNbrAcceptanceRectificationOrder(@PathVariable(value = "sequenceNbr") Long sequenceNbr, @RequestBody AcceptanceRectificationOrderDto model) {
// model.setSequenceNbr(sequenceNbr);
// return ResponseHelper.buildResponse(acceptanceRectificationOrderServiceImpl.updateAndDriveWorkflow(model,getUserId()));
// }
//
// /**
// * 根据sequenceNbr删除
// *
// * @param sequenceNbr 主键
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @DeleteMapping(value = "/{sequenceNbr}")
// @ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除验收整改单", notes = "根据sequenceNbr删除验收整改单")
// public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
// return ResponseHelper.buildResponse(acceptanceRectificationOrderServiceImpl.removeById(sequenceNbr));
// }
//
// /**
// * 根据sequenceNbr查询
// *
// * @param sequenceNbr 主键
// * @return
// */
// @GetMapping
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个验收整改单", notes = "根据sequenceNbr查询单个验收整改单")
// public ResponseModel<AcceptanceRectificationOrderDto> selectOne(@RequestParam(value = "sequenceNbr") Long sequenceNbr) {
// return ResponseHelper.buildResponse(acceptanceRectificationOrderServiceImpl.queryBySequenceNbr(sequenceNbr));
// }
//
// /**
// * 列表分页查询
// *
// * @param current 当前页
// * @param current 每页大小
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/page")
// @ApiOperation(httpMethod = "GET",value = "验收整改单分页查询", notes = "验收整改单分页查询")
// public ResponseModel<Page<AcceptanceRectificationOrderDto>> queryForPage(
// @RequestParam(value = "acceptanceSeqNbr") Long acceptanceSeqNbr,
// @RequestParam(value = "current", required = false, defaultValue = "1") Integer current,
// @RequestParam(value = "size", required = false, defaultValue = "20") Integer size
// ) {
// Page<AcceptanceRectificationOrderDto> page = new Page<>(current, size);
// return ResponseHelper.buildResponse(acceptanceRectificationOrderServiceImpl.queryForAcceptanceRectificationOrderPage(page, acceptanceSeqNbr));
// }
//
// /**
// * 列表全部数据查询
// *
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @ApiOperation(httpMethod = "GET",value = "验收整改单列表全部数据查询", notes = "验收整改单列表全部数据查询")
// @GetMapping(value = "/list")
// public ResponseModel<List<AcceptanceRectificationOrderDto>> selectForList() {
// return ResponseHelper.buildResponse(acceptanceRectificationOrderServiceImpl.queryForAcceptanceRectificationOrderList());
// }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "获取整改单负责人列表", notes = "获取整改单负责人列表")
......
//package com.yeejoin.amos.boot.module.hygf.biz.controller;
//
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.yeejoin.amos.boot.biz.common.controller.BaseController;
//import com.yeejoin.amos.boot.module.hygf.api.dto.AllPowerDto;
//import com.yeejoin.amos.boot.module.hygf.biz.service.impl.AllPowerServiceImpl;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//import org.typroject.tyboot.core.foundation.enumeration.UserType;
//import org.typroject.tyboot.core.restful.doc.TycloudOperation;
//import org.typroject.tyboot.core.restful.utils.ResponseHelper;
//import org.typroject.tyboot.core.restful.utils.ResponseModel;
//
//import javax.servlet.http.HttpServletRequest;
//import java.util.List;
//
///**
// * 统计所有功率
// *
// * @author system_generator
// * @date 2023-09-20
// */
//@RestController
//@Api(tags = "统计所有功率Api")
//@RequestMapping(value = "/all-power")
//public class AllPowerController extends BaseController {
//
// @Autowired
// AllPowerServiceImpl allPowerServiceImpl;
//
// /**
// * 新增统计所有功率
// *
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @PostMapping(value = "/save")
// @ApiOperation(httpMethod = "POST", value = "新增统计所有功率", notes = "新增统计所有功率")
// public ResponseModel<AllPowerDto> save(@RequestBody AllPowerDto model) {
// model = allPowerServiceImpl.createWithModel(model);
// return ResponseHelper.buildResponse(model);
// }
//
// /**
// * 根据sequenceNbr更新
// *
// * @param sequenceNbr 主键
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @PutMapping(value = "/{sequenceNbr}")
// @ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新统计所有功率", notes = "根据sequenceNbr更新统计所有功率")
// public ResponseModel<AllPowerDto> updateBySequenceNbrAllPower(@RequestBody AllPowerDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
// return ResponseHelper.buildResponse(allPowerServiceImpl.updateWithModel(model));
// }
//
// /**
// * 根据sequenceNbr删除
// *
// * @param sequenceNbr 主键
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @DeleteMapping(value = "/{sequenceNbr}")
// @ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除统计所有功率", notes = "根据sequenceNbr删除统计所有功率")
// public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
// return ResponseHelper.buildResponse(allPowerServiceImpl.removeById(sequenceNbr));
// }
//
// /**
// * 根据sequenceNbr查询
// *
// * @param sequenceNbr 主键
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/{sequenceNbr}")
// @ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个统计所有功率", notes = "根据sequenceNbr查询单个统计所有功率")
// public ResponseModel<AllPowerDto> selectOne(@PathVariable Long sequenceNbr) {
// return ResponseHelper.buildResponse(allPowerServiceImpl.queryBySeq(sequenceNbr));
// }
//
// /**
// * 列表分页查询
// *
// * @param current 当前页
// * @param current 每页大小
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/page")
// @ApiOperation(httpMethod = "GET",value = "统计所有功率分页查询", notes = "统计所有功率分页查询")
// public ResponseModel<Page<AllPowerDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
// (value = "size") int size) {
// Page<AllPowerDto> page = new Page<AllPowerDto>();
// page.setCurrent(current);
// page.setSize(size);
// return ResponseHelper.buildResponse(allPowerServiceImpl.queryForAllPowerPage(page));
// }
//
// /**
// * 列表全部数据查询
// *
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @ApiOperation(httpMethod = "GET",value = "统计所有功率列表全部数据查询", notes = "统计所有功率列表全部数据查询")
// @GetMapping(value = "/list")
// public ResponseModel<List<AllPowerDto>> selectForList() {
// return ResponseHelper.buildResponse(allPowerServiceImpl.queryForAllPowerList());
// }
//}
package com.yeejoin.amos.boot.module.hygf.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.hygf.api.dto.AllPowerDto;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.AllPowerServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* 统计所有功率
*
* @author system_generator
* @date 2023-09-20
*/
@RestController
@Api(tags = "统计所有功率Api")
@RequestMapping(value = "/all-power")
public class AllPowerController extends BaseController {
@Autowired
AllPowerServiceImpl allPowerServiceImpl;
/**
* 新增统计所有功率
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增统计所有功率", notes = "新增统计所有功率")
public ResponseModel<AllPowerDto> save(@RequestBody AllPowerDto model) {
model = allPowerServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新统计所有功率", notes = "根据sequenceNbr更新统计所有功率")
public ResponseModel<AllPowerDto> updateBySequenceNbrAllPower(@RequestBody AllPowerDto model,@ApiParam(value = "主键",example = "1805040753609568257")@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(allPowerServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除统计所有功率", notes = "根据sequenceNbr删除统计所有功率")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request,@ApiParam(value = "主键",example = "1805040753609568257")@PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(allPowerServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个统计所有功率", notes = "根据sequenceNbr查询单个统计所有功率")
public ResponseModel<AllPowerDto> selectOne(@ApiParam(value = "主键",example = "1805040753609568257")@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(allPowerServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "统计所有功率分页查询", notes = "统计所有功率分页查询")
public ResponseModel<Page<AllPowerDto>> queryForPage(@ApiParam(value = "当前页码",example = "1")@RequestParam(value = "current") int current,
@ApiParam(value = "分页条数",example = "20")@RequestParam(value = "size") int size) {
Page<AllPowerDto> page = new Page<AllPowerDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(allPowerServiceImpl.queryForAllPowerPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "统计所有功率列表全部数据查询", notes = "统计所有功率列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<AllPowerDto>> selectForList() {
return ResponseHelper.buildResponse(allPowerServiceImpl.queryForAllPowerList());
}
}
......@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.CommerceInfoDto;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.CommerceInfoServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
......@@ -52,7 +53,7 @@ public class CommerceInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新经销商单位信息", notes = "根据sequenceNbr更新经销商单位信息")
public ResponseModel<CommerceInfoDto> updateBySequenceNbrCommerceInfo(@RequestBody CommerceInfoDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
public ResponseModel<CommerceInfoDto> updateBySequenceNbrCommerceInfo(@RequestBody CommerceInfoDto model,@ApiParam(value = "主键",example = "1805040753609568257")@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(commerceInfoServiceImpl.updateWithModel(model));
}
......@@ -66,7 +67,7 @@ public class CommerceInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@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, @ApiParam(value = "主键",example = "1805040753609568257")@PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(commerceInfoServiceImpl.removeById(sequenceNbr));
}
......@@ -79,7 +80,7 @@ public class CommerceInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个经销商单位信息", notes = "根据sequenceNbr查询单个经销商单位信息")
public ResponseModel<CommerceInfoDto> selectOne(@PathVariable Long sequenceNbr) {
public ResponseModel<CommerceInfoDto> selectOne(@ApiParam(value = "主键",example = "1805040753609568257")@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(commerceInfoServiceImpl.queryBySeq(sequenceNbr));
}
......@@ -93,7 +94,7 @@ public class CommerceInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "经销商单位信息分页查询", notes = "经销商单位信息分页查询")
public ResponseModel<Page<CommerceInfoDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
public ResponseModel<Page<CommerceInfoDto>> queryForPage(@ApiParam(value = "当前页码",example = "1")@RequestParam(value = "current") int current,@ApiParam(value = "分页条数",example = "20")@RequestParam
(value = "size") int size) {
Page<CommerceInfoDto> page = new Page<CommerceInfoDto>();
page.setCurrent(current);
......
......@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.CommercialDto;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.CommercialServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
......@@ -52,7 +53,7 @@ public class CommercialController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新商务信息", notes = "根据sequenceNbr更新商务信息")
public ResponseModel<CommercialDto> updateBySequenceNbrCommercial(@RequestBody CommercialDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
public ResponseModel<CommercialDto> updateBySequenceNbrCommercial(@RequestBody CommercialDto model,@ApiParam(value = "主键",example = "1805040753609568257")@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(commercialServiceImpl.updateWithModel(model));
}
......@@ -66,7 +67,7 @@ public class CommercialController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@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, @ApiParam(value = "主键",example = "1805040753609568257")@PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(commercialServiceImpl.removeById(sequenceNbr));
}
......@@ -79,7 +80,7 @@ public class CommercialController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个商务信息", notes = "根据sequenceNbr查询单个商务信息")
public ResponseModel<CommercialDto> selectOne(@PathVariable Long sequenceNbr) {
public ResponseModel<CommercialDto> selectOne(@ApiParam(value = "主键",example = "1805040753609568257")@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(commercialServiceImpl.queryBySeq(sequenceNbr));
}
......@@ -93,7 +94,7 @@ public class CommercialController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "商务信息分页查询", notes = "商务信息分页查询")
public ResponseModel<Page<CommercialDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
public ResponseModel<Page<CommercialDto>> queryForPage(@ApiParam(value = "当前页码",example = "1")@RequestParam(value = "current") int current,@ApiParam(value = "分页条数",example = "20")@RequestParam
(value = "size") int size) {
Page<CommercialDto> page = new Page<CommercialDto>();
page.setCurrent(current);
......
......@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.hygf.biz.service.impl.FinancingInfoServiceIm
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.StatisticsHomepageServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
......@@ -43,8 +44,8 @@ public class CommonController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/selectRegionByParentCode")
@ApiOperation(httpMethod = "GET", value = "查询省市区", notes = "查询省市区")
public ResponseModel<List<Map<String,Object>>> selectRegionByParentCode(@RequestParam(value = "parentCode", defaultValue = "0") String parentCode,
@RequestParam(value = "level", defaultValue = "1") String level) {
public ResponseModel<List<Map<String,Object>>> selectRegionByParentCode(@ApiParam(value = "父id",example = "0")@RequestParam(value = "parentCode", defaultValue = "0") String parentCode,
@ApiParam(value = "等级",example = "1")@RequestParam(value = "level", defaultValue = "1") String level) {
return ResponseHelper.buildResponse(financingInfoService.selectRegionByParentCode(parentCode, level));
}
......@@ -56,34 +57,19 @@ public class CommonController {
@GetMapping(value = "/downInformation")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "资料下载", notes = "资料下载")
public void downList(HttpServletResponse response, @RequestParam(required = false) String surveyInformationId,
@RequestParam(required = false)List<String> peasantHouseholdIds,
@RequestParam(required = false)String processInstanceId) throws IOException {
public void downList(HttpServletResponse response,
@ApiParam(value = "场站id",example = "[1721720979853414401,1721720979853414401]")@RequestParam(required = false)List<String> peasantHouseholdIds) throws IOException {
// 设置响应头
response.setContentType("application/zip");
commonService.downZiliao(surveyInformationId,peasantHouseholdIds,processInstanceId,response);
commonService.downZiliao("",peasantHouseholdIds,"",response);
System.out.println("zip下载成功");
}
/**
* 设备信息下载
*
* @return
*/
@GetMapping(value = "/test")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "资料下载", notes = "资料下载")
public void test(HttpServletResponse response) throws IOException {
// 设置响应头
response.setContentType("application/zip");
commonService.test(response);
System.out.println("zip下载成功");
}
/**
* 设备信息下载
......@@ -93,7 +79,7 @@ public class CommonController {
@GetMapping(value = "/getSchedule")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "资料下载进度获取", notes = "资料下载进度获取")
public ResponseModel<Object> getSchedule(String peasantHouseholdId) {
public ResponseModel<Object> getSchedule(@ApiParam(value = "场站id",example = "1721720979853414401")String peasantHouseholdId) {
return ResponseHelper.buildResponse(commonService.getSchedule(peasantHouseholdId));
......@@ -110,11 +96,11 @@ public class CommonController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "首页统计环形图及统计表", notes = "首页统计环形图及统计表")
@UserLimits
public ResponseModel<Map<String, Object>> statisticsHomepage(@RequestParam(required = false) String developerCode,
@RequestParam(required = false) String regionalCompaniesCode,
@RequestParam(required = false) String province,
@RequestParam(required = false) String city,
@RequestParam(required = false) String district) {
public ResponseModel<Map<String, Object>> statisticsHomepage(@ApiParam(value = "经销商公司code",example = "87*253*775") @RequestParam(required = false) String developerCode,
@ApiParam(value = "区域公司code",example = "87*253*652") @RequestParam(required = false) String regionalCompaniesCode,
@ApiParam(value = "省份",example = "610000") @RequestParam(required = false) String province,
@ApiParam(value = "市",example = "610700") @RequestParam(required = false) String city,
@ApiParam(value = "区",example = "610116") @RequestParam(required = false) String district) {
return ResponseHelper.buildResponse(statisticsHomepageService.statisticsHomepage(developerCode,regionalCompaniesCode,province,city,district));
......@@ -129,12 +115,12 @@ public class CommonController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "列表上方统计表", notes = "列表上方统计表")
@UserLimits
public ResponseModel<Map<String, Object>> statisticsTop(@RequestParam(required = false) String developerCode,
@RequestParam(required = false) String regionalCompaniesCode,
@RequestParam(required = false) String province,
@RequestParam(required = false) String city,
@RequestParam(required = true) String type,
@RequestParam(required = false) String district) {
public ResponseModel<Map<String, Object>> statisticsTop(@ApiParam(value = "经销商公司code",example = "87*253*775")@RequestParam(required = false) String developerCode,
@ApiParam(value = "区域公司code",example = "87*253*652") @RequestParam(required = false) String regionalCompaniesCode,
@ApiParam(value = "省份",example = "610000") @RequestParam(required = false) String province,
@ApiParam(value = "市",example = "610700") @RequestParam(required = false) String city,
@ApiParam(value = "页面统计类型",example = "survey") @RequestParam(required = true) String type,
@ApiParam(value = "区",example = "610116") @RequestParam(required = false) String district) {
return ResponseHelper.buildResponse(statisticsHomepageService.statisticsTop(type,developerCode,regionalCompaniesCode,province,city,district));
......@@ -147,13 +133,13 @@ public class CommonController {
*/
@GetMapping(value = "/homePageExport")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "资料下载进度获取", notes = "资料下载进度获取")
@ApiOperation(httpMethod = "GET", value = "列表首页统计导出", notes = "列表首页统计导出")
@UserLimits
public void homePageExport(@RequestParam(required = false) String developerCode,
@RequestParam(required = false) String regionalCompaniesCode,
@RequestParam(required = false) String province,
@RequestParam(required = false) String city,
@RequestParam(required = false) String district,
public void homePageExport(@ApiParam(value = "经销商公司code",example = "87*253*775")@RequestParam(required = false) String developerCode,
@ApiParam(value = "区域公司code",example = "87*253*652") @RequestParam(required = false) String regionalCompaniesCode,
@ApiParam(value = "省份",example = "610000") @RequestParam(required = false) String province,
@ApiParam(value = "市",example = "610700") @RequestParam(required = false) String city,
@ApiParam(value = "区",example = "610116") @RequestParam(required = false) String district,
HttpServletResponse response) throws IOException {
statisticsHomepageService.homePageExport(developerCode,regionalCompaniesCode,province,city,district,response);
......
......@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.hygf.biz.service.impl.ContractTemplateServic
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.HouseholdContractServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
......@@ -60,7 +61,7 @@ public class ContractTemplateController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新")
public ResponseModel<ContractTemplateDto> updateBySequenceNbrContractTemplate(@RequestBody ContractTemplateDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
public ResponseModel<ContractTemplateDto> updateBySequenceNbrContractTemplate(@RequestBody ContractTemplateDto model,@ApiParam(value = "主键",example = "1805040753609568257")@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(contractTemplateServiceImpl.updateWithModel(model));
}
......@@ -88,7 +89,7 @@ public class ContractTemplateController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@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, @ApiParam(value = "主键",example = "1805040753609568257")@PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(contractTemplateServiceImpl.removeById(sequenceNbr));
}
......@@ -115,7 +116,7 @@ public class ContractTemplateController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "分页查询", notes = "分页查询")
public ResponseModel<Page<ContractTemplateDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
public ResponseModel<Page<ContractTemplateDto>> queryForPage(@ApiParam(value = "当前页码",example = "1")@RequestParam(value = "current") int current,@ApiParam(value = "分页条数",example = "20")@RequestParam
(value = "size") int size) {
Page<ContractTemplateDto> page = new Page<ContractTemplateDto>();
page.setCurrent(current);
......
......@@ -978,16 +978,7 @@ public class CommonServiceImpl {
cleanup(ziLiaoDir);
}
public void test (HttpServletResponse response) throws UnsupportedEncodingException {
String fileName = "批量资料";
Path currentWorkingDir = Paths.get("");
// 获取当前工作目录
Path rootDir = currentWorkingDir;
Path ziLiaoDir =rootDir.resolve("批量资料");
String encodedFilename = URLEncoder.encode( fileName+".zip", StandardCharsets.UTF_8.name());
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName+".zip", "UTF-8"));
createZipFile(ziLiaoDir, "批量资料",response);
}
private void autoSizeColumns(Sheet sheet) {
if (null != sheet.getRow(0) ){
for (int i = 0; i < sheet.getRow(0).getLastCellNum(); i++) {
......
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