Merge remote-tracking branch 'origin/fix_20230911_UAT' into fix_20230911_UAT
This commit is contained in:
@@ -1317,6 +1317,10 @@ ALTER TABLE `project_library_base` ADD COLUMN `platform_type` varchar(255) NULL
|
|||||||
ALTER TABLE `ota_manage_receive_nsdp`
|
ALTER TABLE `ota_manage_receive_nsdp`
|
||||||
ADD COLUMN `extension_item_count` int(10) NULL COMMENT '扩展任务数量' AFTER `created_at`;
|
ADD COLUMN `extension_item_count` int(10) NULL COMMENT '扩展任务数量' AFTER `created_at`;
|
||||||
|
|
||||||
|
-- 法规月报填写添加保存状态字段 2023-10-20
|
||||||
|
ALTER TABLE `laws_monthly_report_write`
|
||||||
|
ADD COLUMN `save_state` varchar(10) NULL COMMENT '保存状态(0->暂存,1->提交)' AFTER `technology_territory_en`;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
@@ -216,5 +216,6 @@ public class LawsMonthlyReportWriteEO implements Serializable {
|
|||||||
private String sourceCn;//来源中文
|
private String sourceCn;//来源中文
|
||||||
private String sourceEn;//来源英文
|
private String sourceEn;//来源英文
|
||||||
private String time;//日期
|
private String time;//日期
|
||||||
|
private String saveState;//保存状态
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+40
@@ -0,0 +1,40 @@
|
|||||||
|
package com.jero.modules.report.enums;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description
|
||||||
|
* @date 2022/1/21 15:22
|
||||||
|
* @auth zhn
|
||||||
|
*/
|
||||||
|
public enum SaveStateEnum {
|
||||||
|
SAVE("保存","0"),
|
||||||
|
SUBMIT("提交","1")
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
String name;
|
||||||
|
String value;
|
||||||
|
|
||||||
|
private SaveStateEnum(String name, String value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
+25
-1
@@ -24,6 +24,7 @@ import com.jero.modules.report.entity.NewOpinionTemplateEO;
|
|||||||
import com.jero.modules.report.entity.NewStandardTemplateEO;
|
import com.jero.modules.report.entity.NewStandardTemplateEO;
|
||||||
import com.jero.modules.report.enums.ContentTemplateEnum;
|
import com.jero.modules.report.enums.ContentTemplateEnum;
|
||||||
import com.jero.modules.report.enums.ExportStateEnum;
|
import com.jero.modules.report.enums.ExportStateEnum;
|
||||||
|
import com.jero.modules.report.enums.SaveStateEnum;
|
||||||
import com.jero.modules.report.mapper.LawsMonthlyReportWriteEOMapper;
|
import com.jero.modules.report.mapper.LawsMonthlyReportWriteEOMapper;
|
||||||
import com.jero.modules.report.service.ILawsMonthlyReportTitleTemplateEOService;
|
import com.jero.modules.report.service.ILawsMonthlyReportTitleTemplateEOService;
|
||||||
import com.jero.modules.report.service.ILawsMonthlyReportWriteEOService;
|
import com.jero.modules.report.service.ILawsMonthlyReportWriteEOService;
|
||||||
@@ -32,7 +33,6 @@ import com.jero.modules.report.service.INewStandardTemplateEOService;
|
|||||||
import com.jero.modules.report.util.WordUtil;
|
import com.jero.modules.report.util.WordUtil;
|
||||||
import com.jero.modules.system.entity.SysCategory;
|
import com.jero.modules.system.entity.SysCategory;
|
||||||
import com.jero.modules.system.entity.SysDictItem;
|
import com.jero.modules.system.entity.SysDictItem;
|
||||||
import com.jero.modules.system.enums.ProjectRoleEnum;
|
|
||||||
import com.jero.modules.system.service.impl.SysBaseApiImpl;
|
import com.jero.modules.system.service.impl.SysBaseApiImpl;
|
||||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||||
@@ -105,6 +105,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void add(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO) {
|
public void add(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO) {
|
||||||
|
// lawsMonthlyReportWriteEO.setSaveState("0");
|
||||||
// lawsMonthlyReportWriteEO.setMemoriesChapterOne("2");
|
// lawsMonthlyReportWriteEO.setMemoriesChapterOne("2");
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
lawsMonthlyReportWriteEO.setCreateTime(now);
|
lawsMonthlyReportWriteEO.setCreateTime(now);
|
||||||
@@ -138,6 +139,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void editById(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO) {
|
public void editById(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO) {
|
||||||
|
// lawsMonthlyReportWriteEO.setSaveState("1");
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
lawsMonthlyReportWriteEO.setUpdateTime(now);
|
lawsMonthlyReportWriteEO.setUpdateTime(now);
|
||||||
saveOrUpdate(lawsMonthlyReportWriteEO);
|
saveOrUpdate(lawsMonthlyReportWriteEO);
|
||||||
@@ -304,6 +306,17 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
|||||||
// queryWrapper.in("create_by",currentUser.getUsername());
|
// queryWrapper.in("create_by",currentUser.getUsername());
|
||||||
// }
|
// }
|
||||||
//-------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------
|
||||||
|
//草稿只能自己查看,已提交的所有人都可以查看
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
queryWrapper.lambda().and(q->{
|
||||||
|
q.eq(LawsMonthlyReportWriteEO::getSaveState, SaveStateEnum.SUBMIT.getValue());
|
||||||
|
q.or().isNull(LawsMonthlyReportWriteEO::getSaveState);
|
||||||
|
q.or(wrapper->{
|
||||||
|
wrapper.eq(LawsMonthlyReportWriteEO::getCreateBy,currentUser.getUsername());
|
||||||
|
wrapper.eq(LawsMonthlyReportWriteEO::getSaveState,SaveStateEnum.SAVE.getValue());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//所有的月报
|
//所有的月报
|
||||||
@@ -483,6 +496,17 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
|||||||
// wrapper.in(LawsMonthlyReportWriteEO::getCreateBy,currentUser.getUsername());
|
// wrapper.in(LawsMonthlyReportWriteEO::getCreateBy,currentUser.getUsername());
|
||||||
// }
|
// }
|
||||||
//----------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//草稿只能自己查看,已提交的所有人都可以查看
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
wrapper.and(q->{
|
||||||
|
q.eq(LawsMonthlyReportWriteEO::getSaveState, SaveStateEnum.SUBMIT.getValue());
|
||||||
|
q.or().isNull(LawsMonthlyReportWriteEO::getSaveState);
|
||||||
|
q.or(queryWrapper->{
|
||||||
|
queryWrapper.eq(LawsMonthlyReportWriteEO::getCreateBy,currentUser.getUsername());
|
||||||
|
queryWrapper.eq(LawsMonthlyReportWriteEO::getSaveState,SaveStateEnum.SAVE.getValue());
|
||||||
|
});
|
||||||
|
});
|
||||||
List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS = this.list(wrapper);
|
List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS = this.list(wrapper);
|
||||||
|
|
||||||
if(lawsMonthlyReportWriteEOS.size() == 0){
|
if(lawsMonthlyReportWriteEOS.size() == 0){
|
||||||
|
|||||||
+16
-1
@@ -554,7 +554,22 @@
|
|||||||
callback && callback(formInline)
|
callback && callback(formInline)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
save(callback){
|
||||||
|
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
Object.keys(formInline).forEach(res => {
|
||||||
|
if (formInline[res] && formInline[res] instanceof Array) {
|
||||||
|
formInline[res] = formInline[res].join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (!formInline.state || formInline.state == '' || formInline.state == 'null') {
|
||||||
|
formInline.state = ''
|
||||||
|
}
|
||||||
|
if (!formInline.useMethod || formInline.useMethod == '' || formInline.useMethod == 'null') {
|
||||||
|
formInline.useMethod = ''
|
||||||
|
}
|
||||||
|
callback && callback(formInline)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -98,6 +98,7 @@
|
|||||||
</a-spin>
|
</a-spin>
|
||||||
<div class="drawer-bootom-button">
|
<div class="drawer-bootom-button">
|
||||||
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
|
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
|
||||||
|
<a-button style="margin-right: 8px" @click="handleSave">{{$t('preservation')}}</a-button>
|
||||||
<a-button @click="handleSubmit" v-if="!disabled" type="primary" :loading="confirmLoading">{{$t('submit')}}
|
<a-button @click="handleSubmit" v-if="!disabled" type="primary" :loading="confirmLoading">{{$t('submit')}}
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -266,6 +267,51 @@
|
|||||||
this.formInline.memoriesChapter = value
|
this.formInline.memoriesChapter = value
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = { ...this.formInline }
|
||||||
},
|
},
|
||||||
|
handleSave(){
|
||||||
|
let text = ''
|
||||||
|
if (this.$refs.defaultTemplateRef) {
|
||||||
|
text = 'defaultTemplateRef'
|
||||||
|
} else if (this.$refs.solicitOpinionsRef) {
|
||||||
|
text = 'solicitOpinionsRef'
|
||||||
|
} else if (this.$refs.releaseStandardRef) {
|
||||||
|
text = 'releaseStandardRef'
|
||||||
|
} else if (this.$refs.industryTemplateRef) {
|
||||||
|
text = 'industryTemplateRef'
|
||||||
|
}
|
||||||
|
this.$refs[text].save((val) => {
|
||||||
|
this.confirmLoading = true
|
||||||
|
let url = ''
|
||||||
|
if (this.formInline.id) {
|
||||||
|
url = this.url.edit
|
||||||
|
} else {
|
||||||
|
url = this.url.add
|
||||||
|
}
|
||||||
|
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
Object.keys(formInline).forEach(res => {
|
||||||
|
if (formInline[res] && formInline[res] instanceof Array) {
|
||||||
|
formInline[res] = formInline[res].join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let query = Object.assign(val, {
|
||||||
|
month: formInline.month,
|
||||||
|
memoriesChapter: formInline.memoriesChapter,
|
||||||
|
contentTemplate: formInline.contentTemplate,
|
||||||
|
memoriesChapterOne:formInline.memoriesChapterOne,
|
||||||
|
saveState:0,
|
||||||
|
})
|
||||||
|
postAction(url, query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
this.visible = false
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$emit('fillAddForm')
|
||||||
|
} else {
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -297,7 +343,8 @@
|
|||||||
month: formInline.month,
|
month: formInline.month,
|
||||||
memoriesChapter: formInline.memoriesChapter,
|
memoriesChapter: formInline.memoriesChapter,
|
||||||
contentTemplate: formInline.contentTemplate,
|
contentTemplate: formInline.contentTemplate,
|
||||||
memoriesChapterOne:formInline.memoriesChapterOne
|
memoriesChapterOne:formInline.memoriesChapterOne,
|
||||||
|
saveState:1,
|
||||||
})
|
})
|
||||||
postAction(url, query).then((res) => {
|
postAction(url, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|||||||
+10
-1
@@ -296,7 +296,16 @@
|
|||||||
callback && callback(formInline)
|
callback && callback(formInline)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
save(callback){
|
||||||
|
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
Object.keys(formInline).forEach(res => {
|
||||||
|
if (formInline[res] && formInline[res] instanceof Array) {
|
||||||
|
formInline[res] = formInline[res].join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
callback && callback(formInline)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+8
-1
@@ -173,7 +173,14 @@
|
|||||||
callback && callback(query)
|
callback && callback(query)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
save(callback){
|
||||||
|
let query = {
|
||||||
|
id: this.formInline.id,
|
||||||
|
newStandardTemplateEOList: this.formInline.dataList
|
||||||
|
}
|
||||||
|
callback && callback(query)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+8
-1
@@ -152,7 +152,14 @@
|
|||||||
callback && callback(query)
|
callback && callback(query)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
save(callback){
|
||||||
|
let query = {
|
||||||
|
id: this.formInline.id,
|
||||||
|
newOpinionTemplateEOList: this.formInline.dataList
|
||||||
|
}
|
||||||
|
callback && callback(query)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user