Commit 7b3ab9d34c8ce04453181c04fcdb0a9a6e48d0dd

Authored by maliang
1 parent 7a2b4964f7
Exists in master

修改页面属性字段

Showing 3 changed files with 21 additions and 0 deletions

base.common/src/main/java/com/lyms/base/common/entity/organ/Departments.java View file @ 7b3ab9d
... ... @@ -5,6 +5,8 @@
5 5  
6 6 import com.baomidou.mybatisplus.annotations.TableField;
7 7 import com.baomidou.mybatisplus.annotations.TableName;
  8 +import com.lyms.base.common.enums.ValidityEnum;
  9 +import com.lyms.util.StrUtils;
8 10  
9 11 /**
10 12 * <p>
... ... @@ -18,6 +20,12 @@
18 20 public class Departments implements Serializable {
19 21  
20 22 private static final long serialVersionUID = 1L;
  23 +
  24 + public Departments() {
  25 + this.id = StrUtils.uuid();
  26 + this.ifdel = ValidityEnum.VALIDITY.getValidity();
  27 + this.created = new Date();
  28 + }
21 29  
22 30 /**
23 31 *
base.common/src/main/java/com/lyms/base/common/service/organ/impl/DepartmentsServiceImpl.java View file @ 7b3ab9d
... ... @@ -11,6 +11,7 @@
11 11 import com.lyms.base.common.entity.organ.Departments;
12 12 import com.lyms.base.common.service.organ.DepartmentsService;
13 13 import com.lyms.exception.SystemException;
  14 +import com.lyms.util.StrUtils;
14 15  
15 16 /**
16 17 * <p>
... ... @@ -32,6 +33,11 @@
32 33 public boolean createDepart(Departments departments) throws SystemException {
33 34 if (departments == null)
34 35 return false;
  36 +
  37 + String id = departments.getId();
  38 + if (StringUtils.isBlank(id)) {
  39 + departments.setId(StrUtils.uuid());
  40 + }
35 41 Integer tag = baseMapper.insert(departments);
36 42 return tag != null && tag >= 1;
37 43 }
center.manager/src/main/webapp/WEB-INF/views/depart/depart_edit.html View file @ 7b3ab9d
... ... @@ -28,6 +28,13 @@
28 28 </div>
29 29 </div>
30 30  
  31 + <div class="form-group">
  32 + <label class="col-sm-3 control-label">简码:</label>
  33 + <div class="col-sm-8">
  34 + <input type="text" placeholder="简码" value="$!depart.shortCode" aria-required="true" required="true" class="form-control" minlength="2" name="shortCode" id="shortCode">
  35 + </div>
  36 + </div>
  37 +
31 38 <!-- <div class="form-group">
32 39 <label class="col-sm-3 control-label">状态:</label>
33 40 <div class="col-sm-8">