174-企标计划和技术标准流程关联表
This commit is contained in:
+28
@@ -4,6 +4,8 @@ package com.adc.da.slrs.esRevisePlan.controller;
|
|||||||
import com.adc.da.http.PageInfo;
|
import com.adc.da.http.PageInfo;
|
||||||
import com.adc.da.http.ResponseMessage;
|
import com.adc.da.http.ResponseMessage;
|
||||||
import com.adc.da.http.Result;
|
import com.adc.da.http.Result;
|
||||||
|
import com.adc.da.slrs.esRevisePlan.entity.EsPrcRelation;
|
||||||
|
import com.adc.da.slrs.esRevisePlan.service.IEsPrcRelationService;
|
||||||
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
|
import com.adc.da.slrs.esRevisePlan.service.IEsRevisePlanService;
|
||||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.dao.QualityEvaluationDao;
|
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.dao.QualityEvaluationDao;
|
||||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation;
|
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.entity.QualityEvaluation;
|
||||||
@@ -37,6 +39,8 @@ public class EsRevisePlanController extends BaseController<EsRevisePlan> {
|
|||||||
IEsRevisePlanService iEsRevisePlanService;
|
IEsRevisePlanService iEsRevisePlanService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private QualityEvaluationDao qualityEvaluationDao;
|
private QualityEvaluationDao qualityEvaluationDao;
|
||||||
|
@Autowired
|
||||||
|
IEsPrcRelationService iEsPrcRelationService;
|
||||||
|
|
||||||
@ApiOperation(value = "获取所有企标计划")
|
@ApiOperation(value = "获取所有企标计划")
|
||||||
@GetMapping("getAllPlans")
|
@GetMapping("getAllPlans")
|
||||||
@@ -174,4 +178,28 @@ public class EsRevisePlanController extends BaseController<EsRevisePlan> {
|
|||||||
public ResponseMessage<Object> delPlans(String ids){
|
public ResponseMessage<Object> delPlans(String ids){
|
||||||
return Result.success(iEsRevisePlanService.delPlans(ids));
|
return Result.success(iEsRevisePlanService.delPlans(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询企标计划和技术标准流程关联表")
|
||||||
|
@GetMapping("/listEsPrcRelationByWk")
|
||||||
|
public ResponseMessage<Object> listEsPrcRelation(String esId){
|
||||||
|
return Result.success(iEsPrcRelationService.list(esId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "新增企标计划和技术标准流程关联表")
|
||||||
|
@PostMapping("/addEsPrcRelationByWk")
|
||||||
|
public ResponseMessage<Object> addEsPrcRelation(EsPrcRelation esPrcRelation){
|
||||||
|
return Result.success(iEsPrcRelationService.addEsPrcRelation(esPrcRelation));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改企标计划和技术标准流程关联表")
|
||||||
|
@PostMapping("/modEsPrcRelationByWk")
|
||||||
|
public ResponseMessage<Object> modEsPrcRelation(EsPrcRelation esPrcRelation){
|
||||||
|
return Result.success(iEsPrcRelationService.modifyEsPrcRelation(esPrcRelation));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除企标计划和技术标准流程关联表")
|
||||||
|
@GetMapping("/delEsPrcRelationByWk")
|
||||||
|
public ResponseMessage<Object> delEsPrcRelation(String esId){
|
||||||
|
return Result.success(iEsPrcRelationService.delEsPrcRelation(esId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.adc.da.slrs.esRevisePlan.dao;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.esRevisePlan.entity.EsPrcRelation;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 企标计划和技术标准流程关联表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author iyawei
|
||||||
|
* @since 2022-11-18
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface EsPrcRelationDao extends BaseMapper<EsPrcRelation> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.adc.da.slrs.esRevisePlan.entity;
|
||||||
|
|
||||||
|
import com.adc.da.base.entity.BaseEntity;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(value="EsPrcRelation对象", description="企标计划和技术标准流程关联表")
|
||||||
|
public class EsPrcRelation extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企标计划ID")
|
||||||
|
private String esId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "流程ID")
|
||||||
|
private String prcId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
package com.adc.da.slrs.esRevisePlan.service;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.esRevisePlan.entity.EsPrcRelation;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IEsPrcRelationService extends IService<EsPrcRelation> {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param esId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<EsPrcRelation> list(String esId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param esPrcRelation
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int addEsPrcRelation(EsPrcRelation esPrcRelation);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param esPrcRelation
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int modifyEsPrcRelation(EsPrcRelation esPrcRelation);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param esId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int delEsPrcRelation(String esId);
|
||||||
|
}
|
||||||
+46
@@ -0,0 +1,46 @@
|
|||||||
|
package com.adc.da.slrs.esRevisePlan.service.impl;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.esRevisePlan.dao.EsPrcRelationDao;
|
||||||
|
import com.adc.da.slrs.esRevisePlan.entity.EsPrcRelation;
|
||||||
|
import com.adc.da.slrs.esRevisePlan.service.IEsPrcRelationService;
|
||||||
|
import com.adc.da.util.UUIDUtils;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class EsPrcRelationServiceImpl extends ServiceImpl<EsPrcRelationDao, EsPrcRelation> implements IEsPrcRelationService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<EsPrcRelation> list(String esId) {
|
||||||
|
QueryWrapper<EsPrcRelation> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.lambda().eq(EsPrcRelation::getEsId, esId);
|
||||||
|
return this.baseMapper.selectList(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int addEsPrcRelation(EsPrcRelation esPrcRelation) {
|
||||||
|
esPrcRelation.setId(UUIDUtils.randomUUID(32));
|
||||||
|
Date date = new Date();
|
||||||
|
esPrcRelation.setCreateTime(date);
|
||||||
|
esPrcRelation.setUpdateTime(date);
|
||||||
|
return this.baseMapper.insert(esPrcRelation);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int modifyEsPrcRelation(EsPrcRelation esPrcRelation) {
|
||||||
|
Date date = new Date();
|
||||||
|
esPrcRelation.setUpdateTime(date);
|
||||||
|
QueryWrapper<EsPrcRelation> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.lambda().eq(EsPrcRelation::getEsId, esPrcRelation.getEsId());
|
||||||
|
return this.baseMapper.update(esPrcRelation, queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int delEsPrcRelation(String esId) {
|
||||||
|
QueryWrapper<EsPrcRelation> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.lambda().eq(EsPrcRelation::getEsId, esId);
|
||||||
|
return this.baseMapper.delete(queryWrapper);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.adc.da.slrs.esRevisePlan.dao.EsPrcRelationDao">
|
||||||
|
|
||||||
|
<resultMap id="BaseInfoMap" type="com.adc.da.slrs.esRevisePlan.entity.EsPrcRelation">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<id column="es_id" property="esId" />
|
||||||
|
<id column="prc_id" property="prcId" />
|
||||||
|
<id column="create_time" property="createTime" />
|
||||||
|
<id column="update_time" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user