4 changed files with 254 additions and 0 deletions
@ -0,0 +1,122 @@ |
|||
package com.kms.yg.sz.controller; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
|
|||
import com.kms.system.service.SysDeptService; |
|||
import com.kms.system.service.SysXzqhService; |
|||
import com.shuili.common.core.controller.BaseController; |
|||
import com.shuili.common.core.domain.SearchParam; |
|||
import com.shuili.common.utils.poi.ExcelUtil; |
|||
import com.kms.common.utils.BaseEntityUtils; |
|||
|
|||
|
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.PutMapping; |
|||
import org.springframework.web.bind.annotation.DeleteMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.shuili.common.mybaitsplus.BeanToWrapper; |
|||
|
|||
import com.shuili.common.annotation.Log; |
|||
import com.shuili.common.core.domain.AjaxResult; |
|||
import com.shuili.common.enums.BusinessType; |
|||
import com.kms.yg.sz.domain.BsSgcSzYaxx; |
|||
import com.kms.yg.sz.service.BsSgcSzYaxxService; |
|||
|
|||
|
|||
/** |
|||
* 水闸预案Controller |
|||
* |
|||
* @author kms |
|||
* @date 2024-01-23 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/yaxx/yaxx") |
|||
@Api(tags = "水闸预案") |
|||
public class BsSgcSzYaxxController extends BaseController |
|||
{ |
|||
@Autowired |
|||
private BsSgcSzYaxxService bsSgcSzYaxxService; |
|||
|
|||
@Autowired |
|||
private SysXzqhService sysXzqhService; |
|||
|
|||
@Autowired |
|||
private SysDeptService sysDeptService; |
|||
|
|||
/** |
|||
* 查询水闸预案列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ApiOperation("水闸预案列表") |
|||
public IPage list(@RequestBody SearchParam<BsSgcSzYaxx> sp) |
|||
{ |
|||
return bsSgcSzYaxxService.selectPage(sp); |
|||
} |
|||
|
|||
/** |
|||
* 导出水闸预案列表 |
|||
*/ |
|||
@Log(title = "水闸预案导出", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ApiOperation("水闸预案导出") |
|||
public AjaxResult export(@RequestBody BsSgcSzYaxx bsSgcSzYaxx) |
|||
{ |
|||
List<BsSgcSzYaxx> list = bsSgcSzYaxxService.listByIds(bsSgcSzYaxx.getIds()); |
|||
ExcelUtil<BsSgcSzYaxx> util = new ExcelUtil<>(BsSgcSzYaxx.class); |
|||
return util.exportExcel(list, "yaxx"); |
|||
} |
|||
|
|||
/** |
|||
* 获取水闸预案详细信息 |
|||
*/ |
|||
@ApiOperation(" 水闸预案详情") |
|||
@GetMapping(value = "/{id}") |
|||
public AjaxResult getInfo(@PathVariable("id") String id) |
|||
{ |
|||
return AjaxResult.success(bsSgcSzYaxxService.getById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增水闸预案 |
|||
*/ |
|||
@Log(title = "水闸预案新增", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
@ApiOperation("水闸预案新增") |
|||
public AjaxResult add(@RequestBody BsSgcSzYaxx bsSgcSzYaxx) |
|||
{ |
|||
BaseEntityUtils.preInsert(bsSgcSzYaxx); |
|||
return toAjax(bsSgcSzYaxxService.save(bsSgcSzYaxx)); |
|||
} |
|||
|
|||
/** |
|||
* 修改水闸预案 |
|||
*/ |
|||
@ApiOperation("水闸预案修改") |
|||
@Log(title = "水闸预案修改", businessType = BusinessType.UPDATE) |
|||
@PutMapping |
|||
public AjaxResult edit(@RequestBody BsSgcSzYaxx bsSgcSzYaxx) |
|||
{ |
|||
return toAjax(bsSgcSzYaxxService.updateById(bsSgcSzYaxx)); |
|||
} |
|||
|
|||
/** |
|||
* 删除水闸预案 |
|||
*/ |
|||
@ApiOperation("水闸预案删除") |
|||
@Log(title = "水闸预案删除", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public AjaxResult remove(@PathVariable String[] ids) |
|||
{ |
|||
return toAjax(bsSgcSzYaxxService.removeByIds(Arrays.asList(ids))); |
|||
} |
|||
} |
@ -0,0 +1,99 @@ |
|||
package com.kms.yg.sz.domain; |
|||
|
|||
import java.util.Date; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.shuili.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import com.shuili.common.annotation.Excel; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 水闸预案对象 bs_sgc_sz_yaxx |
|||
* |
|||
* @author kms |
|||
* @date 2024-01-23 |
|||
*/ |
|||
@TableName("bs_sgc_sz_yaxx") |
|||
@Data |
|||
@ApiModel("水闸预案") |
|||
public class BsSgcSzYaxx extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 水闸id */ |
|||
@Excel(name = "水闸id") |
|||
@ApiModelProperty("水闸id") |
|||
private String sluiceId; |
|||
|
|||
/** 水闸代码 */ |
|||
@Excel(name = "水闸代码") |
|||
@ApiModelProperty("水闸代码") |
|||
private String sluiceCode; |
|||
|
|||
/** 水闸名称 */ |
|||
@Excel(name = "水闸名称") |
|||
@ApiModelProperty("水闸名称") |
|||
private String sluiceName; |
|||
|
|||
/** 水闸类型 */ |
|||
@Excel(name = "水闸类型") |
|||
@ApiModelProperty("水闸类型") |
|||
private String sluiceType; |
|||
|
|||
/** 工程规模 */ |
|||
@Excel(name = "工程规模") |
|||
@ApiModelProperty("工程规模") |
|||
private String engineerScale; |
|||
|
|||
/** 负责人 */ |
|||
@Excel(name = "负责人") |
|||
@ApiModelProperty("负责人") |
|||
private String personName; |
|||
|
|||
/** 类型 */ |
|||
@Excel(name = "类型") |
|||
@ApiModelProperty("类型") |
|||
private String type; |
|||
|
|||
/** 开展时间 */ |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
@Excel(name = "开展时间", width = 30, dateFormat = "yyyy-MM-dd") |
|||
@ApiModelProperty("开展时间") |
|||
private Date implementationTime; |
|||
|
|||
/** 预案内容 */ |
|||
@Excel(name = "预案内容") |
|||
@ApiModelProperty("预案内容") |
|||
private String planContent; |
|||
|
|||
/** 图片 */ |
|||
@Excel(name = "图片") |
|||
@ApiModelProperty("图片") |
|||
private String photo; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "图片") |
|||
@ApiModelProperty("图片") |
|||
private String createUid; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "图片") |
|||
@ApiModelProperty("图片") |
|||
private String updateUid; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "图片") |
|||
@ApiModelProperty("图片") |
|||
private String owerDept; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "图片") |
|||
@ApiModelProperty("图片") |
|||
private String relation; |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.kms.yg.sz.mapper; |
|||
|
|||
import org.springframework.stereotype.Repository; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.kms.yg.sz.domain.BsSgcSzYaxx; |
|||
|
|||
/** |
|||
* 水闸预案Mapper接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-01-23 |
|||
*/ |
|||
@Repository |
|||
public interface BsSgcSzYaxxMapper extends BaseMapper<BsSgcSzYaxx> { |
|||
|
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.kms.yg.sz.service; |
|||
|
|||
import com.shuili.common.core.service.BaseService; |
|||
import com.kms.yg.sz.mapper.BsSgcSzYaxxMapper; |
|||
import com.kms.yg.sz.domain.BsSgcSzYaxx; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 水闸预案Service接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-01-23 |
|||
*/ |
|||
@Service |
|||
public class BsSgcSzYaxxService extends BaseService<BsSgcSzYaxxMapper, BsSgcSzYaxx>{ |
|||
|
|||
} |
Loading…
Reference in new issue