Explorar o código

【CHG】检测表区分领导和职工

ZhaoMn %!s(int64=4) %!d(string=hai) anos
pai
achega
67a871963f

+ 2 - 2
railway-admin/src/main/java/com/railway/web/controller/business/catenary/BusJcebController.java

@@ -62,9 +62,9 @@ public class BusJcebController extends BaseController {
     SysUser user = SecurityUtils.getLoginUser().getUser();
     PostTypeEnum postType = PostTypeEnum.ofValue(user.getPost());
     if(postType == PostTypeEnum.STAFF){
-      query.setOperator(user.getUserId());
+      query.setCreateBy(user.getUserName());
     }else {
-      query.setOperator(null);
+      query.setCreateBy(null);
     }
 
     JcebTypeEnum jcebTypeEnum = JcebTypeEnum.ofValue(query.getJcebType());

+ 7 - 0
railway-business/src/main/java/com/railway/business/catenary/domain/vo/JcebQueryVo.java

@@ -28,4 +28,11 @@ public class JcebQueryVo implements Serializable {
 
   @ApiModelProperty(value = "记录人/操作人")
   private Long operator;
+
+  /**
+   * 创建者
+   */
+  @ApiModelProperty(value = "创建者")
+  private String createBy;
+
 }

+ 93 - 91
railway-business/src/main/java/com/railway/business/catenary/service/impl/BusJcebGjsfxServiceImpl.java

@@ -9,109 +9,111 @@ import java.util.Date;
 import java.util.List;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+
 /**
-* 检测表-关节式分相 
-* @author whh
-* @date 2021/10/19
-*/
+ * 检测表-关节式分相
+ *
+ * @author whh
+ * @date 2021/10/19
+ */
 @Service
 @Transactional(readOnly = true)
 public class BusJcebGjsfxServiceImpl extends BusJcebServiceImpl<BusJcebGjsfx>
-		implements IBusJcebGjsfxService{
+    implements IBusJcebGjsfxService {
 
-	private final BusJcebGjsfxMapper busJcebGjsfxMapper;
+  private final BusJcebGjsfxMapper busJcebGjsfxMapper;
 
-	public BusJcebGjsfxServiceImpl(BusJcebGjsfxMapper busJcebGjsfxMapper) {
-		super(busJcebGjsfxMapper);
-		this.busJcebGjsfxMapper = busJcebGjsfxMapper;
-	}
+  public BusJcebGjsfxServiceImpl(BusJcebGjsfxMapper busJcebGjsfxMapper) {
+    super(busJcebGjsfxMapper);
+    this.busJcebGjsfxMapper = busJcebGjsfxMapper;
+  }
 
-	/**
-	* 新增
-	*/
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public int create(BusJcebGjsfx busJcebGjsfx) {
-	    busJcebGjsfx.setCreateTime(new Date());
-        busJcebGjsfx.setCreateBy(SecurityUtils.getUsername());
-		return busJcebGjsfxMapper.insert(busJcebGjsfx);
-	}
+  /**
+   * 新增
+   */
+  @Override
+  @Transactional(rollbackFor = Exception.class)
+  public int create(BusJcebGjsfx busJcebGjsfx) {
+    busJcebGjsfx.setCreateTime(new Date());
+    busJcebGjsfx.setCreateBy(SecurityUtils.getUsername());
+    return busJcebGjsfxMapper.insert(busJcebGjsfx);
+  }
 
-	/**
-	* 删除
-	*/
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public int delete(String[] ids) {
-		int r =0;
-		for (String id : ids) {
-			int j= busJcebGjsfxMapper.delete(id);
-			r = r + j;
-		}
-		return	r;
-	}
+  /**
+   * 删除
+   */
+  @Override
+  @Transactional(rollbackFor = Exception.class)
+  public int delete(String[] ids) {
+    int r = 0;
+    for (String id : ids) {
+      int j = busJcebGjsfxMapper.delete(id);
+      r = r + j;
+    }
+    return r;
+  }
 
-	/**
-	* 更新
-	*/
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public int update(BusJcebGjsfx busJcebGjsfx) {
-		busJcebGjsfx.setUpdateTime(new Date());
-    	busJcebGjsfx.setUpdateBy(SecurityUtils.getUsername());
-		return busJcebGjsfxMapper.update(busJcebGjsfx);
-	}
+  /**
+   * 更新
+   */
+  @Override
+  @Transactional(rollbackFor = Exception.class)
+  public int update(BusJcebGjsfx busJcebGjsfx) {
+    busJcebGjsfx.setUpdateTime(new Date());
+    busJcebGjsfx.setUpdateBy(SecurityUtils.getUsername());
+    return busJcebGjsfxMapper.update(busJcebGjsfx);
+  }
 
-	/**
-	* 获取单个
-	*/
-	@Override
-	public BusJcebGjsfx getInfo(String id) {
-		return busJcebGjsfxMapper.getInfo(id);
-	}
+  /**
+   * 获取单个
+   */
+  @Override
+  public BusJcebGjsfx getInfo(String id) {
+    return busJcebGjsfxMapper.getInfo(id);
+  }
 
-	/**
-	* 查询列表
-	*/
-	@Override
-	public List<BusJcebGjsfx> getList(BusJcebGjsfx busJcebGjsfx) {
-		return busJcebGjsfxMapper.getList(busJcebGjsfx);
-	}
+  /**
+   * 查询列表
+   */
+  @Override
+  public List<BusJcebGjsfx> getList(BusJcebGjsfx busJcebGjsfx) {
+    return busJcebGjsfxMapper.getList(busJcebGjsfx);
+  }
 
-	/**
-	 * 提交
-	 *
-	 * @return 提交结果
-	 */
-	@Override
-	public int submit(BusJcebGjsfx busJcebGjsfx) {
-		setSubmit(busJcebGjsfx);
-		if(StringUtils.isEmpty(busJcebGjsfx.getId())){
-			return create(busJcebGjsfx);
-		} else {
-			return update(busJcebGjsfx);
-		}
-	}
+  /**
+   * 提交
+   *
+   * @return 提交结果
+   */
+  @Override
+  public int submit(BusJcebGjsfx busJcebGjsfx) {
+    setSubmit(busJcebGjsfx);
+    if (StringUtils.isEmpty(busJcebGjsfx.getId())) {
+      return create(busJcebGjsfx);
+    } else {
+      return update(busJcebGjsfx);
+    }
+  }
 
-	/**
-	 * 退回
-	 *
-	 * @return 退回结果
-	 */
-	@Override
-	public int reject(BusJcebGjsfx busJcebGjsfx) {
-		setReject(busJcebGjsfx);
-		return update(busJcebGjsfx);
-	}
+  /**
+   * 退回
+   *
+   * @return 退回结果
+   */
+  @Override
+  public int reject(BusJcebGjsfx busJcebGjsfx) {
+    setReject(busJcebGjsfx);
+    return update(busJcebGjsfx);
+  }
 
-	/**
-	 * 确认
-	 *
-	 * @return 确认结果
-	 */
-	@Override
-	public int confirm(BusJcebGjsfx busJcebGjsfx) {
-		setConfirm(busJcebGjsfx);
-		return update(busJcebGjsfx);
-	}
+  /**
+   * 确认
+   *
+   * @return 确认结果
+   */
+  @Override
+  public int confirm(BusJcebGjsfx busJcebGjsfx) {
+    setConfirm(busJcebGjsfx);
+    return update(busJcebGjsfx);
+  }
 }

+ 0 - 4
railway-business/src/main/java/com/railway/business/catenary/service/impl/BusJcebServiceImpl.java

@@ -7,10 +7,6 @@ import com.railway.business.catenary.domain.vo.JcebRecordVo;
 import com.railway.business.catenary.enums.JcebStatusEnum;
 import com.railway.business.catenary.mapper.BusJcebMapper;
 import com.railway.business.catenary.service.IBusJcebService;
-import com.railway.common.core.domain.entity.SysUser;
-import com.railway.common.utils.SecurityUtils;
-import java.util.Date;
-import java.util.List;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 

+ 3 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebGjsfxMapper.xml

@@ -378,6 +378,9 @@
       <if test="operator!=null and operator!=''">
         and t.operator=#{operator}
       </if>
+      <if test="createBy!=null and createBy!=''">
+        and t.create_by=#{createBy}
+      </if>
     </where>
   </select>
 

+ 3 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebJddzMapper.xml

@@ -296,6 +296,9 @@
       <if test="operator!=null and operator!=''">
         and t.operator=#{operator}
       </if>
+      <if test="createBy!=null and createBy!=''">
+        and t.create_by=#{createBy}
+      </if>
     </where>
   </select>
 

+ 3 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebJyzqsjlMapper.xml

@@ -265,6 +265,9 @@
       <if test="operator!=null and operator!=''">
         and t.operator=#{operator}
       </if>
+      <if test="createBy!=null and createBy!=''">
+        and t.create_by=#{createBy}
+      </if>
     </where>
   </select>
 

+ 3 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebLbjghjlMapper.xml

@@ -300,6 +300,9 @@
       <if test="operator!=null and operator!=''">
         and t.operator=#{operator}
       </if>
+      <if test="createBy!=null and createBy!=''">
+        and t.create_by=#{createBy}
+      </if>
     </where>
   </select>
 

+ 3 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebQmjcjlMapper.xml

@@ -343,6 +343,9 @@
       <if test="operator!=null and operator!=''">
         and t.operator=#{operator}
       </if>
+      <if test="createBy!=null and createBy!=''">
+        and t.create_by=#{createBy}
+      </if>
     </where>
   </select>
 

+ 3 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebXsjcjlMapper.xml

@@ -326,6 +326,9 @@
       <if test="operator!=null and operator!=''">
         and t.operator=#{operator}
       </if>
+      <if test="createBy!=null and createBy!=''">
+        and t.create_by=#{createBy}
+      </if>
     </where>
   </select>