文档url中文编码
This commit is contained in:
parent
b403c43c8b
commit
7a27de3e84
|
|
@ -3,6 +3,7 @@ package com.bonus.material.contract.service;
|
|||
import com.bonus.material.contract.domain.BmContract;
|
||||
import com.bonus.material.device.domain.vo.DevInfoVo;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -13,9 +14,9 @@ public interface BmContractService {
|
|||
|
||||
List<BmContract> list(BmContract bmContract);
|
||||
|
||||
Integer add(BmContract bmContract);
|
||||
Integer add(BmContract bmContract) throws UnsupportedEncodingException;
|
||||
|
||||
Integer edit(BmContract bmContract);
|
||||
Integer edit(BmContract bmContract) throws UnsupportedEncodingException;
|
||||
|
||||
Integer del(BmContract bmContract);
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ import com.bonus.material.device.mapper.BmFileInfoMapper;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
@ -42,7 +45,7 @@ public class BmContractServiceImpl implements BmContractService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer add(BmContract bmContract) {
|
||||
public Integer add(BmContract bmContract) throws UnsupportedEncodingException {
|
||||
bmContract.setContractCode(getString());
|
||||
bmContract.setOwnerId(SecurityUtils.getLoginUser().getUserid());
|
||||
bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||
|
|
@ -55,6 +58,7 @@ public class BmContractServiceImpl implements BmContractService {
|
|||
bmFileInfo.setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT);
|
||||
// 合同照片附件
|
||||
bmFileInfo.setFileType(0L);
|
||||
bmFileInfo.setFileName(URLEncoder.encode(bmFileInfo.getFileName(), StandardCharsets.UTF_8.toString()));
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
||||
}
|
||||
|
|
@ -64,7 +68,7 @@ public class BmContractServiceImpl implements BmContractService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer edit(BmContract bmContract) {
|
||||
public Integer edit(BmContract bmContract) throws UnsupportedEncodingException {
|
||||
bmContract.setOwnerId(SecurityUtils.getLoginUser().getUserid());
|
||||
bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||
Integer edit = bmContractMapper.edit(bmContract);
|
||||
|
|
@ -78,6 +82,7 @@ public class BmContractServiceImpl implements BmContractService {
|
|||
bmFileInfo.setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT);
|
||||
// 合同照片附件
|
||||
bmFileInfo.setFileType(0L);
|
||||
bmFileInfo.setFileName(URLEncoder.encode(bmFileInfo.getFileName(), StandardCharsets.UTF_8.toString()));
|
||||
bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||
bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -849,7 +849,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="typeId != null">
|
||||
AND d.type_id = #{typeId}
|
||||
</if>
|
||||
<if test="startTime != null and endTime != null">
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND d.update_time between #{startTime} and #{endTime}
|
||||
</if>
|
||||
ORDER BY
|
||||
|
|
|
|||
Loading…
Reference in New Issue