计划库新增字段及逻辑
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.esMatingRelation.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2021-12-24
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|EsMatingRelation|")
|
||||
@RequestMapping("/esMatingRelation/es-mating-relation")
|
||||
public class EsMatingRelationController extends BaseController<EsMatingRelation> {
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.adc.da.slrs.esMatingRelation.dao;
|
||||
|
||||
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2021-12-24
|
||||
*/
|
||||
public interface EsMatingRelationDao extends BaseMapper<EsMatingRelation> {
|
||||
|
||||
List<EsMatingRelation> getDatas(@Param("id") String id);
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.adc.da.slrs.esMatingRelation.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2021-12-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="EsMatingRelation对象", description="")
|
||||
public class EsMatingRelation extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField("id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "计划id")
|
||||
@TableField("es_id")
|
||||
private String esId;
|
||||
|
||||
@ApiModelProperty(value = "标准id")
|
||||
@TableField("stand_id")
|
||||
private String standId;
|
||||
|
||||
@ApiModelProperty(value = "标准类型")
|
||||
@TableField("stand_type")
|
||||
private String standType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standNumber;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standName;
|
||||
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.esMatingRelation.service;
|
||||
|
||||
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2021-12-24
|
||||
*/
|
||||
public interface IEsMatingRelationService extends IService<EsMatingRelation> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.esMatingRelation.service.impl;
|
||||
|
||||
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
|
||||
import com.adc.da.slrs.esMatingRelation.dao.EsMatingRelationDao;
|
||||
import com.adc.da.slrs.esMatingRelation.service.IEsMatingRelationService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2021-12-24
|
||||
*/
|
||||
@Service
|
||||
public class EsMatingRelationServiceImpl extends ServiceImpl<EsMatingRelationDao, EsMatingRelation> implements IEsMatingRelationService {
|
||||
|
||||
}
|
||||
+1
-1
@@ -53,7 +53,7 @@ public class EsRevisePlanController extends BaseController<EsRevisePlan> {
|
||||
return Result.success(iEsRevisePlanService.getOnePlan(id));
|
||||
}
|
||||
|
||||
|
||||
//----------------回来改----------------------上面的------
|
||||
@ApiOperation(value = "获取是否存在重复名企标名称接口")
|
||||
@GetMapping("/getDataByName")
|
||||
public ResponseMessage<Object> getDataByName(EsRevisePlan esRevisePlan){
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.adc.da.slrs.esRevisePlan.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
|
||||
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -73,6 +76,30 @@ public class EsRevisePlan extends BasePage {
|
||||
@ApiModelProperty(value = "起草责任单位ID")
|
||||
private String unitName;
|
||||
|
||||
// @ApiModelProperty(value = "引用标准json")
|
||||
// private String rsJson;
|
||||
// @ApiModelProperty(value = "配套标准json")
|
||||
// private String ptJson;
|
||||
@ApiModelProperty(value = "引入企业标准json(标准id)")
|
||||
private String rqbJson;
|
||||
@ApiModelProperty(value = "引入企业标准json(标准id)")
|
||||
private String rqbName;
|
||||
@ApiModelProperty(value = "引入企业标准json(标准id)")
|
||||
private String rqbCode;
|
||||
@ApiModelProperty(value = "体系结构树(找到表直接json处理掉,存储方式是逗号拼接)")
|
||||
private String tsJson;
|
||||
@ApiModelProperty(value = "体系结构树(找到表直接json处理掉,存储方式是逗号拼接)")
|
||||
private String tsJsonName;
|
||||
@ApiModelProperty(value = "标准范围")
|
||||
private String area;
|
||||
@ApiModelProperty(value = "标准范围")
|
||||
private String areaName;
|
||||
@ApiModelProperty(value = "标准范围")
|
||||
private String qblb;
|
||||
|
||||
private List<EsMatingRelation> esMatingRelations;
|
||||
|
||||
private List<EsStandRelation> esStandRelations;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+27
@@ -1,9 +1,14 @@
|
||||
package com.adc.da.slrs.esRevisePlan.service.impl;
|
||||
|
||||
import com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation;
|
||||
import com.adc.da.slrs.esMatingRelation.service.IEsMatingRelationService;
|
||||
import com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan;
|
||||
import com.adc.da.slrs.esRevisePlan.dao.EsRevisePlanDao;
|
||||
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
|
||||
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
|
||||
import com.adc.da.slrs.esStandRelation.service.IEsStandRelationService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -25,6 +30,10 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
EsRevisePlanDao esRevisePlanDao;
|
||||
@Autowired
|
||||
IEsRevisePlanService esRevisePlanService;
|
||||
@Autowired
|
||||
IEsMatingRelationService esMatingRelationService;
|
||||
@Autowired
|
||||
IEsStandRelationService esStandRelationService;
|
||||
|
||||
@Override
|
||||
public List<EsRevisePlan> getAllPlans(EsRevisePlan esRevisePlan) {
|
||||
@@ -54,6 +63,8 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
return "企标名称不能重复,请更换新的企标名称。";
|
||||
}else {
|
||||
esRevisePlanDao.updateOne(esRevisePlan);
|
||||
esMatingRelationService.updateBatchById(esRevisePlan.getEsMatingRelations());
|
||||
esStandRelationService.updateBatchById(esRevisePlan.getEsStandRelations());
|
||||
return "操作成功";
|
||||
}
|
||||
}
|
||||
@@ -66,18 +77,34 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
return "企标名称不能重复,请更换新的企标名称";
|
||||
}else {
|
||||
esRevisePlanDao.insertOne(esRevisePlan);
|
||||
esMatingRelationService.saveBatch(esRevisePlan.getEsMatingRelations());
|
||||
esStandRelationService.saveBatch(esRevisePlan.getEsStandRelations());
|
||||
return "操作成功";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delPlan(String id) {
|
||||
QueryWrapper<EsMatingRelation> queryWrapper=new QueryWrapper<>();
|
||||
queryWrapper.eq("es_id",id);
|
||||
esMatingRelationService.remove(queryWrapper);
|
||||
QueryWrapper<EsStandRelation> queryWrapper1=new QueryWrapper<>();
|
||||
queryWrapper1.eq("es_id",id);
|
||||
esStandRelationService.remove(queryWrapper1);
|
||||
return esRevisePlanDao.deleteOne(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delPlans(String ids) {
|
||||
String[] str = ids.split(",");
|
||||
QueryWrapper<EsMatingRelation> queryWrapper=new QueryWrapper<>();
|
||||
queryWrapper.in("es_id",str);
|
||||
esMatingRelationService.remove(queryWrapper);
|
||||
|
||||
QueryWrapper<EsStandRelation> queryWrapper1=new QueryWrapper<>();
|
||||
queryWrapper1.in("es_id",str);
|
||||
esStandRelationService.remove(queryWrapper1);
|
||||
|
||||
return esRevisePlanDao.deleteBatch(str);
|
||||
}
|
||||
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.esStandRelation.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2021-12-24
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|EsStandRelation|")
|
||||
@RequestMapping("/esStandRelation/es-stand-relation")
|
||||
public class EsStandRelationController extends BaseController<EsStandRelation> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.adc.da.slrs.esStandRelation.dao;
|
||||
|
||||
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2021-12-24
|
||||
*/
|
||||
public interface EsStandRelationDao extends BaseMapper<EsStandRelation> {
|
||||
List<EsStandRelation> getDatas(@Param("id")String id);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.adc.da.slrs.esStandRelation.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2021-12-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="EsStandRelation对象", description="")
|
||||
public class EsStandRelation extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField("id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "企标制修订计划")
|
||||
@TableField("es_id")
|
||||
private String esId;
|
||||
|
||||
@ApiModelProperty(value = "是否引用标准")
|
||||
@TableField("is_relate")
|
||||
private String isRelate;
|
||||
|
||||
@ApiModelProperty(value = "采用程度")
|
||||
@TableField("use_level")
|
||||
private String useLevel;
|
||||
|
||||
@ApiModelProperty(value = "简述技术指标依据")
|
||||
@TableField("technologic")
|
||||
private String technologic;
|
||||
|
||||
@ApiModelProperty(value = "采标id")
|
||||
@TableField("stand_id")
|
||||
private String standId;
|
||||
|
||||
@ApiModelProperty(value = "标准类型")
|
||||
@TableField("stand_type")
|
||||
private String standType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standNumber;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standName;
|
||||
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.esStandRelation.service;
|
||||
|
||||
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2021-12-24
|
||||
*/
|
||||
public interface IEsStandRelationService extends IService<EsStandRelation> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.esStandRelation.service.impl;
|
||||
|
||||
import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
|
||||
import com.adc.da.slrs.esStandRelation.dao.EsStandRelationDao;
|
||||
import com.adc.da.slrs.esStandRelation.service.IEsStandRelationService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2021-12-24
|
||||
*/
|
||||
@Service
|
||||
public class EsStandRelationServiceImpl extends ServiceImpl<EsStandRelationDao, EsStandRelation> implements IEsStandRelationService {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user