新增 后管设置桩对应第三方平台编号页面

This commit is contained in:
Lemon
2024-03-11 16:07:20 +08:00
parent c73bc074cd
commit 0cec8f18ce
9 changed files with 244 additions and 4 deletions

View File

@@ -11,12 +11,16 @@ import com.jsowell.common.response.RestApiResponse;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.poi.ExcelUtil;
import com.jsowell.pile.domain.PileBasicInfo;
import com.jsowell.pile.domain.ThirdpartySnRelation;
import com.jsowell.pile.dto.BatchCreatePileDTO;
import com.jsowell.pile.dto.QueryPileDTO;
import com.jsowell.pile.dto.ReplaceMerchantStationDTO;
import com.jsowell.pile.dto.ThirdPartySnRelationDTO;
import com.jsowell.pile.service.IThirdpartySnRelationService;
import com.jsowell.pile.service.PileBasicInfoService;
import com.jsowell.pile.service.PileMsgRecordService;
import com.jsowell.pile.vo.web.PileDetailVO;
import com.jsowell.pile.vo.web.ThirdPartySnRelationVO;
import com.jsowell.service.PileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -49,6 +53,10 @@ public class PileBasicInfoController extends BaseController {
@Autowired
private PileMsgRecordService pileMsgRecordService;
@Autowired
private IThirdpartySnRelationService thirdpartySnRelationService;
/**
* 查询设备管理列表
*/
@@ -186,4 +194,35 @@ public class PileBasicInfoController extends BaseController {
return AjaxResult.success(pileMsgRecordService.getPileFeedList(dto));
}
/**
* 查询桩对应的第三方平台桩编号列表
* @param queryPileDTO
* @return
*/
@PostMapping("/getThirdPartySnRelation")
public TableDataInfo getThirdPartySnRelation(@RequestBody QueryPileDTO queryPileDTO) {
List<ThirdPartySnRelationVO> list = thirdpartySnRelationService.getRelationVOList(queryPileDTO);
return getDataTable(list);
}
/**
* 修改第三方平台对应编号
* @param dto
* @return
*/
@PreAuthorize("@ss.hasPermi('pile:basic:edit')")
@PostMapping("/updateThirdPartySnRelation")
public RestApiResponse<?> updateThirdPartySnRelation(@RequestBody ThirdPartySnRelationDTO dto) {
logger.info("修改第三方平台对应编号 params:{}", JSONObject.toJSONString(dto));
RestApiResponse<?> response = null;
try {
int i = thirdpartySnRelationService.updateThirdPartySnRelation(dto);
response = new RestApiResponse<>(i);
} catch (Exception e) {
response = new RestApiResponse<>(e);
}
logger.info("修改第三方平台对应编号 result:{}", response);
return response;
}
}