|
|
@@ -645,4 +645,39 @@ public class accountController extends BaseController {
|
|
|
return ResponseObject.newErrResponse("银行账户操作失败:" + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Mapping(value = "com.awspaas.user.apps.donenow_crm.getContractServiceName")
|
|
|
+ public ResponseObject getContractServiceName(UserContext uc, String contractServiceId) {
|
|
|
+ try {
|
|
|
+ // 1. 校验入参(可选,防止空指针)
|
|
|
+ if (contractServiceId == null || contractServiceId.trim().isEmpty()) {
|
|
|
+ return ResponseObject.newErrResponse("合同服务ID不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2. 查询bo_eu_dnctt_contract_service表的name字段
|
|
|
+ String sql = "SELECT name " +
|
|
|
+ "FROM bo_eu_dnctt_contract_service " +
|
|
|
+ "WHERE id = ?"; // 假设ID字段名为id,若实际字段不同需调整
|
|
|
+
|
|
|
+ Map<String, Object> contractServiceInfo = DBSql.getMap(sql, new Object[]{contractServiceId});
|
|
|
+
|
|
|
+ // 3. 处理查询结果(不存在则返回null)
|
|
|
+ String contractServiceName = null;
|
|
|
+ if (contractServiceInfo != null && contractServiceInfo.get("name") != null) {
|
|
|
+ contractServiceName = contractServiceInfo.get("name").toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 4. 封装响应数据
|
|
|
+ Map<String, Object> result = new HashMap<>(1);
|
|
|
+ result.put("contractServiceName", contractServiceName);
|
|
|
+
|
|
|
+ ResponseObject responseObject = ResponseObject.newOkResponse();
|
|
|
+ responseObject.setData(result);
|
|
|
+ return responseObject;
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ return ResponseObject.newErrResponse("查询合同服务名称失败:" + e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|