机构管理 bug + 上传文件改名接口
This commit is contained in:
+4
@@ -15,8 +15,11 @@ import com.adc.da.slrs.wgCommittee.entity.WgCommittee;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import com.adc.da.base.web.BaseController;
|
import com.adc.da.base.web.BaseController;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -43,6 +46,7 @@ public class WgCommitteeController extends BaseController<WgCommittee> {
|
|||||||
@PostMapping("/insert")
|
@PostMapping("/insert")
|
||||||
public ResponseMessage addWorkCommitter(WgCommittee wgCommittee) {
|
public ResponseMessage addWorkCommitter(WgCommittee wgCommittee) {
|
||||||
|
|
||||||
|
wgCommittee.setCreateTime(new Date());
|
||||||
if (isDistinct(wgCommittee.getCommitteeName(),null)){
|
if (isDistinct(wgCommittee.getCommitteeName(),null)){
|
||||||
if (iWgCommitteeService.add(wgCommittee)){
|
if (iWgCommitteeService.add(wgCommittee)){
|
||||||
return Result.success("200","新增成功");
|
return Result.success("200","新增成功");
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,6 +46,9 @@ public class WgCommittee extends BasePage {
|
|||||||
@ApiModelProperty(value = "委员关联表")
|
@ApiModelProperty(value = "委员关联表")
|
||||||
private String committeer;
|
private String committeer;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "委员")
|
@ApiModelProperty(value = "委员")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String committeeIds;
|
private String committeeIds;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<if test="committeeName != null and ''!=committeeName">
|
<if test="committeeName != null and ''!=committeeName">
|
||||||
and wg_committee.committee_name like concat(concat('%',#{committeeName}),'%')
|
and wg_committee.committee_name like concat(concat('%',#{committeeName}),'%')
|
||||||
</if>
|
</if>
|
||||||
|
order by create_time desc
|
||||||
limit ${(page-1)*pageSize},${pageSize}
|
limit ${(page-1)*pageSize},${pageSize}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -45,6 +46,7 @@
|
|||||||
<if test="committeeName != null and ''!=committeeName">
|
<if test="committeeName != null and ''!=committeeName">
|
||||||
and wg_committee.committee_name like concat(concat('%',#{committeeName}),'%')
|
and wg_committee.committee_name like concat(concat('%',#{committeeName}),'%')
|
||||||
</if>
|
</if>
|
||||||
|
order by create_time desc
|
||||||
limit ${(page-1)*pageSize},${pageSize}
|
limit ${(page-1)*pageSize},${pageSize}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -752,4 +753,12 @@ public class AttFileEOController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改文件名称")
|
||||||
|
@GetMapping("/updateFileName")
|
||||||
|
public ResponseMessage<AttFileEO> updateFileName(@Param("fileId") String fileId,@Param("fileName") String fileName) {
|
||||||
|
AttFileEO attFileEO = attFileEOService.updateFileInfo(fileId,fileName);
|
||||||
|
return Result.success(attFileEO);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ public interface AttFileEODao extends BaseMapper<AttFileEO> {
|
|||||||
|
|
||||||
public AttFileEO selectFileInfoById(AttFileEO attFileEO);
|
public AttFileEO selectFileInfoById(AttFileEO attFileEO);
|
||||||
|
|
||||||
|
public int updateFileInfoById(AttFileEO attFileEO);
|
||||||
|
|
||||||
public int insertData(AttFileEO attFileEO);
|
public int insertData(AttFileEO attFileEO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ public interface IAttFileEOService extends IService<AttFileEO> {
|
|||||||
|
|
||||||
public AttFileEO getFileInfo(String attId);
|
public AttFileEO getFileInfo(String attId);
|
||||||
|
|
||||||
|
public AttFileEO updateFileInfo(String attId,String name);
|
||||||
|
|
||||||
public List<AttFileEO> getMultiFileInfos(String fileIds);
|
public List<AttFileEO> getMultiFileInfos(String fileIds);
|
||||||
|
|
||||||
public List<AttFileEO> getMultiFileInfosOrderByDateDesc(String fileIds);
|
public List<AttFileEO> getMultiFileInfosOrderByDateDesc(String fileIds);
|
||||||
|
|||||||
@@ -333,6 +333,26 @@ public class AttFileEOServiceImpl extends ServiceImpl<AttFileEODao, AttFileEO> i
|
|||||||
return attFileEO;
|
return attFileEO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AttFileEO updateFileInfo(String attId,String name) {
|
||||||
|
/**
|
||||||
|
* 根据ID获取文件信息
|
||||||
|
*/
|
||||||
|
AttFileEO attFileEO = new AttFileEO();
|
||||||
|
AttFileEO attFileInfo=null;
|
||||||
|
Integer flag=0;
|
||||||
|
try {
|
||||||
|
attFileEO.setId(attId);
|
||||||
|
attFileInfo = this.baseMapper.selectFileInfoById(attFileEO);
|
||||||
|
attFileInfo.setOldFileName(name);
|
||||||
|
this.baseMapper.updateFileInfoById(attFileEO);
|
||||||
|
return attFileInfo;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(),e);
|
||||||
|
}
|
||||||
|
return attFileInfo;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author super_liu
|
* @Author super_liu
|
||||||
* @Description 多文件查询
|
* @Description 多文件查询
|
||||||
|
|||||||
@@ -96,5 +96,8 @@
|
|||||||
where id = #{id}
|
where id = #{id}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<update id="updateFileInfoById">
|
||||||
|
update ${tableName} set OLD_FILE_NAME = #{oldFileName} where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user