修改#40990

This commit is contained in:
梁琦涛
2021-10-21 16:18:51 +08:00
parent 83766f29ec
commit 2e01926480
5 changed files with 32 additions and 12 deletions
@@ -180,6 +180,7 @@ public class PayIncomeContract implements Serializable {
/**打包年份*/
@Excel(name = "打包年份", width = 15)
@ApiModelProperty(value = "打包年份")
@Pattern(regexp = "^\\d{4}$",message = "打包年份式错误")
private java.lang.String packYear;
/**合同状态(1:草稿,2:已通过,3:未通过,4:已归档)*/
@Excel(name = "合同状态(1:草稿,2:已通过,3:未通过,4:已存档)", width = 15)
@@ -172,6 +172,7 @@ public class PaySpendingContract implements Serializable {
/**打包年份*/
@Excel(name = "打包年份", width = 15)
@ApiModelProperty(value = "打包年份")
@Pattern(regexp = "^\\d{4}$",message = "打包年份式错误")
private String packYear;
/**创建人*/
@ApiModelProperty(value = "创建人")
@@ -541,14 +541,13 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
}
if(!Objects.isNull(map.get(4))){
if(!Objects.equals(map.get(4),"") && !Objects.equals(map.get(4),"")){
mapOpening.forEach((k,v)->{
if(Objects.equals(map.get(4),k)){
paySpendingContract.setOpening(Integer.parseInt(v));
}
});
if(Objects.isNull(paySpendingContract.getOpening())){
sb.append("").append(n).append("行:是否开口格式错误,请修改!<br/>");
}else{
mapOpening.forEach((k,v)->{
if(Objects.equals(map.get(4),k)){
paySpendingContract.setOpening(Integer.parseInt(v));
}
});
}
}
@@ -613,12 +612,27 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
}
paySpendingContract.setContractPaymentTimes(map.get(17));
mapPack.forEach((k,v)->{
if(Objects.equals(map.get(18),k)){
paySpendingContract.setPack(Integer.parseInt(v));
if(StringUtils.isEmpty(map.get(18))){
sb.append("").append(n).append("行:是否打包不能为空,请修改!<br/>");
}else{
mapPack.forEach((k,v)->{
if(Objects.equals(map.get(18),k)){
paySpendingContract.setPack(Integer.parseInt(v));
}
});
if(Objects.isNull(paySpendingContract.getPack())){
sb.append("").append(n).append("行:是否打包格式错误,请修改!<br/>");
paySpendingContract.setPack(2);
}
});
paySpendingContract.setPackYear(map.get(19));
// 打包获取打包年份
if(Objects.equals(paySpendingContract.getPack(),PayIncomeContractCommon.PACK1)){
if(StringUtils.isEmpty(map.get(19))){
sb.append("").append(n).append("行:打包年份不能为空,请修改!<br/>");
}else{
paySpendingContract.setPackYear(map.get(19));
}
}
}
return paySpendingContract;
}
@@ -37,6 +37,7 @@ import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.*;
@@ -305,6 +306,7 @@ public class PayPackCompanyController extends JeroController<PayPackCompany, IPa
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
ExportParams exportParams=new ExportParams("打包企业管理", "打包企业管理");
exportParams.setImageBasePath(env.getProperty("jero.path.upload"));
exportParams.setType(ExcelType.XSSF);
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
@@ -42,6 +42,7 @@ import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
@@ -322,6 +323,7 @@ public class PayPackCompanyProjectController extends JeroController<PayPackCompa
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
ExportParams exportParams=new ExportParams("打包成员信息", "打包成员信息");
exportParams.setImageBasePath(env.getProperty("jero.path.upload"));
exportParams.setType(ExcelType.XSSF);
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
mv.addObject(NormalExcelConstants.DATA_LIST, list);