feat:1
This commit is contained in:
+33
-2
@@ -1,12 +1,22 @@
|
||||
package com.adc.da.slrs.otSvpps.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.otSvpps.page.OtSvppsEOPage;
|
||||
import com.adc.da.slrs.otSvpps.service.IOtSvppsService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.otSvpps.entity.OtSvpps;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* SVPPS结构数据 SVPPS数据 前端控制器
|
||||
@@ -16,8 +26,29 @@ import com.adc.da.base.web.BaseController;
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|OtSvpps|")
|
||||
@RequestMapping("/otSvpps/ot-svpps")
|
||||
@Api(tags = "福田标准法规--标准法规库--SVPPS结构数据")
|
||||
@RequestMapping("/${restPath}/lawss/otSvpps")
|
||||
public class OtSvppsController extends BaseController<OtSvpps> {
|
||||
|
||||
@Autowired
|
||||
private IOtSvppsService otSvppsEOService;
|
||||
|
||||
@ApiOperation(value = "|OtSvppsEO|查询下三级")
|
||||
@GetMapping("/selectThree")
|
||||
public ResponseMessage<List<OtSvpps>> selectThree() throws Exception {
|
||||
OtSvppsEOPage otSvppsEOPage = new OtSvppsEOPage();
|
||||
otSvppsEOPage.setSvppsCode("%.%");
|
||||
otSvppsEOPage.setSvppsCodeOperator("not like");
|
||||
otSvppsEOPage.setValidFlag("0");
|
||||
otSvppsEOPage.setOrderBy("OT_SVPPS.SVPPS_CODE ASC");
|
||||
List<OtSvpps> resultList = otSvppsEOService.queryByList(otSvppsEOPage);
|
||||
for(OtSvpps otSvppsEO : resultList){
|
||||
if(StringUtils.isBlank(otSvppsEO.getSvppsCnName()) || StringUtils.isEmpty(otSvppsEO.getSvppsCnName())){
|
||||
otSvppsEO.setSvppsCnName("");
|
||||
}
|
||||
}
|
||||
return Result.success(resultList);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.otSvpps.dao;
|
||||
|
||||
import com.adc.da.slrs.otSvpps.entity.OtSvpps;
|
||||
import com.adc.da.slrs.otSvpps.page.OtSvppsEOPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -16,6 +17,8 @@ import java.util.List;
|
||||
*/
|
||||
public interface OtSvppsDao extends BaseMapper<OtSvpps> {
|
||||
|
||||
List<OtSvpps> queryByList(OtSvppsEOPage otSvppsEOPage);
|
||||
|
||||
List<String> getNamesByIds(@Param("list") String[] list);
|
||||
|
||||
List<String> getNamesTipByIds(@Param("list") String[] list);
|
||||
|
||||
@@ -1,14 +1,23 @@
|
||||
package com.adc.da.slrs.otSvpps.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.adc.da.utils.treetool.annotation.TreeNodeId;
|
||||
import com.adc.da.utils.treetool.annotation.TreeNodeName;
|
||||
import com.adc.da.utils.treetool.annotation.TreeNodeOrder;
|
||||
import com.adc.da.utils.treetool.annotation.TreeNodeParentId;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
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.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -28,10 +37,12 @@ public class OtSvpps extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "主键 主键ID")
|
||||
@TableId("ID")
|
||||
@TreeNodeId
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "父级ID 父级ID引用本表的主键")
|
||||
@TableField("P_ID")
|
||||
@TreeNodeParentId
|
||||
private String pId;
|
||||
|
||||
@ApiModelProperty(value = "一级编码 对应excel中的B列")
|
||||
@@ -56,6 +67,7 @@ public class OtSvpps extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "SVPPS中文名称 对应excel中的I列")
|
||||
@TableField("SVPPS_CN_NAME")
|
||||
@TreeNodeName
|
||||
private String svppsCnName;
|
||||
|
||||
@ApiModelProperty(value = "同步数据ID 对应同步系统中的ID")
|
||||
@@ -68,15 +80,35 @@ public class OtSvpps extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "创建时间 数据入库时间")
|
||||
@TableField("CREATED_TIME")
|
||||
private LocalDateTime createdTime;
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createdTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间 数据更新时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private LocalDateTime modifyTime;
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "自定义数据标识")
|
||||
@TableField("SELF_FALG")
|
||||
private String selfFalg;
|
||||
|
||||
@TreeNodeOrder
|
||||
private Integer orderNum;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<OtSvpps> childrenList = new ArrayList<>();
|
||||
|
||||
//是否为自定义标识
|
||||
@TableField(exist = false)
|
||||
private String selfFlag;
|
||||
|
||||
//排序顺序2021-2-19
|
||||
@TableField(exist = false)
|
||||
private String selfSort;
|
||||
|
||||
//同步时用于记录上级编码
|
||||
@TableField(exist = false)
|
||||
private String parentCode;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.adc.da.slrs.otSvpps.page;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <b>功能:</b>OT_SVPPS OtSvppsEOPage<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2020-12-30 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
@Data
|
||||
public class OtSvppsEOPage extends BasePage {
|
||||
|
||||
private String id;
|
||||
private String idOperator = "=";
|
||||
private String pId;
|
||||
private String pIdOperator = "=";
|
||||
private String fNum;
|
||||
private String fNumOperator = "=";
|
||||
private String sNum;
|
||||
private String sNumOperator = "=";
|
||||
private String tNum;
|
||||
private String tNumOperator = "=";
|
||||
private String svppsCode;
|
||||
private String svppsCodeOperator = "=";
|
||||
private String svppsEnName;
|
||||
private String svppsEnNameOperator = "=";
|
||||
private String svppsCnName;
|
||||
private String svppsCnNameOperator = "=";
|
||||
private String syncId;
|
||||
private String syncIdOperator = "=";
|
||||
private String validFlag;
|
||||
private String validFlagOperator = "=";
|
||||
private String createdTime;
|
||||
private String createdTime1;
|
||||
private String createdTime2;
|
||||
private String createdTimeOperator = "=";
|
||||
private String modifyTime;
|
||||
private String modifyTime1;
|
||||
private String modifyTime2;
|
||||
private String modifyTimeOperator = "=";
|
||||
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.adc.da.slrs.otSvpps.service;
|
||||
|
||||
import com.adc.da.slrs.otSvpps.entity.OtSvpps;
|
||||
import com.adc.da.slrs.otSvpps.page.OtSvppsEOPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* SVPPS结构数据 SVPPS数据 服务类
|
||||
@@ -13,4 +16,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface IOtSvppsService extends IService<OtSvpps> {
|
||||
|
||||
List<OtSvpps> queryByList(OtSvppsEOPage otSvppsEOPage);
|
||||
|
||||
}
|
||||
|
||||
+11
@@ -2,10 +2,14 @@ package com.adc.da.slrs.otSvpps.service.impl;
|
||||
|
||||
import com.adc.da.slrs.otSvpps.entity.OtSvpps;
|
||||
import com.adc.da.slrs.otSvpps.dao.OtSvppsDao;
|
||||
import com.adc.da.slrs.otSvpps.page.OtSvppsEOPage;
|
||||
import com.adc.da.slrs.otSvpps.service.IOtSvppsService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* SVPPS结构数据 SVPPS数据 服务实现类
|
||||
@@ -17,4 +21,11 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class OtSvppsServiceImpl extends ServiceImpl<OtSvppsDao, OtSvpps> implements IOtSvppsService {
|
||||
|
||||
@Autowired
|
||||
private OtSvppsDao dao;
|
||||
|
||||
@Override
|
||||
public List<OtSvpps> queryByList(OtSvppsEOPage otSvppsEOPage){
|
||||
return dao.queryByList(otSvppsEOPage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "福田标准法规--标准法规库-菜单")
|
||||
@RequestMapping("/${restPath}/sarMenu/sar-menu")
|
||||
@RequestMapping("/${restPath}/lawss/sarMenu")
|
||||
public class SarMenuController extends BaseController<SarMenu> {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -78,6 +78,14 @@
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from OT_SVPPS
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getNamesByIds" resultType="java.lang.String" parameterType="java.util.List">
|
||||
select * from (
|
||||
select
|
||||
|
||||
Reference in New Issue
Block a user