Browse Source

Merge branch 'dev_power_axis' into develop

develop
HAHA 3 years ago
parent
commit
54c4e1bbb7
  1. 4
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerKernelListPostitionFormDTO.java
  2. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerKernelHouseholdDao.java
  3. 8
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerKernelHouseholdServiceImpl.java
  4. 11
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerKernelHouseholdDao.xml

4
epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerKernelListPostitionFormDTO.java

@ -13,7 +13,6 @@ public class PowerKernelListPostitionFormDTO implements Serializable {
/** /**
* 动力主轴id * 动力主轴id
*/ */
@NotBlank(message = "动力主轴节点不能为空")
private String axisStructId; private String axisStructId;
/** /**
@ -26,4 +25,7 @@ public class PowerKernelListPostitionFormDTO implements Serializable {
*/ */
@NotBlank(message = "所属客户不能为空") @NotBlank(message = "所属客户不能为空")
private String customerId; private String customerId;
@NotBlank(message = "所属组织不能为空")
private String agencyId;
} }

2
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerKernelHouseholdDao.java

@ -54,4 +54,6 @@ public interface PowerKernelHouseholdDao extends BaseDao<PowerKernelHouseholdEnt
List<PowerKernelHouseholdDTO> getPage(Map<String, Object> params); List<PowerKernelHouseholdDTO> getPage(Map<String, Object> params);
String queryAxisStructId(@Param("agencyId") String agencyId,
@Param("customerId") String customerId);
} }

8
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerKernelHouseholdServiceImpl.java

@ -31,6 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -144,7 +145,12 @@ public class PowerKernelHouseholdServiceImpl extends BaseServiceImpl<PowerKernel
if (null == limit || NumConstant.ZERO_L == limit) { if (null == limit || NumConstant.ZERO_L == limit) {
limit = 999; limit = 999;
} }
return baseDao.queryListPosition(form.getAxisStructId(), form.getCustomerId(), limit); String axisStructId = form.getAxisStructId();
if (StringUtils.isBlank(axisStructId)) {
String agencyId = form.getAgencyId();
axisStructId = baseDao.queryAxisStructId(agencyId,form.getCustomerId());
}
return baseDao.queryListPosition(axisStructId, form.getCustomerId(), limit);
} }
@Override @Override

11
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerKernelHouseholdDao.xml

@ -171,6 +171,17 @@
ORDER BY ORDER BY
h.CREATED_TIME h.CREATED_TIME
</select> </select>
<select id="queryAxisStructId" resultType="java.lang.String">
SELECT
id
FROM
pli_power_axis_struct
WHERE
agency_id = #{agencyId}
AND DEL_FLAG = '0'
AND pid = '0'
AND CUSTOMER_ID = #{customerId}
</select>
</mapper> </mapper>
Loading…
Cancel
Save