行业清单
This commit is contained in:
parent
05f8575edf
commit
afd2a727b8
|
|
@ -0,0 +1,150 @@
|
|||
package com.rzyc.model.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 新增行业清单项
|
||||
* </p>
|
||||
*/
|
||||
@TableName("in_list_item")
|
||||
@ApiModel(value="InListItem对象", description="行业清单项")
|
||||
public class InListItemAddDto {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "清单项id")
|
||||
private String itemId;
|
||||
|
||||
@ApiModelProperty(value = "行业清单id")
|
||||
private String listId;
|
||||
|
||||
@ApiModelProperty(value = "行业id")
|
||||
private String industryId;
|
||||
|
||||
@ApiModelProperty(value = "清单内容")
|
||||
private String itemContent;
|
||||
|
||||
@ApiModelProperty(value = "考核指标 1:每年 2:每半年 4:每季度 12:每月")
|
||||
private Integer standard;
|
||||
|
||||
@ApiModelProperty(value = "频率")
|
||||
private Integer frequency;
|
||||
|
||||
@ApiModelProperty(value = "附件地址 多个逗号隔开")
|
||||
private String enclosure;
|
||||
|
||||
@ApiModelProperty(value = "清单依据")
|
||||
private String itemBasis;
|
||||
|
||||
@ApiModelProperty(value = "清单主要证据")
|
||||
private String itemProof;
|
||||
|
||||
@ApiModelProperty(value = "清单法律法规")
|
||||
private String itemLaw;
|
||||
|
||||
|
||||
|
||||
public String getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public void setItemId(String itemId) {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
public String getListId() {
|
||||
return listId;
|
||||
}
|
||||
|
||||
public void setListId(String listId) {
|
||||
this.listId = listId;
|
||||
}
|
||||
|
||||
public String getIndustryId() {
|
||||
return industryId;
|
||||
}
|
||||
|
||||
public void setIndustryId(String industryId) {
|
||||
this.industryId = industryId;
|
||||
}
|
||||
|
||||
public String getItemContent() {
|
||||
return itemContent;
|
||||
}
|
||||
|
||||
public void setItemContent(String itemContent) {
|
||||
this.itemContent = itemContent;
|
||||
}
|
||||
|
||||
public Integer getStandard() {
|
||||
return standard;
|
||||
}
|
||||
|
||||
public void setStandard(Integer standard) {
|
||||
this.standard = standard;
|
||||
}
|
||||
|
||||
public Integer getFrequency() {
|
||||
return frequency;
|
||||
}
|
||||
|
||||
public void setFrequency(Integer frequency) {
|
||||
this.frequency = frequency;
|
||||
}
|
||||
|
||||
public String getEnclosure() {
|
||||
return enclosure;
|
||||
}
|
||||
|
||||
public void setEnclosure(String enclosure) {
|
||||
this.enclosure = enclosure;
|
||||
}
|
||||
|
||||
public String getItemBasis() {
|
||||
return itemBasis;
|
||||
}
|
||||
|
||||
public void setItemBasis(String itemBasis) {
|
||||
this.itemBasis = itemBasis;
|
||||
}
|
||||
|
||||
public String getItemProof() {
|
||||
return itemProof;
|
||||
}
|
||||
|
||||
public void setItemProof(String itemProof) {
|
||||
this.itemProof = itemProof;
|
||||
}
|
||||
|
||||
public String getItemLaw() {
|
||||
return itemLaw;
|
||||
}
|
||||
|
||||
public void setItemLaw(String itemLaw) {
|
||||
this.itemLaw = itemLaw;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InListItemAddDto{" +
|
||||
"itemId='" + itemId + '\'' +
|
||||
", listId='" + listId + '\'' +
|
||||
", industryId='" + industryId + '\'' +
|
||||
", itemContent='" + itemContent + '\'' +
|
||||
", standard=" + standard +
|
||||
", frequency=" + frequency +
|
||||
", enclosure='" + enclosure + '\'' +
|
||||
", itemBasis='" + itemBasis + '\'' +
|
||||
", itemProof='" + itemProof + '\'' +
|
||||
", itemLaw='" + itemLaw + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -86,6 +86,14 @@ public class InListItem implements Serializable {
|
|||
@TableField("modify_by")
|
||||
private String modifyBy;
|
||||
|
||||
public Integer getDelState() {
|
||||
return delState;
|
||||
}
|
||||
|
||||
public void setDelState(Integer delState) {
|
||||
this.delState = delState;
|
||||
}
|
||||
|
||||
public String getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
|
@ -195,21 +203,23 @@ public class InListItem implements Serializable {
|
|||
@Override
|
||||
public String toString() {
|
||||
return "InListItem{" +
|
||||
"itemId=" + itemId +
|
||||
", listId=" + listId +
|
||||
", industryId=" + industryId +
|
||||
", itemContent=" + itemContent +
|
||||
"itemId='" + itemId + '\'' +
|
||||
", listId='" + listId + '\'' +
|
||||
", industryId='" + industryId + '\'' +
|
||||
", itemContent='" + itemContent + '\'' +
|
||||
", standard=" + standard +
|
||||
", frequency=" + frequency +
|
||||
", enclosure=" + enclosure +
|
||||
", itemBasis=" + itemBasis +
|
||||
", itemProof=" + itemProof +
|
||||
", itemLaw=" + itemLaw +
|
||||
", enclosure='" + enclosure + '\'' +
|
||||
", itemBasis='" + itemBasis + '\'' +
|
||||
", itemProof='" + itemProof + '\'' +
|
||||
", itemLaw='" + itemLaw + '\'' +
|
||||
", sortId=" + sortId +
|
||||
", delState=" + delState +
|
||||
", createTime=" + createTime +
|
||||
", createBy=" + createBy +
|
||||
", createBy='" + createBy + '\'' +
|
||||
", modifyTime=" + modifyTime +
|
||||
", modifyBy=" + modifyBy +
|
||||
"}";
|
||||
", modifyBy='" + modifyBy + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,16 @@ package com.rzyc.controller;
|
|||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.common.utils.RandomNumber;
|
||||
import com.common.utils.StringUtils;
|
||||
import com.common.utils.TypeConversion;
|
||||
import com.common.utils.model.MultiResult;
|
||||
import com.common.utils.model.Pager;
|
||||
import com.common.utils.model.SingleResult;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.rzyc.mapper.ent.InListMapper;
|
||||
import com.rzyc.model.dto.InListDto;
|
||||
import com.rzyc.model.dto.InListItemAddDto;
|
||||
import com.rzyc.model.dto.InListItemDto;
|
||||
import com.rzyc.model.ent.BaseInClass;
|
||||
import com.rzyc.model.ent.InList;
|
||||
|
|
@ -35,13 +41,14 @@ public class IndustryListController extends BaseController{
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "父级行业列表", notes = "行业清单列表")
|
||||
@PostMapping("/selectIndustry")
|
||||
@GetMapping("/industrySelect")
|
||||
@ResponseBody
|
||||
public MultiResult<String> selectIndustry(){
|
||||
public MultiResult<String> industrySelect(){
|
||||
|
||||
MultiResult<String> result = new MultiResult<>();
|
||||
ArrayList<String> nameList = new ArrayList<>();
|
||||
List<BaseInClass> baseInClassList = baseInClassMapper.findAll();
|
||||
//取出对象的name字段放入集合
|
||||
for (BaseInClass baseInClass : baseInClassList) {
|
||||
String industryClassName = baseInClass.getIndustryclassname();
|
||||
nameList.add(industryClassName);
|
||||
|
|
@ -50,7 +57,6 @@ public class IndustryListController extends BaseController{
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询行业清单
|
||||
* @param
|
||||
|
|
@ -59,14 +65,13 @@ public class IndustryListController extends BaseController{
|
|||
*/
|
||||
|
||||
@ApiOperation(value = "行业清单列表", notes = "行业清单列表")
|
||||
@PostMapping("/industryListSelect")
|
||||
@GetMapping("/industryListSelect")
|
||||
@ResponseBody
|
||||
public MultiResult<String> industryListSelect(@Valid @RequestBody BaseInClass baseInClass)throws Exception{
|
||||
public MultiResult<String> industryListSelect()throws Exception{
|
||||
MultiResult<String> result = new MultiResult<>();
|
||||
ArrayList<String> nameList = new ArrayList<>();
|
||||
LambdaQueryWrapper<InList> lqw = new LambdaQueryWrapper<>();
|
||||
//lqw.eq(InList::,)
|
||||
List<InList> inLists = inListMapper.findAll();
|
||||
//取出对象的name字段放入集合
|
||||
if(inLists.size() > 0){
|
||||
for (InList inList : inLists) {
|
||||
String name = inList.getName();
|
||||
|
|
@ -78,29 +83,6 @@ public class IndustryListController extends BaseController{
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增清单列
|
||||
* @param inListDto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "新增清单列", notes = "新增清单列")
|
||||
@PostMapping("/addInList")
|
||||
@ResponseBody
|
||||
public SingleResult<String> addInList(@Valid @RequestBody InListDto inListDto){
|
||||
InList inList = inListMapper.selectById(inListDto.getList_id());
|
||||
if(inList == null){
|
||||
InList addInList = new InList();
|
||||
BeanUtils.copyProperties(addInList,inListDto);
|
||||
addInList.setCreateTime(new Date());
|
||||
//addInList.getCreateBy(getUserId())
|
||||
}
|
||||
return new SingleResult<String>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询行业清单的所属清单项
|
||||
* @param inListDto
|
||||
|
|
@ -108,7 +90,7 @@ public class IndustryListController extends BaseController{
|
|||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "所属清单项列表", notes = "所属清单项列表")
|
||||
@PostMapping("/industryListItemSelect")
|
||||
@GetMapping("/industryListItemSelect")
|
||||
@ResponseBody
|
||||
public MultiResult<String> industryListItemSelect(@RequestBody InListDto inListDto)throws Exception{
|
||||
MultiResult<String> result = new MultiResult<>();
|
||||
|
|
@ -117,6 +99,8 @@ public class IndustryListController extends BaseController{
|
|||
LambdaQueryWrapper<InListItem> queryWrapper = lambdaQueryWrapper
|
||||
.eq(InListItem::getListId, inListDto.getList_id());
|
||||
List<InListItem> inListItems = inListItemMapper.selectList(queryWrapper);
|
||||
|
||||
//取出对象的content字段放入集合
|
||||
for (InListItem inListItem : inListItems) {
|
||||
String itemContent = inListItem.getItemContent();
|
||||
contentList.add(itemContent);
|
||||
|
|
@ -124,7 +108,6 @@ public class IndustryListController extends BaseController{
|
|||
result.setData(contentList);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除清单项
|
||||
* @param inListItemDto
|
||||
|
|
@ -133,11 +116,43 @@ public class IndustryListController extends BaseController{
|
|||
@ApiOperation(value = "删除清单项", notes = "删除清单项")
|
||||
@PostMapping("/deleteInListItem")
|
||||
@ResponseBody
|
||||
public SingleResult<String> deleteInListItem(@Valid @RequestBody InListItemDto inListItemDto){
|
||||
public SingleResult<String> deleteInListItem(@Valid @RequestBody InListItemDto inListItemDto)throws Exception{
|
||||
inListItemMapper.deleteById(inListItemDto.getItem_id());
|
||||
return new SingleResult<String>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增清单项
|
||||
* @param inListItemAddDto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "新增清单项", notes = "新增清单项")
|
||||
@PostMapping("/insertInListItem")
|
||||
@ResponseBody
|
||||
public SingleResult<String> insertInListItem(@Valid @RequestBody InListItemAddDto inListItemAddDto)throws Exception{
|
||||
SingleResult<String> result = new SingleResult<>();
|
||||
InListItem inListItem = new InListItem();
|
||||
BeanUtils.copyProperties(inListItemAddDto,inListItem);
|
||||
InList inList = inListMapper.selectById(inListItemAddDto.getListId());
|
||||
BaseInClass baseInClass = baseInClassMapper.selectByPrimaryKey(inListItemAddDto.getIndustryId());
|
||||
if(null == inList){
|
||||
result.setCode(0);
|
||||
result.setMessage("用户不存在");
|
||||
return result;
|
||||
}
|
||||
if(StringUtils.isBlank(inListItem.getItemId())){
|
||||
inListItem.setItemId(RandomNumber.getUUid());
|
||||
inListItem.setCreateTime(new Date());
|
||||
inListItem.setCreateBy(inList.getListId());
|
||||
inListItem.setDelState(1);
|
||||
inListItem.setIndustryId(baseInClass.getBaseinclassid());
|
||||
|
||||
inListItemMapper.insert(inListItem);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user