Commit 09639ff2 authored by liqin's avatar liqin 💬

Merge branch 'master' of http://111.203.232.171:8888/lee/chnmuseum-party into master

parents ee0d7ec9 5b12d398
...@@ -21,4 +21,6 @@ public interface TBoxOperationMapper extends BaseMapper<TBoxOperation> { ...@@ -21,4 +21,6 @@ public interface TBoxOperationMapper extends BaseMapper<TBoxOperation> {
List<TBoxOperation> getList(@Param("status") String status,@Param("areaId") String areaId); List<TBoxOperation> getList(@Param("status") String status,@Param("areaId") String areaId);
List<TBoxOperation> selectBoxPage(Page<TBoxOperation> page,@Param("user") TUser user); List<TBoxOperation> selectBoxPage(Page<TBoxOperation> page,@Param("user") TUser user);
List<TBoxOperation> selectPageList(Page<TBoxOperation> page,@Param("tBoxOperation") TBoxOperation tBoxOperation);
} }
...@@ -20,4 +20,6 @@ public interface TBoxOperationService extends IService<TBoxOperation> { ...@@ -20,4 +20,6 @@ public interface TBoxOperationService extends IService<TBoxOperation> {
List<TBoxOperation> getList(String status,String areaId); List<TBoxOperation> getList(String status,String areaId);
Page<TBoxOperation> selectBoxPage(Page<TBoxOperation> page, TUser user); Page<TBoxOperation> selectBoxPage(Page<TBoxOperation> page, TUser user);
Page<TBoxOperation> selectPage(Page<TBoxOperation> page, TBoxOperation tBoxOperation);
} }
...@@ -38,5 +38,10 @@ public class TBoxOperationServiceImpl extends ServiceImpl<TBoxOperationMapper, T ...@@ -38,5 +38,10 @@ public class TBoxOperationServiceImpl extends ServiceImpl<TBoxOperationMapper, T
public Page<TBoxOperation> selectBoxPage(Page<TBoxOperation> page, TUser user) { public Page<TBoxOperation> selectBoxPage(Page<TBoxOperation> page, TUser user) {
return page.setRecords(tBoxOperationMapper.selectBoxPage(page, user)); return page.setRecords(tBoxOperationMapper.selectBoxPage(page, user));
} }
@Override
public Page<TBoxOperation> selectPage(Page<TBoxOperation> page, TBoxOperation tBoxOperation) {
return page.setRecords(tBoxOperationMapper.selectPageList(page, tBoxOperation));
}
} }
...@@ -98,7 +98,7 @@ public class AuditController extends BaseController { ...@@ -98,7 +98,7 @@ public class AuditController extends BaseController {
}else{ }else{
audit.setSecondTime(LocalDateTime.now()); audit.setSecondTime(LocalDateTime.now());
if (!AuditStatusEnum.REFUSED.name().equals(audit.getStatus())) { if (!AuditStatusEnum.REFUSED.name().equals(audit.getStatus())) {
audit.setFirstRemarks(""); audit.setSecondRemarks("");
} }
} }
try { try {
......
...@@ -165,24 +165,23 @@ public class TBoxOperationController extends BaseController { ...@@ -165,24 +165,23 @@ public class TBoxOperationController extends BaseController {
@ApiOperation(value = "获取机顶盒运维信息分页列表", notes = "获取机顶盒运维信息分页列表") @ApiOperation(value = "获取机顶盒运维信息分页列表", notes = "获取机顶盒运维信息分页列表")
public Map<String, Object> getTBoxOperationPageList(String organId, Integer status, String areaId) { public Map<String, Object> getTBoxOperationPageList(String organId, Integer status, String areaId) {
TUser user = getcurUser(); TUser user = getcurUser();
UpdateWrapper<TBoxOperation> wrapper = new UpdateWrapper<>(); TBoxOperation tBoxOperation = new TBoxOperation();
if (StringUtils.isNotBlank(organId)) { if (StringUtils.isNotBlank(organId)) {
wrapper.eq("organ_id", organId); tBoxOperation.setOrganId(organId);
} }
if (status != null) { if (status != null) {
wrapper.eq("status", status); tBoxOperation.setStatus(status);
} }
if (StringUtils.isNotBlank(areaId)) { if (StringUtils.isNotBlank(areaId)) {
wrapper.eq("area_id", areaId); tBoxOperation.setAreaId(areaId);
} }
if (StringUtils.isNotBlank(user.getAreaId())) { if (StringUtils.isNotBlank(user.getAreaId())) {
//设置数据权限 //设置数据权限
wrapper.likeRight("area_id", getAreaId(user.getAreaId())); tBoxOperation.setAreaId(getAreaId(user.getAreaId()));
} }
wrapper.orderByDesc("create_time");
Page<TBoxOperation> page = null; Page<TBoxOperation> page = null;
try { try {
page = this.tBoxOperationService.page(getPage(), wrapper); page = this.tBoxOperationService.selectPage(getPage(), tBoxOperation);
return getResult(page); return getResult(page);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -53,4 +53,21 @@ left join t_organ r on r.id = b.organ_id ...@@ -53,4 +53,21 @@ left join t_organ r on r.id = b.organ_id
and u.type = 3 and u.type = 3
order by b.create_time desc order by b.create_time desc
</select> </select>
<select id="selectPageList" resultMap="BaseResultMap">
SELECT b.*,r.`name` organ_name
FROM t_box_operation b
left join t_organ r on r.id = b.organ_id
where 1=1
<if test="tBoxOperation.organId != null and tBoxOperation.organId != '' ">
and b.organ_id =#{tBoxOperation.organId}
</if>
<if test="tBoxOperation.status != null">
and b.status =#{tBoxOperation.status}
</if>
<if test="tBoxOperation.areaId != null and tBoxOperation.areaId != '' ">
and r.area_id like concat(#{tBoxOperation.areaId}, '%')
</if>
</select>
</mapper> </mapper>
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