Browse Source

opt: 异动记录调整,标签查询调整;

muti_db
Yen 12 months ago
parent
commit
4be7831f3e
  1. 2
      src/main/java/com/qs/serve/modules/tbs/controller/TbsCostApplyController.java
  2. 11
      src/main/java/com/qs/serve/modules/tbs/service/impl/TbsCostChangeInfoServiceImpl.java
  3. 4
      src/main/java/com/qs/serve/task/TagTask.java
  4. 6
      src/main/resources/mapper/tag/TagDataMapper.xml

2
src/main/java/com/qs/serve/modules/tbs/controller/TbsCostApplyController.java

@ -407,7 +407,7 @@ public class TbsCostApplyController {
lqw.orderByAsc(TbsCostApply::getCreateTime);
List<TbsCostApply> costApplyList = tbsCostApplyService.list(lqw);
for (TbsCostApply apply : costApplyList) {
tbsCostChangeInfoService.compareToBuildChangeInfo(apply.getChangeSourceId(),apply.getChangeExtendId());
tbsCostChangeInfoService.compareToBuildChangeInfo(apply.getId(),apply.getChangeExtendId());
List<TbsCostChangeInfo> changeInfoList = tbsCostChangeInfoService.listByExtendCostApplyId(apply.getId());
apply.setChangeInfoLogs(changeInfoList);
}

11
src/main/java/com/qs/serve/modules/tbs/service/impl/TbsCostChangeInfoServiceImpl.java

@ -72,12 +72,17 @@ public class TbsCostChangeInfoServiceImpl extends ServiceImpl<TbsCostChangeInfoM
checkBuild.eq(TbsCostChangeInfo::getSourceId,orgId);
checkBuild.eq(TbsCostChangeInfo::getExtendId,newId);
Long count = this.count(checkBuild);
TbsCostApply newApply = costApplyService.getById(newId);
if(count>0){
return;
//未提交则进行删除
if(newApply.getChargeState().equals(0)){
this.remove(checkBuild);
}else {
return;
}
}
List<TbsCostChangeInfo> changeInfoList = new ArrayList<>();
TbsCostApply oldApply = costApplyService.getById(orgId);
TbsCostApply newApply = costApplyService.getById(newId);
if(!oldApply.getChargeTheme().equals(newApply.getChargeTheme())){
changeInfoList.add(TbsCostChangeInfo.toNewObject("档案标题更变",newApply.getChargeTheme()));
}
@ -90,7 +95,7 @@ public class TbsCostChangeInfoServiceImpl extends ServiceImpl<TbsCostChangeInfoM
for (TbsActivity newAct : newActivityList) {
if(orgAct.getActivityCode().equals(newAct.getActivityCode())){
orgMatchNewAct = true;
if(orgAct.getActTitle().equals(newAct.getActTitle())){
if(!orgAct.getActTitle().equals(newAct.getActTitle())){
changeInfoList.add(TbsCostChangeInfo.toNewObject("活动活动简述及目的更变",newAct.getActTitle()));
}
if(!orgAct.getActStartDate().equals(newAct.getActStartDate())||!orgAct.getActEndDate().equals(newAct.getActEndDate())){

4
src/main/java/com/qs/serve/task/TagTask.java

@ -30,9 +30,9 @@ public class TagTask {
/**
* 数据处理10-15分钟清理过期数据
*/
@Scheduled(cron="0 0/1 * * * ?")
//@Scheduled(cron="0 0/1 * * * ?")
public void buildTempTable(){
tagDataMapper.deleteExpireData();
//tagDataMapper.deleteExpireData();
}

6
src/main/resources/mapper/tag/TagDataMapper.xml

@ -49,9 +49,9 @@
left join tag_info on tag_data.tag_id = tag_info.id
<where>
and tag_info.del_flag = 0 and `tag_data`.del_flag = 0
<if test="query.ignoreDateFlag = null or query.ignoreDateFlag != '1' ">
and (tag_data.start_date is null or tag_data.start_date &gt;= now() )
and (tag_data.end_date is null or tag_data.end_date &lt;= now() )
<if test="query.ignoreDateFlag = null or query.ignoreDateFlag != 1 ">
and (tag_data.start_date is null or tag_data.start_date &lt;= now() )
and (tag_data.end_date is null or tag_data.end_date &gt;= now() )
</if>
<if test="query.id != null"> and `tag_data`.`id` = #{query.id}</if>
<if test="query.tagName != null and query.tagName != ''"> and `tag_data`.`tag_name` = #{query.tagName}</if>

Loading…
Cancel
Save