|
|
@@ -221,7 +221,7 @@ public class CostProjectDocumentManagerImpl extends BaseManagerImpl<CostProjectD
|
|
|
costProjectDocument.setDocumentType(costDocumentTemplate.getType());
|
|
|
costProjectDocument.setProjectId(costProjectApproval.getProjectId());
|
|
|
super.create(costProjectDocument);
|
|
|
- if (costProjectDocument.getDocumentAlias().equals("cbjstzs")) {
|
|
|
+ /*if (costProjectDocument.getDocumentAlias().equals("cbjstzs")) {
|
|
|
|
|
|
CostDocumentTemplate templateManagerById = costDocumentTemplateManager.getByAlias("sdhz");
|
|
|
if (templateManagerById==null) {
|
|
|
@@ -285,34 +285,30 @@ public class CostProjectDocumentManagerImpl extends BaseManagerImpl<CostProjectD
|
|
|
arrayList.add(costProjectDocumentFile);
|
|
|
});
|
|
|
costProjectDocumentFileManager.saveBatch(arrayList);
|
|
|
- }
|
|
|
+ }*/
|
|
|
//文件关联信息赋值
|
|
|
- /*req.getCostProjectDocumentFiles().forEach(costProjectDocumentFile -> {
|
|
|
+ req.getCostProjectDocumentFiles().forEach(costProjectDocumentFile -> {
|
|
|
costProjectDocumentFile.setDocumentId(costProjectDocument.getDocumentId());
|
|
|
costProjectDocumentFile.setProjectId(costProjectDocument.getProjectId());
|
|
|
- //送达回证特殊处理字段 后期在说
|
|
|
- if ("送达回证".equals(costProjectDocument.getDocumentName())) {
|
|
|
- if (costProjectDocumentFile.getPinyin().equals("SongDaWenShuMingCheng")){
|
|
|
- costProjectDocumentFile.setDataValue(costDocumentTemplate.getDocumentName());
|
|
|
- }
|
|
|
- if (costProjectDocumentFile.getPinyin().equals("SongDaWenShuWenHao")){
|
|
|
+ switch (costProjectDocumentFile.getPinyin()) {
|
|
|
+ case "SongDaWenShuWenHao":
|
|
|
costProjectDocumentFile.setDataValue(whNo);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(costProjectDocumentFile.getTableName())){
|
|
|
+ if(StringUtil.isEmpty(costProjectDocumentFile.getWhereValue())){
|
|
|
+ costProjectDocumentFile.setWhereValue(costProjectApproval.getProjectId());
|
|
|
+ }else {
|
|
|
+ String whereValue1 = costProjectDocumentFile.getWhereValue();
|
|
|
+ String replace = whereValue1.replace("?", "'" + costProjectApproval.getProjectId() + "'");
|
|
|
+ costProjectDocumentFile.setWhereValue(replace);
|
|
|
}
|
|
|
- if (costProjectDocumentFile.getPinyin().equals("SongDaWenShuMingCheng")){
|
|
|
- costProjectDocumentFile.setDataValue(costDocumentTemplate.getDocumentName());
|
|
|
- }
|
|
|
- if (costProjectDocumentFile.getPinyin().equals("TongZhiSongDaShiJian")){
|
|
|
- costProjectDocumentFile.setDataValue(DateUtils.format(new Date(),"yyyy-MM-dd"));
|
|
|
- }
|
|
|
- if (costProjectDocumentFile.getPinyin().equals("BeiJianShenDanWeiBanGongDiDian")){
|
|
|
- costProjectDocumentFile.setDataValue(auditedUnit.getAddress());
|
|
|
- }
|
|
|
- if (costProjectDocumentFile.getPinyin().equals("ShouSongDaRen")){
|
|
|
- costProjectDocumentFile.setDataValue(auditedUnit.getContactName());
|
|
|
- }
|
|
|
+ String colValue = costTemplateFileManager.getColValue(costProjectDocumentFile.getTableName(), costProjectDocumentFile.getColName(), costProjectDocumentFile.getWhereName(), costProjectDocumentFile.getWhereValue());
|
|
|
+ //获取whereValue字段值
|
|
|
+ costProjectDocumentFile.setDataValue(colValue);
|
|
|
}
|
|
|
|
|
|
- });*/
|
|
|
+ });
|
|
|
//保存解析出的文件内容
|
|
|
costProjectDocumentFileManager.saveBatch(req.getCostProjectDocumentFiles());
|
|
|
|