|
|
@@ -31,6 +31,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
import java.time.LocalDate;
|
|
|
+import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.regex.Matcher;
|
|
|
@@ -80,7 +81,7 @@ public class CostDocumentWhManagerImpl extends BaseManagerImpl<CostDocumentWhDao
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
- public void createOrUpdate(CostDocumentWh costDocumentWh) {
|
|
|
+ public void createOrUpdate(CostDocumentWh costDocumentWh) throws Exception {
|
|
|
//TODO 生成规则 使用表达式
|
|
|
/**
|
|
|
* 分省、市、县三级分别对本单位的成本监审过程中相关文书的文号前缀统一管理,
|
|
|
@@ -96,7 +97,15 @@ public class CostDocumentWhManagerImpl extends BaseManagerImpl<CostDocumentWhDao
|
|
|
if (!isValidRulePattern(costDocumentWh.getRulePattern())) {
|
|
|
throw new BaseException("规则表达式错误 按要求填写:{prefixText}成审 {year} {currentValue}号");
|
|
|
}
|
|
|
-
|
|
|
+ IUser iUser = ContextUtil.getCurrentUser();
|
|
|
+ User user = userService.getByAccount(iUser.getAccount());
|
|
|
+ if (StringUtil.isNotEmpty(costDocumentWh.getId())) {
|
|
|
+ costDocumentWh.setUpdateBy(user.getAccount());
|
|
|
+ costDocumentWh.setUpdateTime(LocalDateTime.now());
|
|
|
+ }else {
|
|
|
+ costDocumentWh.setCreateTime(LocalDateTime.now());
|
|
|
+ costDocumentWh.setCreateBy(user.getAccount());
|
|
|
+ }
|
|
|
|
|
|
//新建或更新
|
|
|
this.saveOrUpdate(costDocumentWh);
|