Browse Source

只查询自己

feature/hk_device
zhangyuan 3 years ago
parent
commit
e2ff7924b3
  1. 3
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java
  2. 3
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentContractInfoDao.xml

3
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java

@ -69,6 +69,9 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf
@Override @Override
public PageData<RentContractInfoDTO> page(Map<String, Object> params) { public PageData<RentContractInfoDTO> page(Map<String, Object> params) {
params.put("customerId", loginUserUtil.getLoginUserCustomerId()); params.put("customerId", loginUserUtil.getLoginUserCustomerId());
if (StringUtils.isNotBlank((String) params.get("dataFlag"))) {
params.put("createdBy", loginUserUtil.getLoginUserId());
}
IPage<RentContractInfoDTO> page = getPage(params); IPage<RentContractInfoDTO> page = getPage(params);
List<RentContractInfoDTO> list = baseDao.getContractInfoList(params); List<RentContractInfoDTO> list = baseDao.getContractInfoList(params);
return new PageData<>(list, page.getTotal()); return new PageData<>(list, page.getTotal());

3
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentContractInfoDao.xml

@ -95,6 +95,9 @@
<if test="endTime != null and endTime != ''"> <if test="endTime != null and endTime != ''">
AND i.SIGN_DATE &lt;= #{endTime} AND i.SIGN_DATE &lt;= #{endTime}
</if> </if>
<if test="createdBy != null and createdBy != ''">
AND i.CREATED_BY = #{createdBy}
</if>
<if test="endDate != null and endDate != ''"> <if test="endDate != null and endDate != ''">
<if test="endDate == '0' or endDate == 0"> <if test="endDate == '0' or endDate == 0">
AND DATE( i.END_DATE ) &lt;= DATE_ADD( curdate(), INTERVAL 1 MONTH ) AND DATE( i.END_DATE ) &lt;= DATE_ADD( curdate(), INTERVAL 1 MONTH )

Loading…
Cancel
Save