4 changed files with 209 additions and 0 deletions
@ -0,0 +1,115 @@ |
|||
package com.kms.build.controller; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
|
|||
import com.jianwei.common.core.controller.BaseController; |
|||
import com.jianwei.common.core.domain.SearchParam; |
|||
import com.jianwei.common.utils.poi.ExcelUtil; |
|||
import com.kms.build.domain.BsSgcJsjdBuiDjjgd; |
|||
import com.kms.build.service.BsSgcJsjdBuiDjjgdService; |
|||
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.jianwei.common.mybaitsplus.BeanToWrapper; |
|||
|
|||
import com.jianwei.common.annotation.Log; |
|||
import com.jianwei.common.core.domain.AjaxResult; |
|||
import com.jianwei.common.enums.BusinessType; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 【请填写功能名称】Controller |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/system/djjgd") |
|||
@Api(tags = "【请填写功能名称】") |
|||
public class BsSgcJsjdBuiDjjgdController extends BaseController |
|||
{ |
|||
@Autowired |
|||
private BsSgcJsjdBuiDjjgdService bsSgcJsjdBuiDjjgdService; |
|||
|
|||
/** |
|||
* 查询【请填写功能名称】列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ApiOperation("【请填写功能名称】列表") |
|||
public IPage list(@RequestBody SearchParam<BsSgcJsjdBuiDjjgd> sp) |
|||
{ |
|||
return bsSgcJsjdBuiDjjgdService.selectPage(sp); |
|||
} |
|||
|
|||
/** |
|||
* 导出【请填写功能名称】列表 |
|||
*/ |
|||
@Log(title = "【请填写功能名称】导出", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ApiOperation("【请填写功能名称】导出") |
|||
public AjaxResult export(@RequestBody BsSgcJsjdBuiDjjgd bsSgcJsjdBuiDjjgd) |
|||
{ |
|||
List<BsSgcJsjdBuiDjjgd> list = bsSgcJsjdBuiDjjgdService.listByIds(bsSgcJsjdBuiDjjgd.getIds()); |
|||
ExcelUtil<BsSgcJsjdBuiDjjgd> util = new ExcelUtil<>(BsSgcJsjdBuiDjjgd.class); |
|||
return util.exportExcel(list, "djjgd"); |
|||
} |
|||
|
|||
/** |
|||
* 获取【请填写功能名称】详细信息 |
|||
*/ |
|||
@ApiOperation(" 【请填写功能名称】详情") |
|||
@GetMapping(value = "/{id}") |
|||
public AjaxResult getInfo(@PathVariable("id") String id) |
|||
{ |
|||
return AjaxResult.success(bsSgcJsjdBuiDjjgdService.getById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增【请填写功能名称】 |
|||
*/ |
|||
@Log(title = "【请填写功能名称】新增", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
@ApiOperation("【请填写功能名称】新增") |
|||
public AjaxResult add(@RequestBody BsSgcJsjdBuiDjjgd bsSgcJsjdBuiDjjgd) |
|||
{ |
|||
BaseEntityUtils.preInsert(bsSgcJsjdBuiDjjgd); |
|||
return toAjax(bsSgcJsjdBuiDjjgdService.save(bsSgcJsjdBuiDjjgd)); |
|||
} |
|||
|
|||
/** |
|||
* 修改【请填写功能名称】 |
|||
*/ |
|||
@ApiOperation("【请填写功能名称】修改") |
|||
@Log(title = "【请填写功能名称】修改", businessType = BusinessType.UPDATE) |
|||
@PutMapping |
|||
public AjaxResult edit(@RequestBody BsSgcJsjdBuiDjjgd bsSgcJsjdBuiDjjgd) |
|||
{ |
|||
return toAjax(bsSgcJsjdBuiDjjgdService.updateById(bsSgcJsjdBuiDjjgd)); |
|||
} |
|||
|
|||
/** |
|||
* 删除【请填写功能名称】 |
|||
*/ |
|||
@ApiOperation("【请填写功能名称】删除") |
|||
@Log(title = "【请填写功能名称】删除", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public AjaxResult remove(@PathVariable String[] ids) |
|||
{ |
|||
return toAjax(bsSgcJsjdBuiDjjgdService.removeByIds(Arrays.asList(ids))); |
|||
} |
|||
} |
@ -0,0 +1,58 @@ |
|||
package com.kms.build.domain; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.jianwei.common.annotation.Excel; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
|
|||
import com.jianwei.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 【请填写功能名称】对象 bs_sgc_jsjd_bui_djjgd |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@TableName("bs_sgc_jsjd_bui_djjgd") |
|||
@Data |
|||
@ApiModel("【请填写功能名称】") |
|||
public class BsSgcJsjdBuiDjjgd extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 项目编码 */ |
|||
@Excel(name = "项目编码") |
|||
@ApiModelProperty("项目编码") |
|||
private String proCode; |
|||
|
|||
/** 项目编号 */ |
|||
@Excel(name = "项目编号") |
|||
@ApiModelProperty("项目编号") |
|||
private String proNo; |
|||
|
|||
/** 创建人 */ |
|||
@Excel(name = "创建人") |
|||
@ApiModelProperty("创建人") |
|||
private String createUid; |
|||
|
|||
/** 更新人 */ |
|||
@Excel(name = "更新人") |
|||
@ApiModelProperty("更新人") |
|||
private String updateUid; |
|||
|
|||
/** 是否开展 0 否 1是 */ |
|||
@Excel(name = "是否开展 0 否 1是") |
|||
@ApiModelProperty("是否开展 0 否 1是") |
|||
private String isCarry; |
|||
|
|||
/** 附件 */ |
|||
@Excel(name = "附件") |
|||
@ApiModelProperty("附件") |
|||
private String attachment; |
|||
|
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.kms.build.mapper; |
|||
|
|||
import com.kms.build.domain.BsSgcJsjdBuiDjjgd; |
|||
import org.springframework.stereotype.Repository; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
|
|||
|
|||
/** |
|||
* 【请填写功能名称】Mapper接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@Repository |
|||
public interface BsSgcJsjdBuiDjjgdMapper extends BaseMapper<BsSgcJsjdBuiDjjgd> { |
|||
|
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.kms.build.service; |
|||
|
|||
import com.kms.build.domain.BsSgcJsjdBuiDjjgd; |
|||
import com.kms.build.mapper.BsSgcJsjdBuiDjjgdMapper; |
|||
import org.springframework.stereotype.Service; |
|||
import com.jianwei.common.core.service.BaseService; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 【请填写功能名称】Service接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@Service |
|||
public class BsSgcJsjdBuiDjjgdService extends BaseService<BsSgcJsjdBuiDjjgdMapper, BsSgcJsjdBuiDjjgd>{ |
|||
|
|||
} |
Loading…
Reference in new issue