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. 15
      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;
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.result.PowerAxisLeaderDetailResultDTO;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@ -17,6 +20,8 @@ public class PowerAxisStructViewController {
@Autowired
private PowerAxisStructService powerAxisStructService;
@Autowired
private PowerAxisLeaderService powerAxisLeaderService;
/**
* 关键指标统计
@ -26,4 +31,13 @@ public class PowerAxisStructViewController {
PowerAxisStructViewResultDTO result = powerAxisStructService.getStatistics(form);
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.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.modules.axis.entity.PowerAxisLeaderEntity;
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);
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.tools.page.PageData;
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.modules.axis.entity.PowerAxisLeaderEntity;
@ -81,4 +83,9 @@ public interface PowerAxisLeaderService extends BaseService<PowerAxisLeaderEntit
* 根据动力主轴id列表获取人员信息
*/
List<PowerAxisSimpleListDTO> getSimpleList(List<String> ids);
/**
* 动力主轴负责人详细信息
*/
PowerAxisLeaderDetailResultDTO getLeaderDetail(PowerAxisLeaderDetailFormDTO form);
}

15
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.utils.ConvertUtils;
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.modules.axis.dao.PowerAxisLeaderDao;
import com.epmet.plugin.power.modules.axis.dao.PowerAxisStructLeaderDao;
@ -24,7 +26,7 @@ import java.util.List;
import java.util.Map;
/**
* 动力主轴领导人
* 动力主轴领导人
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-04-18
@ -51,8 +53,8 @@ public class PowerAxisLeaderServiceImpl extends BaseServiceImpl<PowerAxisLeaderD
return ConvertUtils.sourceToTarget(entityList, PowerAxisLeaderDTO.class);
}
private QueryWrapper<PowerAxisLeaderEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
private QueryWrapper<PowerAxisLeaderEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<PowerAxisLeaderEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@ -71,7 +73,7 @@ public class PowerAxisLeaderServiceImpl extends BaseServiceImpl<PowerAxisLeaderD
public void save(PowerAxisLeaderDTO dto) {
PowerAxisLeaderEntity entity = ConvertUtils.sourceToTarget(dto, PowerAxisLeaderEntity.class);
boolean i = insert(entity);
if (i) {
if(i){
PowerAxisStructLeaderEntity leaderEntity = new PowerAxisStructLeaderEntity();
leaderEntity.setCustomerId(dto.getCustomerId());
leaderEntity.setLeaderId(entity.getId());
@ -108,5 +110,10 @@ public class PowerAxisLeaderServiceImpl extends BaseServiceImpl<PowerAxisLeaderD
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
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) {
int y = baseDao.queryCategory(form);
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,
ID
FROM
pli_power_axis_struct_leader
pli_power_axis_leader
LEFT JOIN
pli_power_axis_leader
pli_power_axis_struct_leader
ON
STRUCT_REFERENCE_ID = #{axisStructId}
</select>

Loading…
Cancel
Save