接口调整
This commit is contained in:
@@ -66,5 +66,15 @@ public class CsDataSetController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getModuleDataSet")
|
||||
@ApiOperation("获取子模块数据集")
|
||||
@ApiImplicitParam(name = "modelId", value = "模板id", required = true)
|
||||
public HttpResult<List<CsDataSet>> getModuleDataSet(@RequestParam("modelId") String modelId){
|
||||
String methodDescribe = getMethodDescribe("getModuleDataSet");
|
||||
List<CsDataSet> list = csDataSetService.getModuleDataSet(modelId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -170,11 +170,12 @@ public class EquipmentDeliveryController extends BaseController {
|
||||
@ApiOperation("根据网关id调整软件信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "nDId", value = "网关id", required = true),
|
||||
@ApiImplicitParam(name = "id", value = "软件信息id", required = true)
|
||||
@ApiImplicitParam(name = "id", value = "软件信息id", required = true),
|
||||
@ApiImplicitParam(name = "module", value = "模块个数", required = true)
|
||||
})
|
||||
public HttpResult<Boolean> updateSoftInfoBynDid(@RequestParam("nDId") String nDid,@RequestParam("id") String id){
|
||||
public HttpResult<Boolean> updateSoftInfoBynDid(@RequestParam("nDId") String nDid,@RequestParam("id") String id,@RequestParam("module") Integer module){
|
||||
String methodDescribe = getMethodDescribe("updateSoftInfoBynDid");
|
||||
csEquipmentDeliveryService.updateSoftInfoBynDid(nDid,id);
|
||||
csEquipmentDeliveryService.updateSoftInfoBynDid(nDid,id,module);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@@ -106,5 +106,6 @@
|
||||
and t1.did = #{param.did}
|
||||
and t3.cl_dev = #{param.cldId}
|
||||
and t4.stat_method = #{param.statMethod}
|
||||
order by t4.sort
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -81,5 +81,5 @@ public interface CsEquipmentDeliveryService extends IService<CsEquipmentDelivery
|
||||
* 根据网关id修改软件信息
|
||||
* @param nDid 网关id
|
||||
*/
|
||||
void updateSoftInfoBynDid(String nDid,String id);
|
||||
void updateSoftInfoBynDid(String nDid,String id,Integer module);
|
||||
}
|
||||
|
||||
@@ -38,4 +38,11 @@ public interface ICsDataSetService extends IService<CsDataSet> {
|
||||
* @return
|
||||
*/
|
||||
List<LineTargetVO> getDataSet(String modelId,Integer clDev);
|
||||
|
||||
/**
|
||||
* 获取子模块数据集
|
||||
* @param modelId 模板id
|
||||
* @return
|
||||
*/
|
||||
List<CsDataSet> getModuleDataSet(String modelId);
|
||||
}
|
||||
|
||||
@@ -36,4 +36,9 @@ public class CsDataSetServiceImpl extends ServiceImpl<CsDataSetMapper, CsDataSet
|
||||
return this.baseMapper.getDataSet(modelId,clDev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CsDataSet> getModuleDataSet(String modelId) {
|
||||
return this.lambdaQuery().eq(CsDataSet::getPid,modelId).ne(CsDataSet::getClDev,0).list();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -255,9 +255,9 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSoftInfoBynDid(String nDid, String id) {
|
||||
public void updateSoftInfoBynDid(String nDid, String id, Integer module) {
|
||||
LambdaUpdateWrapper<CsEquipmentDeliveryPO> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
|
||||
lambdaUpdateWrapper.set(CsEquipmentDeliveryPO::getSoftinfoId,id).eq(CsEquipmentDeliveryPO::getNdid,nDid);
|
||||
lambdaUpdateWrapper.set(CsEquipmentDeliveryPO::getSoftinfoId,id).set(CsEquipmentDeliveryPO::getModuleNumber,module).eq(CsEquipmentDeliveryPO::getNdid,nDid);
|
||||
this.update(lambdaUpdateWrapper);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user