修改#40376
This commit is contained in:
+2
@@ -45,6 +45,7 @@ import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
@@ -277,6 +278,7 @@ public class PayCompanyManagementController extends JeroController<PayCompanyMan
|
||||
@RequiresPermissions("company:add")
|
||||
@ApiOperation(value="企业管理-添加", notes="企业管理-添加")
|
||||
@PostMapping(value = "/add")
|
||||
@Transactional
|
||||
public Result<?> add(@RequestBody PayCompanyManagement payCompanyManagement) {
|
||||
if(StringUtils.isEmpty(payCompanyManagement.getCompanyPhone())){
|
||||
payCompanyManagement.setCompanyPhone(null);
|
||||
|
||||
+6
@@ -122,6 +122,9 @@ public class PayCompanyManagementServiceImpl extends ServiceImpl<PayCompanyManag
|
||||
@Override
|
||||
@Transactional
|
||||
public void companyEdit(PayCompanyManagement payCompanyManagement) {
|
||||
if(StringUtils.isEmpty(payCompanyManagement.getCompanyPhone())){
|
||||
payCompanyManagement.setCompanyPhone(null);
|
||||
}
|
||||
StringBuilder msg = ValidUtil.validateAll(payCompanyManagement);
|
||||
if(!StringUtils.isBlank(msg)){
|
||||
throw new JeroBootException(msg.toString());
|
||||
@@ -173,6 +176,9 @@ public class PayCompanyManagementServiceImpl extends ServiceImpl<PayCompanyManag
|
||||
@Override
|
||||
@Transactional
|
||||
public void edit(PayCompanyManagement payCompanyManagement) {
|
||||
if(StringUtils.isEmpty(payCompanyManagement.getCompanyPhone())){
|
||||
payCompanyManagement.setCompanyPhone(null);
|
||||
}
|
||||
StringBuilder msg = ValidUtil.validateAll(payCompanyManagement);
|
||||
if(!StringUtils.isBlank(msg)){
|
||||
throw new JeroBootException(msg.toString());
|
||||
|
||||
+2
-2
@@ -51,9 +51,9 @@
|
||||
</select>
|
||||
<select id="getMonthMailCount" resultType="java.lang.Integer">
|
||||
select count(*) from (
|
||||
select id from pay_mail_bill WHERE DATE_FORMAT(create_time,'%Y-%m') = #{time} AND post_status = '1'
|
||||
select id from pay_mail_bill WHERE DATE_FORMAT(send_date,'%Y-%m') = #{time} AND post_status = '1'
|
||||
UNION ALL
|
||||
select id from pay_mail_contract WHERE DATE_FORMAT(create_time,'%Y-%m') = #{time} AND post_status = '1'
|
||||
select id from pay_mail_contract WHERE DATE_FORMAT(send_date,'%Y-%m') = #{time} AND post_status = '1'
|
||||
) A
|
||||
</select>
|
||||
|
||||
|
||||
+3
-3
@@ -300,7 +300,7 @@ public class PayWorkingGroupDataFileController extends JeroController<PayWorking
|
||||
zipos = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
|
||||
zipos.setMethod(ZipOutputStream.DEFLATED); //设置压缩方法
|
||||
for (OSSFile ossFile : listOSSFile) {
|
||||
File file = new File(upLoadPath + "\\" + ossFile.getUrl());
|
||||
File file = new File(upLoadPath + File.separator + ossFile.getUrl());
|
||||
if(file.exists()){
|
||||
try {
|
||||
//添加ZipEntry,并ZipEntry中写入文件流w
|
||||
@@ -386,12 +386,12 @@ public class PayWorkingGroupDataFileController extends JeroController<PayWorking
|
||||
zipos = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
|
||||
zipos.setMethod(ZipOutputStream.DEFLATED); //设置压缩方法
|
||||
for (String path : paths){
|
||||
File file = new File(upLoadPath + "\\" + path);
|
||||
File file = new File(upLoadPath + File.separator + path);
|
||||
if(file.exists()){
|
||||
try {
|
||||
//添加ZipEntry,并ZipEntry中写入文件流w
|
||||
//这里,防止要下载的文件有重名的导致下载失败
|
||||
zipos.putNextEntry(new ZipEntry("folder/"+ file.getName()));
|
||||
zipos.putNextEntry(new ZipEntry("folder" + File.separator + file.getName()));
|
||||
os = new DataOutputStream(zipos);
|
||||
InputStream is = new FileInputStream(file);
|
||||
byte[] b = new byte[100];
|
||||
|
||||
Reference in New Issue
Block a user