Commit a08a4e0b authored by weixin_42327055's avatar weixin_42327055

设备变更app方法

parent 88176c80
package com.zehong.web.controller.deviceManagement;
import java.util.List;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.ServletUtils;
import com.zehong.framework.web.service.TokenService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -32,6 +36,8 @@ public class TChangeApplyApprovalController extends BaseController
{
@Autowired
private ITChangeApplyApprovalService tChangeApplyApprovalService;
@Autowired
private TokenService tokenService;
/**
* 查询变更申请审批验收列表
......@@ -45,6 +51,15 @@ public class TChangeApplyApprovalController extends BaseController
return getDataTable(list);
}
@GetMapping("/listApp")
public TableDataInfo listApp(TChangeApplyApproval tChangeApplyApproval)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
tChangeApplyApproval.setApprovalPerson(loginUser.getUser().getUserId());
startPage();
List<TChangeApplyApproval> list = tChangeApplyApprovalService.selectTChangeApplyApprovalListApp(tChangeApplyApproval);
return getDataTable(list);
}
/**
* 导出变更申请审批验收列表
*/
......
......@@ -57,7 +57,17 @@ public class TChangeApplyApproval extends BaseEntity
private Date enterTimeEnd;
public void setChangeApplyId(Long changeApplyId)
private Long approvalPerson;
public Long getApprovalPerson() {
return approvalPerson;
}
public void setApprovalPerson(Long approvalPerson) {
this.approvalPerson = approvalPerson;
}
public void setChangeApplyId(Long changeApplyId)
{
this.changeApplyId = changeApplyId;
}
......
......@@ -26,6 +26,7 @@ public interface TChangeApplyApprovalMapper
* @return 变更申请审批验收集合
*/
public List<TChangeApplyApproval> selectTChangeApplyApprovalList(TChangeApplyApproval tChangeApplyApproval);
public List<TChangeApplyApproval> selectTChangeApplyApprovalListApp(TChangeApplyApproval tChangeApplyApproval);
/**
* 新增变更申请审批验收
......
......@@ -26,6 +26,8 @@ public interface ITChangeApplyApprovalService
* @return 变更申请审批验收集合
*/
public List<TChangeApplyApproval> selectTChangeApplyApprovalList(TChangeApplyApproval tChangeApplyApproval);
public List<TChangeApplyApproval> selectTChangeApplyApprovalListApp(TChangeApplyApproval tChangeApplyApproval);
/**
* 新增变更申请审批验收
......
......@@ -43,6 +43,17 @@ public class TChangeApplyApprovalServiceImpl implements ITChangeApplyApprovalSer
return tChangeApplyApprovalMapper.selectTChangeApplyApprovalList(tChangeApplyApproval);
}
/**
* app设备变更列表
* @param tChangeApplyApproval
* @return
*/
@Override
public List<TChangeApplyApproval> selectTChangeApplyApprovalListApp(TChangeApplyApproval tChangeApplyApproval)
{
return tChangeApplyApprovalMapper.selectTChangeApplyApprovalListApp(tChangeApplyApproval);
}
/**
* 新增变更申请审批验收
*
......
......@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="changeApplyStatus" column="change_apply_status" />
<result property="isDel" column="is_del" />
<result property="remark" column="remark" />
<result property="approvalPerson" column="approvalPerson" />
</resultMap>
<sql id="selectTChangeApplyApprovalVo">
......@@ -35,6 +36,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
ORDER BY enter_time DESC
</select>
<select id="selectTChangeApplyApprovalListApp" parameterType="TChangeApplyApproval" resultMap="TChangeApplyApprovalResult">
SELECT a.* FROM t_change_apply_approver r
LEFT JOIN t_change_apply_approval a ON a.`change_apply_id` = r.`change_apply_id`
<where>
<if test="changeUnit != null and changeUnit != ''"> and a.change_unit = #{changeUnit}</if>
<if test="changeProjectName != null and changeProjectName != ''"> and a.change_project_name like concat('%', #{changeProjectName}, '%')</if>
<if test="tableData != null and tableData != ''"> and a.table_data = #{tableData}</if>
<if test="enterPerson != null "> and enter_person = #{enterPerson}</if>
<if test="enterTimeBegin != null and enterTimeEnd != null "> and a.enter_time BETWEEN #{enterTimeBegin} AND #{enterTimeEnd}</if>
<if test="trainMaterial != null and trainMaterial != ''"> and a.train_material = #{trainMaterial}</if>
<if test="changeApplyStatus != null and changeApplyStatus != ''"> and a.change_apply_status = #{changeApplyStatus}</if>
<if test="isDel != null and isDel != ''"> and a.is_del = #{isDel}</if>
<if test="approvalPerson != null"> and r.approval_person = #{approvalPerson}</if>
</where>
ORDER BY enter_time DESC
</select>
<select id="selectTChangeApplyApprovalById" parameterType="Long" resultMap="TChangeApplyApprovalResult">
<include refid="selectTChangeApplyApprovalVo"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment