Merge branch 'origin/Three' into 'develop_master'
Origin/three See merge request LiuChao/foton-slrs-system-rest!265
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package com.adc.da.slrs.sarUrl.controller;
|
package com.adc.da.slrs.sarUrl.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.adc.da.att.entity.AttFileEO;
|
||||||
|
import com.adc.da.att.service.IAttFileEOService;
|
||||||
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.sarUrl.entity.OrderUrlVO;
|
import com.adc.da.slrs.sarUrl.entity.OrderUrlVO;
|
||||||
@@ -12,12 +14,21 @@ import io.swagger.annotations.Api;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
|
import javax.servlet.ServletOutputStream;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.servlet.http.HttpSession;
|
||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.*;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.*;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Base64;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -34,6 +45,52 @@ public class TsUrlController{
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ITsUrlService tsUrlService;
|
private ITsUrlService tsUrlService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IAttFileEOService iAttFileEOService;
|
||||||
|
|
||||||
|
@Value("${file.path}")
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
@GetMapping("getIconImg")
|
||||||
|
public String getIconImg(HttpServletRequest request, HttpServletResponse response){
|
||||||
|
String url = "";
|
||||||
|
String path = "api/att/attFile/upload";
|
||||||
|
ServletOutputStream outputStream = null;
|
||||||
|
FileInputStream inputStream = null;
|
||||||
|
//通过id获取路径
|
||||||
|
String id = request.getParameter("id");
|
||||||
|
String fid = tsUrlService.getById(id).getIcon();
|
||||||
|
List<AttFileEO> attFileEOS = iAttFileEOService.getMultiFileInfos(fid);
|
||||||
|
if(attFileEOS.isEmpty()){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
AttFileEO attFileEO = attFileEOS.get(0);
|
||||||
|
url = filePath + attFileEO.getFilePath() + attFileEO.getFileName();
|
||||||
|
|
||||||
|
try {
|
||||||
|
System.out.println(id);
|
||||||
|
TsUrl tsUrl = tsUrlService.getById(id);
|
||||||
|
System.out.println(tsUrl);
|
||||||
|
|
||||||
|
File file = new File(url);
|
||||||
|
if(!file.exists()) return null;
|
||||||
|
inputStream = new FileInputStream(file);
|
||||||
|
response.setContentType("image/jpeg");
|
||||||
|
outputStream = response.getOutputStream();
|
||||||
|
int len = 0;
|
||||||
|
byte[] buffer = new byte[1024 * 10];
|
||||||
|
while ((len = inputStream.read(buffer)) != -1){
|
||||||
|
outputStream.write(buffer,0,len);
|
||||||
|
}
|
||||||
|
outputStream.flush();
|
||||||
|
outputStream.close();
|
||||||
|
inputStream.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
System.out.println("---------图标获取异常--------------");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("查询")
|
@ApiOperation("查询")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public ResponseMessage<List<TsUrl>> getUrls(){
|
public ResponseMessage<List<TsUrl>> getUrls(){
|
||||||
|
|||||||
@@ -61,4 +61,10 @@ public class TsUrl implements Serializable {
|
|||||||
/**排序*/
|
/**排序*/
|
||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
private Integer orderBy;
|
private Integer orderBy;
|
||||||
|
|
||||||
|
/**新增*/
|
||||||
|
@ApiModelProperty(value = "图标信息")
|
||||||
|
private String icon;
|
||||||
|
@ApiModelProperty(value = "位置")
|
||||||
|
private Integer type;
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-11
@@ -15,13 +15,13 @@ import com.adc.da.base.web.BaseController;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 标准制修订补助资金收支统计支出表 前端控制器
|
* 标准制修订补助资金收支统计支出表 前端控制器
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author super_liu
|
* @author super_liu
|
||||||
* @since 2021-11-12
|
* @since 2021-11-12
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@Api(description = "|WgdZcb|")
|
@Api(description = "|WgdZcb|")
|
||||||
@RequestMapping("api/wgdCensusLeo/wgd-zcb")
|
@RequestMapping("api/wgdCensusLeo/wgd-zcb")
|
||||||
@@ -30,13 +30,14 @@ public class WgdZcbController extends BaseController<WgdZcb> {
|
|||||||
IWgdZcbService iWgdZcbService;
|
IWgdZcbService iWgdZcbService;
|
||||||
|
|
||||||
@GetMapping("/getAllZcbs")
|
@GetMapping("/getAllZcbs")
|
||||||
public ResponseMessage<Object> getAllWgdZcbs(){//查询所有
|
public ResponseMessage<Object> getAllWgdZcbs() {//查询所有
|
||||||
return Result.success(iWgdZcbService.getAllWgdZcbs());
|
return Result.success(iWgdZcbService.getAllWgdZcbs());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("查询")
|
@ApiOperation("查询")
|
||||||
@GetMapping("/queryAllZcbs")
|
@GetMapping("/queryAllZcbs")
|
||||||
public ResponseMessage<Object> queryAllWgdZcbs(WgdZcb wgdZcb){//多条件查询
|
public ResponseMessage<Object> queryAllWgdZcbs(WgdZcb wgdZcb) {//多条件查询
|
||||||
List<WgdZcb> wgdZcbs = iWgdZcbService.queryAllWgdZcbs(wgdZcb);
|
List<WgdZcb> wgdZcbs = iWgdZcbService.queryAllWgdZcbs(wgdZcb);
|
||||||
PageInfo pageInfo = getPageInfo(wgdZcb.getPager(),wgdZcbs);
|
PageInfo pageInfo = getPageInfo(wgdZcb.getPager(),wgdZcbs);
|
||||||
return Result.success(pageInfo);
|
return Result.success(pageInfo);
|
||||||
@@ -60,13 +61,13 @@ public class WgdZcbController extends BaseController<WgdZcb> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/delZcb")
|
@PostMapping("/delZcb")
|
||||||
ResponseMessage<Object> deleteWgdZcb(String id){//删除
|
ResponseMessage<Object> deleteWgdZcb(String id) {//删除
|
||||||
return Result.success(iWgdZcbService.deleteWgdZcb(id));
|
return Result.success(iWgdZcbService.deleteWgdZcb(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("删除")
|
@ApiOperation("删除")
|
||||||
@PostMapping("/delZcbs")
|
@PostMapping("/delZcbs")
|
||||||
ResponseMessage<Object> deleteWgdZcbs(String ids){//批量删除
|
ResponseMessage<Object> deleteWgdZcbs(String ids) {//批量删除
|
||||||
return Result.success(iWgdZcbService.deleteWgdZcbs(ids));
|
return Result.success(iWgdZcbService.deleteWgdZcbs(ids));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,10 +35,9 @@ public class WgdZcb extends BasePage {
|
|||||||
private String cost;
|
private String cost;
|
||||||
|
|
||||||
@ApiModelProperty(value = "用途")
|
@ApiModelProperty(value = "用途")
|
||||||
private String use;
|
private String purposes;
|
||||||
|
|
||||||
@ApiModelProperty(value = "详细附件")
|
@ApiModelProperty(value = "详细附件")
|
||||||
private String annex;
|
private String annexs;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<mapper namespace="com.adc.da.slrs.wgdCensusLeo.dao.WgdZcbDao">
|
<mapper namespace="com.adc.da.slrs.wgdCensusLeo.dao.WgdZcbDao">
|
||||||
<!-- 基础信息-->
|
<!-- 基础信息-->
|
||||||
<sql id="BaseInfo">
|
<sql id="BaseInfo">
|
||||||
id,name,cost,use,annex
|
id,name,cost,purposes,annexs
|
||||||
</sql>
|
</sql>
|
||||||
<!-- 查询条件-->
|
<!-- 查询条件-->
|
||||||
<sql id="Conditions">
|
<sql id="Conditions">
|
||||||
@@ -12,18 +12,17 @@
|
|||||||
and id = #{id}
|
and id = #{id}
|
||||||
</if>
|
</if>
|
||||||
<if test="name != null and name != ''">
|
<if test="name != null and name != ''">
|
||||||
and name like concat('%',#{name},'%')
|
and name = #{name}
|
||||||
</if>
|
</if>
|
||||||
<if test="cost != null and cost != ''">
|
<if test="cost != null and cost != ''">
|
||||||
and cost like concat('%',#{cost},'%')
|
and cost = #{cost}
|
||||||
</if>
|
</if>
|
||||||
<if test="use != null and use != ''">
|
<if test="purposes != null and purposes != ''">
|
||||||
and use like concat('%',#{use},'%')
|
and purposes = #{purposes}
|
||||||
</if>
|
</if>
|
||||||
<if test="annex != null and annex != ''">
|
<if test="annexs != null and annexs != ''">
|
||||||
and annex = #{annex}
|
and annexs = #{annexs}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<select id="getTotal" resultType="java.lang.Integer">
|
<select id="getTotal" resultType="java.lang.Integer">
|
||||||
@@ -57,13 +56,13 @@
|
|||||||
<if test="cost != null and cost != ''">
|
<if test="cost != null and cost != ''">
|
||||||
cost = #{cost},
|
cost = #{cost},
|
||||||
</if>
|
</if>
|
||||||
<if test="use != null and use != ''">
|
<if test="purposes != null and purposes != ''">
|
||||||
use = #{use},
|
purposes = #{purposes},
|
||||||
</if>
|
</if>
|
||||||
<if test="annex != null and annex != ''">
|
<if test="annexs != null and annexs != ''">
|
||||||
annex = #{annex},
|
annexs = #{annexs},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</set>
|
</set>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
@@ -80,13 +79,13 @@
|
|||||||
<if test="cost != null and cost != ''">
|
<if test="cost != null and cost != ''">
|
||||||
cost,
|
cost,
|
||||||
</if>
|
</if>
|
||||||
<if test="use != null and use != ''">
|
<if test="purposes != null and purposes != ''">
|
||||||
use,
|
purposes,
|
||||||
</if>
|
</if>
|
||||||
<if test="annex != null and annex != ''">
|
<if test="annexs != null and annexs != ''">
|
||||||
annex,
|
annexs,
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</trim>
|
</trim>
|
||||||
values
|
values
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
@@ -99,11 +98,11 @@
|
|||||||
<if test="cost != null and cost != ''">
|
<if test="cost != null and cost != ''">
|
||||||
#{cost},
|
#{cost},
|
||||||
</if>
|
</if>
|
||||||
<if test="use != null and use != ''">
|
<if test="purposes != null and purposes != ''">
|
||||||
#{use},
|
#{purposes},
|
||||||
</if>
|
</if>
|
||||||
<if test="annex != null and annex != ''">
|
<if test="annexs != null and annexs != ''">
|
||||||
#{annex},
|
#{annexs},
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</trim>
|
</trim>
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="scName != null and scName != ''">
|
<if test="scName != null and scName != ''">
|
||||||
and (
|
and (
|
||||||
sc_name like concat('%',#{scName} ,'%')
|
sc_name like concat('%',#{scName} ,'%') or
|
||||||
ssc_name like concat('%',#{scName} ,'%')
|
ssc_name like concat('%',#{scName} ,'%') or
|
||||||
wg_name like concat('%',#{scName} ,'%')
|
wg_name like concat('%',#{scName} ,'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="scName != null and scName != ''">
|
<if test="scName != null and scName != ''">
|
||||||
and (
|
and (
|
||||||
sc_name like concat('%',#{scName} ,'%')
|
sc_name like concat('%',#{scName} ,'%') or
|
||||||
ssc_name like concat('%',#{scName} ,'%')
|
ssc_name like concat('%',#{scName} ,'%') or
|
||||||
wg_name like concat('%',#{scName} ,'%')
|
wg_name like concat('%',#{scName} ,'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -20,10 +20,10 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="scName != null and scName != ''">
|
<if test="scName != null and scName != ''">
|
||||||
and (
|
and (
|
||||||
sc_name like concat('%',#{scName} ,'%')
|
sc_name like concat('%',#{scName} ,'%') or
|
||||||
ssc_name like concat('%',#{scName} ,'%')
|
ssc_name like concat('%',#{scName} ,'%') or
|
||||||
wg_name like concat('%',#{scName} ,'%')
|
wg_name like concat('%',#{scName} ,'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="role != null and role != ''">
|
<if test="role != null and role != ''">
|
||||||
and role = #{role}
|
and role = #{role}
|
||||||
|
|||||||
Reference in New Issue
Block a user