Commit 698578dc authored by 廖旭伟's avatar 廖旭伟

事项材料增加模板文件名称,样表文件名称字段

parent e1522997
......@@ -1307,13 +1307,18 @@ data|object|数据对象
  sort|Integer|排序
  fileName|String|填单的附件名称
  fileUrl|String|填单的附件下载地址
  sampleName|String|样表名称
  samplePath|String|样表地址
  templateName|String|模板名称
  templatePath|String|模板地址
  preViewPath|String|样表预览地址
  formContent|String|表单内容
  createTime|Date|创建时间
  createUserId|Long|创建用户
  updateTime|Date|修改时间
  matterName|String|事项名称
  matterNo|String|事项编号
  deptName|String|部门名称
dict|object|字典对象
 source|object|字典属性对象,详见附录
 isRecommend|object|字典属性对象,详见附录
......@@ -1364,7 +1369,9 @@ data|object|数据对象
 sort|Integer|排序
 fileName|String|填单的附件名称
 fileUrl|String|填单的附件下载地址
 sampleName|String|样表名称
 samplePath|String|样表地址
 templateName|String|模板名称
 templatePath|String|模板地址
 preViewPath|String|样表预览地址
 formContent|String|表单内容
......@@ -1380,23 +1387,25 @@ dict|object|字典对象
{
"code": 1,
"data": {
"id":5324,
"matterId":8077,
"materialName":"zzw7ky",
"materiaFullName":"0b5weo",
"source":6745,
"isRecommend":7097,
"total":5647,
"sort":3856,
"fileName":"orzuwx",
"fileUrl":"93yfkm",
"samplePath":"usyl1g",
"templatePath":"uvxbw0",
"preViewPath":"dc33cb",
"formContent":"o5euug",
"createTime":"2022-09-27",
"createUserId":4953,
"updateTime":"2022-09-27"
"id":3941,
"matterId":8603,
"materialName":"mwwyan",
"materiaFullName":"g51dog",
"source":43,
"isRecommend":8311,
"total":6635,
"sort":8080,
"fileName":"rcdovy",
"fileUrl":"r6miw5",
"sampleName":"i9p5ee",
"samplePath":"9j0f51",
"templateName":"91wrpa",
"templatePath":"rigql8",
"preViewPath":"4tcavq",
"formContent":"xxfdms",
"createTime":"2022-10-12",
"createUserId":5259,
"updateTime":"2022-10-12"
}
}
```
......@@ -1425,19 +1434,21 @@ updateTime|Date|否|修改时间
**请求样例:**
```
{
"matterId":4528,
"materialName":"hyw9yz",
"materiaFullName":"kwcxpa",
"source":2399,
"isRecommend":447,
"total":1325,
"sort":8097,
"fileName":"xb03nt",
"fileUrl":"5moohr",
"samplePath":"sqgg1p",
"templatePath":"51n93a",
"preViewPath":"sdt0vn",
"formContent":"svanmy",
"matterId":8752,
"materialName":"b1nh2d",
"materiaFullName":"y633kd",
"source":4404,
"isRecommend":9558,
"total":2065,
"sort":3507,
"fileName":"aboi59",
"fileUrl":"c7rkqn",
"sampleName":"99l5iw",
"samplePath":"9shk8q",
"templateName":"tqp8df",
"templatePath":"4mon4q",
"preViewPath":"ctr8ww",
"formContent":"sqjssh",
}
```
......@@ -1460,7 +1471,9 @@ data|object|数据对象
  sort|Integer|排序
  fileName|String|填单的附件名称
  fileUrl|String|填单的附件下载地址
  sampleName|String|样表名称
  samplePath|String|样表地址
  templateName|String|模板名称
  templatePath|String|模板地址
  preViewPath|String|样表预览地址
  formContent|String|表单内容
......
......@@ -158,6 +158,8 @@ public class HomeController extends BaseJsonBodyController {
}
if(apiResp.getData().get("data")!=null) {
model.put("data", apiResp.getData().get("data"));
model.put("dict", apiResp.getData().get("dict"));
model.put("pageInfo",apiResp.getData().get("pageInfo"));
}else {
model.put("data", Collections.emptyList());
}
......
......@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterDatumVo;
* 事项申请材料实体对象
*
* @author zxfei
* @date 2022-09-27
* @date 2022-10-12
*/
public class MatterDatumEntity extends MatterDatumVo {
......@@ -53,10 +53,18 @@ public class MatterDatumEntity extends MatterDatumVo {
*/
private String fileUrl;
/**
* 样表名称
*/
private String sampleName;
/**
* 样表地址
*/
private String samplePath;
/**
* 模板名称
*/
private String templateName;
/**
* 模板地址
*/
private String templatePath;
......@@ -199,6 +207,20 @@ public class MatterDatumEntity extends MatterDatumVo {
this.fileUrl = fileUrl;
}
/**
* 获取 样表名称
* @return String
*/
public String getSampleName(){
return sampleName;
}
/**
* 设置 样表名称
* @param sampleName
*/
public void setSampleName(String sampleName){
this.sampleName = sampleName;
}
/**
* 获取 样表地址
* @return String
*/
......@@ -213,6 +235,20 @@ public class MatterDatumEntity extends MatterDatumVo {
this.samplePath = samplePath;
}
/**
* 获取 模板名称
* @return String
*/
public String getTemplateName(){
return templateName;
}
/**
* 设置 模板名称
* @param templateName
*/
public void setTemplateName(String templateName){
this.templateName = templateName;
}
/**
* 获取 模板地址
* @return String
*/
......@@ -285,7 +321,9 @@ public class MatterDatumEntity extends MatterDatumVo {
sb.append(",sort:").append(getSort());
sb.append(",fileName:").append(getFileName());
sb.append(",fileUrl:").append(getFileUrl());
sb.append(",sampleName:").append(getSampleName());
sb.append(",samplePath:").append(getSamplePath());
sb.append(",templateName:").append(getTemplateName());
sb.append(",templatePath:").append(getTemplatePath());
sb.append(",preViewPath:").append(getPreViewPath());
sb.append(",formContent:").append(getFormContent());
......@@ -312,8 +350,12 @@ public class MatterDatumEntity extends MatterDatumVo {
this.fileUrl = "";
this.sampleName = "";
this.samplePath = "";
this.templateName = "";
this.templatePath = "";
this.preViewPath = "";
......
......@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterDatumEntity;
* 事项申请材料查询对象
*
* @author zxfei
* @date 2022-09-27
* @date 2022-10-12
*/
public class MatterDatumQuery extends MatterDatumEntity {
/** 开始 主键,自增长 */
......@@ -93,9 +93,15 @@ public class MatterDatumQuery extends MatterDatumEntity {
/** 填单的附件下载地址 */
private List<String> fileUrlList;
/** 样表名称 */
private List<String> sampleNameList;
/** 样表地址 */
private List<String> samplePathList;
/** 模板名称 */
private List<String> templateNameList;
/** 模板地址 */
private List<String> templatePathList;
......@@ -582,6 +588,21 @@ public class MatterDatumQuery extends MatterDatumEntity {
this.fileUrlList = fileUrlList;
}
/**
* 获取 样表名称
* @return sampleNameList
*/
public List<String> getSampleNameList(){
return this.sampleNameList;
}
/**
* 设置 样表名称
* @param sampleNameList
*/
public void setSampleNameList(List<String> sampleNameList){
this.sampleNameList = sampleNameList;
}
/**
* 获取 样表地址
* @return samplePathList
*/
......@@ -597,6 +618,21 @@ public class MatterDatumQuery extends MatterDatumEntity {
this.samplePathList = samplePathList;
}
/**
* 获取 模板名称
* @return templateNameList
*/
public List<String> getTemplateNameList(){
return this.templateNameList;
}
/**
* 设置 模板名称
* @param templateNameList
*/
public void setTemplateNameList(List<String> templateNameList){
this.templateNameList = templateNameList;
}
/**
* 获取 模板地址
* @return templatePathList
*/
......@@ -1116,6 +1152,25 @@ public class MatterDatumQuery extends MatterDatumEntity {
}
/**
* 设置 样表名称
* @param sampleName
*/
public MatterDatumQuery sampleName(String sampleName){
setSampleName(sampleName);
return this;
}
/**
* 设置 样表名称
* @param sampleNameList
*/
public MatterDatumQuery sampleNameList(List<String> sampleNameList){
this.sampleNameList = sampleNameList;
return this;
}
/**
* 设置 样表地址
* @param samplePath
......@@ -1135,6 +1190,25 @@ public class MatterDatumQuery extends MatterDatumEntity {
}
/**
* 设置 模板名称
* @param templateName
*/
public MatterDatumQuery templateName(String templateName){
setTemplateName(templateName);
return this;
}
/**
* 设置 模板名称
* @param templateNameList
*/
public MatterDatumQuery templateNameList(List<String> templateNameList){
this.templateNameList = templateNameList;
return this;
}
/**
* 设置 模板地址
* @param templatePath
......
......@@ -10,5 +10,40 @@ import java.util.List;
* @date 2022-09-27
*/
public class MatterDatumVo extends BaseEntityLong {
/**
* 事项名称
*/
private String matterName;
/**
* 事项编号
*/
private String matterNo;
/**
* 部门名称
*/
private String deptName;
public String getMatterName() {
return matterName;
}
public void setMatterName(String matterName) {
this.matterName = matterName;
}
public String getMatterNo() {
return matterNo;
}
public void setMatterNo(String matterNo) {
this.matterNo = matterNo;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
}
\ No newline at end of file
......@@ -28,7 +28,9 @@ import com.mortals.xhx.common.key.ParamKey;
import com.mortals.xhx.common.pdu.gen.component.ComponentCons;
import com.mortals.xhx.common.utils.ExportDocUtil;
import com.mortals.xhx.common.utils.WordUtil;
import com.mortals.xhx.module.matter.dao.MatterDao;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.service.MatterService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.http.entity.ContentType;
......@@ -69,6 +71,8 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
private UploadService uploadService;
@Autowired
private ParamService paramService;
@Autowired
private MatterService matterService;
@Override
protected MatterDatumEntity findBefore(MatterDatumEntity params, PageInfo pageInfo, Context context) throws AppException {
......@@ -78,6 +82,21 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
return params;
}
@Override
protected void findAfter(MatterDatumEntity params, PageInfo pageInfo, Context context, List<MatterDatumEntity> list) throws AppException {
if(CollectionUtils.isNotEmpty(list)){
for (MatterDatumEntity entity:list){
MatterEntity matter = matterService.get(entity.getMatterId());
if(matter!=null){
entity.setMatterName(matter.getMatterName());
entity.setMatterNo(matter.getMatterNo());
entity.setDeptName(matter.getDeptName());
}
}
}
}
@Override
protected void saveBefore(MatterDatumEntity entity, Context context) throws AppException {
if(StringUtils.isEmpty(entity.getFileUrl())){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment