计划库新增字段及逻辑
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 {
|
||||
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<?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.esMatingRelation.dao.EsMatingRelationDao">
|
||||
|
||||
<select id="getDatas" resultType="com.adc.da.slrs.esMatingRelation.entity.EsMatingRelation">
|
||||
select es_mating_relation.id , es_mating_relation.stand_id , es_mating_relation.stand_type,sar_standards_info.STAND_NAME as standName,
|
||||
concat(sar_standards_info.STAND_SORT,concat(' ',concat(concat(sar_standards_info.STAND_NUMBER,concat('-',sar_standards_info.STAND_YEAR))))) as standNumber
|
||||
from es_mating_relation
|
||||
left join sar_standards_info on es_mating_relation.stand_id = sar_standards_info.ID
|
||||
where es_mating_relation.es_id=#{id}
|
||||
union all
|
||||
select es_mating_relation.id , es_mating_relation.stand_id , es_mating_relation.stand_type,sar_bussioness_stand.STAND_NAME as standName,
|
||||
sar_bussioness_stand.STAND_CODE as standNumber
|
||||
from es_mating_relation
|
||||
left join sar_bussioness_stand on es_mating_relation.stand_id = sar_bussioness_stand.ID
|
||||
where es_mating_relation.es_id=#{id}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -18,8 +18,37 @@
|
||||
draft_time,
|
||||
release_time,
|
||||
unit,
|
||||
rqb_json as rqbJson,
|
||||
ts_json as tsJson,
|
||||
area,
|
||||
qblb,
|
||||
(select sar_bussioness_stand.STAND_NAME from sar_bussioness_stand where sar_bussioness_stand.ID = rqb_json )as rqbName,
|
||||
(select sar_bussioness_stand.STAND_CODE from sar_bussioness_stand where sar_bussioness_stand.ID = rqb_json )as rqbCode,
|
||||
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
|
||||
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
|
||||
(SELECT GROUP_CONCAT(DICTIONARY_NAME) from ts_dictionary WHERE find_in_set(ts_dictionary.DICTIONARY_CODE,tsJson) ) as tsJsonName,
|
||||
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,res_person) ) as res_personName,
|
||||
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,wg_leader) ) as wg_leaderName
|
||||
</sql>
|
||||
|
||||
<sql id="BaseInfoList">
|
||||
id,
|
||||
es_name,
|
||||
plan_status,
|
||||
revise_status,
|
||||
drafter,
|
||||
res_person,
|
||||
wg_leader,
|
||||
draft_time,
|
||||
release_time,
|
||||
unit,
|
||||
rqb_json as rqbJson,
|
||||
ts_json as tsJson,
|
||||
area,
|
||||
qblb,
|
||||
(select group_concat(ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit)) as unitName,
|
||||
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,drafter) ) as drafterName,
|
||||
(SELECT GROUP_CONCAT(ts_dictype.DIC_TYPE_NAME) from ts_dictype WHERE find_in_set(ts_dictype.DIC_TYPE_CODE,area) ) as areaName,
|
||||
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,res_person) ) as res_personName,
|
||||
(SELECT GROUP_CONCAT(UNAME) from ts_user WHERE find_in_set(USID,wg_leader) ) as wg_leaderName
|
||||
</sql>
|
||||
@@ -34,6 +63,31 @@
|
||||
<result property="draftTime" column="draft_time"></result>
|
||||
<result property="releaseTime" column="release_time"></result>
|
||||
<result property="unit" column="unit"></result>
|
||||
<result property="area" column="area"></result>
|
||||
<result property="rqbJson" column="rqb_json"></result>
|
||||
<result property="tsJson" column="ts_json"></result>
|
||||
<result property="qblb" column="qblb"></result>
|
||||
<association property="esMatingRelations" javaType="java.util.List" column="id" select="com.adc.da.slrs.esMatingRelation.dao.EsMatingRelationDao.getDatas"/>
|
||||
<association property="esStandRelations" javaType="java.util.List" column="id" select="com.adc.da.slrs.esStandRelation.dao.EsStandRelationDao.getDatas"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="BaseInfoMapList" type="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan">
|
||||
<id property="id" column="id"></id>
|
||||
<result property="esName" column="es_name"></result>
|
||||
<result property="planStatus" column="plan_status"></result>
|
||||
<result property="reviseStatus" column="revise_status"></result>
|
||||
<result property="drafter" column="drafter"></result>
|
||||
<result property="resPerson" column="res_person"></result>
|
||||
<result property="wgLeader" column="wg_leader"></result>
|
||||
<result property="draftTime" column="draft_time"></result>
|
||||
<result property="releaseTime" column="release_time"></result>
|
||||
<result property="unit" column="unit"></result>
|
||||
<result property="area" column="area"></result>
|
||||
<result property="rqbJson" column="rqb_json"></result>
|
||||
<result property="tsJson" column="ts_json"></result>
|
||||
<result property="qblb" column="qblb"></result>
|
||||
<!--<association property="esMatingRelations" javaType="java.util.List" column="id" select="com.adc.da.slrs.esMatingRelation.dao.EsMatingRelationDao.getDatas"/>-->
|
||||
<!--<association property="esStandRelations" javaType="java.util.List" column="id" select="com.adc.da.slrs.esStandRelation.dao.EsStandRelationDao.getDatas"/>-->
|
||||
</resultMap>
|
||||
<!-- 查询条件-->
|
||||
<sql id="Conditions">
|
||||
@@ -41,6 +95,12 @@
|
||||
<if test="esName != null and esName != ''">
|
||||
and es_name like concat('%',#{esName},'%')
|
||||
</if>
|
||||
<if test="area != null and area != ''">
|
||||
and area = #{area}
|
||||
</if>
|
||||
<if test="qblb != null and qblb != ''">
|
||||
and qblb = #{qblb}
|
||||
</if>
|
||||
<if test="planStatus != null and planStatus != ''">
|
||||
and plan_status = #{planStatus}
|
||||
</if>
|
||||
@@ -75,14 +135,14 @@
|
||||
<include refid="Conditions"></include>
|
||||
</select>
|
||||
<!-- 查询所有-->
|
||||
<select id="selectAll" resultMap="BaseInfoMap" >
|
||||
select <include refid="BaseInfo"></include> from es_revise_plan
|
||||
<select id="selectAll" resultMap="BaseInfoMapList" >
|
||||
select <include refid="BaseInfoList"></include> from es_revise_plan
|
||||
<include refid="pages">
|
||||
</include>
|
||||
</select>
|
||||
<!-- 多条件查询-->
|
||||
<select id="queryAll" parameterType="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan" resultMap="BaseInfoMap">
|
||||
select <include refid="BaseInfo"></include> from es_revise_plan
|
||||
<select id="queryAll" parameterType="com.adc.da.slrs.esRevisePlan.entity.EsRevisePlan" resultMap="BaseInfoMapList">
|
||||
select <include refid="BaseInfoList"></include> from es_revise_plan
|
||||
<include refid="Conditions">
|
||||
</include>
|
||||
<include refid="pages">
|
||||
@@ -127,6 +187,18 @@
|
||||
<if test="unit != null and unit != ''">
|
||||
unit = #{unit},
|
||||
</if>
|
||||
<if test="rqbJson != null and rqbJson != ''">
|
||||
rqb_json=#{rqbJson}
|
||||
</if>
|
||||
<if test="tsJson != null and tsJson != ''">
|
||||
ts_json=#{tsJson}
|
||||
</if>
|
||||
<if test="area != null and area != ''">
|
||||
area=#{area}
|
||||
</if>
|
||||
<if test="qblb != null and qblb != ''">
|
||||
qblb=#{qblb}
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -164,6 +236,18 @@
|
||||
<if test="unit != null and unit != ''">
|
||||
unit,
|
||||
</if>
|
||||
<if test="rqbJson != null and rqbJson != ''">
|
||||
rqb_json,
|
||||
</if>
|
||||
<if test="tsJson != null and tsJson != ''">
|
||||
ts_json,
|
||||
</if>
|
||||
<if test="area != null and area != ''">
|
||||
area,
|
||||
</if>
|
||||
<if test="qblb != null and qblb != ''">
|
||||
qblb,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -197,6 +281,18 @@
|
||||
<if test="unit != null and unit != ''">
|
||||
#{unit},
|
||||
</if>
|
||||
<if test="rqbJson != null and rqbJson != ''">
|
||||
#{rqbJson},
|
||||
</if>
|
||||
<if test="tsJson != null and tsJson != ''">
|
||||
#{tsJson},
|
||||
</if>
|
||||
<if test="area != null and area != ''">
|
||||
#{area},
|
||||
</if>
|
||||
<if test="qblb != null and qblb != ''">
|
||||
#{qblb},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<!-- 删除-->
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<?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.esStandRelation.dao.EsStandRelationDao">
|
||||
|
||||
<select id="getDatas" resultType="com.adc.da.slrs.esStandRelation.entity.EsStandRelation">
|
||||
select es_stand_relation.id , es_stand_relation.stand_id , es_stand_relation.stand_type,sar_standards_info.STAND_NAME as standName,
|
||||
concat(sar_standards_info.STAND_SORT,concat(' ',concat(concat(sar_standards_info.STAND_NUMBER,concat('-',sar_standards_info.STAND_YEAR))))) as standNumber,
|
||||
es_stand_relation.is_relate as isRelate,es_stand_relation.technologic,es_stand_relation.use_level as useLevel
|
||||
from es_stand_relation
|
||||
left join sar_standards_info on es_stand_relation.stand_id = sar_standards_info.ID
|
||||
where es_stand_relation.es_id=#{id}
|
||||
union all
|
||||
select es_stand_relation.id , es_stand_relation.stand_id , es_stand_relation.stand_type,sar_bussioness_stand.STAND_NAME as standName,
|
||||
sar_bussioness_stand.STAND_CODE as standNumber,es_stand_relation.is_relate as isRelate,es_stand_relation.technologic,es_stand_relation.use_level as useLevel
|
||||
from es_stand_relation
|
||||
left join sar_bussioness_stand on es_stand_relation.stand_id = sar_bussioness_stand.ID
|
||||
where es_stand_relation.es_id=#{id}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user