Browse Source

message:

改bug
dev_power_axis
HAHA 4 years ago
parent
commit
5083ef9130
  1. 14
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/ViewController/PowerAxisStructViewController.java
  2. 4
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisLeaderDao.java
  3. 7
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisLeaderService.java
  4. 13
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisLeaderServiceImpl.java
  5. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java
  6. 5
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructLeaderDao.xml

14
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/ViewController/PowerAxisStructViewController.java

@ -1,8 +1,11 @@
package com.epmet.plugin.power.modules.axis.ViewController; package com.epmet.plugin.power.modules.axis.ViewController;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.plugin.power.dto.axis.form.PowerAxisLeaderDetailFormDTO;
import com.epmet.plugin.power.dto.axis.form.PowerAxisStructViewFormDTO; import com.epmet.plugin.power.dto.axis.form.PowerAxisStructViewFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisLeaderDetailResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisStructViewResultDTO; import com.epmet.plugin.power.dto.axis.result.PowerAxisStructViewResultDTO;
import com.epmet.plugin.power.modules.axis.service.PowerAxisLeaderService;
import com.epmet.plugin.power.modules.axis.service.PowerAxisStructService; import com.epmet.plugin.power.modules.axis.service.PowerAxisStructService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
@ -17,6 +20,8 @@ public class PowerAxisStructViewController {
@Autowired @Autowired
private PowerAxisStructService powerAxisStructService; private PowerAxisStructService powerAxisStructService;
@Autowired
private PowerAxisLeaderService powerAxisLeaderService;
/** /**
* 关键指标统计 * 关键指标统计
@ -26,4 +31,13 @@ public class PowerAxisStructViewController {
PowerAxisStructViewResultDTO result = powerAxisStructService.getStatistics(form); PowerAxisStructViewResultDTO result = powerAxisStructService.getStatistics(form);
return new Result().ok(result); return new Result().ok(result);
} }
/**
* 动力主轴负责人详细信息
*/
@PostMapping("/leader")
public Result getLeaderDetail(@RequestBody PowerAxisLeaderDetailFormDTO form){
PowerAxisLeaderDetailResultDTO dto = powerAxisLeaderService.getLeaderDetail(form);
return new Result();
}
} }

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

@ -2,6 +2,8 @@ package com.epmet.plugin.power.modules.axis.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.plugin.power.dto.axis.PowerAxisLeaderDTO; import com.epmet.plugin.power.dto.axis.PowerAxisLeaderDTO;
import com.epmet.plugin.power.dto.axis.form.PowerAxisLeaderDetailFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisLeaderDetailResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO; import com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO;
import com.epmet.plugin.power.modules.axis.entity.PowerAxisLeaderEntity; import com.epmet.plugin.power.modules.axis.entity.PowerAxisLeaderEntity;
import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructLeaderEntity; import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructLeaderEntity;
@ -20,4 +22,6 @@ public interface PowerAxisLeaderDao extends BaseDao<PowerAxisLeaderEntity> {
List<PowerAxisSimpleListDTO> getSimpleList(List<String> ids); List<PowerAxisSimpleListDTO> getSimpleList(List<String> ids);
PowerAxisLeaderDetailResultDTO getLeaderDetail(PowerAxisLeaderDetailFormDTO form);
} }

7
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisLeaderService.java

@ -3,6 +3,8 @@ package com.epmet.plugin.power.modules.axis.service;
import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.plugin.power.dto.axis.PowerAxisLeaderDTO; import com.epmet.plugin.power.dto.axis.PowerAxisLeaderDTO;
import com.epmet.plugin.power.dto.axis.form.PowerAxisLeaderDetailFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisLeaderDetailResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO; import com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO;
import com.epmet.plugin.power.modules.axis.entity.PowerAxisLeaderEntity; import com.epmet.plugin.power.modules.axis.entity.PowerAxisLeaderEntity;
@ -81,4 +83,9 @@ public interface PowerAxisLeaderService extends BaseService<PowerAxisLeaderEntit
* 根据动力主轴id列表获取人员信息 * 根据动力主轴id列表获取人员信息
*/ */
List<PowerAxisSimpleListDTO> getSimpleList(List<String> ids); List<PowerAxisSimpleListDTO> getSimpleList(List<String> ids);
/**
* 动力主轴负责人详细信息
*/
PowerAxisLeaderDetailResultDTO getLeaderDetail(PowerAxisLeaderDetailFormDTO form);
} }

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

@ -7,6 +7,8 @@ import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.plugin.power.dto.axis.PowerAxisLeaderDTO; import com.epmet.plugin.power.dto.axis.PowerAxisLeaderDTO;
import com.epmet.plugin.power.dto.axis.form.PowerAxisLeaderDetailFormDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisLeaderDetailResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO; import com.epmet.plugin.power.dto.axis.result.PowerAxisSimpleListDTO;
import com.epmet.plugin.power.modules.axis.dao.PowerAxisLeaderDao; import com.epmet.plugin.power.modules.axis.dao.PowerAxisLeaderDao;
import com.epmet.plugin.power.modules.axis.dao.PowerAxisStructLeaderDao; import com.epmet.plugin.power.modules.axis.dao.PowerAxisStructLeaderDao;
@ -51,8 +53,8 @@ public class PowerAxisLeaderServiceImpl extends BaseServiceImpl<PowerAxisLeaderD
return ConvertUtils.sourceToTarget(entityList, PowerAxisLeaderDTO.class); return ConvertUtils.sourceToTarget(entityList, PowerAxisLeaderDTO.class);
} }
private QueryWrapper<PowerAxisLeaderEntity> getWrapper(Map<String, Object> params) { private QueryWrapper<PowerAxisLeaderEntity> getWrapper(Map<String, Object> params){
String id = (String) params.get(FieldConstant.ID_HUMP); String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<PowerAxisLeaderEntity> wrapper = new QueryWrapper<>(); QueryWrapper<PowerAxisLeaderEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@ -71,7 +73,7 @@ public class PowerAxisLeaderServiceImpl extends BaseServiceImpl<PowerAxisLeaderD
public void save(PowerAxisLeaderDTO dto) { public void save(PowerAxisLeaderDTO dto) {
PowerAxisLeaderEntity entity = ConvertUtils.sourceToTarget(dto, PowerAxisLeaderEntity.class); PowerAxisLeaderEntity entity = ConvertUtils.sourceToTarget(dto, PowerAxisLeaderEntity.class);
boolean i = insert(entity); boolean i = insert(entity);
if (i) { if(i){
PowerAxisStructLeaderEntity leaderEntity = new PowerAxisStructLeaderEntity(); PowerAxisStructLeaderEntity leaderEntity = new PowerAxisStructLeaderEntity();
leaderEntity.setCustomerId(dto.getCustomerId()); leaderEntity.setCustomerId(dto.getCustomerId());
leaderEntity.setLeaderId(entity.getId()); leaderEntity.setLeaderId(entity.getId());
@ -108,5 +110,10 @@ public class PowerAxisLeaderServiceImpl extends BaseServiceImpl<PowerAxisLeaderD
return list; return list;
} }
@Override
public PowerAxisLeaderDetailResultDTO getLeaderDetail(PowerAxisLeaderDetailFormDTO form) {
return null;
}
} }

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

@ -120,7 +120,7 @@ public class PowerAxisStructServiceImpl extends BaseServiceImpl<PowerAxisStructD
@Override @Override
public void addOrg(PowerAxisStructEntity form) { public void addOrg(PowerAxisStructEntity form) {
int structLevel = powerAxisTagService.selectStructLevelByCode(loginUserUtil.getLoginUserCustomerId(), PowerTagCategoryEnum.LEADER.category(), form.getCategoryCode()); int structLevel = powerAxisTagService.selectStructLevelByCode(loginUserUtil.getLoginUserCustomerId(), PowerTagCategoryEnum.STRUCT.category(), form.getCategoryCode());
if (PowerTagLevelEnum.ROOT.level() == structLevel) { if (PowerTagLevelEnum.ROOT.level() == structLevel) {
int y = baseDao.queryCategory(form); int y = baseDao.queryCategory(form);
if (y > NumConstant.ZERO) { if (y > NumConstant.ZERO) {

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

@ -27,9 +27,10 @@
AVATAR, AVATAR,
ID ID
FROM FROM
pli_power_axis_struct_leader
LEFT JOIN
pli_power_axis_leader pli_power_axis_leader
LEFT JOIN
pli_power_axis_struct_leader
ON ON
STRUCT_REFERENCE_ID = #{axisStructId} STRUCT_REFERENCE_ID = #{axisStructId}
</select> </select>

Loading…
Cancel
Save